Commit 1f897860 authored by schneider's avatar schneider Committed by Øyvind Kolås
Browse files

fix(serial): Unblock if the queue is full

For some reason a portYIELD() is not enough to give the serial task the
option to run. I tried vTaskDelay() and that works. To not block more than
needed portYIELD() is still called when the queue is not full and only
call vTaskDelay() when it is full.

Closes #218
parent 580fa3fe
......@@ -119,7 +119,11 @@ void epic_uart_write_str(const char *str, size_t length)
SERIAL_WRITE_NOTIFY,
eSetBits
);
portYIELD();
if (bytes_sent == 0) {
vTaskDelay(1);
} else {
portYIELD();
}
}
} while (index < length);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment