Skip to content

Unfinished Rust wrapper for Linux USBFS

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

usb-rs/usbfs-device

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

usbfs-device

A Rust API for accessing the Linux usbfs API, based on Rust's Futures, version 0.1.

NB so far only supports control messages; probably not useful for real USB devices yet.

This API provides,

  • A safe wrapper around underlying ioctl() operations of Linux usbfs
  • Means to take control of some interface of a device (detaching any Kernel driver if needed)
  • The ability to exchange data with a given endpoint of an interface

These are not features of the API,

  • No cross platform support -- use libusb if you want Windows and MacOS support too.
  • No support for parsing USB descriptors
  • No support for discovering the devices attached to the system (i.e. there's no API wrapper to find the relevant entries in Linux sysfs etc.)

(Maybe other crates will pick up some of those.)

Supported usbfs features

  • Device management
    • Current kernel driver name retrieval
    • Device reset
    • Capability query
    • Device configuration selection
    • Device connection info (speed)
  • Interface Management
    • Interface claiming (with optional automatic release)
    • Interface 'alternate setting' selection
  • Endpoint management
    • Clear halt-condition (seems this has to be blocking though?)
    • Control transfers
    • Isochronous transfers
    • Bulk transfers
    • Interrupt transfers

About

Unfinished Rust wrapper for Linux USBFS

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages