OpenThread_app
Loading...
Searching...
No Matches

Handles physical button interactions and maps them to application events. More...

Macros

#define OT_BTN_OB_ONE_CLICK   1
#define OT_BTN_OB_LONG_PRESS   2

Functions

void ad_btn_task (void)
int8_t ad_btn_init (ot_app_devDrv_t *drvPtr)
int8_t ad_btn_assignDevice (otapp_pair_Device_t *newDevice)

Detailed Description

Handles physical button interactions and maps them to application events.

This module is responsible for the low-level handling of physical buttons using the OneButton library. It manages GPIO pin configuration, pull-up resistor setup, and callback registration for various interaction types (click, double click, long press). It decouples the physical button layer from the CoAP logic by passing events to higher layers via standardized click types.

Version
0.1
Date
28-10-2025

Macro Definition Documentation

◆ OT_BTN_OB_LONG_PRESS

#define OT_BTN_OB_LONG_PRESS   2

◆ OT_BTN_OB_ONE_CLICK

#define OT_BTN_OB_ONE_CLICK   1

Function Documentation

◆ ad_btn_assignDevice()

int8_t ad_btn_assignDevice ( otapp_pair_Device_t * newDevice)

◆ ad_btn_init()

int8_t ad_btn_init ( ot_app_devDrv_t * drvPtr)

◆ ad_btn_task()

void ad_btn_task ( void )