From: Fabrice Desclaux Date: Sun, 26 Feb 2012 21:56:37 +0000 (+0100) Subject: rc_servos: revert endianess in union structure X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=7eaf879b6d868e7460085654bcb36ea928b0bb45;p=protos%2Frc_servos.git rc_servos: revert endianess in union structure --- diff --git a/main.c b/main.c index d390554..2e2f13a 100644 --- a/main.c +++ b/main.c @@ -43,17 +43,19 @@ static volatile uint8_t rxidx; static volatile union { uint8_t u8; struct { - uint8_t zero:1; - uint8_t cmd_num:4; + /* inverted: little endian */ uint8_t val_msb:3; + uint8_t cmd_num:4; + uint8_t zero:1; }; } byte0; static volatile union { uint8_t u8; struct { - uint8_t one:1; + /* inverted: little endian */ uint8_t val_lsb:7; + uint8_t one:1; }; } byte1;