FreeRTOS/Demo/RISC-V_RV64_PolarFire_SoftConsole/polarfire_hal/platform/drivers/mss/mss_gpio/mss_gpio.h
/*-------------------------------------------------------------------------*/
/**
  The MSS_GPIO_get_irq() function is used to read the current value of the IRQ
  register. The GPIO interrupts are multiplexed. The GPIO interrupts which are
  not available on the direct GPIO interrupt line on the PLIC are ORed and
  routed to the non-direct interrupt line on the PLIC for the corresponding
  GPIO hardware block. When the non-direct interrupt is asserted, this function
  can be used to determine which exact GPIO bit(s) caused the interrupt.

  @param gpio
    The gpio parameter specifies the GPIO block that needs to be configured

  @return
     This function returns a 32-bit unsigned integer value of the IRQ register.

  Example:
    In the non-direct interrupt ISR, read the IRQ register to know which are
    the GPIO port causing the interrupt.

    @code
    uint8_t gpio2_non_direct_plic_IRQHandler(void)
    {
        uint32_t intr_num = 0;
        intr_num = MSS_GPIO_get_irq(GPIO2_LO);

        for(int cnt=0; cnt<32; cnt++)
        {
            if (1u == (intr_num & 0x00000001U))
            {
                MSS_GPIO_clear_irq(GPIO0_LO, (mss_gpio_id_t)cnt);
            }

            intr_num >>= 1u;
        }

        return EXT_IRQ_KEEP_ENABLED;
    }
    @endcode
 */
The MSS_GPIO_get_irq() function is used to read the current value of the IRQ
register. The GPIO interrupts are multiplexed. The GPIO interrupts which are
not available on the direct GPIO interrupt line on the PLIC are ORed and
routed to the non-direct interrupt line on the PLIC for the corresponding
GPIO hardware block. When the non-direct interrupt is asserted, this function
can be used to determine which exact GPIO bit(s) caused the interrupt.
The MSS_GPIO_get_irq () function is used to read the current value of the IRQ register . The GPIO interrupts are multiplexed . The GPIO interrupts which are not available on the direct GPIO interrupt line on the PLIC are ORed and routed to the non - direct interrupt line on the PLIC for the corresponding GPIO hardware block . When the non - direct interrupt is asserted this function can be used to determine which exact GPIO bit ( s ) caused the interrupt .
static inline uint32_t
MSS_GPIO_get_irq( GPIO_TypeDef const * gpio )
{
    return gpio->GPIO_IRQ;
}
static inline uint32_t MSS_GPIO_get_irq ( GPIO_TypeDef const * gpio ) { return gpio -> GPIO_IRQ ; }
The MSS_GPIO_get_irq() function is used to read the current value of the IRQ
register.
The MSS_GPIO_get_irq () function is used to read the current value of the IRQ register .