#st #sensor #driver #vl53l1x #to-f #embedded-hal-i2c

vl53l1

A pure-Rust port of the official ST VL53L1X ToF sensor C API

3 releases

0.1.2 Jan 11, 2023
0.1.1 Jan 19, 2021
0.1.0 Sep 10, 2020

#913 in Hardware support

Download history 4/week @ 2024-02-15 25/week @ 2024-02-22 13/week @ 2024-02-29 1/week @ 2024-03-14 28/week @ 2024-03-28 15/week @ 2024-04-04 1/week @ 2024-04-11 85/week @ 2024-04-18

129 downloads per month

MIT/Apache

1MB
30K SLoC

vl53l1 Actions Status Crates.io

A pure-Rust port of the official ST VL53L1X ToF sensor C API (STSW-IMG007).

The lib directory contains the library crates. The examples directory contains a single examples for the STM32F107, though the library itself should be compatible with any device that Rust can target and that has an implementation of the embedded-hal I2C traits.

The lib/vl53l1-reg crate contains a generated register map, register structs, and some helper functions for writing to and reading from registers via I2C.

crates.io docs.rs

The lib/vl53l1 crate depend on the vl53l1-reg, handles most of the implementation and exposes the public API.

crates.io docs.rs

While much of the code has been Rust-ified, the function tree and overall architecture are still a direct port of the original C code. Feel free to submit PRs or issues related to rustifying the library further!

Dependencies

~110–355KB