Remove HAL initialization from #[embassy::main] macro.

This commit is contained in:
Dario Nieuwenhuis
2022-08-17 18:49:55 +02:00
parent d881f3ad91
commit fc6e1e06b3
182 changed files with 454 additions and 423 deletions

View File

@ -6,7 +6,7 @@ use defmt::*;
use embassy_executor::executor::Spawner;
use embassy_stm32::rcc::{ClockSrc, PLLClkDiv, PLLMul, PLLSource, PLLSrcDiv};
use embassy_stm32::rng::Rng;
use embassy_stm32::{Config, Peripherals};
use embassy_stm32::Config;
use {defmt_rtt as _, panic_probe as _};
fn config() -> Config {
@ -22,8 +22,9 @@ fn config() -> Config {
config
}
#[embassy_executor::main(config = "config()")]
async fn main(_spawner: Spawner, p: Peripherals) {
#[embassy_executor::main]
async fn main(_spawner: Spawner) {
let p = embassy_stm32::init(config());
info!("Hello World!");
let mut rng = Rng::new(p.RNG);