Zephyr API 3.6.99
Loading...
Searching...
No Matches
gpio_callback Struct Reference

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.
 

Detailed Description

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

Field Documentation

◆ handler

gpio_callback_handler_t gpio_callback::handler

Actual callback function being called when relevant.

◆ node

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)

◆ pin_mask

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.


The documentation for this struct was generated from the following file: