[][src]Struct sps30_i2c::Sps30

pub struct Sps30<I2C, D> { /* fields omitted */ }

SPS30 device driver

Implementations

impl<I2C, D, E> Sps30<I2C, D> where
    I2C: Read<Error = E> + Write<Error = E>,
    D: DelayMs<u8>, 
[src]

pub fn new_sps30(i2c: I2C, delay: D) -> Self[src]

Create new instance of the SPS30 device

pub fn destroy(self) -> I2C[src]

Destory driver instance

pub fn start_measurement(&mut self) -> Result<(), Error<E>>[src]

Enter measurement mode Command execution time: 20 ms

pub fn stop_measurement(&mut self) -> Result<(), Error<E>>[src]

Exit measurement mode Command execution time: 20 ms

pub fn read_data_ready_flag(&mut self) -> Result<bool, Error<E>>[src]

Poll for the availability of new measurements Command execution time: -

pub fn read_measured_values(&mut self) -> Result<AirInfo, Error<E>>[src]

Read the measured values Command execution time: -

pub fn sleep(&mut self) -> Result<(), Error<E>>[src]

Enter sleep mode Command execution time: 5 ms

pub fn wake_up(&mut self) -> Result<(), Error<E>>[src]

Exit sleep mode Command execution time: 5 ms

pub fn start_fan_cleaning(&mut self) -> Result<(), Error<E>>[src]

Start the fan-cleaning manually This commmand can only be executed in Measurement-Mode Command execution time: 5 ms

pub fn read_auto_cleaning_interval(&mut self) -> Result<u32, Error<E>>[src]

Read the interval[s] of the periodic fan-cleaning Command execution time: 5 ms

pub fn write_auto_cleaning_interval(&mut self, n: u32) -> Result<(), Error<E>>[src]

Write the interval[s] of the periodic fan-cleaning Command execution time: 20 ms

pub fn read_device_product_type(&mut self) -> Result<[u8; 8], Error<E>>[src]

Read device product type Command execution time: -

pub fn read_device_serial_number(&mut self) -> Result<[u8; 32], Error<E>>[src]

Read device serial number Command execution time: -

pub fn read_firmware_version(&mut self) -> Result<(u8, u8), Error<E>>[src]

Read firmware version Command execution time: -

pub fn read_device_status_register(
    &mut self
) -> Result<StatusRegisterResult, Error<E>>
[src]

Read device status register Command execution time: -

pub fn clear_device_status_register(&mut self) -> Result<(), Error<E>>[src]

Clear device status register Command execution time: 5 ms

pub fn device_reset(&mut self) -> Result<(), Error<E>>[src]

Reset the device Command execution time: 100 ms

Auto Trait Implementations

impl<I2C, D> RefUnwindSafe for Sps30<I2C, D> where
    D: RefUnwindSafe,
    I2C: RefUnwindSafe

impl<I2C, D> Send for Sps30<I2C, D> where
    D: Send,
    I2C: Send

impl<I2C, D> Sync for Sps30<I2C, D> where
    D: Sync,
    I2C: Sync

impl<I2C, D> Unpin for Sps30<I2C, D> where
    D: Unpin,
    I2C: Unpin

impl<I2C, D> UnwindSafe for Sps30<I2C, D> where
    D: UnwindSafe,
    I2C: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.