00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef __AVR_CPP_ATMEGA8_USART_H__
00029 #define __AVR_CPP_ATMEGA8_USART_H__
00030
00031
00032
00033 #ifndef __AVR_CPP_USART_H__
00034 #ifdef __DOXYGEN__
00035 #include <avr/cpp/USART.h>
00036 #else
00037 #error "Include <avr/cpp/USART.h> instead of <avr/cpp/atmega8/USART.h>."
00038 #endif
00039 #endif // ifndef __AVR_CPP_USART_H__
00040
00041 #ifndef __AVR_CPP_XXX_USART_H__
00042 #define __AVR_CPP_XXX_USART_H__ "atmega8/USART.h"
00043 #else
00044 #error "Attempt to include more than one <avr/cpp/XXX/USART.h> file."
00045 #endif
00046
00047 #define USART_RXC_ns USART
00048 #define USART_TXC_ns USART
00049 #define USART_UDRE_ns USART
00050
00051 #define USART_RXC_struct USART::USART0::ReceiveCompleteInterrupt
00052 #define USART_TXC_struct USART::USART0::TransferCompleteInterrupt
00053 #define USART_UDRE_struct USART::USART0::DataRegisterEmptyInterrupt
00054
00055
00056 namespace AVRCpp
00057 {
00058 namespace USART
00059 {
00060
00061 namespace Internal
00062 {
00063 bool &Cancel0();
00064
00065 }
00066
00067 struct USART0 : Internal::USARTBase <
00068 _UBRRH,
00069 _UBRRL,
00070 _UCSRA,
00071 _UCSRB,
00072 _UCSRC,
00073 _UDR,
00074 Pin4<PortD>,
00075 Internal::HasRegisterSelect,
00076 Internal::Cancel0 >
00077 {
00078 struct ReceiveCompleteInterrupt : BasicInterrupt<Bits<_UCSRB, _RXCIE> > { __INTERRUPT_HANDLER_SUPPORT__ };
00079 struct TransferCompleteInterrupt : BasicInterrupt<Bits<_UCSRB, _TXCIE> > { __INTERRUPT_HANDLER_SUPPORT__ };
00080 struct DataRegisterEmptyInterrupt : BasicInterrupt<Bits<_UCSRB, _UDRIE> > { __INTERRUPT_HANDLER_SUPPORT__ };
00081
00082 };
00083
00084 }
00085
00086 }
00087
00088 #endif // ifndef __AVR_CPP_ATMEGA8_USART_H__