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"] }
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.
hostdevice
msccdcvendorhubhidmidi
bthvideoecm_rndisdfumidincmdfu_runtimehidvendorusbtmcaudiomsccdc
lpc11uxxNXP LPC11Uxxlpc13xxNXP LPC13xxlpc15xxNXP LPC15xxlpc175x_6xNXP LPC175x, LPC176xlpc177x_8xNXP LPC177x, LPC178xlpc18xxNXP LPC18xxlpc40xxNXP LPC40xxlpc43xxNXP LPC43xxlpc51uxxNXP LPC51U6xlpc54xxxNXP LPC54xxxlpc55xxNXP LPC55xxnrf5xNordic nRF5x seriessamd21MicroChip SAMD21samd51MicroChip SAMD51samgMicroChip SAMDG seriessame5xMicroChip SAM E5xsamd11MicroChip SAMD11saml22MicroChip SAML22saml21MicroChip SAML21samx7xMicroChip SAME70, S70, V70, V71 familystm32f0ST F0stm32f1ST F1stm32f2ST F2stm32f3ST F3stm32f4ST F4stm32f7ST F7stm32h7ST H7stm32l1ST L1stm32l0ST L0stm32l4ST L4stm32g0ST G0stm32g4ST G4cxd56SONY CXD56msp430x5xxTI MSP430x5xxmsp432e4TI MSP432E4xxtm4c123TI Tiva-C 123xtm4c129TI Tiva-C 129xvalentyusb_eptriFomu eptri configmimxrt10xxNXP iMX RT10xxnuc121nuc126nuc120nuc505esp32s2Espressif ESP32-S2esp32s3Espressif ESP32-S3da1469xDialog Semiconductor DA1469xrp2040Raspberry Pi RP2040mkl25zxxNXP MKL25Zxxk32l2bxxNXP K32L2Bxxefm32ggSilabs EFM32GGrx63xRenesas RX63N/631rx65xRenesas RX65N/RX651rx72nRenesas RX72Nmm32f327xMind Motion MM32F327gd32vf103GigaDevice GD32VF103bcm2711Broadcom BCM2711bcm2835Broadcom BCM2835bcm2837Broadcom BCM2837xmc4000Infineon XMC4000pic32mzMicroChip PIC32MZ familyft90xBridgeTek FT90xft93xBridgeTek FT93xf1c100sAllwinner F1C100s family