Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "peripherals/pca95xx.h"
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. More... | |
bool | pca95xx_configure (struct pca95xx *dev, uint8_t val, bool blocking) |
Configure PCA95XX. More... | |
bool | pca95xx_set_output (struct pca95xx *dev, uint8_t mask, bool blocking) |
Set output value. More... | |
bool | pca95xx_get_input (struct pca95xx *dev, uint8_t mask, uint8_t *result) |
Get input value. More... | |
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().
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, i2c_blocking_transceive(), I2CTransDone, I2CTransFailed, I2CTransSuccess, and PCA95XX_INPUT_REG.
Referenced by gpio_ext_pca95xx_get().
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, and I2CTransDone.
Referenced by gpio_ext_pca95xx_lazy_init(), and multi_ranger_init().
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().