diff options
| author | Dario Nieuwenhuis <[email protected]> | 2025-01-22 01:22:37 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-01-22 01:22:37 +0000 |
| commit | 195b1a593a4f51ebc7ae61b5045c620a1dbd25d8 (patch) | |
| tree | a9a34895be206aafad689e1c16d7ef3356846df9 | |
| parent | 010d4622f988de813ecddf69b84273f72ab122cf (diff) | |
| parent | da8612e95b93eff0720150317848694a76418151 (diff) | |
Merge pull request #3792 from adamgreig/stm32-clkmux-unreachable
stm32: Change unreachable panic to explicit error message when access…
| -rw-r--r-- | embassy-stm32/build.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/embassy-stm32/build.rs b/embassy-stm32/build.rs index 78569f7da..21cdfee50 100644 --- a/embassy-stm32/build.rs +++ b/embassy-stm32/build.rs | |||
| @@ -532,7 +532,11 @@ fn main() { | |||
| 532 | match crate::pac::RCC.#fieldset_name().read().#field_name() { | 532 | match crate::pac::RCC.#fieldset_name().read().#field_name() { |
| 533 | #match_arms | 533 | #match_arms |
| 534 | #[allow(unreachable_patterns)] | 534 | #[allow(unreachable_patterns)] |
| 535 | _ => unreachable!(), | 535 | _ => panic!( |
| 536 | "attempted to use peripheral '{}' but its clock mux is not set to a valid \ | ||
| 537 | clock. Change 'config.rcc.mux' to another clock.", | ||
| 538 | #peripheral | ||
| 539 | ) | ||
| 536 | } | 540 | } |
| 537 | } | 541 | } |
| 538 | } | 542 | } |
