mirror of
https://github.com/sergeyyarkov/atmega8a_rgb-night-light.git
synced 2026-10-11 02:19:12 +03:00
24 lines
512 B
C
24 lines
512 B
C
#if !defined(_USART_H_)
|
|
#define _USART_H_
|
|
|
|
#include "defs.h"
|
|
|
|
#define BAUD 9600
|
|
#define RX_BUFFER_SIZE 32
|
|
#define EOT 0x04
|
|
|
|
#include <stdlib.h>
|
|
#include <stdbool.h>
|
|
#include <avr/io.h>
|
|
#include <avr/interrupt.h>
|
|
#include <util/setbaud.h>
|
|
|
|
void USART_Init();
|
|
void USART_SendChar(char c);
|
|
void USART_SendStr(char *str);
|
|
void USART_SendInt16(int16_t num);
|
|
void USART_SetReceiveHandler(void (*handler)(volatile char *rx_buffer));
|
|
void USART_OnReceivePacketHandler(void);
|
|
|
|
|
|
#endif // _USART_H_
|