|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
36 dev->i2c_trans.slave_addr = addr;
51 dev->i2c_trans.buf[1] =
val;
69 dev->i2c_trans.buf[1] = mask;
87 *result =
dev->i2c_trans.buf[0] & mask;
bool pca95xx_set_output(struct pca95xx *dev, uint8_t mask, bool blocking)
Set output value.
bool pca95xx_configure(struct pca95xx *dev, uint8_t val, bool blocking)
Configure PCA95XX.
@ I2CTransFailed
transaction failed
#define PCA95XX_OUTPUT_REG
bool i2c_blocking_transceive(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len_w, uint16_t len_r)
Submit a write/read transaction and wait for it to complete.
@ I2CTransSuccess
transaction successfully finished by I2C driver
bool i2c_transmit(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len)
Submit a write only transaction.
static const struct usb_device_descriptor dev
void pca95xx_init(struct pca95xx *dev, struct i2c_periph *i2c_p, uint8_t addr)
Init PCA95XX.
static const bool blocking[]
#define PCA95XX_INPUT_REG
@ I2CTransDone
transaction set to done by user level
#define PCA95XX_CONFIG_REG
bool pca95xx_get_input(struct pca95xx *dev, uint8_t mask, uint8_t *result)
Get input value.
bool i2c_blocking_transmit(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len)
Submit a write only transaction and wait for it to complete.