[][src]Trait i2c_hung_fix::HangFixPins

pub trait HangFixPins<C, A, D, E> where
    C: OutputPin<Error = E>,
    A: InputPin<Error = E>,
    D: DelayUs<u32>, 
{ fn try_unhang_i2c(&mut self, delay: &mut D) -> Result<Sucess, Error<E>>; }

This conveneince trait is for providing try_unhang_i2c on known I2C pins in device hal implementation crates.

It is implemented here for tuples of (OutputPin, InputPin) so consumers can do:

let mut pins = (gpiox.px1.into_push_pull_ouput(...), gpiox.px2.into_floating_input(...));
pins.try_unhang_i2c(delay)?;
let pins = (pins.0.into_alternate_open_drain(), pins.1.into_alternate_open_drain());

Required methods

fn try_unhang_i2c(&mut self, delay: &mut D) -> Result<Sucess, Error<E>>

Runs the unhang fix with default settings

Loading content...

Implementors

impl<C, A, D, E> HangFixPins<C, A, D, E> for (C, A) where
    C: OutputPin<Error = E>,
    A: InputPin<Error = E>,
    D: DelayUs<u32>, 
[src]

Loading content...