mirror of
https://github.com/kelvinlawson/atomthreads.git
synced 2026-01-11 18:33:16 +01:00
STM8 uart.c: Return mutex to allow multiple threads access to the UART.
This commit is contained in:
@@ -67,7 +67,10 @@ char putchar (char c)
|
||||
/* Loop until the end of transmission */
|
||||
while (UART2_GetFlagStatus(UART2_FLAG_TXE) == RESET)
|
||||
;
|
||||
|
||||
|
||||
/* Return mutex access */
|
||||
atomMutexPut(&uart_mutex);
|
||||
|
||||
}
|
||||
|
||||
return (c);
|
||||
|
||||
Reference in New Issue
Block a user