I'm trying to figure out how to control interrupts. I've looked at the GPIO driver SDK example called 'gpio_input_interrupt' (as this is the closest to what I'm trying to do). I see that in the initialization they perform these functions:
/* Init input switch GPIO. */
PORT_SetPinInterruptConfig(BOARD_SW_PORT, BOARD_SW_GPIO_PIN, kPORT_InterruptFallingEdge);
GPIO_PinInit(BOARD_SW_GPIO, BOARD_SW_GPIO_PIN, &sw_config);
And that this function is what handles the interrupt:
- Is there a step by step tutorial on how to handle interrupts?
- How does the MCU know to go to BOARD_SW_IRQ_HANDLER() when the button is pressed?
- The EnableIRQ() function is not included in the API Reference manual that came with my SDK, does anyone know where I can get information on this?
- What if I wanted to have multiple interrupts for different GPIO pins but they are all on the same port - can they each have their own function?
Thank you very much!