The VL53L1CB proximity sensor, based on ST’s FlightSense™, Time-of-Flight technology.
Dependencies: X_NUCLEO_COMMON ST_INTERFACES
Dependents: VL53L1CB_noshield_1sensor_polls_auton VL53L1CB_noshield_1sensor_interrupt_auton X_NUCLEO_53L1A2
Based on VL53L1 library, this is a library for the VL53L1CB ToF chip.
inc/vl53l1_platform_user_defines.h@0:3ac96e360672, 2020-11-06 (annotated)
- Committer:
- charlesmn
- Date:
- Fri Nov 06 10:06:37 2020 +0000
- Revision:
- 0:3ac96e360672
- Child:
- 18:0696efe39d08
Library for ST Vl53L1A1 time of flight sensor.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
charlesmn | 0:3ac96e360672 | 1 | |
charlesmn | 0:3ac96e360672 | 2 | /******************************************************************************* |
charlesmn | 0:3ac96e360672 | 3 | This file is part of VL53L1 Platform |
charlesmn | 0:3ac96e360672 | 4 | |
charlesmn | 0:3ac96e360672 | 5 | Copyright (c) 2020, STMicroelectronics - All Rights Reserved |
charlesmn | 0:3ac96e360672 | 6 | |
charlesmn | 0:3ac96e360672 | 7 | License terms: BSD 3-clause "New" or "Revised" License. |
charlesmn | 0:3ac96e360672 | 8 | |
charlesmn | 0:3ac96e360672 | 9 | Redistribution and use in source and binary forms, with or without |
charlesmn | 0:3ac96e360672 | 10 | modification, are permitted provided that the following conditions are met: |
charlesmn | 0:3ac96e360672 | 11 | |
charlesmn | 0:3ac96e360672 | 12 | 1. Redistributions of source code must retain the above copyright notice, this |
charlesmn | 0:3ac96e360672 | 13 | list of conditions and the following disclaimer. |
charlesmn | 0:3ac96e360672 | 14 | |
charlesmn | 0:3ac96e360672 | 15 | 2. Redistributions in binary form must reproduce the above copyright notice, |
charlesmn | 0:3ac96e360672 | 16 | this list of conditions and the following disclaimer in the documentation |
charlesmn | 0:3ac96e360672 | 17 | and/or other materials provided with the distribution. |
charlesmn | 0:3ac96e360672 | 18 | |
charlesmn | 0:3ac96e360672 | 19 | 3. Neither the name of the copyright holder nor the names of its contributors |
charlesmn | 0:3ac96e360672 | 20 | may be used to endorse or promote products derived from this software |
charlesmn | 0:3ac96e360672 | 21 | without specific prior written permission. |
charlesmn | 0:3ac96e360672 | 22 | |
charlesmn | 0:3ac96e360672 | 23 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
charlesmn | 0:3ac96e360672 | 24 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
charlesmn | 0:3ac96e360672 | 25 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
charlesmn | 0:3ac96e360672 | 26 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
charlesmn | 0:3ac96e360672 | 27 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
charlesmn | 0:3ac96e360672 | 28 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
charlesmn | 0:3ac96e360672 | 29 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
charlesmn | 0:3ac96e360672 | 30 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
charlesmn | 0:3ac96e360672 | 31 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
charlesmn | 0:3ac96e360672 | 32 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
charlesmn | 0:3ac96e360672 | 33 | |
charlesmn | 0:3ac96e360672 | 34 | */ |
charlesmn | 0:3ac96e360672 | 35 | |
charlesmn | 0:3ac96e360672 | 36 | |
charlesmn | 0:3ac96e360672 | 37 | |
charlesmn | 0:3ac96e360672 | 38 | #ifndef _VL53L1_PLATFORM_USER_DEFINES_H_ |
charlesmn | 0:3ac96e360672 | 39 | #define _VL53L1_PLATFORM_USER_DEFINES_H_ |
charlesmn | 0:3ac96e360672 | 40 | |
charlesmn | 0:3ac96e360672 | 41 | #ifdef __cplusplus |
charlesmn | 0:3ac96e360672 | 42 | extern "C" |
charlesmn | 0:3ac96e360672 | 43 | { |
charlesmn | 0:3ac96e360672 | 44 | #endif |
charlesmn | 0:3ac96e360672 | 45 | |
charlesmn | 0:3ac96e360672 | 46 | |
charlesmn | 0:3ac96e360672 | 47 | |
charlesmn | 0:3ac96e360672 | 48 | |
charlesmn | 0:3ac96e360672 | 49 | |
charlesmn | 0:3ac96e360672 | 50 | #define do_division_u(dividend, divisor) (dividend / divisor) |
charlesmn | 0:3ac96e360672 | 51 | |
charlesmn | 0:3ac96e360672 | 52 | |
charlesmn | 0:3ac96e360672 | 53 | |
charlesmn | 0:3ac96e360672 | 54 | #define do_division_s(dividend, divisor) (dividend / divisor) |
charlesmn | 0:3ac96e360672 | 55 | |
charlesmn | 0:3ac96e360672 | 56 | |
charlesmn | 0:3ac96e360672 | 57 | |
charlesmn | 0:3ac96e360672 | 58 | #define WARN_OVERRIDE_STATUS(__X__)\ |
charlesmn | 0:3ac96e360672 | 59 | trace_print (VL53L1_TRACE_LEVEL_WARNING, #__X__); |
charlesmn | 0:3ac96e360672 | 60 | |
charlesmn | 0:3ac96e360672 | 61 | |
charlesmn | 0:3ac96e360672 | 62 | #ifdef _MSC_VER |
charlesmn | 0:3ac96e360672 | 63 | #define DISABLE_WARNINGS() { \ |
charlesmn | 0:3ac96e360672 | 64 | __pragma (warning (push)); \ |
charlesmn | 0:3ac96e360672 | 65 | __pragma (warning (disable:4127)); \ |
charlesmn | 0:3ac96e360672 | 66 | } |
charlesmn | 0:3ac96e360672 | 67 | #define ENABLE_WARNINGS() { \ |
charlesmn | 0:3ac96e360672 | 68 | __pragma (warning (pop)); \ |
charlesmn | 0:3ac96e360672 | 69 | } |
charlesmn | 0:3ac96e360672 | 70 | #else |
charlesmn | 0:3ac96e360672 | 71 | #define DISABLE_WARNINGS() |
charlesmn | 0:3ac96e360672 | 72 | #define ENABLE_WARNINGS() |
charlesmn | 0:3ac96e360672 | 73 | #endif |
charlesmn | 0:3ac96e360672 | 74 | |
charlesmn | 0:3ac96e360672 | 75 | |
charlesmn | 0:3ac96e360672 | 76 | #ifdef __cplusplus |
charlesmn | 0:3ac96e360672 | 77 | } |
charlesmn | 0:3ac96e360672 | 78 | #endif |
charlesmn | 0:3ac96e360672 | 79 | |
charlesmn | 0:3ac96e360672 | 80 | #endif |
charlesmn | 0:3ac96e360672 | 81 | |
charlesmn | 0:3ac96e360672 | 82 | |
charlesmn | 0:3ac96e360672 | 83 |