diff options
Diffstat (limited to 'apps/drivers/device/i2c.h')
-rw-r--r-- | apps/drivers/device/i2c.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/apps/drivers/device/i2c.h b/apps/drivers/device/i2c.h index 66c34dd7c..874b22301 100644 --- a/apps/drivers/device/i2c.h +++ b/apps/drivers/device/i2c.h @@ -86,6 +86,26 @@ protected: virtual int probe(); /** + * Perform an I2C write to the device. + * + * @param send Pointer to bytes to send. + * @param send_len Number of bytes to send. + * @return OK if the transfer was successful, -errno + * otherwise. + */ + int write(const uint8_t *send, unsigned send_len); + + /** + * Perform an I2C read from the device. + * + * @param send Pointer to bytes to send. + * @param send_len Number of bytes to send. + * @return OK if the transfer was successful, -errno + * otherwise. + */ + int read(uint8_t *recv, unsigned recv_len); + + /** * Perform an I2C transaction to the device. * * At least one of send_len and recv_len must be non-zero. |