stm32: consolidate crates

This commit is contained in:
xoviat 2021-03-30 10:05:52 -05:00
parent 7094c4e619
commit 009e1896bf
23 changed files with 111 additions and 485 deletions

View File

@ -46,22 +46,22 @@ jobs:
- package: embassy-nrf
target: thumbv7em-none-eabi
features: 52840,defmt
- package: embassy-stm32f4-examples
- package: embassy-stm32-examples
target: thumbv7em-none-eabi
features: stm32f405
- package: embassy-stm32f4
- package: embassy-stm32
target: thumbv7em-none-eabi
features: stm32f405
- package: embassy-stm32f4
- package: embassy-stm32
target: thumbv7em-none-eabi
features: stm32f446
- package: embassy-stm32f4
- package: embassy-stm32
target: thumbv7em-none-eabi
features: stm32f405,defmt
- package: embassy-stm32l0
- package: embassy-stm32
target: thumbv6m-none-eabi
features: stm32l0x2
- package: embassy-stm32l0
- package: embassy-stm32
target: thumbv6m-none-eabi
features: stm32l0x2,defmt
- package: embassy-rp-examples

View File

@ -0,0 +1,54 @@
[package]
authors = ["Dario Nieuwenhuis <dirbaio@dirbaio.net>"]
edition = "2018"
name = "embassy-stm32f4-examples"
version = "0.1.0"
[features]
default = [
"defmt-default",
]
defmt-default = []
defmt-trace = []
defmt-debug = []
defmt-info = []
defmt-warn = []
defmt-error = []
stm32f401 = ["stm32f4xx-hal/stm32f401", "embassy-stm32/stm32f401"]
stm32f405 = ["stm32f4xx-hal/stm32f405", "embassy-stm32/stm32f405"]
stm32f407 = ["stm32f4xx-hal/stm32f407", "embassy-stm32/stm32f407"]
stm32f410 = ["stm32f4xx-hal/stm32f410", "embassy-stm32/stm32f410"]
stm32f411 = ["stm32f4xx-hal/stm32f411", "embassy-stm32/stm32f411"]
stm32f412 = ["stm32f4xx-hal/stm32f412", "embassy-stm32/stm32f412"]
stm32f413 = ["stm32f4xx-hal/stm32f413", "embassy-stm32/stm32f413"]
stm32f415 = ["stm32f4xx-hal/stm32f405", "embassy-stm32/stm32f405"]
stm32f417 = ["stm32f4xx-hal/stm32f407", "embassy-stm32/stm32f407"]
stm32f423 = ["stm32f4xx-hal/stm32f413", "embassy-stm32/stm32f413"]
stm32f427 = ["stm32f4xx-hal/stm32f427", "embassy-stm32/stm32f427"]
stm32f429 = ["stm32f4xx-hal/stm32f429", "embassy-stm32/stm32f429"]
stm32f437 = ["stm32f4xx-hal/stm32f427", "embassy-stm32/stm32f427"]
stm32f439 = ["stm32f4xx-hal/stm32f429", "embassy-stm32/stm32f429"]
stm32f446 = ["stm32f4xx-hal/stm32f446", "embassy-stm32/stm32f446"]
stm32f469 = ["stm32f4xx-hal/stm32f469", "embassy-stm32/stm32f469"]
stm32f479 = ["stm32f4xx-hal/stm32f469", "embassy-stm32/stm32f469"]
[dependencies]
embassy = { version = "0.1.0", path = "../embassy", features = ["defmt", "defmt-trace"] }
embassy-traits = { version = "0.1.0", path = "../embassy-traits", features = ["defmt"] }
embassy-stm32 = { version = "0.1.0", path = "../embassy-stm32" }
embassy-extras = {version = "0.1.0", path = "../embassy-extras" }
defmt = "0.2.0"
defmt-rtt = "0.2.0"
cortex-m = "0.7.1"
cortex-m-rt = "0.6.13"
embedded-hal = { version = "0.2.4" }
panic-probe = "0.1.0"
stm32f4xx-hal = { version = "0.8.3", features = ["rt", "usb_fs"], git = "https://github.com/stm32-rs/stm32f4xx-hal.git"}
futures = { version = "0.3.8", default-features = false, features = ["async-await"] }
rtt-target = { version = "0.3", features = ["cortex-m"] }
bxcan = "0.5.0"
usb-device = "0.2.7"

View File

@ -13,7 +13,7 @@ use bxcan::filter::Mask32;
use cortex_m_rt::entry;
use embassy::executor::Executor;
use embassy::util::Forever;
use embassy_stm32f4::{can, interrupt};
use embassy_stm32::{can, interrupt};
use stm32f4xx_hal::prelude::*;
use stm32f4xx_hal::{can::Can, stm32};

View File

@ -13,8 +13,8 @@ use cortex_m_rt::entry;
use embassy::executor::Executor;
use embassy::traits::gpio::*;
use embassy::util::Forever;
use embassy_stm32f4::exti::ExtiPin;
use embassy_stm32f4::interrupt;
use embassy_stm32::exti::ExtiPin;
use embassy_stm32::interrupt;
use futures::pin_mut;
use stm32f4xx_hal::prelude::*;
use stm32f4xx_hal::stm32;

View File

@ -12,8 +12,8 @@ use defmt::panic;
use embassy;
use embassy::executor::Spawner;
use embassy::time::{Duration, Timer};
use embassy_stm32f4;
use embassy_stm32f4::hal;
use embassy_stm32;
use embassy_stm32::hal;
#[embassy::task]
async fn run1() {

View File

@ -14,8 +14,8 @@ use cortex_m_rt::entry;
use embassy::executor::{Executor, Spawner};
use embassy::traits::uart::{Read, Write};
use embassy::util::Forever;
use embassy_stm32f4::interrupt;
use embassy_stm32f4::serial;
use embassy_stm32::interrupt;
use embassy_stm32::serial;
use futures::pin_mut;
use stm32f4xx_hal::dma::StreamsTuple;
use stm32f4xx_hal::prelude::*;

View File

@ -17,7 +17,7 @@ use embassy::time::{Duration, Timer};
use embassy::util::Forever;
use embassy_extras::usb::usb_serial::UsbSerial;
use embassy_extras::usb::Usb;
use embassy_stm32f4::{interrupt, pac, rtc};
use embassy_stm32::{interrupt, pac, rtc};
use futures::future::{select, Either};
use futures::pin_mut;
use stm32f4xx_hal::otg_fs::{UsbBus, USB};

View File

@ -48,3 +48,4 @@ bxcan = "0.5.0"
nb = "*"
stm32f4xx-hal = { version = "0.8.3", features = ["rt", "can"], git = "https://github.com/stm32-rs/stm32f4xx-hal.git", optional = true }
stm32l0xx-hal = { version = "0.7.0", features = ["rt"], optional = true }
futures = { version = "0.3.5", default-features = false, features = ["async-await"] }

View File

@ -0,0 +1,2 @@
pub mod qei;
pub mod serial;

View File

@ -25,6 +25,25 @@
feature = "stm32f469",
feature = "stm32f479",
))]
mod f4;
#[cfg(any(
feature = "stm32f401",
feature = "stm32f405",
feature = "stm32f407",
feature = "stm32f412",
feature = "stm32f413",
feature = "stm32f415",
feature = "stm32f417",
feature = "stm32f423",
feature = "stm32f427",
feature = "stm32f429",
feature = "stm32f437",
feature = "stm32f439",
feature = "stm32f446",
feature = "stm32f469",
feature = "stm32f479",
))]
pub use {stm32f4xx_hal as hal, stm32f4xx_hal::stm32 as pac};
#[cfg(any(feature = "stm32l0x1", feature = "stm32l0x2", feature = "stm32l0x3",))]
@ -58,8 +77,6 @@ pub mod can;
feature = "stm32f401",
feature = "stm32f405",
feature = "stm32f407",
feature = "stm32f410",
feature = "stm32f411",
feature = "stm32f412",
feature = "stm32f413",
feature = "stm32f415",
@ -75,6 +92,25 @@ pub mod can;
))]
pub mod rtc;
#[cfg(any(
feature = "stm32f401",
feature = "stm32f405",
feature = "stm32f407",
feature = "stm32f412",
feature = "stm32f413",
feature = "stm32f415",
feature = "stm32f417",
feature = "stm32f423",
feature = "stm32f427",
feature = "stm32f429",
feature = "stm32f437",
feature = "stm32f439",
feature = "stm32f446",
feature = "stm32f469",
feature = "stm32f479",
))]
pub use f4::{qei, serial};
#[cfg(any(
feature = "stm32f401",
feature = "stm32f405",

View File

