31 #define PCIEN (_BV(PCIE3) | _BV(PCIE2) | _BV(PCIE1) | _BV(PCIE0)) 33 #define PCIEN (_BV(PCIE2) | _BV(PCIE1) | _BV(PCIE0)) 35 #define PCIEN (_BV(PCIE1) | _BV(PCIE0)) 37 #define PCIEN (_BV(PCIE0)) 68 #if defined(BOARD_ATTINYX61) 71 #elif defined(BOARD_ATTINYX5) 73 #elif defined(BOARD_ATTINYX4) 76 #elif defined(BOARD_ATMEGA328P) 80 #elif defined(BOARD_ATMEGA32U4) 82 #elif defined(BOARD_AT90USB1286) 84 #elif defined(BOARD_ATMEGA2560) 88 #elif defined(BOARD_ATMEGA1248P) 93 #elif defined(BOARD_ATMEGA256RFR2) 112 uint8_t old_state = s_state[vec];
113 uint8_t new_state = port;
114 uint8_t changed = (new_state ^ old_state) & mask;
118 if ((
pin->m_mask & changed)
120 ||
pin->m_mode == ((
pin->m_mask & new_state) == 0)))
124 s_state[vec] = new_state;
127 #define PCINT_ISR(vec,pin) \ 128 ISR(PCINT ## vec ## _vect) \ 130 PinChangeInterrupt::on_interrupt(vec, PCMSK ## vec, pin); \ 133 #if defined(BOARD_ATTINYX61) 137 if (GIFR & _BV(INTF0)) {
144 #elif defined(BOARD_ATTINYX5) 148 #elif defined(BOARD_ATTINYX4) 153 #elif defined(BOARD_ATMEGA328P) 159 #elif defined(BOARD_ATMEGA32U4) 163 #elif defined(BOARD_AT90USB1286) 167 #elif defined(BOARD_ATMEGA2560) 173 #elif defined(BOARD_ATMEGA1248P) 180 #elif defined(BOARD_ATMEGA256RFR2) #define PCINT_ISR(vec, pin)
#define bit_mask_clear(p, m)
friend void PCINT0_vect(void)
#define bit_mask_set(p, m)
virtual void on_interrupt(uint16_t arg=0)=0
volatile uint8_t * PCIMR() const