avr/cpp/atmega8/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_ATMEGA8_EXTERNAL_INTERRUPT_H__
00029 #define __AVR_CPP_ATMEGA8_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/atmega8/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__ "atemga8/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 
00050 #define INT0_struct     INT0_ns::Interrupt0
00051 #define INT1_struct     INT1_ns::Interrupt1
00052 
00053 
00054 namespace AVRCpp
00055 {
00056         namespace ExternalInterrupt
00057         {
00058                 struct Interrupt0 : Internal::InterruptBase <
00059                                 InputPin2<PortD>,                               /* InputPin */
00060                                 Event,                                                  /* EventEnum */
00061                                 Bits<_MCUCR, _ISC00 | _ISC01>,  /* EventBits */
00062                                 Bits<_GICR, _INT0>,                             /* InterruptEnableBit */
00063                                 Bits<_GIFR, _INTF0>,                    /* InterruptFlagBit */
00064                                 0 >                                                             /* eventShift */
00065 
00066                 { __INTERRUPT_HANDLER_SUPPORT__ }; // struct Interrupt0
00067 
00068                 struct Interrupt1 : Internal::InterruptBase <
00069                                 InputPin3<PortD>,                               /* InputPin */
00070                                 Event,                                                  /* EventEnum */
00071                                 Bits<_MCUCR, _ISC10 | _ISC11>,  /* EventBits */
00072                                 Bits<_GICR, _INT1>,                             /* InterruptEnableBit */
00073                                 Bits<_GIFR, _INTF1>,                    /* InterruptFlagBit */
00074                                 2 >                                                             /* eventShift */
00075                 
00076                 { __INTERRUPT_HANDLER_SUPPORT__ }; // struct Interrupt1
00077 
00078         } // ExternalInterrupt
00079         
00080 } // namespace AVRCpp
00081 
00082 #endif // ifndef __AVR_CPP_ATMEGA8_EXTERNAL_INTERRUPT_H__

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