Bsongis/ram saving (#6685)

RAM saving. Stacks reduced to have some more RAM available than 2.2 on all boards
This commit is contained in:
Bertrand Songis
2019-08-30 15:46:57 +02:00
committed by GitHub
parent ff2cde85be
commit 2d4e98d15d
28 changed files with 271 additions and 330 deletions
+4 -5
View File
@@ -40,22 +40,21 @@ enum LogicalSwitchContextState {
SWITCH_ENABLE
};
PACK(typedef struct {
PACK(struct LogicalSwitchContext {
uint8_t state:1;
uint8_t timerState:2;
uint8_t spare:5;
uint8_t timer;
int16_t lastValue;
}) LogicalSwitchContext;
});
PACK(typedef struct {
PACK(struct LogicalSwitchesFlightModeContext {
LogicalSwitchContext lsw[MAX_LOGICAL_SWITCHES];
}) LogicalSwitchesFlightModeContext;
});
LogicalSwitchesFlightModeContext lswFm[MAX_FLIGHT_MODES];
#define LS_LAST_VALUE(fm, idx) lswFm[fm].lsw[idx].lastValue
#if defined(PCBTARANIS) || defined(PCBHORUS)
#if defined(PCBX9E)
tmr10ms_t switchesMidposStart[16];