[][src]Struct sps30::Sps30

pub struct Sps30<SERIAL> { /* fields omitted */ }

Sps30 driver

Methods

impl<SERIAL, E, F> Sps30<SERIAL> where
    SERIAL: Write<u8, Error = E> + Read<u8, Error = F>, 
[src]

pub fn new(serial: SERIAL) -> Self[src]

Create new instance of the Sps30 device

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

Start measuring

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

Stop measuring

pub fn read_measurement(&mut self) -> Result<[f32; 10], Error<E, F>>[src]

Read measuring

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

Read cleaning interval

pub fn write_cleaning_interval(&mut self, val: u32) -> Result<(), Error<E, F>>[src]

Write cleaning interval

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

Start fan cleaning

pub fn device_info(&mut self, info: DeviceInfo) -> Result<[u8; 32], Error<E, F>>[src]

Get info

Return a [u8;32] with info

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

Reset device

After calling this function, caller must sleep before issuing more commands

Trait Implementations

impl<SERIAL: Debug> Debug for Sps30<SERIAL>[src]

impl<SERIAL: Default> Default for Sps30<SERIAL>[src]

Auto Trait Implementations

impl<SERIAL> Send for Sps30<SERIAL> where
    SERIAL: Send

impl<SERIAL> Sync for Sps30<SERIAL> where
    SERIAL: Sync

impl<SERIAL> Unpin for Sps30<SERIAL> where
    SERIAL: Unpin

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.