Fixes onReceive deadlock (#6201)

This commit is contained in:
Rodrigo Garcia 2022-01-31 08:03:43 -03:00 committed by GitHub
parent 9555ed4b76
commit 39a2080922
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -106,9 +106,7 @@ static void uart_event_task(void *args)
switch(event.type) { switch(event.type) {
//Event of UART receving data //Event of UART receving data
case UART_DATA: case UART_DATA:
UART_MUTEX_LOCK();
if(uart->onReceive) uart->onReceive(); if(uart->onReceive) uart->onReceive();
UART_MUTEX_UNLOCK();
break; break;
//Event of HW FIFO overflow detected //Event of HW FIFO overflow detected
case UART_FIFO_OVF: case UART_FIFO_OVF: