Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions cores/esp32/esp32-hal-uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ uart_t* uartBegin(uint8_t uart_nr, uint32_t baudrate, uint32_t config, int8_t rx
uart->dev->conf0.val = config;
#define TWO_STOP_BITS_CONF 0x3
#define ONE_STOP_BITS_CONF 0x1

if ( uart->dev->conf0.stop_bit_num == TWO_STOP_BITS_CONF) {
uart->dev->conf0.stop_bit_num = ONE_STOP_BITS_CONF;
uart->dev->rs485_conf.dl1_en = 1;
Expand Down Expand Up @@ -228,11 +228,12 @@ void uartEnd(uart_t* uart)
vQueueDelete(uart->queue);
}

uartDetachRx(uart);
uartDetachTx(uart);

uart->dev->conf0.val = 0;

UART_MUTEX_UNLOCK();

uartDetachRx(uart);
uartDetachTx(uart);
}

uint32_t uartAvailable(uart_t* uart)
Expand Down Expand Up @@ -419,4 +420,3 @@ int log_printf(const char *format, ...)
}
return len;
}