-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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 use of CDC/JTAG loggers on esp32 variants with Arduino #4658
Conversation
Hey there @esphome/core, mind taking a look at this pull request as it has been labeled with an integration ( |
Any update on this PR? |
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions. |
a039dd9
to
3385434
Compare
Ok, this should be good to go now -- just getting #4853 sync'd up with it. |
#if defined(USE_ESP32) && \ | ||
(defined(USE_ESP32_VARIANT_ESP32S2) || defined(USE_ESP32_VARIANT_ESP32S3) || defined(USE_ESP32_VARIANT_ESP32C3)) | ||
#if defined(USE_ESP32_VARIANT_ESP32S2) || defined(USE_ESP32_VARIANT_ESP32S3) | ||
case UART_SELECTION_USB_CDC: | ||
#endif // USE_ESP32_VARIANT_ESP32S2 || USE_ESP32_VARIANT_ESP32S3 | ||
#if defined(USE_ESP32_VARIANT_ESP32C3) || defined(USE_ESP32_VARIANT_ESP32S3) | ||
case UART_SELECTION_USB_SERIAL_JTAG: | ||
#endif // USE_ESP32_VARIANT_ESP32C3 || USE_ESP32_VARIANT_ESP32S3 | ||
#ifdef USE_ESP32_VARIANT_ESP32C3 | ||
this->hw_serial_ = &Serial; | ||
Serial.begin(this->baud_rate_); | ||
#endif // USE_ESP32_VARIANT_ESP32C3 | ||
#if defined(USE_ESP32_VARIANT_ESP32S2) || defined(USE_ESP32_VARIANT_ESP32S3) | ||
#if ARDUINO_USB_CDC_ON_BOOT | ||
this->hw_serial_ = &Serial; | ||
Serial.begin(this->baud_rate_); | ||
#else | ||
this->hw_serial_ = &Serial; | ||
Serial.begin(this->baud_rate_); | ||
#endif // ARDUINO_USB_CDC_ON_BOOT | ||
#endif // USE_ESP32_VARIANT_ESP32S2 || USE_ESP32_VARIANT_ESP32S3 | ||
break; | ||
#endif // USE_ESP32 && (USE_ESP32_VARIANT_ESP32S2 || USE_ESP32_VARIANT_ESP32S3 || USE_ESP32_VARIANT_ESP32C3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of these #ifdef
s could be condensed -- I'm not sure if we want to keep them broken apart (in case things change in the future) or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha, its so hard to read (Not saying it has to change right now)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔️ (Cant approve my own PR 🤣) Tested and working on my s3-box-3 with arduino and even with improv_serial
What does this implement/fix?
Types of changes
Related issue or feature (if applicable): fixes
Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#
Test Environment
Example entry for
config.yaml
:# Example config.yaml
Checklist:
tests/
folder).If user exposed functionality or configuration variables are added/changed: