From c7453b24523b83abccf79c27f868ca27c409037f Mon Sep 17 00:00:00 2001 From: Wolfgang Betz Date: Thu, 23 Feb 2017 09:18:34 +0100 Subject: [PATCH] Correct return values for `I2C::write(int, const char*, int, bool)` --- drivers/I2C.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/I2C.h b/drivers/I2C.h index 84f1d89880..69561dd039 100644 --- a/drivers/I2C.h +++ b/drivers/I2C.h @@ -117,8 +117,8 @@ public: * @param repeated Repeated start, true - do not send stop at end * * @returns - * 0 or non-zero - written number of bytes, - * negative - I2C_ERROR_XXX status + * 0 on success (ack), + * non-0 on failure (nack) */ int write(int address, const char *data, int length, bool repeated = false);