1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-26 01:35:21 +03:00

first 68 bytes flash savings. Bring back to pointer and add volatile

This commit is contained in:
openfsguruh 2014-05-16 16:14:30 +02:00
parent b4d99acea9
commit 07e6df9ea5

View file

@ -1374,13 +1374,16 @@ uint16_t anaIn(uint8_t chan)
return *p;
#else
static const pm_char crossAna[] PROGMEM = {3,1,2,0,4,5,6,7};
uint16_t temp = s_anaFilt[pgm_read_byte(crossAna+chan)];
#if defined(FRSKY_STICKS)
uint16_t temp = s_anaFilt[pgm_read_byte(crossAna+chan)];
if (chan < NUM_STICKS && (g_eeGeneral.stickReverse & (1 << chan))) {
temp = 2048 - temp;
}
#endif
return temp;
#else
volatile uint16_t *p = &s_anaFilt[pgm_read_byte(crossAna+chan)];
return *p;
#endif
#endif
}