예제 #1
0
static void mcux_igpio_port_isr(void *arg)
{
	struct device *dev = (struct device *)arg;
	const struct mcux_igpio_config *config = dev->config->config_info;
	struct mcux_igpio_data *data = dev->driver_data;
	u32_t enabled_int, int_flags;

	int_flags = GPIO_PortGetInterruptFlags(config->base);
	enabled_int = int_flags & data->pin_callback_enables;

	_gpio_fire_callbacks(&data->callbacks, dev, enabled_int);

	GPIO_ClearPinsInterruptFlags(config->base, enabled_int);
}
예제 #2
0
static void imx_gpio_port_isr(void *arg)
{
	struct device *dev = (struct device *)arg;
	const struct imx_gpio_config *config = dev->config->config_info;
	struct imx_gpio_data *data = dev->driver_data;
	u32_t enabled_int;
	u32_t int_flags;

	int_flags = GPIO_ISR_REG(config->base);
	enabled_int = int_flags & data->pin_callback_enables;

	_gpio_fire_callbacks(&data->callbacks, dev, enabled_int);

	GPIO_ISR_REG(config->base) = enabled_int;
}