USB device-mode support - #613
Conversation
align ble with the same descriptors
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
🚧 Files skipped from review as they are similar to previous changes (7)
📝 WalkthroughWalkthroughThe pull request adds ESP32 TinyUSB controller, HID, MSC, MIDI, and CDC device support. It introduces public kernel APIs, device-tree bindings, platform drivers, and board configurations. It replaces the legacy USB property with separate class properties. It migrates MSC handling to the shared device API. It adds pooled multi-touch support to LVGL and propagates HID key metadata from the Tab5 keyboard. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 10
🧹 Nitpick comments (1)
Modules/lvgl-module/include/lvgl/devices/pointer.h (1)
16-25: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winClarify the LVGL multi-touch rationale.
The vendored LVGL is 9.4.
lv_indev_data_tstill carries one point per read, so the pool remains appropriate for independent per-finger widget interaction. LVGL 9.4 also provides the optionallv_indev_touch_data_tandlv_indev_gesture_recognizers_update()path for multi-touch gestures. State this distinction in the comment. The project currently disables gesture recognition.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: bddda1bc-b821-4333-8c11-fbb16fba0899
📒 Files selected for processing (94)
Devices/elecrow-crowpanel-advance-28/device.propertiesDevices/elecrow-crowpanel-advance-28/elecrow,crowpanel-advance-28.dtsDevices/elecrow-crowpanel-advance-35/device.propertiesDevices/elecrow-crowpanel-advance-35/elecrow,crowpanel-advance-35.dtsDevices/elecrow-crowpanel-advance-50/device.propertiesDevices/elecrow-crowpanel-advance-50/elecrow,crowpanel-advance-50.dtsDevices/elecrow-crowpanel-basic-50/device.propertiesDevices/elecrow-crowpanel-basic-50/elecrow,crowpanel-basic-50.dtsDevices/es3c28p/device.propertiesDevices/es3c28p/es3c28p.dtsDevices/heltec-wifi-lora-32-v3/device.propertiesDevices/heltec-wifi-lora-32-v3/heltec,wifi-lora-32-v3.dtsDevices/lilygo-tdeck-max/device.propertiesDevices/lilygo-tdeck-max/lilygo,tdeck-max.dtsDevices/lilygo-tdeck-plus/device.propertiesDevices/lilygo-tdeck-plus/lilygo,tdeck-plus.dtsDevices/lilygo-tdeck-pro/device.propertiesDevices/lilygo-tdeck-pro/lilygo,tdeck-pro.dtsDevices/lilygo-tdeck/device.propertiesDevices/lilygo-tdeck/lilygo,tdeck.dtsDevices/lilygo-tdisplay-s3/device.propertiesDevices/lilygo-tdisplay-s3/lilygo,tdisplay-s3.dtsDevices/lilygo-tdongle-s3/device.propertiesDevices/lilygo-tdongle-s3/lilygo,tdongle-s3.dtsDevices/lilygo-thmi/device.propertiesDevices/lilygo-thmi/lilygo,thmi.dtsDevices/lilygo-tlora-pager/device.propertiesDevices/lilygo-tlora-pager/lilygo,tlora-pager.dtsDevices/m5stack-cardputer-adv/device.propertiesDevices/m5stack-cardputer-adv/m5stack,cardputer-adv.dtsDevices/m5stack-cardputer/device.propertiesDevices/m5stack-cardputer/m5stack,cardputer.dtsDevices/m5stack-cores3/device.propertiesDevices/m5stack-cores3/m5stack,cores3.dtsDevices/m5stack-papers3/device.propertiesDevices/m5stack-papers3/m5stack,papers3.dtsDevices/m5stack-stackchan/device.propertiesDevices/m5stack-stackchan/m5stack,stackchan.dtsDevices/m5stack-sticks3/device.propertiesDevices/m5stack-sticks3/m5stack,sticks3.dtsDevices/m5stack-tab5/Source/devices/tab5_keyboard.cppDevices/m5stack-tab5/device.propertiesDevices/m5stack-tab5/m5stack,tab5.dtsDevices/waveshare-esp32-s3-geek/device.propertiesDevices/waveshare-esp32-s3-geek/waveshare,esp32-s3-geek.dtsDevices/waveshare-s3-lcd-13/device.propertiesDevices/waveshare-s3-lcd-13/waveshare,s3-lcd-13.dtsDevices/waveshare-s3-touch-lcd-128/device.propertiesDevices/waveshare-s3-touch-lcd-128/waveshare,s3-touch-lcd-128.dtsDevices/waveshare-s3-touch-lcd-147/device.propertiesDevices/waveshare-s3-touch-lcd-147/waveshare,s3-touch-lcd-147.dtsDevices/waveshare-s3-touch-lcd-43/device.propertiesDevices/waveshare-s3-touch-lcd-43/waveshare,s3-touch-lcd-43.dtsDevices/wireless-tag-wt32-sc01-plus/device.propertiesDevices/wireless-tag-wt32-sc01-plus/wireless-tag,wt32-sc01-plus.dtsModules/lvgl-module/include/lvgl/devices/pointer.hModules/lvgl-module/include/lvgl/widgets/toolbar.hModules/lvgl-module/source/devices/devices.cppModules/lvgl-module/source/devices/pointer.cppModules/lvgl-module/source/symbols.cModules/lvgl-module/source/widgets/toolbar.cppPlatforms/platform-esp32/CMakeLists.txtPlatforms/platform-esp32/bindings/espressif,esp32-usbdevice-cdc.yamlPlatforms/platform-esp32/bindings/espressif,esp32-usbdevice-hid.yamlPlatforms/platform-esp32/bindings/espressif,esp32-usbdevice-midi.yamlPlatforms/platform-esp32/bindings/espressif,esp32-usbdevice-msc.yamlPlatforms/platform-esp32/bindings/espressif,esp32-usbdevice.yamlPlatforms/platform-esp32/include/tactility/bindings/esp32_usbdevice.hPlatforms/platform-esp32/include/tactility/drivers/esp32_usbdevice.hPlatforms/platform-esp32/include/tactility/drivers/hid_report_descriptors.hPlatforms/platform-esp32/source/drivers/bluetooth/esp32_ble_hid.cppPlatforms/platform-esp32/source/drivers/hid_report_descriptors.cppPlatforms/platform-esp32/source/drivers/usb/esp32_usb_cdc_device.cppPlatforms/platform-esp32/source/drivers/usb/esp32_usb_device_controller.cppPlatforms/platform-esp32/source/drivers/usb/esp32_usb_device_msc.cppPlatforms/platform-esp32/source/drivers/usb/esp32_usb_hid_device.cppPlatforms/platform-esp32/source/drivers/usb/esp32_usb_midi_device.cppPlatforms/platform-esp32/source/module.cppTactility/Source/hal/usb/UsbTusb.cppTactilityKernel/include/tactility/drivers/bluetooth_hid_device.hTactilityKernel/include/tactility/drivers/keyboard.hTactilityKernel/include/tactility/drivers/usb_cdc_device.hTactilityKernel/include/tactility/drivers/usb_device_controller.hTactilityKernel/include/tactility/drivers/usb_hid_device.hTactilityKernel/include/tactility/drivers/usb_midi_device.hTactilityKernel/include/tactility/drivers/usb_msc_device.hTactilityKernel/source/drivers/keyboard.cppTactilityKernel/source/drivers/usb_cdc_device.cppTactilityKernel/source/drivers/usb_device_controller.cppTactilityKernel/source/drivers/usb_hid_device.cppTactilityKernel/source/drivers/usb_midi_device.cppTactilityKernel/source/drivers/usb_msc_device.cppTactilityKernel/source/symbols.cdevice.py
|
Great stuff once again! Thank you! |
Adds the ability for Tactility to present itself as a USB device to a host: mass storage (MSC), HID keyboard/mouse/gamepad, MIDI, and an optional CDC-ACM serial console.
USB device-mode stack
usb_device_controllerkernel driver: owns the single TinyUSB device-mode slot. Exactlyone of MSC/HID/MIDI ("primary classes") may be active at a time.
usb_hid_device,usb_msc_device,usb_midi_device,usb_cdc_devicekernel driver APIs, each a childdevicetree node under a board's
usbdevice0.runtime. Shares report descriptor bytes with the existing BLE HID implementation.
mode" boot flow).
MSC is deliberately excluded - an MSC device should look like plain mass storage, nothing extra.
Required generalizing descriptor building into a small composite-descriptor assembler in the controller.
(primary classes request interface/endpoint numbers, build their own bytes, the controller assembles and installs the final descriptor).
Multi-touch input (lvgl-module)
one shared bus read per polling round).
lvgl_pointer_get_slot_index()lets apps track independent per-finger state.Toolbar dropdown widget
lvgl_toolbar_add_dropdown_action()so a dropdown can live correctly inside a toolbar's managed layout instead of being manually positioned.Devices updated
hardware.tinyUsb=truehave been updated withhardware.tinyUsbMsc=trueand had their.dtsupdated for the newusbdevice0/usbdevicemsc0node shape.m5stack-tab5additionally hasusbdevicehid0,usbdevicemidi0, andusbdevicecdc0enabled.Summary by CodeRabbit