added FT6206 flip

This commit is contained in:
2021-08-30 13:49:46 +02:00
parent ddc6f271e8
commit eddaa9003a
4 changed files with 25 additions and 7 deletions

View File

@@ -268,6 +268,7 @@ void prepButtons(void)
}
}
#if defined(TOUCH_CS)
void touch_calibrate()
{
uint16_t calData[5];
@@ -300,6 +301,7 @@ void touch_calibrate()
while (1)
;
}
#endif
void updateGUIButtons(void)
{
@@ -355,8 +357,8 @@ void updateGUIButtons(void)
// -------------------------------------------------------------------------
void initTouchScreen(void)
{
ts.begin();
if (!ts.begin(40))
//ts.begin();
if (!ts.begin(tft.width(), tft.height(), true, 40))
{
Serial.println("Unable to start touchscreen.");
}
@@ -370,12 +372,14 @@ void initLCD(void)
{
tft.init();
tft.setRotation(2);
tft.setRotation(TFT_ROTATION);
tft.setTextFont(2);
tft.fillScreen(TFT_BLACK);
tft.invertDisplay(false);
#if defined(TOUCH_CS)
//touch_calibrate();
tft.setTouch(calData);
#endif
initTouchScreen();

View File

@@ -6,6 +6,7 @@
#define TFT_WIDTH 240
#define TFT_HEIGT 320
#define TFT_DEFAULT_R 4
#define TFT_ROTATION 0 //2 = upsidedown
#define LCD_INTERVAL 100