XilinxProcessorIPLib/drivers/axiethernet/examples/avb/xavb_ptp_packets.c
u32 XAvb_ComparePortIdentity(u32 BaseAddress,
                             XAvb_PortIdentity Identity1,
                             XAvb_PortIdentity Identity2) {

  if( Identity1.ClockIdentityUpper != Identity2.ClockIdentityUpper ) {
    /*xil_printf("ID1Upper (0x%08x) != ID2Upper (0x%08x)\r\n",
               Identity1.ClockIdentityUpper,
               Identity2.ClockIdentityUpper);*/
    return 0;
  }
  if( Identity1.ClockIdentityLower != Identity2.ClockIdentityLower ) {
    /*xil_printf("ID1Lower (0x%08x) != ID2Lower (0x%08x)\r\n",
               Identity1.ClockIdentityLower,
               Identity2.ClockIdentityLower);*/
    return 0;
  }
  if( Identity1.PortNumber != Identity2.PortNumber ) {
    /*xil_printf("ID1Port (0x%08x) != ID2Port (0x%08x)\r\n",
               Identity1.PortNumber,
               Identity2.PortNumber);*/
    return 0;
  }

  /** values are equal */
  return 1;
}
/****************************************************************************/
/**
*
* A function to compare two PortIdentity values.
*
* @param  BaseAddress is the base address of the device
* @param  Identity1 is the first sourcePortIdentity to be compared
* @param  Identity2 is the second sourcePortIdentity to be compared
*
* @return 1 if the two values are equal, 0 if not equal
*
* @note   None.
*
*****************************************************************************/
A function to compare two PortIdentity values.
A function to compare two PortIdentity values .
u32 XAvb_ComparePortIdentity(u32 BaseAddress,
                             XAvb_PortIdentity Identity1,
                             XAvb_PortIdentity Identity2) {
  if( Identity1.ClockIdentityUpper != Identity2.ClockIdentityUpper ) {
    return 0;
  }
  if( Identity1.ClockIdentityLower != Identity2.ClockIdentityLower ) {
    return 0;
  }
  if( Identity1.PortNumber != Identity2.PortNumber ) {
    return 0;
  }
  return 1;
}
u32 XAvb_ComparePortIdentity ( u32 BaseAddress , XAvb_PortIdentity Identity1 , XAvb_PortIdentity Identity2 ) { if ( Identity1 . ClockIdentityUpper != Identity2 . ClockIdentityUpper ) { return 0 ; } if ( Identity1 . ClockIdentityLower != Identity2 . ClockIdentityLower ) { return 0 ; } if ( Identity1 . PortNumber != Identity2 . PortNumber ) { return 0 ; } return 1 ; }
A function to compare two PortIdentity values.
A function to compare two PortIdentity values .
/*xil_printf("ID1Upper (0x%08x) != ID2Upper (0x%08x)\r\n",
               Identity1.ClockIdentityUpper,
               Identity2.ClockIdentityUpper);*/ /*xil_printf("ID1Lower (0x%08x) != ID2Lower (0x%08x)\r\n",
               Identity1.ClockIdentityLower,
               Identity2.ClockIdentityLower);*/ /*xil_printf("ID1Port (0x%08x) != ID2Port (0x%08x)\r\n",
               Identity1.PortNumber,
               Identity2.PortNumber);*/ /** values are equal */