Free EEPROM = available + temp - current model
Low EEPROM warning displayed on model change [ersky9x] Rotary Encoder
This commit is contained in:
@@ -106,11 +106,11 @@ inline void board_init()
|
||||
EICRA = (1<<ISC30) | (1<<ISC20); // do the same for encoder 1
|
||||
EIFR = (3<<INTF2);
|
||||
|
||||
#if defined(EXTRA_ROTARY_ENCODERS)
|
||||
#if defined(EXTRA_ROTARY_ENCODERS)
|
||||
EIMSK = (3<<INT5); // enable the ONE rot. enc. ext. int. pairs.
|
||||
#else
|
||||
#else
|
||||
EIMSK = (3<<INT5) | (3<<INT2); // enable the two rot. enc. ext. int. pairs.
|
||||
#endif
|
||||
#endif
|
||||
/***************************************************/
|
||||
|
||||
/*
|
||||
@@ -156,7 +156,7 @@ ISR(USART1_RX_vect)
|
||||
resh = (resh >> 1) & 0x01;
|
||||
res = ((resh << 8) | resl);
|
||||
if((res == 0x180) | (res == 0x1C0)){ //button REb filter
|
||||
keys[BTN_REa].input((res & 0x1C0) == 0x1C0, BTN_REa);
|
||||
keys[BTN_RE1].input((res & 0x1C0) == 0x1C0, BTN_RE1);
|
||||
} else if((res & 0x100) == 0x100){ //rotary filter
|
||||
vpotToChange = res & 0xEF;
|
||||
vpot_mod_state = 1;
|
||||
@@ -275,9 +275,9 @@ void readKeysAndTrims()
|
||||
uint8_t enuk = KEY_MENU;
|
||||
|
||||
#if !defined(EXTRA_ROTARY_ENCODERS)
|
||||
keys[BTN_REa].input(~PIND & 0x20, BTN_REa);
|
||||
keys[BTN_RE1].input(~PIND & 0x20, BTN_RE1);
|
||||
#endif //!EXTRA_ROTARY_ENCODERS
|
||||
keys[BTN_REb].input(~PIND & 0x10, BTN_REb);
|
||||
keys[BTN_RE2].input(~PIND & 0x10, BTN_RE2);
|
||||
|
||||
uint8_t tin = ~PINL;
|
||||
uint8_t in;
|
||||
|
||||
Reference in New Issue
Block a user