avr/cpp/atmega8515/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_ATMEGA8515_EXTERNAL_INTERRUPT_H__
00029 #define __AVR_CPP_ATMEGA8515_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/atmega8515/ExternalInterrupt.h>."
00038 #endif
00039 #endif // ifndef __AVR_CPP_EXTERNAL_INTERRUPT_H__
00040 
00041 #ifndef __AVR_CPP_XXX_EXTERNAL_INTERRUPT_H__
00042 #define __AVR_CPP_XXX_EXTERNAL_INTERRUPT_H__ "atmega8515/ExternalInterrupt.h"
00043 #else
00044 #error "Attempt to include more than one <avr/cpp/XXXX/ExternalInterrupt.h> file."
00045 #endif
00046 
00047 #define INT0_ns ExternalInterrupt
00048 #define INT1_ns ExternalInterrupt
00049 #define INT2_ns ExternalInterrupt
00050 
00051 #define INT0_struct     INT0_ns::Interrupt0
00052 #define INT1_struct     INT1_ns::Interrupt1
00053 #define INT2_struct     INT1_ns::Interrupt2
00054 
00055 
00056 namespace AVRCpp
00057 {
00058         namespace ExternalInterrupt
00059         {
00060                 struct Interrupt0 : Internal::InterruptBase <
00061                                 InputPin2<PortD>,                               /* InputPin */
00062                                 Event,                                                  /* EventEnum */
00063                                 Bits<_MCUCR, _ISC00 | _ISC01>,  /* EventBits */
00064                                 Bits<_GICR, _INT0>,                             /* InterruptEnableBit */
00065                                 Bits<_GIFR, _INTF0>,                    /* InterruptFlagBit */
00066                                 0 >                                                             /* eventShift */
00067 
00068                 { __INTERRUPT_HANDLER_SUPPORT__ }; // struct Interrupt0
00069                 
00070                 struct Interrupt1 : Internal::InterruptBase <
00071                                 InputPin3<PortD>,                               /* InputPin */
00072                                 Event,                                                  /* EventEnum */
00073                                 Bits<_MCUCR, _ISC10 | _ISC11>,  /* EventBits */
00074                                 Bits<_GICR, _INT1>,                             /* InterruptEnableBit */
00075                                 Bits<_GIFR, _INTF1>,                    /* InterruptFlagBit */
00076                                 2 >                                                             /* eventShift */
00077                 
00078                 { __INTERRUPT_HANDLER_SUPPORT__ }; // struct Interrupt1
00079                 
00080                 struct Interrupt2 : Internal::InterruptBase <
00081                                 InputPin0<PortE>,                               /* InputPin */
00082                                 SimpleAsyncEvent,                               /* EventEnum */
00083                                 Bits<_EMCUCR, _ISC2>,                   /* EventBits */
00084                                 Bits<_GICR, _INT2>,                             /* InterruptEnableBit */
00085                                 Bits<_GIFR, _INTF2>,                    /* InterruptFlagBit */
00086                                 0 >                                                             /* eventShift */
00087                 
00088                 { __INTERRUPT_HANDLER_SUPPORT__ }; // struct Interrupt2
00089 
00090         } // ExternalInterrupt
00091         
00092 } // namespace AVRCpp
00093 
00094 #endif // ifndef __AVR_CPP_ATMEGA8515_EXTERNAL_INTERRUPT_H__

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