| Crates.io | cu-bdshot |
| lib.rs | cu-bdshot |
| version | 0.12.0 |
| created_at | 2025-11-26 16:03:59.490335+00 |
| updated_at | 2026-01-14 19:33:20.958989+00 |
| description | Copper Bridge to Bidirectional DSHOT ESCs. |
| homepage | https://github.com/copper-project |
| repository | https://github.com/copper-project/copper-rs |
| max_upload_size | |
| id | 1951644 |
| size | 104,785 |
Copper bridge for bidirectional DSHOT (BDShot) ESCs. It exposes up to four EscCommand transmit channels and matching EscTelemetry receive channels. The default cu_bdshot::RpBdshotBridge drives the RP2350 reference board PIO/DMA stack; custom boards can implement BdshotBoard/BdshotBoardProvider.
esc{0-3}_tx (EscCommand): throttle 0–2047, optional telemetry request bit.esc{0-3}_rx (EscTelemetry): latest DShotTelemetry sample per ESC.Only the channels declared in the Copper config are driven; others stay idle.
rp2350 (default): RP2350 PIO driver (RpBdshotBridge).stm32h7: STM32H7 bit-bang driver (Stm32BdshotBridge).Rp2350Board from your PIO0 state machines and pin map (defaults: GPIO6–GPIO9, 15.3 MHz PIO clock) and register it once before Copper boots:
let board = Rp2350Board::new(resources, system_clock_hz, Rp2350BoardConfig::default())?;
cu_bdshot::register_rp2350_board(board)?;
Stm32H7Board from GPIOE pins (PE14/13/11/9) plus a running DWT cycle counter and register it once before Copper boots:
let resources = Stm32H7BoardResources { m1, m2, m3, m4, dwt, sysclk_hz };
let board = Stm32H7Board::new(resources)?;
cu_bdshot::register_stm32h7_board(board)?;
Optional component-level config keys:
rate_hz: Maximum per-channel frame rate. If too early, the bridge skips sending on that cycle.Channel activation is driven solely by the Copper bridge channel list.
Declare the bridge and wire tasks to it:
(
bridges: [
(
id: "bdshot",
type: "cu_bdshot::RpBdshotBridge",
channels: [
Tx (id: "esc0_tx"), Tx (id: "esc1_tx"), Tx (id: "esc2_tx"), Tx (id: "esc3_tx"),
Rx (id: "esc0_rx"), Rx (id: "esc1_rx"), Rx (id: "esc2_rx"), Rx (id: "esc3_rx"),
],
),
],
cnx: [
(src: "thr", dst: "bdshot/esc0_tx", msg: "cu_bdshot::EscCommand"),
(src: "bdshot/esc0_rx", dst: "tele0", msg: "cu_bdshot::EscTelemetry"),
],
)
See examples/cu_elrs_bdshot_demo for a full mission wiring CRSF RC input into BDShot ESCs on the RP2350 reference board.