Fix gcc warnings, read button status from GPIOA_IDR.