nviennot / tinyusb-sys-rs

Rust wrapper for the TinyUSB library
MIT License
17 stars 7 forks source link
msc stm32 tinyusb usb-host

crates.io crates.io

TinyUSB Rust Bindings

TinyUSB is an open-source cross-platform USB Host/Device stack for embedded system, designed to be memory-safe with no dynamic allocation and thread-safe with all interrupt events are deferred then handled in the non-ISR task function.

This crate provides Rust bindings for the library.

Declare the dependency as such, for example to operate as a mass storage device on an MCU from the STM32F1 family:

[dependencies]
tinyusb-sys = { version = "0.1", features = ["device", "msc", "stm32f1"] }

Feature definitions

To use the crate, you must pick some features. You must pick one mode (host or device), at least one USB device class, and an MCU family.

Code examples will come soon.

Mode

Host features

Device features

MCU Family