Skip to content

Commit

Permalink
Merge pull request #68 from pimoroni/driver-vl53l1x
Browse files Browse the repository at this point in the history
Pico driver for vl53l1x Time of Flight breakout
  • Loading branch information
Gadgetoid authored Feb 23, 2021
2 parents 8383621 + 25a8c5b commit 292e2b5
Show file tree
Hide file tree
Showing 9 changed files with 2,551 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
add_subdirectory(st7789)
add_subdirectory(msa301)
add_subdirectory(rv3028)
add_subdirectory(vl53l1x)
10 changes: 10 additions & 0 deletions drivers/vl53l1x/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
add_library(vl53l1x INTERFACE)

target_sources(vl53l1x INTERFACE
${CMAKE_CURRENT_LIST_DIR}/vl53l1x.cpp
)

target_include_directories(vl53l1x INTERFACE ${CMAKE_CURRENT_LIST_DIR})

# Pull in pico libraries that we need
target_link_libraries(vl53l1x INTERFACE pico_stdlib hardware_i2c)
42 changes: 42 additions & 0 deletions drivers/vl53l1x/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
Most of the functionality of this library is based on the VL53L1X API provided
provided by ST (STSW-IMG007), and some of the explanatory comments are quoted
or paraphrased from the API source code, API user manual (UM2356), and VL53L1X
datasheet. Therefore, the license terms for the API source code (BSD 3-clause
"New" or "Revised" License) also apply to this derivative work, as specified
below.

For more information, see

https://www.pololu.com/
https://forum.pololu.com/

--------------------------------------------------------------------------------

Copyright (c) 2017, STMicroelectronics
Copyright (c) 2018-2020, Pololu Corporation
All Rights Reserved

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10 changes: 10 additions & 0 deletions drivers/vl53l1x/vl53l1x.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
add_library(vl53l1x INTERFACE)

target_sources(vl53l1x INTERFACE
${CMAKE_CURRENT_LIST_DIR}/vl53l1x.cpp
)

target_include_directories(vl53l1x INTERFACE ${CMAKE_CURRENT_LIST_DIR})

# Pull in pico libraries that we need
target_link_libraries(vl53l1x INTERFACE pico_stdlib hardware_i2c)
Loading

0 comments on commit 292e2b5

Please sign in to comment.