@@ -23,16 +23,16 @@ pub type ACK_VALUE_W<'a, REG> = crate::BitWriter<'a, REG>;
23
23
#[ derive( Clone , Copy , Debug , PartialEq , Eq ) ]
24
24
#[ repr( u8 ) ]
25
25
pub enum OPCODE {
26
- #[ doc = "0: RSTART opcode" ]
27
- Rstart = 0 ,
28
26
#[ doc = "1: WRITE opcode" ]
29
27
Write = 1 ,
30
- #[ doc = "2: READ opcode" ]
31
- Read = 2 ,
32
- #[ doc = "3: STOP opcode" ]
33
- Stop = 3 ,
28
+ #[ doc = "2: STOP opcode" ]
29
+ Stop = 2 ,
30
+ #[ doc = "3: READ opcode" ]
31
+ Read = 3 ,
34
32
#[ doc = "4: END opcode" ]
35
33
End = 4 ,
34
+ #[ doc = "6: RSTART opcode" ]
35
+ Rstart = 6 ,
36
36
}
37
37
impl From < OPCODE > for u8 {
38
38
#[ inline( always) ]
@@ -51,39 +51,39 @@ impl OPCODE_R {
51
51
#[ inline( always) ]
52
52
pub const fn variant ( & self ) -> Option < OPCODE > {
53
53
match self . bits {
54
- 0 => Some ( OPCODE :: Rstart ) ,
55
54
1 => Some ( OPCODE :: Write ) ,
56
- 2 => Some ( OPCODE :: Read ) ,
57
- 3 => Some ( OPCODE :: Stop ) ,
55
+ 2 => Some ( OPCODE :: Stop ) ,
56
+ 3 => Some ( OPCODE :: Read ) ,
58
57
4 => Some ( OPCODE :: End ) ,
58
+ 6 => Some ( OPCODE :: Rstart ) ,
59
59
_ => None ,
60
60
}
61
61
}
62
- #[ doc = "RSTART opcode" ]
63
- #[ inline( always) ]
64
- pub fn is_rstart ( & self ) -> bool {
65
- * self == OPCODE :: Rstart
66
- }
67
62
#[ doc = "WRITE opcode" ]
68
63
#[ inline( always) ]
69
64
pub fn is_write ( & self ) -> bool {
70
65
* self == OPCODE :: Write
71
66
}
72
- #[ doc = "READ opcode" ]
73
- #[ inline( always) ]
74
- pub fn is_read ( & self ) -> bool {
75
- * self == OPCODE :: Read
76
- }
77
67
#[ doc = "STOP opcode" ]
78
68
#[ inline( always) ]
79
69
pub fn is_stop ( & self ) -> bool {
80
70
* self == OPCODE :: Stop
81
71
}
72
+ #[ doc = "READ opcode" ]
73
+ #[ inline( always) ]
74
+ pub fn is_read ( & self ) -> bool {
75
+ * self == OPCODE :: Read
76
+ }
82
77
#[ doc = "END opcode" ]
83
78
#[ inline( always) ]
84
79
pub fn is_end ( & self ) -> bool {
85
80
* self == OPCODE :: End
86
81
}
82
+ #[ doc = "RSTART opcode" ]
83
+ #[ inline( always) ]
84
+ pub fn is_rstart ( & self ) -> bool {
85
+ * self == OPCODE :: Rstart
86
+ }
87
87
}
88
88
#[ doc = "Field `OPCODE` writer - Opcode part of command %s." ]
89
89
pub type OPCODE_W < ' a , REG > = crate :: FieldWriter < ' a , REG , 3 , OPCODE > ;
@@ -92,31 +92,31 @@ where
92
92
REG : crate :: Writable + crate :: RegisterSpec ,
93
93
REG :: Ux : From < u8 > ,
94
94
{
95
- #[ doc = "RSTART opcode" ]
96
- #[ inline( always) ]
97
- pub fn rstart ( self ) -> & ' a mut crate :: W < REG > {
98
- self . variant ( OPCODE :: Rstart )
99
- }
100
95
#[ doc = "WRITE opcode" ]
101
96
#[ inline( always) ]
102
97
pub fn write ( self ) -> & ' a mut crate :: W < REG > {
103
98
self . variant ( OPCODE :: Write )
104
99
}
105
- #[ doc = "READ opcode" ]
106
- #[ inline( always) ]
107
- pub fn read ( self ) -> & ' a mut crate :: W < REG > {
108
- self . variant ( OPCODE :: Read )
109
- }
110
100
#[ doc = "STOP opcode" ]
111
101
#[ inline( always) ]
112
102
pub fn stop ( self ) -> & ' a mut crate :: W < REG > {
113
103
self . variant ( OPCODE :: Stop )
114
104
}
105
+ #[ doc = "READ opcode" ]
106
+ #[ inline( always) ]
107
+ pub fn read ( self ) -> & ' a mut crate :: W < REG > {
108
+ self . variant ( OPCODE :: Read )
109
+ }
115
110
#[ doc = "END opcode" ]
116
111
#[ inline( always) ]
117
112
pub fn end ( self ) -> & ' a mut crate :: W < REG > {
118
113
self . variant ( OPCODE :: End )
119
114
}
115
+ #[ doc = "RSTART opcode" ]
116
+ #[ inline( always) ]
117
+ pub fn rstart ( self ) -> & ' a mut crate :: W < REG > {
118
+ self . variant ( OPCODE :: Rstart )
119
+ }
120
120
}
121
121
#[ doc = "Field `COMMAND_DONE` reader - When command 0 is done in I2C Master mode, this bit changes to high level." ]
122
122
pub type COMMAND_DONE_R = crate :: BitReader ;
0 commit comments