![]() |
EVE 1.0
|
#include <io-expander-pcal9535a.h>
Data Fields | |
uint16_t | OutputValues |
Last values set for output to IO_EXPANDER_OUTPUT register. | |
uint16_t | InputValues |
Last read input values, copy of IO_EXPANDER_INPUT register. | |
uint16_t | InterruptStatus |
Pending interrupt status. | |
uint16_t | InterruptMask |
Internal interrupt bit mask (0 = disabled, 1 = enabled), inverted copy of IO_EXPANDER_INT_MASK register. | |
uint16_t | Direction |
Current direction state, copy of IO_EXPANDER_DIRECTION register. | |
This driver supports the I2C-based IO expander type NXP PCAL9535A. The IO expander has 2 8-bits IO ports, 1 open drain interrupt output and 3 address lines. Both IO ports are operated as one common 16-bits port with PORT1 as MSByte and PORT0 as LSByte. The I2C address range is 0x20 - 0x27. Max baudrate is 400 kbit/s. The port bits could be set to inputs or outputs individually. Each input can be configured to have pullup or pulldown resistors.
The selected I2C port must be initialized before using the driver. io_expander_state_t structure holds run-time data for the IO expander instance.
Definition at line 62 of file io-expander-pcal9535a.h.