Lines Matching +full:pin +full:- +full:mask
4 * SPDX-License-Identifier: Apache-2.0
63 ((const struct mss_gpio_config * const)(dev)->config)
65 ((volatile struct mss_gpio_t *)(DEV_GPIO_CFG(dev))->gpio_base_addr)
67 ((struct mss_gpio_data *)(dev)->data)
71 gpio_pin_t pin, in mss_gpio_config() argument
79 return -ENOTSUP; in mss_gpio_config()
84 gpio->gpio_cfg[pin] |= MSS_GPIO_OUTPUT_MODE; in mss_gpio_config()
87 gpio->gpio_out |= BIT(pin); in mss_gpio_config()
90 gpio->gpio_out &= ~BIT(pin); in mss_gpio_config()
95 gpio->gpio_cfg[pin] |= MSS_GPIO_INPUT_MODE; in mss_gpio_config()
98 return -ENOTSUP; in mss_gpio_config()
105 gpio_port_pins_t mask) in mss_gpio_port_toggle_bits() argument
109 gpio->gpio_out ^= mask; in mss_gpio_port_toggle_bits()
119 *value = gpio->gpio_in; in mss_gpio_port_get_raw()
125 gpio_port_pins_t mask, in mss_gpio_port_set_masked_raw() argument
130 gpio->gpio_out = (gpio->gpio_out & ~mask) | (value & mask); in mss_gpio_port_set_masked_raw()
136 gpio_port_pins_t mask) in mss_gpio_port_set_bits_raw() argument
140 gpio->gpio_out |= mask; in mss_gpio_port_set_bits_raw()
146 gpio_port_pins_t mask) in mss_gpio_port_clear_bits_raw() argument
150 gpio->gpio_out &= ~mask; in mss_gpio_port_clear_bits_raw()
156 gpio_pin_t pin, in mss_gpio_pin_interrupt_configure() argument
163 gpio->gpio_cfg[pin] |= (MSS_GPIO_INT_ENABLE_MASK); in mss_gpio_pin_interrupt_configure()
167 gpio->gpio_cfg[pin] |= (MSS_GPIO_IRQ_EDGE_BOTH); in mss_gpio_pin_interrupt_configure()
170 gpio->gpio_cfg[pin] |= (MSS_GPIO_IRQ_EDGE_POSITIVE); in mss_gpio_pin_interrupt_configure()
173 gpio->gpio_cfg[pin] |= (MSS_GPIO_IRQ_EDGE_NEGATIVE); in mss_gpio_pin_interrupt_configure()
176 gpio->gpio_cfg[pin] |= (MSS_GPIO_IRQ_LEVEL_LOW); in mss_gpio_pin_interrupt_configure()
179 gpio->gpio_cfg[pin] |= (MSS_GPIO_IRQ_LEVEL_HIGH); in mss_gpio_pin_interrupt_configure()
182 gpio->gpio_cfg[pin] &= ~MSS_GPIO_INT_ENABLE_MASK; in mss_gpio_pin_interrupt_configure()
193 struct mss_gpio_data *data = dev->data; in mss_gpio_manage_callback()
195 return gpio_manage_callback(&data->cb, callback, set); in mss_gpio_manage_callback()
213 gpio->gpio_irq = 0xFFFFFFFFU; in mss_gpio_init()
217 cfg->gpio_cfg_func(); in mss_gpio_init()
224 uint32_t interrupt_status = gpio->gpio_irq; in mss_gpio_irq_handler()
226 gpio->gpio_irq = gpio->gpio_irq; in mss_gpio_irq_handler()
227 struct mss_gpio_data *data = dev->data; in mss_gpio_irq_handler()
229 gpio_fire_callbacks(&data->cb, dev, interrupt_status); in mss_gpio_irq_handler()