File tree Expand file tree Collapse file tree 3 files changed +14
-7
lines changed
Expand file tree Collapse file tree 3 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ I started the project using the Espressif IDF (a powerful tool indeed) but switc
1919 ecosystem.
2020- I chose the ` #[no_std] ` (i.e. no Espressif IDF) option, mostly to feel out the ecosystem in a pure Rust world. This
2121 is an art piece after all.
22- - Async has some significant advantages, particularly with stack management and efficient concurrency so I have
22+ - Async has some significant advantages, particularly with stack management and efficient concurrency, so I have
2323 made some effort to use async interfaces wherever possible.
2424
2525## Hardware Requirements
@@ -53,7 +53,6 @@ compilers for your targeted hardware. The tools you will need are:
5353 Wokwi setup in the repo. You will need to get an account and set up your IDE to use it. There are plugins for VSCode
5454 and Jetbrains.
5555
56-
5756## Building and running
5857Builds are mostly managed by cargo, but we use the awesome [ just] ( https://github.com/casey/just ) tool to automate
5958some of the builds. Running ` just --list ` will show all the available tasks.
@@ -66,8 +65,12 @@ some of the builds. Running `just --list` will show all the available tasks.
6665- [ Rust on ESP book] ( https://docs.esp-rs.org/book/ )
6766-
6867
69-
7068# TODO
7169
7270- [ ] Set up hardware targets for the ESP32-S3 and ESP32-H2 targets
73- - [ ] Fix the Wokwi emulator
71+ - [ ] Fix the Wokwi emulator
72+
73+
74+ # Learnings
75+ - The Rust embedded ecosystem is potent but immature. That being said, it is actually really nice to work with and
76+ is rapidly evolving.
Original file line number Diff line number Diff line change @@ -10,14 +10,19 @@ use smart_leds::RGB8;
1010/// this is one of the many reasons
1111pub enum DisplayState {
1212 /// Suspends animation update
13+ #[ allow( unused) ]
1314 Stop ,
1415 /// Restart animation update
16+ #[ allow( unused) ]
1517 Start ,
1618 /// Set the pixel colour. It is always the 1st pixel. Boring but....
19+ #[ allow( unused) ]
1720 Colour ( RGB8 ) ,
1821 /// Switch of all the LEDs
22+ #[ allow( unused) ]
1923 Off ,
20- /// Sets the led to torch mode. This disables the animation
24+ /// Sets the LED to torch mode. This disables the animation
25+ #[ allow( unused) ]
2126 Torch ( u8 ) ,
2227}
2328
Original file line number Diff line number Diff line change @@ -80,11 +80,10 @@ async fn main(spawner: Spawner) {
8080 let display_channel = DISPLAY_CHANNEL . init ( Channel :: new ( ) ) ;
8181 let led_driver: & ' static mut LedDriver =
8282 LED_DRIVER . init ( LedDriver :: new ( peripherals. RMT , peripherals. GPIO6 ) ) ;
83-
83+ // Start the display manager task
8484 spawner
8585 . spawn ( display_task ( display_channel, led_driver) )
8686 . expect ( "Failed to spawn display task" ) ;
87- Timer :: after ( Duration :: from_secs ( 1 ) ) . await ;
8887
8988 // Simple example that exercises the display task
9089 loop {
You can’t perform that action at this time.
0 commit comments