Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed by
Diff: I2C.h
- Revision:
- 55:d722ed6a4237
- Parent:
- 54:71b101360fb9
- Child:
- 59:0883845fe643
--- a/I2C.h Tue Jan 08 12:46:36 2013 +0000
+++ b/I2C.h Wed Jan 16 12:56:34 2013 +0000
@@ -81,14 +81,14 @@
* the address is forced to 1 to indicate a read.
*
* @param address 8-bit I2C slave address [ addr | 1 ]
- * @param data Pointer to the byte-array to read data in to
+ * @param data Pointer to the byte-array to read data in to
* @param length Number of bytes to read
* @param repeated Repeated start, true - don't send stop at end
*
* @returns
* 0 on success (ack),
* non-0 on failure (nack)
- */
+ */
int read(int address, char *data, int length, bool repeated = false);
/** Read a single byte from the I2C bus
@@ -106,14 +106,14 @@
* the address is forced to 0 to indicate a write.
*
* @param address 8-bit I2C slave address [ addr | 0 ]
- * @param data Pointer to the byte-array data to send
+ * @param data Pointer to the byte-array data to send
* @param length Number of bytes to send
* @param repeated Repeated start, true - do not send stop at end
*
* @returns
* 0 on success (ack),
* non-0 on failure (nack)
- */
+ */
int write(int address, const char *data, int length, bool repeated = false);
/** Write single byte out on the I2C bus
@@ -137,7 +137,7 @@
protected:
void aquire();
-
+
i2c_t _i2c;
static I2C *_owner;
int _hz;
