amiro-lld / drivers / VL53L1X / v1 / api / platform / vl53l1_platform_user_config.h @ 4dba9195
History | View | Annotate | Download (4.603 KB)
| 1 | 4dba9195 | galberding | /*
|
|---|---|---|---|
| 2 | * Copyright (c) 2017, STMicroelectronics - All Rights Reserved
|
||
| 3 | *
|
||
| 4 | * This file is part of VL53L1 Core and is dual licensed,
|
||
| 5 | * either 'STMicroelectronics
|
||
| 6 | * Proprietary license'
|
||
| 7 | * or 'BSD 3-clause "New" or "Revised" License' , at your option.
|
||
| 8 | *
|
||
| 9 | ********************************************************************************
|
||
| 10 | *
|
||
| 11 | * 'STMicroelectronics Proprietary license'
|
||
| 12 | *
|
||
| 13 | ********************************************************************************
|
||
| 14 | *
|
||
| 15 | * License terms: STMicroelectronics Proprietary in accordance with licensing
|
||
| 16 | * terms at www.st.com/sla0081
|
||
| 17 | *
|
||
| 18 | * STMicroelectronics confidential
|
||
| 19 | * Reproduction and Communication of this document is strictly prohibited unless
|
||
| 20 | * specifically authorized in writing by STMicroelectronics.
|
||
| 21 | *
|
||
| 22 | *
|
||
| 23 | ********************************************************************************
|
||
| 24 | *
|
||
| 25 | * Alternatively, VL53L1 Core may be distributed under the terms of
|
||
| 26 | * 'BSD 3-clause "New" or "Revised" License', in which case the following
|
||
| 27 | * provisions apply instead of the ones mentioned above :
|
||
| 28 | *
|
||
| 29 | ********************************************************************************
|
||
| 30 | *
|
||
| 31 | * License terms: BSD 3-clause "New" or "Revised" License.
|
||
| 32 | *
|
||
| 33 | * Redistribution and use in source and binary forms, with or without
|
||
| 34 | * modification, are permitted provided that the following conditions are met:
|
||
| 35 | *
|
||
| 36 | * 1. Redistributions of source code must retain the above copyright notice, this
|
||
| 37 | * list of conditions and the following disclaimer.
|
||
| 38 | *
|
||
| 39 | * 2. Redistributions in binary form must reproduce the above copyright notice,
|
||
| 40 | * this list of conditions and the following disclaimer in the documentation
|
||
| 41 | * and/or other materials provided with the distribution.
|
||
| 42 | *
|
||
| 43 | * 3. Neither the name of the copyright holder nor the names of its contributors
|
||
| 44 | * may be used to endorse or promote products derived from this software
|
||
| 45 | * without specific prior written permission.
|
||
| 46 | *
|
||
| 47 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||
| 48 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||
| 49 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||
| 50 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||
| 51 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||
| 52 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||
| 53 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||
| 54 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||
| 55 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||
| 56 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||
| 57 | *
|
||
| 58 | *
|
||
| 59 | ********************************************************************************
|
||
| 60 | *
|
||
| 61 | */
|
||
| 62 | |||
| 63 | /**
|
||
| 64 | * @file vl53l1_platform_user_config.h
|
||
| 65 | *
|
||
| 66 | * @brief EwokPlus compile time user modifiable configuration
|
||
| 67 | */
|
||
| 68 | |||
| 69 | |||
| 70 | #ifndef _VL53L1_PLATFORM_USER_CONFIG_H_
|
||
| 71 | #define _VL53L1_PLATFORM_USER_CONFIG_H_
|
||
| 72 | |||
| 73 | #define VL53L1_BYTES_PER_WORD 2 |
||
| 74 | #define VL53L1_BYTES_PER_DWORD 4 |
||
| 75 | |||
| 76 | /* Define polling delays */
|
||
| 77 | #define VL53L1_BOOT_COMPLETION_POLLING_TIMEOUT_MS 500 |
||
| 78 | #define VL53L1_RANGE_COMPLETION_POLLING_TIMEOUT_MS 2000 |
||
| 79 | #define VL53L1_TEST_COMPLETION_POLLING_TIMEOUT_MS 60000 |
||
| 80 | |||
| 81 | #define VL53L1_POLLING_DELAY_MS 1 |
||
| 82 | |||
| 83 | /* Define LLD TuningParms Page Base Address
|
||
| 84 | * - Part of Patch_AddedTuningParms_11761
|
||
| 85 | */
|
||
| 86 | #define VL53L1_TUNINGPARM_PUBLIC_PAGE_BASE_ADDRESS 0x8000 |
||
| 87 | #define VL53L1_TUNINGPARM_PRIVATE_PAGE_BASE_ADDRESS 0xC000 |
||
| 88 | |||
| 89 | #define VL53L1_GAIN_FACTOR__STANDARD_DEFAULT 0x0800 |
||
| 90 | /*!< Default standard ranging gain correction factor
|
||
| 91 | 1.11 format. 1.0 = 0x0800, 0.980 = 0x07D7 */
|
||
| 92 | |||
| 93 | #define VL53L1_OFFSET_CAL_MIN_EFFECTIVE_SPADS 0x0500 |
||
| 94 | /*!< Lower Limit for the MM1 effective SPAD count during offset
|
||
| 95 | calibration Format 8.8 0x0500 -> 5.0 effective SPADs */
|
||
| 96 | |||
| 97 | #define VL53L1_OFFSET_CAL_MAX_PRE_PEAK_RATE_MCPS 0x1900 |
||
| 98 | /*!< Max Limit for the pre range peak rate during offset
|
||
| 99 | calibration Format 9.7 0x1900 -> 50.0 Mcps.
|
||
| 100 | If larger then in pile up */
|
||
| 101 | |||
| 102 | #define VL53L1_OFFSET_CAL_MAX_SIGMA_MM 0x0040 |
||
| 103 | /*!< Max sigma estimate limit during offset calibration
|
||
| 104 | Check applies to pre-range, mm1 and mm2 ranges
|
||
| 105 | Format 14.2 0x0040 -> 16.0mm. */
|
||
| 106 | |||
| 107 | #define VL53L1_MAX_USER_ZONES 169 |
||
| 108 | /*!< Max number of user Zones - maximal limitation from
|
||
| 109 | FW stream divide - value of 254 */
|
||
| 110 | |||
| 111 | #define VL53L1_MAX_RANGE_RESULTS 2 |
||
| 112 | /*!< Allocates storage for return and reference restults */
|
||
| 113 | |||
| 114 | |||
| 115 | #define VL53L1_MAX_STRING_LENGTH 512 |
||
| 116 | |||
| 117 | #endif /* _VL53L1_PLATFORM_USER_CONFIG_H_ */ |
||
| 118 |