Initial STM32F1 family support with two examples for STM32F103C8 (Blue Pill)
This commit is contained in:
@ -30,7 +30,7 @@ fn cpu_regs() -> pac::exti::Exti {
|
||||
EXTI
|
||||
}
|
||||
|
||||
#[cfg(not(any(exti_g0, exti_l5)))]
|
||||
#[cfg(not(any(exti_g0, exti_l5, gpio_v1)))]
|
||||
fn exticr_regs() -> pac::syscfg::Syscfg {
|
||||
pac::SYSCFG
|
||||
}
|
||||
@ -38,6 +38,10 @@ fn exticr_regs() -> pac::syscfg::Syscfg {
|
||||
fn exticr_regs() -> pac::exti::Exti {
|
||||
EXTI
|
||||
}
|
||||
#[cfg(gpio_v1)]
|
||||
fn exticr_regs() -> pac::afio::Afio {
|
||||
pac::AFIO
|
||||
}
|
||||
|
||||
pub unsafe fn on_irq() {
|
||||
#[cfg(not(any(exti_g0, exti_l5)))]
|
||||
@ -296,6 +300,8 @@ pub(crate) unsafe fn init() {
|
||||
|
||||
foreach_exti_irq!(enable_irq);
|
||||
|
||||
#[cfg(not(any(rcc_wb, rcc_wl5)))]
|
||||
#[cfg(not(any(rcc_wb, rcc_wl5, rcc_f1)))]
|
||||
<crate::peripherals::SYSCFG as crate::rcc::sealed::RccPeripheral>::enable();
|
||||
#[cfg(rcc_f1)]
|
||||
<crate::peripherals::AFIO as crate::rcc::sealed::RccPeripheral>::enable();
|
||||
}
|
||||
|
Reference in New Issue
Block a user