]> git.droids-corp.org - protos/rc_servos.git/commitdiff
rc_servos: revert endianess in union structure
authorFabrice Desclaux <serpilliere@droids-corp.org>
Sun, 26 Feb 2012 21:56:37 +0000 (22:56 +0100)
committerFabrice Desclaux <serpilliere@droids-corp.org>
Sun, 26 Feb 2012 21:56:37 +0000 (22:56 +0100)
main.c

diff --git a/main.c b/main.c
index d3905545135790ea965c69045cadfe423202ec96..2e2f13ac6c4113a62dc20faced6b112bcaae3c9c 100644 (file)
--- 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;