pub fn enable(&mut self) -> Result<(), Error<E>> {
        if let Some(p) = self.en_pin.as_mut() {
            p.set_high();
        }
        // TODO there should be a 500us delay here, but the chip appears to mostly work without it,
        // so I'm not going to worry about it now. Ideally, this function should take a
        // `embedded_hal::delay::Delay` and wait.
        self.en = true;
        self.send(&[reg::CNTRL1, (reg::Cntrl1::CHIP_EN).bits()])?;
        self.send(&[
                  reg::MISC,
                  (reg::Misc::INT_CLK_EN
                   | reg::Misc::CLK_DET_EN
                   | reg::Misc::CP_MODE_1_5x
                   | reg::Misc::EN_AUTO_INCR)
                  .bits(),
        ])?;
        Ok(())
    }
/// Enable the device for use
///
/// Sets the enable line high, then sends an enable command, waits 500us, and then configures
/// to device to use its internal clock, enable the charge pump at 1.5x boost, and
/// auto-increment on writes.
Enable the device for use
Sets the enable line high, then sends an enable command, waits 500us, and then configures
to device to use its internal clock, enable the charge pump at 1.5x boost, and
auto-increment on writes.
Enable the device for use Sets the enable line high then sends an enable command waits 500us and then configures to device to use its internal clock enable the charge pump at 1 . 5x boost and auto - increment on writes .
pub fn enable(&mut self) -> Result<(), Error<E>> {
        if let Some(p) = self.en_pin.as_mut() {
            p.set_high();
        }
        // TODO there should be a 500us delay here, but the chip appears to mostly work without it,
        // so I'm not going to worry about it now. Ideally, this function should take a
        // `embedded_hal::delay::Delay` and wait.
        self.en = true;
        self.send(&[reg::CNTRL1, (reg::Cntrl1::CHIP_EN).bits()])?;
        self.send(&[
                  reg::MISC,
                  (reg::Misc::INT_CLK_EN
                   | reg::Misc::CLK_DET_EN
                   | reg::Misc::CP_MODE_1_5x
                   | reg::Misc::EN_AUTO_INCR)
                  .bits(),
        ])?;
        Ok(())
    }
pub fn enable ( & mut self ) -> Result < ( ) , Error < E > > { if let Some ( p ) = self . en_pin . as_mut ( ) { p . set_high ( ) ; } // TODO there should be a 500us delay here, but the chip appears to mostly work without it, // so I'm not going to worry about it now. Ideally, this function should take a // `embedded_hal::delay::Delay` and wait. self . en = true ; self . send ( & [ reg :: CNTRL1 , ( reg :: Cntrl1 :: CHIP_EN ) . bits ( ) ] ) ? ; self . send ( & [ reg :: MISC , ( reg :: Misc :: INT_CLK_EN | reg :: Misc :: CLK_DET_EN | reg :: Misc :: CP_MODE_1_5x | reg :: Misc :: EN_AUTO_INCR ) . bits ( ) , ] ) ? ; Ok ( ( ) ) }
Enable the device for use
Sets the enable line high, then sends an enable command, waits 500us, and then configures
to device to use its internal clock, enable the charge pump at 1.5x boost, and
auto-increment on writes.
Enable the device for use Sets the enable line high then sends an enable command waits 500us and then configures to device to use its internal clock enable the charge pump at 1 . 5x boost and auto - increment on writes .
&mut self
&mut self