mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-08 02:47:35 +00:00
update variant definitions
This commit is contained in:
33
src/platform/extra_variants/t5_s3_epaper_pro/variant.cpp
Normal file
33
src/platform/extra_variants/t5_s3_epaper_pro/variant.cpp
Normal file
@@ -0,0 +1,33 @@
|
||||
#include "configuration.h"
|
||||
|
||||
#ifdef T5_S3_EPAPER_PRO
|
||||
|
||||
#include "input/TouchScreenImpl1.h"
|
||||
#include <Wire.h>
|
||||
#include <bb_captouch.h>
|
||||
|
||||
BBCapTouch bbct;
|
||||
|
||||
bool readTouch(int16_t *x, int16_t *y)
|
||||
{
|
||||
TOUCHINFO ti;
|
||||
if (!digitalRead(GT911_PIN_INT)) {
|
||||
if (bbct.getSamples(&ti)) {
|
||||
*x = ti.x[0];
|
||||
*y = ti.y[0];
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// T5-S3-ePaper Pro specific (late-) init
|
||||
void lateInitVariant()
|
||||
{
|
||||
bbct.init(GT911_PIN_SDA, GT911_PIN_SCL, GT911_PIN_RST, GT911_PIN_INT);
|
||||
bbct.setOrientation(90, EPD_WIDTH, EPD_HEIGHT);
|
||||
// FIXME: crashes!
|
||||
// touchScreenImpl1 = new TouchScreenImpl1(EPD_WIDTH, EPD_HEIGHT, readTouch);
|
||||
// touchScreenImpl1->init();
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user