stm32-rs / stm32f7xx-hal

A Rust embedded-hal HAL for all MCUs in the STM32 F7 family
Apache License 2.0
115 stars 67 forks source link

Add EXTI Example and Provide RCC Support for SYSCFG Clock #68

Closed bbrown1867 closed 4 years ago

bbrown1867 commented 4 years ago

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.

I'll open a pull request to make this more clear.

mvertescher commented 4 years ago

This issue should be resolved now, thanks again @bbrown1867!