@@ -44,16 +44,16 @@ namespace mbed {
44
44
* Read temperature from LM75BD
45
45
* #include "mbed.h"
46
46
* I2C i2c(I2C_SDA , I2C_SCL);
47
- * const int addr7bit = 0x48; // 7 bit I2C address
48
- * const int addr8bit = 0x48 << 1; // 8bit I2C address, 0x90
47
+ * const int addr7bit = 0x48; // 7- bit I2C address
48
+ * const int addr8bit = 0x48 << 1; // 8-bit I2C address, 0x90
49
49
*
50
50
* int main() {
51
51
* char cmd[2];
52
52
* while (1) {
53
53
* cmd[0] = 0x01;
54
54
* cmd[1] = 0x00;
55
55
*
56
- * // read and write takes the 8 bit version of the address.
56
+ * // read and write takes the 8- bit version of the address.
57
57
* // set up configuration register (at 0x01)
58
58
* i2c.write(addr8bit, cmd, 2);
59
59
*
@@ -112,7 +112,7 @@ class I2C : private NonCopyable<I2C> {
112
112
*
113
113
* @returns
114
114
* 0 on success (ack),
115
- * non-zero on failure (nack)
115
+ * nonzero on failure (nack)
116
116
*/
117
117
int read (int address, char *data, int length, bool repeated = false );
118
118
@@ -138,7 +138,7 @@ class I2C : private NonCopyable<I2C> {
138
138
*
139
139
* @returns
140
140
* 0 on success (ack),
141
- * non-zero on failure (nack)
141
+ * nonzero on failure (nack)
142
142
*/
143
143
int write (int address, const char *data, int length, bool repeated = false );
144
144
@@ -176,14 +176,14 @@ class I2C : private NonCopyable<I2C> {
176
176
177
177
#if DEVICE_I2C_ASYNCH
178
178
179
- /* * Start non-blocking I2C transfer.
179
+ /* * Start nonblocking I2C transfer.
180
180
*
181
181
* This function locks the deep sleep until any event has occurred
182
182
*
183
183
* @param address 8/10 bit I2C slave address
184
184
* @param tx_buffer The TX buffer with data to be transfered
185
185
* @param tx_length The length of TX buffer in bytes
186
- * @param rx_buffer The RX buffer which is used for received data
186
+ * @param rx_buffer The RX buffer, which is used for received data
187
187
* @param rx_length The length of RX buffer in bytes
188
188
* @param event The logical OR of events to modify
189
189
* @param callback The event callback function
@@ -194,7 +194,7 @@ class I2C : private NonCopyable<I2C> {
194
194
*/
195
195
int transfer (int address, const char *tx_buffer, int tx_length, char *rx_buffer, int rx_length, const event_callback_t &callback, int event = I2C_EVENT_TRANSFER_COMPLETE, bool repeated = false );
196
196
197
- /* * Abort the on-going I2C transfer
197
+ /* * Abort the ongoing I2C transfer
198
198
*/
199
199
void abort_transfer ();
200
200
0 commit comments