// perform the counting functions for pin 14 void __ISR( _EXTERNAL_4_VECTOR , ipl2) INT4Interrupt( void) { if (ExtCurrentConfig[14] == EXT_PER_IN) { INT4Value = INT4Count; INT4Count = 0; } else INT4Count++; mINT4ClearIntFlag(); // Clear the interrupt flag return; }
void __ISR(_EXTERNAL_4_IRQ, ipl1) INT1_ISR(void){ if(INT_PIN){ mINT4SetEdgeMode(0); if (DIR_PIN) current++; else current--; }else{ mINT4SetEdgeMode(1); if (!DIR_PIN) current++; else current--; } Delay1us(3);//debounce mINT4ClearIntFlag(); }