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_ATMEGA88_EXTERNAL_INTERRUPT_H__
00029 #define __AVR_CPP_ATMEGA88_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/atmega88/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__ "atmega88/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 PCINT0_ns ExternalInterrupt
00050 #define PCINT1_ns ExternalInterrupt
00051 #define PCINT2_ns ExternalInterrupt
00052
00053 #define INT0_struct ExternalInterrupt::Interrupt0
00054 #define INT1_struct ExternalInterrupt::Interrupt1
00055 #define PCINT0_struct ExternalInterrupt::PinChangeInterrupt0
00056 #define PCINT1_struct ExternalInterrupt::PinChangeInterrupt1
00057 #define PCINT2_struct ExternalInterrupt::PinChangeInterrupt2
00058
00059
00060 namespace AVRCpp
00061 {
00062 namespace ExternalInterrupt
00063 {
00064 struct Interrupt0 : Internal::InterruptBase <
00065 InputPin2<PortD>,
00066 Event,
00067 Bits<_EICRA, _ISC00 | _ISC01>,
00068 Bits<_EIMSK, _INT0>,
00069 Bits<_EIFR, _INTF0>,
00070 0 >
00071
00072 { __INTERRUPT_HANDLER_SUPPORT__ };
00073
00074 struct Interrupt1 : Internal::InterruptBase <
00075 InputPin3<PortD>,
00076 Event,
00077 Bits<_EICRA, _ISC10 | _ISC11>,
00078 Bits<_EIMSK, _INT1>,
00079 Bits<_EIFR, _INTF1>,
00080 2 >
00081
00082 { __INTERRUPT_HANDLER_SUPPORT__ };
00083
00084 struct PinChangeInterrupt0 : Internal::PinChangeInterruptBase <
00085 _PCMSK0,
00086 Bits<_PCICR, _PCIE0>,
00087 Bits<_PCIFR, _PCIF0> >
00088
00089 { __INTERRUPT_HANDLER_SUPPORT__ };
00090
00091 struct PinChangeInterrupt1 : Internal::PinChangeInterruptBase <
00092 _PCMSK1,
00093 Bits<_PCICR, _PCIE1>,
00094 Bits<_PCIFR, _PCIF1> >
00095
00096 { __INTERRUPT_HANDLER_SUPPORT__ };
00097
00098 struct PinChangeInterrupt2 : Internal::PinChangeInterruptBase <
00099 _PCMSK2,
00100 Bits<_PCICR, _PCIE2>,
00101 Bits<_PCIFR, _PCIF2> >
00102
00103 { __INTERRUPT_HANDLER_SUPPORT__ };
00104
00105 }
00106
00107 }
00108
00109 #endif // ifndef __AVR_CPP_ATMEGA88_EXTERNAL_INTERRUPT_H__