ATmega64M1 AVR UART, ADC and DAC  v2.0
UART, ADC and DAC libraries for the ATmega16M1, ATmega32M1 and ATmega64M1.
uart.h
Go to the documentation of this file.
1 
14 #ifndef UART_H_
15 #define UART_H_
16 
17 // ##### Includes #####
18 #include <avr/io.h>
19 #include <stdio.h>
20 
21 
22 // ##### Definitions #####
24 #define UART_LBT 8
25 
26 #define BAUD_CALC(baud) ((F_CPU / 4 / baud - 1) / 2)
27 
28 
29 // ##### Functions #####
30 void uart_init(uint8_t brr_value);
31 int uart_transmit(char byte_data, FILE *stream);
32 int uart_receive(FILE *stream);
33 int uart_getline(char line[], int max);
34 
35 
36 #endif /* UART_H_ */
void uart_init(uint8_t brr_value)
UART initialization function.
Definition: uart.c:30
int uart_getline(char line[], int max)
Function to read line.
Definition: uart.c:107
int uart_receive(FILE *stream)
Function to read characters.
Definition: uart.c:82
int uart_transmit(char byte_data, FILE *stream)
Function to transmit characters.
Definition: uart.c:61