mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-25 22:43:50 +01:00
implement uart0_puts properly
This commit is contained in:
parent
eeb8c60e7e
commit
ca6f20f384
@ -5,6 +5,7 @@
|
||||
#include <err.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <sys/select.h>
|
||||
|
||||
@ -19,7 +20,14 @@ fd_set _native_uart_rfds;
|
||||
|
||||
inline int uart0_puts(char *astring, int length)
|
||||
{
|
||||
return puts(astring);
|
||||
_native_in_syscall = 1;
|
||||
/* XXX: handle short writes: */
|
||||
if (write(_native_uart_out, astring, length) == -1) {
|
||||
err(EXIT_FAILURE, "uart0_puts: write");
|
||||
return -1;
|
||||
}
|
||||
_native_in_syscall = 0;
|
||||
return length;
|
||||
}
|
||||
|
||||
void _native_handle_uart0_input()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user