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

@ -4,7 +4,8 @@ name = "embassy-stm32wl-examples"
version = "0.1.0"
[dependencies]
embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-timestamp-uptime", "time-tick-32768hz"] }
embassy-util = { version = "0.1.0", path = "../../embassy-util", features = ["defmt"] }
embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "defmt-timestamp-uptime", "time-tick-32768hz"] }
embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32wl55jc-cm4", "time-driver-any", "memory-x", "subghz", "unstable-pac", "exti"] }
embassy-lora = { version = "0.1.0", path = "../../embassy-lora", features = ["stm32wl", "time", "defmt"] }

View File

@ -3,13 +3,13 @@
#![feature(type_alias_impl_trait)]
use defmt::*;
use embassy::executor::Spawner;
use embassy::time::{Duration, Timer};
use embassy_executor::executor::Spawner;
use embassy_executor::time::{Duration, Timer};
use embassy_stm32::gpio::{Level, Output, Speed};
use embassy_stm32::Peripherals;
use {defmt_rtt as _, panic_probe as _};
#[embassy::main]
#[embassy_executor::main]
async fn main(_spawner: Spawner, p: Peripherals) {
info!("Hello World!");

View File

@ -3,13 +3,13 @@
#![feature(type_alias_impl_trait)]
use defmt::*;
use embassy::executor::Spawner;
use embassy_executor::executor::Spawner;
use embassy_stm32::exti::ExtiInput;
use embassy_stm32::gpio::{Input, Pull};
use embassy_stm32::Peripherals;
use {defmt_rtt as _, panic_probe as _};
#[embassy::main]
#[embassy_executor::main]
async fn main(_spawner: Spawner, p: Peripherals) {
info!("Hello World!");

View File

@ -3,13 +3,13 @@
#![feature(type_alias_impl_trait)]
use defmt::{info, unwrap};
use embassy::executor::Spawner;
use embassy_executor::executor::Spawner;
use embassy_stm32::flash::Flash;
use embassy_stm32::Peripherals;
use embedded_storage::nor_flash::{NorFlash, ReadNorFlash};
use {defmt_rtt as _, panic_probe as _};
#[embassy::main]
#[embassy_executor::main]
async fn main(_spawner: Spawner, p: Peripherals) {
info!("Hello Flash!");

View File

@ -23,8 +23,8 @@ fn config() -> embassy_stm32::Config {
config
}
#[embassy::main(config = "config()")]
async fn main(_spawner: embassy::executor::Spawner, p: Peripherals) {
#[embassy_executor::main(config = "config()")]
async fn main(_spawner: embassy_executor::executor::Spawner, p: Peripherals) {
unsafe { pac::RCC.ccipr().modify(|w| w.set_rngsel(0b01)) }
let ctrl1 = Output::new(p.PC3.degrade(), Level::High, Speed::High);

View File

@ -6,13 +6,13 @@
#![feature(type_alias_impl_trait)]
use defmt::*;
use embassy::channel::signal::Signal;
use embassy_stm32::dma::NoDma;
use embassy_stm32::exti::ExtiInput;
use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed};
use embassy_stm32::interrupt::{Interrupt, InterruptExt};
use embassy_stm32::subghz::*;
use embassy_stm32::{interrupt, Peripherals};
use embassy_util::channel::signal::Signal;
use {defmt_rtt as _, panic_probe as _};
const PING_DATA: &str = "PING";
@ -57,8 +57,8 @@ fn config() -> embassy_stm32::Config {
config
}
#[embassy::main(config = "config()")]
async fn main(_spawner: embassy::executor::Spawner, p: Peripherals) {
#[embassy_executor::main(config = "config()")]
async fn main(_spawner: embassy_executor::executor::Spawner, p: Peripherals) {
let mut led1 = Output::new(p.PB15, Level::High, Speed::Low);
let mut led2 = Output::new(p.PB9, Level::Low, Speed::Low);
let mut led3 = Output::new(p.PB11, Level::Low, Speed::Low);