Remove lcd_buttons_update() call from all other places than interrupt. There is no known reason, why lcd_buttons_update() should be called from multiple places and multiple contexts. Remove mutex, which is not needed anymore, and wasn't implemented properly anyway (Operation was not atomic.).
This commit is contained in:
parent
f532da4b17
commit
6ee97468ee
2 changed files with 0 additions and 6 deletions
|
@ -730,7 +730,6 @@ void lcd_update(uint8_t lcdDrawUpdateOverride)
|
|||
lcd_draw_update = lcdDrawUpdateOverride;
|
||||
if (!lcd_update_enabled)
|
||||
return;
|
||||
lcd_buttons_update();
|
||||
if (lcd_lcdupdate_func)
|
||||
lcd_lcdupdate_func();
|
||||
}
|
||||
|
@ -764,9 +763,6 @@ void lcd_update_enable(uint8_t enabled)
|
|||
extern LongTimer safetyTimer;
|
||||
void lcd_buttons_update(void)
|
||||
{
|
||||
static bool _lock = false;
|
||||
if (_lock) return;
|
||||
_lock = true;
|
||||
uint8_t newbutton = 0;
|
||||
if (READ(BTN_EN1) == 0) newbutton |= EN_A;
|
||||
if (READ(BTN_EN2) == 0) newbutton |= EN_B;
|
||||
|
@ -843,7 +839,6 @@ void lcd_buttons_update(void)
|
|||
}
|
||||
}
|
||||
lcd_encoder_bits = enc;
|
||||
_lock = false;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -7106,7 +7106,6 @@ void ultralcd_init()
|
|||
WRITE(SDCARDDETECT, HIGH);
|
||||
lcd_oldcardstatus = IS_SD_INSERTED;
|
||||
#endif//(SDCARDDETECT > 0)
|
||||
lcd_buttons_update();
|
||||
lcd_encoder_diff = 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue