pub fn initialize(&mut self) -> Result<(), Error<E>> {
        self.write_register(Register::MAIN_CTRL, MainControl::RGBMode as u8 | MainControl::LightSensorEnable as u8 | MainControl::ProximitySensorEnable as u8)?;
        self.write_register(Register::PS_MEAS_RATE, ProximitySensorResolution::Resolution11Bits as u8 | ProximitySensorRate::Rate100Ms as u8)?;
        self.write_register(Register::PS_PULSES, 8_u8)?;

        Ok(())
    }
/// Write the default initiliation data to the device
Write the default initiliation data to the device
Write the default initiliation data to the device
pub fn initialize(&mut self) -> Result<(), Error<E>> {
        self.write_register(Register::MAIN_CTRL, MainControl::RGBMode as u8 | MainControl::LightSensorEnable as u8 | MainControl::ProximitySensorEnable as u8)?;
        self.write_register(Register::PS_MEAS_RATE, ProximitySensorResolution::Resolution11Bits as u8 | ProximitySensorRate::Rate100Ms as u8)?;
        self.write_register(Register::PS_PULSES, 8_u8)?;
        Ok(())
    }
pub fn initialize ( & mut self ) -> Result < ( ) , Error < E > > { self . write_register ( Register :: MAIN_CTRL , MainControl :: RGBMode as u8 | MainControl :: LightSensorEnable as u8 | MainControl :: ProximitySensorEnable as u8 ) ? ; self . write_register ( Register :: PS_MEAS_RATE , ProximitySensorResolution :: Resolution11Bits as u8 | ProximitySensorRate :: Rate100Ms as u8 ) ? ; self . write_register ( Register :: PS_PULSES , 8_u8 ) ? ; Ok ( ( ) ) }
Write the default initiliation data to the device
Write the default initiliation data to the device
&mut self
&mut self