sht4x-rs 0.1.0

Sensirion SHT4x temperature & humidity sensor driver (embedded-hal 1.0, no_std, blocking + async)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Driver error type.

/// Errors returned by the SHT4x driver.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Error<E> {
    /// Underlying I²C bus error.
    I2c(E),
    /// CRC byte did not match the received data.
    Crc,
}

impl<E> From<E> for Error<E> {
    fn from(e: E) -> Self {
        Error::I2c(e)
    }
}