Zephyr Project API 4.0.0
A Scalable Open Source RTOS
|
GPIO callback structure. More...
#include <gpio.h>
Data Fields | |
sys_snode_t | node |
This is meant to be used in the driver and the user should not mess with it (see drivers/gpio/gpio_utils.h) | |
gpio_callback_handler_t | handler |
Actual callback function being called when relevant. | |
gpio_port_pins_t | pin_mask |
A mask of pins the callback is interested in, if 0 the callback will never be called. | |
GPIO callback structure.
Used to register a callback in the driver instance callback list. As many callbacks as needed can be added as long as each of them are unique pointers of struct gpio_callback. Beware such structure should not be allocated on stack.
Note: To help setting it, see gpio_init_callback() below
gpio_callback_handler_t gpio_callback::handler |
Actual callback function being called when relevant.
sys_snode_t gpio_callback::node |
This is meant to be used in the driver and the user should not mess with it (see drivers/gpio/gpio_utils.h)
gpio_port_pins_t gpio_callback::pin_mask |
A mask of pins the callback is interested in, if 0 the callback will never be called.
Such pin_mask can be modified whenever necessary by the owner, and thus will affect the handler being called or not. The selected pins must be configured to trigger an interrupt.