uartEnd: Unlock mutex before detaching rx and tx (#554)
* uartEnd: Unlock mutex before detaching rx and tx This should solve the device freezing issue when Serial.end() is called * Unlock UART MUTEX only for detaching Rx and Tx * Thanks to @me-no-dev for pointing it out that uart->dev->conf0.val can be inside mutex lock
This commit is contained in:
parent
9618eec19e
commit
41e36a72f3
@ -228,11 +228,12 @@ void uartEnd(uart_t* uart)
|
||||
vQueueDelete(uart->queue);
|
||||
}
|
||||
|
||||
uart->dev->conf0.val = 0;
|
||||
|
||||
UART_MUTEX_UNLOCK();
|
||||
|
||||
uartDetachRx(uart);
|
||||
uartDetachTx(uart);
|
||||
|
||||
uart->dev->conf0.val = 0;
|
||||
UART_MUTEX_UNLOCK();
|
||||
}
|
||||
|
||||
uint32_t uartAvailable(uart_t* uart)
|
||||
@ -419,4 +420,3 @@ int log_printf(const char *format, ...)
|
||||
}
|
||||
return len;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user