// // Created by dipak on 18.05.18. // #ifndef ATMEGA_SERIAL_H #define ATMEGA_SERIAL_H #ifndef F_CPU #define F_CPU 16000000 #endif #include #if defined(UBRR0H) #define HAS_USART0 #endif #if defined(UBRR1H) //#define HAS_USART1 #endif #if defined(UBRR2H) #define HAS_USART2 #endif #if defined(UBRR3H) #define HAS_USART3 #endif /****************************************************************/ /* Defining ISR vectors */ /****************************************************************/ extern "C" void USART0_RX_vect(void) __attribute__ ((signal)); extern "C" void USART0_UDRE_vect(void) __attribute__ ((signal)); //extern "C" void USART1_RX_vect(void) __attribute__ ((signal)); //extern "C" void USART1_UDRE_vect(void) __attribute__ ((signal)); extern "C" void USART2_RX_vect(void) __attribute__ ((signal)); extern "C" void USART2_UDRE_vect(void) __attribute__ ((signal)); extern "C" void USART3_RX_vect(void) __attribute__ ((signal)); extern "C" void USART3_UDRE_vect(void) __attribute__ ((signal)); #define TERMINATOR '\r' /****************************************************************/ /* Enumeration of communication modes supported by USART */ /****************************************************************/ enum class USARTOperatingMode { ASYNC_NORMAL = 0, /*!