Chop down tft-related loooong ifdefs chains (#10803)
* Chop down tft-related loooong ifdefs chains * Fix accidental sweep-up of portduino into screen #ifdef refactor
This commit is contained in:
co-authored by
GitHub
parent
8345c2b6a9
commit
fd8ba4fa4e
@@ -43,6 +43,7 @@
|
||||
#define HAS_SCREEN 1 // Assume no screen present by default to prevent crash...
|
||||
|
||||
// ST7735S TFT LCD
|
||||
#define HAS_SPI_TFT 1
|
||||
#define ST7735S 1 // there are different (sub-)versions of ST7735
|
||||
#define ST7735_CS -1
|
||||
#define ST7735_RS 33 // DC
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#define GPS_RX_PIN 16
|
||||
#define GPS_TX_PIN 17
|
||||
|
||||
#define HAS_SPI_TFT 1
|
||||
#define ILI9341_DRIVER
|
||||
#define TFT_HEIGHT 240
|
||||
#define TFT_WIDTH 320
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
#undef LED_STATE_ON
|
||||
#undef LED_POWER
|
||||
|
||||
#define HAS_SPI_TFT 1
|
||||
#define HAS_CST226SE 1
|
||||
#define HAS_TOUCHSCREEN 1
|
||||
// #define TOUCH_IRQ 35 // broken in this version of the lib 0.3.1
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#define HAS_SCREEN 0
|
||||
|
||||
// Default SPI1 will be mapped to the display
|
||||
#define HAS_SPI_TFT 1
|
||||
#define ST7789_SDA 23
|
||||
#define ST7789_SCK 18
|
||||
#define ST7789_CS 5
|
||||
|
||||
@@ -42,12 +42,11 @@ void c6l_init();
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 3.0
|
||||
|
||||
#define USE_SPISSD1306
|
||||
#ifdef USE_SPISSD1306
|
||||
#define DISPLAY_FORCE_SMALL_FONTS
|
||||
#define SSD1306_NSS 6 // CS
|
||||
#define SSD1306_RS 18 // DC
|
||||
#define SSD1306_RESET 15
|
||||
// #define OLED_DG 1
|
||||
#endif
|
||||
// Tiny OLED panel — opts into compile-time layout/font/feature substitutions
|
||||
// gated on OLED_TINY across the graphics stack.
|
||||
#define OLED_TINY
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#define TFT_BLACK 0
|
||||
#define BRIGHTNESS_DEFAULT 130 // Medium Low Brightness
|
||||
#define USE_TFTDISPLAY 1
|
||||
#define HAS_SPI_TFT 1
|
||||
|
||||
#define USE_POWERSAVE
|
||||
#define SLEEP_TIME 120
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
#define LORA_KCT8103L_PA_CTX 5 // CTX - Switch between Receive LNA Mode and Receive Bypass Mode. (HIGH=RX bypass, LOW=RX LNA)
|
||||
|
||||
#if HAS_TFT
|
||||
#define HAS_SPI_TFT 1
|
||||
#define USE_TFTDISPLAY 1
|
||||
#endif
|
||||
/*
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
#define LORA_KCT8103L_PA_CTX 5 // CTX - Switch between Receive LNA Mode and Receive Bypass Mode. (HIGH=RX bypass, LOW=RX LNA)
|
||||
|
||||
#if HAS_TFT
|
||||
#define HAS_SPI_TFT 1
|
||||
#define USE_TFTDISPLAY 1
|
||||
#endif
|
||||
/*
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#define I2C_SCL SCL
|
||||
|
||||
// Display (TFT)
|
||||
#define HAS_SPI_TFT 1
|
||||
#define USE_ST7789
|
||||
#define ST7789_NSS 39
|
||||
#define ST7789_RS 47 // DC
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#define I2C_SCL SCL
|
||||
|
||||
// ST7735S TFT LCD
|
||||
#define HAS_SPI_TFT 1
|
||||
#define ST7735S 1 // there are different (sub-)versions of ST7735
|
||||
#define ST7735_CS 38
|
||||
#define ST7735_RS 40 // DC
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#define I2C_SCL SCL
|
||||
|
||||
// ST7735S TFT LCD
|
||||
#define HAS_SPI_TFT 1
|
||||
#define ST7735S 1 // there are different (sub-)versions of ST7735
|
||||
#define ST7735_CS 38
|
||||
#define ST7735_RS 40 // DC
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#define I2C_SCL SCL
|
||||
|
||||
// ST7735S TFT LCD
|
||||
#define HAS_SPI_TFT 1
|
||||
#define ST7735S 1 // there are different (sub-)versions of ST7735
|
||||
#define ST7735_CS 38
|
||||
#define ST7735_RS 40 // DC
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#define USE_ST7789
|
||||
|
||||
#define HAS_SPI_TFT 1
|
||||
#define ST7789_NSS 37
|
||||
#define ST7789_RS 34 // DC
|
||||
#define ST7789_SDA 35 // MOSI
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#define LORA_DIO2 RADIOLIB_NC
|
||||
|
||||
// Default SPI1 will be mapped to the display
|
||||
#define HAS_SPI_TFT 1
|
||||
#define ST7789_SDA 4
|
||||
#define ST7789_SCK 3
|
||||
#define ST7789_CS 6
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
// #define ADC_MULTIPLIER 2
|
||||
|
||||
// ST7701 TFT LCD
|
||||
#define HAS_SPI_TFT 1
|
||||
#define ST7701_CS (4 | IO_EXPANDER)
|
||||
#define ST7701_RS -1 // DC
|
||||
#define ST7701_SDA 48 // MOSI
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define TFT_CS 12
|
||||
|
||||
// ST7789 TFT LCD
|
||||
#define HAS_SPI_TFT 1
|
||||
#define ST7789_CS TFT_CS
|
||||
#define ST7789_RS 11 // DC
|
||||
#define ST7789_SDA 41 // MOSI
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// ST7789 TFT LCD
|
||||
#define HAS_SPI_TFT 1
|
||||
#define ST7789_CS 12
|
||||
#define ST7789_RS 38 // DC
|
||||
#define ST7789_SDA 13 // MOSI
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// ST7796 TFT LCD
|
||||
#define TFT_CS 38
|
||||
#define HAS_SPI_TFT 1
|
||||
#define ST7796_CS TFT_CS
|
||||
#define ST7796_RS 37 // DC
|
||||
#define ST7796_SDA MOSI // MOSI
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#define I2C_SCL SCL
|
||||
|
||||
// ST7735S TFT LCD
|
||||
#define HAS_SPI_TFT 1
|
||||
#define ST7735S 1 // there are different (sub-)versions of ST7735
|
||||
#define ST7735_CS 38
|
||||
#define ST7735_RS 40 // DC
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
// #define USE_SSD1306
|
||||
|
||||
// Default SPI1 will be mapped to the display
|
||||
#define HAS_SPI_TFT 1
|
||||
#define ST7789_SDA 42
|
||||
#define ST7789_SCK 41
|
||||
#define ST7789_CS 38
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#define LORA_DIO2 RADIOLIB_NC // Not really used
|
||||
|
||||
// HX8357 TFT LCD
|
||||
#define HAS_SPI_TFT 1
|
||||
#define HX8357_CS 48
|
||||
#define HX8357_RS 47 // AKA DC
|
||||
#define HX8357_RESET 46
|
||||
|
||||
@@ -37,6 +37,7 @@ extern "C" {
|
||||
#define VEXT_ON_VALUE HIGH
|
||||
|
||||
// ST7735S TFT LCD
|
||||
#define HAS_SPI_TFT 1
|
||||
#define ST7735_CS (0 + 22)
|
||||
#define ST7735_RS (0 + 15) // DC
|
||||
#define ST7735_SDA (0 + 17) // MOSI
|
||||
|
||||
@@ -31,7 +31,7 @@ extern "C" {
|
||||
#define HELTEC_MESH_NODE_T1
|
||||
|
||||
// Display (ST7735, 80x160 TFT via SPI1)
|
||||
|
||||
#define HAS_SPI_TFT 1
|
||||
#define ST7735_CS (0 + 12)
|
||||
#define ST7735_RS (0 + 22) // DC
|
||||
#define ST7735_SDA (0 + 24)
|
||||
|
||||
@@ -36,7 +36,7 @@ extern "C" {
|
||||
#define HELTEC_MESH_NODE_T114
|
||||
|
||||
#define USE_ST7789
|
||||
|
||||
#define HAS_SPI_TFT 1
|
||||
#define ST7789_NSS 11
|
||||
#define ST7789_RS 12 // DC
|
||||
#define ST7789_SDA 41 // MOSI
|
||||
|
||||
@@ -107,6 +107,7 @@ extends = heltec_mesh_solar_base
|
||||
build_flags = ${heltec_mesh_solar_base.build_flags}
|
||||
-DHELTEC_MESH_SOLAR_TFT
|
||||
-DSPI_INTERFACES_COUNT=2
|
||||
-DHAS_SPI_TFT=1
|
||||
-DUSE_ST7789
|
||||
-DST7789_NSS=41
|
||||
-DST7789_RS=13
|
||||
|
||||
@@ -276,6 +276,8 @@ SO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG
|
||||
|
||||
#define RAK14014 // Tell it we have a RAK14014
|
||||
#define USER_SETUP_LOADED 1
|
||||
|
||||
#define HAS_SPI_TFT 1
|
||||
#define ST7789_DRIVER 1
|
||||
#define TFT_WIDTH 240
|
||||
#define TFT_HEIGHT 320
|
||||
|
||||
Reference in New Issue
Block a user