From 412a8f99928beff605805807b0f07f6bf8d0a965 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Fri, 13 May 2022 12:45:53 +0200 Subject: code rename --- fw/fe310/eos/soc/i2c.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 fw/fe310/eos/soc/i2c.h (limited to 'fw/fe310/eos/soc/i2c.h') diff --git a/fw/fe310/eos/soc/i2c.h b/fw/fe310/eos/soc/i2c.h new file mode 100644 index 0000000..20d3dc7 --- /dev/null +++ b/fw/fe310/eos/soc/i2c.h @@ -0,0 +1,13 @@ +#include + +#define EOS_I2C_SPEED 100000 + +int eos_i2c_init(uint8_t wakeup_cause); +int eos_i2c_run(uint8_t wakeup_cause); +void eos_i2c_start(void); +void eos_i2c_stop(void); +void eos_i2c_speed(uint32_t baud_rate); +int eos_i2c_read8(uint8_t addr, uint8_t reg, uint8_t *buffer, uint16_t len); +int eos_i2c_read16(uint8_t addr, uint16_t reg, uint8_t *buffer, uint16_t len); +int eos_i2c_write8(uint8_t addr, uint8_t reg, uint8_t *buffer, uint16_t len); +int eos_i2c_write16(uint8_t addr, uint16_t reg, uint8_t *buffer, uint16_t len); -- cgit v1.2.3