Capacitive Touch Screen (GT911) for SKR SE BX (#21843)
Co-authored-by: Msq001 <alansayyeah@gmail.com> Co-authored-by: Scott Lahteine <github@thinkyhead.com>
This commit is contained in:
@@ -30,8 +30,15 @@
|
||||
#include "../tft_io/touch_calibration.h"
|
||||
#endif
|
||||
|
||||
#include HAL_PATH(../../HAL, tft/xpt2046.h)
|
||||
#define TOUCH_DRIVER XPT2046
|
||||
#if ENABLED(TFT_TOUCH_DEVICE_GT911)
|
||||
#include HAL_PATH(../../HAL, tft/gt911.h)
|
||||
#define TOUCH_DRIVER_CLASS GT911
|
||||
#elif ENABLED(TFT_TOUCH_DEVICE_XPT2046)
|
||||
#include HAL_PATH(../../HAL, tft/xpt2046.h)
|
||||
#define TOUCH_DRIVER_CLASS XPT2046
|
||||
#else
|
||||
#error "Unknown Touch Screen Type."
|
||||
#endif
|
||||
|
||||
// Menu Navigation
|
||||
extern int8_t encoderTopLine, encoderLine, screen_items;
|
||||
@@ -85,7 +92,7 @@ typedef struct __attribute__((__packed__)) {
|
||||
|
||||
class Touch {
|
||||
private:
|
||||
static TOUCH_DRIVER io;
|
||||
static TOUCH_DRIVER_CLASS io;
|
||||
static int16_t x, y;
|
||||
static bool enabled;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user