Skip to content

Commit b70de02

Browse files
committed
Typo: fixes typos and some testing left over
1 parent 5fed183 commit b70de02

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

cores/esp32/HardwareSerial.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,8 @@ void HardwareSerial::begin(unsigned long baud, uint32_t config, int8_t rxPin, in
337337
_destroyEventTask(); // when IDF uart driver must be restarted, _eventTask must finish too
338338
}
339339

340+
// IDF UART driver keeps Pin setting on restarting. Negative Pin number will keep it unmodified.
341+
// it will detach previous UART attached pins
340342
_uart = uartBegin(_uart_nr, baud ? baud : 9600, config, rxPin, txPin, _rxBufferSize, _txBufferSize, invert, rxfifo_full_thrhd);
341343
if (_uart == NULL) {
342344
log_e("UART driver failed to start. Please check the logs.");

cores/esp32/esp32-hal-uart.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
#include "esp32-hal-uart.h"
1616

17-
#define SOC_UART_SUPPORTED 1
1817
#if SOC_UART_SUPPORTED
1918
#include "esp32-hal.h"
2019
#include "esp32-hal-periman.h"
@@ -104,7 +103,7 @@ static bool _uartDetachPins(uint8_t uart_num, int8_t rxPin, int8_t txPin, int8_t
104103
// detaches pins and sets Peripheral Manager and UART information
105104
if (rxPin >= 0 && uart->_rxPin == rxPin && perimanGetPinBusType(rxPin) == ESP32_BUS_TYPE_UART_RX) {
106105
gpio_hal_iomux_func_sel(GPIO_PIN_MUX_REG[rxPin], PIN_FUNC_GPIO);
107-
// avoids cause BREAK in the UART line
106+
// avoids causing BREAK in the UART line
108107
if (uart->_inverted) {
109108
esp_rom_gpio_connect_in_signal(GPIO_FUNC_IN_LOW, UART_PERIPH_SIGNAL(uart_num, SOC_UART_RX_PIN_IDX), false);
110109
} else {

0 commit comments

Comments
 (0)