TB2026-YDS Firmware
Toggle main menu visibility
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
55
esp_err_t
input_init
(
void
);
56
64
bool
input_get_event
(
ui_event_t
*out, TickType_t ticks_to_wait);
65
72
typedef
struct
{
73
bool
pressed
[
INPUT_BTN_COUNT
];
74
uint32_t
count
[
INPUT_BTN_COUNT
];
75
}
input_diag_t
;
76
85
void
input_get_diag
(
input_diag_t
*out);
86
100
uint32_t
input_idle_ms
(
void
);
101
board_pins.h
GPIO pin map for the TB2026-YDS board.
event.h
Input event vocabulary shared by screens and the navigator.
INPUT_BTN_COUNT
#define INPUT_BTN_COUNT
Number of physical buttons handled (5 expander + A).
Definition
input_logic.h:29
input_idle_ms
uint32_t input_idle_ms(void)
Milliseconds since the last button event was emitted.
Definition
input.c:131
input_get_diag
void input_get_diag(input_diag_t *out)
Read the current button state and per-button press counts.
Definition
input.c:137
input_init
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
input_get_event
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
ui_event_t
A single UI input event, produced from button/encoder input.
Definition
event.h:19
input_logic.h
Pure button-state -> UI-event logic: debounce + press-edge detection + mapping.
input_diag_t
Live button snapshot for the diagnostics screen.
Definition
input.h:72
input_diag_t::count
uint32_t count[INPUT_BTN_COUNT]
Definition
input.h:74
input_diag_t::pressed
bool pressed[INPUT_BTN_COUNT]
Definition
input.h:73
components
services
input
input.h
Generated by
1.17.0