hard20 pts · first answer countsembedded-ccommunication-protocols
Reading a 32-bit field
A network protocol sends a 32-bit value in big-endian order. On a little-endian MCU, which code reads it correctly and portably from a byte buffer?
uint8_t *p = rx_buf + 4;
Discussion 0
Join free to post in the discussion.
Related questions
- Why use volatileEmbedded Systems Engineer
- Setting a register bitEmbedded Systems Engineer
- Protocol with addressesEmbedded Systems Engineer
- Reading a hex register valueEmbedded Systems Engineer
- Adding to a uint8_t counterEmbedded Systems Engineer
- Where const goes in a pointerEmbedded Systems Engineer
- A static local counterEmbedded Systems Engineer
- UART bytes per secondEmbedded Systems Engineer