Fixes and include simple example

This commit is contained in:
starship
2023-03-01 10:55:02 +03:00
parent e6126bcf3c
commit 1c6fa0e802
3 changed files with 27 additions and 6 deletions

View File

@ -15,5 +15,5 @@ panic-probe = "0.3"
embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] }
embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] }
embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "memory-x", "stm32f091rc", "time-driver-any", "exti"] }
embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "memory-x", "device-signature", "stm32f091rc", "time-driver-any", "exti"] }
static_cell = "1.0"

View File

@ -0,0 +1,21 @@
#![no_std]
#![no_main]
#![feature(type_alias_impl_trait)]
use cortex_m_rt::entry;
use defmt::*;
use embassy_stm32::device_signature::{device_id, device_id_hex, flash_size_kb};
use {defmt_rtt as _, panic_probe as _};
#[entry]
fn main() -> ! {
// Example to show how to read the unique id of the mcu
info!("Device ID: {:?}", device_id());
info!("Device Hex ID: {:?}", device_id_hex());
info!("Flash Size in KB = {:?}", flash_size_kb());
// Main is done, run this future that never finishes
loop {
let () = core::future::pending().await;
}
}