avr/cpp/at90usb1287/ExternalInterrupt.h

Go to the documentation of this file.
00001 /**********************************************************************************************************************\
00002 
00003         C++ library for Atmel AVR microcontrollers
00004         Copyright (C) 2007 Lauri Kirikal, Mikk Leini, MT� TT� Robotiklubi
00005 
00006         This program is free software; you can redistribute it and/or
00007         modify it under the terms of the GNU General Public License
00008         as published by the Free Software Foundation; either version 2
00009         of the License, or (at your option) any later version.
00010 
00011         This program is distributed in the hope that it will be useful,
00012         but WITHOUT ANY WARRANTY; without even the implied warranty of
00013         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014         GNU General Public License for more details.
00015 
00016         You should have received a copy of the GNU General Public License
00017         along with this program; if not, write to the Free Software
00018         Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00019 
00020         See http://creativecommons.org/licenses/GPL/2.0/
00021 
00022         MT� TT� Robotiklubi  http://www.robotiklubi.ee robotiklubi@gmail.com
00023         Lauri Kirikal        laurikirikal@gmail.com
00024         Mikk Leini           mikk.leini@gmail.com
00025 
00026 \**********************************************************************************************************************/
00027 
00028 #ifndef __AVR_CPP_AT90USB1287_EXTERNAL_INTERRUPT_H__
00029 #define __AVR_CPP_AT90USB1287_EXTERNAL_INTERRUPT_H__
00030 
00031 /* This file should only be included from <avr/cpp/ExternalInterrupt.h>, never directly. */
00032 
00033 #ifndef __AVR_CPP_EXTERNAL_INTERRUPT_H__
00034 #ifdef __DOXYGEN__
00035 #include <avr/cpp/ExternalInterrupt.h>
00036 #else
00037 #error "Include <avr/cpp/ExternalInterrupt.h> instead of <avr/cpp/at90usb1287/ExternalInterrupt.h>."
00038 #endif
00039 #endif
00040 
00041 #ifndef __AVR_CPP_XXX_EXTERNAL_INTERRUPT_H__
00042 #define __AVR_CPP_XXX_EXTERNAL_INTERRUPT_H__ "at90usb1287/ExternalInterrupt.h"
00043 #else
00044 #error "Attempt to include more than one <avr/cpp/XXX/ExternalInterrupt.h> file."
00045 #endif
00046 
00047 #define INT0_ns ExternalInterrupt
00048 #define INT1_ns ExternalInterrupt
00049 #define INT2_ns ExternalInterrupt
00050 #define INT3_ns ExternalInterrupt
00051 #define INT4_ns ExternalInterrupt
00052 #define INT5_ns ExternalInterrupt
00053 #define INT6_ns ExternalInterrupt
00054 #define INT7_ns ExternalInterrupt
00055 #define PCINT0_ns ExternalInterrupt
00056 
00057 #define INT0_struct     ExternalInterrupt::Interrupt0
00058 #define INT1_struct     ExternalInterrupt::Interrupt1
00059 #define INT2_struct     ExternalInterrupt::Interrupt2
00060 #define INT3_struct     ExternalInterrupt::Interrupt3
00061 #define INT4_struct     ExternalInterrupt::Interrupt4
00062 #define INT5_struct     ExternalInterrupt::Interrupt5
00063 #define INT6_struct     ExternalInterrupt::Interrupt6
00064 #define INT7_struct     ExternalInterrupt::Interrupt7
00065 #define PCINT0_struct ExternalInterrupt::PinChangeInterrupt0
00066 
00067 
00068 namespace AVRCpp
00069 {
00070         namespace ExternalInterrupt
00071         {
00072                 struct Interrupt0 : Internal::InterruptBase <
00073                                 InputPin0<PortD>,                               /* InputPin */
00074                                 AsyncEvent,                                             /* EventEnum */
00075                                 Bits<_EICRA, _ISC00 | _ISC01>,  /* EventBits */
00076                                 Bits<_EIMSK, _INT0>,                    /* InterruptEnableBit */
00077                                 Bits<_EIFR, _INTF0>,                    /* InterruptFlagBit */
00078                                 0 >                                                             /* eventShift */
00079                                 
00080                 { __INTERRUPT_HANDLER_SUPPORT__ }; // Interrupt0
00081                 
00082                 struct Interrupt1 : Internal::InterruptBase <
00083                                 InputPin1<PortD>,                               /* InputPin */
00084                                 AsyncEvent,                                             /* EventEnum */
00085                                 Bits<_EICRA, _ISC10 | _ISC11>,  /* EventBits */
00086                                 Bits<_EIMSK, _INT1>,                    /* InterruptEnableBit */
00087                                 Bits<_EIFR, _INTF1>,                    /* InterruptFlagBit */
00088                                 2 >                                                             /* eventShift */
00089                                 
00090                 { __INTERRUPT_HANDLER_SUPPORT__ }; // Interrupt1
00091                 
00092                 struct Interrupt2 : Internal::InterruptBase <
00093                                 InputPin2<PortD>,                               /* InputPin */
00094                                 AsyncEvent,                                             /* EventEnum */
00095                                 Bits<_EICRA, _ISC20 | _ISC21>,  /* EventBits */
00096                                 Bits<_EIMSK, _INT2>,                    /* InterruptEnableBit */
00097                                 Bits<_EIFR, _INTF2>,                    /* InterruptFlagBit */
00098                                 4 >                                                             /* eventShift */
00099                                 
00100                 { __INTERRUPT_HANDLER_SUPPORT__ }; // Interrupt2
00101                 
00102                 struct Interrupt3 : Internal::InterruptBase <
00103                                 InputPin3<PortD>,                               /* InputPin */
00104                                 AsyncEvent,                                             /* EventEnum */
00105                                 Bits<_EICRA, _ISC30 | _ISC31>,  /* EventBits */
00106                                 Bits<_EIMSK, _INT3>,                    /* InterruptEnableBit */
00107                                 Bits<_EIFR, _INTF3>,                    /* InterruptFlagBit */
00108                                 6 >                                                             /* eventShift */
00109                                         
00110                 { __INTERRUPT_HANDLER_SUPPORT__ }; // Interrupt3
00111                 
00112                 struct Interrupt4 : Internal::InterruptBase <
00113                                 InputPin4<PortE>,                               /* InputPin */
00114                                 Event,                                                  /* EventEnum */
00115                                 Bits<_EICRB, _ISC40 | _ISC41>,  /* EventBits */
00116                                 Bits<_EIMSK, _INT4>,                    /* InterruptEnableBit */
00117                                 Bits<_EIFR, _INTF4>,                    /* InterruptFlagBit */
00118                                 0 >                                                             /* eventShift */
00119                                 
00120                 { __INTERRUPT_HANDLER_SUPPORT__ }; // Interrupt4
00121                 
00122                 struct Interrupt5 : Internal::InterruptBase <
00123                                 InputPin5<PortE>,                               /* InputPin */
00124                                 Event,                                                  /* EventEnum */
00125                                 Bits<_EICRB, _ISC50 | _ISC51>,  /* EventBits */
00126                                 Bits<_EIMSK, _INT5>,                    /* InterruptEnableBit */
00127                                 Bits<_EIFR, _INTF5>,                    /* InterruptFlagBit */
00128                                 2 >                                                             /* eventShift */
00129                                 
00130                 { __INTERRUPT_HANDLER_SUPPORT__ }; // Interrupt5
00131                 
00132                 struct Interrupt6 : Internal::InterruptBase <
00133                                 InputPin6<PortE>,                               /* InputPin */
00134                                 Event,                                                  /* EventEnum */
00135                                 Bits<_EICRB, _ISC60 | _ISC61>,  /* EventBits */
00136                                 Bits<_EIMSK, _INT6>,                    /* InterruptEnableBit */
00137                                 Bits<_EIFR, _INTF6>,                    /* InterruptFlagBit */
00138                                 4 >                                                             /* eventShift */
00139                                 
00140                 { __INTERRUPT_HANDLER_SUPPORT__ }; // Interrupt6
00141                 
00142                 struct Interrupt7 : Internal::InterruptBase <
00143                                 InputPin7<PortE>,                               /* InputPin */
00144                                 Event,                                                  /* EventEnum */
00145                                 Bits<_EICRB, _ISC70 | _ISC71>,  /* EventBits */
00146                                 Bits<_EIMSK, _INT7>,                    /* InterruptEnableBit */
00147                                 Bits<_EIFR, _INTF7>,                    /* InterruptFlagBit */
00148                                 6 >                                                             /* eventShift */
00149                                 
00150                 { __INTERRUPT_HANDLER_SUPPORT__ }; // Interrupt7
00151                 
00152                 struct PinChangeInterrupt0 : Internal::PinChangeInterruptBase < 
00153                         _PCMSK0,                                                        /* MaskRegister */
00154                         Bits<_PCICR, _PCIE0>,                           /* InterruptEnableBit */ 
00155                         Bits<_PCIFR, _PCIF0> >                          /* InterruptFlagBit */
00156 
00157                 { __INTERRUPT_HANDLER_SUPPORT__ }; // PinChangeInterrupt0
00158                 
00159         } // namespace ExternalInterrupts
00160         
00161 } // namespace AVRCpp
00162 
00163 #endif // ifndef __AVR_CPP_AT90USB1287_EXTERNAL_INTERRUPT_H__

Generated on Sat Sep 15 23:40:05 2007 for AVR C++ Lib for AT90USB1287 by  doxygen 1.5.2
SourceForge.net Logo MTÜ TTÜ Robotiklubi