summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/dev/drv/fxl6408.h
blob: c8e1507796df985caa94f23ca17e1df8cf0ce194 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <stdint.h>

#define FXL6408_REG_ID_CTRL     0x01
#define FXL6408_REG_IO_DIR      0x03
#define FXL6408_REG_O_STATE     0x05
#define FXL6408_REG_O_HIZ       0x07
#define FXL6408_REG_I_DEFAULT   0x09
#define FXL6408_REG_PULL_ENA    0x0B
#define FXL6408_REG_PULL_DIR    0x0D
#define FXL6408_REG_I_STATE     0x0F
#define FXL6408_REG_INT_MASK    0x11
#define FXL6408_REG_INT_STATE   0x13

int fxl6408_reg_read(uint8_t chip_id, uint8_t reg, uint8_t *data);
int fxl6408_reg_write(uint8_t chip_id, uint8_t reg, uint8_t data);
int fxl6408_get_pin(uint8_t chip_id, uint8_t reg, uint8_t pin, uint8_t *val);
int fxl6408_set_pin(uint8_t chip_id, uint8_t reg, uint8_t pin, uint8_t val);