@@ -63,6 +63,7 @@ use crate::target::P0;
63
63
use crate :: target:: { P1 } ;
64
64
65
65
use crate :: hal:: digital:: v2:: { OutputPin , StatefulOutputPin , InputPin } ;
66
+ use void:: Void ;
66
67
67
68
impl < MODE > Pin < MODE > {
68
69
/// Convert the pin to be a floating input
@@ -220,7 +221,7 @@ impl<MODE> Pin<MODE> {
220
221
}
221
222
222
223
impl < MODE > InputPin for Pin < Input < MODE > > {
223
- type Error = ( ) ;
224
+ type Error = Void ;
224
225
225
226
fn is_high ( & self ) -> Result < bool , Self :: Error > {
226
227
self . is_low ( ) . map ( |v| !v)
@@ -239,7 +240,7 @@ impl<MODE> InputPin for Pin<Input<MODE>> {
239
240
}
240
241
241
242
impl < MODE > OutputPin for Pin < Output < MODE > > {
242
- type Error = ( ) ;
243
+ type Error = Void ;
243
244
244
245
/// Set the output as high
245
246
fn set_high ( & mut self ) -> Result < ( ) , Self :: Error > {
@@ -356,7 +357,7 @@ macro_rules! gpio {
356
357
357
358
use crate :: target;
358
359
use crate :: hal:: digital:: v2:: { OutputPin , StatefulOutputPin , InputPin } ;
359
- use core :: convert :: Infallible ;
360
+ use void :: Void ;
360
361
361
362
362
363
@@ -508,7 +509,7 @@ macro_rules! gpio {
508
509
}
509
510
510
511
impl <MODE > InputPin for $PXi<Input <MODE >> {
511
- type Error = Infallible ;
512
+ type Error = Void ;
512
513
513
514
fn is_high( & self ) -> Result <bool , Self :: Error > {
514
515
self . is_low( ) . map( |v| !v)
@@ -520,7 +521,7 @@ macro_rules! gpio {
520
521
}
521
522
522
523
impl <MODE > OutputPin for $PXi<Output <MODE >> {
523
- type Error = Infallible ;
524
+ type Error = Void ;
524
525
525
526
/// Set the output as high
526
527
fn set_high( & mut self ) -> Result <( ) , Self :: Error > {
0 commit comments