fix: Wio Tracker LED on P1.01, move SimpleLed to board layer
Per the Wio Tracker L1 schematic, it has a green LED on P1.01. Moved SimpleLed from driver/ to board layer (esp32s3.rs and wio_tracker_l1.rs) since the impl needs HAL-specific Output types. Removed driver/simple_led.rs — each board layer defines its own. RAK WisBlock remains LedDriver=() (no user LED on the core module).
This commit is contained in:
1 parent
3bb41da223
commit
f9117d71c8
7 files changed
+43
-41
No files matched your search
@@ -18,6 +18,20 @@ use crate::hal::esp32s3 as mcu;
|
||||
|
||||
pub use mcu::{I2cBus as DisplayI2c, SpiBus};
|
||||
|
||||
// ── LED driver ──────────────────────────────────────────────────────
|
||||
|
||||
pub struct SimpleLed(pub Output<'static>);
|
||||
|
||||
impl super::traits::RgbLed for SimpleLed {
|
||||
async fn set_rgb(&mut self, r: u8, g: u8, b: u8) {
|
||||
if r > 0 || g > 0 || b > 0 {
|
||||
self.0.set_high();
|
||||
} else {
|
||||
self.0.set_low();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ── Concrete peripheral types ───────────────────────────────────────
|
||||
|
||||
type Nss = Output<'static>;
|
||||
|
||||
Reference in new issue
Block a user