refactor: replace postcard/serde with fixed-size LE wire format

Drop postcard and serde dependencies entirely. All integers are now
fixed-width little-endian on the wire — no varints, no zigzag encoding.
A developer sending tx_power_dbm=14 sees 0x0E on the wire. No surprises.

- RadioConfig: 10 bytes fixed (freq:4 LE, bw:1, sf:1, cr:1, sync:2 LE, pwr:1)
- Commands/Responses: tag byte + fixed-size fields
- Vec<u8>: 2-byte LE length prefix + raw bytes
- Option<T>: 1-byte (0=None, 1=Some) + T
- COBS framing preserved (just byte-stuffing, no encoding tricks)
- Manual COBS decode replaces postcard's CobsAccumulator
- Removes ~15KB from firmware binary (no serde monomorphization)
This commit is contained in:
swaits committed 2026-03-29 20:42:58 -06:00
1 parent 584524dace
commit 1646564bc1
4 files changed
+233 -63

No files matched your search

+2 -3
View File
@@ -21,10 +21,9 @@ embassy-sync = "0.6"
embassy-time = "0.3"
embassy-usb = { version = "0.3", features = ["defmt"] }
embassy-usb-driver = "0.1"
heapless = { version = "0.8", features = ["serde"] }
cobs = { version = "0.3", default-features = false }
heapless = "0.8"
lora-phy = "3.0"
postcard = { version = "1.0", default-features = false }
serde = { version = "1.0", default-features = false, features = ["derive"] }
static_cell = "2.1"
# Display rendering