9 #include "push_button/app_push_button.h"
10 #include "config/hal.h"
40 volatile uint16_t retval = 1;
72 volatile uint16_t retval = 1;
73 static uint16_t press_cnt, release_cnt;
74 static bool pre_pressed =
false, pre_long_press =
false;
131 ((pre_pressed != pushbtn->
status.
bits.pressed) || (pre_long_press != pushbtn->
status.
bits.long_press));
134 pre_long_press = pushbtn->
status.
bits.long_press;
155 volatile uint16_t retval = 1;
#define SW_USER_Init()
Macro instruction initializing the specified GPIO as input.
#define SW_USER_Get()
Macro instruction to set a pin state to logic HIGH.
volatile uint16_t drv_PushButton_Execute(volatile struct PUSH_BUTTON_OBJECT_s *pushbtn)
Initializes the push button device driver.
volatile uint16_t drv_PushButton_Dispose(volatile struct PUSH_BUTTON_OBJECT_s *pushbtn)
Initializes the push button device driver.
volatile uint16_t drv_PushButton_Initialize(volatile struct PUSH_BUTTON_OBJECT_s *pushbtn)
Initializes the push button device driver.
struct PUSH_BUTTON_STATUS_s::@135::@137 bits
Status bit field.
Push button function driver data object.
volatile struct PUSH_BUTTON_STATUS_s status
Status word of the switch object.
volatile uint16_t(* event_pressed)(void)
Function pointer to user function triggering a LONG_PRESS event.
volatile uint16_t(* event_btn_down)(void)
Function pointer to user function triggering a PRESSED event.
volatile uint16_t debounce_delay
Number of call cycles until a switch event is triggered.
volatile uint16_t long_press_delay
Number of call cycles until a "long press" switch event is triggered.
volatile uint16_t(* event_btn_up)(void)
Function pointer to user function triggering a RELEASE event.
volatile uint16_t(* event_long_press)(void)
Function pointer to user function triggering a LONG_PRESS event.