[HWCDC] Improve HW CDC Implementation (#5643)

This pull request contains a few fixes and improvements to the HWCDC implementation.
- Rework `HWCDC::write()` to accept unlimited data
- Add Semaphore to guard the TX Ring Buffer
- Add events support
- Remove unnecessary 1200bps touch for flashing over HWCDC
- Fix `HardwareSerial::setDebugOutput()` not resetting `putc` if the port is already selected, causing debug output to also show on HWCDC even when not selected.
This commit is contained in:
Me No Dev
2021-09-15 19:37:09 +03:00
committed by GitHub
parent 541cef9149
commit 078671d273
4 changed files with 144 additions and 25 deletions

View File

@ -368,13 +368,9 @@ void uartSetDebug(uart_t* uart)
{
if(uart == NULL || uart->num >= SOC_UART_NUM) {
s_uart_debug_nr = -1;
//ets_install_putc1(NULL);
//return;
} else
if(s_uart_debug_nr == uart->num) {
return;
} else
s_uart_debug_nr = uart->num;
} else {
s_uart_debug_nr = uart->num;
}
uart_install_putc();
}