File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -13,15 +13,15 @@ license = "MIT OR Apache-2.0"
13
13
[dependencies ]
14
14
cfg-if = " 1.0.0"
15
15
16
- embassy-time = { version = " 0.1.5 " , git = " https://github.com/embassy-rs/embassy/ " , rev = " fe8c46bce329efe7921386dd46a493f607453bd8 " }
17
- embedded-hal-async = " 1.0.0-rc.2 "
18
- embedded-hal = " 1.0.0-rc.2 "
16
+ embassy-time = { version = " 0.3.2 " }
17
+ embedded-hal-async = " 1.0.0"
18
+ embedded-hal = " 1.0.0"
19
19
defmt = { version = " 0.3.5" , optional = true }
20
20
21
21
tokio = { version = " 1.34.0" , default-features = false , optional = true }
22
22
23
23
[dev-dependencies ]
24
- embedded-hal-mock = { version = " 0.10.0-rc.3 " , default-features = false , features = [
24
+ embedded-hal-mock = { version = " 0.10.0" , default-features = false , features = [
25
25
" eh1" ,
26
26
" embedded-time" ,
27
27
" embedded-hal-async" ,
Original file line number Diff line number Diff line change @@ -154,11 +154,11 @@ where
154
154
}
155
155
}
156
156
157
- fn is_pin_pressed ( & self ) -> bool {
157
+ fn is_pin_pressed ( & mut self ) -> bool {
158
158
self . pin . is_low ( ) . unwrap_or ( self . config . mode . is_pulldown ( ) ) == self . config . mode . is_pullup ( )
159
159
}
160
160
161
- fn is_pin_released ( & self ) -> bool {
161
+ fn is_pin_released ( & mut self ) -> bool {
162
162
!self . is_pin_pressed ( )
163
163
}
164
164
Original file line number Diff line number Diff line change @@ -151,14 +151,14 @@ impl MockPin {
151
151
}
152
152
153
153
impl embedded_hal:: digital:: InputPin for MockPin {
154
- fn is_high ( & self ) -> Result < bool , Self :: Error > {
154
+ fn is_high ( & mut self ) -> Result < bool , Self :: Error > {
155
155
match self . 0 . try_read ( ) {
156
156
Ok ( rw) => Ok ( * rw) ,
157
157
Err ( _) => Err ( MockError ) ,
158
158
}
159
159
}
160
160
161
- fn is_low ( & self ) -> Result < bool , Self :: Error > {
161
+ fn is_low ( & mut self ) -> Result < bool , Self :: Error > {
162
162
match self . 0 . try_read ( ) {
163
163
Ok ( rw) => Ok ( !* rw) ,
164
164
Err ( _) => Err ( MockError ) ,
You can’t perform that action at this time.
0 commit comments