pub fn hard_reset(&mut self, delay_source: &mut impl DelayUs<u32>) -> Result<(), Error<PinE>> {
        if let Some(rst) = self.rst.as_mut() {
            rst.set_high().map_err(Error::Pin)?;
            delay_source.delay_us(10); // ensure the pin change will get registered
            rst.set_low().map_err(Error::Pin)?;
            delay_source.delay_us(10); // ensure the pin change will get registered
            rst.set_high().map_err(Error::Pin)?;
            delay_source.delay_us(10); // ensure the pin change will get registered
        }

        Ok(())
    }
///
/// Performs a hard reset using the RST pin sequence
///
/// # Arguments
///
/// * `delay_source` - mutable reference to a delay provider
///
Performs a hard reset using the RST pin sequence
Performs a hard reset using the RST pin sequence
pub fn hard_reset(&mut self, delay_source: &mut impl DelayUs<u32>) -> Result<(), Error<PinE>> {
        if let Some(rst) = self.rst.as_mut() {
            rst.set_high().map_err(Error::Pin)?;
            delay_source.delay_us(10); // ensure the pin change will get registered
            rst.set_low().map_err(Error::Pin)?;
            delay_source.delay_us(10); // ensure the pin change will get registered
            rst.set_high().map_err(Error::Pin)?;
            delay_source.delay_us(10); // ensure the pin change will get registered
        }
        Ok(())
    }
pub fn hard_reset ( & mut self , delay_source : & mut impl DelayUs < u32 > ) -> Result < ( ) , Error < PinE > > { if let Some ( rst ) = self . rst . as_mut ( ) { rst . set_high ( ) . map_err ( Error :: Pin ) ? ; delay_source . delay_us ( 10 ) ; // ensure the pin change will get registered rst . set_low ( ) . map_err ( Error :: Pin ) ? ; delay_source . delay_us ( 10 ) ; // ensure the pin change will get registered rst . set_high ( ) . map_err ( Error :: Pin ) ? ; delay_source . delay_us ( 10 ) ; // ensure the pin change will get registered } Ok ( ( ) ) }
Performs a hard reset using the RST pin sequence
Performs a hard reset using the RST pin sequence
&mut self
delay_source
&mut impl DelayUs<u32>
&mut self
delay_source
&mut impl DelayUs<u32>