1
1
//! Blocking I2C API
2
+ //!
3
+ //! Slave addresses used by this API are 7-bit I2C addresses ranging from 0 to 127.
4
+ //!
5
+ //! Operations on 10-bit slave addresses are not supported by the API yet (but applications might
6
+ //! be able to emulate some operations).
2
7
3
8
/// Blocking read
4
9
pub trait Read {
@@ -17,7 +22,7 @@ pub trait Read {
17
22
/// Where
18
23
///
19
24
/// - `ST` = start condition
20
- /// - `SAD+R` = slave address with 8th bit set to 1
25
+ /// - `SAD+R` = slave address followed by bit 1 to indicate reading
21
26
/// - `SAK` = slave acknowledge
22
27
/// - `Bi` = ith byte of data
23
28
/// - `MAK` = master acknowledge
@@ -43,7 +48,7 @@ pub trait Write {
43
48
/// Where
44
49
///
45
50
/// - `ST` = start condition
46
- /// - `SAD+W` = slave address with 8th bit set to 0
51
+ /// - `SAD+W` = slave address followed by bit 0 to indicate writing
47
52
/// - `SAK` = slave acknowledge
48
53
/// - `Bi` = ith byte of data
49
54
/// - `SP` = stop condition
@@ -68,11 +73,11 @@ pub trait WriteRead {
68
73
/// Where
69
74
///
70
75
/// - `ST` = start condition
71
- /// - `SAD+W` = slave address with 8th bit set to 0
76
+ /// - `SAD+W` = slave address followed by bit 0 to indicate writing
72
77
/// - `SAK` = slave acknowledge
73
78
/// - `Oi` = ith outgoing byte of data
74
79
/// - `SR` = repeated start condition
75
- /// - `SAD+R` = slave address with 8th bit set to 1
80
+ /// - `SAD+R` = slave address followed by bit 1 to indicate reading
76
81
/// - `Ii` = ith incoming byte of data
77
82
/// - `MAK` = master acknowledge
78
83
/// - `NMAK` = master no acknowledge
0 commit comments