mirror of
https://github.com/embassy-rs/embassy.git
synced 2025-09-27 04:10:25 +00:00
Merge pull request #3792 from adamgreig/stm32-clkmux-unreachable
stm32: Change unreachable panic to explicit error message when access…
This commit is contained in:
commit
195b1a593a
@ -532,7 +532,11 @@ fn main() {
|
||||
match crate::pac::RCC.#fieldset_name().read().#field_name() {
|
||||
#match_arms
|
||||
#[allow(unreachable_patterns)]
|
||||
_ => unreachable!(),
|
||||
_ => panic!(
|
||||
"attempted to use peripheral '{}' but its clock mux is not set to a valid \
|
||||
clock. Change 'config.rcc.mux' to another clock.",
|
||||
#peripheral
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user