Skip to content

Commit 5c2def6

Browse files
committed
Initialize serial port from main task
Instead of initializing the serial port from the serial-out task, it's safer to initialize the serial port from the main task before doing any related work.
1 parent 053ce14 commit 5c2def6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Serial.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ typedef struct
2424
static void
2525
Run(SerialOutTask* aSerialOut)
2626
{
27-
InitTerm();
2827
ClearTerm();
2928

3029
for (;;) {
@@ -85,6 +84,8 @@ static SerialOutTask sSerialOutTask;
8584
int
8685
SerialInit()
8786
{
87+
InitTerm();
88+
8889
/*
8990
* Create the output task
9091
*/

0 commit comments

Comments
 (0)