Using GPIOA_IDR directly looks a bit arcane, and the example can benefit from introducing gpio_get() and how to use it. The stm32f0-discovery example already does it like this.
1.9 KiB
1.9 KiB