Avoid stopping unstarted nRF UARTs during bridge wake
This commit is contained in:
1 parent
32e920250a
commit
6a2fd182d3
6 files changed
+266
-2
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user