a special volatile saves 40 bytes if FRSKY_STICKS used
This commit is contained in:
@@ -1375,7 +1375,7 @@ uint16_t anaIn(uint8_t chan)
|
|||||||
#else
|
#else
|
||||||
static const pm_char crossAna[] PROGMEM = {3,1,2,0,4,5,6,7};
|
static const pm_char crossAna[] PROGMEM = {3,1,2,0,4,5,6,7};
|
||||||
#if defined(FRSKY_STICKS)
|
#if defined(FRSKY_STICKS)
|
||||||
uint16_t temp = s_anaFilt[pgm_read_byte(crossAna+chan)];
|
volatile uint16_t temp = s_anaFilt[pgm_read_byte(crossAna+chan)]; // volatile saves here 40 bytes; maybe removed for newer AVR when available
|
||||||
if (chan < NUM_STICKS && (g_eeGeneral.stickReverse & (1 << chan))) {
|
if (chan < NUM_STICKS && (g_eeGeneral.stickReverse & (1 << chan))) {
|
||||||
temp = 2048 - temp;
|
temp = 2048 - temp;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user