TFT (plus Hardware SPI) for LPC (#19139)

This commit is contained in:
Victor Oliveira
2020-08-26 07:13:58 -03:00
committed by GitHub
parent 4955aa5b78
commit 1a4b82a5d6
11 changed files with 862 additions and 49 deletions

View File

@ -274,6 +274,38 @@
#define FORCE_SOFT_SPI
#define LCD_BACKLIGHT_PIN -1
#elif HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI
#define SS_PIN -1
//#define ONBOARD_SD_CS_PIN -1
#define TFT_CS_PIN P1_22
#define TFT_A0_PIN P1_23
#define TFT_DC_PIN P1_23
#define TFT_MISO_PIN P0_17
#define TFT_BACKLIGHT_PIN P1_18
#define TFT_RESET_PIN P1_19
#define LPC_HW_SPI_DEV 0
#define LCD_USE_DMA_SPI
#define TOUCH_INT_PIN P1_21
#define TOUCH_CS_PIN P1_20
#define TOUCH_BUTTONS_HW_SPI
#define TOUCH_BUTTONS_HW_SPI_DEVICE 1
#ifndef GRAPHICAL_TFT_UPSCALE
#define GRAPHICAL_TFT_UPSCALE 3
#endif
// SPI 1
#define SCK_PIN P0_15
#define MISO_PIN P0_17
#define MOSI_PIN P0_18
// Disable any LCD related PINs config
#define LCD_PINS_ENABLE -1
#define LCD_PINS_RS -1
#else
#define BTN_ENC P0_28 // (58) open-drain

View File

@ -1421,3 +1421,22 @@
#if PIN_EXISTS(ESP_WIFI_MODULE_GPIO2)
REPORT_NAME_DIGITAL(__LINE__, ESP_WIFI_MODULE_GPIO2_PIN)
#endif
// TFT PINS
#if PIN_EXISTS(TFT_CS)
REPORT_NAME_DIGITAL(__LINE__, TFT_CS_PIN)
#endif
#if PIN_EXISTS(TFT_A0)
REPORT_NAME_DIGITAL(__LINE__, TFT_A0_PIN)
#endif
#if PIN_EXISTS(TFT_DC)
REPORT_NAME_DIGITAL(__LINE__, TFT_DC_PIN)
#endif
#if PIN_EXISTS(TFT_MISO)
REPORT_NAME_DIGITAL(__LINE__, TFT_MISO_PIN)
#endif
#if PIN_EXISTS(TFT_BACKLIGHT)
REPORT_NAME_DIGITAL(__LINE__, TFT_BACKLIGHT_PIN)
#endif
#if PIN_EXISTS(TFT_RESET)
REPORT_NAME_DIGITAL(__LINE__, TFT_RESET_PIN)
#endif