XilinxProcessorIPLib/drivers/axiethernet/examples/avb/xavb_ptp_packets.c
u32 XAvb_ReorderWord(u32 Data) {
  u32 ReOrder = 0;

  ReOrder =            (Data & 0x000000FF) << 24;
  ReOrder = ReOrder | ((Data & 0x0000FF00) << 8);
  ReOrder = ReOrder | ((Data & 0x00FF0000) >> 8);
  ReOrder = ReOrder | ((Data & 0xFF000000) >> 24);
  return ReOrder;
}
/****************************************************************************/
/**
*
* This function switches the bytes in a 4-byte word, swapping the MSB for the
* LSB, and vice-versa.
*
* @param  Data is the 4-byte input data word
*
* @return The input data word with the bytes swapped (most significant down to
*         least significant
*
* @note   None.
*

*****************************************************************************/
This function switches the bytes in a 4-byte word, swapping the MSB for the
LSB, and vice-versa.
This function switches the bytes in a 4 - byte word swapping the MSB for the LSB and vice - versa .
u32 XAvb_ReorderWord(u32 Data) {
  u32 ReOrder = 0;
  ReOrder =            (Data & 0x000000FF) << 24;
  ReOrder = ReOrder | ((Data & 0x0000FF00) << 8);
  ReOrder = ReOrder | ((Data & 0x00FF0000) >> 8);
  ReOrder = ReOrder | ((Data & 0xFF000000) >> 24);
  return ReOrder;
}
u32 XAvb_ReorderWord ( u32 Data ) { u32 ReOrder = 0 ; ReOrder = ( Data & 0x000000FF ) << 24 ; ReOrder = ReOrder | ( ( Data & 0x0000FF00 ) << 8 ) ; ReOrder = ReOrder | ( ( Data & 0x00FF0000 ) >> 8 ) ; ReOrder = ReOrder | ( ( Data & 0xFF000000 ) >> 24 ) ; return ReOrder ; }
This function switches the bytes in a 4-byte word, swapping the MSB for the
LSB, and vice-versa.
This function switches the bytes in a 4 - byte word swapping the MSB for the LSB and vice - versa .