mirror of
https://github.com/sergeyyarkov/avr128da48_web-serial-example.git
synced 2026-10-11 02:08:55 +03:00
16 lines
330 B
C
16 lines
330 B
C
#ifndef USART_H
|
|
#define USART_H
|
|
#define BAUD_RATE (9600)
|
|
#define USART1_BAUD_RATE(BAUD_RATE) ((float)(64 * 4000000 / (16 * (float)BAUD_RATE)) + 0.5)
|
|
|
|
#include <avr/io.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
|
|
void USART1_Initialize(void);
|
|
void USART1_SendChar(char c);
|
|
void USART1_SendString(char *str);
|
|
|
|
#endif /* USART_H */
|
|
|