Add firmware function events

This commit is contained in:
2026-04-11 11:43:45 +08:00
parent 27e16df141
commit 3bf1377e56
5 changed files with 166 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
# Firmware Proto Transport
## Goal
Add CDC and GATT private communication without rewriting the existing keyboard,
time, theme, and LED business logic.
The firmware side should:
- keep standard HID behavior for normal keys
- receive host commands over CDC and GATT
- report private state and function key events over CDC and GATT
- reuse existing modules where possible
## Completed Nodes
### Node 1: internal function events
Files:
- `src/events/function_bitmap_event.h`
- `src/events/function_bitmap_event.c`
- `src/events/function_key_event.h`
- `src/events/function_key_event.c`
Design notes:
- `function_bitmap_event` carries the 29-byte function bitmap from host
- `function_key_event` carries usage + action when a configured function key
is pressed or released
- these events isolate transport modules from keyboard internals
## Planned next nodes
- keyboard split logic uses `function_bitmap_event`
- CDC transport module
- GATT transport module
- nanopb integration and generated protocol code