consolidate sketches
This commit is contained in:
43
TouchDriverGT911.cpp
Normal file
43
TouchDriverGT911.cpp
Normal file
@@ -0,0 +1,43 @@
|
||||
#include "BoardConfig.h"
|
||||
#include <Arduino.h>
|
||||
|
||||
#if USE_TOUCH_GT911
|
||||
|
||||
#include "TouchDriver.h"
|
||||
#include <Wire.h>
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════
|
||||
// GT911 capacitive touch — Waveshare ESP32-S3 Touch LCD 4.3"
|
||||
//
|
||||
// This is a compilable stub. To enable actual touch:
|
||||
// 1. arduino-cli lib install "TAMC_GT911"
|
||||
// 2. Uncomment the TAMC_GT911 lines below.
|
||||
// ═══════════════════════════════════════════════════════════════════
|
||||
|
||||
// #include <TAMC_GT911.h>
|
||||
// static TAMC_GT911 ts(TOUCH_SDA, TOUCH_SCL, TOUCH_INT, TOUCH_RST,
|
||||
// SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||
|
||||
namespace TouchDriver {
|
||||
|
||||
void begin() {
|
||||
Wire.begin(TOUCH_SDA, TOUCH_SCL);
|
||||
// ts.begin();
|
||||
// ts.setRotation(TOUCH_MAP_ROTATION);
|
||||
Serial.println("[TOUCH] GT911 stub initialized");
|
||||
}
|
||||
|
||||
bool read(uint16_t &x, uint16_t &y) {
|
||||
// ts.read();
|
||||
// if (ts.isTouched) {
|
||||
// x = ts.points[0].x;
|
||||
// y = ts.points[0].y;
|
||||
// return true;
|
||||
// }
|
||||
(void)x; (void)y;
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace TouchDriver
|
||||
|
||||
#endif // USE_TOUCH_GT911
|
||||
Reference in New Issue
Block a user