summaryrefslogtreecommitdiff
path: root/src/include/device/i2c_bus.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/device/i2c_bus.h')
-rw-r--r--src/include/device/i2c_bus.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/include/device/i2c_bus.h b/src/include/device/i2c_bus.h
index 1a7e777278..4c9b98d14f 100644
--- a/src/include/device/i2c_bus.h
+++ b/src/include/device/i2c_bus.h
@@ -90,5 +90,19 @@ int i2c_dev_writeb_at(struct device *, uint8_t off, uint8_t val);
* value on error.
*/
int i2c_dev_read_at16(struct device *, uint8_t *buf, size_t len, uint16_t off);
+/*
+ * Sends the 8-bit register offset `off` and reads `len` bytes into `buf`.
+ *
+ * Returns the number of bytes read on success, negative `enum cb_err`
+ * value on error.
+ */
+int i2c_dev_read_at(struct device *, uint8_t *buf, size_t len, uint8_t off);
+/*
+ * Sends the 8-bit register offset `off` and writes `len` bytes from `buf`.
+ *
+ * Returns the number of bytes written on success, negative `enum cb_err`
+ * value on error.
+ */
+int i2c_dev_write_at(struct device *, uint8_t *buf, size_t len, uint8_t off);
#endif /* _DEVICE_I2C_BUS_H_ */