[improv_serial] Fix linker error created in #6998 (#7082)

This commit is contained in:
Keith Burzinski 2024-07-14 15:06:10 -05:00 committed by GitHub
parent 44d609b205
commit 896af84acc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -57,7 +57,7 @@ optional<uint8_t> ImprovSerialComponent::read_byte_() {
} }
} }
break; break;
#ifdef USE_LOGGER_USB_CDC #if defined(USE_LOGGER_USB_CDC) && defined(CONFIG_ESP_CONSOLE_USB_CDC)
case logger::UART_SELECTION_USB_CDC: case logger::UART_SELECTION_USB_CDC:
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0) #if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0)
if (esp_usb_console_available_for_read()) { if (esp_usb_console_available_for_read()) {
@ -99,7 +99,7 @@ void ImprovSerialComponent::write_data_(std::vector<uint8_t> &data) {
#endif // !USE_ESP32_VARIANT_ESP32C3 && !USE_ESP32_VARIANT_ESP32S2 && !USE_ESP32_VARIANT_ESP32S3 #endif // !USE_ESP32_VARIANT_ESP32C3 && !USE_ESP32_VARIANT_ESP32S2 && !USE_ESP32_VARIANT_ESP32S3
uart_write_bytes(this->uart_num_, data.data(), data.size()); uart_write_bytes(this->uart_num_, data.data(), data.size());
break; break;
#ifdef USE_LOGGER_USB_CDC #if defined(USE_LOGGER_USB_CDC) && defined(CONFIG_ESP_CONSOLE_USB_CDC)
case logger::UART_SELECTION_USB_CDC: { case logger::UART_SELECTION_USB_CDC: {
const char *msg = (char *) data.data(); const char *msg = (char *) data.data();
esp_usb_console_write_buf(msg, data.size()); esp_usb_console_write_buf(msg, data.size());
@ -109,6 +109,7 @@ void ImprovSerialComponent::write_data_(std::vector<uint8_t> &data) {
#ifdef USE_LOGGER_USB_SERIAL_JTAG #ifdef USE_LOGGER_USB_SERIAL_JTAG
case logger::UART_SELECTION_USB_SERIAL_JTAG: case logger::UART_SELECTION_USB_SERIAL_JTAG:
usb_serial_jtag_write_bytes((char *) data.data(), data.size(), 20 / portTICK_PERIOD_MS); usb_serial_jtag_write_bytes((char *) data.data(), data.size(), 20 / portTICK_PERIOD_MS);
delay(10);
usb_serial_jtag_ll_txfifo_flush(); // fixes for issue in IDF 4.4.7 usb_serial_jtag_ll_txfifo_flush(); // fixes for issue in IDF 4.4.7
break; break;
#endif // USE_LOGGER_USB_SERIAL_JTAG #endif // USE_LOGGER_USB_SERIAL_JTAG