|
Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Driver for the 8-bit I/O expander based on i2c. More...
#include "peripherals/pca95xx.h"
Include dependency graph for pca95xx.c:Go to the source code of this file.
Functions | |
| void | pca95xx_init (struct pca95xx *dev, struct i2c_periph *i2c_p, uint8_t addr) |
| Init PCA95XX. | |
| bool | pca95xx_configure (struct pca95xx *dev, uint8_t val, bool blocking) |
| Configure PCA95XX. | |
| bool | pca95xx_set_output (struct pca95xx *dev, uint8_t mask, bool blocking) |
| Set output value. | |
| bool | pca95xx_get_input (struct pca95xx *dev, uint8_t mask, uint8_t *result) |
| Get input value. | |
Driver for the 8-bit I/O expander based on i2c.
Definition in file pca95xx.c.
Configure PCA95XX.
| [in] | dev | address to pca95xx device |
| [in] | val | value to write to confi register |
| [in] | blocking | true for blocking i2c transaction |
Definition at line 42 of file pca95xx.c.
References blocking, dev, i2c_blocking_transmit(), i2c_transmit(), I2CTransDone, I2CTransFailed, I2CTransSuccess, PCA95XX_CONFIG_REG, and val.
Referenced by gpio_ext_pca95xx_lazy_init(), gpio_ext_pca95xx_setup_input(), gpio_ext_pca95xx_setup_output(), multi_ranger_init(), and multi_ranger_periodic().
Here is the call graph for this function:
Here is the caller graph for this function:Get input value.
| [in] | dev | address to pca95xx device |
| [in] | mask | input pins |
| [out] | input | register with mask applied Note: always blocking |
Definition at line 78 of file pca95xx.c.
References dev, foo, i2c_blocking_transceive(), I2CTransDone, I2CTransFailed, I2CTransSuccess, and PCA95XX_INPUT_REG.
Referenced by gpio_ext_pca95xx_get().
Here is the call graph for this function:
Here is the caller graph for this function:| void pca95xx_init | ( | struct pca95xx * | dev, |
| struct i2c_periph * | i2c_p, | ||
| uint8_t | addr | ||
| ) |
Init PCA95XX.
| [in] | dev | address to pca95xx device |
| [in] | i2c_p | addres of i2c bus |
| [in] | addr | i2c address |
Definition at line 30 of file pca95xx.c.
References dev, I2CTransDone, and i2c_periph::status.
Referenced by gpio_ext_pca95xx_lazy_init(), and multi_ranger_init().
Here is the caller graph for this function:Set output value.
| [in] | dev | address to pca95xx device |
| [in] | mask | output pins to set |
| [in] | blocking | true for blocking i2c transaction |
Definition at line 60 of file pca95xx.c.
References blocking, dev, i2c_blocking_transmit(), i2c_transmit(), I2CTransDone, I2CTransFailed, I2CTransSuccess, and PCA95XX_OUTPUT_REG.
Referenced by gpio_ext_pca95xx_clear(), gpio_ext_pca95xx_set(), gpio_ext_pca95xx_toggle(), multi_ranger_init(), and multi_ranger_periodic().
Here is the call graph for this function:
Here is the caller graph for this function: