aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxoviat <[email protected]>2021-03-30 10:05:52 -0500
committerxoviat <[email protected]>2021-03-30 10:05:52 -0500
commit009e1896bfe457e1b15156a2624284b385a53e27 (patch)
tree0f12f3d9322227815c9fab217e511c67040279bf
parent7094c4e619f7c5e4b4782bc5cbd14ac73ef9d4bf (diff)
stm32: consolidate crates
-rw-r--r--.github/workflows/rust.yml12
-rw-r--r--embassy-stm32-examples/.cargo/config (renamed from embassy-stm32f4-examples/.cargo/config)0
-rw-r--r--embassy-stm32-examples/Cargo.toml54
-rw-r--r--embassy-stm32-examples/build.rs (renamed from embassy-stm32f4-examples/build.rs)0
-rw-r--r--embassy-stm32-examples/memory.x (renamed from embassy-stm32f4-examples/memory.x)0
-rw-r--r--embassy-stm32-examples/src/bin/can.rs (renamed from embassy-stm32f4-examples/src/bin/can.rs)2
-rw-r--r--embassy-stm32-examples/src/bin/exti.rs (renamed from embassy-stm32f4-examples/src/bin/exti.rs)4
-rw-r--r--embassy-stm32-examples/src/bin/hello.rs (renamed from embassy-stm32f4-examples/src/bin/hello.rs)0
-rw-r--r--embassy-stm32-examples/src/bin/rtc_async.rs (renamed from embassy-stm32f4-examples/src/bin/rtc_async.rs)4
-rw-r--r--embassy-stm32-examples/src/bin/serial.rs (renamed from embassy-stm32f4-examples/src/bin/serial.rs)4
-rw-r--r--embassy-stm32-examples/src/bin/usb_serial.rs (renamed from embassy-stm32f4-examples/src/bin/usb_serial.rs)2
-rw-r--r--embassy-stm32-examples/src/example_common.rs (renamed from embassy-stm32f4-examples/src/example_common.rs)0
-rw-r--r--embassy-stm32/Cargo.toml3
-rw-r--r--embassy-stm32/src/f4/mod.rs2
-rw-r--r--embassy-stm32/src/f4/qei.rs (renamed from embassy-stm32f4/src/qei.rs)0
-rw-r--r--embassy-stm32/src/f4/serial.rs (renamed from embassy-stm32f4/src/serial.rs)0
-rw-r--r--embassy-stm32/src/lib.rs40
-rw-r--r--embassy-stm32f4-examples/Cargo.toml55
-rw-r--r--embassy-stm32f4/Cargo.toml45
-rw-r--r--embassy-stm32f4/src/lib.rs317
-rw-r--r--embassy-stm32l0/Cargo.toml28
-rw-r--r--embassy-stm32l0/src/lib.rs22
-rw-r--r--embassy/src/util/signal.rs2
23 files changed, 111 insertions, 485 deletions
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index 7b04a9947..d7b427e04 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -46,22 +46,22 @@ jobs:
46 - package: embassy-nrf 46 - package: embassy-nrf
47 target: thumbv7em-none-eabi 47 target: thumbv7em-none-eabi
48 features: 52840,defmt 48 features: 52840,defmt
49 - package: embassy-stm32f4-examples 49 - package: embassy-stm32-examples
50 target: thumbv7em-none-eabi 50 target: thumbv7em-none-eabi
51 features: stm32f405 51 features: stm32f405
52 - package: embassy-stm32f4 52 - package: embassy-stm32
53 target: thumbv7em-none-eabi 53 target: thumbv7em-none-eabi
54 features: stm32f405 54 features: stm32f405
55 - package: embassy-stm32f4 55 - package: embassy-stm32
56 target: thumbv7em-none-eabi 56 target: thumbv7em-none-eabi
57 features: stm32f446 57 features: stm32f446
58 - package: embassy-stm32f4 58 - package: embassy-stm32
59 target: thumbv7em-none-eabi 59 target: thumbv7em-none-eabi
60 features: stm32f405,defmt 60 features: stm32f405,defmt
61 - package: embassy-stm32l0 61 - package: embassy-stm32
62 target: thumbv6m-none-eabi 62 target: thumbv6m-none-eabi
63 features: stm32l0x2 63 features: stm32l0x2
64 - package: embassy-stm32l0 64 - package: embassy-stm32
65 target: thumbv6m-none-eabi 65 target: thumbv6m-none-eabi
66 features: stm32l0x2,defmt 66 features: stm32l0x2,defmt
67 - package: embassy-rp-examples 67 - package: embassy-rp-examples
diff --git a/embassy-stm32f4-examples/.cargo/config b/embassy-stm32-examples/.cargo/config
index 7c1d4dfb6..7c1d4dfb6 100644
--- a/embassy-stm32f4-examples/.cargo/config
+++ b/embassy-stm32-examples/.cargo/config
diff --git a/embassy-stm32-examples/Cargo.toml b/embassy-stm32-examples/Cargo.toml
new file mode 100644
index 000000000..52446db32
--- /dev/null
+++ b/embassy-stm32-examples/Cargo.toml
@@ -0,0 +1,54 @@
1[package]
2authors = ["Dario Nieuwenhuis <[email protected]>"]
3edition = "2018"
4name = "embassy-stm32f4-examples"
5version = "0.1.0"
6
7[features]
8default = [
9 "defmt-default",
10]
11defmt-default = []
12defmt-trace = []
13defmt-debug = []
14defmt-info = []
15defmt-warn = []
16defmt-error = []
17
18stm32f401 = ["stm32f4xx-hal/stm32f401", "embassy-stm32/stm32f401"]
19stm32f405 = ["stm32f4xx-hal/stm32f405", "embassy-stm32/stm32f405"]
20stm32f407 = ["stm32f4xx-hal/stm32f407", "embassy-stm32/stm32f407"]
21stm32f410 = ["stm32f4xx-hal/stm32f410", "embassy-stm32/stm32f410"]
22stm32f411 = ["stm32f4xx-hal/stm32f411", "embassy-stm32/stm32f411"]
23stm32f412 = ["stm32f4xx-hal/stm32f412", "embassy-stm32/stm32f412"]
24stm32f413 = ["stm32f4xx-hal/stm32f413", "embassy-stm32/stm32f413"]
25stm32f415 = ["stm32f4xx-hal/stm32f405", "embassy-stm32/stm32f405"]
26stm32f417 = ["stm32f4xx-hal/stm32f407", "embassy-stm32/stm32f407"]
27stm32f423 = ["stm32f4xx-hal/stm32f413", "embassy-stm32/stm32f413"]
28stm32f427 = ["stm32f4xx-hal/stm32f427", "embassy-stm32/stm32f427"]
29stm32f429 = ["stm32f4xx-hal/stm32f429", "embassy-stm32/stm32f429"]
30stm32f437 = ["stm32f4xx-hal/stm32f427", "embassy-stm32/stm32f427"]
31stm32f439 = ["stm32f4xx-hal/stm32f429", "embassy-stm32/stm32f429"]
32stm32f446 = ["stm32f4xx-hal/stm32f446", "embassy-stm32/stm32f446"]
33stm32f469 = ["stm32f4xx-hal/stm32f469", "embassy-stm32/stm32f469"]
34stm32f479 = ["stm32f4xx-hal/stm32f469", "embassy-stm32/stm32f469"]
35
36
37[dependencies]
38embassy = { version = "0.1.0", path = "../embassy", features = ["defmt", "defmt-trace"] }
39embassy-traits = { version = "0.1.0", path = "../embassy-traits", features = ["defmt"] }
40embassy-stm32 = { version = "0.1.0", path = "../embassy-stm32" }
41embassy-extras = {version = "0.1.0", path = "../embassy-extras" }
42
43defmt = "0.2.0"
44defmt-rtt = "0.2.0"
45
46cortex-m = "0.7.1"
47cortex-m-rt = "0.6.13"
48embedded-hal = { version = "0.2.4" }
49panic-probe = "0.1.0"
50stm32f4xx-hal = { version = "0.8.3", features = ["rt", "usb_fs"], git = "https://github.com/stm32-rs/stm32f4xx-hal.git"}
51futures = { version = "0.3.8", default-features = false, features = ["async-await"] }
52rtt-target = { version = "0.3", features = ["cortex-m"] }
53bxcan = "0.5.0"
54usb-device = "0.2.7"
diff --git a/embassy-stm32f4-examples/build.rs b/embassy-stm32-examples/build.rs
index d534cc3df..d534cc3df 100644
--- a/embassy-stm32f4-examples/build.rs
+++ b/embassy-stm32-examples/build.rs
diff --git a/embassy-stm32f4-examples/memory.x b/embassy-stm32-examples/memory.x
index efa700b8a..efa700b8a 100644
--- a/embassy-stm32f4-examples/memory.x
+++ b/embassy-stm32-examples/memory.x
diff --git a/embassy-stm32f4-examples/src/bin/can.rs b/embassy-stm32-examples/src/bin/can.rs
index c34c0a2a4..4923d399d 100644
--- a/embassy-stm32f4-examples/src/bin/can.rs
+++ b/embassy-stm32-examples/src/bin/can.rs
@@ -13,7 +13,7 @@ use bxcan::filter::Mask32;
13use cortex_m_rt::entry; 13use cortex_m_rt::entry;
14use embassy::executor::Executor; 14use embassy::executor::Executor;
15use embassy::util::Forever; 15use embassy::util::Forever;
16use embassy_stm32f4::{can, interrupt}; 16use embassy_stm32::{can, interrupt};
17use stm32f4xx_hal::prelude::*; 17use stm32f4xx_hal::prelude::*;
18use stm32f4xx_hal::{can::Can, stm32}; 18use stm32f4xx_hal::{can::Can, stm32};
19 19
diff --git a/embassy-stm32f4-examples/src/bin/exti.rs b/embassy-stm32-examples/src/bin/exti.rs
index 9879de408..6c08e6898 100644
--- a/embassy-stm32f4-examples/src/bin/exti.rs
+++ b/embassy-stm32-examples/src/bin/exti.rs
@@ -13,8 +13,8 @@ use cortex_m_rt::entry;
13use embassy::executor::Executor; 13use embassy::executor::Executor;
14use embassy::traits::gpio::*; 14use embassy::traits::gpio::*;
15use embassy::util::Forever; 15use embassy::util::Forever;
16use embassy_stm32f4::exti::ExtiPin; 16use embassy_stm32::exti::ExtiPin;
17use embassy_stm32f4::interrupt; 17use embassy_stm32::interrupt;
18use futures::pin_mut; 18use futures::pin_mut;
19use stm32f4xx_hal::prelude::*; 19use stm32f4xx_hal::prelude::*;
20use stm32f4xx_hal::stm32; 20use stm32f4xx_hal::stm32;
diff --git a/embassy-stm32f4-examples/src/bin/hello.rs b/embassy-stm32-examples/src/bin/hello.rs
index 8a6654146..8a6654146 100644
--- a/embassy-stm32f4-examples/src/bin/hello.rs
+++ b/embassy-stm32-examples/src/bin/hello.rs
diff --git a/embassy-stm32f4-examples/src/bin/rtc_async.rs b/embassy-stm32-examples/src/bin/rtc_async.rs
index f2757294d..ea54a2a94 100644
--- a/embassy-stm32f4-examples/src/bin/rtc_async.rs
+++ b/embassy-stm32-examples/src/bin/rtc_async.rs
@@ -12,8 +12,8 @@ use defmt::panic;
12use embassy; 12use embassy;
13use embassy::executor::Spawner; 13use embassy::executor::Spawner;
14use embassy::time::{Duration, Timer}; 14use embassy::time::{Duration, Timer};
15use embassy_stm32f4; 15use embassy_stm32;
16use embassy_stm32f4::hal; 16use embassy_stm32::hal;
17 17
18#[embassy::task] 18#[embassy::task]
19async fn run1() { 19async fn run1() {
diff --git a/embassy-stm32f4-examples/src/bin/serial.rs b/embassy-stm32-examples/src/bin/serial.rs
index 1717cadb9..c10f74a36 100644
--- a/embassy-stm32f4-examples/src/bin/serial.rs
+++ b/embassy-stm32-examples/src/bin/serial.rs
@@ -14,8 +14,8 @@ use cortex_m_rt::entry;
14use embassy::executor::{Executor, Spawner}; 14use embassy::executor::{Executor, Spawner};
15use embassy::traits::uart::{Read, Write}; 15use embassy::traits::uart::{Read, Write};
16use embassy::util::Forever; 16use embassy::util::Forever;
17use embassy_stm32f4::interrupt; 17use embassy_stm32::interrupt;
18use embassy_stm32f4::serial; 18use embassy_stm32::serial;
19use futures::pin_mut; 19use futures::pin_mut;
20use stm32f4xx_hal::dma::StreamsTuple; 20use stm32f4xx_hal::dma::StreamsTuple;
21use stm32f4xx_hal::prelude::*; 21use stm32f4xx_hal::prelude::*;
diff --git a/embassy-stm32f4-examples/src/bin/usb_serial.rs b/embassy-stm32-examples/src/bin/usb_serial.rs
index 669d187d4..7e95f1221 100644
--- a/embassy-stm32f4-examples/src/bin/usb_serial.rs
+++ b/embassy-stm32-examples/src/bin/usb_serial.rs
@@ -17,7 +17,7 @@ use embassy::time::{Duration, Timer};
17use embassy::util::Forever; 17use embassy::util::Forever;
18use embassy_extras::usb::usb_serial::UsbSerial; 18use embassy_extras::usb::usb_serial::UsbSerial;
19use embassy_extras::usb::Usb; 19use embassy_extras::usb::Usb;
20use embassy_stm32f4::{interrupt, pac, rtc}; 20use embassy_stm32::{interrupt, pac, rtc};
21use futures::future::{select, Either}; 21use futures::future::{select, Either};
22use futures::pin_mut; 22use futures::pin_mut;
23use stm32f4xx_hal::otg_fs::{UsbBus, USB}; 23use stm32f4xx_hal::otg_fs::{UsbBus, USB};
diff --git a/embassy-stm32f4-examples/src/example_common.rs b/embassy-stm32-examples/src/example_common.rs
index 54d633837..54d633837 100644
--- a/embassy-stm32f4-examples/src/example_common.rs
+++ b/embassy-stm32-examples/src/example_common.rs
diff --git a/embassy-stm32/Cargo.toml b/embassy-stm32/Cargo.toml
index 28d9e7fe3..237eaa014 100644
--- a/embassy-stm32/Cargo.toml
+++ b/embassy-stm32/Cargo.toml
@@ -47,4 +47,5 @@ embedded-dma = { version = "0.1.2" }
47bxcan = "0.5.0" 47bxcan = "0.5.0"
48nb = "*" 48nb = "*"
49stm32f4xx-hal = { version = "0.8.3", features = ["rt", "can"], git = "https://github.com/stm32-rs/stm32f4xx-hal.git", optional = true } 49stm32f4xx-hal = { version = "0.8.3", features = ["rt", "can"], git = "https://github.com/stm32-rs/stm32f4xx-hal.git", optional = true }
50stm32l0xx-hal = { version = "0.7.0", features = ["rt"], optional = true } \ No newline at end of file 50stm32l0xx-hal = { version = "0.7.0", features = ["rt"], optional = true }
51futures = { version = "0.3.5", default-features = false, features = ["async-await"] } \ No newline at end of file
diff --git a/embassy-stm32/src/f4/mod.rs b/embassy-stm32/src/f4/mod.rs
new file mode 100644
index 000000000..a80d640dc
--- /dev/null
+++ b/embassy-stm32/src/f4/mod.rs
@@ -0,0 +1,2 @@
1pub mod qei;
2pub mod serial;
diff --git a/embassy-stm32f4/src/qei.rs b/embassy-stm32/src/f4/qei.rs
index 5973e62d9..5973e62d9 100644
--- a/embassy-stm32f4/src/qei.rs
+++ b/embassy-stm32/src/f4/qei.rs
diff --git a/embassy-stm32f4/src/serial.rs b/embassy-stm32/src/f4/serial.rs
index 7539abf51..7539abf51 100644
--- a/embassy-stm32f4/src/serial.rs
+++ b/embassy-stm32/src/f4/serial.rs
diff --git a/embassy-stm32/src/lib.rs b/embassy-stm32/src/lib.rs
index 3cef287c3..a60c3192b 100644
--- a/embassy-stm32/src/lib.rs
+++ b/embassy-stm32/src/lib.rs
@@ -25,6 +25,25 @@
25 feature = "stm32f469", 25 feature = "stm32f469",
26 feature = "stm32f479", 26 feature = "stm32f479",
27))] 27))]
28mod f4;
29
30#[cfg(any(
31 feature = "stm32f401",
32 feature = "stm32f405",
33 feature = "stm32f407",
34 feature = "stm32f412",
35 feature = "stm32f413",
36 feature = "stm32f415",
37 feature = "stm32f417",
38 feature = "stm32f423",
39 feature = "stm32f427",
40 feature = "stm32f429",
41 feature = "stm32f437",
42 feature = "stm32f439",
43 feature = "stm32f446",
44 feature = "stm32f469",
45 feature = "stm32f479",
46))]
28pub use {stm32f4xx_hal as hal, stm32f4xx_hal::stm32 as pac}; 47pub use {stm32f4xx_hal as hal, stm32f4xx_hal::stm32 as pac};
29 48
30#[cfg(any(feature = "stm32l0x1", feature = "stm32l0x2", feature = "stm32l0x3",))] 49#[cfg(any(feature = "stm32l0x1", feature = "stm32l0x2", feature = "stm32l0x3",))]
@@ -58,8 +77,6 @@ pub mod can;
58 feature = "stm32f401", 77 feature = "stm32f401",
59 feature = "stm32f405", 78 feature = "stm32f405",
60 feature = "stm32f407", 79 feature = "stm32f407",
61 feature = "stm32f410",
62 feature = "stm32f411",
63 feature = "stm32f412", 80 feature = "stm32f412",
64 feature = "stm32f413", 81 feature = "stm32f413",
65 feature = "stm32f415", 82 feature = "stm32f415",
@@ -79,6 +96,25 @@ pub mod rtc;
79 feature = "stm32f401", 96 feature = "stm32f401",
80 feature = "stm32f405", 97 feature = "stm32f405",
81 feature = "stm32f407", 98 feature = "stm32f407",
99 feature = "stm32f412",
100 feature = "stm32f413",
101 feature = "stm32f415",
102 feature = "stm32f417",
103 feature = "stm32f423",
104 feature = "stm32f427",
105 feature = "stm32f429",
106 feature = "stm32f437",
107 feature = "stm32f439",
108 feature = "stm32f446",
109 feature = "stm32f469",
110 feature = "stm32f479",
111))]
112pub use f4::{qei, serial};
113
114#[cfg(any(
115 feature = "stm32f401",
116 feature = "stm32f405",
117 feature = "stm32f407",
82 feature = "stm32f410", 118 feature = "stm32f410",
83 feature = "stm32f411", 119 feature = "stm32f411",
84 feature = "stm32f412", 120 feature = "stm32f412",
diff --git a/embassy-stm32f4-examples/Cargo.toml b/embassy-stm32f4-examples/Cargo.toml
deleted file mode 100644
index c6ef98973..000000000
--- a/embassy-stm32f4-examples/Cargo.toml
+++ /dev/null
@@ -1,55 +0,0 @@
1[package]
2authors = ["Dario Nieuwenhuis <[email protected]>"]
3edition = "2018"
4name = "embassy-stm32f4-examples"
5version = "0.1.0"
6
7[features]
8default = [
9 "defmt-default",
10]
11defmt-default = []
12defmt-trace = []
13defmt-debug = []
14defmt-info = []
15defmt-warn = []
16defmt-error = []
17
18stm32f401 = ["stm32f4xx-hal/stm32f401", "embassy-stm32f4/stm32f401"]
19stm32f405 = ["stm32f4xx-hal/stm32f405", "embassy-stm32f4/stm32f405"]
20stm32f407 = ["stm32f4xx-hal/stm32f407", "embassy-stm32f4/stm32f407"]
21stm32f410 = ["stm32f4xx-hal/stm32f410", "embassy-stm32f4/stm32f410"]
22stm32f411 = ["stm32f4xx-hal/stm32f411", "embassy-stm32f4/stm32f411"]
23stm32f412 = ["stm32f4xx-hal/stm32f412", "embassy-stm32f4/stm32f412"]
24stm32f413 = ["stm32f4xx-hal/stm32f413", "embassy-stm32f4/stm32f413"]
25stm32f415 = ["stm32f4xx-hal/stm32f405", "embassy-stm32f4/stm32f405"]
26stm32f417 = ["stm32f4xx-hal/stm32f407", "embassy-stm32f4/stm32f407"]
27stm32f423 = ["stm32f4xx-hal/stm32f413", "embassy-stm32f4/stm32f413"]
28stm32f427 = ["stm32f4xx-hal/stm32f427", "embassy-stm32f4/stm32f427"]
29stm32f429 = ["stm32f4xx-hal/stm32f429", "embassy-stm32f4/stm32f429"]
30stm32f437 = ["stm32f4xx-hal/stm32f427", "embassy-stm32f4/stm32f427"]
31stm32f439 = ["stm32f4xx-hal/stm32f429", "embassy-stm32f4/stm32f429"]
32stm32f446 = ["stm32f4xx-hal/stm32f446", "embassy-stm32f4/stm32f446"]
33stm32f469 = ["stm32f4xx-hal/stm32f469", "embassy-stm32f4/stm32f469"]
34stm32f479 = ["stm32f4xx-hal/stm32f469", "embassy-stm32f4/stm32f469"]
35
36
37[dependencies]
38embassy = { version = "0.1.0", path = "../embassy", features = ["defmt", "defmt-trace"] }
39embassy-traits = { version = "0.1.0", path = "../embassy-traits", features = ["defmt"] }
40embassy-stm32f4 = { version = "*", path = "../embassy-stm32f4" }
41embassy-stm32 = { version = "*", path = "../embassy-stm32" }
42embassy-extras = {version = "0.1.0", path = "../embassy-extras" }
43
44defmt = "0.2.0"
45defmt-rtt = "0.2.0"
46
47cortex-m = "0.7.1"
48cortex-m-rt = "0.6.13"
49embedded-hal = { version = "0.2.4" }
50panic-probe = "0.1.0"
51stm32f4xx-hal = { version = "0.8.3", features = ["rt", "usb_fs"], git = "https://github.com/stm32-rs/stm32f4xx-hal.git"}
52futures = { version = "0.3.8", default-features = false, features = ["async-await"] }
53rtt-target = { version = "0.3", features = ["cortex-m"] }
54bxcan = "0.5.0"
55usb-device = "0.2.7"
diff --git a/embassy-stm32f4/Cargo.toml b/embassy-stm32f4/Cargo.toml
deleted file mode 100644
index 8e9b14f03..000000000
--- a/embassy-stm32f4/Cargo.toml
+++ /dev/null
@@ -1,45 +0,0 @@
1[package]
2name = "embassy-stm32f4"
3version = "0.1.0"
4authors = ["Dario Nieuwenhuis <[email protected]>"]
5edition = "2018"
6
7[features]
8defmt-trace = [ ]
9defmt-debug = [ ]
10defmt-info = [ ]
11defmt-warn = [ ]
12defmt-error = [ ]
13
14stm32f401 = ["stm32f4xx-hal/stm32f401", "embassy-stm32/stm32f401"]
15stm32f405 = ["stm32f4xx-hal/stm32f405", "embassy-stm32/stm32f405"]
16stm32f407 = ["stm32f4xx-hal/stm32f407", "embassy-stm32/stm32f407"]
17stm32f410 = ["stm32f4xx-hal/stm32f410", "embassy-stm32/stm32f410"]
18stm32f411 = ["stm32f4xx-hal/stm32f411", "embassy-stm32/stm32f411"]
19stm32f412 = ["stm32f4xx-hal/stm32f412", "embassy-stm32/stm32f412"]
20stm32f413 = ["stm32f4xx-hal/stm32f413", "embassy-stm32/stm32f413"]
21stm32f415 = ["stm32f4xx-hal/stm32f405", "embassy-stm32/stm32f415"]
22stm32f417 = ["stm32f4xx-hal/stm32f407", "embassy-stm32/stm32f417"]
23stm32f423 = ["stm32f4xx-hal/stm32f413", "embassy-stm32/stm32f423"]
24stm32f427 = ["stm32f4xx-hal/stm32f427", "embassy-stm32/stm32f427"]
25stm32f429 = ["stm32f4xx-hal/stm32f429", "embassy-stm32/stm32f429"]
26stm32f437 = ["stm32f4xx-hal/stm32f427", "embassy-stm32/stm32f437"]
27stm32f439 = ["stm32f4xx-hal/stm32f429", "embassy-stm32/stm32f439"]
28stm32f446 = ["stm32f4xx-hal/stm32f446", "embassy-stm32/stm32f446"]
29stm32f469 = ["stm32f4xx-hal/stm32f469", "embassy-stm32/stm32f469"]
30stm32f479 = ["stm32f4xx-hal/stm32f469", "embassy-stm32/stm32f479"]
31
32[dependencies]
33embassy = { version = "0.1.0", path = "../embassy" }
34embassy-stm32 = { version = "0.1.0", path = "../embassy-stm32" }
35
36defmt = { version = "0.2.0", optional = true }
37log = { version = "0.4.11", optional = true }
38cortex-m-rt = "0.6.13"
39cortex-m = "0.7.1"
40futures = { version = "0.3.5", default-features = false, features = ["async-await"] }
41embedded-hal = { version = "0.2.4" }
42embedded-dma = { version = "0.1.2" }
43stm32f4xx-hal = { version = "0.8.3", features = ["rt", "can"], git = "https://github.com/stm32-rs/stm32f4xx-hal.git"}
44bxcan = "0.5.0"
45nb = "*"
diff --git a/embassy-stm32f4/src/lib.rs b/embassy-stm32f4/src/lib.rs
deleted file mode 100644
index eb6f04f88..000000000
--- a/embassy-stm32f4/src/lib.rs
+++ /dev/null
@@ -1,317 +0,0 @@
1#![no_std]
2#![feature(generic_associated_types)]
3#![feature(asm)]
4#![feature(min_type_alias_impl_trait)]
5#![feature(impl_trait_in_bindings)]
6#![feature(type_alias_impl_trait)]
7#![allow(incomplete_features)]
8
9#[cfg(not(any(
10 feature = "stm32f401",
11 feature = "stm32f405",
12 feature = "stm32f407",
13 feature = "stm32f410",
14 feature = "stm32f411",
15 feature = "stm32f412",
16 feature = "stm32f413",
17 feature = "stm32f415",
18 feature = "stm32f417",
19 feature = "stm32f423",
20 feature = "stm32f427",
21 feature = "stm32f429",
22 feature = "stm32f437",
23 feature = "stm32f439",
24 feature = "stm32f446",
25 feature = "stm32f469",
26 feature = "stm32f479",
27)))]
28compile_error!(
29 "No chip feature activated. You must activate exactly one of the following features: "
30);
31
32#[cfg(any(
33 all(feature = "stm32f401", feature = "stm32f405"),
34 all(feature = "stm32f401", feature = "stm32f407"),
35 all(feature = "stm32f401", feature = "stm32f410"),
36 all(feature = "stm32f401", feature = "stm32f411"),
37 all(feature = "stm32f401", feature = "stm32f412"),
38 all(feature = "stm32f401", feature = "stm32f413"),
39 all(feature = "stm32f401", feature = "stm32f415"),
40 all(feature = "stm32f401", feature = "stm32f417"),
41 all(feature = "stm32f401", feature = "stm32f423"),
42 all(feature = "stm32f401", feature = "stm32f427"),
43 all(feature = "stm32f401", feature = "stm32f429"),
44 all(feature = "stm32f401", feature = "stm32f437"),
45 all(feature = "stm32f401", feature = "stm32f439"),
46 all(feature = "stm32f401", feature = "stm32f446"),
47 all(feature = "stm32f401", feature = "stm32f469"),
48 all(feature = "stm32f401", feature = "stm32f479"),
49 all(feature = "stm32f405", feature = "stm32f401"),
50 all(feature = "stm32f405", feature = "stm32f407"),
51 all(feature = "stm32f405", feature = "stm32f410"),
52 all(feature = "stm32f405", feature = "stm32f411"),
53 all(feature = "stm32f405", feature = "stm32f412"),
54 all(feature = "stm32f405", feature = "stm32f413"),
55 all(feature = "stm32f405", feature = "stm32f415"),
56 all(feature = "stm32f405", feature = "stm32f417"),
57 all(feature = "stm32f405", feature = "stm32f423"),
58 all(feature = "stm32f405", feature = "stm32f427"),
59 all(feature = "stm32f405", feature = "stm32f429"),
60 all(feature = "stm32f405", feature = "stm32f437"),
61 all(feature = "stm32f405", feature = "stm32f439"),
62 all(feature = "stm32f405", feature = "stm32f446"),
63 all(feature = "stm32f405", feature = "stm32f469"),
64 all(feature = "stm32f405", feature = "stm32f479"),
65 all(feature = "stm32f407", feature = "stm32f401"),
66 all(feature = "stm32f407", feature = "stm32f405"),
67 all(feature = "stm32f407", feature = "stm32f410"),
68 all(feature = "stm32f407", feature = "stm32f411"),
69 all(feature = "stm32f407", feature = "stm32f412"),
70 all(feature = "stm32f407", feature = "stm32f413"),
71 all(feature = "stm32f407", feature = "stm32f415"),
72 all(feature = "stm32f407", feature = "stm32f417"),
73 all(feature = "stm32f407", feature = "stm32f423"),
74 all(feature = "stm32f407", feature = "stm32f427"),
75 all(feature = "stm32f407", feature = "stm32f429"),
76 all(feature = "stm32f407", feature = "stm32f437"),
77 all(feature = "stm32f407", feature = "stm32f439"),
78 all(feature = "stm32f407", feature = "stm32f446"),
79 all(feature = "stm32f407", feature = "stm32f469"),
80 all(feature = "stm32f407", feature = "stm32f479"),
81 all(feature = "stm32f410", feature = "stm32f401"),
82 all(feature = "stm32f410", feature = "stm32f405"),
83 all(feature = "stm32f410", feature = "stm32f407"),
84 all(feature = "stm32f410", feature = "stm32f411"),
85 all(feature = "stm32f410", feature = "stm32f412"),
86 all(feature = "stm32f410", feature = "stm32f413"),
87 all(feature = "stm32f410", feature = "stm32f415"),
88 all(feature = "stm32f410", feature = "stm32f417"),
89 all(feature = "stm32f410", feature = "stm32f423"),
90 all(feature = "stm32f410", feature = "stm32f427"),
91 all(feature = "stm32f410", feature = "stm32f429"),
92 all(feature = "stm32f410", feature = "stm32f437"),
93 all(feature = "stm32f410", feature = "stm32f439"),
94 all(feature = "stm32f410", feature = "stm32f446"),
95 all(feature = "stm32f410", feature = "stm32f469"),
96 all(feature = "stm32f410", feature = "stm32f479"),
97 all(feature = "stm32f411", feature = "stm32f401"),
98 all(feature = "stm32f411", feature = "stm32f405"),
99 all(feature = "stm32f411", feature = "stm32f407"),
100 all(feature = "stm32f411", feature = "stm32f410"),
101 all(feature = "stm32f411", feature = "stm32f412"),
102 all(feature = "stm32f411", feature = "stm32f413"),
103 all(feature = "stm32f411", feature = "stm32f415"),
104 all(feature = "stm32f411", feature = "stm32f417"),
105 all(feature = "stm32f411", feature = "stm32f423"),
106 all(feature = "stm32f411", feature = "stm32f427"),
107 all(feature = "stm32f411", feature = "stm32f429"),
108 all(feature = "stm32f411", feature = "stm32f437"),
109 all(feature = "stm32f411", feature = "stm32f439"),
110 all(feature = "stm32f411", feature = "stm32f446"),
111 all(feature = "stm32f411", feature = "stm32f469"),
112 all(feature = "stm32f411", feature = "stm32f479"),
113 all(feature = "stm32f412", feature = "stm32f401"),
114 all(feature = "stm32f412", feature = "stm32f405"),
115 all(feature = "stm32f412", feature = "stm32f407"),
116 all(feature = "stm32f412", feature = "stm32f410"),
117 all(feature = "stm32f412", feature = "stm32f411"),
118 all(feature = "stm32f412", feature = "stm32f413"),
119 all(feature = "stm32f412", feature = "stm32f415"),
120 all(feature = "stm32f412", feature = "stm32f417"),
121 all(feature = "stm32f412", feature = "stm32f423"),
122 all(feature = "stm32f412", feature = "stm32f427"),
123 all(feature = "stm32f412", feature = "stm32f429"),
124 all(feature = "stm32f412", feature = "stm32f437"),
125 all(feature = "stm32f412", feature = "stm32f439"),
126 all(feature = "stm32f412", feature = "stm32f446"),
127 all(feature = "stm32f412", feature = "stm32f469"),
128 all(feature = "stm32f412", feature = "stm32f479"),
129 all(feature = "stm32f413", feature = "stm32f401"),
130 all(feature = "stm32f413", feature = "stm32f405"),
131 all(feature = "stm32f413", feature = "stm32f407"),
132 all(feature = "stm32f413", feature = "stm32f410"),
133 all(feature = "stm32f413", feature = "stm32f411"),
134 all(feature = "stm32f413", feature = "stm32f412"),
135 all(feature = "stm32f413", feature = "stm32f415"),
136 all(feature = "stm32f413", feature = "stm32f417"),
137 all(feature = "stm32f413", feature = "stm32f423"),
138 all(feature = "stm32f413", feature = "stm32f427"),
139 all(feature = "stm32f413", feature = "stm32f429"),
140 all(feature = "stm32f413", feature = "stm32f437"),
141 all(feature = "stm32f413", feature = "stm32f439"),
142 all(feature = "stm32f413", feature = "stm32f446"),
143 all(feature = "stm32f413", feature = "stm32f469"),
144 all(feature = "stm32f413", feature = "stm32f479"),
145 all(feature = "stm32f415", feature = "stm32f401"),
146 all(feature = "stm32f415", feature = "stm32f405"),
147 all(feature = "stm32f415", feature = "stm32f407"),
148 all(feature = "stm32f415", feature = "stm32f410"),
149 all(feature = "stm32f415", feature = "stm32f411"),
150 all(feature = "stm32f415", feature = "stm32f412"),
151 all(feature = "stm32f415", feature = "stm32f413"),
152 all(feature = "stm32f415", feature = "stm32f417"),
153 all(feature = "stm32f415", feature = "stm32f423"),
154 all(feature = "stm32f415", feature = "stm32f427"),
155 all(feature = "stm32f415", feature = "stm32f429"),
156 all(feature = "stm32f415", feature = "stm32f437"),
157 all(feature = "stm32f415", feature = "stm32f439"),
158 all(feature = "stm32f415", feature = "stm32f446"),
159 all(feature = "stm32f415", feature = "stm32f469"),
160 all(feature = "stm32f415", feature = "stm32f479"),
161 all(feature = "stm32f417", feature = "stm32f401"),
162 all(feature = "stm32f417", feature = "stm32f405"),
163 all(feature = "stm32f417", feature = "stm32f407"),
164 all(feature = "stm32f417", feature = "stm32f410"),
165 all(feature = "stm32f417", feature = "stm32f411"),
166 all(feature = "stm32f417", feature = "stm32f412"),
167 all(feature = "stm32f417", feature = "stm32f413"),
168 all(feature = "stm32f417", feature = "stm32f415"),
169 all(feature = "stm32f417", feature = "stm32f423"),
170 all(feature = "stm32f417", feature = "stm32f427"),
171 all(feature = "stm32f417", feature = "stm32f429"),
172 all(feature = "stm32f417", feature = "stm32f437"),
173 all(feature = "stm32f417", feature = "stm32f439"),
174 all(feature = "stm32f417", feature = "stm32f446"),
175 all(feature = "stm32f417", feature = "stm32f469"),
176 all(feature = "stm32f417", feature = "stm32f479"),
177 all(feature = "stm32f423", feature = "stm32f401"),
178 all(feature = "stm32f423", feature = "stm32f405"),
179 all(feature = "stm32f423", feature = "stm32f407"),
180 all(feature = "stm32f423", feature = "stm32f410"),
181 all(feature = "stm32f423", feature = "stm32f411"),
182 all(feature = "stm32f423", feature = "stm32f412"),
183 all(feature = "stm32f423", feature = "stm32f413"),
184 all(feature = "stm32f423", feature = "stm32f415"),
185 all(feature = "stm32f423", feature = "stm32f417"),
186 all(feature = "stm32f423", feature = "stm32f427"),
187 all(feature = "stm32f423", feature = "stm32f429"),
188 all(feature = "stm32f423", feature = "stm32f437"),
189 all(feature = "stm32f423", feature = "stm32f439"),
190 all(feature = "stm32f423", feature = "stm32f446"),
191 all(feature = "stm32f423", feature = "stm32f469"),
192 all(feature = "stm32f423", feature = "stm32f479"),
193 all(feature = "stm32f427", feature = "stm32f401"),
194 all(feature = "stm32f427", feature = "stm32f405"),
195 all(feature = "stm32f427", feature = "stm32f407"),
196 all(feature = "stm32f427", feature = "stm32f410"),
197 all(feature = "stm32f427", feature = "stm32f411"),
198 all(feature = "stm32f427", feature = "stm32f412"),
199 all(feature = "stm32f427", feature = "stm32f413"),
200 all(feature = "stm32f427", feature = "stm32f415"),
201 all(feature = "stm32f427", feature = "stm32f417"),
202 all(feature = "stm32f427", feature = "stm32f423"),
203 all(feature = "stm32f427", feature = "stm32f429"),
204 all(feature = "stm32f427", feature = "stm32f437"),
205 all(feature = "stm32f427", feature = "stm32f439"),
206 all(feature = "stm32f427", feature = "stm32f446"),
207 all(feature = "stm32f427", feature = "stm32f469"),
208 all(feature = "stm32f427", feature = "stm32f479"),
209 all(feature = "stm32f429", feature = "stm32f401"),
210 all(feature = "stm32f429", feature = "stm32f405"),
211 all(feature = "stm32f429", feature = "stm32f407"),
212 all(feature = "stm32f429", feature = "stm32f410"),
213 all(feature = "stm32f429", feature = "stm32f411"),
214 all(feature = "stm32f429", feature = "stm32f412"),
215 all(feature = "stm32f429", feature = "stm32f413"),
216 all(feature = "stm32f429", feature = "stm32f415"),
217 all(feature = "stm32f429", feature = "stm32f417"),
218 all(feature = "stm32f429", feature = "stm32f423"),
219 all(feature = "stm32f429", feature = "stm32f427"),
220 all(feature = "stm32f429", feature = "stm32f437"),
221 all(feature = "stm32f429", feature = "stm32f439"),
222 all(feature = "stm32f429", feature = "stm32f446"),
223 all(feature = "stm32f429", feature = "stm32f469"),
224 all(feature = "stm32f429", feature = "stm32f479"),
225 all(feature = "stm32f437", feature = "stm32f401"),
226 all(feature = "stm32f437", feature = "stm32f405"),
227 all(feature = "stm32f437", feature = "stm32f407"),
228 all(feature = "stm32f437", feature = "stm32f410"),
229 all(feature = "stm32f437", feature = "stm32f411"),
230 all(feature = "stm32f437", feature = "stm32f412"),
231 all(feature = "stm32f437", feature = "stm32f413"),
232 all(feature = "stm32f437", feature = "stm32f415"),
233 all(feature = "stm32f437", feature = "stm32f417"),
234 all(feature = "stm32f437", feature = "stm32f423"),
235 all(feature = "stm32f437", feature = "stm32f427"),
236 all(feature = "stm32f437", feature = "stm32f429"),
237 all(feature = "stm32f437", feature = "stm32f439"),
238 all(feature = "stm32f437", feature = "stm32f446"),
239 all(feature = "stm32f437", feature = "stm32f469"),
240 all(feature = "stm32f437", feature = "stm32f479"),
241 all(feature = "stm32f439", feature = "stm32f401"),
242 all(feature = "stm32f439", feature = "stm32f405"),
243 all(feature = "stm32f439", feature = "stm32f407"),
244 all(feature = "stm32f439", feature = "stm32f410"),
245 all(feature = "stm32f439", feature = "stm32f411"),
246 all(feature = "stm32f439", feature = "stm32f412"),
247 all(feature = "stm32f439", feature = "stm32f413"),
248 all(feature = "stm32f439", feature = "stm32f415"),
249 all(feature = "stm32f439", feature = "stm32f417"),
250 all(feature = "stm32f439", feature = "stm32f423"),
251 all(feature = "stm32f439", feature = "stm32f427"),
252 all(feature = "stm32f439", feature = "stm32f429"),
253 all(feature = "stm32f439", feature = "stm32f437"),
254 all(feature = "stm32f439", feature = "stm32f446"),
255 all(feature = "stm32f439", feature = "stm32f469"),
256 all(feature = "stm32f439", feature = "stm32f479"),
257 all(feature = "stm32f446", feature = "stm32f401"),
258 all(feature = "stm32f446", feature = "stm32f405"),
259 all(feature = "stm32f446", feature = "stm32f407"),
260 all(feature = "stm32f446", feature = "stm32f410"),
261 all(feature = "stm32f446", feature = "stm32f411"),
262 all(feature = "stm32f446", feature = "stm32f412"),
263 all(feature = "stm32f446", feature = "stm32f413"),
264 all(feature = "stm32f446", feature = "stm32f415"),
265 all(feature = "stm32f446", feature = "stm32f417"),
266 all(feature = "stm32f446", feature = "stm32f423"),
267 all(feature = "stm32f446", feature = "stm32f427"),
268 all(feature = "stm32f446", feature = "stm32f429"),
269 all(feature = "stm32f446", feature = "stm32f437"),
270 all(feature = "stm32f446", feature = "stm32f439"),
271 all(feature = "stm32f446", feature = "stm32f469"),
272 all(feature = "stm32f446", feature = "stm32f479"),
273 all(feature = "stm32f469", feature = "stm32f401"),
274 all(feature = "stm32f469", feature = "stm32f405"),
275 all(feature = "stm32f469", feature = "stm32f407"),
276 all(feature = "stm32f469", feature = "stm32f410"),
277 all(feature = "stm32f469", feature = "stm32f411"),
278 all(feature = "stm32f469", feature = "stm32f412"),
279 all(feature = "stm32f469", feature = "stm32f413"),
280 all(feature = "stm32f469", feature = "stm32f415"),
281 all(feature = "stm32f469", feature = "stm32f417"),
282 all(feature = "stm32f469", feature = "stm32f423"),
283 all(feature = "stm32f469", feature = "stm32f427"),
284 all(feature = "stm32f469", feature = "stm32f429"),
285 all(feature = "stm32f469", feature = "stm32f437"),
286 all(feature = "stm32f469", feature = "stm32f439"),
287 all(feature = "stm32f469", feature = "stm32f446"),
288 all(feature = "stm32f469", feature = "stm32f479"),
289 all(feature = "stm32f479", feature = "stm32f401"),
290 all(feature = "stm32f479", feature = "stm32f405"),
291 all(feature = "stm32f479", feature = "stm32f407"),
292 all(feature = "stm32f479", feature = "stm32f410"),
293 all(feature = "stm32f479", feature = "stm32f411"),
294 all(feature = "stm32f479", feature = "stm32f412"),
295 all(feature = "stm32f479", feature = "stm32f413"),
296 all(feature = "stm32f479", feature = "stm32f415"),
297 all(feature = "stm32f479", feature = "stm32f417"),
298 all(feature = "stm32f479", feature = "stm32f423"),
299 all(feature = "stm32f479", feature = "stm32f427"),
300 all(feature = "stm32f479", feature = "stm32f429"),
301 all(feature = "stm32f479", feature = "stm32f437"),
302 all(feature = "stm32f479", feature = "stm32f439"),
303 all(feature = "stm32f479", feature = "stm32f446"),
304 all(feature = "stm32f479", feature = "stm32f469"),
305))]
306compile_error!(
307 "Multile chip features activated. You must activate exactly one of the following features: "
308);
309
310pub use embassy_stm32::{exti, fmt, hal, interrupt, pac, rtc};
311
312#[cfg(not(any(feature = "stm32f401", feature = "stm32f410", feature = "stm32f411",)))]
313pub use embassy_stm32::can;
314
315#[cfg(not(feature = "stm32f410"))]
316pub mod qei;
317pub mod serial;
diff --git a/embassy-stm32l0/Cargo.toml b/embassy-stm32l0/Cargo.toml
deleted file mode 100644
index 8926763d2..000000000
--- a/embassy-stm32l0/Cargo.toml
+++ /dev/null
@@ -1,28 +0,0 @@
1[package]
2name = "embassy-stm32l0"
3version = "0.1.0"
4authors = ["Michael Beaumont <[email protected]>"]
5edition = "2018"
6
7[features]
8defmt-trace = [ ]
9defmt-debug = [ ]
10defmt-info = [ ]
11defmt-warn = [ ]
12defmt-error = [ ]
13
14stm32l0x1 = ["stm32l0xx-hal/stm32l0x1", "embassy-stm32/stm32l0x1"]
15stm32l0x2 = ["stm32l0xx-hal/stm32l0x2", "embassy-stm32/stm32l0x2"]
16stm32l0x3 = ["stm32l0xx-hal/stm32l0x3", "embassy-stm32/stm32l0x3"]
17
18[dependencies]
19embassy = { version = "0.1.0", path = "../embassy" }
20embassy-stm32 = { version = "0.1.0", path = "../embassy-stm32" }
21defmt = { version = "0.2.0", optional = true }
22futures = { version = "0.3.5", default-features = false, features = [ "cfg-target-has-atomic", "unstable" ] }
23log = { version = "0.4.11", optional = true }
24cortex-m-rt = "0.6.13"
25cortex-m = "0.7.1"
26embedded-hal = { version = "0.2.4" }
27embedded-dma = { version = "0.1.2" }
28stm32l0xx-hal = { version = "0.7.0", features = ["rt"], git = "https://github.com/stm32-rs/stm32l0xx-hal.git"}
diff --git a/embassy-stm32l0/src/lib.rs b/embassy-stm32l0/src/lib.rs
deleted file mode 100644
index a684c4e3e..000000000
--- a/embassy-stm32l0/src/lib.rs
+++ /dev/null
@@ -1,22 +0,0 @@
1#![no_std]
2#![feature(generic_associated_types)]
3#![feature(asm)]
4#![feature(type_alias_impl_trait)]
5#![feature(min_type_alias_impl_trait)]
6#![allow(incomplete_features)]
7
8#[cfg(not(any(feature = "stm32l0x1", feature = "stm32l0x2", feature = "stm32l0x3",)))]
9compile_error!(
10 "No chip feature activated. You must activate exactly one of the following features: "
11);
12
13#[cfg(any(
14 all(feature = "stm32l0x1", feature = "stm32l0x2"),
15 all(feature = "stm32l0x1", feature = "stm32l0x3"),
16 all(feature = "stm32l0x2", feature = "stm32l0x3"),
17))]
18compile_error!(
19 "Multile chip features activated. You must activate exactly one of the following features: "
20);
21
22pub use embassy_stm32::{exti, fmt, hal, interrupt, pac};
diff --git a/embassy/src/util/signal.rs b/embassy/src/util/signal.rs
index e4629bf9f..2fc86906f 100644
--- a/embassy/src/util/signal.rs
+++ b/embassy/src/util/signal.rs
@@ -121,7 +121,7 @@ unsafe impl cortex_m::interrupt::Nr for NrWrap {
121/// use embassy::traits::*; 121/// use embassy::traits::*;
122/// use embassy::util::InterruptFuture; 122/// use embassy::util::InterruptFuture;
123/// use embassy::executor::task; 123/// use embassy::executor::task;
124/// use embassy_stm32f4::interrupt; // Adjust this to your MCU's embassy HAL. 124/// use embassy_stm32::interrupt; // Adjust this to your MCU's embassy HAL.
125/// #[embassy::task] 125/// #[embassy::task]
126/// async fn demo_interrupt_future() { 126/// async fn demo_interrupt_future() {
127/// // Using STM32f446 interrupt names, adjust this to your application as necessary. 127/// // Using STM32f446 interrupt names, adjust this to your application as necessary.