mirror of
https://github.com/esphome/esphome.git
synced 2026-09-21 12:08:38 +00:00
[tinyusb] Add on_mount/on_unmount triggers and is_mounted condition (#19067)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
588ad529e0
commit
328077c4f8
@@ -6,6 +6,15 @@ tinyusb:
|
||||
usb_product_str: ESPHomeTestProduct
|
||||
usb_serial_str: ESPHomeTestSerialNumber
|
||||
usb_vendor_id: 0x2345
|
||||
on_mount:
|
||||
- logger.log: USB host mounted
|
||||
- if:
|
||||
condition:
|
||||
tinyusb.is_mounted:
|
||||
then:
|
||||
- logger.log: USB host is mounted
|
||||
on_unmount:
|
||||
- logger.log: USB host unmounted
|
||||
|
||||
# tinyusb requires at least one USB class companion; usb_cdc_acm satisfies that.
|
||||
usb_cdc_acm:
|
||||
|
||||
@@ -1 +1,7 @@
|
||||
<<: !include common.yaml
|
||||
packages:
|
||||
tinyusb: !include common.yaml
|
||||
|
||||
# VBUS monitoring is per variant: the OTG hardware watches the pin here, while the
|
||||
# S31 would need the GPIO ISR path and rejects the key.
|
||||
tinyusb:
|
||||
vbus_monitor_pin: 4
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
<<: !include common.yaml
|
||||
packages:
|
||||
tinyusb: !include common.yaml
|
||||
|
||||
# VBUS monitoring is per variant: the OTG hardware watches the pin here, while the
|
||||
# S31 would need the GPIO ISR path and rejects the key.
|
||||
tinyusb:
|
||||
vbus_monitor_pin: 4
|
||||
|
||||
# S2 defaults logger to USB_CDC, which conflicts with tinyusb on the shared
|
||||
# USB OTG peripheral; route the logger to UART0 so the fixture builds.
|
||||
|
||||
@@ -1 +1,7 @@
|
||||
<<: !include common.yaml
|
||||
packages:
|
||||
tinyusb: !include common.yaml
|
||||
|
||||
# VBUS monitoring is per variant: the OTG hardware watches the pin here, while the
|
||||
# S31 would need the GPIO ISR path and rejects the key.
|
||||
tinyusb:
|
||||
vbus_monitor_pin: 4
|
||||
|
||||
Reference in New Issue
Block a user