diff options
| author | Dario Nieuwenhuis <[email protected]> | 2024-05-21 23:18:31 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2024-05-21 23:22:47 +0200 |
| commit | afd61ed610293b1f41bc926bf3a0fa35d78a8815 (patch) | |
| tree | 01143a6d7a93f074d638a1acc32fa04d82370ddb /embassy-stm32 | |
| parent | 7d350fb4c8133d7569f3b0873a7120e3a7832dcd (diff) | |
stm32/hsem: misc fixes.
Diffstat (limited to 'embassy-stm32')
| -rw-r--r-- | embassy-stm32/Cargo.toml | 4 | ||||
| -rw-r--r-- | embassy-stm32/src/hsem/mod.rs | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/embassy-stm32/Cargo.toml b/embassy-stm32/Cargo.toml index a7137d132..5ef2366d9 100644 --- a/embassy-stm32/Cargo.toml +++ b/embassy-stm32/Cargo.toml | |||
| @@ -72,7 +72,7 @@ rand_core = "0.6.3" | |||
| 72 | sdio-host = "0.5.0" | 72 | sdio-host = "0.5.0" |
| 73 | critical-section = "1.1" | 73 | critical-section = "1.1" |
| 74 | #stm32-metapac = { version = "15" } | 74 | #stm32-metapac = { version = "15" } |
| 75 | stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-f1297385e91f061fcb6134bb25f51e12d8abff93" } | 75 | stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-34c0188a682b32c32ff147d377e0629b1ebe8318" } |
| 76 | 76 | ||
| 77 | vcell = "0.1.3" | 77 | vcell = "0.1.3" |
| 78 | nb = "1.0.0" | 78 | nb = "1.0.0" |
| @@ -97,7 +97,7 @@ proc-macro2 = "1.0.36" | |||
| 97 | quote = "1.0.15" | 97 | quote = "1.0.15" |
| 98 | 98 | ||
| 99 | #stm32-metapac = { version = "15", default-features = false, features = ["metadata"]} | 99 | #stm32-metapac = { version = "15", default-features = false, features = ["metadata"]} |
| 100 | stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-f1297385e91f061fcb6134bb25f51e12d8abff93", default-features = false, features = ["metadata"]} | 100 | stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-34c0188a682b32c32ff147d377e0629b1ebe8318", default-features = false, features = ["metadata"]} |
| 101 | 101 | ||
| 102 | [features] | 102 | [features] |
| 103 | default = ["rt"] | 103 | default = ["rt"] |
diff --git a/embassy-stm32/src/hsem/mod.rs b/embassy-stm32/src/hsem/mod.rs index cc30302b9..b77a3415b 100644 --- a/embassy-stm32/src/hsem/mod.rs +++ b/embassy-stm32/src/hsem/mod.rs | |||
| @@ -21,7 +21,7 @@ pub enum HsemError { | |||
| 21 | /// chip family (i.e. stm32h747 see rm0399 table 95) | 21 | /// chip family (i.e. stm32h747 see rm0399 table 95) |
| 22 | #[derive(Debug, PartialEq, Eq, Clone, Copy, Hash)] | 22 | #[derive(Debug, PartialEq, Eq, Clone, Copy, Hash)] |
| 23 | #[repr(u8)] | 23 | #[repr(u8)] |
| 24 | #[derive(defmt::Format)] | 24 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] |
| 25 | pub enum CoreId { | 25 | pub enum CoreId { |
| 26 | #[cfg(any(stm32h745, stm32h747, stm32h755, stm32h757))] | 26 | #[cfg(any(stm32h745, stm32h747, stm32h755, stm32h757))] |
| 27 | /// Cortex-M7, core 1. | 27 | /// Cortex-M7, core 1. |
| @@ -36,7 +36,7 @@ pub enum CoreId { | |||
| 36 | Core0 = 0x4, | 36 | Core0 = 0x4, |
| 37 | 37 | ||
| 38 | #[cfg(any(stm32wb, stm32wl))] | 38 | #[cfg(any(stm32wb, stm32wl))] |
| 39 | // Cortex-M0+, core 2. | 39 | /// Cortex-M0+, core 2. |
| 40 | Core1 = 0x8, | 40 | Core1 = 0x8, |
| 41 | } | 41 | } |
| 42 | 42 | ||
| @@ -66,6 +66,7 @@ pub fn get_current_coreid() -> CoreId { | |||
| 66 | fn core_id_to_index(core: CoreId) -> usize { | 66 | fn core_id_to_index(core: CoreId) -> usize { |
| 67 | match core { | 67 | match core { |
| 68 | CoreId::Core0 => 0, | 68 | CoreId::Core0 => 0, |
| 69 | #[cfg(any(stm32h745, stm32h747, stm32h755, stm32h757, stm32wb, stm32wl))] | ||
| 69 | CoreId::Core1 => 1, | 70 | CoreId::Core1 => 1, |
| 70 | } | 71 | } |
| 71 | } | 72 | } |
