Split embassy crate into embassy-executor, embassy-util.

This commit is contained in:
Dario Nieuwenhuis
2022-07-29 21:58:35 +02:00
parent 8745d646f0
commit a0f1b0ee01
319 changed files with 1159 additions and 998 deletions

View File

@ -7,7 +7,7 @@ edition = "2021"
cortex-m = "0.7"
cortex-m-rt = "0.7"
embassy-stm32 = { version = "0.1.0", features = ["stm32l475vg", "memory-x", "exti"], default-features = false }
embassy = { version = "0.1.0", default-features = false, features = ["nightly"] }
embassy-executor = { version = "0.1.0", default-features = false, features = ["nightly"] }
defmt = "0.3.0"
defmt-rtt = "0.3.0"

View File

@ -2,13 +2,13 @@
#![no_main]
#![feature(type_alias_impl_trait)]
use embassy::executor::Spawner;
use embassy_executor::executor::Spawner;
use embassy_stm32::exti::ExtiInput;
use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed};
use embassy_stm32::Peripherals;
use {defmt_rtt as _, panic_probe as _};
#[embassy::main]
#[embassy_executor::main]
async fn main(_s: Spawner, p: Peripherals) {
let mut led = Output::new(p.PB14, Level::Low, Speed::VeryHigh);
let mut button = ExtiInput::new(Input::new(p.PC13, Pull::Up), p.EXTI13);