Add firmware CDC protocol module
This commit is contained in:
@@ -92,5 +92,30 @@ Implemented behavior:
|
||||
|
||||
## Planned next nodes
|
||||
|
||||
- CDC transport module
|
||||
- GATT transport module
|
||||
|
||||
### Node 4: CDC transport module
|
||||
|
||||
Files added in this step:
|
||||
|
||||
- `src/modules/usb_cdc_proto_module.c`
|
||||
|
||||
Design notes:
|
||||
|
||||
- use the CDC ACM UART abstraction from Zephyr
|
||||
- keep CDC transport separate from protocol details by delegating encode/decode
|
||||
to `keyboard_proto`
|
||||
- report private outgoing events back to host over CDC
|
||||
|
||||
Implemented behavior:
|
||||
|
||||
- receive raw CDC bytes by UART IRQ
|
||||
- accumulate bytes into a stream buffer
|
||||
- extract protobuf `CdcFrame`
|
||||
- decode host messages and dispatch them
|
||||
- send:
|
||||
- `HelloRsp`
|
||||
- `Ack`
|
||||
- `Error`
|
||||
- `FunctionKeyEvent`
|
||||
- `LedState`
|
||||
|
||||
Reference in New Issue
Block a user