You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
2.3 KiB
37 lines
2.3 KiB
//#############################################################################################################################################################################################################
|
|
#ifndef _INC_USART_COM_H_
|
|
#define _INC_USART_COM_H_
|
|
//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
#include <inttypes.h>
|
|
#include "System.h"
|
|
//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
#define F_CPU 16000000UL
|
|
//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
#ifdef __ATmega328PB__ //Maybe move this
|
|
#include "m328pb_defs.h"
|
|
#endif // #ifdef _CPU_ATMEGA328PB_
|
|
#ifdef __ATmega1280__
|
|
#include "m2560_defs.h"
|
|
#endif // _CPU_ATMEGA2560_
|
|
|
|
#ifdef __ATmega2560__
|
|
#include "m2560_defs.h"
|
|
#endif // _CPU_ATMEGA2560_
|
|
//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
typedef struct {
|
|
volatile uint16_t TxBufCount;
|
|
uint16_t TxSendedCount;
|
|
volatile uint16_t RxBufCount;
|
|
|
|
uint16_t InterFrameTimeoutTicks;
|
|
|
|
volatile uint8_t TxComplete;
|
|
volatile uint8_t RxError;
|
|
volatile uint8_t RxComplete;
|
|
|
|
} USART_HANDLER_TYPE;
|
|
//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
#endif //_INC_USART_COM_H_
|
|
//#############################################################################################################################################################################################################
|