Lines Matching +full:pages +full:- +full:count
4 * SPDX-License-Identifier: Apache-2.0
41 #define GET_GECKO_GPIO_INDEX(id) (DT_INST_REG_ADDR(id) - DT_REG_ADDR(DT_NODELABEL(gpioa))) \
48 * See https://www.silabs.com/documents/public/reference-manuals/EFM32WG-RM.pdf
49 * pages 972 and 982.
65 #define GECKO_GPIO_MODEH(pin, mode) (mode << ((pin - 8) * 4))
77 size_t count; member
99 data->ports[data->count++] = dev; in gpio_gecko_add_port()
106 const struct gpio_gecko_config *config = dev->config; in gpio_gecko_configure()
107 GPIO_Port_TypeDef gpio_index = config->gpio_index; in gpio_gecko_configure()
132 out = 1U; /* pull-up*/ in gpio_gecko_configure()
135 /* out = 0 means pull-down*/ in gpio_gecko_configure()
147 * 0 - pin is input, 1 - pin is output in gpio_gecko_configure()
160 const struct gpio_gecko_config *config = dev->config; in gpio_gecko_get_config()
161 GPIO_Port_TypeDef gpio_index = config->gpio_index; in gpio_gecko_get_config()
228 const struct gpio_gecko_config *config = dev->config; in gpio_gecko_port_get_raw()
229 GPIO_Port_TypeDef gpio_index = config->gpio_index; in gpio_gecko_port_get_raw()
240 const struct gpio_gecko_config *config = dev->config; in gpio_gecko_port_set_masked_raw()
241 GPIO_Port_TypeDef gpio_index = config->gpio_index; in gpio_gecko_port_set_masked_raw()
251 const struct gpio_gecko_config *config = dev->config; in gpio_gecko_port_set_bits_raw()
252 GPIO_Port_TypeDef gpio_index = config->gpio_index; in gpio_gecko_port_set_bits_raw()
262 const struct gpio_gecko_config *config = dev->config; in gpio_gecko_port_clear_bits_raw()
263 GPIO_Port_TypeDef gpio_index = config->gpio_index; in gpio_gecko_port_clear_bits_raw()
273 const struct gpio_gecko_config *config = dev->config; in gpio_gecko_port_toggle_bits()
274 GPIO_Port_TypeDef gpio_index = config->gpio_index; in gpio_gecko_port_toggle_bits()
286 const struct gpio_gecko_config *config = dev->config; in gpio_gecko_pin_interrupt_configure()
287 struct gpio_gecko_data *data = dev->data; in gpio_gecko_pin_interrupt_configure()
291 return -ENOTSUP; in gpio_gecko_pin_interrupt_configure()
298 if ((GPIO->IEN & BIT(pin)) != 0) { in gpio_gecko_pin_interrupt_configure()
302 return -EBUSY; in gpio_gecko_pin_interrupt_configure()
316 GPIO_ExtIntConfig(config->gpio_index, pin, pin, in gpio_gecko_pin_interrupt_configure()
320 WRITE_BIT(data->int_enabled_mask, pin, mode != GPIO_INT_DISABLE); in gpio_gecko_pin_interrupt_configure()
328 struct gpio_gecko_data *data = dev->data; in gpio_gecko_manage_callback()
330 return gpio_manage_callback(&data->callbacks, callback, set); in gpio_gecko_manage_callback()
338 struct gpio_gecko_common_data *data = dev->data; in gpio_gecko_common_isr()
343 int_status = GPIO->IF; in gpio_gecko_common_isr()
345 for (unsigned int i = 0; int_status && (i < data->count); i++) { in gpio_gecko_common_isr()
346 port_dev = data->ports[i]; in gpio_gecko_common_isr()
347 port_data = port_dev->data; in gpio_gecko_common_isr()
348 enabled_int = int_status & port_data->int_enabled_mask; in gpio_gecko_common_isr()
352 GPIO->IF_CLR = enabled_int; in gpio_gecko_common_isr()
354 GPIO->IFC = enabled_int; in gpio_gecko_common_isr()
356 gpio_fire_callbacks(&port_data->callbacks, port_dev, in gpio_gecko_common_isr()
399 gpio_gecko_common_data.count = 0; in gpio_gecko_common_init()
421 .port_pin_mask = (gpio_port_pins_t)(-1), \