Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: sensors: Add official ST library for vl53l5cx #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ zephyr_library_sources(sensor/vl53l1x/api/core/src/vl53l1_core_support.c)
zephyr_library_sources(sensor/vl53l1x/api/core/src/vl53l1_register_funcs.c)
endif()

if(CONFIG_VL53L5CX)
zephyr_include_directories(sensor/vl53l5cx/api/inc
${PROJECT_SOURCE_DIR}/drivers/sensor/st/vl53l5cx)
zephyr_library_sources(sensor/vl53l5cx/api/src/vl53l5cx_api.c)
zephyr_library_sources(sensor/vl53l5cx/api/src/vl53l5cx_plugin_detection_thresholds.c)
zephyr_library_sources(sensor/vl53l5cx/api/src/vl53l5cx_plugin_motion_indicator.c)
zephyr_library_sources(sensor/vl53l5cx/api/src/vl53l5cx_plugin_xtalk.c)
endif()

if(CONFIG_AUDIO_MPXXDTYY)
zephyr_include_directories(audio/microphone)
zephyr_library_sources(audio/microphone/OpenPDMFilter.c)
Expand Down
48 changes: 48 additions & 0 deletions sensor/vl53l5cx/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
VL53L5CX
########

Origin:
ST Microelectronics
https://www.st.com/en/embedded-software/stsw-img007.html

Status:
version 1.0.7

Purpose:
ST Microelectonics official API to use vl53l5cx sensor.

Description:
This library written by STMicroelectronics is dedicated to vl53l5cx time of flight sensor.

This library is called from the vl53l5cx driver and is kept transparent for user.
User is calling a standard Zephyr driver and then the driver makes some calls to this library.

In order to fit with Zephyr rules and simplify version updates, we have done a minimum of modifications:
- split headers and source to inc/src
- keep only API directory
(remove documentation and samples, see ST website for this)

In order to use this library, you have to:
* define CONFIG_HAS_STLIB and CONFIG_VL53L5CX
* include vl53l5cx_api.h and vl53l1_platform.h in the driver .h
* depending on your I2C controller implementation you will need to define VL53L5CX_BUF_ATTRIBUTES
to place the larger buffers into a dmable memory region

Dependencies:
This package depends on Zephyr I2C implementation and is linked statically.
This library will be used by a standard Zephyr driver.

URL:
http://www.st.com/en/embedded-software/stsw-img007.html

commit:
version 1.0.7

Maintained-by:
External

License:
BSD-3-Clause

License Link:
http://www.st.com/en/embedded-software/stsw-img007.html
Loading