aboutsummaryrefslogtreecommitdiff
path: root/examples/boot/application/stm32h7/src/bin/b.rs
blob: 5f3f352079049492af2835f962daf488d0e7dbd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#![no_std]
#![no_main]

#[cfg(feature = "defmt-rtt")]
use defmt_rtt::*;
use embassy_executor::Spawner;
use embassy_stm32::gpio::{Level, Output, Speed};
use embassy_time::Timer;
use panic_reset as _;

#[embassy_executor::main]
async fn main(_spawner: Spawner) {
    let p = embassy_stm32::init(Default::default());
    Timer::after_millis(300).await;
    let mut led = Output::new(p.PB14, Level::High, Speed::Low);
    led.set_high();

    loop {
        led.set_high();
        Timer::after_millis(500).await;

        led.set_low();
        Timer::after_millis(500).await;
    }
}