Avoid stopping unstarted nRF UARTs during bridge wake

This commit is contained in:
mikecarper committed 2026-10-14 00:21:04 -07:00
1 parent 32e920250a
commit 6a2fd182d3
6 files changed
+266 -2

No files matched your search

+4 -1
View File
@@ -5,7 +5,10 @@ namespace bridge {
template <typename UartType, typename PinType>
inline void prepareNrfUart(UartType& uart, PinType rx, PinType tx) {
uart.end();
// Adafruit Uart::end() requires a begun peripheral and a live TX semaphore.
// Its public bool reports that state; a fresh or already stopped UART must
// not wait for stop events or delete an unallocated semaphore.
if (uart) uart.end();
uart.setPins(rx, tx);
}