{"id":14963301,"url":"https://github.com/chegewara/esptinyusb","last_synced_at":"2025-10-11T14:10:52.659Z","repository":{"id":39848850,"uuid":"280669099","full_name":"chegewara/EspTinyUSB","owner":"chegewara","description":"ESP32S2 native USB library. Implemented few common classes, like MIDI, CDC, HID or DFU (update).","archived":false,"fork":false,"pushed_at":"2023-02-03T15:31:51.000Z","size":157,"stargazers_count":530,"open_issues_count":66,"forks_count":75,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-05-24T21:05:13.460Z","etag":null,"topics":["arduino","esp32s2","hid","midi-device","tinyusb","usb","webusb"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chegewara.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-18T14:07:12.000Z","updated_at":"2025-05-24T04:44:24.000Z","dependencies_parsed_at":"2024-09-13T19:10:36.765Z","dependency_job_id":null,"html_url":"https://github.com/chegewara/EspTinyUSB","commit_stats":{"total_commits":49,"total_committers":9,"mean_commits":5.444444444444445,"dds":"0.20408163265306123","last_synced_commit":"f4d63153c0417922398de2fe43114b5224ff6def"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/chegewara/EspTinyUSB","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chegewara%2FEspTinyUSB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chegewara%2FEspTinyUSB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chegewara%2FEspTinyUSB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chegewara%2FEspTinyUSB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chegewara","download_url":"https://codeload.github.com/chegewara/EspTinyUSB/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chegewara%2FEspTinyUSB/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279007499,"owners_count":26084313,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino","esp32s2","hid","midi-device","tinyusb","usb","webusb"],"created_at":"2024-09-24T13:31:19.612Z","updated_at":"2025-10-11T14:10:52.642Z","avatar_url":"https://github.com/chegewara.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# New version\nNew version of library, compatible with esp-idf (after cleanup) can be find here:\n\nhttps://github.com/chegewara/esp32-usb-v2\n\n# Description\n\nLibrary allows to build USB class devices and to make it usable with minimal effort:\n- CDC, communication device class,\n- MSC, mass storage class,\n- HID, human interface device class: keyboard, mouse, gamepad, generic IN/OUT,\n- MIDI, musical instrument digital interface class,\n- DFU, device firmware update class,\n- WebUSB, its using vendor class to show webusb usage.\n\n# Hardware\nTo use native USB we need to connect pins 19 and 20 to usb cable or with similar connectors:\n![](https://ae01.alicdn.com/kf/HTB1MFvqNgHqK1RjSZJnq6zNLpXaR/10-sztuk-Mini-Micro-USB-do-DIP-2-54mm-Adapter-z-cze-modu-u-Panel-kobiet.jpg)\n![](https://ae01.alicdn.com/kf/HTB1cfmCgcnI8KJjSspeq6AwIpXa6/AMS1117-3-3V-AMS1117-3-3V-Mini-USB-5V-3-3V-DC-Perfect-Power-Supply-Module.jpg)\n\n# How to\nLibrary allows to set all values in standard USB device like:\n- manufacturer\n- product name\n- serial number\n- revision\n- VID and PID\n\n```\nANYusb device;  // any USB class like HID, MSC, CDC\ndevice.manufacturer(char*);\ndevice.product(char*); // product name\ndevice.serial(char*);  // serial number SN\ndevice.revision(uint16_t); // product revison\ndevice.deviceID(uint16_t VID, uint16_t PID);\ndevice.deviceID(uint16_t* VID, uint16_t* PID);\n```\n\n# Default EP numbers\nIn case of using more than 1 USB class in 1 device please make sure there is no conflict between EP numbers and eventuallu use `setBaseEP`:\n- CDC - EP1 and EP2,\n- HID - keyboard - EP2, mouse - EP3,\n- MSC - EP4,\n- WebUSB - EP4,\n- MIDI - EP5\n- DFU - not required\n\n# Contributions\nIssues and PRs are welcome.\n\n# USB host (WIP)\n\nI have some basic implementation of USB host which i decided to add. This is still experimental version as i dont know what tpe of design to implement (events or callbacks).\n\nHere is log from MSC host reading files from pendrive:\n\n```\n[   960][I][test.ino:86] client_event_callback(): device speed: USB_SPEED_FULL, device address: 1, max ep_ctrl size: 64, config: 1\nEP num: 1/2, len: 32, address: 0x81, EP max size: 64, dir: IN\nEP num: 2/2, len: 32, address: 0x02, EP max size: 64, dir: OUT\ncapacity_cb: block_size: 512, block_count: 60948479\ninquiry_cb\n[  1038][I][test.ino:221] write_test(): File written\n[  1049][I][test.ino:149] read_test(): /msc/README.txt\n[  1051][I][test.ino:159] read_test(): Hello World!\n[  1055][I][test.ino:205] read_test(): Found file : /msc/fanet_module.pdf (735686 bytes)\n[  1056][I][test.ino:205] read_test(): Found file : /msc/06639_datasheet.pdf (205240 bytes)\n[  1063][I][test.ino:205] read_test(): Found file : /msc/Bluetooth_5-FINAL.pdf (2100903 bytes)\n[  1072][I][test.ino:205] read_test(): Found file : /msc/USB-Basics-USB-2.0-.pdf (113669 bytes)\n[  1080][I][test.ino:205] read_test(): Found file : /msc/DS_SX1280-1_V2.2.book.pdf (197260 bytes)\n[  1096][I][test.ino:205] read_test(): Found file : /msc/USB-Basics-USB-2.0- (1).pdf (113669 bytes)\n[  1102][I][test.ino:205] read_test(): Found file : /msc/USB---Enumeration-States.pdf (29098 bytes)\n[  1110][I][test.ino:205] read_test(): Found file : /msc/USB---Protocol---bits4device.pdf (1022853 bytes)\n[  1125][I][test.ino:205] read_test(): Found file : /msc/esp32-s2_technical_reference_manual_en.pdf (6769251 bytes)\n[  1132][I][test.ino:205] read_test(): Found file : /msc/cd00167594-stm32-microcontroller-system-memory-boot-mode-stmicroelectronics.pdf (4613315 bytes)\n[  1146][I][test.ino:205] read_test(): Found file : /msc/USB Complete The Developer's Guide 4th Ed.pdf (6936935 bytes)\n[  1161][I][test.ino:205] read_test(): Found file : /msc/USB Mass Storage Designing and Programming Devices and Embedded Hosts.pdf (3360734 bytes)\n[  1173][I][test.ino:205] read_test(): Found file : /msc/README.txt (13 bytes)\n[  1181][I][test.ino:233] write_test(): Renaming file\n[  1212][I][test.ino:240] write_test(): Reading file\n[  1225][I][test.ino:254] write_test(): Read from file /msc/README1.txt: 'Hello World!'\n[  1233][E][test.ino:145] read_test(): Failed to open file\n[  1237][I][test.ino:205] read_test(): Found file : /msc/fanet_module.pdf (735686 bytes)\n[  1238][I][test.ino:205] read_test(): Found file : /msc/06639_datasheet.pdf (205240 bytes)\n[  1245][I][test.ino:205] read_test(): Found file : /msc/Bluetooth_5-FINAL.pdf (2100903 bytes)\n[  1253][I][test.ino:205] read_test(): Found file : /msc/USB-Basics-USB-2.0-.pdf (113669 bytes)\n[  1262][I][test.ino:205] read_test(): Found file : /msc/DS_SX1280-1_V2.2.book.pdf (197260 bytes)\n[  1278][I][test.ino:205] read_test(): Found file : /msc/USB-Basics-USB-2.0- (1).pdf (113669 bytes)\n[  1284][I][test.ino:205] read_test(): Found file : /msc/USB---Enumeration-States.pdf (29098 bytes)\n[  1292][I][test.ino:205] read_test(): Found file : /msc/USB---Protocol---bits4device.pdf (1022853 bytes)\n[  1307][I][test.ino:205] read_test(): Found file : /msc/esp32-s2_technical_reference_manual_en.pdf (6769251 bytes)\n[  1314][I][test.ino:205] read_test(): Found file : /msc/cd00167594-stm32-microcontroller-system-memory-boot-mode-stmicroelectronics.pdf (4613315 bytes)\n[  1327][I][test.ino:205] read_test(): Found file : /msc/USB Complete The Developer's Guide 4th Ed.pdf (6936935 bytes)\n[  1342][I][test.ino:205] read_test(): Found file : /msc/USB Mass Storage Designing and Programming Devices and Embedded Hosts.pdf (3360734 bytes)\n[  1352][I][test.ino:205] read_test(): Found file : /msc/README1.txt (13 bytes)\n[  1352][I][test.ino:289] setup(): storage used: 26329088/31189319680\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchegewara%2Fesptinyusb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchegewara%2Fesptinyusb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchegewara%2Fesptinyusb/lists"}