aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaximilien Cuony <maximilien@theglu.org>2016-04-18 19:26:45 +0200
committerMaximilien Cuony <maximilien@theglu.org>2016-04-18 19:26:45 +0200
commit5927d922ee95f3e3eeed99302b25094aeec1d622 (patch)
tree112b9c924a283930e1fbad32463b4e2306a00877
parent05e9acf260f9adb1f14df038c2f005d7f473a70c (diff)
downloadglutte-o-matic-5927d922ee95f3e3eeed99302b25094aeec1d622.tar.gz
glutte-o-matic-5927d922ee95f3e3eeed99302b25094aeec1d622.tar.bz2
glutte-o-matic-5927d922ee95f3e3eeed99302b25094aeec1d622.zip
Disable task switching when using UART
-rw-r--r--src/fsm/usart.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/fsm/usart.c b/src/fsm/usart.c
index ab6fc36..5dff116 100644
--- a/src/fsm/usart.c
+++ b/src/fsm/usart.c
@@ -148,12 +148,14 @@ void usart_gps_init()
static void usart_puts(USART_TypeDef* USART, const char* str)
{
+ vTaskSuspendAll();
while(*str) {
// wait until data register is empty
USART_SendData(USART, *str);
while(USART_GetFlagStatus(USART, USART_FLAG_TXE) == RESET) ;
str++;
}
+ xTaskResumeAll();
}
void usart_gps_puts(const char* str)