// External Interrupt(s) initialization
// INT0: Off
// INT1: Off
// INT2: Off
// INT3: Off
// INT4: On
// INT4 Mode: Any change
// INT5: Off
// INT6: Off
// INT7: Off
EICRA=0x00;
EICRB=0x01;
EIMSK=0x10;
EIFR=0x10;
// External Interrupt 4 service routine
#pragma savereg+
interrupt [EXT_INT4] void ext_int4_isr(void)
{
// Place your code here
uiExitBlinkTm=1500;
if(P_ENC_UP){
if(P_ENC_DN){
KeyPush(K_DEC);
}
else{ //EncDown
KeyPush(K_INC);
}
}
else{
if(P_ENC_DN){
KeyPush(K_INC);
}
else{ //EncDown
KeyPush(K_DEC);
}
}
}
#pragma savereg-