[−][src]Struct sps30::Sps30
Sps30 driver
Methods
impl<SERIAL, E, F> Sps30<SERIAL> where
SERIAL: Write<u8, Error = E> + Read<u8, Error = F>,
[src]
SERIAL: Write<u8, Error = E> + Read<u8, Error = F>,
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,
SERIAL: Send,
impl<SERIAL> Sync for Sps30<SERIAL> where
SERIAL: Sync,
SERIAL: Sync,
impl<SERIAL> Unpin for Sps30<SERIAL> where
SERIAL: Unpin,
SERIAL: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,