7
7
///
8
8
/// *This version of the trait is now deprecated. Please use the new `OutputPin` trait in
9
9
/// `digital::v2::OutputPin`*.
10
- #[ deprecated]
10
+ #[ deprecated( since = "0.2.2" , note = "Deprecated because the methods cannot return errors. \
11
+ Users should use the traits in digital::v2.") ]
11
12
pub trait OutputPin {
12
13
/// Drives the pin low
13
14
///
@@ -28,7 +29,8 @@ pub trait OutputPin {
28
29
///
29
30
/// *This version of the trait is now deprecated. Please use the new `StatefulOutputPin` trait in
30
31
/// `digital::v2::StatefulOutputPin`*.
31
- #[ deprecated]
32
+ #[ deprecated( since = "0.2.2" , note = "Deprecated because the methods cannot return errors. \
33
+ Users should use the traits in digital::v2.") ]
32
34
#[ cfg( feature = "unproven" ) ]
33
35
pub trait StatefulOutputPin {
34
36
/// Is the pin in drive high mode?
@@ -53,7 +55,8 @@ pub trait StatefulOutputPin {
53
55
/// both [OutputPin](trait.OutputPin.html) and
54
56
/// [StatefulOutputPin](trait.StatefulOutputPin.html) are
55
57
/// implemented. Otherwise, implement this using hardware mechanisms.
56
- #[ deprecated]
58
+ #[ deprecated( since = "0.2.2" , note = "Deprecated because the methods cannot return errors. \
59
+ Users should use the traits in digital::v2.") ]
57
60
#[ cfg( feature = "unproven" ) ]
58
61
pub trait ToggleableOutputPin {
59
62
/// Toggle pin output.
@@ -102,7 +105,8 @@ pub trait ToggleableOutputPin {
102
105
/// pin.toggle();
103
106
/// assert!(pin.is_set_low());
104
107
/// ```
105
- #[ deprecated]
108
+ #[ deprecated( since = "0.2.2" , note = "Deprecated because the methods cannot return errors. \
109
+ Users should use the traits in digital::v2.") ]
106
110
#[ cfg( feature = "unproven" ) ]
107
111
pub mod toggleable {
108
112
#[ allow( deprecated) ]
@@ -136,7 +140,8 @@ pub mod toggleable {
136
140
///
137
141
/// *This version of the trait is now deprecated. Please use the new `InputPin` trait in
138
142
/// `digital::v2::InputPin`*.
139
- #[ deprecated]
143
+ #[ deprecated( since = "0.2.2" , note = "Deprecated because the methods cannot return errors. \
144
+ Users should use the traits in digital::v2.") ]
140
145
#[ cfg( feature = "unproven" ) ]
141
146
pub trait InputPin {
142
147
/// Is the input pin high?
0 commit comments