uart
1.4
Serial stream for Xmega/Wrapper for UART-driver Xmega
|
Stream for the communcation mode of HvA-Xmegaboard. More...
#include <stdio.h>
Go to the source code of this file.
Macros | |
#define | BAUD 115200 |
baud rate | |
#define | CLK2X 0 |
no double clock speed | |
#define | clear_screen() printf("\e[H\e[2J\e[3J"); |
Macro to reset and clear the terminal. | |
Functions | |
void | init_stream (uint32_t fcpu) |
Initialize a standard in/out stream It uses USART0 of port F, the baud rate is BAUD, doubleclockspeed is CLK2X and the interruptlevel is low The global interrupt is not yet set. More... | |
Stream for the communcation mode of HvA-Xmegaboard.
Makes a standard stream for the HvA-Xmegaboard. It is build on the wrapper. With these you can use printf
and scanf
to write to and read from the UART F0. The baud rate is 115200 and the protocol is 8N1.
Version 1.3 : Modified uart_fputc changed. With a full TX-buffer it doesn't skips characters anymore. It now waits until there is free space in the buffer.
Version 1.4 : The baud rate is changed toe 115200
void init_stream | ( | uint32_t | fcpu | ) |
Initialize a standard in/out stream It uses USART0 of port F, the baud rate is BAUD, doubleclockspeed is CLK2X and the interruptlevel is low The global interrupt is not yet set.
fcpu | the clock frequency |