mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 17:33:08 +08:00
VNC: Fix some big-endian access macros
This commit is contained in:
@@ -1029,7 +1029,9 @@ struct rfb_palettendx_s
|
||||
/* Data Access Helpers ******************************************************/
|
||||
|
||||
/* All multiple byte integers (other than pixel values themselves) are in
|
||||
* big endian order (most significant byte first).
|
||||
* big endian order (most significant byte first). The following do not
|
||||
* depend on the endianness of the target nor that they depend on any data
|
||||
* alignment.
|
||||
*/
|
||||
|
||||
/* void rfb_putbe16(FAR uint8_t *dest, uint16_t value) */
|
||||
@@ -1037,7 +1039,7 @@ struct rfb_palettendx_s
|
||||
#define rfb_putbe16(d,v) \
|
||||
do \
|
||||
{ \
|
||||
FAR uint32_t *dest = (d); \
|
||||
FAR uint8_t *dest = (d); \
|
||||
*dest++ = ((uint16_t)(v) >> 8); \
|
||||
*dest = ((uint16_t)(v) & 0xff); \
|
||||
} \
|
||||
@@ -1054,7 +1056,7 @@ struct rfb_palettendx_s
|
||||
#define rfb_putbe32(d,v) \
|
||||
do \
|
||||
{ \
|
||||
FAR uint32_t *dest = (d); \
|
||||
FAR uint8_t *dest = (d); \
|
||||
*dest++ = ((uint32_t)(v) >> 24); \
|
||||
*dest++ = ((uint32_t)(v) >> 16) & 0xff; \
|
||||
*dest++ = ((uint32_t)(v) >> 8) & 0xff; \
|
||||
|
||||
Reference in New Issue
Block a user