daisy-embassy 0.2.3

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::{self as hal, Peri};
use hal::gpio::{self, Speed};
pub struct UserLed<'a>(gpio::Output<'a>);

impl<'a> UserLed<'a> {
    pub fn new(pin: Peri<'a, 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();
    }
}