diff --git a/api/mraa/i2c.h b/api/mraa/i2c.h index 69f1022..e4e685f 100644 --- a/api/mraa/i2c.h +++ b/api/mraa/i2c.h @@ -122,7 +122,7 @@ uint16_t mraa_i2c_read_word_data(mraa_i2c_context dev, const uint8_t command); * @param command The register * @param data pointer to the byte array to read data in to * @param length max number of bytes to read - * @return The length in bytes passed to the function or 0 + * @return The length in bytes passed to the function or -1 */ int mraa_i2c_read_bytes_data(mraa_i2c_context dev, uint8_t command, uint8_t* data, int length); diff --git a/api/mraa/i2c.hpp b/api/mraa/i2c.hpp index ad06138..d4e64ac 100644 --- a/api/mraa/i2c.hpp +++ b/api/mraa/i2c.hpp @@ -154,7 +154,7 @@ class I2c * @param reg Register to read from * @param data pointer to the byte array to read data in to * @param length max number of bytes to read - * @return length passed to the function or 0 + * @return length passed to the function or -1 */ int readBytesReg(uint8_t reg, uint8_t* data, int length)