@ -1,55 +0,0 @@
[package]
authors = ["Dario Nieuwenhuis <dirbaio@dirbaio.net>"]
edition = "2018"
name = "embassy-stm32f4-examples"
version = "0.1.0"
[features]
default = [
"defmt-default",
]
defmt-default = []
defmt-trace = []
defmt-debug = []
defmt-info = []
defmt-warn = []
defmt-error = []
stm32f401 = ["stm32f4xx-hal/stm32f401", "embassy-stm32f4/stm32f401"]
stm32f405 = ["stm32f4xx-hal/stm32f405", "embassy-stm32f4/stm32f405"]
stm32f407 = ["stm32f4xx-hal/stm32f407", "embassy-stm32f4/stm32f407"]
stm32f410 = ["stm32f4xx-hal/stm32f410", "embassy-stm32f4/stm32f410"]
stm32f411 = ["stm32f4xx-hal/stm32f411", "embassy-stm32f4/stm32f411"]
stm32f412 = ["stm32f4xx-hal/stm32f412", "embassy-stm32f4/stm32f412"]
stm32f413 = ["stm32f4xx-hal/stm32f413", "embassy-stm32f4/stm32f413"]
stm32f415 = ["stm32f4xx-hal/stm32f405", "embassy-stm32f4/stm32f405"]
stm32f417 = ["stm32f4xx-hal/stm32f407", "embassy-stm32f4/stm32f407"]
stm32f423 = ["stm32f4xx-hal/stm32f413", "embassy-stm32f4/stm32f413"]
stm32f427 = ["stm32f4xx-hal/stm32f427", "embassy-stm32f4/stm32f427"]
stm32f429 = ["stm32f4xx-hal/stm32f429", "embassy-stm32f4/stm32f429"]
stm32f437 = ["stm32f4xx-hal/stm32f427", "embassy-stm32f4/stm32f427"]
stm32f439 = ["stm32f4xx-hal/stm32f429", "embassy-stm32f4/stm32f429"]
stm32f446 = ["stm32f4xx-hal/stm32f446", "embassy-stm32f4/stm32f446"]
stm32f469 = ["stm32f4xx-hal/stm32f469", "embassy-stm32f4/stm32f469"]
stm32f479 = ["stm32f4xx-hal/stm32f469", "embassy-stm32f4/stm32f469"]
[dependencies]
embassy = { version = "0.1.0", path = "../embassy", features = ["defmt", "defmt-trace"] }
embassy-traits = { version = "0.1.0", path = "../embassy-traits", features = ["defmt"] }
embassy-stm32f4 = { version = "*", path = "../embassy-stm32f4" }
embassy-stm32 = { version = "*", path = "../embassy-stm32" }
embassy-extras = {version = "0.1.0", path = "../embassy-extras" }
defmt = "0.2.0"
defmt-rtt = "0.2.0"
cortex-m = "0.7.1"
cortex-m-rt = "0.6.13"
embedded-hal = { version = "0.2.4" }
panic-probe = "0.1.0"
stm32f4xx-hal = { version = "0.8.3", features = ["rt", "usb_fs"], git = "https://github.com/stm32-rs/stm32f4xx-hal.git"}
futures = { version = "0.3.8", default-features = false, features = ["async-await"] }
rtt-target = { version = "0.3", features = ["cortex-m"] }
bxcan = "0.5.0"
usb-device = "0.2.7"

View File

