bmp085_180_rs/lib.rs
1//! This crate provides a driver for both the [BMP085](https://www.sparkfun.com/datasheets/Components/General/BST-BMP085-DS000-05.pdf) and
2//! [BMP180](https://cdn-shop.adafruit.com/datasheets/BST-BMP180-DS000-09.pdf) digital pressure sensors, which additionally provide the ability to measure temperature.
3//!
4//! The driver implements both `embedded-hal` and `embedded-hal-async` traits for ease of use with any compatible chipset HAL.
5//!
6//! ### Features
7//!
8//! The default working mode is `sync` (blocking). To use non-blocking calls, enable the `async` feature:
9//! ```toml
10//! bmp085-180-rs = { version = "1.0.0", features = [ "async" ] }
11//! ```
12//!
13//! ### Usage
14//!
15//! See the following driver methods:
16//!
17//! #### [`BMP::read_temperature`](BMP::read_temperature)
18//!
19//! #### [`BMP::read_pressure`](BMP::read_pressure)
20//!
21//! #### [`BMP::read_altitude`](BMP::read_altitude)
22
23#![no_std]
24
25#[cfg(all(feature = "async", feature = "sync"))]
26compile_error!("Both `sync` and `async` features cannot be enabled.");
27
28mod constants;
29mod driver;
30mod logic;
31mod types;
32
33pub use types::{BMPError, Config, Oss, BMP};