Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
btn_callback_info Struct Reference

Callbacks and associated timers for the buttons. More...

#include <baremetal/cascoda-bm-ui/include/cascoda_btn.h>

Public Attributes

btn_callback shortPressCallback
 Callback function for a short button press. More...
 
void * shortPressContext
 Context for shortPressCallback. More...
 
btn_callback longPressCallback
 Callback function for a long button press. More...
 
void * longPressContext
 Context for longPressCallback. More...
 
btn_callback holdCallback
 Callback function for when the button is held. More...
 
void * holdContext
 Context for holdCallback. More...
 
uint32_t currentPressTime
 Time [ms] when the button has been pressed. More...
 
uint32_t longPressTimeThreshold
 Time limit [ms] above which a button press is considered a long press. More...
 
uint32_t holdTimeInterval
 Time interval [ms] for triggering the hold function. More...
 
uint32_t holdTimeLast
 Time [ms] when hold callback was last called. More...
 
uint8_t lastState
 Last button state. More...
 
uint8_t shortPressMode
 Short Press callback when pressed or on release. More...
 

Detailed Description

Callbacks and associated timers for the buttons.

Member Data Documentation

◆ currentPressTime

uint32_t btn_callback_info::currentPressTime

Time [ms] when the button has been pressed.

◆ holdCallback

btn_callback btn_callback_info::holdCallback

Callback function for when the button is held.

◆ holdContext

void* btn_callback_info::holdContext

Context for holdCallback.

◆ holdTimeInterval

uint32_t btn_callback_info::holdTimeInterval

Time interval [ms] for triggering the hold function.

◆ holdTimeLast

uint32_t btn_callback_info::holdTimeLast

Time [ms] when hold callback was last called.

◆ lastState

uint8_t btn_callback_info::lastState

Last button state.

◆ longPressCallback

btn_callback btn_callback_info::longPressCallback

Callback function for a long button press.

◆ longPressContext

void* btn_callback_info::longPressContext

Context for longPressCallback.

◆ longPressTimeThreshold

uint32_t btn_callback_info::longPressTimeThreshold

Time limit [ms] above which a button press is considered a long press.

◆ shortPressCallback

btn_callback btn_callback_info::shortPressCallback

Callback function for a short button press.

◆ shortPressContext

void* btn_callback_info::shortPressContext

Context for shortPressCallback.

◆ shortPressMode

uint8_t btn_callback_info::shortPressMode

Short Press callback when pressed or on release.


The documentation for this struct was generated from the following file: