It would be useful to have an example showing how to use the EXTI traits for a GPIO input pin.
While writing this example, I also noticed that ExtiPin::make_interrupt_source will not work unless we configure the SYSCFG bit of apb2enr in the RCC. It would be nice if this bit was enabled by default when we callmake_interrupt_source, however since this is a larger "system level" configuration maybe it does not belong in gpio.rs? A simple solution may to just make APB2::enr in rcc.rs public to the user instead of just public to the crate.
It would be useful to have an example showing how to use the EXTI traits for a GPIO input pin.
While writing this example, I also noticed that
ExtiPin::make_interrupt_source
will not work unless we configure the SYSCFG bit ofapb2enr
in the RCC. It would be nice if this bit was enabled by default when we callmake_interrupt_source
, however since this is a larger "system level" configuration maybe it does not belong ingpio.rs
? A simple solution may to just makeAPB2::enr
inrcc.rs
public to the user instead of just public to the crate.I'll open a pull request to make this more clear.