File tree 1 file changed +16
-0
lines changed
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -25,10 +25,26 @@ pub trait InputPin {
25
25
fn is_low ( & self ) -> bool ;
26
26
}
27
27
28
+ /// Pins that can switch between input and output modes at runtime
29
+ #[ cfg( feature = "unproven" ) ]
28
30
pub trait IoPin {
31
+ /// Used by [`into_input()`](#tymethod.into_input)
32
+ ///
33
+ /// In addition to being an [`InputPin`](trait.InputPin.html), the
34
+ /// target type must implement `IoPin` so that the mode can be
35
+ /// changed again.
29
36
type Input : InputPin + IoPin < Input = Self :: Input , Output = Self :: Output > ;
37
+
38
+ /// Used by [`into_output()`](#tymethod.into_output)
39
+ ///
40
+ /// In addition to being an [`OutputPin`](trait.OutputPin.html),
41
+ /// the target type must implement `IoPin` so that the mode can be
42
+ /// changed again.
30
43
type Output : OutputPin + IoPin < Input = Self :: Input , Output = Self :: Output > ;
31
44
45
+ /// Configure as [`InputPin`](trait.InputPin.html)
32
46
fn into_input ( self ) -> Self :: Input ;
47
+
48
+ /// Configure as [`OutputPin`](trait.OutputPin.html)
33
49
fn into_output ( self ) -> Self :: Output ;
34
50
}
You can’t perform that action at this time.
0 commit comments