tlora-t3s3-epaper: e-ink startup and build cleanup (#10973)
* T3s3 Eink * Update SerialConsole.cpp * Update * Update SerialConsole.h * Update EInkDisplay2.cpp
This commit is contained in:
+7
-1
@@ -64,4 +64,10 @@ bool fsFormat();
|
|||||||
std::vector<meshtastic_FileInfo> getFiles(const char *dirname, uint8_t levels, size_t maxCount = 64, bool *wasLimited = nullptr);
|
std::vector<meshtastic_FileInfo> getFiles(const char *dirname, uint8_t levels, size_t maxCount = 64, bool *wasLimited = nullptr);
|
||||||
void listDir(const char *dirname, uint8_t levels, bool del = false);
|
void listDir(const char *dirname, uint8_t levels, bool del = false);
|
||||||
void rmDir(const char *dirname);
|
void rmDir(const char *dirname);
|
||||||
void setupSDCard();
|
void setupSDCard();
|
||||||
|
|
||||||
|
#if defined(HAS_SDCARD) && !defined(SDCARD_USE_SOFT_SPI) && defined(SDCARD_USE_SPI1)
|
||||||
|
#include <SPI.h>
|
||||||
|
// HSPI bus set up by setupSDCard(). Reuse this for other devices on the same bus.
|
||||||
|
extern SPIClass SPI_HSPI;
|
||||||
|
#endif
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#if defined(USE_EINK) && !defined(USE_EINK_PARALLELDISPLAY)
|
#if defined(USE_EINK) && !defined(USE_EINK_PARALLELDISPLAY)
|
||||||
#include "EInkDisplay2.h"
|
#include "EInkDisplay2.h"
|
||||||
|
#include "FSCommon.h"
|
||||||
#include "SPILock.h"
|
#include "SPILock.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include <SPI.h>
|
#include <SPI.h>
|
||||||
@@ -214,9 +215,23 @@ bool EInkDisplay::connect()
|
|||||||
defined(CROWPANEL_ESP32S3_5_EPAPER) || defined(CROWPANEL_ESP32S3_4_EPAPER) || defined(CROWPANEL_ESP32S3_2_EPAPER) || \
|
defined(CROWPANEL_ESP32S3_5_EPAPER) || defined(CROWPANEL_ESP32S3_4_EPAPER) || defined(CROWPANEL_ESP32S3_2_EPAPER) || \
|
||||||
defined(MINI_EPAPER_S3)
|
defined(MINI_EPAPER_S3)
|
||||||
{
|
{
|
||||||
|
#if defined(TLORA_T3S3_EPAPER)
|
||||||
|
// T3-S3 shares HSPI with the SD card; preconfigure the panel control pins.
|
||||||
|
hspi = &SPI_HSPI;
|
||||||
|
pinMode(PIN_EINK_CS, OUTPUT);
|
||||||
|
pinMode(PIN_EINK_DC, OUTPUT);
|
||||||
|
pinMode(PIN_EINK_BUSY, INPUT);
|
||||||
|
if (PIN_EINK_RES >= 0) {
|
||||||
|
pinMode(PIN_EINK_RES, OUTPUT);
|
||||||
|
digitalWrite(PIN_EINK_RES, HIGH);
|
||||||
|
}
|
||||||
|
digitalWrite(PIN_EINK_CS, HIGH);
|
||||||
|
digitalWrite(PIN_EINK_DC, HIGH);
|
||||||
|
#else
|
||||||
// Start HSPI
|
// Start HSPI
|
||||||
hspi = new SPIClass(HSPI);
|
hspi = new SPIClass(HSPI);
|
||||||
hspi->begin(PIN_EINK_SCLK, -1, PIN_EINK_MOSI, PIN_EINK_CS); // SCLK, MISO, MOSI, SS
|
hspi->begin(PIN_EINK_SCLK, -1, PIN_EINK_MOSI, PIN_EINK_CS); // SCLK, MISO, MOSI, SS
|
||||||
|
#endif
|
||||||
// VExt already enabled in setup()
|
// VExt already enabled in setup()
|
||||||
// RTC GPIO hold disabled in setup()
|
// RTC GPIO hold disabled in setup()
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,22 @@
|
|||||||
[inkhud]
|
[inkhud]
|
||||||
build_src_filter =
|
build_src_filter =
|
||||||
+<graphics/niche/>; Include the nicheGraphics directory
|
+<graphics/niche/>; Include the nicheGraphics directory
|
||||||
build_flags =
|
-<graphics/draw/> ; BaseUI renderer stack is disabled for InkHUD
|
||||||
|
-<graphics/fonts/> ; InkHUD uses GFX_Root fonts instead of BaseUI font tables
|
||||||
|
-<graphics/EInkDisplay2.cpp> ; InkHUD drives e-ink through niche drivers
|
||||||
|
-<graphics/EInkDynamicDisplay.cpp>
|
||||||
|
-<graphics/EInkParallelDisplay.cpp>
|
||||||
|
-<graphics/EmoteRenderer.cpp>
|
||||||
|
-<graphics/emotes.cpp>
|
||||||
|
-<graphics/Panel_sdl.cpp>
|
||||||
|
-<graphics/ScreenGlobals.cpp>
|
||||||
|
-<graphics/SharedUIDisplay.cpp>
|
||||||
|
-<graphics/TFTColorRegions.cpp>
|
||||||
|
-<graphics/TFTDisplay.cpp>
|
||||||
|
-<graphics/tftSetup.cpp>
|
||||||
|
-<graphics/TimeFormatters.cpp>
|
||||||
|
-<graphics/VirtualKeyboard.cpp>
|
||||||
|
build_flags =
|
||||||
-D MESHTASTIC_INCLUDE_NICHE_GRAPHICS ; Use NicheGraphics
|
-D MESHTASTIC_INCLUDE_NICHE_GRAPHICS ; Use NicheGraphics
|
||||||
-D MESHTASTIC_INCLUDE_INKHUD ; Use InkHUD (a NicheGraphics UI)
|
-D MESHTASTIC_INCLUDE_INKHUD ; Use InkHUD (a NicheGraphics UI)
|
||||||
-D MESHTASTIC_EXCLUDE_SCREEN ; Suppress default Screen class
|
-D MESHTASTIC_EXCLUDE_SCREEN ; Suppress default Screen class
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "FSCommon.h"
|
||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
|
|
||||||
#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS
|
#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS
|
||||||
@@ -29,9 +30,8 @@ void setupNicheGraphics()
|
|||||||
// SPI
|
// SPI
|
||||||
// -----------------------------
|
// -----------------------------
|
||||||
|
|
||||||
// Display is connected to HSPI
|
// Display shares the HSPI bus with the SD card; reuse it rather than re-init the same host.
|
||||||
SPIClass *hspi = new SPIClass(HSPI);
|
SPIClass *hspi = &SPI_HSPI;
|
||||||
hspi->begin(PIN_EINK_SCLK, -1, PIN_EINK_MOSI, PIN_EINK_CS);
|
|
||||||
|
|
||||||
// E-Ink Driver
|
// E-Ink Driver
|
||||||
// -----------------------------
|
// -----------------------------
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ build_flags =
|
|||||||
-D TLORA_T3S3_EPAPER
|
-D TLORA_T3S3_EPAPER
|
||||||
-I variants/esp32s3/tlora_t3s3_epaper
|
-I variants/esp32s3/tlora_t3s3_epaper
|
||||||
-DUSE_EINK
|
-DUSE_EINK
|
||||||
|
-DMESHTASTIC_EXCLUDE_AUDIO=1
|
||||||
|
-DMESHTASTIC_EXCLUDE_WEBSERVER=1
|
||||||
-DEINK_DISPLAY_MODEL=GxEPD2_213_BN
|
-DEINK_DISPLAY_MODEL=GxEPD2_213_BN
|
||||||
-DEINK_WIDTH=250
|
-DEINK_WIDTH=250
|
||||||
-DEINK_HEIGHT=122
|
-DEINK_HEIGHT=122
|
||||||
@@ -39,6 +41,9 @@ extends = esp32s3_base, inkhud
|
|||||||
board = tlora-t3s3-v1
|
board = tlora-t3s3-v1
|
||||||
board_check = true
|
board_check = true
|
||||||
upload_protocol = esptool
|
upload_protocol = esptool
|
||||||
|
custom_sdkconfig =
|
||||||
|
${esp32s3_base.custom_sdkconfig}
|
||||||
|
CONFIG_ESP_IPC_TASK_STACK_SIZE=2048 ; default 1024 overflows during NimBLE init off USB power
|
||||||
build_src_filter =
|
build_src_filter =
|
||||||
${esp32s3_base.build_src_filter}
|
${esp32s3_base.build_src_filter}
|
||||||
${inkhud.build_src_filter}
|
${inkhud.build_src_filter}
|
||||||
@@ -47,6 +52,8 @@ build_flags =
|
|||||||
${inkhud.build_flags}
|
${inkhud.build_flags}
|
||||||
-I variants/esp32s3/tlora_t3s3_epaper
|
-I variants/esp32s3/tlora_t3s3_epaper
|
||||||
-D TLORA_T3S3_EPAPER
|
-D TLORA_T3S3_EPAPER
|
||||||
|
-DMESHTASTIC_EXCLUDE_AUDIO=1
|
||||||
|
-DMESHTASTIC_EXCLUDE_WEBSERVER=1
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX
|
${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX
|
||||||
${esp32s3_base.lib_deps}
|
${esp32s3_base.lib_deps}
|
||||||
|
|||||||
Reference in New Issue
Block a user