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_ATMEGA8_EXTERNAL_INTERRUPT_H__
00029 #define __AVR_CPP_ATMEGA8_EXTERNAL_INTERRUPT_H__
00030
00031
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>,
00060 Event,
00061 Bits<_MCUCR, _ISC00 | _ISC01>,
00062 Bits<_GICR, _INT0>,
00063 Bits<_GIFR, _INTF0>,
00064 0 >
00065
00066 { __INTERRUPT_HANDLER_SUPPORT__ };
00067
00068 struct Interrupt1 : Internal::InterruptBase <
00069 InputPin3<PortD>,
00070 Event,
00071 Bits<_MCUCR, _ISC10 | _ISC11>,
00072 Bits<_GICR, _INT1>,
00073 Bits<_GIFR, _INTF1>,
00074 2 >
00075
00076 { __INTERRUPT_HANDLER_SUPPORT__ };
00077
00078 }
00079
00080 }
00081
00082 #endif // ifndef __AVR_CPP_ATMEGA8_EXTERNAL_INTERRUPT_H__