mirror of
https://github.com/esphome/esphome.git
synced 2026-09-30 00:10:22 +00:00
[bridge] New component and cdc_acm_uart platform (#11689)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
co-authored by
Jesse Hills
pre-commit-ci-lite[bot]
Claude Fable 5.1
J. Nick Koston
parent
eecea15f4f
commit
ebb9037ea1
@@ -0,0 +1,18 @@
|
||||
tinyusb:
|
||||
id: tinyusb_test
|
||||
usb_lang_id: 0x0123
|
||||
usb_manufacturer_str: ESPHomeTestManufacturer
|
||||
usb_product_id: 0x1234
|
||||
usb_product_str: ESPHomeTestProduct
|
||||
usb_serial_str: ESPHomeTestSerialNumber
|
||||
usb_vendor_id: 0x2345
|
||||
|
||||
uart:
|
||||
- id: uart_0
|
||||
tx_pin: 14
|
||||
rx_pin: 13
|
||||
baud_rate: 115200
|
||||
|
||||
usb_cdc_acm:
|
||||
interfaces:
|
||||
- id: cdc_acm_1
|
||||
@@ -0,0 +1,12 @@
|
||||
# Second UART/CDC pair for a two-bridge setup. Kept out of common.yaml because the
|
||||
# ESP32-S2 has only two UART controllers and the logger occupies one, so a second
|
||||
# uart there would fail at runtime.
|
||||
uart:
|
||||
- id: uart_1
|
||||
tx_pin: 15
|
||||
rx_pin: 16
|
||||
baud_rate: 115200
|
||||
|
||||
usb_cdc_acm:
|
||||
interfaces:
|
||||
- id: cdc_acm_2
|
||||
@@ -0,0 +1,15 @@
|
||||
packages:
|
||||
cdc_acm_uart: !include common.yaml
|
||||
cdc_acm_uart_dual: !include common_dual.yaml
|
||||
|
||||
bridge:
|
||||
- platform: cdc_acm_uart
|
||||
uart_id: uart_0
|
||||
usb_cdc_acm_id: cdc_acm_1
|
||||
dtr_pin: 40
|
||||
rts_pin: 41
|
||||
- platform: cdc_acm_uart
|
||||
uart_id: uart_1
|
||||
usb_cdc_acm_id: cdc_acm_2
|
||||
dtr_pin: 20
|
||||
rts_pin: 21
|
||||
@@ -0,0 +1,14 @@
|
||||
# ESP32-S2 has no USB_SERIAL_JTAG, so the logger defaults to USB_CDC, which shares
|
||||
# the USB OTG peripheral with tinyusb. Use a hardware UART for logging instead.
|
||||
logger:
|
||||
hardware_uart: UART0
|
||||
|
||||
packages:
|
||||
cdc_acm_uart: !include common.yaml
|
||||
|
||||
bridge:
|
||||
- platform: cdc_acm_uart
|
||||
uart_id: uart_0
|
||||
usb_cdc_acm_id: cdc_acm_1
|
||||
dtr_pin: 40
|
||||
rts_pin: 41
|
||||
@@ -0,0 +1,17 @@
|
||||
packages:
|
||||
cdc_acm_uart: !include common.yaml
|
||||
cdc_acm_uart_dual: !include common_dual.yaml
|
||||
|
||||
bridge:
|
||||
- platform: cdc_acm_uart
|
||||
uart_id: uart_0
|
||||
usb_cdc_acm_id: cdc_acm_1
|
||||
dtr_pin: 40
|
||||
rts_pin: 41
|
||||
- platform: cdc_acm_uart
|
||||
uart_id: uart_1
|
||||
usb_cdc_acm_id: cdc_acm_2
|
||||
# GPIO19/20 are USB D-/D+ on the S3 (which the CDC side itself uses); use
|
||||
# unrelated free pins here.
|
||||
dtr_pin: 17
|
||||
rts_pin: 18
|
||||
Reference in New Issue
Block a user