Skip to content

Commit 53ff965

Browse files
authored
Implementation of postcard-rpc using usb-gadget (OTG) (#142)
* Implementation of postcard-rpc server using usb-gadget * Update server-usb-gadget example * send_log* unimplemented * accept tx_buf instead of allocating * bubble up error instead of panicing * update ci.sh * fix(ci): ci? * fix(ci): cargo build -> cargo check for usb-gadget server example in ci * impl send_log_* for usb-gadget for completeness * Update postcard-rpc version in server-usb-gadget example * Add max_usb_frame_size to usb-gadget impl --------- Co-authored-by: = <=>
1 parent 7646ff5 commit 53ff965

11 files changed

Lines changed: 1974 additions & 2 deletions

File tree

.envrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
watch_file flake.lock flake.nix
2+
use flake

ci.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ rustup target add \
55
thumbv6m-none-eabi \
66
thumbv7em-none-eabihf \
77
riscv32imac-unknown-none-elf \
8-
wasm32-unknown-unknown
8+
wasm32-unknown-unknown \
9+
x86_64-unknown-linux-gnu
910

1011
# formatting
1112
cargo fmt --all --manifest-path source/postcard-rpc/Cargo.toml -- --check
@@ -60,6 +61,12 @@ cargo check \
6061
--features=embedded-io-async-0_6-server \
6162
--target thumbv7em-none-eabihf
6263

64+
# USB gadget (OTG) server impl
65+
cargo check \
66+
--manifest-path source/postcard-rpc/Cargo.toml \
67+
--no-default-features \
68+
--features=use-std,tokio,usb-gadget
69+
6370
# Example projects
6471
cargo build \
6572
--manifest-path example/workbook-host/Cargo.toml
@@ -77,6 +84,11 @@ cargo build \
7784
--manifest-path example/esp32c6-serial/Cargo.toml \
7885
--target riscv32imac-unknown-none-elf
7986

87+
# USB gadget (OTG)
88+
cargo check \
89+
--manifest-path example/server-usb-gadget/Cargo.toml \
90+
--target x86_64-unknown-linux-gnu
91+
8092
# Test Project
8193
cargo test \
8294
--manifest-path source/postcard-rpc-test/Cargo.toml

0 commit comments

Comments
 (0)