3.2.3 Command/Response Byte Order

To enable interoperability between hosts and clients, the MDFU Protocol specifies the order of bytes within commands/responses and the order of bytes for multi-byte fields.

Command/Response Byte Order

The specification contains a number of figures which are used to define the command and response fields. These figures show the order of bytes within commands/responses. The bytes are ordered from left to right as shown below.

./images/3-2-1_CommandResponseByteOrdering.PNG

Multi-Byte Field Byte Order

Multi-byte data fields are ordered in little endian format within a command or response. Less significant bytes are placed before more significant bytes. The figure below shows an example of how an unsigned 16-bit integer value of 4,660(0x1234) would be encoded in a command/response with a uint16_t data payload field.