Skip to content

Commit 8fdc319

Browse files
committed
drivers: sensors: Add official ST library for vl53l5cx
Adds the official ST library for the vl53l5cx tof sensor. Signed-off-by: Fabian Blatz <[email protected]>
1 parent b77157f commit 8fdc319

11 files changed

+25378
-0
lines changed

CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@ zephyr_library_sources(sensor/vl53l1x/api/core/src/vl53l1_core_support.c)
3131
zephyr_library_sources(sensor/vl53l1x/api/core/src/vl53l1_register_funcs.c)
3232
endif()
3333

34+
if(CONFIG_VL53L5CX)
35+
zephyr_include_directories(sensor/vl53l5cx/api/inc
36+
${PROJECT_SOURCE_DIR}/drivers/sensor/st/vl53l5cx)
37+
zephyr_library_sources(sensor/vl53l5cx/api/src/vl53l5cx_api.c)
38+
zephyr_library_sources(sensor/vl53l5cx/api/src/vl53l5cx_plugin_detection_thresholds.c)
39+
zephyr_library_sources(sensor/vl53l5cx/api/src/vl53l5cx_plugin_motion_indicator.c)
40+
zephyr_library_sources(sensor/vl53l5cx/api/src/vl53l5cx_plugin_xtalk.c)
41+
endif()
42+
3443
if(CONFIG_AUDIO_MPXXDTYY)
3544
zephyr_include_directories(audio/microphone)
3645
zephyr_library_sources(audio/microphone/OpenPDMFilter.c)

sensor/vl53l5cx/README

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
VL53L5CX
2+
########
3+
4+
Origin:
5+
ST Microelectronics
6+
https://www.st.com/en/embedded-software/stsw-img007.html
7+
8+
Status:
9+
version 1.0.7
10+
11+
Purpose:
12+
ST Microelectonics official API to use vl53l5cx sensor.
13+
14+
Description:
15+
This library written by STMicroelectronics is dedicated to vl53l5cx time of flight sensor.
16+
17+
This library is called from the vl53l5cx driver and is kept transparent for user.
18+
User is calling a standard Zephyr driver and then the driver makes some calls to this library.
19+
20+
In order to fit with Zephyr rules and simplify version updates, we have done a minimum of modifications:
21+
- split headers and source to inc/src
22+
- keep only API directory
23+
(remove documentation and samples, see ST website for this)
24+
25+
In order to use this library, you have to:
26+
* define CONFIG_HAS_STLIB and CONFIG_VL53L5CX
27+
* include vl53l5cx_api.h and vl53l1_platform.h in the driver .h
28+
* depending on your I2C controller implementation you will need to define VL53L5CX_BUF_ATTRIBUTES
29+
to place the larger buffers into a dmable memory region
30+
31+
Dependencies:
32+
This package depends on Zephyr I2C implementation and is linked statically.
33+
This library will be used by a standard Zephyr driver.
34+
35+
URL:
36+
http://www.st.com/en/embedded-software/stsw-img007.html
37+
38+
commit:
39+
version 1.0.7
40+
41+
Maintained-by:
42+
External
43+
44+
License:
45+
BSD-3-Clause
46+
47+
License Link:
48+
http://www.st.com/en/embedded-software/stsw-img007.html

0 commit comments

Comments
 (0)