From d744215c2463c4304a4061a0e49fb598d0a6c5ef Mon Sep 17 00:00:00 2001 From: Charlez Kwan Date: Tue, 21 Jan 2020 15:21:40 +0100 Subject: [PATCH] main.c : button detection --- Src/main.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Src/main.c b/Src/main.c index d7853fd..547204f 100644 --- a/Src/main.c +++ b/Src/main.c @@ -195,6 +195,15 @@ int main(void) EPD_Display(BlackImage); DEV_Delay_ms(1000); //Analog clock 1s // 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(); + } }