daisy-embassy 0.2.2

async audio development with daisy seed and embassy
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use embassy_stm32 as hal;
use hal::gpio::{self, Speed};
pub struct UserLed<'a>(gpio::Output<'a>);

impl UserLed<'_> {
    pub fn new(pin: hal::peripherals::PC7) -> Self {
        Self(gpio::Output::new(pin, gpio::Level::Low, Speed::Low))
    }
    pub fn on(&mut self) {
        self.0.set_high();
    }
    pub fn off(&mut self) {
        self.0.set_low();
    }
}