Crate lps25hb

Crate lps25hb 

Source
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§

config
Various functions related to configuration
fifo
Various functions related to FIFO
interface
Interface trait
interrupt
Various functions related to interrupts
register
Register mapping
sensor
TO DO:

Structs§

LPS25HB
Holds the driver instance with the selected interface

Enums§

FIFO_MEAN
FIFO Mean mode running average sample size. (Refer to Table 23)
FIFO_MODE
FIFO mode selection. (Refer to Table 22)
INT_ACTIVE
Interrupt active setting for the INT_DRDY pin: active high (default) or active low
INT_DRDY
INT_DRDY pin configuration. (Refer to Table 21)
INT_PIN
Interrupt pad setting for INT_DRDY pin: push-pull (default) or open-drain.
ODR
Output data rate and power mode selection (ODR). (Refer to Table 20)
PRESS_RES
Pressure resolution configuration, number of internal average(Refer to Table 19)
SPI_Mode
SPI interface mode
TEMP_RES
Temperature resolution configuration, number of internal average(Refer to Table 18)