Robin & Longer3D SPI TFT driver (#14595)
This commit is contained in:
committed by
Scott Lahteine
parent
45bde333d5
commit
81d629bc47
@@ -102,6 +102,11 @@
|
||||
#if HAS_SLOW_BUTTONS
|
||||
volatile uint8_t MarlinUI::slow_buttons;
|
||||
#endif
|
||||
#if ENABLED(TOUCH_BUTTONS)
|
||||
#include "../feature/touch/xpt2046.h"
|
||||
volatile uint8_t MarlinUI::touch_buttons;
|
||||
uint8_t MarlinUI::read_touch_buttons() { return touch.read_buttons(); }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENABLED(INIT_SDCARD_ON_BOOT)
|
||||
@@ -324,8 +329,13 @@ void MarlinUI::init() {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_ENCODER_ACTION && HAS_SLOW_BUTTONS
|
||||
slow_buttons = 0;
|
||||
#if HAS_ENCODER_ACTION
|
||||
#if HAS_SLOW_BUTTONS
|
||||
slow_buttons = 0;
|
||||
#endif
|
||||
#if ENABLED(TOUCH_BUTTONS)
|
||||
touch_buttons = 0;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
update_buttons();
|
||||
@@ -823,6 +833,11 @@ void MarlinUI::update() {
|
||||
|
||||
next_lcd_update_ms = ms + LCD_UPDATE_INTERVAL;
|
||||
|
||||
#if ENABLED(TOUCH_BUTTONS)
|
||||
if (on_status_screen())
|
||||
next_lcd_update_ms += (LCD_UPDATE_INTERVAL) * 2;
|
||||
#endif
|
||||
|
||||
#if ENABLED(LCD_HAS_STATUS_INDICATORS)
|
||||
update_indicators();
|
||||
#endif
|
||||
@@ -833,6 +848,10 @@ void MarlinUI::update() {
|
||||
slow_buttons = read_slow_buttons(); // Buttons that take too long to read in interrupt context
|
||||
#endif
|
||||
|
||||
#if ENABLED(TOUCH_BUTTONS)
|
||||
touch_buttons = read_touch_buttons();
|
||||
#endif
|
||||
|
||||
#if ENABLED(REPRAPWORLD_KEYPAD)
|
||||
|
||||
if (handle_keypad()) {
|
||||
@@ -1180,6 +1199,9 @@ void MarlinUI::update() {
|
||||
#if HAS_SLOW_BUTTONS
|
||||
| slow_buttons
|
||||
#endif
|
||||
#if ENABLED(TOUCH_BUTTONS)
|
||||
| touch_buttons
|
||||
#endif
|
||||
;
|
||||
#elif HAS_ADC_BUTTONS
|
||||
buttons = 0;
|
||||
|
||||
Reference in New Issue
Block a user