PCA9554 module interface functions declarations.
More...
Go to the source code of this file.
|
uint8_t | pca9554_read_port (uint8_t chip_id, uint8_t *readout) |
| Read all pins status.
|
|
uint8_t | pca9554_read_pin (uint8_t chip_id, uint8_t pin, uint8_t *status) |
| Read a pin status.
|
|
uint8_t | pca9554_write_port (uint8_t chip_id, uint8_t data) |
| Write all output pins.
|
|
uint8_t | pca9554_write_pin (uint8_t chip_id, uint8_t pin, bool data) |
| Write a output pin.
|
|
uint8_t | pca9554_set_port_pol (uint8_t chip_id, uint8_t pol) |
| Set all pins polarity.
|
|
uint8_t | pca9554_set_pin_pol (uint8_t chip_id, uint8_t pin, bool pol) |
| Set pin polarity.
|
|
uint8_t | pca9554_get_port_pol (uint8_t chip_id, uint8_t *pol) |
| Read all pins polarity.
|
|
uint8_t | pca9554_get_pin_pol (uint8_t chip_id, uint8_t pin, uint8_t *pol) |
| Read pin polarity.
|
|
uint8_t | pca9554_set_port_dir (uint8_t chip_id, uint8_t dir) |
| Set all pins direction.
|
|
uint8_t | pca9554_set_pin_dir (uint8_t chip_id, uint8_t pin, bool dir) |
| Set pin direction.
|
|
uint8_t | pca9554_get_port_dir (uint8_t chip_id, uint8_t *dir) |
| Read all pins direction.
|
|
uint8_t | pca9554_get_pin_dir (uint8_t chip_id, uint8_t pin, uint8_t *dir) |
| Read pin direction.
|
|
PCA9554 module interface functions declarations.
- Author
- Henrique Silva henri.nosp@m.que..nosp@m.silva.nosp@m.@lnl.nosp@m.s.br
◆ pca9554_get_pin_dir()
uint8_t pca9554_get_pin_dir |
( |
uint8_t | chip_id, |
|
|
uint8_t | pin, |
|
|
uint8_t * | dir ) |
Read pin direction.
- Parameters
-
[in] | chip_id | Chip ID to communicate |
[in] | pin | Selected pin |
[out] | dir | Pin direction |
- Returns
- Number of bytes read from the device
◆ pca9554_get_pin_pol()
uint8_t pca9554_get_pin_pol |
( |
uint8_t | chip_id, |
|
|
uint8_t | pin, |
|
|
uint8_t * | pol ) |
Read pin polarity.
- Parameters
-
[in] | chip_id | Chip ID to communicate |
[in] | pin | Selected pin |
[out] | pol | Pin polarity value |
- Returns
- Number of bytes read from the device
◆ pca9554_get_port_dir()
uint8_t pca9554_get_port_dir |
( |
uint8_t | chip_id, |
|
|
uint8_t * | dir ) |
Read all pins direction.
- Parameters
-
[in] | chip_id | Chip ID to communicate |
[out] | dir | 8-bit value with the pins direction setup |
- Returns
- Number of bytes written to the device
◆ pca9554_get_port_pol()
uint8_t pca9554_get_port_pol |
( |
uint8_t | chip_id, |
|
|
uint8_t * | pol ) |
Read all pins polarity.
- Parameters
-
[in] | chip_id | Chip ID to communicate |
[out] | pol | Pins polarity (active-high/low) |
- Returns
- Number of bytes written to the device
◆ pca9554_read_pin()
uint8_t pca9554_read_pin |
( |
uint8_t | chip_id, |
|
|
uint8_t | pin, |
|
|
uint8_t * | status ) |
Read a pin status.
- Parameters
-
[in] | chip_id | Chip ID to communicate |
[in] | pin | Selected pin to read |
[out] | status | Pin logical status |
- Returns
- Number of bytes read from the device
◆ pca9554_read_port()
uint8_t pca9554_read_port |
( |
uint8_t | chip_id, |
|
|
uint8_t * | readout ) |
Read all pins status.
- Parameters
-
[in] | chip_id | Chip ID to communicate |
[out] | readout | 8-bit value with the pins status |
- Returns
- Number of bytes read from the device
◆ pca9554_set_pin_dir()
uint8_t pca9554_set_pin_dir |
( |
uint8_t | chip_id, |
|
|
uint8_t | pin, |
|
|
bool | dir ) |
Set pin direction.
- Parameters
-
[in] | chip_id | Chip ID to communicate |
[in] | pin | Selected pin |
[in] | dir | Pin direction ( 0-Output 1-Input ) |
- Returns
- Number of bytes written to the device
◆ pca9554_set_pin_pol()
uint8_t pca9554_set_pin_pol |
( |
uint8_t | chip_id, |
|
|
uint8_t | pin, |
|
|
bool | pol ) |
Set pin polarity.
- Parameters
-
[in] | chip_id | Chip ID to communicate |
[in] | pin | Selected pin |
[in] | pol | Pin Polarity (active-high/low) |
- Returns
- Number of bytes written to the device
◆ pca9554_set_port_dir()
uint8_t pca9554_set_port_dir |
( |
uint8_t | chip_id, |
|
|
uint8_t | dir ) |
Set all pins direction.
- Parameters
-
[in] | chip_id | Chip ID to communicate |
[in] | dir | Pin direction ( 0-Output 1-Input ) |
- Returns
- Number of bytes read from the device
◆ pca9554_set_port_pol()
uint8_t pca9554_set_port_pol |
( |
uint8_t | chip_id, |
|
|
uint8_t | pol ) |
Set all pins polarity.
- Parameters
-
[in] | chip_id | Chip ID to communicate |
[in] | pol | Polarity (active-high/low) |
- Returns
- Number of bytes written to the device
◆ pca9554_write_pin()
uint8_t pca9554_write_pin |
( |
uint8_t | chip_id, |
|
|
uint8_t | pin, |
|
|
bool | data ) |
Write a output pin.
- Parameters
-
[in] | chip_id | Chip ID to communicate |
[in] | pin | Selected pin to write |
[in] | data | Logical status to be set |
- Returns
- Number of bytes written to the device
◆ pca9554_write_port()
uint8_t pca9554_write_port |
( |
uint8_t | chip_id, |
|
|
uint8_t | data ) |
Write all output pins.
- Parameters
-
[in] | chip_id | Chip ID to communicate |
[in] | data | 8-bit value with the pins status |
- Returns
- Number of bytes written to the device