@@ -152,50 +152,4 @@ pub mod blocking {
152
152
T :: is_low ( self )
153
153
}
154
154
}
155
-
156
- /// Single pin that can switch from input to output mode, and vice-versa.
157
- ///
158
- /// Example use (assumes the `Error` type is the same for the `IoPin`,
159
- /// `InputPin`, and `OutputPin`):
160
- ///
161
- /// ```
162
- /// use core::time::Duration;
163
- /// use embedded_hal::digital::blocking::{IoPin, InputPin, OutputPin};
164
- ///
165
- /// pub fn ping_and_read<TInputPin, TOutputPin, TError: core::fmt::Debug>(
166
- /// mut pin: TOutputPin, delay_fn: &dyn Fn(Duration) -> ()) -> Result<bool, TError>
167
- /// where
168
- /// TInputPin : InputPin<Error = TError> + IoPin<TInputPin, TOutputPin, Error = TError>,
169
- /// TOutputPin : OutputPin<Error = TError> + IoPin<TInputPin, TOutputPin, Error = TError>,
170
- /// {
171
- /// // Ping
172
- /// pin.set_low()?;
173
- /// delay_fn(Duration::from_millis(10));
174
- /// pin.set_high()?;
175
- ///
176
- /// // Read
177
- /// let pin = pin.into_input_pin()?;
178
- /// delay_fn(Duration::from_millis(10));
179
- /// pin.is_high()
180
- /// }
181
- /// ```
182
- pub trait IoPin < TInput , TOutput >
183
- where
184
- TInput : InputPin + IoPin < TInput , TOutput > ,
185
- TOutput : OutputPin + IoPin < TInput , TOutput > ,
186
- {
187
- /// Error type.
188
- type Error : core:: fmt:: Debug ;
189
-
190
- /// Tries to convert this pin to input mode.
191
- ///
192
- /// If the pin is already in input mode, this method should succeed.
193
- fn into_input_pin ( self ) -> Result < TInput , Self :: Error > ;
194
-
195
- /// Tries to convert this pin to output mode with the given initial state.
196
- ///
197
- /// If the pin is already in the requested state, this method should
198
- /// succeed.
199
- fn into_output_pin ( self , state : PinState ) -> Result < TOutput , Self :: Error > ;
200
- }
201
155
}
0 commit comments