Skip to content

Commit 19472ff

Browse files
author
Amanda Butler
authored
Copy edit I2C.h
Edit existing text.
1 parent 19c9108 commit 19472ff

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

drivers/I2C.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,16 @@ namespace mbed {
4444
* Read temperature from LM75BD
4545
* #include "mbed.h"
4646
* 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
4949
*
5050
* int main() {
5151
* char cmd[2];
5252
* while (1) {
5353
* cmd[0] = 0x01;
5454
* cmd[1] = 0x00;
5555
*
56-
* // read and write takes the 8 bit version of the address.
56+
* // read and write takes the 8-bit version of the address.
5757
* // set up configuration register (at 0x01)
5858
* i2c.write(addr8bit, cmd, 2);
5959
*
@@ -112,7 +112,7 @@ class I2C : private NonCopyable<I2C> {
112112
*
113113
* @returns
114114
* 0 on success (ack),
115-
* non-zero on failure (nack)
115+
* nonzero on failure (nack)
116116
*/
117117
int read(int address, char *data, int length, bool repeated = false);
118118

@@ -138,7 +138,7 @@ class I2C : private NonCopyable<I2C> {
138138
*
139139
* @returns
140140
* 0 on success (ack),
141-
* non-zero on failure (nack)
141+
* nonzero on failure (nack)
142142
*/
143143
int write(int address, const char *data, int length, bool repeated = false);
144144

@@ -176,14 +176,14 @@ class I2C : private NonCopyable<I2C> {
176176

177177
#if DEVICE_I2C_ASYNCH
178178

179-
/** Start non-blocking I2C transfer.
179+
/** Start nonblocking I2C transfer.
180180
*
181181
* This function locks the deep sleep until any event has occurred
182182
*
183183
* @param address 8/10 bit I2C slave address
184184
* @param tx_buffer The TX buffer with data to be transfered
185185
* @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
187187
* @param rx_length The length of RX buffer in bytes
188188
* @param event The logical OR of events to modify
189189
* @param callback The event callback function
@@ -194,7 +194,7 @@ class I2C : private NonCopyable<I2C> {
194194
*/
195195
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);
196196

197-
/** Abort the on-going I2C transfer
197+
/** Abort the ongoing I2C transfer
198198
*/
199199
void abort_transfer();
200200

0 commit comments

Comments
 (0)