TM STM32Fxxx HAL Libraries  v1.0.0
Libraries for STM32Fxxx (F0, F4 and F7 series) devices based on HAL drivers from ST from Tilen Majerle
_TM_BUTTON_t Struct Reference

Button structure. More...

#include <tm_stm32_button.h>

Data Fields

GPIO_TypeDef * GPIOx
 
uint16_t GPIO_Pin
 
uint8_t GPIO_State
 
void(* ButtonHandler )(struct _TM_BUTTON_t *, TM_BUTTON_PressType_t)
 
uint32_t StartTime
 
uint8_t LastStatus
 
uint8_t State
 
uint16_t PressDebounceTime
 
uint16_t PressNormalTime
 
uint16_t PressLongTime
 

Detailed Description

Button structure.

Field Documentation

void(* ButtonHandler) (struct _TM_BUTTON_t *, TM_BUTTON_PressType_t)

Button function handler

uint16_t GPIO_Pin

GPIO pin for button

uint8_t GPIO_State

GPIO state for pin when pressed

GPIO_TypeDef* GPIOx

GPIOx PORT for button

uint8_t LastStatus

Button status on last check

uint16_t PressDebounceTime

Time in ms for normal press for button

uint16_t PressLongTime

Time in ms for long press for button

uint16_t PressNormalTime

Time in ms for normal press for button

uint32_t StartTime

Time when button was pressed

uint8_t State

Current button state