Skip to main content

Crate sen6x

Crate sen6x 

Source
Expand description

This library provides an embedded no_std driver for the Sensirion SEN6x series. This driver is compatible with embedded-hal v1.0.

§Errors

Every command method returns Result<_, Error<E>>, where E is the I²C bus error type of the underlying embedded-hal implementation. The Error variants are:

  • Error::I2c — the underlying I²C transfer failed; the bus error is wrapped.
  • Error::Crc — a CRC-8 checksum in the sensor’s response did not match, indicating a corrupted read.
  • Error::NotAllowed — the command is not permitted in the sensor’s current state (for example, reading measured values while idle, or applying a configuration that is only accepted during measurement).
  • Error::InvalidValue — the sensor returned a value outside its defined range.

Commands that read a response may return any of the four variants. Commands that only send (with no response) return Error::NotAllowed or Error::I2c. Each command method also documents its own # Errors section.

Re-exports§

pub use commands::Sen62Commands;
pub use commands::Sen63cCommands;
pub use commands::Sen65Commands;
pub use commands::Sen66Commands;
pub use commands::Sen68Commands;
pub use commands::Sen69cCommands;
pub use commands::Sen62CommandsAsync;
pub use commands::Sen63cCommandsAsync;
pub use commands::Sen65CommandsAsync;
pub use commands::Sen66CommandsAsync;
pub use commands::Sen68CommandsAsync;
pub use commands::Sen69cCommandsAsync;

Modules§

commands
types

Structs§

Sen6x
Driver for a Sensirion SEN6x air-quality sensor over I²C.

Enums§

Error
SEN6x errors