5 releases

0.2.0 Oct 19, 2024
0.1.3 Nov 19, 2023
0.1.2 Sep 21, 2023
0.1.1 Feb 21, 2023
0.1.0 Feb 20, 2023

#432 in Hardware support

Download history 139/week @ 2024-10-29 59/week @ 2024-11-05 1/week @ 2024-11-12 24/week @ 2024-11-19 167/week @ 2024-11-26 270/week @ 2024-12-03 311/week @ 2024-12-10 112/week @ 2024-12-17 6/week @ 2024-12-24 49/week @ 2024-12-31 7/week @ 2025-01-07 73/week @ 2025-01-14 14/week @ 2025-01-21 1/week @ 2025-01-28 226/week @ 2025-02-04 180/week @ 2025-02-11

428 downloads per month
Used in boardswarm

MIT/Apache

66KB
1.5K SLoC

Rockchip usb protocol host implementation

Rockchip bootroms and early loaders implement an USB protocol to help loader early firmware, flashing persistant storage etc. This crate contains a sans-io implementation of that protocol as well as an optional implementations of IO using libusb or nusb.

Printing chip info using libusb backend:

# fn main() -> anyhow::Result<()> {
let devices = rockusb::libusb::Devices::new()?;
let mut transport = devices.iter().next()
    .ok_or_else(|| anyhow::anyhow!("No Device found"))??;
println!("Chip Info: {:0x?}", transport.chip_info()?);
Ok(())
# }

Printing chip info using nusb backend:

# #[tokio::main]
# async fn main() -> anyhow::Result<()> {
let mut devices = rockusb::nusb::devices()?;
let info = devices.next()
    .ok_or_else(|| anyhow::anyhow!("No Device found"))?;
let mut transport = rockusb::nusb::Transport::from_usb_device_info(info)?;
println!("Chip Info: {:0x?}", transport.chip_info().await?);
Ok(())
# }

Dependencies

~0.5–14MB
~125K SLoC