mbed library sources. Supersedes mbed-src.

Dependents:   Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more

Revision:
153:fa9ff456f731
Parent:
149:156823d33999
Child:
161:2cc1468da177
--- a/drivers/I2C.h	Thu Dec 15 11:48:27 2016 +0000
+++ b/drivers/I2C.h	Tue Dec 20 17:27:56 2016 +0000
@@ -117,8 +117,8 @@
      *  @param repeated Repeated start, true - do not send stop at end
      *
      *  @returns
-     *       0 on success (ack),
-     *   non-0 on failure (nack)
+     *      0 or non-zero - written number of bytes,
+     *      negative - I2C_ERROR_XXX status
      */
     int write(int address, const char *data, int length, bool repeated = false);
 
@@ -127,8 +127,9 @@
      *  @param data data to write out on bus
      *
      *  @returns
-     *    '1' if an ACK was received,
-     *    '0' otherwise
+     *    '0' - NAK was received
+     *    '1' - ACK was received,
+     *    '2' - timeout
      */
     int write(int data);