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_ATMEGA644P_EXTERNAL_INTERRUPT_H__
00029 #define __AVR_CPP_ATMEGA644P_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/atmega644p/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__ "atmega644p/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 PCINT0_ns ExternalInterrupt
00051 #define PCINT1_ns ExternalInterrupt
00052 #define PCINT2_ns ExternalInterrupt
00053 #define PCINT3_ns ExternalInterrupt
00054
00055 #define INT0_struct ExternalInterrupt::Interrupt0
00056 #define INT1_struct ExternalInterrupt::Interrupt1
00057 #define INT2_struct ExternalInterrupt::Interrupt2
00058 #define PCINT0_struct ExternalInterrupt::PinChangeInterrupt0
00059 #define PCINT1_struct ExternalInterrupt::PinChangeInterrupt1
00060 #define PCINT2_struct ExternalInterrupt::PinChangeInterrupt2
00061 #define PCINT3_struct ExternalInterrupt::PinChangeInterrupt3
00062
00063
00064 namespace AVRCpp
00065 {
00066 namespace ExternalInterrupt
00067 {
00068 struct Interrupt0 : Internal::InterruptBase <
00069 InputPin2<PortD>,
00070 Event,
00071 Bits<_EICRA, _ISC00 | _ISC01>,
00072 Bits<_EIMSK, _INT0>,
00073 Bits<_EIFR, _INTF0>,
00074 0 >
00075
00076 { __INTERRUPT_HANDLER_SUPPORT__ };
00077
00078 struct Interrupt1 : Internal::InterruptBase <
00079 InputPin3<PortD>,
00080 Event,
00081 Bits<_EICRA, _ISC10 | _ISC11>,
00082 Bits<_EIMSK, _INT1>,
00083 Bits<_EIFR, _INTF1>,
00084 2 >
00085
00086 { __INTERRUPT_HANDLER_SUPPORT__ };
00087
00088 struct Interrupt2 : Internal::InterruptBase <
00089 InputPin2<PortB>,
00090 Event,
00091 Bits<_EICRA, _ISC20 | _ISC21>,
00092 Bits<_EIMSK, _INT2>,
00093 Bits<_EIFR, _INTF2>,
00094 4 >
00095
00096 { __INTERRUPT_HANDLER_SUPPORT__ };
00097
00098 struct PinChangeInterrupt0 : Internal::PinChangeInterruptBase <
00099 _PCMSK0,
00100 Bits<_PCICR, _PCIE0>,
00101 Bits<_PCIFR, _PCIF0> >
00102
00103 { __INTERRUPT_HANDLER_SUPPORT__ };
00104
00105 struct PinChangeInterrupt1 : Internal::PinChangeInterruptBase <
00106 _PCMSK1,
00107 Bits<_PCICR, _PCIE1>,
00108 Bits<_PCIFR, _PCIF1> >
00109
00110 { __INTERRUPT_HANDLER_SUPPORT__ };
00111
00112 struct PinChangeInterrupt2 : Internal::PinChangeInterruptBase <
00113 _PCMSK2,
00114 Bits<_PCICR, _PCIE2>,
00115 Bits<_PCIFR, _PCIF2> >
00116
00117 { __INTERRUPT_HANDLER_SUPPORT__ };
00118
00119 struct PinChangeInterrupt3 : Internal::PinChangeInterruptBase <
00120 _PCMSK3,
00121 Bits<_PCICR, _PCIE3>,
00122 Bits<_PCIFR, _PCIF3> >
00123
00124 { __INTERRUPT_HANDLER_SUPPORT__ };
00125
00126 }
00127
00128 }
00129
00130 #endif // ifndef __AVR_CPP_ATMEGA644P_EXTERNAL_INTERRUPT_H__