STM32 Bootloader
Customizable Bootloader for STM32 microcontrollers
button.c
Go to the documentation of this file.
1 
25 /* Includes ------------------------------------------------------------------*/
26 #include "button.h"
27 
28 #include "board.h"
29 #include "mcu_hal.h"
30 
31 /* Functions -----------------------------------------------------------------*/
32 bool ButtonIsPressed(void)
33 {
34  return (BUTTON_GPIO_PRESSED_STATE ==
35  HAL_GPIO_ReadPin(BUTTON_GPIO_PORT, BUTTON_GPIO_PIN));
36 }
37 
This file contains the board-specific GPIO pin definitions, peripheral configurations,...
This file contains the push button driver function prototypes for the STM32L496 Discovery board.
#define BUTTON_GPIO_PIN
Definition: board.h:80
#define BUTTON_GPIO_PORT
Definition: board.h:77
#define BUTTON_GPIO_PRESSED_STATE
Definition: board.h:83
bool ButtonIsPressed(void)
Check whether the joystick center button is currently pressed.
Definition: button.c:32
This file includes the microcontroller-specific HAL header files.