Skip to content

ESP32S2 native USB library. Implemented few common classes, like MIDI, CDC, HID or DFU (update).

License

Notifications You must be signed in to change notification settings

dskulina/EspTinyUSB

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

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, gamepad, generic IN/OUT,
  • MIDI, musical instrument digital interface class,
  • DFU, device firmware update class,
  • WebUSB, its using vendor class to show webusb usage.

Hardware

To use native USB we need to connect pins 19 and 20 to usb cable or with similar connectors:

How to

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.manufacturer(char*);
device.product(char*); // product name
device.serial(char*);  // serial number SN
device.revision(uint16_t); // product revison
device.deviceID(uint16_t VID, uint16_t PID);
device.deviceID(uint16_t* VID, uint16_t* PID);

Contributions

Issues and PRs are welcome.

Known issue

Currently library is not working with vanila arduino-esp32. It is due some tinyusb callbacks cant be overriden and are used by arduino-esp32. To make it works it is required to add __attribute__ ((weak)) in 3 lines in local arduino file: https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-tinyusb.c#L266 https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-tinyusb.c#L275 https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-tinyusb.c#L284

About

ESP32S2 native USB library. Implemented few common classes, like MIDI, CDC, HID or DFU (update).

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 91.9%
  • C 8.1%