@@ -29,13 +29,13 @@ impl<const P: char, const N: u8, MODE> OutputPin for Pin<P, N, Output<MODE>> {
2929
3030impl < const P : char , const N : u8 , MODE > StatefulOutputPin for Pin < P , N , Output < MODE > > {
3131 #[ 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 ) )
3434 }
3535
3636 #[ 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 ) )
3939 }
4040}
4141
@@ -52,13 +52,13 @@ where
5252 MODE : marker:: Readable ,
5353{
5454 #[ 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 ) )
5757 }
5858
5959 #[ 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 ) )
6262 }
6363}
6464
@@ -83,13 +83,13 @@ impl<MODE> OutputPin for ErasedPin<Output<MODE>> {
8383
8484impl < MODE > StatefulOutputPin for ErasedPin < Output < MODE > > {
8585 #[ 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 ) )
8888 }
8989
9090 #[ 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 ) )
9393 }
9494}
9595
@@ -106,13 +106,13 @@ where
106106 MODE : marker:: Readable ,
107107{
108108 #[ 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 ) )
111111 }
112112
113113 #[ 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 ) )
116116 }
117117}
118118
@@ -137,13 +137,13 @@ impl<const P: char, MODE> OutputPin for PartiallyErasedPin<P, Output<MODE>> {
137137
138138impl < const P : char , MODE > StatefulOutputPin for PartiallyErasedPin < P , Output < MODE > > {
139139 #[ 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 ) )
142142 }
143143
144144 #[ 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 ) )
147147 }
148148}
149149
@@ -160,13 +160,13 @@ where
160160 MODE : marker:: Readable ,
161161{
162162 #[ 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 ) )
165165 }
166166
167167 #[ 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 ) )
170170 }
171171}
172172
@@ -185,10 +185,10 @@ impl<const P: char, const N: u8> OutputPin for DynamicPin<P, N> {
185185}
186186
187187impl < 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 )
190190 }
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 )
193193 }
194194}
0 commit comments