Files
OpenCellular/chip
Vadim Bendebury ac4c3020de g: tweak cflush() to wait a bit longer
It turns out that even when the UART status register returns TX_IDLE
bit set, the transmitter is still active - probably working out the
stop sequence.

So, resetting immediately after TX_EMPTY is asserted causes the last
character to be corrupted on the receiving side.

This patch adds a wait for the duration of transmitting 10 bits at
115200 baud, which should be plenty. Wait loop in capped in case timer
is not running for any reason.

BRANCH=none
BUG=chrome-os-partner:60321
TEST=added code to print out a string and then call cflush() and reset
     immediately. The last character is not lost any more, the exact
     string is printed.

Change-Id: If386c515d9d9cc63d161fba73e6ed4e70e465136
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/418487
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
2016-12-12 21:03:37 -08:00
..
2016-12-12 21:03:37 -08:00
2016-11-18 20:07:08 -08:00