Bugfix/detect baudrate (#3188)

* Expose uartStartDetectBaudrate(uart_t *) in esp32-hal-uart.h and call it from HardwareSerial::begin() if baudrate detection is requested (by passing a baudrate of 0) to solve baudrate detection problems

* Avoid a division by zero error in uartGetBaudRate()
This commit is contained in:
Jeroen88
2019-09-08 23:59:32 +02:00
committed by Me No Dev
parent 5f77b0108b
commit f71a4bd406
3 changed files with 15 additions and 0 deletions

View File

@ -72,6 +72,7 @@ size_t uartResizeRxBuffer(uart_t* uart, size_t new_size);
void uartSetDebug(uart_t* uart);
int uartGetDebug();
void uartStartDetectBaudrate(uart_t *uart);
unsigned long uartDetectBaudrate(uart_t *uart);
bool uartRxActive(uart_t* uart);