|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Host-side keystroke FIFO implementation (see board_input.h). More...
Go to the source code of this file.
Enumerations | |
| enum | board_input_cfg_t : uint32_t { k_key_ring_cap = 64U } |
| Keystroke ring geometry. More... | |
Functions | |
| void | board_input_push_key (char ch) |
| Push one keystroke byte into the input FIFO. | |
| bool | board_input_pop_key (char *out) |
| Pop the oldest buffered keystroke, if any. | |
Variables | |
| static char | s_ring [k_key_ring_cap] |
| Keystroke ring storage. | |
| static uint32_t | s_head |
| Read cursor (oldest byte). | |
| static uint32_t | s_tail |
| Write cursor (next free). | |
Host-side keystroke FIFO implementation (see board_input.h).
A fixed-size ring buffer. The window's keyDown handler and the --keys flag both push through board_input_push_key; the run loop drains via board_input_pop_key into the console UART RX. Single-threaded harness use.
Definition in file board_input.c.
| enum board_input_cfg_t : uint32_t |
Keystroke ring geometry.
| Enumerator | |
|---|---|
| k_key_ring_cap | Ring capacity (one slot is the full/empty guard). |
Definition at line 20 of file board_input.c.
| bool board_input_pop_key | ( | char * | out | ) |
Pop the oldest buffered keystroke, if any.
| [out] | out | Receives one keystroke byte when true is returned. |
out is NULL. Pop the oldest buffered keystroke, if any; this step is contained within the board input model and uses bounded caller or module-owned storage.
| true | The board input pop key condition holds or completed successfully; false otherwise. |
Definition at line 37 of file board_input.c.
References k_key_ring_cap, s_head, s_ring, and s_tail.
Referenced by internal_run_loop_tick_inputs().
| void board_input_push_key | ( | char | ch | ) |
Push one keystroke byte into the input FIFO.
Appends ch to the ring; on overflow the newest key is dropped (the firmware draining the FIFO is the slow consumer). Called by the window keyDown handler and by the --keys injector alike, so both reach the UART through one path.
| [in] | ch | Keystroke byte to enqueue. |
Definition at line 28 of file board_input.c.
References k_key_ring_cap, s_head, s_ring, and s_tail.
Referenced by internal_main_feed_inputs().
|
static |
Read cursor (oldest byte).
Definition at line 25 of file board_input.c.
Referenced by board_input_pop_key(), and board_input_push_key().
|
static |
Keystroke ring storage.
Definition at line 24 of file board_input.c.
Referenced by board_input_pop_key(), and board_input_push_key().
|
static |
Write cursor (next free).
Definition at line 26 of file board_input.c.
Referenced by board_input_pop_key(), and board_input_push_key().