Merge pull request #3792 from adamgreig/stm32-clkmux-unreachable

stm32: Change unreachable panic to explicit error message when access…
This commit is contained in:
Dario Nieuwenhuis
2025-01-22 01:22:37 +00:00
committed by GitHub

View File

@@ -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
)
}
}
}