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
+15
-16
@@ -511,8 +511,20 @@ Screen::Screen(ScanI2C::DeviceAddress address, meshtastic_Config_DisplayConfig_O
|
|||||||
static_cast<SSD1306Spi *>(dispdev)->setHorizontalOffset(32);
|
static_cast<SSD1306Spi *>(dispdev)->setHorizontalOffset(32);
|
||||||
LOG_INFO("SSD1306 init success");
|
LOG_INFO("SSD1306 init success");
|
||||||
}
|
}
|
||||||
#elif defined(ST7735_CS) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7789_CS) || \
|
#elif ARCH_PORTDUINO
|
||||||
defined(RAK14014) || defined(HX8357_CS) || defined(ILI9488_CS) || defined(ST7796_CS) || defined(HACKADAY_COMMUNICATOR)
|
if (config.display.displaymode != meshtastic_Config_DisplayConfig_DisplayMode_COLOR) {
|
||||||
|
if (portduino_config.displayPanel != no_screen) {
|
||||||
|
LOG_DEBUG("Make TFTDisplay!");
|
||||||
|
dispdev = new TFTDisplay(address.address, -1, -1, geometry,
|
||||||
|
(address.port == ScanI2C::I2CPort::WIRE1) ? HW_I2C::I2C_TWO : HW_I2C::I2C_ONE);
|
||||||
|
} else {
|
||||||
|
dispdev = new AutoOLEDWire(address.address, -1, -1, geometry,
|
||||||
|
(address.port == ScanI2C::I2CPort::WIRE1) ? HW_I2C::I2C_TWO : HW_I2C::I2C_ONE);
|
||||||
|
isAUTOOled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#elif USE_TFTDISPLAY
|
||||||
|
LOG_DEBUG("Make TFTDisplay!");
|
||||||
dispdev = new TFTDisplay(address.address, -1, -1, geometry,
|
dispdev = new TFTDisplay(address.address, -1, -1, geometry,
|
||||||
(address.port == ScanI2C::I2CPort::WIRE1) ? HW_I2C::I2C_TWO : HW_I2C::I2C_ONE);
|
(address.port == ScanI2C::I2CPort::WIRE1) ? HW_I2C::I2C_TWO : HW_I2C::I2C_ONE);
|
||||||
#elif defined(USE_EINK) && !defined(USE_EINK_DYNAMICDISPLAY) && !defined(USE_EINK_PARALLELDISPLAY)
|
#elif defined(USE_EINK) && !defined(USE_EINK_DYNAMICDISPLAY) && !defined(USE_EINK_PARALLELDISPLAY)
|
||||||
@@ -526,18 +538,6 @@ Screen::Screen(ScanI2C::DeviceAddress address, meshtastic_Config_DisplayConfig_O
|
|||||||
#elif defined(USE_ST7567)
|
#elif defined(USE_ST7567)
|
||||||
dispdev = new ST7567Wire(address.address, -1, -1, geometry,
|
dispdev = new ST7567Wire(address.address, -1, -1, geometry,
|
||||||
(address.port == ScanI2C::I2CPort::WIRE1) ? HW_I2C::I2C_TWO : HW_I2C::I2C_ONE);
|
(address.port == ScanI2C::I2CPort::WIRE1) ? HW_I2C::I2C_TWO : HW_I2C::I2C_ONE);
|
||||||
#elif ARCH_PORTDUINO
|
|
||||||
if (config.display.displaymode != meshtastic_Config_DisplayConfig_DisplayMode_COLOR) {
|
|
||||||
if (portduino_config.displayPanel != no_screen) {
|
|
||||||
LOG_DEBUG("Make TFTDisplay!");
|
|
||||||
dispdev = new TFTDisplay(address.address, -1, -1, geometry,
|
|
||||||
(address.port == ScanI2C::I2CPort::WIRE1) ? HW_I2C::I2C_TWO : HW_I2C::I2C_ONE);
|
|
||||||
} else {
|
|
||||||
dispdev = new AutoOLEDWire(address.address, -1, -1, geometry,
|
|
||||||
(address.port == ScanI2C::I2CPort::WIRE1) ? HW_I2C::I2C_TWO : HW_I2C::I2C_ONE);
|
|
||||||
isAUTOOled = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
dispdev = new AutoOLEDWire(address.address, -1, -1, geometry,
|
dispdev = new AutoOLEDWire(address.address, -1, -1, geometry,
|
||||||
(address.port == ScanI2C::I2CPort::WIRE1) ? HW_I2C::I2C_TWO : HW_I2C::I2C_ONE);
|
(address.port == ScanI2C::I2CPort::WIRE1) ? HW_I2C::I2C_TWO : HW_I2C::I2C_ONE);
|
||||||
@@ -847,8 +847,7 @@ void Screen::setup()
|
|||||||
dispdev->mirrorScreen();
|
dispdev->mirrorScreen();
|
||||||
#else
|
#else
|
||||||
if (!config.display.flip_screen) {
|
if (!config.display.flip_screen) {
|
||||||
#if defined(ST7701_CS) || defined(ST7735_CS) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7789_CS) || \
|
#if USE_TFTDISPLAY && !ARCH_PORTDUINO
|
||||||
defined(RAK14014) || defined(HX8357_CS) || defined(ILI9488_CS) || defined(ST7796_CS) || defined(HACKADAY_COMMUNICATOR)
|
|
||||||
static_cast<TFTDisplay *>(dispdev)->flipScreenVertically();
|
static_cast<TFTDisplay *>(dispdev)->flipScreenVertically();
|
||||||
#elif defined(USE_ST7789)
|
#elif defined(USE_ST7789)
|
||||||
static_cast<ST7789Spi *>(dispdev)->flipScreenVertically();
|
static_cast<ST7789Spi *>(dispdev)->flipScreenVertically();
|
||||||
|
|||||||
@@ -98,10 +98,7 @@
|
|||||||
#define FONT_LARGE_LOCAL FONT_MEDIUM_LOCAL
|
#define FONT_LARGE_LOCAL FONT_MEDIUM_LOCAL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7735_CS) || \
|
#if (defined(USE_EINK) || defined(HAS_SPI_TFT)) && !defined(DISPLAY_FORCE_SMALL_FONTS)
|
||||||
defined(ST7789_CS) || defined(USE_ST7789) || defined(HX8357_CS) || defined(ILI9488_CS) || defined(ST7796_CS) || \
|
|
||||||
defined(USE_ST7796) || defined(HACKADAY_COMMUNICATOR)) && \
|
|
||||||
!defined(DISPLAY_FORCE_SMALL_FONTS)
|
|
||||||
// The screen is bigger so use bigger fonts
|
// The screen is bigger so use bigger fonts
|
||||||
#define FONT_SMALL FONT_MEDIUM_LOCAL // Height: 19
|
#define FONT_SMALL FONT_MEDIUM_LOCAL // Height: 19
|
||||||
#define FONT_MEDIUM FONT_LARGE_LOCAL // Height: 28
|
#define FONT_MEDIUM FONT_LARGE_LOCAL // Height: 28
|
||||||
|
|||||||
@@ -39,9 +39,7 @@ enum class TFTColorRole : uint8_t {
|
|||||||
Count
|
Count
|
||||||
};
|
};
|
||||||
|
|
||||||
#if HAS_TFT || defined(ST7701_CS) || defined(ST7735_CS) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || \
|
#if HAS_TFT || defined(HAS_SPI_TFT)
|
||||||
defined(ST7789_CS) || defined(HX8357_CS) || defined(USE_ST7789) || defined(ILI9488_CS) || defined(ST7796_CS) || \
|
|
||||||
defined(USE_ST7796) || defined(HACKADAY_COMMUNICATOR)
|
|
||||||
#define GRAPHICS_TFT_COLORING_ENABLED 1
|
#define GRAPHICS_TFT_COLORING_ENABLED 1
|
||||||
#else
|
#else
|
||||||
#define GRAPHICS_TFT_COLORING_ENABLED 0
|
#define GRAPHICS_TFT_COLORING_ENABLED 0
|
||||||
|
|||||||
@@ -97,10 +97,7 @@ void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16
|
|||||||
#ifdef ARCH_ESP32
|
#ifdef ARCH_ESP32
|
||||||
if (!Throttle::isWithinTimespanMs(storeForwardModule->lastHeartbeat,
|
if (!Throttle::isWithinTimespanMs(storeForwardModule->lastHeartbeat,
|
||||||
(storeForwardModule->heartbeatInterval * 1200))) { // no heartbeat, overlap a bit
|
(storeForwardModule->heartbeatInterval * 1200))) { // no heartbeat, overlap a bit
|
||||||
#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7735_CS) || \
|
#if (defined(USE_EINK) || defined(HAS_SPI_TFT) || ARCH_PORTDUINO) && !defined(DISPLAY_FORCE_SMALL_FONTS)
|
||||||
defined(ST7789_CS) || defined(USE_ST7789) || defined(ILI9488_CS) || defined(HX8357_CS) || defined(ST7796_CS) || \
|
|
||||||
defined(HACKADAY_COMMUNICATOR) || defined(USE_ST7796) || ARCH_PORTDUINO) && \
|
|
||||||
!defined(DISPLAY_FORCE_SMALL_FONTS)
|
|
||||||
display->drawFastImage(x + SCREEN_WIDTH - 14 - display->getStringWidth(screen->ourId), y + 3 + FONT_HEIGHT_SMALL, 12,
|
display->drawFastImage(x + SCREEN_WIDTH - 14 - display->getStringWidth(screen->ourId), y + 3 + FONT_HEIGHT_SMALL, 12,
|
||||||
8, imgQuestionL1);
|
8, imgQuestionL1);
|
||||||
display->drawFastImage(x + SCREEN_WIDTH - 14 - display->getStringWidth(screen->ourId), y + 11 + FONT_HEIGHT_SMALL, 12,
|
display->drawFastImage(x + SCREEN_WIDTH - 14 - display->getStringWidth(screen->ourId), y + 11 + FONT_HEIGHT_SMALL, 12,
|
||||||
@@ -110,10 +107,7 @@ void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16
|
|||||||
8, imgQuestion);
|
8, imgQuestion);
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7735_CS) || \
|
#if (defined(USE_EINK) || defined(HAS_SPI_TFT)) && !defined(DISPLAY_FORCE_SMALL_FONTS)
|
||||||
defined(ST7789_CS) || defined(USE_ST7789) || defined(ILI9488_CS) || defined(HX8357_CS) || defined(ST7796_CS) || \
|
|
||||||
defined(HACKADAY_COMMUNICATOR) || defined(USE_ST7796)) && \
|
|
||||||
!defined(DISPLAY_FORCE_SMALL_FONTS)
|
|
||||||
display->drawFastImage(x + SCREEN_WIDTH - 18 - display->getStringWidth(screen->ourId), y + 3 + FONT_HEIGHT_SMALL, 16,
|
display->drawFastImage(x + SCREEN_WIDTH - 18 - display->getStringWidth(screen->ourId), y + 3 + FONT_HEIGHT_SMALL, 16,
|
||||||
8, imgSFL1);
|
8, imgSFL1);
|
||||||
display->drawFastImage(x + SCREEN_WIDTH - 18 - display->getStringWidth(screen->ourId), y + 11 + FONT_HEIGHT_SMALL, 16,
|
display->drawFastImage(x + SCREEN_WIDTH - 18 - display->getStringWidth(screen->ourId), y + 11 + FONT_HEIGHT_SMALL, 16,
|
||||||
@@ -126,10 +120,7 @@ void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16
|
|||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
// TODO: Raspberry Pi supports more than just the one screen size
|
// TODO: Raspberry Pi supports more than just the one screen size
|
||||||
#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7735_CS) || \
|
#if (defined(USE_EINK) || defined(HAS_SPI_TFT) || ARCH_PORTDUINO) && !defined(DISPLAY_FORCE_SMALL_FONTS)
|
||||||
defined(ST7789_CS) || defined(USE_ST7789) || defined(ILI9488_CS) || defined(HX8357_CS) || defined(ST7796_CS) || \
|
|
||||||
defined(HACKADAY_COMMUNICATOR) || defined(USE_ST7796) || ARCH_PORTDUINO) && \
|
|
||||||
!defined(DISPLAY_FORCE_SMALL_FONTS)
|
|
||||||
display->drawFastImage(x + SCREEN_WIDTH - 14 - display->getStringWidth(screen->ourId), y + 3 + FONT_HEIGHT_SMALL, 12, 8,
|
display->drawFastImage(x + SCREEN_WIDTH - 14 - display->getStringWidth(screen->ourId), y + 3 + FONT_HEIGHT_SMALL, 12, 8,
|
||||||
imgInfoL1);
|
imgInfoL1);
|
||||||
display->drawFastImage(x + SCREEN_WIDTH - 14 - display->getStringWidth(screen->ourId), y + 11 + FONT_HEIGHT_SMALL, 12, 8,
|
display->drawFastImage(x + SCREEN_WIDTH - 14 - display->getStringWidth(screen->ourId), y + 11 + FONT_HEIGHT_SMALL, 12, 8,
|
||||||
|
|||||||
@@ -717,10 +717,7 @@ void UIRenderer::drawNodes(OLEDDisplay *display, int16_t x, int16_t y, const mes
|
|||||||
snprintf(usersString, sizeof(usersString), "%d/%d %s", nodes_online, nodes_total, additional_words);
|
snprintf(usersString, sizeof(usersString), "%d/%d %s", nodes_online, nodes_total, additional_words);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7735_CS) || \
|
#if (defined(USE_EINK) || defined(HAS_SPI_TFT)) && !defined(DISPLAY_FORCE_SMALL_FONTS)
|
||||||
defined(ST7789_CS) || defined(USE_ST7789) || defined(ILI9488_CS) || defined(HX8357_CS) || defined(ST7796_CS) || \
|
|
||||||
defined(HACKADAY_COMMUNICATOR) || defined(USE_ST7796)) && \
|
|
||||||
!defined(DISPLAY_FORCE_SMALL_FONTS)
|
|
||||||
|
|
||||||
if (currentResolution == ScreenResolution::High) {
|
if (currentResolution == ScreenResolution::High) {
|
||||||
NodeListRenderer::drawScaledXBitmap16x16(x, y - 1, 8, 8, imgUser, display);
|
NodeListRenderer::drawScaledXBitmap16x16(x, y - 1, 8, 8, imgUser, display);
|
||||||
|
|||||||
@@ -26,10 +26,7 @@ const uint8_t bluetoothConnectedIcon[36] PROGMEM = {0xfe, 0x01, 0xff, 0x03, 0x03
|
|||||||
0xf3, 0x3f, 0x33, 0x30, 0x33, 0x33, 0x33, 0x33, 0x03, 0x33, 0xff, 0x33,
|
0xf3, 0x3f, 0x33, 0x30, 0x33, 0x33, 0x33, 0x33, 0x03, 0x33, 0xff, 0x33,
|
||||||
0xfe, 0x31, 0x00, 0x30, 0x30, 0x30, 0x30, 0x30, 0xf0, 0x3f, 0xe0, 0x1f};
|
0xfe, 0x31, 0x00, 0x30, 0x30, 0x30, 0x30, 0x30, 0xf0, 0x3f, 0xe0, 0x1f};
|
||||||
|
|
||||||
#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7735_CS) || \
|
#if (defined(USE_EINK) || defined(HAS_SPI_TFT) || ARCH_PORTDUINO) && !defined(DISPLAY_FORCE_SMALL_FONTS)
|
||||||
defined(ST7789_CS) || defined(USE_ST7789) || defined(HX8357_CS) || defined(ILI9488_CS) || defined(ST7796_CS) || \
|
|
||||||
defined(USE_ST7796) || defined(HACKADAY_COMMUNICATOR) || ARCH_PORTDUINO) && \
|
|
||||||
!defined(DISPLAY_FORCE_SMALL_FONTS)
|
|
||||||
const uint8_t imgQuestionL1[] PROGMEM = {0xff, 0x01, 0x01, 0x32, 0x7b, 0x49, 0x49, 0x6f, 0x26, 0x01, 0x01, 0xff};
|
const uint8_t imgQuestionL1[] PROGMEM = {0xff, 0x01, 0x01, 0x32, 0x7b, 0x49, 0x49, 0x6f, 0x26, 0x01, 0x01, 0xff};
|
||||||
const uint8_t imgQuestionL2[] PROGMEM = {0x0f, 0x08, 0x08, 0x08, 0x06, 0x0f, 0x0f, 0x06, 0x08, 0x08, 0x08, 0x0f};
|
const uint8_t imgQuestionL2[] PROGMEM = {0x0f, 0x08, 0x08, 0x08, 0x06, 0x0f, 0x0f, 0x06, 0x08, 0x08, 0x08, 0x0f};
|
||||||
const uint8_t imgInfoL1[] PROGMEM = {0xff, 0x01, 0x01, 0x01, 0x1e, 0x7f, 0x1e, 0x01, 0x01, 0x01, 0x01, 0xff};
|
const uint8_t imgInfoL1[] PROGMEM = {0xff, 0x01, 0x01, 0x01, 0x1e, 0x7f, 0x1e, 0x01, 0x01, 0x01, 0x01, 0xff};
|
||||||
|
|||||||
+2
-6
@@ -924,9 +924,7 @@ void setup()
|
|||||||
#if HAS_SCREEN
|
#if HAS_SCREEN
|
||||||
if (config.display.displaymode != meshtastic_Config_DisplayConfig_DisplayMode_COLOR) {
|
if (config.display.displaymode != meshtastic_Config_DisplayConfig_DisplayMode_COLOR) {
|
||||||
|
|
||||||
#if defined(ST7701_CS) || defined(ST7735_CS) || defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || \
|
#if defined(HAS_SPI_TFT) || defined(USE_EINK) || defined(USE_SPISSD1306)
|
||||||
defined(ST7789_CS) || defined(HX8357_CS) || defined(USE_ST7789) || defined(ILI9488_CS) || defined(ST7796_CS) || \
|
|
||||||
defined(USE_SPISSD1306) || defined(USE_ST7796) || defined(HACKADAY_COMMUNICATOR)
|
|
||||||
screen = new graphics::Screen(screen_found, screen_model, screen_geometry);
|
screen = new graphics::Screen(screen_found, screen_model, screen_geometry);
|
||||||
#elif defined(ARCH_PORTDUINO)
|
#elif defined(ARCH_PORTDUINO)
|
||||||
if ((screen_found.port != ScanI2C::I2CPort::NO_I2C || portduino_config.displayPanel) &&
|
if ((screen_found.port != ScanI2C::I2CPort::NO_I2C || portduino_config.displayPanel) &&
|
||||||
@@ -1056,9 +1054,7 @@ void setup()
|
|||||||
#if !MESHTASTIC_EXCLUDE_I2C
|
#if !MESHTASTIC_EXCLUDE_I2C
|
||||||
// Don't call screen setup until after nodedb is setup (because we need
|
// Don't call screen setup until after nodedb is setup (because we need
|
||||||
// the current region name)
|
// the current region name)
|
||||||
#if defined(ST7701_CS) || defined(ST7735_CS) || defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || \
|
#if defined(HAS_SPI_TFT) || defined(USE_EINK) || defined(USE_SPISSD1306)
|
||||||
defined(ST7789_CS) || defined(HX8357_CS) || defined(USE_ST7789) || defined(ILI9488_CS) || defined(ST7796_CS) || \
|
|
||||||
defined(USE_ST7796) || defined(USE_SPISSD1306) || defined(HACKADAY_COMMUNICATOR)
|
|
||||||
if (screen)
|
if (screen)
|
||||||
screen->setup();
|
screen->setup();
|
||||||
#elif defined(ARCH_PORTDUINO)
|
#elif defined(ARCH_PORTDUINO)
|
||||||
|
|||||||
+1
-3
@@ -1035,9 +1035,7 @@ void NodeDB::installDefaultConfig(bool preserveKey = false)
|
|||||||
|
|
||||||
config.bluetooth.fixed_pin = defaultBLEPin;
|
config.bluetooth.fixed_pin = defaultBLEPin;
|
||||||
|
|
||||||
#if defined(ST7735_CS) || defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7789_CS) || \
|
#if defined(USE_EINK) || defined(HAS_SPI_TFT) || defined(USE_SPISSD1306)
|
||||||
defined(HX8357_CS) || defined(USE_ST7789) || defined(ILI9488_CS) || defined(ST7796_CS) || defined(USE_SPISSD1306) || \
|
|
||||||
defined(USE_ST7796) || defined(HACKADAY_COMMUNICATOR)
|
|
||||||
bool hasScreen = true;
|
bool hasScreen = true;
|
||||||
#ifdef HELTEC_MESH_NODE_T114
|
#ifdef HELTEC_MESH_NODE_T114
|
||||||
uint32_t st7789_id = get_st7789_id(ST7789_NSS, ST7789_SCK, ST7789_SDA, ST7789_RS, ST7789_RESET);
|
uint32_t st7789_id = get_st7789_id(ST7789_NSS, ST7789_SCK, ST7789_SDA, ST7789_RS, ST7789_RESET);
|
||||||
|
|||||||
@@ -43,6 +43,7 @@
|
|||||||
#define HAS_SCREEN 1 // Assume no screen present by default to prevent crash...
|
#define HAS_SCREEN 1 // Assume no screen present by default to prevent crash...
|
||||||
|
|
||||||
// ST7735S TFT LCD
|
// ST7735S TFT LCD
|
||||||
|
#define HAS_SPI_TFT 1
|
||||||
#define ST7735S 1 // there are different (sub-)versions of ST7735
|
#define ST7735S 1 // there are different (sub-)versions of ST7735
|
||||||
#define ST7735_CS -1
|
#define ST7735_CS -1
|
||||||
#define ST7735_RS 33 // DC
|
#define ST7735_RS 33 // DC
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
#define GPS_RX_PIN 16
|
#define GPS_RX_PIN 16
|
||||||
#define GPS_TX_PIN 17
|
#define GPS_TX_PIN 17
|
||||||
|
|
||||||
|
#define HAS_SPI_TFT 1
|
||||||
#define ILI9341_DRIVER
|
#define ILI9341_DRIVER
|
||||||
#define TFT_HEIGHT 240
|
#define TFT_HEIGHT 240
|
||||||
#define TFT_WIDTH 320
|
#define TFT_WIDTH 320
|
||||||
|
|||||||
@@ -52,6 +52,7 @@
|
|||||||
#undef LED_STATE_ON
|
#undef LED_STATE_ON
|
||||||
#undef LED_POWER
|
#undef LED_POWER
|
||||||
|
|
||||||
|
#define HAS_SPI_TFT 1
|
||||||
#define HAS_CST226SE 1
|
#define HAS_CST226SE 1
|
||||||
#define HAS_TOUCHSCREEN 1
|
#define HAS_TOUCHSCREEN 1
|
||||||
// #define TOUCH_IRQ 35 // broken in this version of the lib 0.3.1
|
// #define TOUCH_IRQ 35 // broken in this version of the lib 0.3.1
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
#define HAS_SCREEN 0
|
#define HAS_SCREEN 0
|
||||||
|
|
||||||
// Default SPI1 will be mapped to the display
|
// Default SPI1 will be mapped to the display
|
||||||
|
#define HAS_SPI_TFT 1
|
||||||
#define ST7789_SDA 23
|
#define ST7789_SDA 23
|
||||||
#define ST7789_SCK 18
|
#define ST7789_SCK 18
|
||||||
#define ST7789_CS 5
|
#define ST7789_CS 5
|
||||||
|
|||||||
@@ -42,12 +42,11 @@ void c6l_init();
|
|||||||
#define SX126X_DIO3_TCXO_VOLTAGE 3.0
|
#define SX126X_DIO3_TCXO_VOLTAGE 3.0
|
||||||
|
|
||||||
#define USE_SPISSD1306
|
#define USE_SPISSD1306
|
||||||
#ifdef USE_SPISSD1306
|
#define DISPLAY_FORCE_SMALL_FONTS
|
||||||
#define SSD1306_NSS 6 // CS
|
#define SSD1306_NSS 6 // CS
|
||||||
#define SSD1306_RS 18 // DC
|
#define SSD1306_RS 18 // DC
|
||||||
#define SSD1306_RESET 15
|
#define SSD1306_RESET 15
|
||||||
// #define OLED_DG 1
|
// #define OLED_DG 1
|
||||||
#endif
|
|
||||||
// Tiny OLED panel — opts into compile-time layout/font/feature substitutions
|
// Tiny OLED panel — opts into compile-time layout/font/feature substitutions
|
||||||
// gated on OLED_TINY across the graphics stack.
|
// gated on OLED_TINY across the graphics stack.
|
||||||
#define OLED_TINY
|
#define OLED_TINY
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
#define TFT_BLACK 0
|
#define TFT_BLACK 0
|
||||||
#define BRIGHTNESS_DEFAULT 130 // Medium Low Brightness
|
#define BRIGHTNESS_DEFAULT 130 // Medium Low Brightness
|
||||||
#define USE_TFTDISPLAY 1
|
#define USE_TFTDISPLAY 1
|
||||||
|
#define HAS_SPI_TFT 1
|
||||||
|
|
||||||
#define USE_POWERSAVE
|
#define USE_POWERSAVE
|
||||||
#define SLEEP_TIME 120
|
#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)
|
#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
|
#if HAS_TFT
|
||||||
|
#define HAS_SPI_TFT 1
|
||||||
#define USE_TFTDISPLAY 1
|
#define USE_TFTDISPLAY 1
|
||||||
#endif
|
#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)
|
#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
|
#if HAS_TFT
|
||||||
|
#define HAS_SPI_TFT 1
|
||||||
#define USE_TFTDISPLAY 1
|
#define USE_TFTDISPLAY 1
|
||||||
#endif
|
#endif
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
#define I2C_SCL SCL
|
#define I2C_SCL SCL
|
||||||
|
|
||||||
// Display (TFT)
|
// Display (TFT)
|
||||||
|
#define HAS_SPI_TFT 1
|
||||||
#define USE_ST7789
|
#define USE_ST7789
|
||||||
#define ST7789_NSS 39
|
#define ST7789_NSS 39
|
||||||
#define ST7789_RS 47 // DC
|
#define ST7789_RS 47 // DC
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
#define I2C_SCL SCL
|
#define I2C_SCL SCL
|
||||||
|
|
||||||
// ST7735S TFT LCD
|
// ST7735S TFT LCD
|
||||||
|
#define HAS_SPI_TFT 1
|
||||||
#define ST7735S 1 // there are different (sub-)versions of ST7735
|
#define ST7735S 1 // there are different (sub-)versions of ST7735
|
||||||
#define ST7735_CS 38
|
#define ST7735_CS 38
|
||||||
#define ST7735_RS 40 // DC
|
#define ST7735_RS 40 // DC
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#define I2C_SCL SCL
|
#define I2C_SCL SCL
|
||||||
|
|
||||||
// ST7735S TFT LCD
|
// ST7735S TFT LCD
|
||||||
|
#define HAS_SPI_TFT 1
|
||||||
#define ST7735S 1 // there are different (sub-)versions of ST7735
|
#define ST7735S 1 // there are different (sub-)versions of ST7735
|
||||||
#define ST7735_CS 38
|
#define ST7735_CS 38
|
||||||
#define ST7735_RS 40 // DC
|
#define ST7735_RS 40 // DC
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#define I2C_SCL SCL
|
#define I2C_SCL SCL
|
||||||
|
|
||||||
// ST7735S TFT LCD
|
// ST7735S TFT LCD
|
||||||
|
#define HAS_SPI_TFT 1
|
||||||
#define ST7735S 1 // there are different (sub-)versions of ST7735
|
#define ST7735S 1 // there are different (sub-)versions of ST7735
|
||||||
#define ST7735_CS 38
|
#define ST7735_CS 38
|
||||||
#define ST7735_RS 40 // DC
|
#define ST7735_RS 40 // DC
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#define USE_ST7789
|
#define USE_ST7789
|
||||||
|
#define HAS_SPI_TFT 1
|
||||||
#define ST7789_NSS 37
|
#define ST7789_NSS 37
|
||||||
#define ST7789_RS 34 // DC
|
#define ST7789_RS 34 // DC
|
||||||
#define ST7789_SDA 35 // MOSI
|
#define ST7789_SDA 35 // MOSI
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
#define LORA_DIO2 RADIOLIB_NC
|
#define LORA_DIO2 RADIOLIB_NC
|
||||||
|
|
||||||
// Default SPI1 will be mapped to the display
|
// Default SPI1 will be mapped to the display
|
||||||
|
#define HAS_SPI_TFT 1
|
||||||
#define ST7789_SDA 4
|
#define ST7789_SDA 4
|
||||||
#define ST7789_SCK 3
|
#define ST7789_SCK 3
|
||||||
#define ST7789_CS 6
|
#define ST7789_CS 6
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
// #define ADC_MULTIPLIER 2
|
// #define ADC_MULTIPLIER 2
|
||||||
|
|
||||||
// ST7701 TFT LCD
|
// ST7701 TFT LCD
|
||||||
|
#define HAS_SPI_TFT 1
|
||||||
#define ST7701_CS (4 | IO_EXPANDER)
|
#define ST7701_CS (4 | IO_EXPANDER)
|
||||||
#define ST7701_RS -1 // DC
|
#define ST7701_RS -1 // DC
|
||||||
#define ST7701_SDA 48 // MOSI
|
#define ST7701_SDA 48 // MOSI
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
#define TFT_CS 12
|
#define TFT_CS 12
|
||||||
|
|
||||||
// ST7789 TFT LCD
|
// ST7789 TFT LCD
|
||||||
|
#define HAS_SPI_TFT 1
|
||||||
#define ST7789_CS TFT_CS
|
#define ST7789_CS TFT_CS
|
||||||
#define ST7789_RS 11 // DC
|
#define ST7789_RS 11 // DC
|
||||||
#define ST7789_SDA 41 // MOSI
|
#define ST7789_SDA 41 // MOSI
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
// ST7789 TFT LCD
|
// ST7789 TFT LCD
|
||||||
|
#define HAS_SPI_TFT 1
|
||||||
#define ST7789_CS 12
|
#define ST7789_CS 12
|
||||||
#define ST7789_RS 38 // DC
|
#define ST7789_RS 38 // DC
|
||||||
#define ST7789_SDA 13 // MOSI
|
#define ST7789_SDA 13 // MOSI
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
// ST7796 TFT LCD
|
// ST7796 TFT LCD
|
||||||
#define TFT_CS 38
|
#define TFT_CS 38
|
||||||
|
#define HAS_SPI_TFT 1
|
||||||
#define ST7796_CS TFT_CS
|
#define ST7796_CS TFT_CS
|
||||||
#define ST7796_RS 37 // DC
|
#define ST7796_RS 37 // DC
|
||||||
#define ST7796_SDA MOSI // MOSI
|
#define ST7796_SDA MOSI // MOSI
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
#define I2C_SCL SCL
|
#define I2C_SCL SCL
|
||||||
|
|
||||||
// ST7735S TFT LCD
|
// ST7735S TFT LCD
|
||||||
|
#define HAS_SPI_TFT 1
|
||||||
#define ST7735S 1 // there are different (sub-)versions of ST7735
|
#define ST7735S 1 // there are different (sub-)versions of ST7735
|
||||||
#define ST7735_CS 38
|
#define ST7735_CS 38
|
||||||
#define ST7735_RS 40 // DC
|
#define ST7735_RS 40 // DC
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
// #define USE_SSD1306
|
// #define USE_SSD1306
|
||||||
|
|
||||||
// Default SPI1 will be mapped to the display
|
// Default SPI1 will be mapped to the display
|
||||||
|
#define HAS_SPI_TFT 1
|
||||||
#define ST7789_SDA 42
|
#define ST7789_SDA 42
|
||||||
#define ST7789_SCK 41
|
#define ST7789_SCK 41
|
||||||
#define ST7789_CS 38
|
#define ST7789_CS 38
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
#define LORA_DIO2 RADIOLIB_NC // Not really used
|
#define LORA_DIO2 RADIOLIB_NC // Not really used
|
||||||
|
|
||||||
// HX8357 TFT LCD
|
// HX8357 TFT LCD
|
||||||
|
#define HAS_SPI_TFT 1
|
||||||
#define HX8357_CS 48
|
#define HX8357_CS 48
|
||||||
#define HX8357_RS 47 // AKA DC
|
#define HX8357_RS 47 // AKA DC
|
||||||
#define HX8357_RESET 46
|
#define HX8357_RESET 46
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ extern "C" {
|
|||||||
#define VEXT_ON_VALUE HIGH
|
#define VEXT_ON_VALUE HIGH
|
||||||
|
|
||||||
// ST7735S TFT LCD
|
// ST7735S TFT LCD
|
||||||
|
#define HAS_SPI_TFT 1
|
||||||
#define ST7735_CS (0 + 22)
|
#define ST7735_CS (0 + 22)
|
||||||
#define ST7735_RS (0 + 15) // DC
|
#define ST7735_RS (0 + 15) // DC
|
||||||
#define ST7735_SDA (0 + 17) // MOSI
|
#define ST7735_SDA (0 + 17) // MOSI
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ extern "C" {
|
|||||||
#define HELTEC_MESH_NODE_T1
|
#define HELTEC_MESH_NODE_T1
|
||||||
|
|
||||||
// Display (ST7735, 80x160 TFT via SPI1)
|
// Display (ST7735, 80x160 TFT via SPI1)
|
||||||
|
#define HAS_SPI_TFT 1
|
||||||
#define ST7735_CS (0 + 12)
|
#define ST7735_CS (0 + 12)
|
||||||
#define ST7735_RS (0 + 22) // DC
|
#define ST7735_RS (0 + 22) // DC
|
||||||
#define ST7735_SDA (0 + 24)
|
#define ST7735_SDA (0 + 24)
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ extern "C" {
|
|||||||
#define HELTEC_MESH_NODE_T114
|
#define HELTEC_MESH_NODE_T114
|
||||||
|
|
||||||
#define USE_ST7789
|
#define USE_ST7789
|
||||||
|
#define HAS_SPI_TFT 1
|
||||||
#define ST7789_NSS 11
|
#define ST7789_NSS 11
|
||||||
#define ST7789_RS 12 // DC
|
#define ST7789_RS 12 // DC
|
||||||
#define ST7789_SDA 41 // MOSI
|
#define ST7789_SDA 41 // MOSI
|
||||||
|
|||||||
@@ -107,6 +107,7 @@ extends = heltec_mesh_solar_base
|
|||||||
build_flags = ${heltec_mesh_solar_base.build_flags}
|
build_flags = ${heltec_mesh_solar_base.build_flags}
|
||||||
-DHELTEC_MESH_SOLAR_TFT
|
-DHELTEC_MESH_SOLAR_TFT
|
||||||
-DSPI_INTERFACES_COUNT=2
|
-DSPI_INTERFACES_COUNT=2
|
||||||
|
-DHAS_SPI_TFT=1
|
||||||
-DUSE_ST7789
|
-DUSE_ST7789
|
||||||
-DST7789_NSS=41
|
-DST7789_NSS=41
|
||||||
-DST7789_RS=13
|
-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 RAK14014 // Tell it we have a RAK14014
|
||||||
#define USER_SETUP_LOADED 1
|
#define USER_SETUP_LOADED 1
|
||||||
|
|
||||||
|
#define HAS_SPI_TFT 1
|
||||||
#define ST7789_DRIVER 1
|
#define ST7789_DRIVER 1
|
||||||
#define TFT_WIDTH 240
|
#define TFT_WIDTH 240
|
||||||
#define TFT_HEIGHT 320
|
#define TFT_HEIGHT 320
|
||||||
|
|||||||
Reference in New Issue
Block a user