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
board.h
This file contains the board-specific GPIO pin definitions, peripheral configurations,...
button.h
This file contains the push button driver function prototypes for the STM32L496 Discovery board.
BUTTON_GPIO_PIN
#define BUTTON_GPIO_PIN
Definition:
board.h:80
BUTTON_GPIO_PORT
#define BUTTON_GPIO_PORT
Definition:
board.h:77
BUTTON_GPIO_PRESSED_STATE
#define BUTTON_GPIO_PRESSED_STATE
Definition:
board.h:83
ButtonIsPressed
bool ButtonIsPressed(void)
Check whether the joystick center button is currently pressed.
Definition:
button.c:32
mcu_hal.h
This file includes the microcontroller-specific HAL header files.
bsp
stm32l496-discovery
source
button.c
Generated by
1.9.1