|
MCP23008-RK
|
Internal structure used to hold information about configured interrupts. More...
#include <MCP23008-RK.h>
Data Fields | |
| uint16_t | pin |
| The MCP23008 pin (0-7) | |
| InterruptMode | mode |
| The interrupt mode, one of: More... | |
| std::function< void(bool)> | handler |
| The interrupt handler function or C++11 lambda function. More... | |
| bool | lastState |
| The last state of the GPIO, used to handle the RISING and FALLing cases. | |
Internal structure used to hold information about configured interrupts.
Use attachInterrupt() to add an interrupt handler, which internally creates one of these structures.
| std::function<void(bool)> MCP23008InterruptHandler::handler |
The interrupt handler function or C++11 lambda function.
It has this prototype:
The newState parameter is the state of the pin after the change that caused the interrupt. For a RISING interrupt, for example, newState will always be true.
| InterruptMode MCP23008InterruptHandler::mode |
The interrupt mode, one of:
RISINGFALLINGCHANGEThese are the same constants used with the Device OS attachInterrupt call.
Because the MCP23008 handles rising and falling in a peculiar way that's different than the STM32 and nRF52 MCUs, the hardware is always configured as change. The rising and falling cases are generated in software in this library.
1.8.17