Add firmware GATT protocol module
This commit is contained in:
@@ -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`
|
||||
|
||||
Reference in New Issue
Block a user