Skip to content

Commit

Permalink
Update USB library (#2737)
Browse files Browse the repository at this point in the history
This PR fixes USB support for ESP IDF 5.2. Note that host mode is still not yet supported for esp32sx.

Improvements:
- Update to tinyusb master
- Move initialisation code into separate Arch source file, patch to support ESP32 IDF 5.2 (not yet in tinyusb upstream)
- Add CI support (speeds up library testing)

Fixes:
- Lazy-initialise flush timer: Causes problems with static Device objects and esp32sx as timer's aren't yet initialised
- Enable python UTF8 mode for usbconfig tool (Windows)
- UsbSerial conditional on CDC
- Don't implement descriptor callbacks unless building for device
- Ensure HID device is ready when sendReport called: get div-by-zero exception on esp32s2 otherwise
- Fix `Basic_IFS` sample with `ENABLE_USB_STORAGE`: only for rp2040, no host support yet for esp32sx

Tested with rp2040, esp32s2.
  • Loading branch information
mikee47 authored Mar 19, 2024
1 parent 07cd096 commit 5352490
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion samples/Basic_IFS/basic_ifs.usbcfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"host": {
"msc": 1
"hub": {
"port-count": 4
},
"msc": {
"maxlun": 4
}
}
}
2 changes: 1 addition & 1 deletion samples/Basic_IFS/component.mk
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ endif
CONFIG_VARS += ENABLE_USB_STORAGE
ifeq ($(ENABLE_USB_STORAGE),1)
COMPONENT_CXXFLAGS += -DENABLE_USB_STORAGE
COMPONENT_DEPENDS += USB
COMPONENT_DEPENDS += USB FatIFS
USB_CONFIG := basic_ifs.usbcfg
endif

Expand Down

0 comments on commit 5352490

Please sign in to comment.