Keep USB line coding diagnostic only. Fix cdc connect reconfiguring UART

1
This commit is contained in:
2026-08-31 03:40:55 +02:00
parent 6ad6c00d68
commit 2aafff25be
8 changed files with 16 additions and 153 deletions
+7 -1
View File
@@ -46,7 +46,13 @@ These observations should be checked when touching the relevant area; they are n
## Active Task
No active task recorded.
- **Objective:** Prevent USB CDC host line coding from implicitly reconfiguring UART1 when USB becomes writer.
- **Relevant files:** `src/usb_cdc_transport.{c,h}`, `src/usb_console.c`, USB serial documentation.
- **Findings:** The transport converted cached CDC line coding into `serial_config_t` and called `serial_service_apply_config()` after writer acquisition. That deliberately stopped/restarted UART1 and changed its RAM configuration.
- **Decision:** Treat CDC line coding as diagnostic metadata only. UART1 configuration remains exclusively controlled by explicit `serial` commands and their NVS persistence.
- **Changes completed:** Removed the pending line-coding apply path and its counters; retained the latest host setting for `usb status`; updated the contract documentation.
- **Remaining work:** Target-hardware verification: acquire/release USB writer ownership after changing a host terminal's line coding and confirm UART1 remains at the configured framing.
- **Risks / things to remember:** Host terminal line-coding selectors no longer configure the physical RS-232 port; use `serial set`/`serial save` instead. `pio run` passed after the change.
### Handoff template