feat: donglora-cobs workspace crate with 31 spec-compliance tests
Extract COBS encoder/decoder into a separate no_std workspace crate (crates/donglora-cobs) with comprehensive tests against the Cheshire & Baker 1999 IEEE/ACM specification and Wikipedia canonical vectors. Tests cover: empty input, single/multiple zeros, block boundaries at 254/255 bytes, alternating patterns, the Ping regression case (tag 0x00), round-trip verification, and error cases (truncation, unexpected zeros). Replace inline cobs_decode() in usb/task.rs with the tested crate. Replace external cobs dependency with workspace crate. Fix encoder bug at 254-byte block boundary (spurious trailing code byte).
This commit is contained in:
5 files changed
+542
-40
No files matched your search
+4
-1
@@ -1,3 +1,6 @@
|
||||
[workspace]
|
||||
members = [".", "crates/donglora-cobs"]
|
||||
|
||||
[package]
|
||||
name = "donglora"
|
||||
version = "0.1.0"
|
||||
@@ -21,7 +24,7 @@ embassy-sync = "0.6"
|
||||
embassy-time = "0.3"
|
||||
embassy-usb = { version = "0.3", features = ["defmt"] }
|
||||
embassy-usb-driver = "0.1"
|
||||
cobs = { version = "0.3", default-features = false }
|
||||
donglora-cobs = { path = "crates/donglora-cobs" }
|
||||
heapless = "0.8"
|
||||
lora-phy = "3.0"
|
||||
static_cell = "2.1"
|
||||
|
||||
Reference in new issue
Block a user