Expand description
Android USB serial driver, currently works with CDC-ACM devices.
Inspired by https://github.com/mik3y/usb-serial-for-android.
It is far from being feature-complete. Of course you can make use of something like react-native-usb-serialport, however, that may introduce multiple layers between Rust and the Linux kernel.
This crate uses ndk_context::AndroidContext
, usually initialized by android_activity
.
The initial version of this crate performs USB transfers through JNI calls but not nusb
,
do not use it except you have encountered compatibility problems.
Modules§
- usb
- Android helper for
nusb
. It may be merged into that crate in the future.
Structs§
- CdcSerial
- This is currently a thin wrapper of USB operations, it requires hardware buffers at the device side. It uses the CDC ACM Data Interface Class to transfer data (the Communication Interface Class is used for probing and serial configuration).
- Serial
Config - Serial parameters including baudrate, parity check mode, data bits and stop bits.
Traits§
- UsbSerial
- Serial driver implementations inside this crate should implement this trait.
Type Aliases§
- Error
- Equals
std::io::Error
.