git.droids-corp.org
/
aversive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove inline in spi module
[aversive.git]
/
modules
/
comm
/
uart
/
uart_host.c
diff --git
a/modules/comm/uart/uart_host.c
b/modules/comm/uart/uart_host.c
index
bd6aeed
..
04231c2
100644
(file)
--- a/
modules/comm/uart/uart_host.c
+++ b/
modules/comm/uart/uart_host.c
@@
-24,6
+24,8
@@
#include <uart.h>
#include <uart_private.h>
#include <uart.h>
#include <uart_private.h>
+#include <fcntl.h>
+
/* this file os a stub for host */
void uart_init(void)
/* 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)
{
int uart_recv(uint8_t num)
{
+ fcntl(0, F_SETFL, 0);
return getchar();
}
return getchar();
}
-/* XXX should not wait */
int uart_recv_nowait(uint8_t num)
{
int uart_recv_nowait(uint8_t num)
{
+ fcntl(0, F_SETFL, O_NONBLOCK);
return getchar();
}
return getchar();
}