42#ifndef _STDIO_SERIAL_H_
43#define _STDIO_SERIAL_H_
62#if (XMEGA || MEGA_RF) && defined(__GNUC__)
63 extern int _write (
char c,
int *f);
64 extern int _read (
int *f);
71extern int (*
ptr_put)(
void volatile*, char);
74extern void (*
ptr_get)(
void volatile*,
char*);
87# if (XMEGA || MEGA_RF)
94# error Unsupported chip type
98# if (XMEGA || MEGA_RF)
100 fdevopen((
int (*)(
char, FILE*))(_write),(
int (*)(FILE*))(_read));
105 setbuf(stdout, NULL);
int(* ptr_put)(void volatile *, char)
Pointer to the external low level write function.
static void stdio_serial_init(volatile void *usart, const usart_serial_options_t *opt)
Initializes the stdio in Serial Mode.
void(* ptr_get)(void volatile *, char *)
Pointer to the external low level read function.
volatile void *volatile stdio_base
Pointer to the base of the USART module instance to use for stdio.
Usart hardware registers.
static int usart_serial_putchar(usart_if p_usart, const uint8_t c)
Sends a character with the USART.
static void usart_serial_init(usart_if p_usart, usart_serial_options_t *opt)
Initializes the Usart in master mode.
static void usart_serial_getchar(usart_if p_usart, uint8_t *data)
Waits until a character is received, and returns it.
usart_rs232_options_t usart_serial_options_t