@ -1,45 +0,0 @@
[package]
name = "embassy-stm32f4"
version = "0.1.0"
authors = ["Dario Nieuwenhuis <dirbaio@dirbaio.net>"]
edition = "2018"
[features]
defmt-trace = [ ]
defmt-debug = [ ]
defmt-info = [ ]
defmt-warn = [ ]
defmt-error = [ ]
stm32f401 = ["stm32f4xx-hal/stm32f401", "embassy-stm32/stm32f401"]
stm32f405 = ["stm32f4xx-hal/stm32f405", "embassy-stm32/stm32f405"]
stm32f407 = ["stm32f4xx-hal/stm32f407", "embassy-stm32/stm32f407"]
stm32f410 = ["stm32f4xx-hal/stm32f410", "embassy-stm32/stm32f410"]
stm32f411 = ["stm32f4xx-hal/stm32f411", "embassy-stm32/stm32f411"]
stm32f412 = ["stm32f4xx-hal/stm32f412", "embassy-stm32/stm32f412"]
stm32f413 = ["stm32f4xx-hal/stm32f413", "embassy-stm32/stm32f413"]
stm32f415 = ["stm32f4xx-hal/stm32f405", "embassy-stm32/stm32f415"]
stm32f417 = ["stm32f4xx-hal/stm32f407", "embassy-stm32/stm32f417"]
stm32f423 = ["stm32f4xx-hal/stm32f413", "embassy-stm32/stm32f423"]
stm32f427 = ["stm32f4xx-hal/stm32f427", "embassy-stm32/stm32f427"]
stm32f429 = ["stm32f4xx-hal/stm32f429", "embassy-stm32/stm32f429"]
stm32f437 = ["stm32f4xx-hal/stm32f427", "embassy-stm32/stm32f437"]
stm32f439 = ["stm32f4xx-hal/stm32f429", "embassy-stm32/stm32f439"]
stm32f446 = ["stm32f4xx-hal/stm32f446", "embassy-stm32/stm32f446"]
stm32f469 = ["stm32f4xx-hal/stm32f469", "embassy-stm32/stm32f469"]
stm32f479 = ["stm32f4xx-hal/stm32f469", "embassy-stm32/stm32f479"]
[dependencies]
embassy = { version = "0.1.0", path = "../embassy" }
embassy-stm32 = { version = "0.1.0", path = "../embassy-stm32" }
defmt = { version = "0.2.0", optional = true }
log = { version = "0.4.11", optional = true }
cortex-m-rt = "0.6.13"
cortex-m = "0.7.1"
futures = { version = "0.3.5", default-features = false, features = ["async-await"] }
embedded-hal = { version = "0.2.4" }
embedded-dma = { version = "0.1.2" }
stm32f4xx-hal = { version = "0.8.3", features = ["rt", "can"], git = "https://github.com/stm32-rs/stm32f4xx-hal.git"}
bxcan = "0.5.0"
nb = "*"

View File

