diff options
| author | Dario Nieuwenhuis <[email protected]> | 2022-06-27 02:33:44 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-06-27 02:33:44 +0200 |
| commit | 52abfba8eb439cc7ef10191ab2010b80d6ed20c9 (patch) | |
| tree | 8b6f598f62ab31dfe176a32a3a962841d42e515d | |
| parent | ffc32d3ddb5840b476a473c0248e32f7b9a8a212 (diff) | |
| parent | a855889f7073ac6cfbc459e8ede95f7ad94bdfa5 (diff) | |
Merge pull request #836 from embassy-rs/fixes
More misc fixes.
| -rwxr-xr-x | ci.sh | 1 | ||||
| -rw-r--r-- | embassy-cortex-m/Cargo.toml | 4 | ||||
| -rw-r--r-- | embassy-cortex-m/src/interrupt.rs | 18 | ||||
| -rw-r--r-- | embassy-lora/Cargo.toml | 6 | ||||
| -rw-r--r-- | embassy-net/Cargo.toml | 4 | ||||
| -rw-r--r-- | embassy-nrf/Cargo.toml | 3 | ||||
| -rw-r--r-- | embassy-rp/Cargo.toml | 2 | ||||
| -rw-r--r-- | embassy-stm32/Cargo.toml | 4 | ||||
| -rw-r--r-- | embassy-stm32/src/rcc/f1.rs | 4 | ||||
| -rw-r--r-- | embassy-stm32/src/rcc/mod.rs | 2 | ||||
| -rw-r--r-- | embassy-stm32/src/usb/usb.rs | 2 | ||||
| -rw-r--r-- | embassy-usb-hid/Cargo.toml | 2 | ||||
| -rw-r--r-- | embassy-usb-ncm/Cargo.toml | 2 | ||||
| -rw-r--r-- | embassy-usb-serial/Cargo.toml | 2 | ||||
| -rw-r--r-- | embassy-usb/Cargo.toml | 2 | ||||
| -rw-r--r-- | embassy/Cargo.toml | 2 | ||||
| m--------- | stm32-data | 0 | ||||
| -rw-r--r-- | stm32-metapac-gen/src/lib.rs | 13 |
18 files changed, 46 insertions, 27 deletions
| @@ -60,6 +60,7 @@ cargo batch \ | |||
| 60 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features nightly,stm32wle5ub,defmt,exti,time-driver-any,embassy/time-tick-32768hz,unstable-traits \ | 60 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features nightly,stm32wle5ub,defmt,exti,time-driver-any,embassy/time-tick-32768hz,unstable-traits \ |
| 61 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32f107vc,defmt,exti,time-driver-any,embassy/time-tick-32768hz,unstable-traits \ | 61 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32f107vc,defmt,exti,time-driver-any,embassy/time-tick-32768hz,unstable-traits \ |
| 62 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32f103re,defmt,exti,time-driver-any,embassy/time-tick-32768hz,unstable-traits \ | 62 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32f103re,defmt,exti,time-driver-any,embassy/time-tick-32768hz,unstable-traits \ |
| 63 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32f100c4,defmt,exti,time-driver-any,embassy/time-tick-32768hz,unstable-traits \ | ||
| 63 | --- build --release --manifest-path embassy-boot/nrf/Cargo.toml --target thumbv7em-none-eabi --features embassy-nrf/nrf52840 \ | 64 | --- build --release --manifest-path embassy-boot/nrf/Cargo.toml --target thumbv7em-none-eabi --features embassy-nrf/nrf52840 \ |
| 64 | --- build --release --manifest-path embassy-boot/stm32/Cargo.toml --target thumbv7em-none-eabi --features embassy-stm32/stm32wl55jc-cm4,embassy/time-tick-32768hz \ | 65 | --- build --release --manifest-path embassy-boot/stm32/Cargo.toml --target thumbv7em-none-eabi --features embassy-stm32/stm32wl55jc-cm4,embassy/time-tick-32768hz \ |
| 65 | --- build --release --manifest-path docs/modules/ROOT/examples/basic/Cargo.toml --target thumbv7em-none-eabi \ | 66 | --- build --release --manifest-path docs/modules/ROOT/examples/basic/Cargo.toml --target thumbv7em-none-eabi \ |
diff --git a/embassy-cortex-m/Cargo.toml b/embassy-cortex-m/Cargo.toml index f1e7beb56..9dbec0462 100644 --- a/embassy-cortex-m/Cargo.toml +++ b/embassy-cortex-m/Cargo.toml | |||
| @@ -5,8 +5,8 @@ edition = "2021" | |||
| 5 | 5 | ||
| 6 | [package.metadata.embassy_docs] | 6 | [package.metadata.embassy_docs] |
| 7 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-cortex-m-v$VERSION/embassy-cortex-m/src/" | 7 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-cortex-m-v$VERSION/embassy-cortex-m/src/" |
| 8 | src_base_git = "https://github.com/embassy-rs/embassy/blob/master/embassy-cortex-m/src/" | 8 | src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-cortex-m/src/" |
| 9 | features = [] | 9 | features = ["prio-bits-3"] |
| 10 | flavors = [ | 10 | flavors = [ |
| 11 | { name = "thumbv6m-none-eabi", target = "thumbv6m-none-eabi", features = [] }, | 11 | { name = "thumbv6m-none-eabi", target = "thumbv6m-none-eabi", features = [] }, |
| 12 | { name = "thumbv7m-none-eabi", target = "thumbv7m-none-eabi", features = [] }, | 12 | { name = "thumbv7m-none-eabi", target = "thumbv7m-none-eabi", features = [] }, |
diff --git a/embassy-cortex-m/src/interrupt.rs b/embassy-cortex-m/src/interrupt.rs index cd132076f..8a63b18b1 100644 --- a/embassy-cortex-m/src/interrupt.rs +++ b/embassy-cortex-m/src/interrupt.rs | |||
| @@ -205,6 +205,8 @@ const PRIO_MASK: u8 = 0xfe; | |||
| 205 | const PRIO_MASK: u8 = 0xff; | 205 | const PRIO_MASK: u8 = 0xff; |
| 206 | 206 | ||
| 207 | /// The interrupt priority level. | 207 | /// The interrupt priority level. |
| 208 | /// | ||
| 209 | /// NOTE: The contents of this enum differ according to the set `prio-bits-*` Cargo feature. | ||
| 208 | #[cfg(feature = "prio-bits-0")] | 210 | #[cfg(feature = "prio-bits-0")] |
| 209 | #[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 211 | #[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 210 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] | 212 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] |
| @@ -214,6 +216,8 @@ pub enum Priority { | |||
| 214 | } | 216 | } |
| 215 | 217 | ||
| 216 | /// The interrupt priority level. | 218 | /// The interrupt priority level. |
| 219 | /// | ||
| 220 | /// NOTE: The contents of this enum differ according to the set `prio-bits-*` Cargo feature. | ||
| 217 | #[cfg(feature = "prio-bits-1")] | 221 | #[cfg(feature = "prio-bits-1")] |
| 218 | #[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 222 | #[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 219 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] | 223 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] |
| @@ -224,6 +228,8 @@ pub enum Priority { | |||
| 224 | } | 228 | } |
| 225 | 229 | ||
| 226 | /// The interrupt priority level. | 230 | /// The interrupt priority level. |
| 231 | /// | ||
| 232 | /// NOTE: The contents of this enum differ according to the set `prio-bits-*` Cargo feature. | ||
| 227 | #[cfg(feature = "prio-bits-2")] | 233 | #[cfg(feature = "prio-bits-2")] |
| 228 | #[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 234 | #[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 229 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] | 235 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] |
| @@ -236,6 +242,8 @@ pub enum Priority { | |||
| 236 | } | 242 | } |
| 237 | 243 | ||
| 238 | /// The interrupt priority level. | 244 | /// The interrupt priority level. |
| 245 | /// | ||
| 246 | /// NOTE: The contents of this enum differ according to the set `prio-bits-*` Cargo feature. | ||
| 239 | #[cfg(feature = "prio-bits-3")] | 247 | #[cfg(feature = "prio-bits-3")] |
| 240 | #[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 248 | #[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 241 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] | 249 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] |
| @@ -252,6 +260,8 @@ pub enum Priority { | |||
| 252 | } | 260 | } |
| 253 | 261 | ||
| 254 | /// The interrupt priority level. | 262 | /// The interrupt priority level. |
| 263 | /// | ||
| 264 | /// NOTE: The contents of this enum differ according to the set `prio-bits-*` Cargo feature. | ||
| 255 | #[cfg(feature = "prio-bits-4")] | 265 | #[cfg(feature = "prio-bits-4")] |
| 256 | #[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 266 | #[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 257 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] | 267 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] |
| @@ -276,6 +286,8 @@ pub enum Priority { | |||
| 276 | } | 286 | } |
| 277 | 287 | ||
| 278 | /// The interrupt priority level. | 288 | /// The interrupt priority level. |
| 289 | /// | ||
| 290 | /// NOTE: The contents of this enum differ according to the set `prio-bits-*` Cargo feature. | ||
| 279 | #[cfg(feature = "prio-bits-5")] | 291 | #[cfg(feature = "prio-bits-5")] |
| 280 | #[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 292 | #[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 281 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] | 293 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] |
| @@ -316,6 +328,8 @@ pub enum Priority { | |||
| 316 | } | 328 | } |
| 317 | 329 | ||
| 318 | /// The interrupt priority level. | 330 | /// The interrupt priority level. |
| 331 | /// | ||
| 332 | /// NOTE: The contents of this enum differ according to the set `prio-bits-*` Cargo feature. | ||
| 319 | #[cfg(feature = "prio-bits-6")] | 333 | #[cfg(feature = "prio-bits-6")] |
| 320 | #[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 334 | #[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 321 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] | 335 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] |
| @@ -388,6 +402,8 @@ pub enum Priority { | |||
| 388 | } | 402 | } |
| 389 | 403 | ||
| 390 | /// The interrupt priority level. | 404 | /// The interrupt priority level. |
| 405 | /// | ||
| 406 | /// NOTE: The contents of this enum differ according to the set `prio-bits-*` Cargo feature. | ||
| 391 | #[cfg(feature = "prio-bits-7")] | 407 | #[cfg(feature = "prio-bits-7")] |
| 392 | #[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 408 | #[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 393 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] | 409 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] |
| @@ -524,6 +540,8 @@ pub enum Priority { | |||
| 524 | } | 540 | } |
| 525 | 541 | ||
| 526 | /// The interrupt priority level. | 542 | /// The interrupt priority level. |
| 543 | /// | ||
| 544 | /// NOTE: The contents of this enum differ according to the set `prio-bits-*` Cargo feature. | ||
| 527 | #[cfg(feature = "prio-bits-8")] | 545 | #[cfg(feature = "prio-bits-8")] |
| 528 | #[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 546 | #[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 529 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] | 547 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] |
diff --git a/embassy-lora/Cargo.toml b/embassy-lora/Cargo.toml index 0304c2c35..9b6b2c652 100644 --- a/embassy-lora/Cargo.toml +++ b/embassy-lora/Cargo.toml | |||
| @@ -5,11 +5,11 @@ edition = "2021" | |||
| 5 | 5 | ||
| 6 | [package.metadata.embassy_docs] | 6 | [package.metadata.embassy_docs] |
| 7 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-lora-v$VERSION/embassy-lora/src/" | 7 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-lora-v$VERSION/embassy-lora/src/" |
| 8 | src_base_git = "https://github.com/embassy-rs/embassy/blob/master/embassy-lora/src/" | 8 | src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-lora/src/" |
| 9 | features = ["time", "defmt"] | 9 | features = ["time", "defmt"] |
| 10 | flavors = [ | 10 | flavors = [ |
| 11 | { name = "sx127x", target = "thumbv7em-none-eabihf", features = ["sx127x", "embassy-stm32/stm32wl55jc-cm4", "embassy-stm32/time-driver-any"] }, | 11 | { name = "sx127x", target = "thumbv7em-none-eabihf", features = ["sx127x", "embassy-stm32/stm32wl55jc-cm4", "embassy-stm32/time-driver-any", "embassy/time-tick-32768hz"] }, |
| 12 | { name = "stm32wl", target = "thumbv7em-none-eabihf", features = ["stm32wl", "embassy-stm32/stm32wl55jc-cm4", "embassy-stm32/time-driver-any"] }, | 12 | { name = "stm32wl", target = "thumbv7em-none-eabihf", features = ["stm32wl", "embassy-stm32/stm32wl55jc-cm4", "embassy-stm32/time-driver-any", "embassy/time-tick-32768hz"] }, |
| 13 | ] | 13 | ] |
| 14 | 14 | ||
| 15 | [lib] | 15 | [lib] |
diff --git a/embassy-net/Cargo.toml b/embassy-net/Cargo.toml index 279313240..70acc7e4e 100644 --- a/embassy-net/Cargo.toml +++ b/embassy-net/Cargo.toml | |||
| @@ -6,8 +6,8 @@ edition = "2021" | |||
| 6 | 6 | ||
| 7 | [package.metadata.embassy_docs] | 7 | [package.metadata.embassy_docs] |
| 8 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-net-v$VERSION/embassy-net/src/" | 8 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-net-v$VERSION/embassy-net/src/" |
| 9 | src_base_git = "https://github.com/embassy-rs/embassy/blob/master/embassy-net/src/" | 9 | src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-net/src/" |
| 10 | features = [ "tcp", "dhcpv4", "medium-ethernet", "medium-ip", "embassy/time", "embassy/time-tick-1mhz"] | 10 | features = [ "pool-4", "defmt", "tcp", "dns", "dhcpv4", "proto-ipv6", "medium-ethernet", "medium-ip", "embassy/time", "embassy/time-tick-1mhz"] |
| 11 | flavors = [ | 11 | flavors = [ |
| 12 | { name = "default", target = "thumbv7em-none-eabihf" }, | 12 | { name = "default", target = "thumbv7em-none-eabihf" }, |
| 13 | ] | 13 | ] |
diff --git a/embassy-nrf/Cargo.toml b/embassy-nrf/Cargo.toml index b148d2c56..887ea1bd2 100644 --- a/embassy-nrf/Cargo.toml +++ b/embassy-nrf/Cargo.toml | |||
| @@ -5,7 +5,7 @@ edition = "2021" | |||
| 5 | 5 | ||
| 6 | [package.metadata.embassy_docs] | 6 | [package.metadata.embassy_docs] |
| 7 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-nrf-v$VERSION/embassy-nrf/src/" | 7 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-nrf-v$VERSION/embassy-nrf/src/" |
| 8 | src_base_git = "https://github.com/embassy-rs/embassy/blob/master/embassy-nrf/src/" | 8 | src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-nrf/src/" |
| 9 | 9 | ||
| 10 | features = ["nightly", "defmt", "unstable-pac", "unstable-traits", "gpiote", "time-driver-rtc1"] | 10 | features = ["nightly", "defmt", "unstable-pac", "unstable-traits", "gpiote", "time-driver-rtc1"] |
| 11 | flavors = [ | 11 | flavors = [ |
| @@ -79,7 +79,6 @@ defmt = { version = "0.3", optional = true } | |||
| 79 | log = { version = "0.4.14", optional = true } | 79 | log = { version = "0.4.14", optional = true } |
| 80 | cortex-m-rt = ">=0.6.15,<0.8" | 80 | cortex-m-rt = ">=0.6.15,<0.8" |
| 81 | cortex-m = "0.7.3" | 81 | cortex-m = "0.7.3" |
| 82 | embedded-dma = "0.1.2" | ||
| 83 | futures = { version = "0.3.17", default-features = false } | 82 | futures = { version = "0.3.17", default-features = false } |
| 84 | critical-section = "0.2.5" | 83 | critical-section = "0.2.5" |
| 85 | rand_core = "0.6.3" | 84 | rand_core = "0.6.3" |
diff --git a/embassy-rp/Cargo.toml b/embassy-rp/Cargo.toml index 1c572b619..217221b0e 100644 --- a/embassy-rp/Cargo.toml +++ b/embassy-rp/Cargo.toml | |||
| @@ -5,7 +5,7 @@ edition = "2021" | |||
| 5 | 5 | ||
| 6 | [package.metadata.embassy_docs] | 6 | [package.metadata.embassy_docs] |
| 7 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-rp-v$VERSION/embassy-rp/src/" | 7 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-rp-v$VERSION/embassy-rp/src/" |
| 8 | src_base_git = "https://github.com/embassy-rs/embassy/blob/master/embassy-rp/src/" | 8 | src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-rp/src/" |
| 9 | features = ["nightly", "defmt", "unstable-pac", "unstable-traits"] | 9 | features = ["nightly", "defmt", "unstable-pac", "unstable-traits"] |
| 10 | flavors = [ | 10 | flavors = [ |
| 11 | { name = "rp2040", target = "thumbv6m-none-eabi" }, | 11 | { name = "rp2040", target = "thumbv6m-none-eabi" }, |
diff --git a/embassy-stm32/Cargo.toml b/embassy-stm32/Cargo.toml index 88c0f42f7..2c1007b40 100644 --- a/embassy-stm32/Cargo.toml +++ b/embassy-stm32/Cargo.toml | |||
| @@ -5,12 +5,12 @@ edition = "2021" | |||
| 5 | 5 | ||
| 6 | [package.metadata.embassy_docs] | 6 | [package.metadata.embassy_docs] |
| 7 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-stm32-v$VERSION/embassy-stm32/src/" | 7 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-stm32-v$VERSION/embassy-stm32/src/" |
| 8 | src_base_git = "https://github.com/embassy-rs/embassy/blob/master/embassy-stm32/src/" | 8 | src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-stm32/src/" |
| 9 | 9 | ||
| 10 | # TODO: sdmmc | 10 | # TODO: sdmmc |
| 11 | # TODO: net | 11 | # TODO: net |
| 12 | # TODO: subghz | 12 | # TODO: subghz |
| 13 | features = ["nightly", "defmt", "unstable-pac", "unstable-traits", "exti", "time-driver-any"] | 13 | features = ["nightly", "defmt", "unstable-pac", "unstable-traits", "exti", "time-driver-any", "embassy/time-tick-32768hz"] |
| 14 | flavors = [ | 14 | flavors = [ |
| 15 | { regex_feature = "stm32f0.*", target = "thumbv6m-none-eabi" }, | 15 | { regex_feature = "stm32f0.*", target = "thumbv6m-none-eabi" }, |
| 16 | { regex_feature = "stm32f1.*", target = "thumbv7m-none-eabi" }, | 16 | { regex_feature = "stm32f1.*", target = "thumbv7m-none-eabi" }, |
diff --git a/embassy-stm32/src/rcc/f1.rs b/embassy-stm32/src/rcc/f1.rs index ca0883b4a..8e2e6684a 100644 --- a/embassy-stm32/src/rcc/f1.rs +++ b/embassy-stm32/src/rcc/f1.rs | |||
| @@ -2,7 +2,7 @@ use core::convert::TryFrom; | |||
| 2 | 2 | ||
| 3 | use super::{set_freqs, Clocks}; | 3 | use super::{set_freqs, Clocks}; |
| 4 | use crate::pac::flash::vals::Latency; | 4 | use crate::pac::flash::vals::Latency; |
| 5 | use crate::pac::rcc::vals::{Adcpre, Hpre, Pllmul, Pllsrc, Ppre1, Sw, Usbpre}; | 5 | use crate::pac::rcc::vals::*; |
| 6 | use crate::pac::{FLASH, RCC}; | 6 | use crate::pac::{FLASH, RCC}; |
| 7 | use crate::time::Hertz; | 7 | use crate::time::Hertz; |
| 8 | 8 | ||
| @@ -110,6 +110,7 @@ pub(crate) unsafe fn init(config: Config) { | |||
| 110 | // the USB clock is only valid if an external crystal is used, the PLL is enabled, and the | 110 | // the USB clock is only valid if an external crystal is used, the PLL is enabled, and the |
| 111 | // PLL output frequency is a supported one. | 111 | // PLL output frequency is a supported one. |
| 112 | // usbpre == false: divide clock by 1.5, otherwise no division | 112 | // usbpre == false: divide clock by 1.5, otherwise no division |
| 113 | #[cfg(not(rcc_f100))] | ||
| 113 | let (usbpre, _usbclk_valid) = match (config.hse, pllmul_bits, real_sysclk) { | 114 | let (usbpre, _usbclk_valid) = match (config.hse, pllmul_bits, real_sysclk) { |
| 114 | (Some(_), Some(_), 72_000_000) => (false, true), | 115 | (Some(_), Some(_), 72_000_000) => (false, true), |
| 115 | (Some(_), Some(_), 48_000_000) => (true, true), | 116 | (Some(_), Some(_), 48_000_000) => (true, true), |
| @@ -154,6 +155,7 @@ pub(crate) unsafe fn init(config: Config) { | |||
| 154 | w.set_ppre2(Ppre1(ppre2_bits)); | 155 | w.set_ppre2(Ppre1(ppre2_bits)); |
| 155 | w.set_ppre1(Ppre1(ppre1_bits)); | 156 | w.set_ppre1(Ppre1(ppre1_bits)); |
| 156 | w.set_hpre(Hpre(hpre_bits)); | 157 | w.set_hpre(Hpre(hpre_bits)); |
| 158 | #[cfg(not(rcc_f100))] | ||
| 157 | w.set_usbpre(Usbpre(usbpre as u8)); | 159 | w.set_usbpre(Usbpre(usbpre as u8)); |
| 158 | w.set_sw(Sw(if pllmul_bits.is_some() { | 160 | w.set_sw(Sw(if pllmul_bits.is_some() { |
| 159 | // PLL | 161 | // PLL |
diff --git a/embassy-stm32/src/rcc/mod.rs b/embassy-stm32/src/rcc/mod.rs index 866b1ffc4..1b1180c03 100644 --- a/embassy-stm32/src/rcc/mod.rs +++ b/embassy-stm32/src/rcc/mod.rs | |||
| @@ -5,7 +5,7 @@ use core::mem::MaybeUninit; | |||
| 5 | use crate::time::Hertz; | 5 | use crate::time::Hertz; |
| 6 | 6 | ||
| 7 | #[cfg_attr(rcc_f0, path = "f0.rs")] | 7 | #[cfg_attr(rcc_f0, path = "f0.rs")] |
| 8 | #[cfg_attr(any(rcc_f1, rcc_f1cl), path = "f1.rs")] | 8 | #[cfg_attr(any(rcc_f1, rcc_f100, rcc_f1cl), path = "f1.rs")] |
| 9 | #[cfg_attr(rcc_f2, path = "f2.rs")] | 9 | #[cfg_attr(rcc_f2, path = "f2.rs")] |
| 10 | #[cfg_attr(rcc_f3, path = "f3.rs")] | 10 | #[cfg_attr(rcc_f3, path = "f3.rs")] |
| 11 | #[cfg_attr(any(rcc_f4, rcc_f410), path = "f4.rs")] | 11 | #[cfg_attr(any(rcc_f4, rcc_f410), path = "f4.rs")] |
diff --git a/embassy-stm32/src/usb/usb.rs b/embassy-stm32/src/usb/usb.rs index 10eb94e6c..cadbb423c 100644 --- a/embassy-stm32/src/usb/usb.rs +++ b/embassy-stm32/src/usb/usb.rs | |||
| @@ -141,7 +141,7 @@ impl<'d, T: Instance> Driver<'d, T> { | |||
| 141 | unsafe { | 141 | unsafe { |
| 142 | crate::peripherals::PWR::enable(); | 142 | crate::peripherals::PWR::enable(); |
| 143 | 143 | ||
| 144 | pac::PWR.cr2().modify(|w| w.set_usv(pac::pwr::vals::Usv::VALID)); | 144 | pac::PWR.cr2().modify(|w| w.set_usv(true)); |
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | unsafe { | 147 | unsafe { |
diff --git a/embassy-usb-hid/Cargo.toml b/embassy-usb-hid/Cargo.toml index c5181325b..b8185fa5a 100644 --- a/embassy-usb-hid/Cargo.toml +++ b/embassy-usb-hid/Cargo.toml | |||
| @@ -5,7 +5,7 @@ edition = "2021" | |||
| 5 | 5 | ||
| 6 | [package.metadata.embassy_docs] | 6 | [package.metadata.embassy_docs] |
| 7 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-usb-hid-v$VERSION/embassy-usb-hid/src/" | 7 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-usb-hid-v$VERSION/embassy-usb-hid/src/" |
| 8 | src_base_git = "https://github.com/embassy-rs/embassy/blob/master/embassy-usb-hid/src/" | 8 | src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-usb-hid/src/" |
| 9 | features = ["defmt", "embassy/time-tick-1mhz"] | 9 | features = ["defmt", "embassy/time-tick-1mhz"] |
| 10 | flavors = [ | 10 | flavors = [ |
| 11 | { name = "default", target = "thumbv7em-none-eabihf" }, | 11 | { name = "default", target = "thumbv7em-none-eabihf" }, |
diff --git a/embassy-usb-ncm/Cargo.toml b/embassy-usb-ncm/Cargo.toml index aaef01d6d..636a81c2c 100644 --- a/embassy-usb-ncm/Cargo.toml +++ b/embassy-usb-ncm/Cargo.toml | |||
| @@ -5,7 +5,7 @@ edition = "2021" | |||
| 5 | 5 | ||
| 6 | [package.metadata.embassy_docs] | 6 | [package.metadata.embassy_docs] |
| 7 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-usb-ncm-v$VERSION/embassy-usb-ncm/src/" | 7 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-usb-ncm-v$VERSION/embassy-usb-ncm/src/" |
| 8 | src_base_git = "https://github.com/embassy-rs/embassy/blob/master/embassy-usb-ncm/src/" | 8 | src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-usb-ncm/src/" |
| 9 | features = ["defmt"] | 9 | features = ["defmt"] |
| 10 | flavors = [ | 10 | flavors = [ |
| 11 | { name = "default", target = "thumbv7em-none-eabihf" }, | 11 | { name = "default", target = "thumbv7em-none-eabihf" }, |
diff --git a/embassy-usb-serial/Cargo.toml b/embassy-usb-serial/Cargo.toml index 553f2a13c..682707afe 100644 --- a/embassy-usb-serial/Cargo.toml +++ b/embassy-usb-serial/Cargo.toml | |||
| @@ -5,7 +5,7 @@ edition = "2021" | |||
| 5 | 5 | ||
| 6 | [package.metadata.embassy_docs] | 6 | [package.metadata.embassy_docs] |
| 7 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-usb-serial-v$VERSION/embassy-usb-serial/src/" | 7 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-usb-serial-v$VERSION/embassy-usb-serial/src/" |
| 8 | src_base_git = "https://github.com/embassy-rs/embassy/blob/master/embassy-usb-serial/src/" | 8 | src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-usb-serial/src/" |
| 9 | features = ["defmt"] | 9 | features = ["defmt"] |
| 10 | flavors = [ | 10 | flavors = [ |
| 11 | { name = "default", target = "thumbv7em-none-eabihf" }, | 11 | { name = "default", target = "thumbv7em-none-eabihf" }, |
diff --git a/embassy-usb/Cargo.toml b/embassy-usb/Cargo.toml index 48c205064..513dc8c1f 100644 --- a/embassy-usb/Cargo.toml +++ b/embassy-usb/Cargo.toml | |||
| @@ -5,7 +5,7 @@ edition = "2021" | |||
| 5 | 5 | ||
| 6 | [package.metadata.embassy_docs] | 6 | [package.metadata.embassy_docs] |
| 7 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-usb-v$VERSION/embassy-usb/src/" | 7 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-usb-v$VERSION/embassy-usb/src/" |
| 8 | src_base_git = "https://github.com/embassy-rs/embassy/blob/master/embassy-usb/src/" | 8 | src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-usb/src/" |
| 9 | features = ["defmt"] | 9 | features = ["defmt"] |
| 10 | flavors = [ | 10 | flavors = [ |
| 11 | { name = "default", target = "thumbv7em-none-eabihf" }, | 11 | { name = "default", target = "thumbv7em-none-eabihf" }, |
diff --git a/embassy/Cargo.toml b/embassy/Cargo.toml index d2c96e30d..a5d36c10c 100644 --- a/embassy/Cargo.toml +++ b/embassy/Cargo.toml | |||
| @@ -5,7 +5,7 @@ edition = "2021" | |||
| 5 | 5 | ||
| 6 | [package.metadata.embassy_docs] | 6 | [package.metadata.embassy_docs] |
| 7 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-v$VERSION/embassy/src/" | 7 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-v$VERSION/embassy/src/" |
| 8 | src_base_git = "https://github.com/embassy-rs/embassy/blob/master/embassy/src/" | 8 | src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy/src/" |
| 9 | features = ["nightly", "defmt", "unstable-traits", "time", "time-tick-1mhz"] | 9 | features = ["nightly", "defmt", "unstable-traits", "time", "time-tick-1mhz"] |
| 10 | flavors = [ | 10 | flavors = [ |
| 11 | { name = "std", target = "x86_64-unknown-linux-gnu", features = ["std"] }, | 11 | { name = "std", target = "x86_64-unknown-linux-gnu", features = ["std"] }, |
diff --git a/stm32-data b/stm32-data | |||
| Subproject fa294eae79c0f33f4cde1e73b4e69db59f7429e | Subproject 56d5b8b2aee7026b4f9bcffc427bb8f9d48afeb | ||
diff --git a/stm32-metapac-gen/src/lib.rs b/stm32-metapac-gen/src/lib.rs index 0d761508f..9bd60cb79 100644 --- a/stm32-metapac-gen/src/lib.rs +++ b/stm32-metapac-gen/src/lib.rs | |||
| @@ -117,13 +117,12 @@ impl Gen { | |||
| 117 | write!(&mut extra, "pub const CORE_INDEX: usize = {};\n", core_index).unwrap(); | 117 | write!(&mut extra, "pub const CORE_INDEX: usize = {};\n", core_index).unwrap(); |
| 118 | 118 | ||
| 119 | let flash = chip.memory.iter().find(|r| r.name == "BANK_1").unwrap(); | 119 | let flash = chip.memory.iter().find(|r| r.name == "BANK_1").unwrap(); |
| 120 | write!(&mut extra, "pub const FLASH_BASE: usize = {};\n", flash.address,).unwrap(); | 120 | let settings = flash.settings.as_ref().unwrap(); |
| 121 | write!(&mut extra, "pub const FLASH_SIZE: usize = {};\n", flash.size,).unwrap(); | 121 | write!(&mut extra, "pub const FLASH_BASE: usize = {};\n", flash.address).unwrap(); |
| 122 | if let Some(settings) = &flash.settings { | 122 | write!(&mut extra, "pub const FLASH_SIZE: usize = {};\n", flash.size).unwrap(); |
| 123 | write!(&mut extra, "pub const ERASE_SIZE: usize = {};\n", settings.erase_size,).unwrap(); | 123 | write!(&mut extra, "pub const ERASE_SIZE: usize = {};\n", settings.erase_size).unwrap(); |
| 124 | write!(&mut extra, "pub const WRITE_SIZE: usize = {};\n", settings.write_size,).unwrap(); | 124 | write!(&mut extra, "pub const WRITE_SIZE: usize = {};\n", settings.write_size).unwrap(); |
| 125 | write!(&mut extra, "pub const ERASE_VALUE: u8 = {};\n", settings.erase_value,).unwrap(); | 125 | write!(&mut extra, "pub const ERASE_VALUE: u8 = {};\n", settings.erase_value).unwrap(); |
| 126 | } | ||
| 127 | 126 | ||
| 128 | // Cleanups! | 127 | // Cleanups! |
| 129 | transform::sort::Sort {}.run(&mut ir).unwrap(); | 128 | transform::sort::Sort {}.run(&mut ir).unwrap(); |
