Crate lps25hb[][src]

Expand description

A platform agnostic driver to interface with LPS25HB pressure sensor module.

This driver allows you to:

NOTE: This is an early version of the crate. Only I2C interface is supported at the moment.

Datasheet: LPS25HB

Usage examples (see also examples folder)

Please find additional examples using hardware in this repository: examples

Read pressure and temperature


use lps25hb::interface::{I2cInterface, i2c::I2cAddress};
use lps25hb::*;

let mut lps25 = LPS25HB.new(i2c_interface);

lps25hb.sensor_on(true).unwrap();

lps25.one_shot().unwrap();

let pressure = lps25.read_pressure().unwrap();
let temperature = lps25.read_temperature().unwrap();

Modules

Various functions related to configuration

Various functions related to FIFO

Interface trait

Various functions related to interrupts

Register mapping

TO DO:

Structs

Holds the driver instance with the selected interface

Enums

FIFO Mean mode running average sample size. (Refer to Table 23)

FIFO mode selection. (Refer to Table 22)

Interrupt active setting for the INT_DRDY pin: active high (default) or active low

INT_DRDY pin configuration. (Refer to Table 21)

Interrupt pad setting for INT_DRDY pin: push-pull (default) or open-drain.

Output data rate and power mode selection (ODR). (Refer to Table 20)

Pressure resolution configuration, number of internal average(Refer to Table 19)

SPI interface mode

Temperature resolution configuration, number of internal average(Refer to Table 18)