|
uint16_t | ReadPcal (const struct gpio_ext_t *GpioExt, uint8_t Address) |
|
void | WritePcal (const struct gpio_ext_t *GpioExt, uint8_t Address, uint16_t Data) |
|
static void | GpioExtInitPcal (const struct gpio_ext_t *GpioExt) |
| Initialize I2C-based IO expander type NXP PCAL9535A. More...
|
|
static void | GpioExtDisablePcal (const struct gpio_ext_t *GpioExt) |
| De-initialize I2C-based IO expander type NXP PCAL9535A. More...
|
|
static uint16_t | GpioExtInPortPcal (const struct gpio_ext_t *GpioExt) |
| Name: GpioExtInPortPcal
Read 16-bits data from GPIO port. More...
|
|
static void | GpioExtOutPortPcal (const struct gpio_ext_t *GpioExt, uint16_t Data) |
| Name: GpioExtOutPortPcal
Write 16-bits data to GPIO port. More...
|
|
static void | GpioExtSetDirectionPcal (const struct gpio_ext_t *GpioExt, uint16_t Direction) |
| Set pins direction to GPIO port. More...
|
|
static void | GpioExtSetPullSelectPcal (const struct gpio_ext_t *GpioExt, uint16_t PullSelect) |
| Select pullup or pulldown for GPIO port. More...
|
|
static void | GpioExtSetPullEnablePcal (const struct gpio_ext_t *GpioExt, uint16_t PullEnable) |
| Enable pullup/pulldown to GPIO port. More...
|
|
static void | GpioExtSetInterruptsPcal (const struct gpio_ext_t *GpioExt, uint16_t Mask) |
|
static void | GpioExtSetLatchPcal (const struct gpio_ext_t *GpioExt, uint16_t Mask) |
|
void | GpioExtSetDrivePcal (const struct gpio_ext_t *GpioExt, uint8_t Values[]) |
|
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.
static void GpioExtInitPcal |
( |
const struct gpio_ext_t * |
GpioExt | ) |
|
|
inlinestatic |
Initialize I2C-based IO expander type NXP PCAL9535A.
- Parameters
-
GpioExt | Parameters for the IO port expander to be used |
Definition at line 131 of file gpio-ext-pcal9535a.h.
static void GpioExtDisablePcal |
( |
const struct gpio_ext_t * |
GpioExt | ) |
|
|
inlinestatic |
De-initialize I2C-based IO expander type NXP PCAL9535A.
- Parameters
-
GpioExt | Parameters for the IO port expander to be used |
- Returns
- true if OK, else false
Definition at line 142 of file gpio-ext-pcal9535a.h.
static uint16_t GpioExtInPortPcal |
( |
const struct gpio_ext_t * |
GpioExt | ) |
|
|
inlinestatic |
Name: GpioExtInPortPcal
Read 16-bits data from GPIO port.
- Parameters
-
GpioExt | Parameters for the IO port expander to be used |
- Returns
- Data read
Definition at line 154 of file gpio-ext-pcal9535a.h.
static void GpioExtOutPortPcal |
( |
const struct gpio_ext_t * |
GpioExt, |
|
|
uint16_t |
Data |
|
) |
| |
|
inlinestatic |
Name: GpioExtOutPortPcal
Write 16-bits data to GPIO port.
- Parameters
-
GpioExt | Parameters for the IO port expander to be used |
Data | Data to be written to IO expander ports |
Definition at line 166 of file gpio-ext-pcal9535a.h.
static void GpioExtSetDirectionPcal |
( |
const struct gpio_ext_t * |
GpioExt, |
|
|
uint16_t |
Direction |
|
) |
| |
|
inlinestatic |
Set pins direction to GPIO port.
- Parameters
-
GpioExt | Parameters for the IO port expander to be used |
Direction | New direction to be settled |
Definition at line 177 of file gpio-ext-pcal9535a.h.
static void GpioExtSetPullSelectPcal |
( |
const struct gpio_ext_t * |
GpioExt, |
|
|
uint16_t |
PullSelect |
|
) |
| |
|
inlinestatic |
Select pullup or pulldown for GPIO port.
- Parameters
-
GpioExt | Parameters for the IO port expander to be used |
PullSelect | 0 - pulldown, 1 - pullup |
Definition at line 190 of file gpio-ext-pcal9535a.h.
static void GpioExtSetPullEnablePcal |
( |
const struct gpio_ext_t * |
GpioExt, |
|
|
uint16_t |
PullEnable |
|
) |
| |
|
inlinestatic |
Pointer to GpioPcalFunc structure uses to initialize the array of GPIO virtual functions .Func in struct ext_gpio_t GPIO descriptor.