Skip to content
Snippets Groups Projects
Commit d7264418 authored by Ludwig Knüpfer's avatar Ludwig Knüpfer
Browse files

native cc110x_ng support

parent dc5e7d7e
No related branches found
No related tags found
No related merge requests found
......@@ -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.");
}
......
#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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment