|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
33 #define PCA95XX_DEFAULT_ADDRESS 0x40
35 #define PCA95XX_INPUT_REG (0x00)
36 #define PCA95XX_OUTPUT_REG (0x01)
37 #define PCA95XX_POL_REG (0x02)
38 #define PCA95XX_CONFIG_REG (0x03)
40 #define PCA95XX_P0 (1 << 0)
41 #define PCA95XX_P1 (1 << 1)
42 #define PCA95XX_P2 (1 << 2)
43 #define PCA95XX_P3 (1 << 3)
44 #define PCA95XX_P4 (1 << 4)
45 #define PCA95XX_P5 (1 << 5)
46 #define PCA95XX_P6 (1 << 6)
47 #define PCA95XX_P7 (1 << 7)
49 #define PCA95XX_CLEAR_ALL 0x00
struct i2c_periph * i2c_p
bool pca95xx_set_output(struct pca95xx *dev, uint8_t mask, bool blocking)
Set output value.
static const struct usb_device_descriptor dev
static const bool blocking[]
I2C transaction structure.
bool pca95xx_configure(struct pca95xx *dev, uint8_t val, bool blocking)
Configure PCA95XX.
struct i2c_transaction i2c_trans
bool pca95xx_get_input(struct pca95xx *dev, uint8_t mask, uint8_t *result)
Get input value.
void pca95xx_init(struct pca95xx *dev, struct i2c_periph *i2c_p, uint8_t addr)
Init PCA95XX.