diff options
author | Uros Majstorovic <majstor@majstor.org> | 2021-02-24 03:17:51 +0100 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2021-02-24 03:17:51 +0100 |
commit | a1b7a1fb1f5a5ad5b6f34b576dd0a1a2cce2f210 (patch) | |
tree | 79dd3151ea7eade54a6a12187a2510b3580f3e16 /fw/fe310/eos/i2c.h | |
parent | 3a855f8235295e9091342ced6074d3bab0d79677 (diff) |
i2c driver initial import
Diffstat (limited to 'fw/fe310/eos/i2c.h')
-rw-r--r-- | fw/fe310/eos/i2c.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fw/fe310/eos/i2c.h b/fw/fe310/eos/i2c.h new file mode 100644 index 0000000..9692ea0 --- /dev/null +++ b/fw/fe310/eos/i2c.h @@ -0,0 +1,9 @@ +#include <stdint.h> + +void eos_i2c_start(uint32_t baud_rate); +void eos_i2c_stop(void); +void eos_i2c_set_baud_rate(uint32_t baud_rate); +int eos_i2c_read(uint8_t addr, uint8_t reg, uint8_t *buffer, uint16_t len); +int eos_i2c_write(uint8_t addr, uint8_t reg, uint8_t *buffer, uint16_t len); +int eos_i2c_read8(uint8_t addr, uint8_t reg, uint8_t *data); +int eos_i2c_write8(uint8_t addr, uint8_t reg, uint8_t data); |