__interrupt void PORT2_ISR(void) { if (P2IFG & BIT0) buttonIsr(0); if (P2IFG & BIT1) buttonIsr(1); if (P2IFG & BIT2) buttonIsr(2); if (P2IFG & BIT3) buttonIsr(3); if (P2IFG & BIT4) buttonIsr(4); P2IFG = 0; // clear all P2 interrupts }
/** Port F interrupt service routine @note Must be configured in startup_ccs.c or else will not be called. */ void IntGPIOf(void) { uint32_t buttonState = GPIOPinRead(GPIO_PORTF_BASE, ALL_BUTTONS); if ((~buttonState) & LEFT_BUTTON) buttonIsr(1); else if ((~buttonState) & RIGHT_BUTTON) buttonIsr(2); #ifdef TIVA GPIOIntClear(GPIO_PORTF_BASE, ALL_BUTTONS); //Clear interrupts #else GPIOPinIntClear(GPIO_PORTF_BASE, ALL_BUTTONS); //Clear interrupts #endif }
/** Port E interrupt service routine @note Must be configured in startup_ccs.c or else will not be called. */ void IntGPIOe(void) { buttonIsr(0); // Button 0 was pressed #ifdef TIVA GPIOIntClear(GPIO_PORTE_BASE, GPIO_PIN_4); //Clear interrupts #else GPIOPinIntClear(GPIO_PORTE_BASE, GPIO_PIN_4); //Clear interrupts #endif }
/** Port F interrupt service routine @note Must be configured in startup_ccs.c or else will not be called. */ void IntGPIOf(void) { buttonIsr(1); // External button - Only Interrupt source for this port is PF1 GPIOPinIntClear(GPIO_PORTF_BASE, GPIO_PIN_1); //Clear interrupts toggleLed(2); }
/** Port E interrupt service routine @note Must be configured in startup_ccs.c or else will not be called. */ void IntGPIOe(void) { buttonIsr(0); // Internal button - Only Interrupt source for this port is PE3 GPIOPinIntClear(GPIO_PORTE_BASE, GPIO_PIN_3); //Clear interrupts toggleLed(2); }