Initial commit

This commit is contained in:
2026-02-17 23:54:13 +01:00
commit c02ec01f75
14 changed files with 935 additions and 0 deletions

39
i2c-over-tcp/plans.md Normal file
View File

@@ -0,0 +1,39 @@
# TCP → I2C bridge
## Authorship
This document was generated using ChatGPT (OpenAI), version 5.2.
It has not been independently reviewed or validated yet.
# Translation units
## `i2c_controller.c`
* `i2c_handle_frame(cmd, payload, len, reply_buf, *reply_len)`
* No transport knowledge.
* Pure logic + hardware calls.
## `usb_transport.c`
* Parses frames from CDC.
* Calls `i2c_handle_frame()`.
* Writes reply back over USB.
## `tcp_transport.c`
* Same framing.
* Calls same `i2c_handle_frame()`.
* Writes reply over TCP.
# Notes
* The framing + transport layer is swappable.
* The I²C logic is isolated.
# Result
* USB for development/debug.
* TCP for deployment.
* Zero duplication of protocol logic.