Merge pull request #2109 from rmja/stm32-remove-unsafe-warning

stm32: Remove unneeded unsafe
This commit is contained in:
Ulf Lilleengen 2023-10-24 06:32:22 +00:00 committed by GitHub
commit 1a51a84313
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -465,7 +465,7 @@ pub(crate) fn assert_not_corrupted_read(end_address: u32) {
feature = "stm32f439vg", feature = "stm32f439vg",
feature = "stm32f439zg", feature = "stm32f439zg",
))] ))]
if second_bank_read && unsafe { pac::DBGMCU.idcode().read().rev_id() < REVISION_3 && !pa12_is_output_pull_low() } { if second_bank_read && pac::DBGMCU.idcode().read().rev_id() < REVISION_3 && !pa12_is_output_pull_low() {
panic!("Read corruption for stm32f42xxG and stm32f43xxG in dual bank mode when PA12 is in use for chips below revision 3, see errata 2.2.11"); panic!("Read corruption for stm32f42xxG and stm32f43xxG in dual bank mode when PA12 is in use for chips below revision 3, see errata 2.2.11");
} }
} }