The friendly Operating System for the Internet of Things
UART stdio

stdio init/read/write functions for UARTs More...

Detailed Description

Files

file  uart_stdio.h
 

Macros

#define UART_STDIO_DEV   UART_DEV(0)
 UART device to use for STDIO.
 
#define UART_STDIO_BAUDRATE   (115200)
 Baudrate for STDIO.
 
#define UART_STDIO_RX_BUFSIZE   (64)
 Buffer size for STDIO.
 

Functions

void uart_stdio_init (void)
 initialize the module
 
int uart_stdio_read (char *buffer, int len)
 read len bytes from stdio uart into buffer More...
 
int uart_stdio_write (const char *buffer, int len)
 write len bytes from buffer into uart More...
 
void uart_stdio_rx_cb (void *arg, uint8_t data)
 internal callback for periph/uart drivers More...
 

Function Documentation

int uart_stdio_read ( char *  buffer,
int  len 
)
Parameters
[out]bufferbuffer to read into
[in]lennr of bytes to read
Returns
nr of bytes read
<0 on error
void uart_stdio_rx_cb ( void *  arg,
uint8_t  data 
)
Parameters
[in]arg(unused)
[in]datacharacter that has been received
int uart_stdio_write ( const char *  buffer,
int  len 
)
Parameters
[in]bufferbuffer to read from
[in]lennr of bytes to write
Returns
nr of bytes written
<0 on error