mirror of
https://github.com/embassy-rs/embassy.git
synced 2025-10-02 06:40:32 +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 crate::pac::RCC.#fieldset_name().read().#field_name() {
|
||||||
#match_arms
|
#match_arms
|
||||||
#[allow(unreachable_patterns)]
|
#[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