Skip to content

Commit f95cb65

Browse files
committed
Added basic driver that should be able to query pressure readings and perform basic configuration and error checking
1 parent 5563b78 commit f95cb65

File tree

6 files changed

+1831
-6
lines changed

6 files changed

+1831
-6
lines changed

.gitignore

+14-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,14 @@
1-
/target
1+
# Generated by Cargo
2+
# will have compiled files and executables
3+
debug/
4+
target/
5+
6+
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
7+
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
8+
Cargo.lock
9+
10+
# These are backup files generated by rustfmt
11+
**/*.rs.bk
12+
13+
# MSVC Windows builds of rustc generate these, which store debugging information
14+
*.pdb

Cargo.lock

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+6-2
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,15 @@ keywords = ["embedded-hal", "async", "pressure", "sensor"]
1010
categories = ["aerospace", "embedded", "hardware-support", "no-std"]
1111

1212
[dependencies]
13-
embedded-hal-async = "1.0"
13+
embedded-hal-async = "1.0.0"
1414

1515
[dev-dependencies]
16-
embedded-hal-mock = { version = "0.10", default-features = false, features = [
16+
embedded-hal-mock = { version = "0.10.0", default-features = false, features = [
1717
"eh1",
1818
"embedded-hal-async",
1919
] }
2020
tokio = { version = "1.37.0", features = ["macros", "rt"] }
21+
22+
[patch.crates-io]
23+
# Until https://github.com/dbrgn/embedded-hal-mock/pull/119 is merged (async I2C mock)
24+
embedded-hal-mock = { git = "https://github.com/asasine/embedded-hal-mock", branch = "feat/asasine/async-i2c" }

README.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# BMP390
2+
3+
[![Crates.io Version](https://img.shields.io/crates/v/bmp390?logo=rust)](https://crates.io/crates/bmp390)
4+
[![Docs](https://docs.rs/bmp390/badge.svg)](https://docs.rs/bmp390)
5+
[![CI](https://img.shields.io/github/actions/workflow/status/asasine/bmp390/rust.yaml?branch=main&logo=github&label=CI)](https://github.com/asasine/bmp390/actions/workflows/rust.yaml?query=branch%3Amain)
6+
[![Crates.io Downloads](https://img.shields.io/crates/d/bmp390)](https://crates.io/crates/bmp390)
7+
8+
The BMP390 is a digital sensor with pressure and temperature measurement based on proven sensing principles. The sensor is more accurate than its predecessor BMP380, covering a wider measurement range. It offers new interrupt functionality, lower power, and a FIFO functionality. The integrated 512 byte FIFO buffer supports low power applications and prevents data loss in non-real-time systems.
9+
10+
[`Bmp390`](https://docs.rs/bmp390/latest/bmp390/struct.Bmp390.html) is a driver for the BMP390 sensor. It provides methods to read the temperature and pressure from the sensor over [I2C](https://en.wikipedia.org/wiki/I%C2%B2C). It is built on top of the [`embedded_hal_async::i2c`](https://docs.rs/embedded-hal-async/latest/embedded_hal_async/i2c/index.html) traits to be compatible with a wide range of embedded platforms.
11+
12+
## Datasheet
13+
The [BMP390 Datasheet](https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmp390-ds002.pdf) contains detailed information about the sensor's features, electrical characteristics, and registers. This package implements the functionality described in the datasheet and references the relevant sections in the documentation.

0 commit comments

Comments
 (0)