@@ -29,13 +29,13 @@ impl<const P: char, const N: u8, MODE> OutputPin for Pin<P, N, Output<MODE>> {
29
29
30
30
impl < const P : char , const N : u8 , MODE > StatefulOutputPin for Pin < P , N , Output < MODE > > {
31
31
#[ inline( always) ]
32
- fn is_set_high ( & self ) -> Result < bool , Self :: Error > {
33
- Ok ( self . is_set_high ( ) )
32
+ fn is_set_high ( & mut self ) -> Result < bool , Self :: Error > {
33
+ Ok ( Pin :: is_set_high ( self ) )
34
34
}
35
35
36
36
#[ inline( always) ]
37
- fn is_set_low ( & self ) -> Result < bool , Self :: Error > {
38
- Ok ( self . is_set_low ( ) )
37
+ fn is_set_low ( & mut self ) -> Result < bool , Self :: Error > {
38
+ Ok ( Pin :: is_set_low ( self ) )
39
39
}
40
40
}
41
41
@@ -52,13 +52,13 @@ where
52
52
MODE : marker:: Readable ,
53
53
{
54
54
#[ inline( always) ]
55
- fn is_high ( & self ) -> Result < bool , Self :: Error > {
56
- Ok ( self . is_high ( ) )
55
+ fn is_high ( & mut self ) -> Result < bool , Self :: Error > {
56
+ Ok ( Pin :: is_high ( self ) )
57
57
}
58
58
59
59
#[ inline( always) ]
60
- fn is_low ( & self ) -> Result < bool , Self :: Error > {
61
- Ok ( self . is_low ( ) )
60
+ fn is_low ( & mut self ) -> Result < bool , Self :: Error > {
61
+ Ok ( Pin :: is_low ( self ) )
62
62
}
63
63
}
64
64
@@ -83,13 +83,13 @@ impl<MODE> OutputPin for ErasedPin<Output<MODE>> {
83
83
84
84
impl < MODE > StatefulOutputPin for ErasedPin < Output < MODE > > {
85
85
#[ inline( always) ]
86
- fn is_set_high ( & self ) -> Result < bool , Self :: Error > {
87
- Ok ( self . is_set_high ( ) )
86
+ fn is_set_high ( & mut self ) -> Result < bool , Self :: Error > {
87
+ Ok ( ErasedPin :: is_set_high ( self ) )
88
88
}
89
89
90
90
#[ inline( always) ]
91
- fn is_set_low ( & self ) -> Result < bool , Self :: Error > {
92
- Ok ( self . is_set_low ( ) )
91
+ fn is_set_low ( & mut self ) -> Result < bool , Self :: Error > {
92
+ Ok ( ErasedPin :: is_set_low ( self ) )
93
93
}
94
94
}
95
95
@@ -106,13 +106,13 @@ where
106
106
MODE : marker:: Readable ,
107
107
{
108
108
#[ inline( always) ]
109
- fn is_high ( & self ) -> Result < bool , Self :: Error > {
110
- Ok ( self . is_high ( ) )
109
+ fn is_high ( & mut self ) -> Result < bool , Self :: Error > {
110
+ Ok ( ErasedPin :: is_high ( self ) )
111
111
}
112
112
113
113
#[ inline( always) ]
114
- fn is_low ( & self ) -> Result < bool , Self :: Error > {
115
- Ok ( self . is_low ( ) )
114
+ fn is_low ( & mut self ) -> Result < bool , Self :: Error > {
115
+ Ok ( ErasedPin :: is_low ( self ) )
116
116
}
117
117
}
118
118
@@ -137,13 +137,13 @@ impl<const P: char, MODE> OutputPin for PartiallyErasedPin<P, Output<MODE>> {
137
137
138
138
impl < const P : char , MODE > StatefulOutputPin for PartiallyErasedPin < P , Output < MODE > > {
139
139
#[ inline( always) ]
140
- fn is_set_high ( & self ) -> Result < bool , Self :: Error > {
141
- Ok ( self . is_set_high ( ) )
140
+ fn is_set_high ( & mut self ) -> Result < bool , Self :: Error > {
141
+ Ok ( PartiallyErasedPin :: is_set_high ( self ) )
142
142
}
143
143
144
144
#[ inline( always) ]
145
- fn is_set_low ( & self ) -> Result < bool , Self :: Error > {
146
- Ok ( self . is_set_low ( ) )
145
+ fn is_set_low ( & mut self ) -> Result < bool , Self :: Error > {
146
+ Ok ( PartiallyErasedPin :: is_set_low ( self ) )
147
147
}
148
148
}
149
149
@@ -160,13 +160,13 @@ where
160
160
MODE : marker:: Readable ,
161
161
{
162
162
#[ inline( always) ]
163
- fn is_high ( & self ) -> Result < bool , Self :: Error > {
164
- Ok ( self . is_high ( ) )
163
+ fn is_high ( & mut self ) -> Result < bool , Self :: Error > {
164
+ Ok ( PartiallyErasedPin :: is_high ( self ) )
165
165
}
166
166
167
167
#[ inline( always) ]
168
- fn is_low ( & self ) -> Result < bool , Self :: Error > {
169
- Ok ( self . is_low ( ) )
168
+ fn is_low ( & mut self ) -> Result < bool , Self :: Error > {
169
+ Ok ( PartiallyErasedPin :: is_low ( self ) )
170
170
}
171
171
}
172
172
@@ -185,10 +185,10 @@ impl<const P: char, const N: u8> OutputPin for DynamicPin<P, N> {
185
185
}
186
186
187
187
impl < const P : char , const N : u8 > InputPin for DynamicPin < P , N > {
188
- fn is_high ( & self ) -> Result < bool , Self :: Error > {
189
- self . is_high ( )
188
+ fn is_high ( & mut self ) -> Result < bool , Self :: Error > {
189
+ DynamicPin :: is_high ( self )
190
190
}
191
- fn is_low ( & self ) -> Result < bool , Self :: Error > {
192
- self . is_low ( )
191
+ fn is_low ( & mut self ) -> Result < bool , Self :: Error > {
192
+ DynamicPin :: is_low ( self )
193
193
}
194
194
}
0 commit comments