with USB CDC on ESP32-S3 and S2, how can I read and set DTR and RTS lines?

greengnu
Posts: 66
Joined: Wed May 08, 2019 8:45 pm

with USB CDC on ESP32-S3 and S2, how can I read and set DTR and RTS lines?

Postby greengnu » Mon Mar 10, 2025 9:15 am

I see in esp32-arduino that there's at least some callback providing dtr and rts lines (https://docs.espressif.com/projects/ard ... b_cdc.html ARDUINO_USB_CDC_LINE_STATE_EVENT)

in ESP-IDF, how can I read (in device mode) and write (in host mode) the (virtual) dtr and rts lines?

nopnop2002
Posts: 363
Joined: Thu Oct 03, 2019 10:52 pm
Contact:

Re: with USB CDC on ESP32-S3 and S2, how can I read and set DTR and RTS lines?

Postby nopnop2002 » Wed Mar 12, 2025 9:44 am

You can use this to know when the state of DTR and RTS changes.
callback_line_state_changed
This is the same function as ARDUINO_USB_CDC_LINE_STATE_EVENT.

How to use:
https://github.com/nopnop2002/esp-idf-s ... ain.c#L172

I don't know of any functions that change the state of DTR and RTS.


Who is online

Users browsing this forum: Baidu [Spider], Qwantbot and 3 guests