X-Git-Url: http://git.droids-corp.org/?p=aversive.git;a=blobdiff_plain;f=modules%2Fcomm%2Fuart%2Fuart_host.c;fp=modules%2Fcomm%2Fuart%2Fuart_host.c;h=04231c2fbaa35b8509f760cfd2e21979ddaa507e;hp=bd6aeed993e2b37d071587591ab72e8fa06f513f;hb=fa8546ea39c7442ad3bf5a822a72a2b50a41045d;hpb=a33ceba76b3770d48c68a321b5d259893ddc613c diff --git a/modules/comm/uart/uart_host.c b/modules/comm/uart/uart_host.c index bd6aeed..04231c2 100644 --- a/modules/comm/uart/uart_host.c +++ b/modules/comm/uart/uart_host.c @@ -24,6 +24,8 @@ #include #include +#include + /* this file os a stub for host */ void uart_init(void) @@ -61,12 +63,13 @@ void uart_getconf(uint8_t num, struct uart_config *u) int uart_recv(uint8_t num) { + fcntl(0, F_SETFL, 0); return getchar(); } -/* XXX should not wait */ int uart_recv_nowait(uint8_t num) { + fcntl(0, F_SETFL, O_NONBLOCK); return getchar(); }