33 #define PCA95X4_DEFAULT_ADDRESS 0x40
35 #define PCA95X4_INPUT_REG (0x00)
36 #define PCA95X4_OUTPUT_REG (0x01)
37 #define PCA95X4_POL_REG (0x02)
38 #define PCA95X4_CONFIG_REG (0x03)
40 #define PCA95X4_P0 (1 << 0)
41 #define PCA95X4_P1 (1 << 1)
42 #define PCA95X4_P2 (1 << 2)
43 #define PCA95X4_P3 (1 << 3)
44 #define PCA95X4_P4 (1 << 4)
45 #define PCA95X4_P5 (1 << 5)
46 #define PCA95X4_P6 (1 << 6)
47 #define PCA95X4_P7 (1 << 7)
49 #define PCA95X4_CLEAR_ALL 0x00
bool pca95x4_set_output(struct pca95x4 *dev, uint8_t mask, bool blocking)
Set output value.
bool pca95x4_configure(struct pca95x4 *dev, uint8_t val, bool blocking)
Configure PCA95X4.
void pca95x4_init(struct pca95x4 *dev, struct i2c_periph *i2c_p, uint8_t addr)
Init PCA95X4.
struct i2c_transaction i2c_trans
struct i2c_periph * i2c_p
I2C transaction structure.
static const struct usb_device_descriptor dev
Architecture independent I2C (Inter-Integrated Circuit Bus) API.