uart-pipe: Fix using fifo_fill instead of poll_out
For non-interrupt transfers poll_out should be used, This fixes data lost issues on a real UART hardware like Arduino 101 and Galileo boards. Change-Id: Ic7a5d055941d83f9d62cbea9e911ce25730ed7b6 Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This commit is contained in:
parent
d2c87d1e86
commit
6948fc437a
@ -65,11 +65,11 @@ void uart_pipe_isr(void *unused)
|
||||
|
||||
int uart_pipe_send(const uint8_t *data, int len)
|
||||
{
|
||||
if (uart_pipe_dev != NULL) {
|
||||
return uart_fifo_fill(uart_pipe_dev, data, len);
|
||||
} else {
|
||||
return 0;
|
||||
while (len--) {
|
||||
uart_poll_out(uart_pipe_dev, *data++);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void uart_pipe_setup(struct device *uart)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user