mirror of https://github.com/arendst/Tasmota.git
Added GPIO for SPI for Universal Touch Screen (#21025)
* Added GPIO for SPI for Universal Touch Screen * Rename GPIOs * Fix indentation * Add parsing of I2C Reset and IRQ GPIOs
This commit is contained in:
parent
28cce3f020
commit
10465ce941
|
@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
|
|||
### Added
|
||||
- Zigbee support for attributes of type `uint48` used by energy monitoring (#20992)
|
||||
- Support for EU863-870 LoRaWanBridge
|
||||
- Added GPIO for SPI for Universal Touch Screen
|
||||
|
||||
### Breaking Changed
|
||||
|
||||
|
|
|
@ -217,6 +217,7 @@ enum UserSelectablePins {
|
|||
GPIO_MAGIC_SWITCH, // MagicSwitch as in Sonoff BasicR4
|
||||
GPIO_PIPSOLAR_TX, GPIO_PIPSOLAR_RX, // pipsolar inverter
|
||||
GPIO_LORA_CS, GPIO_LORA_RST, GPIO_LORA_BUSY, GPIO_LORA_DI0, GPIO_LORA_DI1, GPIO_LORA_DI2, GPIO_LORA_DI3, GPIO_LORA_DI4, GPIO_LORA_DI5, // LoRa SPI
|
||||
GPIO_TS_SPI_CS, GPIO_TS_RST, GPIO_TS_IRQ, // SPI for Universal Touch Screen
|
||||
GPIO_SENSOR_END };
|
||||
|
||||
// Error as warning to rethink GPIO usage with max 2045
|
||||
|
@ -481,6 +482,7 @@ const char kSensorNames[] PROGMEM =
|
|||
D_GPIO_MAGIC_SWITCH "|"
|
||||
D_SENSOR_PIPSOLAR_TX "|" D_SENSOR_PIPSOLAR_RX "|"
|
||||
D_GPIO_LORA_CS "|" D_GPIO_LORA_RST "|" D_GPIO_LORA_BUSY "|" D_GPIO_LORA_DI "0|" D_GPIO_LORA_DI "1|" D_GPIO_LORA_DI "2|" D_GPIO_LORA_DI "3|" D_GPIO_LORA_DI "4|" D_GPIO_LORA_DI "5|"
|
||||
D_GPIO_TS_SPI_CS "|" D_GPIO_TS_RST "|" D_GPIO_TS_IRQ "|"
|
||||
;
|
||||
|
||||
const char kSensorNamesFixed[] PROGMEM =
|
||||
|
@ -649,6 +651,11 @@ const uint16_t kGpioNiceList[] PROGMEM = {
|
|||
AGPIO(GPIO_SSPI_DC), // Software SPI Data or Command
|
||||
|
||||
#if defined(USE_DISPLAY) || defined(USE_LVGL)
|
||||
#ifdef USE_UNIVERSAL_TOUCH
|
||||
AGPIO(GPIO_TS_SPI_CS), // Touch CS
|
||||
AGPIO(GPIO_TS_RST), // Touch Reset
|
||||
AGPIO(GPIO_TS_IRQ), // Touch IRQ
|
||||
#endif // USE_UNIVERSAL_TOUCH
|
||||
#ifdef USE_DISPLAY_ILI9341
|
||||
AGPIO(GPIO_ILI9341_CS),
|
||||
AGPIO(GPIO_ILI9341_DC),
|
||||
|
|
|
@ -712,6 +712,10 @@
|
|||
#define D_SENSOR_SPI_MOSI "SPI MOSI"
|
||||
#define D_SENSOR_SPI_CLK "SPI CLK"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_GPIO_TS_SPI_CS "TS SPI CS"
|
||||
#define D_GPIO_TS_RST "TS RST"
|
||||
#define D_GPIO_TS_IRQ "TS IRQ"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_SENSOR_SDIO_CLK "SDIO CLK"
|
||||
#define D_SENSOR_SDIO_D0 "SDIO D0"
|
||||
#define D_SENSOR_SDIO_D1 "SDIO D1"
|
||||
|
|
|
@ -712,6 +712,10 @@
|
|||
#define D_SENSOR_SPI_MOSI "SPI MOSI"
|
||||
#define D_SENSOR_SPI_CLK "SPI CLK"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_GPIO_TS_SPI_CS "TS SPI CS"
|
||||
#define D_GPIO_TS_RST "TS RST"
|
||||
#define D_GPIO_TS_IRQ "TS IRQ"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_SENSOR_SDIO_CLK "SDIO CLK"
|
||||
#define D_SENSOR_SDIO_D0 "SDIO D0"
|
||||
#define D_SENSOR_SDIO_D1 "SDIO D1"
|
||||
|
|
|
@ -712,6 +712,10 @@
|
|||
#define D_SENSOR_SPI_MOSI "SPI MOSI"
|
||||
#define D_SENSOR_SPI_CLK "SPI CLK"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_GPIO_TS_SPI_CS "TS SPI CS"
|
||||
#define D_GPIO_TS_RST "TS RST"
|
||||
#define D_GPIO_TS_IRQ "TS IRQ"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_SENSOR_SDIO_CLK "SDIO CLK"
|
||||
#define D_SENSOR_SDIO_D0 "SDIO D0"
|
||||
#define D_SENSOR_SDIO_D1 "SDIO D1"
|
||||
|
|
|
@ -712,6 +712,10 @@
|
|||
#define D_SENSOR_SPI_MOSI "SPI MOSI"
|
||||
#define D_SENSOR_SPI_CLK "SPI CLK"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_GPIO_TS_SPI_CS "TS SPI CS"
|
||||
#define D_GPIO_TS_RST "TS RST"
|
||||
#define D_GPIO_TS_IRQ "TS IRQ"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_SENSOR_SDIO_CLK "SDIO CLK"
|
||||
#define D_SENSOR_SDIO_D0 "SDIO D0"
|
||||
#define D_SENSOR_SDIO_D1 "SDIO D1"
|
||||
|
|
|
@ -712,6 +712,10 @@
|
|||
#define D_SENSOR_SPI_MOSI "SPI MOSI"
|
||||
#define D_SENSOR_SPI_CLK "SPI CLK"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_GPIO_TS_SPI_CS "TS SPI CS"
|
||||
#define D_GPIO_TS_RST "TS RST"
|
||||
#define D_GPIO_TS_IRQ "TS IRQ"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_SENSOR_SDIO_CLK "SDIO CLK"
|
||||
#define D_SENSOR_SDIO_D0 "SDIO D0"
|
||||
#define D_SENSOR_SDIO_D1 "SDIO D1"
|
||||
|
|
|
@ -712,6 +712,10 @@
|
|||
#define D_SENSOR_SPI_MOSI "SPI MOSI"
|
||||
#define D_SENSOR_SPI_CLK "SPI CLK"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_GPIO_TS_SPI_CS "TS SPI CS"
|
||||
#define D_GPIO_TS_RST "TS RST"
|
||||
#define D_GPIO_TS_IRQ "TS IRQ"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_SENSOR_SDIO_CLK "SDIO CLK"
|
||||
#define D_SENSOR_SDIO_D0 "SDIO D0"
|
||||
#define D_SENSOR_SDIO_D1 "SDIO D1"
|
||||
|
|
|
@ -712,6 +712,10 @@
|
|||
#define D_SENSOR_SPI_MOSI "SPI MOSI"
|
||||
#define D_SENSOR_SPI_CLK "SPI CLK"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_GPIO_TS_SPI_CS "TS SPI CS"
|
||||
#define D_GPIO_TS_RST "TS RST"
|
||||
#define D_GPIO_TS_IRQ "TS IRQ"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_SENSOR_SDIO_CLK "SDIO CLK"
|
||||
#define D_SENSOR_SDIO_D0 "SDIO D0"
|
||||
#define D_SENSOR_SDIO_D1 "SDIO D1"
|
||||
|
|
|
@ -712,6 +712,10 @@
|
|||
#define D_SENSOR_SPI_MOSI "SPI MOSI"
|
||||
#define D_SENSOR_SPI_CLK "SPI CLK"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_GPIO_TS_SPI_CS "TS SPI CS"
|
||||
#define D_GPIO_TS_RST "TS RST"
|
||||
#define D_GPIO_TS_IRQ "TS IRQ"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_SENSOR_SDIO_CLK "SDIO CLK"
|
||||
#define D_SENSOR_SDIO_D0 "SDIO D0"
|
||||
#define D_SENSOR_SDIO_D1 "SDIO D1"
|
||||
|
|
|
@ -712,6 +712,10 @@
|
|||
#define D_SENSOR_SPI_MOSI "SPI MOSI"
|
||||
#define D_SENSOR_SPI_CLK "SPI Clk"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO Cmd"
|
||||
#define D_GPIO_TS_SPI_CS "TS SPI CS"
|
||||
#define D_GPIO_TS_RST "TS RST"
|
||||
#define D_GPIO_TS_IRQ "TS IRQ"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_SENSOR_SDIO_CLK "SDIO Clk"
|
||||
#define D_SENSOR_SDIO_D0 "SDIO D0"
|
||||
#define D_SENSOR_SDIO_D1 "SDIO D1"
|
||||
|
|
|
@ -712,6 +712,10 @@
|
|||
#define D_SENSOR_SPI_MOSI "SPI MOSI"
|
||||
#define D_SENSOR_SPI_CLK "SPI CLK"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_GPIO_TS_SPI_CS "TS SPI CS"
|
||||
#define D_GPIO_TS_RST "TS RST"
|
||||
#define D_GPIO_TS_IRQ "TS IRQ"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_SENSOR_SDIO_CLK "SDIO CLK"
|
||||
#define D_SENSOR_SDIO_D0 "SDIO D0"
|
||||
#define D_SENSOR_SDIO_D1 "SDIO D1"
|
||||
|
|
|
@ -712,6 +712,10 @@
|
|||
#define D_SENSOR_SPI_MOSI "SPI MOSI"
|
||||
#define D_SENSOR_SPI_CLK "SPI CLK"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_GPIO_TS_SPI_CS "TS SPI CS"
|
||||
#define D_GPIO_TS_RST "TS RST"
|
||||
#define D_GPIO_TS_IRQ "TS IRQ"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_SENSOR_SDIO_CLK "SDIO CLK"
|
||||
#define D_SENSOR_SDIO_D0 "SDIO D0"
|
||||
#define D_SENSOR_SDIO_D1 "SDIO D1"
|
||||
|
|
|
@ -712,6 +712,10 @@
|
|||
#define D_SENSOR_SPI_MOSI "SPI MOSI"
|
||||
#define D_SENSOR_SPI_CLK "SPI CLK"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_GPIO_TS_SPI_CS "TS SPI CS"
|
||||
#define D_GPIO_TS_RST "TS RST"
|
||||
#define D_GPIO_TS_IRQ "TS IRQ"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_SENSOR_SDIO_CLK "SDIO CLK"
|
||||
#define D_SENSOR_SDIO_D0 "SDIO D0"
|
||||
#define D_SENSOR_SDIO_D1 "SDIO D1"
|
||||
|
|
|
@ -712,6 +712,10 @@
|
|||
#define D_SENSOR_SPI_MOSI "SPI - MOSI"
|
||||
#define D_SENSOR_SPI_CLK "SPI - CLK"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO - CMD"
|
||||
#define D_GPIO_TS_SPI_CS "TS SPI CS"
|
||||
#define D_GPIO_TS_RST "TS RST"
|
||||
#define D_GPIO_TS_IRQ "TS IRQ"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_SENSOR_SDIO_CLK "SDIO - CLK"
|
||||
#define D_SENSOR_SDIO_D0 "SDIO - D0"
|
||||
#define D_SENSOR_SDIO_D1 "SDIO - D1"
|
||||
|
|
|
@ -712,6 +712,10 @@
|
|||
#define D_SENSOR_SPI_MOSI "SPI MOSI"
|
||||
#define D_SENSOR_SPI_CLK "SPI CLK"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_GPIO_TS_SPI_CS "TS SPI CS"
|
||||
#define D_GPIO_TS_RST "TS RST"
|
||||
#define D_GPIO_TS_IRQ "TS IRQ"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_SENSOR_SDIO_CLK "SDIO CLK"
|
||||
#define D_SENSOR_SDIO_D0 "SDIO D0"
|
||||
#define D_SENSOR_SDIO_D1 "SDIO D1"
|
||||
|
|
|
@ -712,6 +712,10 @@
|
|||
#define D_SENSOR_SPI_MOSI "SPI MOSI"
|
||||
#define D_SENSOR_SPI_CLK "SPI CLK"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_GPIO_TS_SPI_CS "TS SPI CS"
|
||||
#define D_GPIO_TS_RST "TS RST"
|
||||
#define D_GPIO_TS_IRQ "TS IRQ"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_SENSOR_SDIO_CLK "SDIO CLK"
|
||||
#define D_SENSOR_SDIO_D0 "SDIO D0"
|
||||
#define D_SENSOR_SDIO_D1 "SDIO D1"
|
||||
|
|
|
@ -712,6 +712,10 @@
|
|||
#define D_SENSOR_SPI_MOSI "SPI MOSI"
|
||||
#define D_SENSOR_SPI_CLK "SPI CLK"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_GPIO_TS_SPI_CS "TS SPI CS"
|
||||
#define D_GPIO_TS_RST "TS RST"
|
||||
#define D_GPIO_TS_IRQ "TS IRQ"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_SENSOR_SDIO_CLK "SDIO CLK"
|
||||
#define D_SENSOR_SDIO_D0 "SDIO D0"
|
||||
#define D_SENSOR_SDIO_D1 "SDIO D1"
|
||||
|
|
|
@ -712,6 +712,10 @@
|
|||
#define D_SENSOR_SPI_MOSI "SPI MOSI"
|
||||
#define D_SENSOR_SPI_CLK "SPI CLK"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_GPIO_TS_SPI_CS "TS SPI CS"
|
||||
#define D_GPIO_TS_RST "TS RST"
|
||||
#define D_GPIO_TS_IRQ "TS IRQ"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_SENSOR_SDIO_CLK "SDIO CLK"
|
||||
#define D_SENSOR_SDIO_D0 "SDIO D0"
|
||||
#define D_SENSOR_SDIO_D1 "SDIO D1"
|
||||
|
|
|
@ -712,6 +712,10 @@
|
|||
#define D_SENSOR_SPI_MOSI "SPI MOSI"
|
||||
#define D_SENSOR_SPI_CLK "SPI CLK"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_GPIO_TS_SPI_CS "TS SPI CS"
|
||||
#define D_GPIO_TS_RST "TS RST"
|
||||
#define D_GPIO_TS_IRQ "TS IRQ"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_SENSOR_SDIO_CLK "SDIO CLK"
|
||||
#define D_SENSOR_SDIO_D0 "SDIO D0"
|
||||
#define D_SENSOR_SDIO_D1 "SDIO D1"
|
||||
|
|
|
@ -712,6 +712,10 @@
|
|||
#define D_SENSOR_SPI_MOSI "SPI MOSI"
|
||||
#define D_SENSOR_SPI_CLK "SPI CLK"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_GPIO_TS_SPI_CS "TS SPI CS"
|
||||
#define D_GPIO_TS_RST "TS RST"
|
||||
#define D_GPIO_TS_IRQ "TS IRQ"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_SENSOR_SDIO_CLK "SDIO CLK"
|
||||
#define D_SENSOR_SDIO_D0 "SDIO D0"
|
||||
#define D_SENSOR_SDIO_D1 "SDIO D1"
|
||||
|
|
|
@ -713,6 +713,10 @@
|
|||
#define D_SENSOR_SPI_MOSI "SPI MOSI"
|
||||
#define D_SENSOR_SPI_CLK "SPI CLK"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_GPIO_TS_SPI_CS "TS SPI CS"
|
||||
#define D_GPIO_TS_RST "TS RST"
|
||||
#define D_GPIO_TS_IRQ "TS IRQ"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_SENSOR_SDIO_CLK "SDIO CLK"
|
||||
#define D_SENSOR_SDIO_D0 "SDIO D0"
|
||||
#define D_SENSOR_SDIO_D1 "SDIO D1"
|
||||
|
|
|
@ -712,6 +712,10 @@
|
|||
#define D_SENSOR_SPI_MOSI "SPI MOSI"
|
||||
#define D_SENSOR_SPI_CLK "SPI CLK"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_GPIO_TS_SPI_CS "TS SPI CS"
|
||||
#define D_GPIO_TS_RST "TS RST"
|
||||
#define D_GPIO_TS_IRQ "TS IRQ"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_SENSOR_SDIO_CLK "SDIO CLK"
|
||||
#define D_SENSOR_SDIO_D0 "SDIO D0"
|
||||
#define D_SENSOR_SDIO_D1 "SDIO D1"
|
||||
|
|
|
@ -712,6 +712,10 @@
|
|||
#define D_SENSOR_SPI_MOSI "SPI MOSI"
|
||||
#define D_SENSOR_SPI_CLK "SPI CLK"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_GPIO_TS_SPI_CS "TS SPI CS"
|
||||
#define D_GPIO_TS_RST "TS RST"
|
||||
#define D_GPIO_TS_IRQ "TS IRQ"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_SENSOR_SDIO_CLK "SDIO CLK"
|
||||
#define D_SENSOR_SDIO_D0 "SDIO D0"
|
||||
#define D_SENSOR_SDIO_D1 "SDIO D1"
|
||||
|
|
|
@ -712,6 +712,10 @@
|
|||
#define D_SENSOR_SPI_MOSI "SPI MOSI"
|
||||
#define D_SENSOR_SPI_CLK "SPI CLK"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_GPIO_TS_SPI_CS "TS SPI CS"
|
||||
#define D_GPIO_TS_RST "TS RST"
|
||||
#define D_GPIO_TS_IRQ "TS IRQ"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_SENSOR_SDIO_CLK "SDIO CLK"
|
||||
#define D_SENSOR_SDIO_D0 "SDIO D0"
|
||||
#define D_SENSOR_SDIO_D1 "SDIO D1"
|
||||
|
|
|
@ -712,6 +712,10 @@
|
|||
#define D_SENSOR_SPI_MOSI "SPI MOSI"
|
||||
#define D_SENSOR_SPI_CLK "SPI CLK"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_GPIO_TS_SPI_CS "TS SPI CS"
|
||||
#define D_GPIO_TS_RST "TS RST"
|
||||
#define D_GPIO_TS_IRQ "TS IRQ"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_SENSOR_SDIO_CLK "SDIO CLK"
|
||||
#define D_SENSOR_SDIO_D0 "SDIO D0"
|
||||
#define D_SENSOR_SDIO_D1 "SDIO D1"
|
||||
|
|
|
@ -712,6 +712,10 @@
|
|||
#define D_SENSOR_SPI_MOSI "SPI MOSI"
|
||||
#define D_SENSOR_SPI_CLK "SPI CLK"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_GPIO_TS_SPI_CS "TS SPI CS"
|
||||
#define D_GPIO_TS_RST "TS RST"
|
||||
#define D_GPIO_TS_IRQ "TS IRQ"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_SENSOR_SDIO_CLK "SDIO CLK"
|
||||
#define D_SENSOR_SDIO_D0 "SDIO D0"
|
||||
#define D_SENSOR_SDIO_D1 "SDIO D1"
|
||||
|
|
|
@ -712,6 +712,10 @@
|
|||
#define D_SENSOR_SPI_MOSI "SPI MOSI"
|
||||
#define D_SENSOR_SPI_CLK "SPI CLK"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_GPIO_TS_SPI_CS "TS SPI CS"
|
||||
#define D_GPIO_TS_RST "TS RST"
|
||||
#define D_GPIO_TS_IRQ "TS IRQ"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_SENSOR_SDIO_CLK "SDIO CLK"
|
||||
#define D_SENSOR_SDIO_D0 "SDIO D0"
|
||||
#define D_SENSOR_SDIO_D1 "SDIO D1"
|
||||
|
|
|
@ -712,6 +712,10 @@
|
|||
#define D_SENSOR_SPI_MOSI "SPI MOSI"
|
||||
#define D_SENSOR_SPI_CLK "SPI CLK"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_GPIO_TS_SPI_CS "TS SPI CS"
|
||||
#define D_GPIO_TS_RST "TS RST"
|
||||
#define D_GPIO_TS_IRQ "TS IRQ"
|
||||
#define D_SENSOR_SDIO_CMD "SDIO CMD"
|
||||
#define D_SENSOR_SDIO_CLK "SDIO CLK"
|
||||
#define D_SENSOR_SDIO_D0 "SDIO D0"
|
||||
#define D_SENSOR_SDIO_D1 "SDIO D1"
|
||||
|
|
|
@ -360,7 +360,6 @@ void lvgl_touchscreen_read(lv_indev_t *indev_drv, lv_indev_data_t *data) {
|
|||
// keep data for TS calibration
|
||||
lv_ts_calibration.state = data->state;
|
||||
if (data->state == LV_INDEV_STATE_PRESSED) { // if not pressed, the data may be invalid
|
||||
AddLog(LOG_LEVEL_DEBUG_MORE, "LVG: TS: %i, %i", data->point.x, data->point.y);
|
||||
lv_ts_calibration.x = data->point.x;
|
||||
lv_ts_calibration.y = data->point.y;
|
||||
lv_ts_calibration.raw_x = Touch_Status(-1);
|
||||
|
|
|
@ -469,7 +469,7 @@ void Touch_Check(void(*rotconvert)(int16_t *x, int16_t *y)) {
|
|||
#endif // USE_TOUCH_BUTTONS
|
||||
|
||||
rotconvert(&TSGlobal.touch_xp, &TSGlobal.touch_yp);
|
||||
AddLog(LOG_LEVEL_DEBUG_MORE, "TS : TSGlobal.touched x=%i y=%i gest=0x%02x (raw x=%i y=%i)", TSGlobal.touch_xp, TSGlobal.touch_yp, TSGlobal.gesture, TSGlobal.raw_touch_xp, TSGlobal.raw_touch_yp);
|
||||
AddLog(LOG_LEVEL_DEBUG_MORE, "TS : touched x=%i y=%i gest=0x%02x (raw x=%i y=%i)", TSGlobal.touch_xp, TSGlobal.touch_yp, TSGlobal.gesture, TSGlobal.raw_touch_xp, TSGlobal.raw_touch_yp);
|
||||
|
||||
#ifdef USE_TOUCH_BUTTONS
|
||||
CheckTouchButtons(TSGlobal.touched, TSGlobal.touch_xp, TSGlobal.touch_yp);
|
||||
|
|
|
@ -247,6 +247,29 @@ int8_t cs;
|
|||
}
|
||||
}
|
||||
|
||||
cp = strstr(ddesc, ":UTI");
|
||||
if (cp) {
|
||||
cp += 4; // skip ":UTI"
|
||||
cp = strchr(cp, ','); // skip device name
|
||||
cp++;
|
||||
cp = strchr(cp, ',');
|
||||
cp++;
|
||||
if (*cp == 'I') { // I= I2C
|
||||
cp = strchr(cp, ','); // skip interface type
|
||||
cp++;
|
||||
cp = strchr(cp, ','); // skip I2C bus number
|
||||
cp++;
|
||||
replacepin(&cp, Pin(GPIO_TS_RST));
|
||||
replacepin(&cp, Pin(GPIO_TS_IRQ));
|
||||
} else if (*cp == 'S') { // S= SPI
|
||||
cp = strchr(cp, ','); // skip interface type
|
||||
cp++;
|
||||
replacepin(&cp, Pin(GPIO_TS_SPI_CS));
|
||||
replacepin(&cp, Pin(GPIO_TS_RST));
|
||||
replacepin(&cp, Pin(GPIO_TS_IRQ));
|
||||
}
|
||||
}
|
||||
|
||||
uint16_t xs, ys;
|
||||
// we need screen size for gt911 touch controler
|
||||
cp = strstr(ddesc, ":H,");
|
||||
|
@ -501,7 +524,7 @@ int8_t cs;
|
|||
|
||||
/*********************************************************************************************/
|
||||
|
||||
int8_t replacepin(char **cp, uint16_t pin) {
|
||||
int8_t replacepin(char **cp, int16_t pin) {
|
||||
int8_t res = 0;
|
||||
char *lp = *cp;
|
||||
if (*lp == ',') lp++;
|
||||
|
|
Loading…
Reference in New Issue