@ -1,317 +0,0 @@
#![no_std]
#![feature(generic_associated_types)]
#![feature(asm)]
#![feature(min_type_alias_impl_trait)]
#![feature(impl_trait_in_bindings)]
#![feature(type_alias_impl_trait)]
#![allow(incomplete_features)]
#[cfg(not(any(
feature = "stm32f401",
feature = "stm32f405",
feature = "stm32f407",
feature = "stm32f410",
feature = "stm32f411",
feature = "stm32f412",
feature = "stm32f413",
feature = "stm32f415",
feature = "stm32f417",
feature = "stm32f423",
feature = "stm32f427",
feature = "stm32f429",
feature = "stm32f437",
feature = "stm32f439",
feature = "stm32f446",
feature = "stm32f469",
feature = "stm32f479",
)))]
compile_error!(
"No chip feature activated. You must activate exactly one of the following features: "
);
#[cfg(any(
all(feature = "stm32f401", feature = "stm32f405"),
all(feature = "stm32f401", feature = "stm32f407"),
all(feature = "stm32f401", feature = "stm32f410"),
all(feature = "stm32f401", feature = "stm32f411"),
all(feature = "stm32f401", feature = "stm32f412"),
all(feature = "stm32f401", feature = "stm32f413"),
all(feature = "stm32f401", feature = "stm32f415"),
all(feature = "stm32f401", feature = "stm32f417"),
all(feature = "stm32f401", feature = "stm32f423"),
all(feature = "stm32f401", feature = "stm32f427"),
all(feature = "stm32f401", feature = "stm32f429"),
all(feature = "stm32f401", feature = "stm32f437"),
all(feature = "stm32f401", feature = "stm32f439"),
all(feature = "stm32f401", feature = "stm32f446"),
all(feature = "stm32f401", feature = "stm32f469"),
all(feature = "stm32f401", feature = "stm32f479"),
all(feature = "stm32f405", feature = "stm32f401"),
all(feature = "stm32f405", feature = "stm32f407"),
all(feature = "stm32f405", feature = "stm32f410"),
all(feature = "stm32f405", feature = "stm32f411"),
all(feature = "stm32f405", feature = "stm32f412"),
all(feature = "stm32f405", feature = "stm32f413"),
all(feature = "stm32f405", feature = "stm32f415"),
all(feature = "stm32f405", feature = "stm32f417"),
all(feature = "stm32f405", feature = "stm32f423"),
all(feature = "stm32f405", feature = "stm32f427"),
all(feature = "stm32f405", feature = "stm32f429"),
all(feature = "stm32f405", feature = "stm32f437"),
all(feature = "stm32f405", feature = "stm32f439"),
all(feature = "stm32f405", feature = "stm32f446"),
all(feature = "stm32f405", feature = "stm32f469"),
all(feature = "stm32f405", feature = "stm32f479"),
all(feature = "stm32f407", feature = "stm32f401"),
all(feature = "stm32f407", feature = "stm32f405"),
all(feature = "stm32f407", feature = "stm32f410"),
all(feature = "stm32f407", feature = "stm32f411"),
all(feature = "stm32f407", feature = "stm32f412"),
all(feature = "stm32f407", feature = "stm32f413"),
all(feature = "stm32f407", feature = "stm32f415"),
all(feature = "stm32f407", feature = "stm32f417"),
all(feature = "stm32f407", feature = "stm32f423"),
all(feature = "stm32f407", feature = "stm32f427"),
all(feature = "stm32f407", feature = "stm32f429"),
all(feature = "stm32f407", feature = "stm32f437"),
all(feature = "stm32f407", feature = "stm32f439"),
all(feature = "stm32f407", feature = "stm32f446"),
all(feature = "stm32f407", feature = "stm32f469"),
all(feature = "stm32f407", feature = "stm32f479"),
all(feature = "stm32f410", feature = "stm32f401"),
all(feature = "stm32f410", feature = "stm32f405"),
all(feature = "stm32f410", feature = "stm32f407"),
all(feature = "stm32f410", feature = "stm32f411"),
all(feature = "stm32f410", feature = "stm32f412"),
all(feature = "stm32f410", feature = "stm32f413"),
all(feature = "stm32f410", feature = "stm32f415"),
all(feature = "stm32f410", feature = "stm32f417"),
all(feature = "stm32f410", feature = "stm32f423"),
all(feature = "stm32f410", feature = "stm32f427"),
all(feature = "stm32f410", feature = "stm32f429"),
all(feature = "stm32f410", feature = "stm32f437"),
all(feature = "stm32f410", feature = "stm32f439"),
all(feature = "stm32f410", feature = "stm32f446"),
all(feature = "stm32f410", feature = "stm32f469"),
all(feature = "stm32f410", feature = "stm32f479"),
all(feature = "stm32f411", feature = "stm32f401"),
all(feature = "stm32f411", feature = "stm32f405"),
all(feature = "stm32f411", feature = "stm32f407"),
all(feature = "stm32f411", feature = "stm32f410"),
all(feature = "stm32f411", feature = "stm32f412"),
all(feature = "stm32f411", feature = "stm32f413"),
all(feature = "stm32f411", feature = "stm32f415"),
all(feature = "stm32f411", feature = "stm32f417"),
all(feature = "stm32f411", feature = "stm32f423"),
all(feature = "stm32f411", feature = "stm32f427"),
all(feature = "stm32f411", feature = "stm32f429"),
all(feature = "stm32f411", feature = "stm32f437"),
all(feature = "stm32f411", feature = "stm32f439"),
all(feature = "stm32f411", feature = "stm32f446"),
all(feature = "stm32f411", feature = "stm32f469"),
all(feature = "stm32f411", feature = "stm32f479"),
all(feature = "stm32f412", feature = "stm32f401"),
all(feature = "stm32f412", feature = "stm32f405"),
all(feature = "stm32f412", feature = "stm32f407"),
all(feature = "stm32f412", feature = "stm32f410"),
all(feature = "stm32f412", feature = "stm32f411"),
all(feature = "stm32f412", feature = "stm32f413"),
all(feature = "stm32f412", feature = "stm32f415"),
all(feature = "stm32f412", feature = "stm32f417"),
all(feature = "stm32f412", feature = "stm32f423"),
all(feature = "stm32f412", feature = "stm32f427"),
all(feature = "stm32f412", feature = "stm32f429"),
all(feature = "stm32f412", feature = "stm32f437"),
all(feature = "stm32f412", feature = "stm32f439"),
all(feature = "stm32f412", feature = "stm32f446"),
all(feature = "stm32f412", feature = "stm32f469"),
all(feature = "stm32f412", feature = "stm32f479"),
all(feature = "stm32f413", feature = "stm32f401"),
all(feature = "stm32f413", feature = "stm32f405"),
all(feature = "stm32f413", feature = "stm32f407"),
all(feature = "stm32f413", feature = "stm32f410"),
all(feature = "stm32f413", feature = "stm32f411"),
all(feature = "stm32f413", feature = "stm32f412"),
all(feature = "stm32f413", feature = "stm32f415"),
all(feature = "stm32f413", feature = "stm32f417"),
all(feature = "stm32f413", feature = "stm32f423"),
all(feature = "stm32f413", feature = "stm32f427"),
all(feature = "stm32f413", feature = "stm32f429"),
all(feature = "stm32f413", feature = "stm32f437"),
all(feature = "stm32f413", feature = "stm32f439"),
all(feature = "stm32f413", feature = "stm32f446"),
all(feature = "stm32f413", feature = "stm32f469"),
all(feature = "stm32f413", feature = "stm32f479"),
all(feature = "stm32f415", feature = "stm32f401"),
all(feature = "stm32f415", feature = "stm32f405"),
all(feature = "stm32f415", feature = "stm32f407"),
all(feature = "stm32f415", feature = "stm32f410"),
all(feature = "stm32f415", feature = "stm32f411"),
all(feature = "stm32f415", feature = "stm32f412"),
all(feature = "stm32f415", feature = "stm32f413"),
all(feature = "stm32f415", feature = "stm32f417"),
all(feature = "stm32f415", feature = "stm32f423"),
all(feature = "stm32f415", feature = "stm32f427"),
all(feature = "stm32f415", feature = "stm32f429"),
all(feature = "stm32f415", feature = "stm32f437"),
all(feature = "stm32f415", feature = "stm32f439"),
all(feature = "stm32f415", feature = "stm32f446"),
all(feature = "stm32f415", feature = "stm32f469"),
all(feature = "stm32f415", feature = "stm32f479"),
all(feature = "stm32f417", feature = "stm32f401"),
all(feature = "stm32f417", feature = "stm32f405"),
all(feature = "stm32f417", feature = "stm32f407"),
all(feature = "stm32f417", feature = "stm32f410"),
all(feature = "stm32f417", feature = "stm32f411"),
all(feature = "stm32f417", feature = "stm32f412"),
all(feature = "stm32f417", feature = "stm32f413"),
all(feature = "stm32f417", feature = "stm32f415"),
all(feature = "stm32f417", feature = "stm32f423"),
all(feature = "stm32f417", feature = "stm32f427"),
all(feature = "stm32f417", feature = "stm32f429"),
all(feature = "stm32f417", feature = "stm32f437"),
all(feature = "stm32f417", feature = "stm32f439"),
all(feature = "stm32f417", feature = "stm32f446"),
all(feature = "stm32f417", feature = "stm32f469"),
all(feature = "stm32f417", feature = "stm32f479"),
all(feature = "stm32f423", feature = "stm32f401"),
all(feature = "stm32f423", feature = "stm32f405"),
all(feature = "stm32f423", feature = "stm32f407"),
all(feature = "stm32f423", feature = "stm32f410"),
all(feature = "stm32f423", feature = "stm32f411"),
all(feature = "stm32f423", feature = "stm32f412"),
all(feature = "stm32f423", feature = "stm32f413"),
all(feature = "stm32f423", feature = "stm32f415"),
all(feature = "stm32f423", feature = "stm32f417"),
all(feature = "stm32f423", feature = "stm32f427"),
all(feature = "stm32f423", feature = "stm32f429"),
all(feature = "stm32f423", feature = "stm32f437"),
all(feature = "stm32f423", feature = "stm32f439"),
all(feature = "stm32f423", feature = "stm32f446"),
all(feature = "stm32f423", feature = "stm32f469"),
all(feature = "stm32f423", feature = "stm32f479"),
all(feature = "stm32f427", feature = "stm32f401"),
all(feature = "stm32f427", feature = "stm32f405"),
all(feature = "stm32f427", feature = "stm32f407"),
all(feature = "stm32f427", feature = "stm32f410"),
all(feature = "stm32f427", feature = "stm32f411"),
all(feature = "stm32f427", feature = "stm32f412"),
all(feature = "stm32f427", feature = "stm32f413"),
all(feature = "stm32f427", feature = "stm32f415"),
all(feature = "stm32f427", feature = "stm32f417"),
all(feature = "stm32f427", feature = "stm32f423"),
all(feature = "stm32f427", feature = "stm32f429"),
all(feature = "stm32f427", feature = "stm32f437"),
all(feature = "stm32f427", feature = "stm32f439"),
all(feature = "stm32f427", feature = "stm32f446"),
all(feature = "stm32f427", feature = "stm32f469"),
all(feature = "stm32f427", feature = "stm32f479"),
all(feature = "stm32f429", feature = "stm32f401"),
all(feature = "stm32f429", feature = "stm32f405"),
all(feature = "stm32f429", feature = "stm32f407"),
all(feature = "stm32f429", feature = "stm32f410"),
all(feature = "stm32f429", feature = "stm32f411"),
all(feature = "stm32f429", feature = "stm32f412"),
all(feature = "stm32f429", feature = "stm32f413"),
all(feature = "stm32f429", feature = "stm32f415"),
all(feature = "stm32f429", feature = "stm32f417"),
all(feature = "stm32f429", feature = "stm32f423"),
all(feature = "stm32f429", feature = "stm32f427"),
all(feature = "stm32f429", feature = "stm32f437"),
all(feature = "stm32f429", feature = "stm32f439"),
all(feature = "stm32f429", feature = "stm32f446"),
all(feature = "stm32f429", feature = "stm32f469"),
all(feature = "stm32f429", feature = "stm32f479"),
all(feature = "stm32f437", feature = "stm32f401"),
all(feature = "stm32f437", feature = "stm32f405"),
all(feature = "stm32f437", feature = "stm32f407"),
all(feature = "stm32f437", feature = "stm32f410"),
all(feature = "stm32f437", feature = "stm32f411"),
all(feature = "stm32f437", feature = "stm32f412"),
all(feature = "stm32f437", feature = "stm32f413"),
all(feature = "stm32f437", feature = "stm32f415"),
all(feature = "stm32f437", feature = "stm32f417"),
all(feature = "stm32f437", feature = "stm32f423"),
all(feature = "stm32f437", feature = "stm32f427"),
all(feature = "stm32f437", feature = "stm32f429"),
all(feature = "stm32f437", feature = "stm32f439"),
all(feature = "stm32f437", feature = "stm32f446"),
all(feature = "stm32f437", feature = "stm32f469"),
all(feature = "stm32f437", feature = "stm32f479"),
all(feature = "stm32f439", feature = "stm32f401"),
all(feature = "stm32f439", feature = "stm32f405"),
all(feature = "stm32f439", feature = "stm32f407"),
all(feature = "stm32f439", feature = "stm32f410"),
all(feature = "stm32f439", feature = "stm32f411"),
all(feature = "stm32f439", feature = "stm32f412"),
all(feature = "stm32f439", feature = "stm32f413"),
all(feature = "stm32f439", feature = "stm32f415"),
all(feature = "stm32f439", feature = "stm32f417"),
all(feature = "stm32f439", feature = "stm32f423"),
all(feature = "stm32f439", feature = "stm32f427"),
all(feature = "stm32f439", feature = "stm32f429"),
all(feature = "stm32f439", feature = "stm32f437"),
all(feature = "stm32f439", feature = "stm32f446"),
all(feature = "stm32f439", feature = "stm32f469"),
all(feature = "stm32f439", feature = "stm32f479"),
all(feature = "stm32f446", feature = "stm32f401"),
all(feature = "stm32f446", feature = "stm32f405"),
all(feature = "stm32f446", feature = "stm32f407"),
all(feature = "stm32f446", feature = "stm32f410"),
all(feature = "stm32f446", feature = "stm32f411"),
all(feature = "stm32f446", feature = "stm32f412"),
all(feature = "stm32f446", feature = "stm32f413"),
all(feature = "stm32f446", feature = "stm32f415"),
all(feature = "stm32f446", feature = "stm32f417"),
all(feature = "stm32f446", feature = "stm32f423"),
all(feature = "stm32f446", feature = "stm32f427"),
all(feature = "stm32f446", feature = "stm32f429"),
all(feature = "stm32f446", feature = "stm32f437"),
all(feature = "stm32f446", feature = "stm32f439"),
all(feature = "stm32f446", feature = "stm32f469"),
all(feature = "stm32f446", feature = "stm32f479"),
all(feature = "stm32f469", feature = "stm32f401"),
all(feature = "stm32f469", feature = "stm32f405"),
all(feature = "stm32f469", feature = "stm32f407"),
all(feature = "stm32f469", feature = "stm32f410"),
all(feature = "stm32f469", feature = "stm32f411"),
all(feature = "stm32f469", feature = "stm32f412"),
all(feature = "stm32f469", feature = "stm32f413"),
all(feature = "stm32f469", feature = "stm32f415"),
all(feature = "stm32f469", feature = "stm32f417"),
all(feature = "stm32f469", feature = "stm32f423"),
all(feature = "stm32f469", feature = "stm32f427"),
all(feature = "stm32f469", feature = "stm32f429"),
all(feature = "stm32f469", feature = "stm32f437"),
all(feature = "stm32f469", feature = "stm32f439"),
all(feature = "stm32f469", feature = "stm32f446"),
all(feature = "stm32f469", feature = "stm32f479"),
all(feature = "stm32f479", feature = "stm32f401"),
all(feature = "stm32f479", feature = "stm32f405"),
all(feature = "stm32f479", feature = "stm32f407"),
all(feature = "stm32f479", feature = "stm32f410"),
all(feature = "stm32f479", feature = "stm32f411"),
all(feature = "stm32f479", feature = "stm32f412"),
all(feature = "stm32f479", feature = "stm32f413"),
all(feature = "stm32f479", feature = "stm32f415"),
all(feature = "stm32f479", feature = "stm32f417"),
all(feature = "stm32f479", feature = "stm32f423"),
all(feature = "stm32f479", feature = "stm32f427"),
all(feature = "stm32f479", feature = "stm32f429"),
all(feature = "stm32f479", feature = "stm32f437"),
all(feature = "stm32f479", feature = "stm32f439"),
all(feature = "stm32f479", feature = "stm32f446"),
all(feature = "stm32f479", feature = "stm32f469"),
))]
compile_error!(
"Multile chip features activated. You must activate exactly one of the following features: "
);
pub use embassy_stm32::{exti, fmt, hal, interrupt, pac, rtc};
#[cfg(not(any(feature = "stm32f401", feature = "stm32f410", feature = "stm32f411",)))]
pub use embassy_stm32::can;
#[cfg(not(feature = "stm32f410"))]
pub mod qei;
pub mod serial;

