diff options
| -rw-r--r-- | embassy-stm32/src/exti.rs | 6 | ||||
| -rw-r--r-- | embassy-stm32/src/rcc/n6.rs | 12 |
2 files changed, 12 insertions, 6 deletions
diff --git a/embassy-stm32/src/exti.rs b/embassy-stm32/src/exti.rs index 83e0ecf88..cb46d362c 100644 --- a/embassy-stm32/src/exti.rs +++ b/embassy-stm32/src/exti.rs | |||
| @@ -5,13 +5,13 @@ use core::marker::PhantomData; | |||
| 5 | use core::pin::Pin; | 5 | use core::pin::Pin; |
| 6 | use core::task::{Context, Poll}; | 6 | use core::task::{Context, Poll}; |
| 7 | 7 | ||
| 8 | use embassy_hal_internal::{impl_peripheral, PeripheralType}; | 8 | use embassy_hal_internal::{PeripheralType, impl_peripheral}; |
| 9 | use embassy_sync::waitqueue::AtomicWaker; | 9 | use embassy_sync::waitqueue::AtomicWaker; |
| 10 | 10 | ||
| 11 | use crate::gpio::{AnyPin, Input, Level, Pin as GpioPin, PinNumber, Pull}; | 11 | use crate::gpio::{AnyPin, Input, Level, Pin as GpioPin, PinNumber, Pull}; |
| 12 | use crate::pac::exti::regs::Lines; | ||
| 13 | use crate::pac::EXTI; | 12 | use crate::pac::EXTI; |
| 14 | use crate::{interrupt, pac, peripherals, Peri}; | 13 | use crate::pac::exti::regs::Lines; |
| 14 | use crate::{Peri, interrupt, pac, peripherals}; | ||
| 15 | 15 | ||
| 16 | const EXTI_COUNT: usize = 16; | 16 | const EXTI_COUNT: usize = 16; |
| 17 | static EXTI_WAKERS: [AtomicWaker; EXTI_COUNT] = [const { AtomicWaker::new() }; EXTI_COUNT]; | 17 | static EXTI_WAKERS: [AtomicWaker; EXTI_COUNT] = [const { AtomicWaker::new() }; EXTI_COUNT]; |
diff --git a/embassy-stm32/src/rcc/n6.rs b/embassy-stm32/src/rcc/n6.rs index 5e66e1e86..c9c874e75 100644 --- a/embassy-stm32/src/rcc/n6.rs +++ b/embassy-stm32/src/rcc/n6.rs | |||
| @@ -770,7 +770,9 @@ fn init_osc(config: Config) -> OscOutput { | |||
| 770 | || (pll3_src == Pllsel::HSE && rcc_sr.pllrdy(2)) | 770 | || (pll3_src == Pllsel::HSE && rcc_sr.pllrdy(2)) |
| 771 | || (pll4_src == Pllsel::HSE && rcc_sr.pllrdy(3)) | 771 | || (pll4_src == Pllsel::HSE && rcc_sr.pllrdy(3)) |
| 772 | { | 772 | { |
| 773 | panic!("When the HSE is used as cpu/system bus clock or clock source for any PLL, it is not allowed to be disabled"); | 773 | panic!( |
| 774 | "When the HSE is used as cpu/system bus clock or clock source for any PLL, it is not allowed to be disabled" | ||
| 775 | ); | ||
| 774 | } else { | 776 | } else { |
| 775 | debug!("HSE off"); | 777 | debug!("HSE off"); |
| 776 | 778 | ||
| @@ -806,7 +808,9 @@ fn init_osc(config: Config) -> OscOutput { | |||
| 806 | || (pll3_src == Pllsel::HSI && rcc_sr.pllrdy(2)) | 808 | || (pll3_src == Pllsel::HSI && rcc_sr.pllrdy(2)) |
| 807 | || (pll4_src == Pllsel::HSI && rcc_sr.pllrdy(3)) | 809 | || (pll4_src == Pllsel::HSI && rcc_sr.pllrdy(3)) |
| 808 | { | 810 | { |
| 809 | panic!("When the HSI is used as cpu/system bus clock or clock source for any PLL, it is not allowed to be disabled"); | 811 | panic!( |
| 812 | "When the HSI is used as cpu/system bus clock or clock source for any PLL, it is not allowed to be disabled" | ||
| 813 | ); | ||
| 810 | } else { | 814 | } else { |
| 811 | debug!("HSI off"); | 815 | debug!("HSI off"); |
| 812 | 816 | ||
| @@ -835,7 +839,9 @@ fn init_osc(config: Config) -> OscOutput { | |||
| 835 | || (pll3_src == Pllsel::MSI && rcc_sr.pllrdy(2)) | 839 | || (pll3_src == Pllsel::MSI && rcc_sr.pllrdy(2)) |
| 836 | || (pll4_src == Pllsel::MSI && rcc_sr.pllrdy(3)) | 840 | || (pll4_src == Pllsel::MSI && rcc_sr.pllrdy(3)) |
| 837 | { | 841 | { |
| 838 | panic!("When the MSI is used as cpu/system bus clock or clock source for any PLL, it is not allowed to be disabled"); | 842 | panic!( |
| 843 | "When the MSI is used as cpu/system bus clock or clock source for any PLL, it is not allowed to be disabled" | ||
| 844 | ); | ||
| 839 | } else { | 845 | } else { |
| 840 | RCC.ccr().write(|w| w.set_msionc(true)); | 846 | RCC.ccr().write(|w| w.set_msionc(true)); |
| 841 | while RCC.sr().read().msirdy() {} | 847 | while RCC.sr().read().msirdy() {} |
