2023-07-02 04:47:44 +02:00
|
|
|
#![no_std]
|
|
|
|
#![no_main]
|
|
|
|
#![feature(type_alias_impl_trait)]
|
|
|
|
|
|
|
|
use defmt::*;
|
|
|
|
use embassy_executor::Spawner;
|
|
|
|
use embassy_stm32::gpio::{Level, Output, Speed};
|
2023-10-15 01:57:25 +02:00
|
|
|
use embassy_time::Timer;
|
2023-07-02 04:47:44 +02:00
|
|
|
use {defmt_rtt as _, panic_probe as _};
|
|
|
|
|
|
|
|
#[embassy_executor::main]
|
|
|
|
async fn main(_spawner: Spawner) {
|
|
|
|
info!("Hello World!");
|
|
|
|
|
|
|
|
let p = embassy_stm32::init(Default::default());
|
|
|
|
|
|
|
|
let mut out1 = Output::new(p.PA8, Level::Low, Speed::High);
|
|
|
|
|
|
|
|
out1.set_high();
|
2023-10-15 01:57:25 +02:00
|
|
|
Timer::after_millis(500).await;
|
2023-07-02 04:47:44 +02:00
|
|
|
out1.set_low();
|
|
|
|
|
2023-10-15 01:57:25 +02:00
|
|
|
Timer::after_millis(500).await;
|
2023-07-02 04:47:44 +02:00
|
|
|
info!("end program");
|
|
|
|
|
|
|
|
cortex_m::asm::bkpt();
|
|
|
|
}
|