|
libeasymcp2221 2.0.3
|
Persistent state used by the GPIO polling helpers. More...
#include <mcp2221_gpio_poll.h>
Public Attributes | |
| int | prev [4] |
| Previous GP0 through GP3 samples. More... | |
| int | initialized |
| Nonzero after the first successful poll has initialized prev. More... | |
| double | last_time |
| Wall-clock timestamp of the previous successful GPIO poll. More... | |
| uint16_t | filter_mask |
| Persistent edge-event filter mask. More... | |
Persistent state used by the GPIO polling helpers.
Initialize this structure with mcp2221_gpio_poll_init() before its first use. Applications should treat the members as polling state and avoid modifying them directly except through the public helper functions.
Definition at line 47 of file mcp2221_gpio_poll.h.
| uint16_t mcp2221_gpio_poll_state_t::filter_mask |
Persistent edge-event filter mask.
A value of 0 accepts all events. Otherwise the mask uses alternating rise/fall bits for GP0 through GP3 as produced by MCP2221_GPIO_POLL_MASK_RISE() and MCP2221_GPIO_POLL_MASK_FALL().
Definition at line 74 of file mcp2221_gpio_poll.h.
| int mcp2221_gpio_poll_state_t::initialized |
Nonzero after the first successful poll has initialized prev.
Definition at line 57 of file mcp2221_gpio_poll.h.
| double mcp2221_gpio_poll_state_t::last_time |
Wall-clock timestamp of the previous successful GPIO poll.
Both mcp2221_gpio_poll() and mcp2221_gpio_poll_events() update this timestamp so the same state object can be shared between the helpers.
Definition at line 65 of file mcp2221_gpio_poll.h.
| int mcp2221_gpio_poll_state_t::prev[4] |
Previous GP0 through GP3 samples.
Entries are maintained by the polling functions. A value of -1 represents a pin that was not configured as GPIO.
Definition at line 54 of file mcp2221_gpio_poll.h.