Skip to content

Commit 73c6c8b

Browse files
Morgan RoffMorganR
Morgan Roff
authored andcommitted
Remove TIoPin from IoPin example
1 parent ccd673f commit 73c6c8b

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/digital.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -177,23 +177,21 @@ pub trait InputPin {
177177

178178
/// Single pin that can switch from input to output mode, and vice-versa.
179179
///
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`):
182182
///
183183
/// ```
184184
/// use core::time::Duration;
185-
/// use embedded_hal::digital::{IoPin, InputPin, OutputPin, PinState};
185+
/// use embedded_hal::digital::{IoPin, InputPin, OutputPin};
186186
///
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>
189189
/// where
190-
/// TIoPin : IoPin<TInputPin, TOutputPin, Error = TError>,
191190
/// TInputPin : InputPin<Error = TError> + IoPin<TInputPin, TOutputPin, Error = TError>,
192191
/// TOutputPin : OutputPin<Error = TError> + IoPin<TInputPin, TOutputPin, Error = TError>,
193192
/// {
194-
///
195193
/// // Ping
196-
/// let mut pin = pin.try_into_output_pin(PinState::Low)?;
194+
/// pin.try_set_low()?;
197195
/// delay_fn(Duration::from_millis(10));
198196
/// pin.try_set_high()?;
199197
///

0 commit comments

Comments
 (0)