GPIO_clear_all_irq_sources

Function GPIO_clear_all_irq_sources 

Source
pub unsafe extern "C" fn GPIO_clear_all_irq_sources(
    this_gpio: *mut gpio_instance_t,
    bitmask: u32,
)
Expand description

The GPIO_clear_all_irq_sources() function is used to clear all the active interrupts generated by the GPIO specified as a parameter. The GPIO_clear_all_irq_sources() function must be called as part of a GPIO interrupt service routine (ISR) in order to prevent the same interrupt event from re-triggering a call to the GPIO ISR. Note that interrupts may also need to be cleared in the processor’s interrupt controller.

@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.

@param bitmask This bitmask parameter is a 32-bit unsigned integer where each bit represents the GPIO pin used to clear the interrupt bit register of the corresponding GPIO bit. The least significant bit represents the status of GPIO 0, and the most significant bit represents the status of GPIO 31.

@return none.

@example The example below demonstrates the use of the GPIO_clear_all_irq_sources() function as part of the GPIO-9 interrupt service routine. @code void GPIO9_IRQHandler( void ) { do_interrupt_processing();

do_interrupt_processing();

GPIO_clear_all_irq_sources(g_p_mygpio, GPIO_get_irq_sources(g_p_mygpio));

NVIC_ClearPendingIRQ( GPIO9_IRQn ); } @endcode