@@ -1398,9 +1398,7 @@ impl<T: AnyPin> embedded_hal::digital::v2::OutputPin for InOutPin<T> {
1398
1398
1399
1399
#[ cfg( feature = "eh1_0_alpha" ) ]
1400
1400
mod eh1 {
1401
- use eh1_0_alpha:: digital:: {
1402
- ErrorType , InputPin , OutputPin , StatefulOutputPin , ToggleableOutputPin ,
1403
- } ;
1401
+ use eh1_0_alpha:: digital:: { ErrorType , InputPin , OutputPin , StatefulOutputPin } ;
1404
1402
1405
1403
use super :: { Error , FunctionSio , Pin , PinId , PullType , SioConfig , SioInput , SioOutput } ;
1406
1404
@@ -1434,36 +1432,25 @@ mod eh1 {
1434
1432
I : PinId ,
1435
1433
P : PullType ,
1436
1434
{
1437
- fn is_set_high ( & self ) -> Result < bool , Self :: Error > {
1435
+ fn is_set_high ( & mut self ) -> Result < bool , Self :: Error > {
1438
1436
Ok ( self . _is_set_high ( ) )
1439
1437
}
1440
1438
1441
- fn is_set_low ( & self ) -> Result < bool , Self :: Error > {
1439
+ fn is_set_low ( & mut self ) -> Result < bool , Self :: Error > {
1442
1440
Ok ( self . _is_set_low ( ) )
1443
1441
}
1444
1442
}
1445
1443
1446
- impl < I , P > ToggleableOutputPin for Pin < I , FunctionSio < SioOutput > , P >
1447
- where
1448
- I : PinId ,
1449
- P : PullType ,
1450
- {
1451
- fn toggle ( & mut self ) -> Result < ( ) , Self :: Error > {
1452
- self . _toggle ( ) ;
1453
- Ok ( ( ) )
1454
- }
1455
- }
1456
-
1457
1444
impl < I , P > InputPin for Pin < I , FunctionSio < SioInput > , P >
1458
1445
where
1459
1446
I : PinId ,
1460
1447
P : PullType ,
1461
1448
{
1462
- fn is_high ( & self ) -> Result < bool , Self :: Error > {
1449
+ fn is_high ( & mut self ) -> Result < bool , Self :: Error > {
1463
1450
Ok ( self . _is_high ( ) )
1464
1451
}
1465
1452
1466
- fn is_low ( & self ) -> Result < bool , Self :: Error > {
1453
+ fn is_low ( & mut self ) -> Result < bool , Self :: Error > {
1467
1454
Ok ( self . _is_low ( ) )
1468
1455
}
1469
1456
}
@@ -1480,11 +1467,11 @@ mod eh1 {
1480
1467
impl < ' a , I : PinId , F : super :: func:: Function , P : PullType > InputPin
1481
1468
for super :: AsInputPin < ' a , I , F , P >
1482
1469
{
1483
- fn is_high ( & self ) -> Result < bool , Self :: Error > {
1470
+ fn is_high ( & mut self ) -> Result < bool , Self :: Error > {
1484
1471
Ok ( self . 0 . _is_high ( ) )
1485
1472
}
1486
1473
1487
- fn is_low ( & self ) -> Result < bool , Self :: Error > {
1474
+ fn is_low ( & mut self ) -> Result < bool , Self :: Error > {
1488
1475
Ok ( self . 0 . _is_low ( ) )
1489
1476
}
1490
1477
}
0 commit comments