//############################################################################################################################################################################################################# #ifndef _INC_USART_COM_H_ #define _INC_USART_COM_H_ //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- //#include "stm32f4xx.h" #include ////#include #include "System.h" //#include "CUST_GPIO.h" //#include "TIMERS.h" //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- #define F_CPU 16000000UL //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- #ifdef _CPU_ATMEGA328PB_ //Maybe move this #include "m328pb_defs.h" #endif // #ifdef _CPU_ATMEGA328PB_ #ifdef _CPU_ATMEGA2560_ #include "m2560_defs.h" #endif // _CPU_ATMEGA2560_ //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- typedef struct { //USART_TypeDef *USART; //DMA_Stream_TypeDef *DMATX; volatile uint16_t TxBufCount; //uint16_t TxPacketSize; 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_ //#############################################################################################################################################################################################################