avr/cpp/atmega64/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_ATMEGA64_EXTERNAL_INTERRUPT_H__
00029 #define __AVR_CPP_ATMEGA64_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/atmega64/ExternalInterrupt.h>."
00038 #endif
00039 #endif
00040 
00041 #ifndef __AVR_CPP_XXX_EXTERNAL_INTERRUPT_H__
00042 #define __AVR_CPP_XXX_EXTERNAL_INTERRUPT_H__ "atmega64/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 
00056 #define INT0_struct     ExternalInterrupt::Interrupt0
00057 #define INT1_struct     ExternalInterrupt::Interrupt1
00058 #define INT2_struct     ExternalInterrupt::Interrupt2
00059 #define INT3_struct     ExternalInterrupt::Interrupt3
00060 #define INT4_struct     ExternalInterrupt::Interrupt4
00061 #define INT5_struct     ExternalInterrupt::Interrupt5
00062 #define INT6_struct     ExternalInterrupt::Interrupt6
00063 #define INT7_struct     ExternalInterrupt::Interrupt7
00064 
00065 
00066 namespace AVRCpp
00067 {
00068         namespace ExternalInterrupt
00069         {
00070                 struct Interrupt0 : Internal::InterruptBase <
00071                                 InputPin0<PortD>,                               /* InputPin */
00072                                 AsyncEvent,                                             /* EventEnum */
00073                                 Bits<_EICRA, _ISC00 | _ISC01>,  /* EventBits */
00074                                 Bits<_EIMSK, _INT0>,                    /* InterruptEnableBit */
00075                                 Bits<_EIFR, _INTF0>,                    /* InterruptFlagBit */
00076                                 0 >                                                             /* eventShift */
00077                                 
00078                 { __INTERRUPT_HANDLER_SUPPORT__ }; // Interrupt0
00079                 
00080                 struct Interrupt1 : Internal::InterruptBase <
00081                                 InputPin1<PortD>,                               /* InputPin */
00082                                 AsyncEvent,                                             /* EventEnum */
00083                                 Bits<_EICRA, _ISC10 | _ISC11>,  /* EventBits */
00084                                 Bits<_EIMSK, _INT1>,                    /* InterruptEnableBit */
00085                                 Bits<_EIFR, _INTF1>,                    /* InterruptFlagBit */
00086                                 2 >                                                             /* eventShift */
00087                                 
00088                 { __INTERRUPT_HANDLER_SUPPORT__ }; // Interrupt1
00089                 
00090                 struct Interrupt2 : Internal::InterruptBase <
00091                                 InputPin2<PortD>,                               /* InputPin */
00092                                 AsyncEvent,                                             /* EventEnum */
00093                                 Bits<_EICRA, _ISC20 | _ISC21>,  /* EventBits */
00094                                 Bits<_EIMSK, _INT2>,                    /* InterruptEnableBit */
00095                                 Bits<_EIFR, _INTF2>,                    /* InterruptFlagBit */
00096                                 4 >                                                             /* eventShift */
00097                                 
00098                 { __INTERRUPT_HANDLER_SUPPORT__ }; // Interrupt2
00099                 
00100                 struct Interrupt3 : Internal::InterruptBase <
00101                                 InputPin3<PortD>,                               /* InputPin */
00102                                 AsyncEvent,                                             /* EventEnum */
00103                                 Bits<_EICRA, _ISC30 | _ISC31>,  /* EventBits */
00104                                 Bits<_EIMSK, _INT3>,                    /* InterruptEnableBit */
00105                                 Bits<_EIFR, _INTF3>,                    /* InterruptFlagBit */
00106                                 6 >                                                             /* eventShift */
00107                                         
00108                 { __INTERRUPT_HANDLER_SUPPORT__ }; // Interrupt3
00109                 
00110                 struct Interrupt4 : Internal::InterruptBase <
00111                                 InputPin4<PortE>,                               /* InputPin */
00112                                 Event,                                                  /* EventEnum */
00113                                 Bits<_EICRB, _ISC40 | _ISC41>,  /* EventBits */
00114                                 Bits<_EIMSK, _INT4>,                    /* InterruptEnableBit */
00115                                 Bits<_EIFR, _INTF4>,                    /* InterruptFlagBit */
00116                                 0 >                                                             /* eventShift */
00117                                 
00118                 { __INTERRUPT_HANDLER_SUPPORT__ }; // Interrupt4
00119                 
00120                 struct Interrupt5 : Internal::InterruptBase <
00121                                 InputPin5<PortE>,                               /* InputPin */
00122                                 Event,                                                  /* EventEnum */
00123                                 Bits<_EICRB, _ISC50 | _ISC51>,  /* EventBits */
00124                                 Bits<_EIMSK, _INT5>,                    /* InterruptEnableBit */
00125                                 Bits<_EIFR, _INTF5>,                    /* InterruptFlagBit */
00126                                 2 >                                                             /* eventShift */
00127                                 
00128                 { __INTERRUPT_HANDLER_SUPPORT__ }; // Interrupt5
00129                 
00130                 struct Interrupt6 : Internal::InterruptBase <
00131                                 InputPin6<PortE>,                               /* InputPin */
00132                                 Event,                                                  /* EventEnum */
00133                                 Bits<_EICRB, _ISC60 | _ISC61>,  /* EventBits */
00134                                 Bits<_EIMSK, _INT6>,                    /* InterruptEnableBit */
00135                                 Bits<_EIFR, _INTF6>,                    /* InterruptFlagBit */
00136                                 4 >                                                             /* eventShift */
00137                                 
00138                 { __INTERRUPT_HANDLER_SUPPORT__ }; // Interrupt6
00139                 
00140                 struct Interrupt7 : Internal::InterruptBase <
00141                                 InputPin7<PortE>,                               /* InputPin */
00142                                 Event,                                                  /* EventEnum */
00143                                 Bits<_EICRB, _ISC70 | _ISC71>,  /* EventBits */
00144                                 Bits<_EIMSK, _INT7>,                    /* InterruptEnableBit */
00145                                 Bits<_EIFR, _INTF7>,                    /* InterruptFlagBit */
00146                                 6 >                                                             /* eventShift */
00147                                 
00148                 { __INTERRUPT_HANDLER_SUPPORT__ }; // Interrupt7
00149                 
00150         } // namespace ExternalInterrupts
00151         
00152 } // namespace AVRCpp
00153 
00154 #endif // ifndef __AVR_CPP_ATMEGA64_EXTERNAL_INTERRUPT_H__

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