diff options
author | Uros Majstorovic <majstor@majstor.org> | 2024-09-12 15:53:12 +0200 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2024-09-12 15:53:12 +0200 |
commit | 9f08d9e1892f78efdf84ac067ee2ebd0bd077d69 (patch) | |
tree | 5f1fff605404755e52fbc5f9dec1b4d40b8cecab /fw/fe310/eos/dev/egpio.c | |
parent | 200c401da28af7dcc6f7a3413837ab9a01410a2c (diff) |
ext gpio driver initial commit
Diffstat (limited to 'fw/fe310/eos/dev/egpio.c')
-rw-r--r-- | fw/fe310/eos/dev/egpio.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/fw/fe310/eos/dev/egpio.c b/fw/fe310/eos/dev/egpio.c new file mode 100644 index 0000000..e5a39bf --- /dev/null +++ b/fw/fe310/eos/dev/egpio.c @@ -0,0 +1,21 @@ +#include <stdlib.h> +#include <stdint.h> + +#include "eos.h" +#include "soc/i2c.h" + +#include "fxl6408.h" +#include "egpio.h" + +int eos_egpio_pin_get(uint8_t reg, uint8_t pin, uint8_t *val) { + uint8_t chip_id; + + chip_id = (pin & EGPIO_PIN_MASK_CHIP_ID) >> 4; + pin &= EGPIO_PIN_MASK; +} +int eos_egpio_pin_set(uint8_t reg, uint8_t pin, uint8_t val) { + uint8_t chip_id; + + chip_id = (pin & EGPIO_PIN_MASK_CHIP_ID) >> 4; + pin &= EGPIO_PIN_MASK; +}
\ No newline at end of file |