#include <uart.h>
#include <uart_private.h>
+#include <fcntl.h>
+
/* this file os a stub for host */
void uart_init(void)
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();
}