mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
native cc110x_ng support
This commit is contained in:
parent
dc5e7d7e1f
commit
d7264418e8
@ -27,6 +27,10 @@ void _native_handle_uart0_input()
|
||||
char buf[42];
|
||||
int nread;
|
||||
|
||||
if (!FD_ISSET(_native_uart_in, &_native_rfds)) {
|
||||
DEBUG("_native_handle_uart0_input - nothing to do\n");
|
||||
return;
|
||||
}
|
||||
DEBUG("_native_handle_uart0_input\n");
|
||||
_native_in_syscall = 0;
|
||||
_native_in_isr = 1;
|
||||
@ -44,15 +48,18 @@ void _native_handle_uart0_input()
|
||||
cpu_switch_context_exit();
|
||||
}
|
||||
|
||||
int _native_set_uart_fds(void)
|
||||
{
|
||||
DEBUG("_native_set_uart_fds");
|
||||
FD_SET(_native_uart_in, &_native_rfds);
|
||||
return _native_uart_in;
|
||||
}
|
||||
|
||||
void _native_init_uart0()
|
||||
{
|
||||
_native_uart_out = STDOUT_FILENO;
|
||||
_native_uart_in = STDIN_FILENO;
|
||||
|
||||
/* set fds for select in lpm */
|
||||
FD_ZERO(&_native_uart_rfds);
|
||||
FD_SET(_native_uart_in, &_native_uart_rfds);
|
||||
|
||||
puts("RIOT native uart0 initialized.");
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#ifdef MODULE_UART0
|
||||
#include <sys/select.h>
|
||||
extern fd_set _native_uart_rfds;
|
||||
void _native_handle_uart0_input(void);
|
||||
void _native_init_uart0(void);
|
||||
int _native_set_uart_fds(void);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user