Lines Matching full:pin
25 uint8_t pin: 6; member
34 /* Tracks pint interrupt source selected for each pin */
37 #define PIN_TO_INPUT_MUX_CONNECTION(pin) \ argument
38 ((PINTSEL_PMUX_ID << PMUX_SHIFT) + (pin))
40 /* Attaches pin to PINT IRQ slot using INPUTMUX */
41 static void attach_pin_to_pint(uint8_t pin, uint8_t pint_slot) in attach_pin_to_pint() argument
46 * and a integer describing the GPIO pin. in attach_pin_to_pint()
49 PIN_TO_INPUT_MUX_CONNECTION(pin)); in attach_pin_to_pint()
60 * @param pin: pin to use as interrupt source
61 * 0-64, corresponding to GPIO0 pin 1 - GPIO1 pin 31)
63 * @param wake: indicates if the pin should wakeup the system
66 int nxp_pint_pin_enable(uint8_t pin, enum nxp_pint_trigger trigger, bool wake) in nxp_pint_pin_enable() argument
70 if (pin > ARRAY_SIZE(pin_pint_id)) { in nxp_pint_pin_enable()
71 /* Invalid pin ID */ in nxp_pint_pin_enable()
75 if (pin_pint_id[pin] != NO_PINT_ID) { in nxp_pint_pin_enable()
76 slot = pin_pint_id[pin]; in nxp_pint_pin_enable()
87 pin_pint_id[pin] = slot; in nxp_pint_pin_enable()
90 pint_irq_cfg[slot].pin = pin; in nxp_pint_pin_enable()
91 /* Attach pin to interrupt slot using INPUTMUX */ in nxp_pint_pin_enable()
92 attach_pin_to_pint(pin, slot); in nxp_pint_pin_enable()
112 * @param pin: pin interrupt source to disable
114 void nxp_pint_pin_disable(uint8_t pin) in nxp_pint_pin_disable() argument
118 if (pin > ARRAY_SIZE(pin_pint_id)) { in nxp_pint_pin_disable()
122 slot = pin_pint_id[pin]; in nxp_pint_pin_disable()
126 /* Remove this pin from the PINT slot if one was in use */ in nxp_pint_pin_disable()
134 * @param pin: interrupt source to install callback for
139 int nxp_pint_pin_set_callback(uint8_t pin, nxp_pint_cb_t cb, void *data) in nxp_pint_pin_set_callback() argument
143 if (pin > ARRAY_SIZE(pin_pint_id)) { in nxp_pint_pin_set_callback()
147 slot = pin_pint_id[pin]; in nxp_pint_pin_set_callback()
160 * @param pin: interrupt source to remove callback for
162 void nxp_pint_pin_unset_callback(uint8_t pin) in nxp_pint_pin_unset_callback() argument
166 if (pin > ARRAY_SIZE(pin_pint_id)) { in nxp_pint_pin_unset_callback()
170 slot = pin_pint_id[pin]; in nxp_pint_pin_unset_callback()
183 pint_irq_cfg[*slot].callback(pint_irq_cfg[*slot].pin, in nxp_pint_isr()