i2c: fix return value doc for _read_bytes_data
authorBrendan Le Foll <brendan.le.foll@intel.com>
Tue, 9 Jun 2015 07:25:36 +0000 (08:25 +0100)
committerBrendan Le Foll <brendan.le.foll@intel.com>
Tue, 9 Jun 2015 07:25:41 +0000 (08:25 +0100)
Closes #218

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
api/mraa/i2c.h
api/mraa/i2c.hpp

index 69f1022..e4e685f 100644 (file)
@@ -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);
 
index ad06138..d4e64ac 100644 (file)
@@ -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)