|
TB2026-YDS Firmware
|
Input service: ISR-notified task reads buttons over I2C/GPIO, debounces, queues events. More...
#include "input.h"#include "input_logic.h"#include "gpio_expander.h"#include "driver/gpio.h"#include "esp_timer.h"#include "diag.h"#include "esp_log.h"#include "freertos/FreeRTOS.h"#include "freertos/task.h"#include "freertos/queue.h"Macros | |
| #define | INPUT_TASK_PRIO 5 /* UI/maintenance band, below the audio task (22) */ |
| #define | INPUT_TASK_STACK 3072 |
| #define | INPUT_QUEUE_LEN 8 /* far more than a human can outrun; events drop if ever full */ |
Functions | |
| esp_err_t | input_init (void) |
| Bring up the input service: queue, both ISRs, the input task, and A's wake-ready pin. | |
| bool | input_get_event (ui_event_t *out, TickType_t ticks_to_wait) |
| Block until the next input event (the UI task's read side of the queue). | |
| uint32_t | input_idle_ms (void) |
| Milliseconds since the last button event was emitted. | |
| void | input_get_diag (input_diag_t *out) |
| Read the current button state and per-button press counts. | |
Input service: ISR-notified task reads buttons over I2C/GPIO, debounces, queues events.
| #define INPUT_QUEUE_LEN 8 /* far more than a human can outrun; events drop if ever full */ |
| #define INPUT_TASK_PRIO 5 /* UI/maintenance band, below the audio task (22) */ |
| #define INPUT_TASK_STACK 3072 |