feat(t114): add Heltec Mesh Node T114 board support
Adds nRF52840 + SX1262 + 1.14" 240×135 ST7789 color TFT support. First color display board in the project; introduces a BoardDisplay trait so each board renders to its native pixel format and resolution without aliasing or color-quantization round-trips. Architecture: - New BoardDisplay trait (src/display.rs) bundles render_*, present(), set_bright/set_dim. Replaces the old DrawTarget<Color=BinaryColor> + DisplayBrightness combo as the LoRaBoard::DisplayDriver bound. - Mono OLED drivers (Sh1106, Ssd1306Async) get adapter impls that delegate to the existing display::render module — no behavior change for any existing board. - T114 ST7789 driver (src/driver/st7789.rs) wraps lcd-async (async fork of mipidsi) with a 64,800-byte raw byte framebuffer in .bss. Renders via lcd_async::raw_framebuf::RawFrameBuf<Rgb565, _>, presents via a single async DMA blit (panel.show_raw_data(...).await) — the await yields the executor for the ~65 ms SPI transfer so the radio task isn't starved during repaints. - PWM backlight on PWM0 / P0.15 (active-LOW, inverted polarity) for smooth dim/bright transitions instead of GPIO toggle. - Native 240×135 Rgb565 renderer (src/display/render_color.rs) with splash + dashboard + sparkline. - Shared QR-code blit (src/display/qr.rs), generic over PixelColor, re-centers the 64×64 bitmap which has cells in cols 0..50 and ~14 px of right-side padding — both mono and color splash now show the QR with 7 px quiet zones on all four sides (was visibly left-shifted). - Shared content types (BoardInfo, DashboardCtx) decouple what to draw from how each board renders it. - create_display() now takes the board's full DisplayParts bundle (was just the I2C bus) so non-I2C displays can carry SPI + control pins through. Hardware: - VEXT_ENABLE on P0.21 driven HIGH at boot — powers the SX1262 + TFT rail. Without this, lora-phy init succeeds at the SPI level but TX_DONE never fires. - VTFT_CTRL on P0.03, active LOW; backlight on P0.15, active LOW. - TFT SPI2 (SCK P1.08 / MOSI P1.09) at 8 MHz over EasyDMA. Async ExclusiveDevice from embedded-hal-bus (with the 'async' feature). - lcd-async builder at display_size(135, 240), display_offset(52, 40), Deg90 rotation, ColorInversion::Inverted — standard 1.14" ST7789 die mapping. - Linker: shared ld/nrf52840-memory.x (S140 SoftDevice preserved at 0x01000-0x26000 per project policy).
This commit is contained in:
22 files changed
+1246
-135
No files matched your search
+29
@@ -40,6 +40,21 @@ static_cell = "2.1"
|
||||
display-interface = "0.5"
|
||||
embedded-graphics = "0.8"
|
||||
ssd1306 = { version = "0.10", features = ["async"] }
|
||||
# T114 ST7789 TFT (color, async SPI). Optional — only pulled in by the
|
||||
# heltec_mesh_node_t114 feature. Mono OLED boards keep their existing
|
||||
# display-interface + ssd1306/sh1106 stack and don't pay for these.
|
||||
#
|
||||
# `lcd-async` is an async fork of mipidsi: same model/builder shape but
|
||||
# `init()` and pixel writes are `async fn`s. Combined with embassy-nrf's
|
||||
# DMA-backed async Spim, the dashboard repaint yields the executor for
|
||||
# the duration of the SPI transfer instead of busy-looping for ~65 ms,
|
||||
# so the radio task isn't starved.
|
||||
#
|
||||
# embedded-hal-bus needs the `async` feature for `ExclusiveDevice` to
|
||||
# implement `embedded_hal_async::spi::SpiDevice` (in addition to the
|
||||
# blocking impl).
|
||||
lcd-async = { version = "0.1", optional = true }
|
||||
embedded-hal-bus = { version = "0.3", optional = true, features = ["async"] }
|
||||
|
||||
# Async IO traits and combinators
|
||||
embedded-io-async = "0.7"
|
||||
@@ -252,6 +267,20 @@ wio_tracker_l1 = [
|
||||
"embassy-executor/platform-cortex-m",
|
||||
"embassy-executor/executor-thread",
|
||||
]
|
||||
heltec_mesh_node_t114 = [
|
||||
"embassy",
|
||||
"trace-defmt",
|
||||
"dep:cortex-m",
|
||||
"dep:cortex-m-rt",
|
||||
"cortex-m-rt/set-vtor",
|
||||
"dep:defmt-rtt",
|
||||
"dep:embassy-nrf",
|
||||
"dep:panic-probe",
|
||||
"dep:lcd-async",
|
||||
"dep:embedded-hal-bus",
|
||||
"embassy-executor/platform-cortex-m",
|
||||
"embassy-executor/executor-thread",
|
||||
]
|
||||
waveshare_rp2040_lora = [
|
||||
"embassy",
|
||||
"trace-defmt",
|
||||
|
||||
Reference in new issue
Block a user