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.
README
This example blinks LED1 on the WaveShare Open103R eval board.
When you press the 'USER' button, the blinking is slower.