| Crates.io | cu-msp-bridge |
| lib.rs | cu-msp-bridge |
| version | 0.12.0 |
| created_at | 2025-11-26 16:00:58.475908+00 |
| updated_at | 2026-01-14 19:32:08.38919+00 |
| description | Copper bridge to talk to MSP devices over serial. |
| homepage | https://github.com/copper-project |
| repository | https://github.com/copper-project/copper-rs |
| max_upload_size | |
| id | 1951631 |
| size | 67,491 |
Bridge that combines the MSP source/sink tasks into one serial transport. It exposes a single TX channel (requests) that accepts batches of [cu_msp_lib::structs::MspRequest] messages and a single RX channel (responses) that yields [MspResponse] batches decoded from the line.
The bridge expects a serial resource. For std targets use the built-in StdSerialBundle, which opens a serial port and stores it as Mutex<StdSerial> under <bundle>.serial.
| Key | Type | Default | Description |
|---|---|---|---|
device |
string | /dev/ttyUSB0 |
Path to the serial device (can be a PTY). |
baudrate |
u32 | 115200 |
Serial baud rate. |
timeout_ms |
u64 | 50 |
Read timeout passed to the serial driver in milliseconds. |
resources: [
(
id: "fc",
provider: "cu_msp_bridge::StdSerialBundle",
config: { "device": "/dev/ttyUSB0", "baudrate": 115200 },
),
],
bridges: [
(
id: "msp_bridge",
type: "cu_msp_bridge::CuMspBridgeStd",
resources: { serial: "fc.serial" },
channels: [ Tx (id: "requests"), Rx (id: "responses") ],
),
],
For embedded targets, provide your own bundle that moves the UART into the ResourceManager (e.g. a spin::Mutex<SerialPort>). See examples/cu_elrs_bdshot_demo and examples/cu_msp_bridge_loopback for end-to-end wiring and config mutation.