Skip to content

Commit 36221d1

Browse files
committed
fixes LOCK macro when disabled
1 parent a1f8cfb commit 36221d1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cores/esp32/HardwareSerial.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ void serialEventRun(void)
119119
#if !CONFIG_DISABLE_HAL_LOCKS
120120
#define HSERIAL_MUTEX_LOCK() do {} while (xSemaphoreTake(_lock, portMAX_DELAY) != pdPASS)
121121
#define HSERIAL_MUTEX_UNLOCK() xSemaphoreGive(_lock)
122+
#else
123+
#define HSERIAL_MUTEX_LOCK()
124+
#define HSERIAL_MUTEX_UNLOCK()
122125
#endif
123126

124127
HardwareSerial::HardwareSerial(int uart_nr) :

cores/esp32/esp32-hal-uart.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,7 @@ void uartGetEventQueue(uart_t* uart, QueueHandle_t *q)
9090
if(uart == NULL) {
9191
return;
9292
}
93-
// MUTEX will lock for the case that another task is executing begin() on the same UART and has not finished
94-
//UART_MUTEX_LOCK();
9593
*q = uart->uart_event_queue;
96-
//UART_MUTEX_UNLOCK();
9794
return;
9895
}
9996

0 commit comments

Comments
 (0)