main.c : button detection

This commit is contained in:
Charlez Kwan 2020-01-21 15:21:40 +01:00
parent afe2d53178
commit d744215c24

View file

@ -195,6 +195,15 @@ int main(void)
EPD_Display(BlackImage); EPD_Display(BlackImage);
DEV_Delay_ms(1000); //Analog clock 1s DEV_Delay_ms(1000); //Analog clock 1s
// printf("500ms..\r\n"); // printf("500ms..\r\n");
if(!HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_12)){
ButtonLeft_Pressed();
}
if(!HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_13)){
ButtonPress_Pressed();
}
if(!HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_14)){
ButtonRight_Pressed();
}
} }