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_AT90USB1287_USART_H__
00029 #define __AVR_CPP_AT90USB1287_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/at90usb1287/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__ "at90usb1287/USART.h"
00043 #else
00044 #error "Attempt to include more than one <avr/cpp/XXX/USART.h> file."
00045 #endif
00046
00047 #define USART1_RXC_ns USART
00048 #define USART1_TXC_ns USART
00049 #define USART1_UDRE_ns USART
00050
00051 #define USART1_RXC_struct USART::USART1::ReceiveCompleteInterrupt
00052 #define USART1_TXC_struct USART::USART1::TransferCompleteInterrupt
00053 #define USART1_UDRE_struct USART::USART1::DataRegisterEmptyInterrupt
00054
00055
00056 namespace AVRCpp
00057 {
00058 namespace USART
00059 {
00060
00061 namespace Internal
00062 {
00063 bool &Cancel1();
00064
00065 }
00066
00067 struct USART1 : Internal::USARTBase <
00068 _UBRR1H,
00069 _UBRR1L,
00070 _UCSR1A,
00071 _UCSR1B,
00072 _UCSR1C,
00073 _UDR1,
00074 Pin5<PortD>,
00075 Internal::NoRegisterSelect,
00076 Internal::Cancel1 >
00077 {
00078 struct ReceiveCompleteInterrupt : BasicInterrupt<Bits<_UCSR1B, _RXCIE1> > { __INTERRUPT_HANDLER_SUPPORT__ };
00079 struct TransferCompleteInterrupt : BasicInterrupt<Bits<_UCSR1B, _TXCIE1> > { __INTERRUPT_HANDLER_SUPPORT__ };
00080 struct DataRegisterEmptyInterrupt : BasicInterrupt<Bits<_UCSR1B, _UDRIE1> > { __INTERRUPT_HANDLER_SUPPORT__ };
00081
00082 };
00083
00084 }
00085
00086 }
00087
00088 #endif // ifndef __AVR_CPP_AT90USB1287_USART_H__