Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow to switch between USB_CDC and UART for ESP32C3 boards #2548

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

MaBecker
Copy link
Contributor

'DEFINES+=-DUSB_CDC', # Disable this line to use serial interface

Tested with both ESP32C3 boards. Please let me know if this is ok or you want me to change anything.

  'DEFINES+=-DUSB_CDC', # Disable this line to use serial interface
@gfwilliams
Copy link
Member

Looks great - thanks!

@gfwilliams gfwilliams merged commit 66fec69 into espruino:master Aug 29, 2024
18 of 19 checks passed
@SimonGAndrews
Copy link

hi @MaBecker , I'm curious how the uart knows what pins to use for tx and rx. I can see in jshardwareUart.c , in the case where serial device is EVSERIAL1, line 65 that inituart() is being called with tx and rx gpio set to -1. Is that the way the tx and rx are disabled ? That may have been the desired state when using the usb.

Screenshot from 2024-08-29 08-46-59

(the screen shot shows this call and the inituart() function on line 34. )

@gfwilliams
Copy link
Member

Espruino tries to search for supported UART pins if none are specified, so it might come from: https://github.com/espruino/Espruino/blob/master/boards/ESP32C3_IDF4.py#L162-L163

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants