@@ -311,71 +311,71 @@ pub enum Operation<'a> {
311
311
312
312
/// Blocking I2C.
313
313
pub trait I2c < A : AddressMode = SevenBitAddress > : ErrorType {
314
- /// Reads enough bytes from slave with `address` to fill `read`.
314
+ /// Reads enough bytes from target with `address` to fill `read`.
315
315
///
316
316
/// # I2C Events (contract)
317
317
///
318
318
/// ``` text
319
- /// Master : ST SAD +R MAK MAK ... NMAK SP
320
- /// Slave : SAK B0 B1 ... BN
319
+ /// Controller : ST TAD +R CAK CAK ... NCAK SP
320
+ /// Target : TAK B0 B1 ... BN
321
321
/// ```
322
322
///
323
323
/// Where
324
324
///
325
325
/// - `ST` = start condition
326
- /// - `SAD +R` = slave address followed by bit 1 to indicate reading
327
- /// - `SAK ` = slave acknowledge
326
+ /// - `TAD +R` = target address followed by bit 1 to indicate reading
327
+ /// - `TAK ` = target acknowledge
328
328
/// - `Bi` = ith byte of data
329
- /// - `MAK ` = master acknowledge
330
- /// - `NMAK ` = master no acknowledge
329
+ /// - `CAK ` = controller acknowledge
330
+ /// - `NCAK ` = controller no acknowledge
331
331
/// - `SP` = stop condition
332
332
#[ inline]
333
333
fn read ( & mut self , address : A , read : & mut [ u8 ] ) -> Result < ( ) , Self :: Error > {
334
334
self . transaction ( address, & mut [ Operation :: Read ( read) ] )
335
335
}
336
336
337
- /// Writes bytes to slave with address `address`.
337
+ /// Writes bytes to target with address `address`.
338
338
///
339
339
/// # I2C Events (contract)
340
340
///
341
341
/// ``` text
342
- /// Master : ST SAD +W B0 B1 ... BN SP
343
- /// Slave : SAK SAK SAK ... SAK
342
+ /// Controller : ST TAD +W B0 B1 ... BN SP
343
+ /// Target : TAK TAK TAK ... TAK
344
344
/// ```
345
345
///
346
346
/// Where
347
347
///
348
348
/// - `ST` = start condition
349
- /// - `SAD +W` = slave address followed by bit 0 to indicate writing
350
- /// - `SAK ` = slave acknowledge
349
+ /// - `TAD +W` = target address followed by bit 0 to indicate writing
350
+ /// - `TAK ` = target acknowledge
351
351
/// - `Bi` = ith byte of data
352
352
/// - `SP` = stop condition
353
353
#[ inline]
354
354
fn write ( & mut self , address : A , write : & [ u8 ] ) -> Result < ( ) , Self :: Error > {
355
355
self . transaction ( address, & mut [ Operation :: Write ( write) ] )
356
356
}
357
357
358
- /// Writes bytes to slave with address `address` and then reads enough bytes to fill `read` *in a
358
+ /// Writes bytes to target with address `address` and then reads enough bytes to fill `read` *in a
359
359
/// single transaction*.
360
360
///
361
361
/// # I2C Events (contract)
362
362
///
363
363
/// ``` text
364
- /// Master : ST SAD +W O0 O1 ... OM SR SAD +R MAK MAK ... NMAK SP
365
- /// Slave : SAK SAK SAK ... SAK SAK I0 I1 ... IN
364
+ /// Controller : ST TAD +W O0 O1 ... OM SR TAD +R CAK CAK ... NCAK SP
365
+ /// Target : TAK TAK TAK ... TAK TAK I0 I1 ... IN
366
366
/// ```
367
367
///
368
368
/// Where
369
369
///
370
370
/// - `ST` = start condition
371
- /// - `SAD +W` = slave address followed by bit 0 to indicate writing
372
- /// - `SAK ` = slave acknowledge
371
+ /// - `TAD +W` = target address followed by bit 0 to indicate writing
372
+ /// - `TAK ` = target acknowledge
373
373
/// - `Oi` = ith outgoing byte of data
374
374
/// - `SR` = repeated start condition
375
- /// - `SAD +R` = slave address followed by bit 1 to indicate reading
375
+ /// - `TAD +R` = target address followed by bit 1 to indicate reading
376
376
/// - `Ii` = ith incoming byte of data
377
- /// - `MAK ` = master acknowledge
378
- /// - `NMAK ` = master no acknowledge
377
+ /// - `CAK ` = controller acknowledge
378
+ /// - `NCAK ` = controller no acknowledge
379
379
/// - `SP` = stop condition
380
380
#[ inline]
381
381
fn write_read ( & mut self , address : A , write : & [ u8 ] , read : & mut [ u8 ] ) -> Result < ( ) , Self :: Error > {
@@ -388,14 +388,14 @@ pub trait I2c<A: AddressMode = SevenBitAddress>: ErrorType {
388
388
/// Execute the provided operations on the I2C bus.
389
389
///
390
390
/// Transaction contract:
391
- /// - Before executing the first operation an ST is sent automatically. This is followed by SAD +R/W as appropriate.
391
+ /// - Before executing the first operation an ST is sent automatically. This is followed by TAD +R/W as appropriate.
392
392
/// - Data from adjacent operations of the same type are sent after each other without an SP or SR.
393
- /// - Between adjacent operations of a different type an SR and SAD +R/W is sent.
393
+ /// - Between adjacent operations of a different type an SR and TAD +R/W is sent.
394
394
/// - After executing the last operation an SP is sent automatically.
395
- /// - At the end of each read operation (before SP or SR), the master does not send an acknowledge for the last byte.
395
+ /// - At the end of each read operation (before SP or SR), the controller does not send an acknowledge for the last byte.
396
396
///
397
397
/// - `ST` = start condition
398
- /// - `SAD +R/W` = slave address followed by bit 1 to indicate reading or 0 to indicate writing
398
+ /// - `TAD +R/W` = target address followed by bit 1 to indicate reading or 0 to indicate writing
399
399
/// - `SR` = repeated start condition
400
400
/// - `SP` = stop condition
401
401
fn transaction (
0 commit comments