Add firmware GATT protocol module

This commit is contained in:
2026-04-11 13:00:04 +08:00
parent 9ba44586b3
commit 30f1af1a8c
2 changed files with 204 additions and 0 deletions

View File

@@ -119,3 +119,29 @@ Implemented behavior:
- `Error`
- `FunctionKeyEvent`
- `LedState`
### Node 5: GATT transport module
Files added in this step:
- `src/modules/ble_gatt_proto_module.c`
Design notes:
- define one custom service with one RX write characteristic and one TX notify
characteristic
- keep GATT transport byte-oriented by sending raw `CdcPacketBody` bytes
- reuse the same host command dispatcher as CDC
Implemented behavior:
- register the custom GATT service
- accept host writes on RX
- decode `CdcPacketBody`
- dispatch host messages
- notify:
- `HelloRsp`
- `Ack`
- `Error`
- `FunctionKeyEvent`
- `LedState`