I am sending a 32-bit value from a microcontroller to a PC program over a serial link by copying the four bytes of the variable into the transmit buffer. The value 0x12345678 arrives correctly on one PC program but a colleague's receiver on a different platform shows 0x78563412.
I know this is byte order, but I am not sure what exactly is stored where, when endianness affects my code and when it does not, and what the correct way to send multi-byte values is.




