From d2c42c780ff4732b3dba591669c0d6cdac862f96 Mon Sep 17 00:00:00 2001 From: bsongis Date: Thu, 1 May 2014 09:19:34 +0200 Subject: [PATCH] Fixes #1026 (VC++ compiler only). Would someone check that this fix doesn't increase flash usage on 9x stock? Thanks! --- radio/src/myeeprom.h | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/radio/src/myeeprom.h b/radio/src/myeeprom.h index 60635602b..8bbd030e9 100644 --- a/radio/src/myeeprom.h +++ b/radio/src/myeeprom.h @@ -906,23 +906,22 @@ PACK(typedef struct t_CustomFnData { // Function Switches data #else PACK(typedef struct t_CustomFnData { PACK(union { - struct { - int8_t swtch:6; - uint16_t func:4; - uint8_t mode:2; - uint8_t param:3; - uint8_t active:1; - } gvar; + PACK(struct { + int16_t swtch:6; + uint16_t func:4; + uint16_t mode:2; + uint16_t param:3; + uint16_t active:1; + }) gvar; - struct { - int8_t swtch:6; - uint16_t func:4; - uint8_t param:4; - uint8_t spare:1; - uint8_t active:1; - } all; + PACK(struct { + int16_t swtch:6; + uint16_t func:4; + uint16_t param:4; + uint16_t spare:1; + uint16_t active:1; + }) all; }); - uint8_t value; }) CustomFnData; #define CFN_SWITCH(p) ((p)->all.swtch)