This is very early version and still WiP, so API may and probably will change. All implemented devices are provided with simple examples for arduino. Library is compatible with arduino, platformio, esp-idf and there will be also repository with examples for esp-idf.
I want to replace old callbacks build on class callback
to use std::function
, which also let us to use lambdas. In the future i maybe add C style callbacks too.
I wanted to make this library as much flexible as possible, so all tinyusb callbacks are weak and its possible to override any in user code (advanced users only).
Library allows to build USB class devices and to make it usable with minimal effort:
- CDC, communication device class,
- MSC, mass storage class,
- HID, human interface device class: keyboard, mouse, generic IN/OUT, option to combine few reports
- MIDI, musical instrument digital interface class,
- DFU, device firmware update class,- its still not ready
- WebUSB, its using vendor class to show webusb usage.
Library allows to set all values in standard USB device like:
- manufacturer
- product name
- serial number
- revision
- VID and PID
ANYusb device; // any USB class like HID, MSC, CDC
device.mfgStringId(addString(""));
device.productStringId(addString(""));
device.serialStringId(addString(""));
device.setVidPid(vid, pid);
device.setVersion(revisionBCD, usbBCD);
There is still a lot to do, so any suggestions are welcome.
I would like to finish this project with fancy documentation, but this is time consuming and i have full time job and few more projects which i would like to continue, so any help is appreciated
Issues and PRs are welcome.
To use native USB we need to connect pins 19 and 20 to usb cable or with similar connectors: