summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/dev/drv/fxl6408.h
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2025-02-13 18:38:59 +0100
committerUros Majstorovic <majstor@majstor.org>2025-02-13 18:38:59 +0100
commit2d238f621b57a10dd262be124e0771ba1826347a (patch)
tree7f5e04e560e63af8b1b046f5f532aae24d060258 /fw/fe310/eos/dev/drv/fxl6408.h
parentb74fe91ca04484567b10bb7f3136d39d5e2363d8 (diff)
moved other drivers to drv/
Diffstat (limited to 'fw/fe310/eos/dev/drv/fxl6408.h')
-rw-r--r--fw/fe310/eos/dev/drv/fxl6408.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/fw/fe310/eos/dev/drv/fxl6408.h b/fw/fe310/eos/dev/drv/fxl6408.h
new file mode 100644
index 0000000..c8e1507
--- /dev/null
+++ b/fw/fe310/eos/dev/drv/fxl6408.h
@@ -0,0 +1,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); \ No newline at end of file