53 auto shouldFallbackToSoftwareSerial = [&]() ->
bool {
59#if LT_ARD_HAS_SOFTSERIAL
60 ESP_LOGI(TAG,
"Pins has flags set. Using Software Serial");
63 ESP_LOGW(TAG,
"Pin flags are set but not supported for hardware serial. Ignoring");
72 else if ((tx_pin == -1 || tx_pin == PIN_SERIAL0_TX) && (rx_pin == -1 || rx_pin == PIN_SERIAL0_RX) &&
73 !shouldFallbackToSoftwareSerial()) {
79 else if ((tx_pin == -1 || tx_pin == PIN_SERIAL1_TX) && (rx_pin == -1 || rx_pin == PIN_SERIAL1_RX) &&
80 !shouldFallbackToSoftwareSerial()) {
86 else if ((tx_pin == -1 || tx_pin == PIN_SERIAL2_TX) && (rx_pin == -1 || rx_pin == PIN_SERIAL2_RX) &&
87 !shouldFallbackToSoftwareSerial()) {
93#if LT_ARD_HAS_SOFTSERIAL
100 this->
serial_ =
new SoftwareSerial(rx_pin, tx_pin, rx_inverted || tx_inverted);
103 ESP_LOGE(TAG,
" SoftwareSerial is not implemented for this chip. Only hardware pins are supported:");
105 ESP_LOGE(TAG,
" TX=%u, RX=%u", PIN_SERIAL0_TX, PIN_SERIAL0_RX);
108 ESP_LOGE(TAG,
" TX=%u, RX=%u", PIN_SERIAL1_TX, PIN_SERIAL1_RX);
111 ESP_LOGE(TAG,
" TX=%u, RX=%u", PIN_SERIAL2_TX, PIN_SERIAL2_RX);