GPIO_get_irq_sources

Function GPIO_get_irq_sources 

Source
pub unsafe extern "C" fn GPIO_get_irq_sources(
    this_gpio: *mut gpio_instance_t,
) -> u32
Expand description

The GPIO_get_irq_sources() function is used to identify the source of the interrupt. i.e. to That is the GPIO input line, whose state change triggered the interrupt. The GPIO_get_irq_sources() function must be called as part of a GPIO interrupt service routine (ISR) in order to determine the interrupt source.

@param this_gpio The this_gpio parameter is a pointer to the gpio_instance_t structure holding all the data regarding the CoreGPIO instance controlled through this function call.

@return This function returns a 32-bit unsigned integer, where each bit represents the pin number of a GPIO.

@example The example below demonstrates the use of the GPIO_get_irq_sources() function as part of the GPIO-9 interrupt service routine.

@code void GPIO9_IRQHandler( void ) { do_interrupt_processing();

GPIO_clear_all_irq_sources(g_p_mygpio, GPIO_get_irq_sources(g_p_mygpio));

NVIC_ClearPendingIRQ( GPIO9_IRQn ); } @endcode