Support for TFT & Touch Screens (#18130)

This commit is contained in:
Alexander Gavrilenko
2020-07-30 09:43:19 +03:00
committed by Scott Lahteine
parent 3fbc002bad
commit 8f8b0d84ae
176 changed files with 14747 additions and 303 deletions

View File

@ -403,7 +403,7 @@ static const uint16_t st9677_init[] = {
ESC_END
};
#if ENABLED(TOUCH_BUTTONS)
#if HAS_TOUCH_XPT2046
static const uint8_t buttonD[] = {
B01111111,B11111111,B11111111,B11111110,
@ -595,7 +595,7 @@ static const uint16_t st9677_init[] = {
}
}
#endif // TOUCH_BUTTONS
#endif // HAS_TOUCH_XPT2046
// Used to fill RGB565 (16bits) background
inline void memset2(const void *ptr, uint16_t fill, size_t cnt) {
@ -670,7 +670,7 @@ uint8_t u8g_dev_tft_320x240_upscale_from_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, u
#endif
// Bottom buttons
#if ENABLED(TOUCH_BUTTONS)
#if HAS_TOUCH_XPT2046
setWindow(u8g, dev, BUTTOND_X_LO, BUTTON_Y_LO, BUTTOND_X_HI, BUTTON_Y_HI);
drawImage(buttonD, u8g, dev, 32, 20, TFT_BTCANCEL_COLOR);
@ -682,7 +682,7 @@ uint8_t u8g_dev_tft_320x240_upscale_from_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, u
setWindow(u8g, dev, BUTTONC_X_LO, BUTTON_Y_LO, BUTTONC_X_HI, BUTTON_Y_HI);
drawImage(buttonC, u8g, dev, 32, 20, TFT_BTOKMENU_COLOR);
#endif // TOUCH_BUTTONS
#endif // HAS_TOUCH_XPT2046
return 0;