init basic examples and setup

This commit is contained in:
2026-05-25 18:16:02 +02:00
commit 8028dfd5fc
28 changed files with 2150 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
#![deny(unsafe_code)]
#![no_std]
#![no_main]
use defmt::info;
use defmt_rtt as _;
use embassy_executor::Spawner;
use embassy_stm32::gpio::{Level, Output, Speed};
use embassy_time::Timer;
use panic_probe as _;
#[embassy_executor::main]
async fn main(_spawner: Spawner) {
let p = embassy_stm32::init(Default::default());
let mut led = Output::new(p.PC13, Level::High, Speed::Low);
info!("embassy-blinky: async blink on PC13");
loop {
led.set_low();
info!("led on");
Timer::after_millis(500).await;
led.set_high();
info!("led off");
Timer::after_millis(500).await;
}
}