Struct tsl256x::Tsl2561[][src]

pub struct Tsl2561<I2C> { /* fields omitted */ }

TSL2561 driver

Methods

impl<I2C, E> Tsl2561<I2C> where
    I2C: WriteRead<Error = E> + Write<Error = E>, 
[src]

Creates a new sensor driver associated with an I2C peripheral

Phantom I2C ensures whichever I2C bus the device was created on is the one that is used for all future interactions

Power on the device

Sensor readings are initialized to zero

Actual sensor readings are not available until one integration period has passed (default 400ms)

Power down the device

Sensor readings are initialized to zero

Raw value from channel 0 ADC measuring IR + Visible spectrum

Raw value from channel 1 ADC measuring IR spectrum only

Set the sensor integration time and gain

These settings share a register in the instrument so setting them both requires only a single write

Changes to these settings do not take effect until the next integration period

Auto Trait Implementations

impl<I2C> Send for Tsl2561<I2C> where
    I2C: Send

impl<I2C> Sync for Tsl2561<I2C> where
    I2C: Sync