Skip to content

Commit 0c60c73

Browse files
authored
fix: mutex release
1 parent 793b1fb commit 0c60c73

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: libraries/ESP32/examples/Serial/onReceiveExample/onReceiveExample.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ void loop() {
107107
UART0.print(" bytes] ");
108108
UART0.println(uart_buffer);
109109
uart_buffer = ""; // reset uart_buffer for the next UART reading
110+
// releases the mutex for more data to be received
111+
xSemaphoreGive(uart_buffer_Mutex);
110112
}
111-
// releases the mutex for more data to be received
112-
xSemaphoreGive(uart_buffer_Mutex);
113113
}
114114
UART0.println("Sleeping for 1 second...");
115115
delay(1000);

0 commit comments

Comments
 (0)