TB2026-YDS Firmware
Loading...
Searching...
No Matches
input.h
Go to the documentation of this file.
1
20#pragma once
21
22#include "esp_err.h"
23#include "event.h"
24#include "board_pins.h"
25#include "input_logic.h"
26#include "freertos/FreeRTOS.h"
27#include <stdint.h>
28#include <stdbool.h>
29
36
39
40#define INPUT_WAKE_GPIO PIN_BTN_A
43#define INPUT_WAKE_ACTIVE_LEVEL 1
45
55esp_err_t input_init(void);
56
64bool input_get_event(ui_event_t *out, TickType_t ticks_to_wait);
65
72typedef struct {
76
86
100uint32_t input_idle_ms(void);
101
GPIO pin map for the TB2026-YDS board.
Input event vocabulary shared by screens and the navigator.
#define INPUT_BTN_COUNT
Number of physical buttons handled (5 expander + A).
Definition input_logic.h:29
uint32_t input_idle_ms(void)
Milliseconds since the last button event was emitted.
Definition input.c:131
void input_get_diag(input_diag_t *out)
Read the current button state and per-button press counts.
Definition input.c:137
esp_err_t input_init(void)
Bring up the input service: queue, both ISRs, the input task, and A's wake-ready pin.
Definition input.c:67
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).
Definition input.c:125
ui_event_t
A single UI input event, produced from button/encoder input.
Definition event.h:19
Pure button-state -> UI-event logic: debounce + press-edge detection + mapping.
Live button snapshot for the diagnostics screen.
Definition input.h:72
uint32_t count[INPUT_BTN_COUNT]
Definition input.h:74
bool pressed[INPUT_BTN_COUNT]
Definition input.h:73