View File

@ -1,28 +0,0 @@
[package]
name = "embassy-stm32l0"
version = "0.1.0"
authors = ["Michael Beaumont <mjboamail@gmail.com>"]
edition = "2018"
[features]
defmt-trace = [ ]
defmt-debug = [ ]
defmt-info = [ ]
defmt-warn = [ ]
defmt-error = [ ]
stm32l0x1 = ["stm32l0xx-hal/stm32l0x1", "embassy-stm32/stm32l0x1"]
stm32l0x2 = ["stm32l0xx-hal/stm32l0x2", "embassy-stm32/stm32l0x2"]
stm32l0x3 = ["stm32l0xx-hal/stm32l0x3", "embassy-stm32/stm32l0x3"]
[dependencies]
embassy = { version = "0.1.0", path = "../embassy" }
embassy-stm32 = { version = "0.1.0", path = "../embassy-stm32" }
defmt = { version = "0.2.0", optional = true }
futures = { version = "0.3.5", default-features = false, features = [ "cfg-target-has-atomic", "unstable" ] }
log = { version = "0.4.11", optional = true }
cortex-m-rt = "0.6.13"
cortex-m = "0.7.1"
embedded-hal = { version = "0.2.4" }
embedded-dma = { version = "0.1.2" }
stm32l0xx-hal = { version = "0.7.0", features = ["rt"], git = "https://github.com/stm32-rs/stm32l0xx-hal.git"}

