From c21a54618cb7e7c66a76dd9b9201a49fbf87ce4c Mon Sep 17 00:00:00 2001 From: Richard Barnes Date: Mon, 8 Sep 2025 14:56:23 -1000 Subject: [PATCH 01/19] First draft of screen support --- ui-stm32/Cargo.toml | 3 ++- ui-stm32/src/board/ev13.rs | 25 ++++++++++++++++++++++++- ui-stm32/src/board/mod.rs | 2 ++ ui-stm32/src/main.rs | 24 ++++++++++++++++++++++-- 4 files changed, 50 insertions(+), 4 deletions(-) diff --git a/ui-stm32/Cargo.toml b/ui-stm32/Cargo.toml index 8cdb6612..23bb70cc 100644 --- a/ui-stm32/Cargo.toml +++ b/ui-stm32/Cargo.toml @@ -20,12 +20,13 @@ defmt-rtt = "1.0.0" embassy-executor = { version = "0.8.0", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } embassy-futures = { version = "0.1.1", features = ["defmt"] } -embassy-stm32 = { version = "0.3.0", features = ["defmt", "stm32f405rg", "memory-x", "time-driver-tim4", "exti", "chrono"] } +embassy-stm32 = { version = "0.3.0", features = ["defmt", "stm32f405rg", "memory-x", "time-driver-tim1", "exti", "chrono"] } embassy-time = { version = "0.4.0", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } heapless = { version = "0.8", default-features = false } panic-probe = { version = "1.0.0", features = ["print-defmt"] } embassy-sync = { version = "0.7.1", features = ["defmt"] } +num_enum = { version = "0.7.4", default-features = false } [profile.release] debug = 2 diff --git a/ui-stm32/src/board/ev13.rs b/ui-stm32/src/board/ev13.rs index a6a44beb..6a8471da 100644 --- a/ui-stm32/src/board/ev13.rs +++ b/ui-stm32/src/board/ev13.rs @@ -1,12 +1,14 @@ -use super::{Button, Keyboard, StatusLed}; +use super::{screen::Screen, Button, Keyboard, StatusLed}; use embassy_stm32::{ exti::ExtiInput, gpio::{Input, Level, Output, Pull, Speed}, + spi::Spi, }; use ui_app::{Led, Outputs}; pub struct Board { status_led: StatusLed, + pub screen: Screen, // XXX should not be pub pub ptt_button: Option