@@ -177,23 +177,21 @@ pub trait InputPin {
177
177
178
178
/// Single pin that can switch from input to output mode, and vice-versa.
179
179
///
180
- /// Example use (assumes the Error type is the same for IoPin, InputPin, and
181
- /// OutputPin):
180
+ /// Example use (assumes the ` Error` type is the same for ` InputPin` , and
181
+ /// ` OutputPin` ):
182
182
///
183
183
/// ```
184
184
/// use core::time::Duration;
185
- /// use embedded_hal::digital::{IoPin, InputPin, OutputPin, PinState };
185
+ /// use embedded_hal::digital::{IoPin, InputPin, OutputPin};
186
186
///
187
- /// pub fn ping_and_read<TIoPin, TInputPin, TOutputPin, TError>(
188
- /// pin: TIoPin , delay_fn: &dyn Fn(Duration) -> ()) -> Result<bool, TError>
187
+ /// pub fn ping_and_read<TInputPin, TOutputPin, TError>(
188
+ /// mut pin: TOutputPin , delay_fn: &dyn Fn(Duration) -> ()) -> Result<bool, TError>
189
189
/// where
190
- /// TIoPin : IoPin<TInputPin, TOutputPin, Error = TError>,
191
190
/// TInputPin : InputPin<Error = TError> + IoPin<TInputPin, TOutputPin, Error = TError>,
192
191
/// TOutputPin : OutputPin<Error = TError> + IoPin<TInputPin, TOutputPin, Error = TError>,
193
192
/// {
194
- ///
195
193
/// // Ping
196
- /// let mut pin = pin.try_into_output_pin(PinState::Low )?;
194
+ /// pin.try_set_low( )?;
197
195
/// delay_fn(Duration::from_millis(10));
198
196
/// pin.try_set_high()?;
199
197
///
0 commit comments