serialF0  1.3
Serial stream for HvA-Xmegaboard
serialF0.h
Go to the documentation of this file.
1 
22 #ifndef SERIALF0_H_
23 #define SERIALF0_H_
24 
25 #include <stdio.h>
26 
27 #define TXBUF_DEPTH_F0 100
28 #define RXBUF_DEPTH_F0 100
29 
30 #define UART_NO_DATA 0x0100
31 #define clear_screen() printf("\e[H\e[2J\e[3J");
32 
33 char *getline(char* buf, uint16_t len);
34 void init_stream(uint32_t f_cpu);
35 uint16_t uartF0_getc(void);
36 void uartF0_putc(uint8_t data);
37 void uartF0_puts(char *s);
38 
39 #endif // SERIALF0_H_
void init_stream(uint32_t f_cpu)
Initializes the serial stream for the HvA-Xmegaboard.
Definition: serialF0.c:237
void uartF0_putc(uint8_t data)
Send a byte to UARTF0.
Definition: serialF0.c:41
uint16_t uartF0_getc(void)
Read a byte from UARTF0.
Definition: serialF0.c:51
void uartF0_puts(char *s)
Send a string to UARTF0.
Definition: serialF0.c:70
char * getline(char *buf, uint16_t len)
Get a line from the serial input.
Definition: serialF0.c:137