feat: add touch driver abstraction layer
XPT2046 path: no change — uses TFT_eSPI built-in getTouch(). GT911 path: TouchDriver namespace with begin()/read() stub. TouchDriverGT911.cpp compiles to nothing on TFT_eSPI targets. Uncomment TAMC_GT911 lines to enable real capacitive touch.
This commit is contained in:
21
sketches/doorbell-touch-esp32-32e/TouchDriver.h
Normal file
21
sketches/doorbell-touch-esp32-32e/TouchDriver.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
#include "BoardConfig.h"
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════
|
||||
// Touch driver abstraction
|
||||
//
|
||||
// XPT2046: integrated in TFT_eSPI — DisplayManager calls
|
||||
// _tft.getTouch() / _tft.setTouch() directly inside
|
||||
// #if USE_TOUCH_XPT2046 blocks.
|
||||
//
|
||||
// GT911: separate I2C controller — namespace below.
|
||||
// ═══════════════════════════════════════════════════════════════════
|
||||
|
||||
#if USE_TOUCH_GT911
|
||||
|
||||
namespace TouchDriver {
|
||||
void begin();
|
||||
bool read(uint16_t &x, uint16_t &y);
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user