-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathmain.rs
More file actions
23 lines (19 loc) · 615 Bytes
/
main.rs
File metadata and controls
23 lines (19 loc) · 615 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#![no_std]
#![no_main]
#![feature(type_alias_impl_trait)]
use embassy::executor::Spawner;
use embassy_stm32::Peripherals;
use embassy_stm32::gpio::{Level, Output, Speed};
use drogue_device::traits::led::Led as TraitLed;
use embassy_stm32::peripherals::{PA4};
use drogue_device::drivers::led::{ActiveHigh, Led};
use panic_halt as _;
pub type PINPA4 = Output<'static, PA4>;
pub type LEDPA4 = Led<PINPA4, ActiveHigh>;
#[embassy::main]
async fn main(_spawner: Spawner, p: Peripherals) -> ! {
let mut led: LEDPA4 = Led::new(Output::new(p.PA4, Level::High, Speed::Low));
led.on().unwrap();
loop {
}
}