From 7eaf879b6d868e7460085654bcb36ea928b0bb45 Mon Sep 17 00:00:00 2001 From: Fabrice Desclaux Date: Sun, 26 Feb 2012 22:56:37 +0100 Subject: [PATCH] rc_servos: revert endianess in union structure --- main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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; -- 2.39.5