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/src/hsem | |
| parent | 7d350fb4c8133d7569f3b0873a7120e3a7832dcd (diff) | |
stm32/hsem: misc fixes.
Diffstat (limited to 'embassy-stm32/src/hsem')
| -rw-r--r-- | embassy-stm32/src/hsem/mod.rs | 5 |
1 files changed, 3 insertions, 2 deletions
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 | } |
