mirror of
https://github.com/esphome/esphome.git
synced 2026-10-07 03:16:37 +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:
|
||||
|
||||
Reference in New Issue
Block a user