From 18ffc47807b47fd5e50d4d8a0ee7f5f01c82c7f2 Mon Sep 17 00:00:00 2001 From: Kelvin Lawson Date: Mon, 3 May 2010 12:57:41 +0100 Subject: [PATCH] STM8 uart.c: Return mutex to allow multiple threads access to the UART. --- ports/stm8/uart.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ports/stm8/uart.c b/ports/stm8/uart.c index 026d3f6..732a769 100644 --- a/ports/stm8/uart.c +++ b/ports/stm8/uart.c @@ -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);