|
|
ChaosDMX
Open-Source DMX-Interface
|
Hardware button abstraction layer for short and long press detection. More...
#include "esp_err.h"#include <stdbool.h>Go to the source code of this file.
Functions | |
| esp_err_t | button_init (void) |
| Initializes the hardware button configuration and event callbacks. | |
| bool | button_is_pressed (void) |
| Checks if the button is currently physically pressed. | |
Hardware button abstraction layer for short and long press detection.
This module wraps the official Espressif IoT button component to handle custom actions.
Definition in file button_actions.h.
| esp_err_t button_init | ( | void | ) |
Initializes the hardware button configuration and event callbacks.
Configures the designated GPIO pin, sets up the debounce thresholds, and registers callbacks for both a single/double/triple short click
Definition at line 120 of file button_actions.c.
References BUTTON_GPIO_NUM, iot_button_double_click_cb(), iot_button_multiple_click_cb(), iot_button_single_click_cb(), LOGE, LOGI, RESET_HOLD_TIME_MS, and s_btn_handle.
Referenced by app_main().
| bool button_is_pressed | ( | void | ) |
Checks if the button is currently physically pressed.
Definition at line 163 of file button_actions.c.
References s_btn_handle.
Referenced by app_main().