Hello everybody, I'm just asking to the C programming gurus if these 2 macros are right or not.
MSB2LSBW is intended to exchange the byte order of a word.
MSB2LSBDW is intended to exchange the byte order of a Double Word.
Thank you for any suggestion!Code:#define MSB2LSBW( x ) ( x << 8 | (char)x ) #define MSB2LSBDW( x ) (\ ( ( x & 0x000000FF ) << 24 ) \ | ( ( x & 0x0000FF00 ) << 8 ) \ | ( ( x & 0x00FF0000 ) >> 8 ) \ | ( ( x & 0xFF000000 ) >> 24 ) \ )
BrownB