View File

@ -1,22 +0,0 @@
#![no_std]
#![feature(generic_associated_types)]
#![feature(asm)]
#![feature(type_alias_impl_trait)]
#![feature(min_type_alias_impl_trait)]
#![allow(incomplete_features)]
#[cfg(not(any(feature = "stm32l0x1", feature = "stm32l0x2", feature = "stm32l0x3",)))]
compile_error!(
"No chip feature activated. You must activate exactly one of the following features: "
);
#[cfg(any(
all(feature = "stm32l0x1", feature = "stm32l0x2"),
all(feature = "stm32l0x1", feature = "stm32l0x3"),
all(feature = "stm32l0x2", feature = "stm32l0x3"),
))]
compile_error!(
"Multile chip features activated. You must activate exactly one of the following features: "
);
pub use embassy_stm32::{exti, fmt, hal, interrupt, pac};

View File

@ -121,7 +121,7 @@ unsafe impl cortex_m::interrupt::Nr for NrWrap {
/// use embassy::traits::*;
/// use embassy::util::InterruptFuture;
/// use embassy::executor::task;
/// use embassy_stm32f4::interrupt; // Adjust this to your MCU's embassy HAL.
/// use embassy_stm32::interrupt; // Adjust this to your MCU's embassy HAL.
/// #[embassy::task]
/// async fn demo_interrupt_future() {
/// // Using STM32f446 interrupt names, adjust this to your application as necessary.