Lines Matching +full:pin +full:- +full:mask

4  * SPDX-License-Identifier: Apache-2.0
14 #include <zephyr/dt-bindings/gpio/ti-cc13xx-cc26xx-gpio.h>
29 /* bits 16-18 in iocfg registers correspond to interrupt settings */
32 /* the rest are for general (non-interrupt) config */
48 uint32_t mask);
50 uint32_t mask);
53 gpio_pin_t pin, in gpio_cc13xx_cc26xx_config() argument
58 __ASSERT_NO_MSG(pin < NUM_IO_MAX); in gpio_cc13xx_cc26xx_config()
68 IOCPortConfigureSet(pin, IOC_PORT_GPIO, IOC_NO_IOPULL); in gpio_cc13xx_cc26xx_config()
69 GPIO_setOutputEnableDio(pin, GPIO_OUTPUT_DISABLE); in gpio_cc13xx_cc26xx_config()
72 return -ENOTSUP; in gpio_cc13xx_cc26xx_config()
92 return -ENOTSUP; in gpio_cc13xx_cc26xx_config()
106 return -EINVAL; in gpio_cc13xx_cc26xx_config()
109 config |= IOCPortConfigureGet(pin) & IOCFG_INT_MASK; in gpio_cc13xx_cc26xx_config()
110 IOCPortConfigureSet(pin, IOC_PORT_GPIO, config); in gpio_cc13xx_cc26xx_config()
114 gpio_cc13xx_cc26xx_port_set_bits_raw(port, BIT(pin)); in gpio_cc13xx_cc26xx_config()
116 gpio_cc13xx_cc26xx_port_clear_bits_raw(port, BIT(pin)); in gpio_cc13xx_cc26xx_config()
118 GPIO_setOutputEnableDio(pin, GPIO_OUTPUT_ENABLE); in gpio_cc13xx_cc26xx_config()
120 GPIO_setOutputEnableDio(pin, GPIO_OUTPUT_DISABLE); in gpio_cc13xx_cc26xx_config()
137 uint32_t mask, in gpio_cc13xx_cc26xx_port_set_masked_raw() argument
140 GPIO_setMultiDio(mask & value); in gpio_cc13xx_cc26xx_port_set_masked_raw()
141 GPIO_clearMultiDio(mask & ~value); in gpio_cc13xx_cc26xx_port_set_masked_raw()
147 uint32_t mask) in gpio_cc13xx_cc26xx_port_set_bits_raw() argument
149 GPIO_setMultiDio(mask); in gpio_cc13xx_cc26xx_port_set_bits_raw()
155 uint32_t mask) in gpio_cc13xx_cc26xx_port_clear_bits_raw() argument
157 GPIO_clearMultiDio(mask); in gpio_cc13xx_cc26xx_port_clear_bits_raw()
163 uint32_t mask) in gpio_cc13xx_cc26xx_port_toggle_bits() argument
165 GPIO_toggleMultiDio(mask); in gpio_cc13xx_cc26xx_port_toggle_bits()
171 gpio_pin_t pin, in gpio_cc13xx_cc26xx_pin_interrupt_configure() argument
187 return -ENOTSUP; in gpio_cc13xx_cc26xx_pin_interrupt_configure()
195 config |= IOCPortConfigureGet(pin) & IOCFG_GEN_MASK; in gpio_cc13xx_cc26xx_pin_interrupt_configure()
196 IOCPortConfigureSet(pin, IOC_PORT_GPIO, config); in gpio_cc13xx_cc26xx_pin_interrupt_configure()
205 struct gpio_cc13xx_cc26xx_data *data = port->data; in gpio_cc13xx_cc26xx_manage_callback()
207 return gpio_manage_callback(&data->callbacks, callback, set); in gpio_cc13xx_cc26xx_manage_callback()
217 struct gpio_cc13xx_cc26xx_data *data = dev->data; in gpio_cc13xx_cc26xx_isr()
223 gpio_fire_callbacks(&data->callbacks, dev, status); in gpio_cc13xx_cc26xx_isr()
271 uint32_t pin; in gpio_cc13xx_cc26xx_port_get_direction() local
274 const struct gpio_driver_config *cfg = port->config; in gpio_cc13xx_cc26xx_port_get_direction()
276 map &= cfg->port_pin_mask; in gpio_cc13xx_cc26xx_port_get_direction()
279 for (pin = find_lsb_set(map) - 1; map; in gpio_cc13xx_cc26xx_port_get_direction()
280 map &= ~BIT(pin), pin = find_lsb_set(map) - 1) { in gpio_cc13xx_cc26xx_port_get_direction()
281 ip |= !!(IOCPortConfigureGet(pin) & IOC_INPUT_ENABLE) * BIT(pin); in gpio_cc13xx_cc26xx_port_get_direction()
288 for (pin = find_lsb_set(map) - 1; map; in gpio_cc13xx_cc26xx_port_get_direction()
289 map &= ~BIT(pin), pin = find_lsb_set(map) - 1) { in gpio_cc13xx_cc26xx_port_get_direction()
290 op |= GPIO_getOutputEnableDio(pin) * BIT(pin); in gpio_cc13xx_cc26xx_port_get_direction()