Contains Ayoub's Ranging and Custom interfaces for the VL53L3CX

Committer:
charlesmn
Date:
Wed Jul 21 14:47:53 2021 +0000
Revision:
1:dae4cb24beec
Parent:
0:c1910e04fc6c
strip out commented out code

Who changed what in which revision?

UserRevisionLine numberNew contents of line
charlesmn 0:c1910e04fc6c 1 /*******************************************************************************
charlesmn 0:c1910e04fc6c 2 Copyright © 2018, STMicroelectronics International N.V.
charlesmn 0:c1910e04fc6c 3 All rights reserved.
charlesmn 0:c1910e04fc6c 4 Redistribution and use in source and binary forms, with or without
charlesmn 0:c1910e04fc6c 5 modification, are permitted provided that the following conditions are met:
charlesmn 0:c1910e04fc6c 6 * Redistributions of source code must retain the above copyright
charlesmn 0:c1910e04fc6c 7 notice, this list of conditions and the following disclaimer.
charlesmn 0:c1910e04fc6c 8 * Redistributions in binary form must reproduce the above copyright
charlesmn 0:c1910e04fc6c 9 notice, this list of conditions and the following disclaimer in the
charlesmn 0:c1910e04fc6c 10 documentation and/or other materials provided with the distribution.
charlesmn 0:c1910e04fc6c 11 * Neither the name of STMicroelectronics nor the
charlesmn 0:c1910e04fc6c 12 names of its contributors may be used to endorse or promote products
charlesmn 0:c1910e04fc6c 13 derived from this software without specific prior written permission.
charlesmn 0:c1910e04fc6c 14 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
charlesmn 0:c1910e04fc6c 15 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
charlesmn 0:c1910e04fc6c 16 WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
charlesmn 0:c1910e04fc6c 17 NON-INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS ARE DISCLAIMED.
charlesmn 0:c1910e04fc6c 18 IN NO EVENT SHALL STMICROELECTRONICS INTERNATIONAL N.V. BE LIABLE FOR ANY
charlesmn 0:c1910e04fc6c 19 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
charlesmn 0:c1910e04fc6c 20 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
charlesmn 0:c1910e04fc6c 21 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
charlesmn 0:c1910e04fc6c 22 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
charlesmn 0:c1910e04fc6c 23 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
charlesmn 0:c1910e04fc6c 24 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
charlesmn 0:c1910e04fc6c 25 *****************************************************************************/
charlesmn 0:c1910e04fc6c 26
charlesmn 0:c1910e04fc6c 27 #ifndef __VL53LX_CLASS_H
charlesmn 0:c1910e04fc6c 28 #define __VL53LX_CLASS_H
charlesmn 0:c1910e04fc6c 29
charlesmn 0:c1910e04fc6c 30 #ifdef _MSC_VER
charlesmn 0:c1910e04fc6c 31 #ifdef VL53LX_API_EXPORTS
charlesmn 0:c1910e04fc6c 32 #define VL53LX_API __declspec(dllexport)
charlesmn 0:c1910e04fc6c 33 #else
charlesmn 0:c1910e04fc6c 34 #define VL53LX_API
charlesmn 0:c1910e04fc6c 35 #endif
charlesmn 0:c1910e04fc6c 36 #else
charlesmn 0:c1910e04fc6c 37 #define VL53LX_API
charlesmn 0:c1910e04fc6c 38 #endif
charlesmn 0:c1910e04fc6c 39
charlesmn 0:c1910e04fc6c 40 /* Includes ------------------------------------------------------------------*/
charlesmn 0:c1910e04fc6c 41
charlesmn 0:c1910e04fc6c 42 #include "mbed.h"
charlesmn 0:c1910e04fc6c 43 #include "RangeSensor.h"
charlesmn 0:c1910e04fc6c 44 #include "vl53lx_def.h"
charlesmn 0:c1910e04fc6c 45 #include "vl53L3_I2c.h"
charlesmn 0:c1910e04fc6c 46
charlesmn 0:c1910e04fc6c 47
charlesmn 0:c1910e04fc6c 48
charlesmn 0:c1910e04fc6c 49 #include "PinNames.h"
charlesmn 0:c1910e04fc6c 50 #include "vl53lx_error_codes.h"
charlesmn 0:c1910e04fc6c 51 #include "vl53lx_platform_user_data.h"
charlesmn 0:c1910e04fc6c 52
charlesmn 0:c1910e04fc6c 53 #include "vl53lx_nvm_structs.h"//cgm
charlesmn 0:c1910e04fc6c 54 #include "vl53lx_xtalk_private_structs.h"
charlesmn 0:c1910e04fc6c 55 #include "vl53lx_hist_private_structs.h"
charlesmn 0:c1910e04fc6c 56 #include "vl53lx_dmax_private_structs.h"
charlesmn 0:c1910e04fc6c 57 #include "vl53lx_api.h"
charlesmn 0:c1910e04fc6c 58
charlesmn 0:c1910e04fc6c 59 #include "Stmpe1600.h"
charlesmn 0:c1910e04fc6c 60 /**********************************************************/
charlesmn 0:c1910e04fc6c 61 #if (MBED_VERSION > 60300)
charlesmn 0:c1910e04fc6c 62 extern "C" void wait_ms(int ms);
charlesmn 0:c1910e04fc6c 63 #endif
charlesmn 0:c1910e04fc6c 64
charlesmn 0:c1910e04fc6c 65
charlesmn 0:c1910e04fc6c 66 #define VL53LX_DEFAULT_DEVICE_ADDRESS 0x52
charlesmn 0:c1910e04fc6c 67
charlesmn 0:c1910e04fc6c 68
charlesmn 0:c1910e04fc6c 69
charlesmn 0:c1910e04fc6c 70 #define VL53LX_MAX_I2C_XFER_SIZE 256
charlesmn 0:c1910e04fc6c 71 #define CONT_CONTINUE 0
charlesmn 0:c1910e04fc6c 72 #define CONT_NEXT_LOOP 1
charlesmn 0:c1910e04fc6c 73 #define CONT_RESET 2
charlesmn 0:c1910e04fc6c 74
charlesmn 0:c1910e04fc6c 75
charlesmn 0:c1910e04fc6c 76 /* vl53lx_api.c */
charlesmn 0:c1910e04fc6c 77
charlesmn 0:c1910e04fc6c 78 #ifndef MIN
charlesmn 0:c1910e04fc6c 79 #define MIN(v1, v2) ((v1) < (v2) ? (v1) : (v2))
charlesmn 0:c1910e04fc6c 80 #endif
charlesmn 0:c1910e04fc6c 81 #ifndef MAX
charlesmn 0:c1910e04fc6c 82 #define MAX(v1, v2) ((v1) < (v2) ? (v2) : (v1))
charlesmn 0:c1910e04fc6c 83 #endif
charlesmn 0:c1910e04fc6c 84
charlesmn 0:c1910e04fc6c 85 #define DMAX_REFLECTANCE_IDX 2
charlesmn 0:c1910e04fc6c 86
charlesmn 0:c1910e04fc6c 87
charlesmn 0:c1910e04fc6c 88
charlesmn 0:c1910e04fc6c 89 #define LOWPOWER_AUTO_VHV_LOOP_DURATION_US 245
charlesmn 0:c1910e04fc6c 90 #define LOWPOWER_AUTO_OVERHEAD_BEFORE_A_RANGING 1448
charlesmn 0:c1910e04fc6c 91 #define LOWPOWER_AUTO_OVERHEAD_BETWEEN_A_B_RANGING 2100
charlesmn 0:c1910e04fc6c 92
charlesmn 0:c1910e04fc6c 93 #define FDA_MAX_TIMING_BUDGET_US 550000
charlesmn 0:c1910e04fc6c 94
charlesmn 0:c1910e04fc6c 95
charlesmn 0:c1910e04fc6c 96 #define VL53LX_NVM_POWER_UP_DELAY_US 50
charlesmn 0:c1910e04fc6c 97 #define VL53LX_NVM_READ_TRIGGER_DELAY_US 5
charlesmn 0:c1910e04fc6c 98
charlesmn 0:c1910e04fc6c 99
charlesmn 0:c1910e04fc6c 100 #define VL53LX_D_002 0xFFFF
charlesmn 0:c1910e04fc6c 101 #define VL53LX_D_008 0xFFFF
charlesmn 0:c1910e04fc6c 102 #define VL53LX_D_003 0xFFFFFF
charlesmn 0:c1910e04fc6c 103 #define VL53LX_D_007 0xFFFFFFFF
charlesmn 0:c1910e04fc6c 104 #define VL53LX_D_005 0x7FFFFFFFFF
charlesmn 0:c1910e04fc6c 105 #define VL53LX_D_009 0xFFFFFFFFFF
charlesmn 0:c1910e04fc6c 106 #define VL53LX_D_010 0xFFFFFFFFFFFF
charlesmn 0:c1910e04fc6c 107 #define VL53LX_D_004 0xFFFFFFFFFFFFFF
charlesmn 0:c1910e04fc6c 108 #define VL53LX_D_006 0x7FFFFFFFFFFFFFFF
charlesmn 0:c1910e04fc6c 109 #define VL53LX_D_011 0xFFFFFFFFFFFFFFFF
charlesmn 0:c1910e04fc6c 110
charlesmn 0:c1910e04fc6c 111 #define VL53L1X_DEFAULT_DEVICE_ADDRESS 0x52
charlesmn 0:c1910e04fc6c 112 #define HIGH 1
charlesmn 0:c1910e04fc6c 113
charlesmn 0:c1910e04fc6c 114
charlesmn 0:c1910e04fc6c 115 /* Classes -------------------------------------------------------------------*/
charlesmn 0:c1910e04fc6c 116 /** Class representing a VL53L3CX sensor component
charlesmn 0:c1910e04fc6c 117 */
charlesmn 0:c1910e04fc6c 118
charlesmn 0:c1910e04fc6c 119 class VL53L3CX : public RangeSensor {
charlesmn 0:c1910e04fc6c 120 public:
charlesmn 0:c1910e04fc6c 121 /** Constructor
charlesmn 0:c1910e04fc6c 122 * @param[in] &i2c device I2C to be used for communication
charlesmn 0:c1910e04fc6c 123 * @param[in] &pin_gpio1 pin Mbed InterruptIn PinName to be used as component GPIO_1 INT
charlesmn 0:c1910e04fc6c 124 * @param[in] DevAddr device address, 0x52 by default
charlesmn 0:c1910e04fc6c 125 */
charlesmn 0:c1910e04fc6c 126
charlesmn 0:c1910e04fc6c 127 VL53L3CX(vl53L3_DevI2C *i2c, Stmpe1600DigiOut *pin, PinName pin_gpio1, uint8_t dev_addr = VL53LX_DEFAULT_DEVICE_ADDRESS)
charlesmn 0:c1910e04fc6c 128 : RangeSensor(), dev_i2c(i2c), _expgpio0(pin)
charlesmn 0:c1910e04fc6c 129 {
charlesmn 0:c1910e04fc6c 130
charlesmn 0:c1910e04fc6c 131 Dev = new VL53L3CX_Object_t;
charlesmn 0:c1910e04fc6c 132 I2cDevAddr = dev_addr;
charlesmn 0:c1910e04fc6c 133 Dev->IO.Address = VL53LX_DEFAULT_DEVICE_ADDRESS;
charlesmn 0:c1910e04fc6c 134
charlesmn 0:c1910e04fc6c 135 _gpio0 = NULL;
charlesmn 0:c1910e04fc6c 136 if (pin_gpio1 != NC) {
charlesmn 0:c1910e04fc6c 137 _gpio1Int = new InterruptIn(pin_gpio1);
charlesmn 0:c1910e04fc6c 138 } else {
charlesmn 0:c1910e04fc6c 139 _gpio1Int = NULL;
charlesmn 0:c1910e04fc6c 140 }
charlesmn 0:c1910e04fc6c 141
charlesmn 0:c1910e04fc6c 142 i2c_inst = i2c;
charlesmn 0:c1910e04fc6c 143
charlesmn 0:c1910e04fc6c 144 }
charlesmn 0:c1910e04fc6c 145
charlesmn 0:c1910e04fc6c 146
charlesmn 0:c1910e04fc6c 147 /** Destructor
charlesmn 0:c1910e04fc6c 148 */
charlesmn 0:c1910e04fc6c 149 virtual ~VL53L3CX() {}
charlesmn 0:c1910e04fc6c 150 /* warning: VL53LX class inherits from GenericSensor, RangeSensor and LightSensor, that haven`t a destructor.
charlesmn 0:c1910e04fc6c 151 The warning should request to introduce a virtual destructor to make sure to delete the object */
charlesmn 0:c1910e04fc6c 152
charlesmn 0:c1910e04fc6c 153 /*** Interface Methods ***/
charlesmn 0:c1910e04fc6c 154 /*** High level API ***/
charlesmn 0:c1910e04fc6c 155 /**
charlesmn 0:c1910e04fc6c 156 * @brief PowerOn the sensor
charlesmn 0:c1910e04fc6c 157 * @return void
charlesmn 0:c1910e04fc6c 158 */
charlesmn 0:c1910e04fc6c 159
charlesmn 0:c1910e04fc6c 160
charlesmn 0:c1910e04fc6c 161 /* turns on the sensor */
charlesmn 0:c1910e04fc6c 162 virtual void VL53LX_On(void)
charlesmn 0:c1910e04fc6c 163 {
charlesmn 0:c1910e04fc6c 164 printf("VL53L1_On\r\n");
charlesmn 0:c1910e04fc6c 165 if (_gpio0) {
charlesmn 0:c1910e04fc6c 166 *_gpio0 = 1;
charlesmn 0:c1910e04fc6c 167 } else {
charlesmn 0:c1910e04fc6c 168 if (_expgpio0) {
charlesmn 0:c1910e04fc6c 169 *_expgpio0 = 1;
charlesmn 0:c1910e04fc6c 170 }
charlesmn 0:c1910e04fc6c 171 }
charlesmn 0:c1910e04fc6c 172 wait_ms(100);
charlesmn 0:c1910e04fc6c 173 }
charlesmn 0:c1910e04fc6c 174
charlesmn 0:c1910e04fc6c 175 /**
charlesmn 0:c1910e04fc6c 176 * @brief PowerOff the sensor
charlesmn 0:c1910e04fc6c 177 * @return void
charlesmn 0:c1910e04fc6c 178 */
charlesmn 0:c1910e04fc6c 179 /* turns off the sensor */
charlesmn 0:c1910e04fc6c 180 virtual void VL53LX_Off(void)
charlesmn 0:c1910e04fc6c 181 {
charlesmn 0:c1910e04fc6c 182 printf("VL53L1_Off\r\n");
charlesmn 0:c1910e04fc6c 183 if (_gpio0) {
charlesmn 0:c1910e04fc6c 184 *_gpio0 = 0;
charlesmn 0:c1910e04fc6c 185 } else {
charlesmn 0:c1910e04fc6c 186 if (_expgpio0) {
charlesmn 0:c1910e04fc6c 187 *_expgpio0 = 0;
charlesmn 0:c1910e04fc6c 188 }
charlesmn 0:c1910e04fc6c 189 }
charlesmn 0:c1910e04fc6c 190 wait_ms(100);
charlesmn 0:c1910e04fc6c 191 }
charlesmn 0:c1910e04fc6c 192
charlesmn 0:c1910e04fc6c 193
charlesmn 0:c1910e04fc6c 194
charlesmn 0:c1910e04fc6c 195 /**
charlesmn 0:c1910e04fc6c 196 * @brief Initialize the sensor with default values
charlesmn 0:c1910e04fc6c 197 * @return 0 on Success
charlesmn 0:c1910e04fc6c 198 */
charlesmn 0:c1910e04fc6c 199
charlesmn 0:c1910e04fc6c 200 VL53LX_Error InitSensor(uint8_t address)
charlesmn 0:c1910e04fc6c 201 {
charlesmn 0:c1910e04fc6c 202
charlesmn 0:c1910e04fc6c 203 VL53LX_Error status = VL53LX_ERROR_NONE;
charlesmn 0:c1910e04fc6c 204 VL53LX_Off();
charlesmn 0:c1910e04fc6c 205 VL53LX_On();
charlesmn 0:c1910e04fc6c 206 Dev->IO.Address = VL53LX_DEFAULT_DEVICE_ADDRESS;
charlesmn 0:c1910e04fc6c 207
charlesmn 0:c1910e04fc6c 208 status = VL53L3CX_SetDeviceAddress(address);
charlesmn 0:c1910e04fc6c 209
charlesmn 0:c1910e04fc6c 210 wait_ms(100);
charlesmn 0:c1910e04fc6c 211
charlesmn 0:c1910e04fc6c 212 if (status == VL53LX_ERROR_NONE) {
charlesmn 0:c1910e04fc6c 213 status = VL53L3CX_WaitDeviceBooted();
charlesmn 0:c1910e04fc6c 214 printf("VL53L3CX_WaitDeviceBooted %d \n",status);
charlesmn 0:c1910e04fc6c 215 }
charlesmn 0:c1910e04fc6c 216
charlesmn 0:c1910e04fc6c 217 if (status == VL53LX_ERROR_NONE) {
charlesmn 0:c1910e04fc6c 218 status = VL53L3CX_DataInit();
charlesmn 0:c1910e04fc6c 219 printf("VL53L3CX_DataInit %d %d\n",status,Dev->IO.Address );
charlesmn 0:c1910e04fc6c 220 }
charlesmn 0:c1910e04fc6c 221
charlesmn 0:c1910e04fc6c 222
charlesmn 0:c1910e04fc6c 223 return status;
charlesmn 0:c1910e04fc6c 224 }
charlesmn 0:c1910e04fc6c 225
charlesmn 0:c1910e04fc6c 226
charlesmn 0:c1910e04fc6c 227
charlesmn 0:c1910e04fc6c 228 /**
charlesmn 0:c1910e04fc6c 229 *
charlesmn 0:c1910e04fc6c 230 * @brief One time device initialization
charlesmn 0:c1910e04fc6c 231 * @param void
charlesmn 0:c1910e04fc6c 232 * @return 0 on success
charlesmn 0:c1910e04fc6c 233 */
charlesmn 0:c1910e04fc6c 234 virtual int Init()
charlesmn 0:c1910e04fc6c 235 {
charlesmn 0:c1910e04fc6c 236 return VL53L3CX_DataInit();
charlesmn 0:c1910e04fc6c 237 }
charlesmn 0:c1910e04fc6c 238
charlesmn 0:c1910e04fc6c 239 int init(void *init)
charlesmn 0:c1910e04fc6c 240 {
charlesmn 0:c1910e04fc6c 241 return VL53L3CX_DataInit();
charlesmn 0:c1910e04fc6c 242 }
charlesmn 0:c1910e04fc6c 243
charlesmn 0:c1910e04fc6c 244 /* Read function of the ID device */
charlesmn 0:c1910e04fc6c 245 virtual int ReadID()
charlesmn 0:c1910e04fc6c 246 {
charlesmn 0:c1910e04fc6c 247 uint64_t Uid;
charlesmn 0:c1910e04fc6c 248 VL53L3CX_GetUID(&Uid);
charlesmn 0:c1910e04fc6c 249 if (Uid == 0x00FF000000FF) {
charlesmn 0:c1910e04fc6c 250 return 0;
charlesmn 0:c1910e04fc6c 251 }
charlesmn 0:c1910e04fc6c 252 return -1;
charlesmn 0:c1910e04fc6c 253 }
charlesmn 0:c1910e04fc6c 254
charlesmn 0:c1910e04fc6c 255
charlesmn 0:c1910e04fc6c 256
charlesmn 0:c1910e04fc6c 257 /**
charlesmn 0:c1910e04fc6c 258 * @brief Get ranging result and only that
charlesmn 0:c1910e04fc6c 259 * @param pRange_mm Pointer to range distance
charlesmn 0:c1910e04fc6c 260 * @return 0 on success
charlesmn 0:c1910e04fc6c 261 */
charlesmn 0:c1910e04fc6c 262 virtual int GetDistance(uint32_t *piData)
charlesmn 0:c1910e04fc6c 263 {
charlesmn 0:c1910e04fc6c 264 (void)piData;
charlesmn 0:c1910e04fc6c 265 return 0;
charlesmn 0:c1910e04fc6c 266 }
charlesmn 0:c1910e04fc6c 267
charlesmn 0:c1910e04fc6c 268
charlesmn 0:c1910e04fc6c 269 /* vl53lx_api.h */
charlesmn 0:c1910e04fc6c 270
charlesmn 0:c1910e04fc6c 271 /** @defgroup VL53LX_group VL53LX Function Definition
charlesmn 0:c1910e04fc6c 272 * @brief VL53LX Function Definition
charlesmn 0:c1910e04fc6c 273 * @{
charlesmn 0:c1910e04fc6c 274 */
charlesmn 0:c1910e04fc6c 275
charlesmn 0:c1910e04fc6c 276 /** @defgroup VL53LX_general_group VL53LX General Functions
charlesmn 0:c1910e04fc6c 277 * @brief General functions and definitions
charlesmn 0:c1910e04fc6c 278 * @{
charlesmn 0:c1910e04fc6c 279 */
charlesmn 0:c1910e04fc6c 280
charlesmn 0:c1910e04fc6c 281 /**
charlesmn 0:c1910e04fc6c 282 * @brief Return the VL53L3CX driver Version
charlesmn 0:c1910e04fc6c 283 *
charlesmn 0:c1910e04fc6c 284 * @note This function doesn't access to the device
charlesmn 0:c1910e04fc6c 285 *
charlesmn 0:c1910e04fc6c 286 * @param pVersion Rer to current driver Version
charlesmn 0:c1910e04fc6c 287 * @return VL53LX_Error_NONE Success
charlesmn 0:c1910e04fc6c 288 * @return "Other error code" See ::VL53LX_Error
charlesmn 0:c1910e04fc6c 289 */
charlesmn 0:c1910e04fc6c 290 VL53LX_Error VL53L3CX_GetVersion(VL53LX_Version_t *pVersion);
charlesmn 0:c1910e04fc6c 291
charlesmn 0:c1910e04fc6c 292 /**
charlesmn 0:c1910e04fc6c 293 * @brief Reads the Product Revision for a for given Device
charlesmn 0:c1910e04fc6c 294 * This function can be used to distinguish cut1.0 from cut1.1.
charlesmn 0:c1910e04fc6c 295 *
charlesmn 0:c1910e04fc6c 296 * @param Dev Device Handle
charlesmn 0:c1910e04fc6c 297 * @param pProductRevisionMajor Pointer to Product Revision Major
charlesmn 0:c1910e04fc6c 298 * for a given Device
charlesmn 0:c1910e04fc6c 299 * @param pProductRevisionMinor Pointer to Product Revision Minor
charlesmn 0:c1910e04fc6c 300 * for a given Device
charlesmn 0:c1910e04fc6c 301 * @return VL53LX_Error_NONE Success
charlesmn 0:c1910e04fc6c 302 * @return "Other error code" See ::VL53LX_Error
charlesmn 0:c1910e04fc6c 303 */
charlesmn 0:c1910e04fc6c 304 VL53LX_Error VL53L3CX_GetProductRevision(uint8_t *pProductRevisionMajor,
charlesmn 0:c1910e04fc6c 305 uint8_t *pProductRevisionMinor);
charlesmn 0:c1910e04fc6c 306
charlesmn 0:c1910e04fc6c 307 /**
charlesmn 0:c1910e04fc6c 308 * @brief Reads the Device information for given Device
charlesmn 0:c1910e04fc6c 309 *
charlesmn 0:c1910e04fc6c 310 * @note This function Access to the device
charlesmn 0:c1910e04fc6c 311 *
charlesmn 0:c1910e04fc6c 312 * @param Dev Device Handle
charlesmn 0:c1910e04fc6c 313 * @param pVL53LX_DeviceInfo Pointer to current device info for a given
charlesmn 0:c1910e04fc6c 314 * Device
charlesmn 0:c1910e04fc6c 315 * @return VL53LX_Error_NONE Success
charlesmn 0:c1910e04fc6c 316 * @return "Other error code" See ::VL53LX_Error
charlesmn 0:c1910e04fc6c 317 */
charlesmn 0:c1910e04fc6c 318 VL53LX_Error VL53L3CX_GetDeviceInfo(
charlesmn 0:c1910e04fc6c 319 VL53LX_DeviceInfo_t *pVL53LX_DeviceInfo);
charlesmn 0:c1910e04fc6c 320
charlesmn 0:c1910e04fc6c 321 /**
charlesmn 0:c1910e04fc6c 322 * @brief Reads the Device unique identifier
charlesmn 0:c1910e04fc6c 323 *
charlesmn 0:c1910e04fc6c 324 * @note This function Access to the device
charlesmn 0:c1910e04fc6c 325 *
charlesmn 0:c1910e04fc6c 326 * @param Dev Device Handle
charlesmn 0:c1910e04fc6c 327 * @param pUid Pointer to current device unique ID
charlesmn 0:c1910e04fc6c 328 * @return VL53LX_Error_NONE Success
charlesmn 0:c1910e04fc6c 329 * @return "Other error code" See ::VL53LX_Error
charlesmn 0:c1910e04fc6c 330 */
charlesmn 0:c1910e04fc6c 331 VL53LX_Error VL53L3CX_GetUID(uint64_t *pUid);
charlesmn 0:c1910e04fc6c 332
charlesmn 0:c1910e04fc6c 333
charlesmn 0:c1910e04fc6c 334 /** @} VL53LX_general_group */
charlesmn 0:c1910e04fc6c 335
charlesmn 0:c1910e04fc6c 336 /** @defgroup VL53LX_init_group VL53LX Init Functions
charlesmn 0:c1910e04fc6c 337 * @brief VL53LX Init Functions
charlesmn 0:c1910e04fc6c 338 * @{
charlesmn 0:c1910e04fc6c 339 */
charlesmn 0:c1910e04fc6c 340
charlesmn 0:c1910e04fc6c 341 /**
charlesmn 0:c1910e04fc6c 342 * @brief Set new device address
charlesmn 0:c1910e04fc6c 343 *
charlesmn 0:c1910e04fc6c 344 * After completion the device will answer to the new address programmed.
charlesmn 0:c1910e04fc6c 345 * This function should be called when several devices are used in parallel
charlesmn 0:c1910e04fc6c 346 * before start programming the sensor.
charlesmn 0:c1910e04fc6c 347 * When a single device us used, there is no need to call this function.
charlesmn 0:c1910e04fc6c 348 *
charlesmn 0:c1910e04fc6c 349 * When it is requested for multi devices system this function MUST be called
charlesmn 0:c1910e04fc6c 350 * prior to VL53LX_DataInit()
charlesmn 0:c1910e04fc6c 351 *
charlesmn 0:c1910e04fc6c 352 * @note This function Access to the device
charlesmn 0:c1910e04fc6c 353 *
charlesmn 0:c1910e04fc6c 354 * @param Dev Device Handle
charlesmn 0:c1910e04fc6c 355 * @param DeviceAddress The new Device address
charlesmn 0:c1910e04fc6c 356 * @return VL53LX_Error_NONE Success
charlesmn 0:c1910e04fc6c 357 * @return "Other error code" See ::VL53LX_Error
charlesmn 0:c1910e04fc6c 358 */
charlesmn 0:c1910e04fc6c 359 VL53LX_Error VL53L3CX_SetDeviceAddress(uint8_t DeviceAddress);
charlesmn 0:c1910e04fc6c 360
charlesmn 0:c1910e04fc6c 361 /**
charlesmn 0:c1910e04fc6c 362 *
charlesmn 0:c1910e04fc6c 363 * @brief One time device initialization
charlesmn 0:c1910e04fc6c 364 *
charlesmn 0:c1910e04fc6c 365 * To be called after device has been powered on and booted
charlesmn 0:c1910e04fc6c 366 * see @a VL53L3CX_WaitDeviceBooted()
charlesmn 0:c1910e04fc6c 367 *
charlesmn 0:c1910e04fc6c 368 * @par Function Description
charlesmn 0:c1910e04fc6c 369 * When not used after a fresh device "power up", it may return
charlesmn 0:c1910e04fc6c 370 * @a #VL53LX_Error_CALIBRATION_WARNING meaning wrong calibration data
charlesmn 0:c1910e04fc6c 371 * may have been fetched from device that can result in ranging offset error\n
charlesmn 0:c1910e04fc6c 372 * If VL53LX_DataInit is called several times then the application must restore
charlesmn 0:c1910e04fc6c 373 * calibration calling @a VL53LX_SetOffsetCalibrationData()
charlesmn 0:c1910e04fc6c 374 * It implies application has gathered calibration data thanks to
charlesmn 0:c1910e04fc6c 375 * @a VL53LX_GetOffsetCalibrationData() after an initial calibration stage.
charlesmn 0:c1910e04fc6c 376 *
charlesmn 0:c1910e04fc6c 377 * @note This function Access to the device
charlesmn 0:c1910e04fc6c 378 *
charlesmn 0:c1910e04fc6c 379 * @param Dev Device Handle
charlesmn 0:c1910e04fc6c 380 * @return VL53LX_Error_NONE Success
charlesmn 0:c1910e04fc6c 381 * @return "Other error code" See ::VL53LX_Error
charlesmn 0:c1910e04fc6c 382 */
charlesmn 0:c1910e04fc6c 383 VL53LX_Error VL53L3CX_DataInit();
charlesmn 0:c1910e04fc6c 384
charlesmn 0:c1910e04fc6c 385 /**
charlesmn 0:c1910e04fc6c 386 * @brief Wait for device booted after chip enable (hardware standby)
charlesmn 0:c1910e04fc6c 387 *
charlesmn 0:c1910e04fc6c 388 * @param Dev Device Handle
charlesmn 0:c1910e04fc6c 389 * @return VL53LX_Error_NONE Success
charlesmn 0:c1910e04fc6c 390 * @return "Other error code" See ::VL53LX_Error
charlesmn 0:c1910e04fc6c 391 *
charlesmn 0:c1910e04fc6c 392 */
charlesmn 0:c1910e04fc6c 393 VL53LX_Error VL53L3CX_WaitDeviceBooted();
charlesmn 0:c1910e04fc6c 394
charlesmn 0:c1910e04fc6c 395
charlesmn 0:c1910e04fc6c 396 /** @} VL53LX_init_group */
charlesmn 0:c1910e04fc6c 397
charlesmn 0:c1910e04fc6c 398 /** @defgroup VL53LX_parameters_group VL53LX Parameters Functions
charlesmn 0:c1910e04fc6c 399 * @brief Functions used to prepare and setup the device
charlesmn 0:c1910e04fc6c 400 * @{
charlesmn 0:c1910e04fc6c 401 */
charlesmn 0:c1910e04fc6c 402
charlesmn 0:c1910e04fc6c 403 /**
charlesmn 0:c1910e04fc6c 404 * @brief Set the distance mode
charlesmn 0:c1910e04fc6c 405 * @par Function Description
charlesmn 0:c1910e04fc6c 406 * Set the distance mode to be used for the next ranging.<br>
charlesmn 0:c1910e04fc6c 407 * The modes Short, Medium and Long are used to optimize the ranging accuracy
charlesmn 0:c1910e04fc6c 408 * in a specific range of distance.<br> The user select one of these modes to
charlesmn 0:c1910e04fc6c 409 * select the distance range.
charlesmn 0:c1910e04fc6c 410 * @note This function doesn't Access to the device
charlesmn 0:c1910e04fc6c 411 *
charlesmn 0:c1910e04fc6c 412 * @warning This function should be called after @a VL53LX_DataInit().
charlesmn 0:c1910e04fc6c 413
charlesmn 0:c1910e04fc6c 414 * @param Dev Device Handle
charlesmn 0:c1910e04fc6c 415 * @param DistanceMode Distance mode to apply, valid values are:
charlesmn 0:c1910e04fc6c 416 * @li VL53LX_DISTANCEMODE_SHORT
charlesmn 0:c1910e04fc6c 417 * @li VL53LX_DISTANCEMODE_MEDIUM
charlesmn 0:c1910e04fc6c 418 * @li VL53LX_DISTANCEMODE_LONG
charlesmn 0:c1910e04fc6c 419 * @return VL53LX_Error_NONE Success
charlesmn 0:c1910e04fc6c 420 * @return VL53LX_Error_MODE_NOT_SUPPORTED This error occurs when DistanceMode
charlesmn 0:c1910e04fc6c 421 * is not in the supported list
charlesmn 0:c1910e04fc6c 422 * @return "Other error code" See ::VL53LX_Error
charlesmn 0:c1910e04fc6c 423 */
charlesmn 0:c1910e04fc6c 424 VL53LX_Error VL53L3CX_SetDistanceMode(
charlesmn 0:c1910e04fc6c 425 VL53LX_DistanceModes DistanceMode);
charlesmn 0:c1910e04fc6c 426
charlesmn 0:c1910e04fc6c 427 /**
charlesmn 0:c1910e04fc6c 428 * @brief Get the distance mode
charlesmn 0:c1910e04fc6c 429 * @par Function Description
charlesmn 0:c1910e04fc6c 430 * Get the distance mode used for the next ranging.
charlesmn 0:c1910e04fc6c 431 *
charlesmn 0:c1910e04fc6c 432 * @param Dev Device Handle
charlesmn 0:c1910e04fc6c 433 * @param *pDistanceMode Pointer to Distance mode
charlesmn 0:c1910e04fc6c 434 * @return VL53LX_Error_NONE Success
charlesmn 0:c1910e04fc6c 435 * @return "Other error code" See ::VL53LX_Error
charlesmn 0:c1910e04fc6c 436 */
charlesmn 0:c1910e04fc6c 437 VL53LX_Error VL53L3CX_GetDistanceMode(
charlesmn 0:c1910e04fc6c 438 VL53LX_DistanceModes *pDistanceMode);
charlesmn 0:c1910e04fc6c 439
charlesmn 0:c1910e04fc6c 440
charlesmn 0:c1910e04fc6c 441 /**
charlesmn 0:c1910e04fc6c 442 * @brief Set Ranging Timing Budget in microseconds
charlesmn 0:c1910e04fc6c 443 *
charlesmn 0:c1910e04fc6c 444 * @par Function Description
charlesmn 0:c1910e04fc6c 445 * Defines the maximum time allowed by the user to the device to run a
charlesmn 0:c1910e04fc6c 446 * full ranging sequence for the current mode (ranging, histogram, ASL ...)
charlesmn 0:c1910e04fc6c 447 *
charlesmn 0:c1910e04fc6c 448 * @param Dev Device Handle
charlesmn 0:c1910e04fc6c 449 * @param MeasurementTimingBudgetMicroSeconds Max measurement time in
charlesmn 0:c1910e04fc6c 450 * microseconds.
charlesmn 0:c1910e04fc6c 451 * @return VL53LX_Error_NONE Success
charlesmn 0:c1910e04fc6c 452 * @return VL53LX_Error_INVALID_PARAMS Error timing parameter not
charlesmn 0:c1910e04fc6c 453 * supported.
charlesmn 0:c1910e04fc6c 454 * The maximum accepted value for the
charlesmn 0:c1910e04fc6c 455 * computed timing budget is 10 seconds
charlesmn 0:c1910e04fc6c 456 * the minimum value depends on the preset
charlesmn 0:c1910e04fc6c 457 * mode selected.
charlesmn 0:c1910e04fc6c 458 * @return "Other error code" See ::VL53LX_Error
charlesmn 0:c1910e04fc6c 459 */
charlesmn 0:c1910e04fc6c 460 VL53LX_Error VL53L3CX_SetMeasurementTimingBudgetMicroSeconds(uint32_t MeasurementTimingBudgetMicroSeconds);
charlesmn 0:c1910e04fc6c 461
charlesmn 0:c1910e04fc6c 462 /**
charlesmn 0:c1910e04fc6c 463 * @brief Get Ranging Timing Budget in microseconds
charlesmn 0:c1910e04fc6c 464 *
charlesmn 0:c1910e04fc6c 465 * @par Function Description
charlesmn 0:c1910e04fc6c 466 * Returns the programmed the maximum time allowed by the user to the
charlesmn 0:c1910e04fc6c 467 * device to run a full ranging sequence for the current mode
charlesmn 0:c1910e04fc6c 468 * (ranging, histogram, ...)
charlesmn 0:c1910e04fc6c 469 *
charlesmn 0:c1910e04fc6c 470 * @param Dev Device Handle
charlesmn 0:c1910e04fc6c 471 * @param pMeasurementTimingBudgetMicroSeconds Max measurement time in
charlesmn 0:c1910e04fc6c 472 * microseconds.
charlesmn 0:c1910e04fc6c 473 * @return VL53LX_Error_NONE Success
charlesmn 0:c1910e04fc6c 474 * @return "Other error code" See ::VL53LX_Error
charlesmn 0:c1910e04fc6c 475 */
charlesmn 0:c1910e04fc6c 476 VL53LX_Error VL53L3CX_GetMeasurementTimingBudgetMicroSeconds(uint32_t *pMeasurementTimingBudgetMicroSeconds);
charlesmn 0:c1910e04fc6c 477 /** @} VL53LX_parameters_group */
charlesmn 0:c1910e04fc6c 478
charlesmn 0:c1910e04fc6c 479
charlesmn 0:c1910e04fc6c 480 /** @defgroup VL53LX_measurement_group VL53LX Measurement Functions
charlesmn 0:c1910e04fc6c 481 * @brief Functions used for the measurements
charlesmn 0:c1910e04fc6c 482 * @{
charlesmn 0:c1910e04fc6c 483 */
charlesmn 0:c1910e04fc6c 484
charlesmn 0:c1910e04fc6c 485 /**
charlesmn 0:c1910e04fc6c 486 * @brief Start device measurement
charlesmn 0:c1910e04fc6c 487 *
charlesmn 0:c1910e04fc6c 488 * @details Started measurement will depend on distance parameter set through
charlesmn 0:c1910e04fc6c 489 * @a VL53L3CX_SetDistanceMode()
charlesmn 0:c1910e04fc6c 490 *
charlesmn 0:c1910e04fc6c 491 * @note This function Access to the device
charlesmn 0:c1910e04fc6c 492 *
charlesmn 0:c1910e04fc6c 493 * @param Dev Device Handle
charlesmn 0:c1910e04fc6c 494 * @return VL53LX_Error_NONE Success
charlesmn 0:c1910e04fc6c 495 * @return VL53LX_Error_TIME_OUT Time out on start measurement
charlesmn 0:c1910e04fc6c 496 * @return VL53LX_Error_INVALID_PARAMS This error might occur in timed mode
charlesmn 0:c1910e04fc6c 497 * when inter measurement period is smaller or too close to the timing budget.
charlesmn 0:c1910e04fc6c 498 * In such case measurements are not started and user must correct the timings
charlesmn 0:c1910e04fc6c 499 * passed to @a VL53LX_SetMeasurementTimingBudgetMicroSeconds() and
charlesmn 0:c1910e04fc6c 500 * @a VL53LX_SetInterMeasurementPeriodMilliSeconds() functions.
charlesmn 0:c1910e04fc6c 501 * @return "Other error code" See ::VL53LX_Error
charlesmn 0:c1910e04fc6c 502 */
charlesmn 0:c1910e04fc6c 503 VL53LX_Error VL53L3CX_StartMeasurement();
charlesmn 0:c1910e04fc6c 504
charlesmn 0:c1910e04fc6c 505 /**
charlesmn 0:c1910e04fc6c 506 * @brief Stop device measurement
charlesmn 0:c1910e04fc6c 507 *
charlesmn 0:c1910e04fc6c 508 * @details Will set the device in standby mode at end of current measurement\n
charlesmn 0:c1910e04fc6c 509 * Not necessary in single mode as device shall return automatically
charlesmn 0:c1910e04fc6c 510 * in standby mode at end of measurement.
charlesmn 0:c1910e04fc6c 511 *
charlesmn 0:c1910e04fc6c 512 * @note This function Access to the device
charlesmn 0:c1910e04fc6c 513 *
charlesmn 0:c1910e04fc6c 514 * @param Dev Device Handle
charlesmn 0:c1910e04fc6c 515 * @return VL53LX_Error_NONE Success
charlesmn 0:c1910e04fc6c 516 * @return "Other error code" See ::VL53LX_Error
charlesmn 0:c1910e04fc6c 517 */
charlesmn 0:c1910e04fc6c 518 VL53LX_Error VL53L3CX_StopMeasurement();
charlesmn 0:c1910e04fc6c 519
charlesmn 0:c1910e04fc6c 520 /**
charlesmn 0:c1910e04fc6c 521 * @brief Clear the Interrupt flag and start new measurement
charlesmn 0:c1910e04fc6c 522 * *
charlesmn 0:c1910e04fc6c 523 * @note This function Access to the device
charlesmn 0:c1910e04fc6c 524 *
charlesmn 0:c1910e04fc6c 525 * @param Dev Device Handle
charlesmn 0:c1910e04fc6c 526 * @return VL53LX_Error_NONE Success
charlesmn 0:c1910e04fc6c 527 * @return "Other error code" See ::VL53LX_Error
charlesmn 0:c1910e04fc6c 528 */
charlesmn 0:c1910e04fc6c 529 VL53LX_Error VL53L3CX_ClearInterruptAndStartMeasurement();
charlesmn 0:c1910e04fc6c 530
charlesmn 0:c1910e04fc6c 531 /**
charlesmn 0:c1910e04fc6c 532 * @brief Return Measurement Data Ready
charlesmn 0:c1910e04fc6c 533 *
charlesmn 0:c1910e04fc6c 534 * @par Function Description
charlesmn 0:c1910e04fc6c 535 * This function indicate that a measurement data is ready.
charlesmn 0:c1910e04fc6c 536 * This function is used for non-blocking capture.
charlesmn 0:c1910e04fc6c 537 *
charlesmn 0:c1910e04fc6c 538 * @note This function Access to the device
charlesmn 0:c1910e04fc6c 539 *
charlesmn 0:c1910e04fc6c 540 * @param Dev Device Handle
charlesmn 0:c1910e04fc6c 541 * @param pMeasurementDataReady Pointer to Measurement Data Ready.
charlesmn 0:c1910e04fc6c 542 * 0 = data not ready, 1 = data ready
charlesmn 0:c1910e04fc6c 543 * @return VL53LX_Error_NONE Success
charlesmn 0:c1910e04fc6c 544 * @return "Other error code" See ::VL53LX_Error
charlesmn 0:c1910e04fc6c 545 */
charlesmn 0:c1910e04fc6c 546 VL53LX_Error VL53L3CX_GetMeasurementDataReady(
charlesmn 0:c1910e04fc6c 547 uint8_t *pMeasurementDataReady);
charlesmn 0:c1910e04fc6c 548
charlesmn 0:c1910e04fc6c 549 /**
charlesmn 0:c1910e04fc6c 550 * @brief Wait for measurement data ready.
charlesmn 0:c1910e04fc6c 551 * Blocking function.
charlesmn 0:c1910e04fc6c 552 * Note that the timeout is given by:
charlesmn 0:c1910e04fc6c 553 * VL53LX_RANGE_COMPLETION_POLLING_TIMEOUT_MS defined in def.h
charlesmn 0:c1910e04fc6c 554 *
charlesmn 0:c1910e04fc6c 555 *
charlesmn 0:c1910e04fc6c 556 * @note This function Access to the device
charlesmn 0:c1910e04fc6c 557 *
charlesmn 0:c1910e04fc6c 558 * @param Dev Device Handle
charlesmn 0:c1910e04fc6c 559 * @return VL53LX_Error_NONE Success
charlesmn 0:c1910e04fc6c 560 * @return VL53LX_Error_TIME_OUT In case of timeout
charlesmn 0:c1910e04fc6c 561 */
charlesmn 0:c1910e04fc6c 562 VL53LX_Error VL53L3CX_WaitMeasurementDataReady();
charlesmn 0:c1910e04fc6c 563
charlesmn 0:c1910e04fc6c 564
charlesmn 0:c1910e04fc6c 565 /**
charlesmn 0:c1910e04fc6c 566 * @brief Retrieve all measurements from device with the current setup
charlesmn 0:c1910e04fc6c 567 *
charlesmn 0:c1910e04fc6c 568 * @par Function Description
charlesmn 0:c1910e04fc6c 569 * Get data from last successful Ranging measurement
charlesmn 0:c1910e04fc6c 570 *
charlesmn 0:c1910e04fc6c 571 * @warning USER must call @a VL53LX_ClearInterruptAndStartMeasurement() prior
charlesmn 0:c1910e04fc6c 572 * to call again this function
charlesmn 0:c1910e04fc6c 573 *
charlesmn 0:c1910e04fc6c 574 * @note This function Access to the device
charlesmn 0:c1910e04fc6c 575 *
charlesmn 0:c1910e04fc6c 576 * @note The first valid value returned by this function will have a range
charlesmn 0:c1910e04fc6c 577 * status equal to VL53LX_RANGESTATUS_RANGE_VALID_NO_WRAP_CHECK which means that
charlesmn 0:c1910e04fc6c 578 * the data is valid but no wrap around check have been done. User should take
charlesmn 0:c1910e04fc6c 579 * care about that.
charlesmn 0:c1910e04fc6c 580 *
charlesmn 0:c1910e04fc6c 581 * @param Dev Device Handle
charlesmn 0:c1910e04fc6c 582 * @param pMultiRangingData Pointer to the data structure to fill up.
charlesmn 0:c1910e04fc6c 583 * @return VL53LX_Error_NONE Success
charlesmn 0:c1910e04fc6c 584 * @return "Other error code" See ::VL53LX_Error
charlesmn 0:c1910e04fc6c 585 */
charlesmn 0:c1910e04fc6c 586 VL53LX_Error VL53L3CX_GetMultiRangingData(VL53LX_MultiRangingData_t *pMultiRangingData);
charlesmn 0:c1910e04fc6c 587
charlesmn 0:c1910e04fc6c 588 /**
charlesmn 0:c1910e04fc6c 589 * @brief Get Additional Data
charlesmn 0:c1910e04fc6c 590 *
charlesmn 0:c1910e04fc6c 591 * @par Function Description
charlesmn 0:c1910e04fc6c 592 * This function is used to get lld debugging data on the last histogram
charlesmn 0:c1910e04fc6c 593 * measurement. shall be called when a new measurement is ready (interrupt or
charlesmn 0:c1910e04fc6c 594 * positive VL53LX_GetMeasurementDataReady() polling) and before a call to
charlesmn 0:c1910e04fc6c 595 * VL53LX_ClearInterruptAndStartMeasurement().
charlesmn 0:c1910e04fc6c 596 *
charlesmn 0:c1910e04fc6c 597 * @param Dev Device Handle
charlesmn 0:c1910e04fc6c 598 * @param pAdditionalData Pointer to Additional data
charlesmn 0:c1910e04fc6c 599 * @return VL53LX_Error_NONE Success
charlesmn 0:c1910e04fc6c 600 * @return "Other error code" See ::VL53LX_Error
charlesmn 0:c1910e04fc6c 601 */
charlesmn 0:c1910e04fc6c 602 VL53LX_Error VL53L3CX_GetAdditionalData( VL53LX_AdditionalData_t *pAdditionalData);
charlesmn 0:c1910e04fc6c 603
charlesmn 0:c1910e04fc6c 604
charlesmn 0:c1910e04fc6c 605 /** @} VL53LX_measurement_group */
charlesmn 0:c1910e04fc6c 606
charlesmn 0:c1910e04fc6c 607 /** @defgroup VL53LX_Calibration_group VL53LX Calibration Functions
charlesmn 0:c1910e04fc6c 608 * @brief Functions used for Calibration
charlesmn 0:c1910e04fc6c 609 * @{
charlesmn 0:c1910e04fc6c 610 */
charlesmn 0:c1910e04fc6c 611
charlesmn 0:c1910e04fc6c 612
charlesmn 0:c1910e04fc6c 613 /**
charlesmn 0:c1910e04fc6c 614 * @brief Set Tuning Parameter value for a given parameter ID
charlesmn 0:c1910e04fc6c 615 *
charlesmn 0:c1910e04fc6c 616 * @par Function Description
charlesmn 0:c1910e04fc6c 617 * This function is used to improve the performance of the device. It permit to
charlesmn 0:c1910e04fc6c 618 * change a particular value used for a timeout or a threshold or a constant
charlesmn 0:c1910e04fc6c 619 * in an algorithm. The function will change the value of the parameter
charlesmn 0:c1910e04fc6c 620 * identified by an unique ID.
charlesmn 0:c1910e04fc6c 621 *
charlesmn 0:c1910e04fc6c 622 * @note This function doesn't Access to the device
charlesmn 0:c1910e04fc6c 623 *
charlesmn 0:c1910e04fc6c 624 * @param Dev Device Handle
charlesmn 0:c1910e04fc6c 625 * @param TuningParameterId Tuning Parameter ID
charlesmn 0:c1910e04fc6c 626 * @param TuningParameterValue Tuning Parameter Value
charlesmn 0:c1910e04fc6c 627 * @return VL53LX_Error_NONE Success
charlesmn 0:c1910e04fc6c 628 * @return "Other error code" See ::VL53LX_Error
charlesmn 0:c1910e04fc6c 629 */
charlesmn 0:c1910e04fc6c 630 VL53LX_Error VL53L3CX_SetTuningParameter(
charlesmn 0:c1910e04fc6c 631 uint16_t TuningParameterId, int32_t TuningParameterValue);
charlesmn 0:c1910e04fc6c 632
charlesmn 0:c1910e04fc6c 633 /**
charlesmn 0:c1910e04fc6c 634 * @brief Get Tuning Parameter value for a given parameter ID
charlesmn 0:c1910e04fc6c 635 *
charlesmn 0:c1910e04fc6c 636 * @par Function Description
charlesmn 0:c1910e04fc6c 637 * This function is used to get the value of the parameter
charlesmn 0:c1910e04fc6c 638 * identified by an unique ID.
charlesmn 0:c1910e04fc6c 639 *
charlesmn 0:c1910e04fc6c 640 * @note This function doesn't Access to the device
charlesmn 0:c1910e04fc6c 641 *
charlesmn 0:c1910e04fc6c 642 * @param Dev Device Handle
charlesmn 0:c1910e04fc6c 643 * @param TuningParameterId Tuning Parameter ID
charlesmn 0:c1910e04fc6c 644 * @param pTuningParameterValue Pointer to Tuning Parameter Value
charlesmn 0:c1910e04fc6c 645 * for a given TuningParameterId.
charlesmn 0:c1910e04fc6c 646 * @return VL53LX_Error_NONE Success
charlesmn 0:c1910e04fc6c 647 * @return "Other error code" See ::VL53LX_Error
charlesmn 0:c1910e04fc6c 648 */
charlesmn 0:c1910e04fc6c 649 VL53LX_Error VL53L3CX_GetTuningParameter(
charlesmn 0:c1910e04fc6c 650 uint16_t TuningParameterId, int32_t *pTuningParameterValue);
charlesmn 0:c1910e04fc6c 651
charlesmn 0:c1910e04fc6c 652 /**
charlesmn 0:c1910e04fc6c 653 * @brief Performs Reference Spad Management
charlesmn 0:c1910e04fc6c 654 *
charlesmn 0:c1910e04fc6c 655 * @par Function Description
charlesmn 0:c1910e04fc6c 656 * The reference SPAD initialization procedure determines the minimum amount
charlesmn 0:c1910e04fc6c 657 * of reference spads to be enables to achieve a target reference signal rate
charlesmn 0:c1910e04fc6c 658 * and should be performed once during initialization.
charlesmn 0:c1910e04fc6c 659 *
charlesmn 0:c1910e04fc6c 660 * @note This function Access to the device
charlesmn 0:c1910e04fc6c 661 *
charlesmn 0:c1910e04fc6c 662 * @param Dev Device Handle
charlesmn 0:c1910e04fc6c 663 * @return VL53LX_Error_NONE Success
charlesmn 0:c1910e04fc6c 664 * @return "Other error code" See ::VL53LX_Error
charlesmn 0:c1910e04fc6c 665 */
charlesmn 0:c1910e04fc6c 666 VL53LX_Error VL53L3CX_PerformRefSpadManagement();
charlesmn 0:c1910e04fc6c 667
charlesmn 0:c1910e04fc6c 668 /**
charlesmn 0:c1910e04fc6c 669 * @brief Enable/Disable dynamic Xtalk compensation feature
charlesmn 0:c1910e04fc6c 670 *
charlesmn 0:c1910e04fc6c 671 * Enable/Disable dynamic Xtalk compensation (aka smudge correction).
charlesmn 0:c1910e04fc6c 672 *
charlesmn 0:c1910e04fc6c 673 * @param Dev Device Handle
charlesmn 0:c1910e04fc6c 674 * @param Mode Set the smudge correction mode
charlesmn 0:c1910e04fc6c 675 * See ::VL53LX_SmudgeCorrectionModes
charlesmn 0:c1910e04fc6c 676 * @return VL53LX_Error_NONE Success
charlesmn 0:c1910e04fc6c 677 * @return "Other error code" See ::VL53LX_Error
charlesmn 0:c1910e04fc6c 678 */
charlesmn 0:c1910e04fc6c 679 VL53LX_Error VL53L3CX_SmudgeCorrectionEnable(
charlesmn 0:c1910e04fc6c 680 VL53LX_SmudgeCorrectionModes Mode);
charlesmn 0:c1910e04fc6c 681
charlesmn 0:c1910e04fc6c 682
charlesmn 0:c1910e04fc6c 683 /**
charlesmn 0:c1910e04fc6c 684 * @brief Enable/Disable Cross talk compensation feature
charlesmn 0:c1910e04fc6c 685 *
charlesmn 0:c1910e04fc6c 686 * Enable/Disable Cross Talk correction.
charlesmn 0:c1910e04fc6c 687 *
charlesmn 0:c1910e04fc6c 688 * @param Dev Device Handle
charlesmn 0:c1910e04fc6c 689 * @param XTalkCompensationEnable Cross talk compensation
charlesmn 0:c1910e04fc6c 690 * to be set 0 = disabled or 1 = enabled.
charlesmn 0:c1910e04fc6c 691 * @return VL53LX_Error_NONE Success
charlesmn 0:c1910e04fc6c 692 * @return "Other error code" See ::VL53LX_Error
charlesmn 0:c1910e04fc6c 693 */
charlesmn 0:c1910e04fc6c 694 VL53LX_Error VL53L3CX_SetXTalkCompensationEnable(
charlesmn 0:c1910e04fc6c 695 uint8_t XTalkCompensationEnable);
charlesmn 0:c1910e04fc6c 696
charlesmn 0:c1910e04fc6c 697 /**
charlesmn 0:c1910e04fc6c 698 * @brief Get Cross talk compensation rate enable
charlesmn 0:c1910e04fc6c 699 *
charlesmn 0:c1910e04fc6c 700 * Get if the Cross Talk is Enabled or Disabled.
charlesmn 0:c1910e04fc6c 701 *
charlesmn 0:c1910e04fc6c 702 * @note This function doesn't access to the device
charlesmn 0:c1910e04fc6c 703 *
charlesmn 0:c1910e04fc6c 704 * @param Dev Device Handle
charlesmn 0:c1910e04fc6c 705 * @param pXTalkCompensationEnable Pointer to the Cross talk compensation
charlesmn 0:c1910e04fc6c 706 * state 0=disabled or 1 = enabled
charlesmn 0:c1910e04fc6c 707 * @return VL53LX_Error_NONE Success
charlesmn 0:c1910e04fc6c 708 * @return "Other error code" See ::VL53LX_Error
charlesmn 0:c1910e04fc6c 709 */
charlesmn 0:c1910e04fc6c 710 VL53LX_Error VL53L3CX_GetXTalkCompensationEnable(
charlesmn 0:c1910e04fc6c 711 uint8_t *pXTalkCompensationEnable);
charlesmn 0:c1910e04fc6c 712
charlesmn 0:c1910e04fc6c 713 /**
charlesmn 0:c1910e04fc6c 714 * @brief Perform XTalk Calibration
charlesmn 0:c1910e04fc6c 715 *
charlesmn 0:c1910e04fc6c 716 * @details Perform a XTalk calibration of the Device.
charlesmn 0:c1910e04fc6c 717 * This function will launch a measurement, if interrupts
charlesmn 0:c1910e04fc6c 718 * are enabled an interrupt will be done.
charlesmn 0:c1910e04fc6c 719 * This function will clear the interrupt generated automatically.
charlesmn 0:c1910e04fc6c 720 * This function will program a new value for the XTalk compensation
charlesmn 0:c1910e04fc6c 721 * and it will enable the cross talk before exit.
charlesmn 0:c1910e04fc6c 722 *
charlesmn 0:c1910e04fc6c 723 * @warning This function is a blocking function
charlesmn 0:c1910e04fc6c 724 *
charlesmn 0:c1910e04fc6c 725 * @note This function Access to the device
charlesmn 0:c1910e04fc6c 726 *
charlesmn 0:c1910e04fc6c 727 * @param Dev Device Handle
charlesmn 0:c1910e04fc6c 728 * the calibration sets appropriate
charlesmn 0:c1910e04fc6c 729 * distance mode and thus override existing one<br>
charlesmn 0:c1910e04fc6c 730 * The calibration uses a target which should be located at least @60cm from the
charlesmn 0:c1910e04fc6c 731 * device. The actual location of the target shall be passed
charlesmn 0:c1910e04fc6c 732 * through the bare driver tuning parameters table
charlesmn 0:c1910e04fc6c 733 *
charlesmn 0:c1910e04fc6c 734 * @return VL53LX_Error_NONE Success
charlesmn 0:c1910e04fc6c 735 * @return "Other error code" See ::VL53LX_Error
charlesmn 0:c1910e04fc6c 736 */
charlesmn 0:c1910e04fc6c 737 VL53LX_Error VL53L3CX_PerformXTalkCalibration();
charlesmn 0:c1910e04fc6c 738
charlesmn 0:c1910e04fc6c 739
charlesmn 0:c1910e04fc6c 740 /**
charlesmn 0:c1910e04fc6c 741 * @brief Define the mode to be used for the offset correction
charlesmn 0:c1910e04fc6c 742 *
charlesmn 0:c1910e04fc6c 743 * Define the mode to be used for the offset correction.
charlesmn 0:c1910e04fc6c 744 *
charlesmn 0:c1910e04fc6c 745 * @param Dev Device Handle
charlesmn 0:c1910e04fc6c 746 * @param OffsetCorrectionMode Offset Correction Mode valid values are:
charlesmn 0:c1910e04fc6c 747 * @li VL53LX_OFFSETCORRECTIONMODE_STANDARD
charlesmn 0:c1910e04fc6c 748 * @li VL53LX_OFFSETCORRECTIONMODE_PERVCSEL
charlesmn 0:c1910e04fc6c 749 *
charlesmn 0:c1910e04fc6c 750 * @return VL53LX_Error_NONE Success
charlesmn 0:c1910e04fc6c 751 * @return "Other error code" See ::VL53LX_Error
charlesmn 0:c1910e04fc6c 752 */
charlesmn 0:c1910e04fc6c 753 VL53LX_Error VL53L3CX_SetOffsetCorrectionMode(
charlesmn 0:c1910e04fc6c 754 VL53LX_OffsetCorrectionModes OffsetCorrectionMode);
charlesmn 0:c1910e04fc6c 755
charlesmn 0:c1910e04fc6c 756
charlesmn 0:c1910e04fc6c 757 /**
charlesmn 0:c1910e04fc6c 758 * @brief Perform Offset simple Calibration
charlesmn 0:c1910e04fc6c 759 *
charlesmn 0:c1910e04fc6c 760 * @details Perform a very simple offset calibration of the Device.
charlesmn 0:c1910e04fc6c 761 * This function will launch few ranging measurements and computes offset
charlesmn 0:c1910e04fc6c 762 * calibration. The preset mode and the distance mode MUST be set by the
charlesmn 0:c1910e04fc6c 763 * application before to call this function.
charlesmn 0:c1910e04fc6c 764 *
charlesmn 0:c1910e04fc6c 765 * @warning This function is a blocking function
charlesmn 0:c1910e04fc6c 766 *
charlesmn 0:c1910e04fc6c 767 * @note This function Access to the device
charlesmn 0:c1910e04fc6c 768 *
charlesmn 0:c1910e04fc6c 769 * @param Dev Device Handle
charlesmn 0:c1910e04fc6c 770 * @param CalDistanceMilliMeter Calibration distance value used for the
charlesmn 0:c1910e04fc6c 771 * offset compensation.
charlesmn 0:c1910e04fc6c 772 *
charlesmn 0:c1910e04fc6c 773 * @return VL53LX_Error_NONE
charlesmn 0:c1910e04fc6c 774 * @return VL53LX_Error_OFFSET_CAL_NO_SAMPLE_FAIL the calibration failed by
charlesmn 0:c1910e04fc6c 775 * lack of valid measurements
charlesmn 0:c1910e04fc6c 776 * @return VL53LX_WARNING_OFFSET_CAL_SIGMA_TOO_HIGH means that the target
charlesmn 0:c1910e04fc6c 777 * distance combined to the number of loops performed in the calibration lead to
charlesmn 0:c1910e04fc6c 778 * an internal overflow. Try to reduce the distance of the target (140 mm)
charlesmn 0:c1910e04fc6c 779 * @return "Other error code" See ::VL53LX_Error
charlesmn 0:c1910e04fc6c 780 */
charlesmn 0:c1910e04fc6c 781 VL53LX_Error VL53L3CX_PerformOffsetSimpleCalibration(
charlesmn 0:c1910e04fc6c 782 int32_t CalDistanceMilliMeter);
charlesmn 0:c1910e04fc6c 783
charlesmn 0:c1910e04fc6c 784 /**
charlesmn 0:c1910e04fc6c 785 * @brief Perform Offset simple Calibration with a "zero distance" target
charlesmn 0:c1910e04fc6c 786 *
charlesmn 0:c1910e04fc6c 787 * @details Perform a simple offset calibration of the Device.
charlesmn 0:c1910e04fc6c 788 * This function will launch few ranging measurements and computes offset
charlesmn 0:c1910e04fc6c 789 * calibration. The preset mode and the distance mode MUST be set by the
charlesmn 0:c1910e04fc6c 790 * application before to call this function.
charlesmn 0:c1910e04fc6c 791 * A target must be place very close to the device.
charlesmn 0:c1910e04fc6c 792 * Ideally the target shall be touching the coverglass.
charlesmn 0:c1910e04fc6c 793 *
charlesmn 0:c1910e04fc6c 794 * @warning This function is a blocking function
charlesmn 0:c1910e04fc6c 795 *
charlesmn 0:c1910e04fc6c 796 * @note This function Access to the device
charlesmn 0:c1910e04fc6c 797 *
charlesmn 0:c1910e04fc6c 798 * @param Dev Device Handle
charlesmn 0:c1910e04fc6c 799 *
charlesmn 0:c1910e04fc6c 800 * @return VL53LX_Error_NONE
charlesmn 0:c1910e04fc6c 801 * @return VL53LX_Error_OFFSET_CAL_NO_SAMPLE_FAIL the calibration failed by
charlesmn 0:c1910e04fc6c 802 * lack of valid measurements
charlesmn 0:c1910e04fc6c 803 * @return VL53LX_WARNING_OFFSET_CAL_SIGMA_TOO_HIGH means that the target
charlesmn 0:c1910e04fc6c 804 * distance is too large, try to put the target closer to the device
charlesmn 0:c1910e04fc6c 805 * @return "Other error code" See ::VL53LX_Error
charlesmn 0:c1910e04fc6c 806 */
charlesmn 0:c1910e04fc6c 807 VL53LX_Error VL53L3CX_PerformOffsetZeroDistanceCalibration();
charlesmn 0:c1910e04fc6c 808
charlesmn 0:c1910e04fc6c 809
charlesmn 0:c1910e04fc6c 810 /**
charlesmn 0:c1910e04fc6c 811 * @brief Perform Offset per Vcsel Calibration. i.e. per distance mode
charlesmn 0:c1910e04fc6c 812 *
charlesmn 0:c1910e04fc6c 813 * @details Perform offset calibration of the Device depending on the
charlesmn 0:c1910e04fc6c 814 * three distance mode settings: short, medium and long.
charlesmn 0:c1910e04fc6c 815 * This function will launch few ranging measurements and computes offset
charlesmn 0:c1910e04fc6c 816 * calibration in each of the three distance modes.
charlesmn 0:c1910e04fc6c 817 * The preset mode MUST be set by the application before to call this function.
charlesmn 0:c1910e04fc6c 818 *
charlesmn 0:c1910e04fc6c 819 * @warning This function is a blocking function
charlesmn 0:c1910e04fc6c 820 *
charlesmn 0:c1910e04fc6c 821 * @note This function Access to the device
charlesmn 0:c1910e04fc6c 822 *
charlesmn 0:c1910e04fc6c 823 * @param Dev Device Handle
charlesmn 0:c1910e04fc6c 824 * @param CalDistanceMilliMeter Distance of the target used for the
charlesmn 0:c1910e04fc6c 825 * offset compensation calibration.
charlesmn 0:c1910e04fc6c 826 *
charlesmn 0:c1910e04fc6c 827 * @return VL53LX_Error_NONE
charlesmn 0:c1910e04fc6c 828 * @return VL53LX_Error_OFFSET_CAL_NO_SAMPLE_FAIL the calibration failed by
charlesmn 0:c1910e04fc6c 829 * lack of valid measurements
charlesmn 0:c1910e04fc6c 830 * @return VL53LX_WARNING_OFFSET_CAL_SIGMA_TOO_HIGH means that the target
charlesmn 0:c1910e04fc6c 831 * distance combined to the number of loops performed in the calibration lead to
charlesmn 0:c1910e04fc6c 832 * an internal overflow. Try to reduce the distance of the target (140 mm)
charlesmn 0:c1910e04fc6c 833 * @return "Other error code" See ::VL53LX_Error
charlesmn 0:c1910e04fc6c 834 */
charlesmn 0:c1910e04fc6c 835 VL53LX_Error VL53L3CX_PerformOffsetPerVcselCalibration(
charlesmn 0:c1910e04fc6c 836 int32_t CalDistanceMilliMeter);
charlesmn 0:c1910e04fc6c 837
charlesmn 0:c1910e04fc6c 838
charlesmn 0:c1910e04fc6c 839 /**
charlesmn 0:c1910e04fc6c 840 * @brief Sets the Calibration Data.
charlesmn 0:c1910e04fc6c 841 *
charlesmn 0:c1910e04fc6c 842 * @par Function Description
charlesmn 0:c1910e04fc6c 843 * This function set all the Calibration Data issued from the functions
charlesmn 0:c1910e04fc6c 844 * @a VL53LX_PerformRefSpadManagement(), @a VL53LX_PerformXTalkCalibration,
charlesmn 0:c1910e04fc6c 845 * @a VL53LX_PerformOffsetCalibration()
charlesmn 0:c1910e04fc6c 846 *
charlesmn 0:c1910e04fc6c 847 * @note This function doesn't Accesses the device
charlesmn 0:c1910e04fc6c 848 *
charlesmn 0:c1910e04fc6c 849 * @param Dev Device Handle
charlesmn 0:c1910e04fc6c 850 * @param *pCalibrationData Pointer to Calibration data to be set.
charlesmn 0:c1910e04fc6c 851 * @return VL53LX_Error_NONE Success
charlesmn 0:c1910e04fc6c 852 * @return VL53LX_Error_INVALID_PARAMS pCalibrationData points to an older
charlesmn 0:c1910e04fc6c 853 * version of the inner structure. Need for support to convert its content.
charlesmn 0:c1910e04fc6c 854 * @return "Other error code" See ::VL53LX_Error
charlesmn 0:c1910e04fc6c 855 */
charlesmn 0:c1910e04fc6c 856 VL53LX_Error VL53L3CX_SetCalibrationData(
charlesmn 0:c1910e04fc6c 857 VL53LX_CalibrationData_t *pCalibrationData);
charlesmn 0:c1910e04fc6c 858
charlesmn 0:c1910e04fc6c 859 /**
charlesmn 0:c1910e04fc6c 860 * @brief Gets the Calibration Data.
charlesmn 0:c1910e04fc6c 861 *
charlesmn 0:c1910e04fc6c 862 * @par Function Description
charlesmn 0:c1910e04fc6c 863 * This function get all the Calibration Data issued from the functions
charlesmn 0:c1910e04fc6c 864 * @a VL53LX_PerformRefSpadManagement(), @a VL53LX_PerformXTalkCalibration,
charlesmn 0:c1910e04fc6c 865 * @a VL53LX_PerformOffsetCalibration()
charlesmn 0:c1910e04fc6c 866 *
charlesmn 0:c1910e04fc6c 867 * @note This function doesn't Accesses the device
charlesmn 0:c1910e04fc6c 868 *
charlesmn 0:c1910e04fc6c 869 * @param Dev Device Handle
charlesmn 0:c1910e04fc6c 870 * @param *pCalibrationData pointer where to store Calibration
charlesmn 0:c1910e04fc6c 871 * data.
charlesmn 0:c1910e04fc6c 872 * @return VL53LX_Error_NONE Success
charlesmn 0:c1910e04fc6c 873 * @return "Other error code" See ::VL53LX_Error
charlesmn 0:c1910e04fc6c 874 */
charlesmn 0:c1910e04fc6c 875 VL53LX_Error VL53L3CX_GetCalibrationData(
charlesmn 0:c1910e04fc6c 876 VL53LX_CalibrationData_t *pCalibrationData);
charlesmn 0:c1910e04fc6c 877
charlesmn 0:c1910e04fc6c 878 /** @} VL53LX_Calibration_group */
charlesmn 0:c1910e04fc6c 879
charlesmn 0:c1910e04fc6c 880 /** @} VL53LX_group */
charlesmn 0:c1910e04fc6c 881 VL53LX_Error VL53L3CX_RdWord(VL53LX_DEV Dev, uint16_t index, uint16_t *data);
charlesmn 0:c1910e04fc6c 882
charlesmn 0:c1910e04fc6c 883 // protected:
charlesmn 0:c1910e04fc6c 884
charlesmn 0:c1910e04fc6c 885 /* vl53lx_api_core.h functions */
charlesmn 0:c1910e04fc6c 886
charlesmn 0:c1910e04fc6c 887 VL53LX_Error VL53L3CX_get_version(VL53LX_ll_version_t *pversion);
charlesmn 0:c1910e04fc6c 888 VL53LX_Error VL53L3CX_data_init(uint8_t read_p2p_data);
charlesmn 0:c1910e04fc6c 889 VL53LX_Error VL53L3CX_read_p2p_data();
charlesmn 0:c1910e04fc6c 890 VL53LX_Error VL53L3CX_set_part_to_part_data(VL53LX_calibration_data_t *pcal_data);
charlesmn 0:c1910e04fc6c 891 VL53LX_Error VL53L3CX_get_part_to_part_data(VL53LX_calibration_data_t *pcal_data);
charlesmn 0:c1910e04fc6c 892 VL53LX_Error VL53L3CX_get_tuning_debug_data(VL53LX_tuning_parameters_t *ptun_data);
charlesmn 0:c1910e04fc6c 893 VL53LX_Error VL53L3CX_set_inter_measurement_period_ms(uint32_t inter_measurement_period_ms);
charlesmn 0:c1910e04fc6c 894 VL53LX_Error VL53L3CX_get_inter_measurement_period_ms(uint32_t *pinter_measurement_period_ms);
charlesmn 0:c1910e04fc6c 895 VL53LX_Error VL53L3CX_set_timeouts_us(
charlesmn 0:c1910e04fc6c 896 uint32_t phasecal_config_timeout_us,
charlesmn 0:c1910e04fc6c 897 uint32_t mm_config_timeout_us,
charlesmn 0:c1910e04fc6c 898 uint32_t range_config_timeout_us);
charlesmn 0:c1910e04fc6c 899
charlesmn 0:c1910e04fc6c 900 VL53LX_Error VL53L3CX_get_timeouts_us(
charlesmn 0:c1910e04fc6c 901 uint32_t *pphasecal_config_timeout_us,
charlesmn 0:c1910e04fc6c 902 uint32_t *pmm_config_timeout_us,
charlesmn 0:c1910e04fc6c 903 uint32_t *prange_config_timeout_us);
charlesmn 0:c1910e04fc6c 904
charlesmn 0:c1910e04fc6c 905
charlesmn 0:c1910e04fc6c 906
charlesmn 0:c1910e04fc6c 907
charlesmn 0:c1910e04fc6c 908 VL53LX_Error VL53L3CX_set_user_zone(
charlesmn 0:c1910e04fc6c 909 VL53LX_user_zone_t *puser_zone);
charlesmn 0:c1910e04fc6c 910
charlesmn 0:c1910e04fc6c 911 VL53LX_Error VL53L3CX_get_user_zone(
charlesmn 0:c1910e04fc6c 912 VL53LX_user_zone_t *puser_zone);
charlesmn 0:c1910e04fc6c 913
charlesmn 0:c1910e04fc6c 914
charlesmn 0:c1910e04fc6c 915 VL53LX_Error VL53L3CX_get_mode_mitigation_roi(
charlesmn 0:c1910e04fc6c 916 VL53LX_user_zone_t *pmm_roi);
charlesmn 0:c1910e04fc6c 917
charlesmn 0:c1910e04fc6c 918
charlesmn 0:c1910e04fc6c 919 VL53LX_Error VL53L3CX_set_zone_config(
charlesmn 0:c1910e04fc6c 920 VL53LX_zone_config_t *pzone_cfg);
charlesmn 0:c1910e04fc6c 921
charlesmn 0:c1910e04fc6c 922 VL53LX_Error VL53L3CX_get_zone_config(
charlesmn 0:c1910e04fc6c 923 VL53LX_zone_config_t *pzone_cfg);
charlesmn 0:c1910e04fc6c 924
charlesmn 0:c1910e04fc6c 925
charlesmn 0:c1910e04fc6c 926 VL53LX_Error VL53L3CX_set_preset_mode(
charlesmn 0:c1910e04fc6c 927 VL53LX_DevicePresetModes device_preset_mode,
charlesmn 0:c1910e04fc6c 928 uint16_t dss_config__target_total_rate_mcps,
charlesmn 0:c1910e04fc6c 929 uint32_t phasecal_config_timeout_us,
charlesmn 0:c1910e04fc6c 930 uint32_t mm_config_timeout_us,
charlesmn 0:c1910e04fc6c 931 uint32_t range_config_timeout_us,
charlesmn 0:c1910e04fc6c 932 uint32_t inter_measurement_period_ms);
charlesmn 0:c1910e04fc6c 933
charlesmn 0:c1910e04fc6c 934 VL53LX_Error VL53L3CX_get_preset_mode_timing_cfg(
charlesmn 0:c1910e04fc6c 935 VL53LX_DevicePresetModes device_preset_mode,
charlesmn 0:c1910e04fc6c 936 uint16_t *pdss_config__target_total_rate_mcps,
charlesmn 0:c1910e04fc6c 937 uint32_t *pphasecal_config_timeout_us,
charlesmn 0:c1910e04fc6c 938 uint32_t *pmm_config_timeout_us,
charlesmn 0:c1910e04fc6c 939 uint32_t *prange_config_timeout_us);
charlesmn 0:c1910e04fc6c 940
charlesmn 0:c1910e04fc6c 941
charlesmn 0:c1910e04fc6c 942 VL53LX_Error VL53L3CX_set_zone_preset(
charlesmn 0:c1910e04fc6c 943 VL53LX_DeviceZonePreset zone_preset);
charlesmn 0:c1910e04fc6c 944
charlesmn 0:c1910e04fc6c 945
charlesmn 0:c1910e04fc6c 946 VL53LX_Error VL53L3CX_enable_xtalk_compensation();
charlesmn 0:c1910e04fc6c 947
charlesmn 0:c1910e04fc6c 948 VL53LX_Error VL53L3CX_disable_xtalk_compensation();
charlesmn 0:c1910e04fc6c 949
charlesmn 0:c1910e04fc6c 950
charlesmn 0:c1910e04fc6c 951 void VL53L3CX_get_xtalk_compensation_enable(
charlesmn 0:c1910e04fc6c 952 uint8_t *pcrosstalk_compensation_enable);
charlesmn 0:c1910e04fc6c 953
charlesmn 0:c1910e04fc6c 954
charlesmn 0:c1910e04fc6c 955 VL53LX_Error VL53L3CX_init_and_start_range(
charlesmn 0:c1910e04fc6c 956 uint8_t measurement_mode,
charlesmn 0:c1910e04fc6c 957 VL53LX_DeviceConfigLevel device_config_level);
charlesmn 0:c1910e04fc6c 958
charlesmn 0:c1910e04fc6c 959
charlesmn 0:c1910e04fc6c 960 VL53LX_Error VL53L3CX_stop_range(); // remove
charlesmn 0:c1910e04fc6c 961
charlesmn 0:c1910e04fc6c 962 VL53LX_Error VL53L3CX_get_measurement_results(
charlesmn 0:c1910e04fc6c 963 VL53LX_DeviceResultsLevel device_result_level);
charlesmn 0:c1910e04fc6c 964
charlesmn 0:c1910e04fc6c 965
charlesmn 0:c1910e04fc6c 966 VL53LX_Error VL53L3CX_get_device_results(
charlesmn 0:c1910e04fc6c 967 VL53LX_DeviceResultsLevel device_result_level,
charlesmn 0:c1910e04fc6c 968 VL53LX_range_results_t *prange_results);
charlesmn 0:c1910e04fc6c 969
charlesmn 0:c1910e04fc6c 970
charlesmn 0:c1910e04fc6c 971 VL53LX_Error VL53L3CX_clear_interrupt_and_enable_next_range(
charlesmn 0:c1910e04fc6c 972 uint8_t measurement_mode);
charlesmn 0:c1910e04fc6c 973
charlesmn 0:c1910e04fc6c 974
charlesmn 0:c1910e04fc6c 975 VL53LX_Error VL53L3CX_get_histogram_bin_data(
charlesmn 0:c1910e04fc6c 976 VL53LX_histogram_bin_data_t *phist_data);
charlesmn 0:c1910e04fc6c 977
charlesmn 0:c1910e04fc6c 978 void VL53L3CX_copy_sys_and_core_results_to_range_results(
charlesmn 0:c1910e04fc6c 979 int32_t gain_factor,
charlesmn 0:c1910e04fc6c 980 VL53LX_system_results_t *psys,
charlesmn 0:c1910e04fc6c 981 VL53LX_core_results_t *pcore,
charlesmn 0:c1910e04fc6c 982 VL53LX_range_results_t *presults);
charlesmn 0:c1910e04fc6c 983
charlesmn 0:c1910e04fc6c 984
charlesmn 0:c1910e04fc6c 985
charlesmn 0:c1910e04fc6c 986 VL53LX_Error VL53L3CX_set_zone_dss_config(
charlesmn 0:c1910e04fc6c 987 VL53LX_zone_private_dyn_cfg_t *pzone_dyn_cfg);
charlesmn 0:c1910e04fc6c 988
charlesmn 0:c1910e04fc6c 989
charlesmn 0:c1910e04fc6c 990 VL53LX_Error VL53L3CX_set_dmax_mode(
charlesmn 0:c1910e04fc6c 991 VL53LX_DeviceDmaxMode dmax_mode);
charlesmn 0:c1910e04fc6c 992
charlesmn 0:c1910e04fc6c 993
charlesmn 0:c1910e04fc6c 994 VL53LX_Error VL53L3CX_get_dmax_mode(
charlesmn 0:c1910e04fc6c 995 VL53LX_DeviceDmaxMode *pdmax_mode);
charlesmn 0:c1910e04fc6c 996
charlesmn 0:c1910e04fc6c 997
charlesmn 0:c1910e04fc6c 998 VL53LX_Error VL53L3CX_set_dmax_calibration_data(
charlesmn 0:c1910e04fc6c 999 VL53LX_DeviceDmaxMode dmax_mode,
charlesmn 0:c1910e04fc6c 1000 VL53LX_dmax_calibration_data_t *pdmax_cal);
charlesmn 0:c1910e04fc6c 1001
charlesmn 0:c1910e04fc6c 1002
charlesmn 0:c1910e04fc6c 1003 VL53LX_Error VL53L3CX_get_dmax_calibration_data(
charlesmn 0:c1910e04fc6c 1004 VL53LX_DeviceDmaxMode dmax_mode,
charlesmn 0:c1910e04fc6c 1005 VL53LX_dmax_calibration_data_t *pdmax_cal);
charlesmn 0:c1910e04fc6c 1006
charlesmn 0:c1910e04fc6c 1007
charlesmn 0:c1910e04fc6c 1008 VL53LX_Error VL53L3CX_set_offset_correction_mode(
charlesmn 0:c1910e04fc6c 1009 VL53LX_OffsetCalibrationMode offset_cor_mode);
charlesmn 0:c1910e04fc6c 1010
charlesmn 0:c1910e04fc6c 1011
charlesmn 0:c1910e04fc6c 1012 VL53LX_Error VL53L3CX_get_offset_correction_mode(
charlesmn 0:c1910e04fc6c 1013 VL53LX_OffsetCorrectionMode *poffset_cor_mode);
charlesmn 0:c1910e04fc6c 1014
charlesmn 0:c1910e04fc6c 1015
charlesmn 0:c1910e04fc6c 1016 VL53LX_Error VL53L3CX_et_zone_calibration_data(
charlesmn 0:c1910e04fc6c 1017 VL53LX_zone_calibration_results_t *pzone_cal);
charlesmn 0:c1910e04fc6c 1018
charlesmn 0:c1910e04fc6c 1019
charlesmn 0:c1910e04fc6c 1020 VL53LX_Error VL53L3CX_set_zone_calibration_data(
charlesmn 0:c1910e04fc6c 1021 VL53LX_zone_calibration_results_t *pzone_cal);
charlesmn 0:c1910e04fc6c 1022
charlesmn 0:c1910e04fc6c 1023
charlesmn 0:c1910e04fc6c 1024
charlesmn 0:c1910e04fc6c 1025 VL53LX_Error VL53L3CX_get_tuning_parm(
charlesmn 0:c1910e04fc6c 1026 VL53LX_TuningParms tuning_parm_key,
charlesmn 0:c1910e04fc6c 1027 int32_t *ptuning_parm_value);
charlesmn 0:c1910e04fc6c 1028
charlesmn 0:c1910e04fc6c 1029
charlesmn 0:c1910e04fc6c 1030
charlesmn 0:c1910e04fc6c 1031 VL53LX_Error VL53L3CX_set_tuning_parm(
charlesmn 0:c1910e04fc6c 1032 VL53LX_TuningParms tuning_parm_key,
charlesmn 0:c1910e04fc6c 1033 int32_t tuning_parm_value);
charlesmn 0:c1910e04fc6c 1034
charlesmn 0:c1910e04fc6c 1035
charlesmn 0:c1910e04fc6c 1036
charlesmn 0:c1910e04fc6c 1037 VL53LX_Error VL53L3CX_dynamic_xtalk_correction_enable();
charlesmn 0:c1910e04fc6c 1038
charlesmn 0:c1910e04fc6c 1039
charlesmn 0:c1910e04fc6c 1040
charlesmn 0:c1910e04fc6c 1041 VL53LX_Error VL53L3CX_dynamic_xtalk_correction_disable();
charlesmn 0:c1910e04fc6c 1042
charlesmn 0:c1910e04fc6c 1043
charlesmn 0:c1910e04fc6c 1044
charlesmn 0:c1910e04fc6c 1045
charlesmn 0:c1910e04fc6c 1046 VL53LX_Error VL53L3CX_dynamic_xtalk_correction_apply_enable();
charlesmn 0:c1910e04fc6c 1047
charlesmn 0:c1910e04fc6c 1048
charlesmn 0:c1910e04fc6c 1049
charlesmn 0:c1910e04fc6c 1050 VL53LX_Error VL53L3CX_dynamic_xtalk_correction_apply_disable();
charlesmn 0:c1910e04fc6c 1051
charlesmn 0:c1910e04fc6c 1052
charlesmn 0:c1910e04fc6c 1053
charlesmn 0:c1910e04fc6c 1054 VL53LX_Error VL53L3CX_dynamic_xtalk_correction_single_apply_enable();
charlesmn 0:c1910e04fc6c 1055
charlesmn 0:c1910e04fc6c 1056
charlesmn 0:c1910e04fc6c 1057
charlesmn 0:c1910e04fc6c 1058 VL53LX_Error VL53L3CX_dynamic_xtalk_correction_single_apply_disable();
charlesmn 0:c1910e04fc6c 1059
charlesmn 0:c1910e04fc6c 1060
charlesmn 0:c1910e04fc6c 1061 VL53LX_Error VL53L3CX_get_current_xtalk_settings(
charlesmn 0:c1910e04fc6c 1062
charlesmn 0:c1910e04fc6c 1063 VL53LX_xtalk_calibration_results_t *pxtalk
charlesmn 0:c1910e04fc6c 1064 );
charlesmn 0:c1910e04fc6c 1065
charlesmn 0:c1910e04fc6c 1066
charlesmn 0:c1910e04fc6c 1067
charlesmn 0:c1910e04fc6c 1068 VL53LX_Error VL53L3CX_set_current_xtalk_settings(
charlesmn 0:c1910e04fc6c 1069
charlesmn 0:c1910e04fc6c 1070 VL53LX_xtalk_calibration_results_t *pxtalk
charlesmn 0:c1910e04fc6c 1071 );
charlesmn 0:c1910e04fc6c 1072
charlesmn 0:c1910e04fc6c 1073 VL53LX_Error VL53L3CX_load_patch();
charlesmn 0:c1910e04fc6c 1074
charlesmn 0:c1910e04fc6c 1075 VL53LX_Error VL53L3CX_unload_patch();
charlesmn 0:c1910e04fc6c 1076
charlesmn 0:c1910e04fc6c 1077
charlesmn 0:c1910e04fc6c 1078 /* vl53lx_register_funcs.h */
charlesmn 0:c1910e04fc6c 1079
charlesmn 0:c1910e04fc6c 1080
charlesmn 0:c1910e04fc6c 1081 VL53LX_Error VL53L3CX_i2c_encode_static_nvm_managed(
charlesmn 0:c1910e04fc6c 1082 VL53LX_static_nvm_managed_t *pdata,
charlesmn 0:c1910e04fc6c 1083 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1084 uint8_t *pbuffer);
charlesmn 0:c1910e04fc6c 1085
charlesmn 0:c1910e04fc6c 1086
charlesmn 0:c1910e04fc6c 1087
charlesmn 0:c1910e04fc6c 1088
charlesmn 0:c1910e04fc6c 1089 VL53LX_Error VL53L3CX_i2c_decode_static_nvm_managed(
charlesmn 0:c1910e04fc6c 1090 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1091 uint8_t *pbuffer,
charlesmn 0:c1910e04fc6c 1092 VL53LX_static_nvm_managed_t *pdata);
charlesmn 0:c1910e04fc6c 1093
charlesmn 0:c1910e04fc6c 1094
charlesmn 0:c1910e04fc6c 1095
charlesmn 0:c1910e04fc6c 1096
charlesmn 0:c1910e04fc6c 1097 VL53LX_Error VL53L3CX_set_static_nvm_managed(
charlesmn 0:c1910e04fc6c 1098 VL53LX_static_nvm_managed_t *pdata);
charlesmn 0:c1910e04fc6c 1099
charlesmn 0:c1910e04fc6c 1100
charlesmn 0:c1910e04fc6c 1101
charlesmn 0:c1910e04fc6c 1102
charlesmn 0:c1910e04fc6c 1103 VL53LX_Error VL53L3CX_get_static_nvm_managed(
charlesmn 0:c1910e04fc6c 1104 VL53LX_static_nvm_managed_t *pdata);
charlesmn 0:c1910e04fc6c 1105
charlesmn 0:c1910e04fc6c 1106
charlesmn 0:c1910e04fc6c 1107
charlesmn 0:c1910e04fc6c 1108
charlesmn 0:c1910e04fc6c 1109 VL53LX_Error VL53L3CX_i2c_encode_customer_nvm_managed(
charlesmn 0:c1910e04fc6c 1110 VL53LX_customer_nvm_managed_t *pdata,
charlesmn 0:c1910e04fc6c 1111 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1112 uint8_t *pbuffer);
charlesmn 0:c1910e04fc6c 1113
charlesmn 0:c1910e04fc6c 1114
charlesmn 0:c1910e04fc6c 1115
charlesmn 0:c1910e04fc6c 1116
charlesmn 0:c1910e04fc6c 1117 VL53LX_Error VL53L3CX_i2c_decode_customer_nvm_managed(
charlesmn 0:c1910e04fc6c 1118 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1119 uint8_t *pbuffer,
charlesmn 0:c1910e04fc6c 1120 VL53LX_customer_nvm_managed_t *pdata);
charlesmn 0:c1910e04fc6c 1121
charlesmn 0:c1910e04fc6c 1122
charlesmn 0:c1910e04fc6c 1123
charlesmn 0:c1910e04fc6c 1124
charlesmn 0:c1910e04fc6c 1125 VL53LX_Error VL53L3CX_set_customer_nvm_managed(
charlesmn 0:c1910e04fc6c 1126 VL53LX_customer_nvm_managed_t *pdata);
charlesmn 0:c1910e04fc6c 1127
charlesmn 0:c1910e04fc6c 1128
charlesmn 0:c1910e04fc6c 1129
charlesmn 0:c1910e04fc6c 1130
charlesmn 0:c1910e04fc6c 1131 VL53LX_Error VL53L3CX_get_customer_nvm_managed(
charlesmn 0:c1910e04fc6c 1132 VL53LX_customer_nvm_managed_t *pdata);
charlesmn 0:c1910e04fc6c 1133
charlesmn 0:c1910e04fc6c 1134
charlesmn 0:c1910e04fc6c 1135
charlesmn 0:c1910e04fc6c 1136
charlesmn 0:c1910e04fc6c 1137 VL53LX_Error VL53L3CX_i2c_encode_static_config(
charlesmn 0:c1910e04fc6c 1138 VL53LX_static_config_t *pdata,
charlesmn 0:c1910e04fc6c 1139 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1140 uint8_t *pbuffer);
charlesmn 0:c1910e04fc6c 1141
charlesmn 0:c1910e04fc6c 1142
charlesmn 0:c1910e04fc6c 1143
charlesmn 0:c1910e04fc6c 1144
charlesmn 0:c1910e04fc6c 1145 VL53LX_Error VL53L3CX_i2c_decode_static_config(
charlesmn 0:c1910e04fc6c 1146 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1147 uint8_t *pbuffer,
charlesmn 0:c1910e04fc6c 1148 VL53LX_static_config_t *pdata);
charlesmn 0:c1910e04fc6c 1149
charlesmn 0:c1910e04fc6c 1150
charlesmn 0:c1910e04fc6c 1151
charlesmn 0:c1910e04fc6c 1152
charlesmn 0:c1910e04fc6c 1153 VL53LX_Error VL53L3CX_set_static_config(
charlesmn 0:c1910e04fc6c 1154 VL53LX_static_config_t *pdata);
charlesmn 0:c1910e04fc6c 1155
charlesmn 0:c1910e04fc6c 1156
charlesmn 0:c1910e04fc6c 1157
charlesmn 0:c1910e04fc6c 1158
charlesmn 0:c1910e04fc6c 1159 VL53LX_Error VL53L3CX_get_static_config(
charlesmn 0:c1910e04fc6c 1160 VL53LX_static_config_t *pdata);
charlesmn 0:c1910e04fc6c 1161
charlesmn 0:c1910e04fc6c 1162
charlesmn 0:c1910e04fc6c 1163
charlesmn 0:c1910e04fc6c 1164
charlesmn 0:c1910e04fc6c 1165 VL53LX_Error VL53L3CX_i2c_encode_general_config(
charlesmn 0:c1910e04fc6c 1166 VL53LX_general_config_t *pdata,
charlesmn 0:c1910e04fc6c 1167 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1168 uint8_t *pbuffer);
charlesmn 0:c1910e04fc6c 1169
charlesmn 0:c1910e04fc6c 1170
charlesmn 0:c1910e04fc6c 1171
charlesmn 0:c1910e04fc6c 1172
charlesmn 0:c1910e04fc6c 1173 VL53LX_Error VL53L3CX_i2c_decode_general_config(
charlesmn 0:c1910e04fc6c 1174 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1175 uint8_t *pbuffer,
charlesmn 0:c1910e04fc6c 1176 VL53LX_general_config_t *pdata);
charlesmn 0:c1910e04fc6c 1177
charlesmn 0:c1910e04fc6c 1178
charlesmn 0:c1910e04fc6c 1179
charlesmn 0:c1910e04fc6c 1180
charlesmn 0:c1910e04fc6c 1181 VL53LX_Error VL53L3CX_set_general_config(
charlesmn 0:c1910e04fc6c 1182 VL53LX_general_config_t *pdata);
charlesmn 0:c1910e04fc6c 1183
charlesmn 0:c1910e04fc6c 1184
charlesmn 0:c1910e04fc6c 1185
charlesmn 0:c1910e04fc6c 1186
charlesmn 0:c1910e04fc6c 1187 VL53LX_Error VL53L3CX_get_general_config(
charlesmn 0:c1910e04fc6c 1188 VL53LX_general_config_t *pdata);
charlesmn 0:c1910e04fc6c 1189
charlesmn 0:c1910e04fc6c 1190
charlesmn 0:c1910e04fc6c 1191
charlesmn 0:c1910e04fc6c 1192
charlesmn 0:c1910e04fc6c 1193 VL53LX_Error VL53L3CX_i2c_encode_timing_config(
charlesmn 0:c1910e04fc6c 1194 VL53LX_timing_config_t *pdata,
charlesmn 0:c1910e04fc6c 1195 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1196 uint8_t *pbuffer);
charlesmn 0:c1910e04fc6c 1197
charlesmn 0:c1910e04fc6c 1198
charlesmn 0:c1910e04fc6c 1199
charlesmn 0:c1910e04fc6c 1200
charlesmn 0:c1910e04fc6c 1201 VL53LX_Error VL53L3CX_i2c_decode_timing_config(
charlesmn 0:c1910e04fc6c 1202 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1203 uint8_t *pbuffer,
charlesmn 0:c1910e04fc6c 1204 VL53LX_timing_config_t *pdata);
charlesmn 0:c1910e04fc6c 1205
charlesmn 0:c1910e04fc6c 1206
charlesmn 0:c1910e04fc6c 1207
charlesmn 0:c1910e04fc6c 1208
charlesmn 0:c1910e04fc6c 1209 VL53LX_Error VL53L3CX_set_timing_config(
charlesmn 0:c1910e04fc6c 1210 VL53LX_timing_config_t *pdata);
charlesmn 0:c1910e04fc6c 1211
charlesmn 0:c1910e04fc6c 1212
charlesmn 0:c1910e04fc6c 1213
charlesmn 0:c1910e04fc6c 1214
charlesmn 0:c1910e04fc6c 1215 VL53LX_Error VL53L3CX_get_timing_config(
charlesmn 0:c1910e04fc6c 1216 VL53LX_timing_config_t *pdata);
charlesmn 0:c1910e04fc6c 1217
charlesmn 0:c1910e04fc6c 1218
charlesmn 0:c1910e04fc6c 1219
charlesmn 0:c1910e04fc6c 1220
charlesmn 0:c1910e04fc6c 1221 VL53LX_Error VL53L3CX_i2c_encode_dynamic_config(
charlesmn 0:c1910e04fc6c 1222 VL53LX_dynamic_config_t *pdata,
charlesmn 0:c1910e04fc6c 1223 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1224 uint8_t *pbuffer);
charlesmn 0:c1910e04fc6c 1225
charlesmn 0:c1910e04fc6c 1226
charlesmn 0:c1910e04fc6c 1227
charlesmn 0:c1910e04fc6c 1228
charlesmn 0:c1910e04fc6c 1229 VL53LX_Error VL53L3CX_i2c_decode_dynamic_config(
charlesmn 0:c1910e04fc6c 1230 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1231 uint8_t *pbuffer,
charlesmn 0:c1910e04fc6c 1232 VL53LX_dynamic_config_t *pdata);
charlesmn 0:c1910e04fc6c 1233
charlesmn 0:c1910e04fc6c 1234
charlesmn 0:c1910e04fc6c 1235
charlesmn 0:c1910e04fc6c 1236
charlesmn 0:c1910e04fc6c 1237 VL53LX_Error VL53L3CX_set_dynamic_config(
charlesmn 0:c1910e04fc6c 1238 VL53LX_dynamic_config_t *pdata);
charlesmn 0:c1910e04fc6c 1239
charlesmn 0:c1910e04fc6c 1240
charlesmn 0:c1910e04fc6c 1241
charlesmn 0:c1910e04fc6c 1242
charlesmn 0:c1910e04fc6c 1243 VL53LX_Error VL53L3CX_get_dynamic_config(
charlesmn 0:c1910e04fc6c 1244 VL53LX_dynamic_config_t *pdata);
charlesmn 0:c1910e04fc6c 1245
charlesmn 0:c1910e04fc6c 1246
charlesmn 0:c1910e04fc6c 1247
charlesmn 0:c1910e04fc6c 1248
charlesmn 0:c1910e04fc6c 1249 VL53LX_Error VL53L3CX_i2c_encode_system_control(
charlesmn 0:c1910e04fc6c 1250 VL53LX_system_control_t *pdata,
charlesmn 0:c1910e04fc6c 1251 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1252 uint8_t *pbuffer);
charlesmn 0:c1910e04fc6c 1253
charlesmn 0:c1910e04fc6c 1254
charlesmn 0:c1910e04fc6c 1255
charlesmn 0:c1910e04fc6c 1256
charlesmn 0:c1910e04fc6c 1257 VL53LX_Error VL53L3CX_i2c_decode_system_control(
charlesmn 0:c1910e04fc6c 1258 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1259 uint8_t *pbuffer,
charlesmn 0:c1910e04fc6c 1260 VL53LX_system_control_t *pdata);
charlesmn 0:c1910e04fc6c 1261
charlesmn 0:c1910e04fc6c 1262
charlesmn 0:c1910e04fc6c 1263
charlesmn 0:c1910e04fc6c 1264
charlesmn 0:c1910e04fc6c 1265 VL53LX_Error VL53L3CX_set_system_control(
charlesmn 0:c1910e04fc6c 1266 VL53LX_system_control_t *pdata);
charlesmn 0:c1910e04fc6c 1267
charlesmn 0:c1910e04fc6c 1268
charlesmn 0:c1910e04fc6c 1269
charlesmn 0:c1910e04fc6c 1270
charlesmn 0:c1910e04fc6c 1271 VL53LX_Error VL53L3CX_get_system_control(
charlesmn 0:c1910e04fc6c 1272 VL53LX_system_control_t *pdata);
charlesmn 0:c1910e04fc6c 1273
charlesmn 0:c1910e04fc6c 1274
charlesmn 0:c1910e04fc6c 1275
charlesmn 0:c1910e04fc6c 1276
charlesmn 0:c1910e04fc6c 1277 VL53LX_Error VL53L3CX_i2c_encode_system_results(
charlesmn 0:c1910e04fc6c 1278 VL53LX_system_results_t *pdata,
charlesmn 0:c1910e04fc6c 1279 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1280 uint8_t *pbuffer);
charlesmn 0:c1910e04fc6c 1281
charlesmn 0:c1910e04fc6c 1282
charlesmn 0:c1910e04fc6c 1283
charlesmn 0:c1910e04fc6c 1284
charlesmn 0:c1910e04fc6c 1285 VL53LX_Error VL53L3CX_i2c_decode_system_results(
charlesmn 0:c1910e04fc6c 1286 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1287 uint8_t *pbuffer,
charlesmn 0:c1910e04fc6c 1288 VL53LX_system_results_t *pdata);
charlesmn 0:c1910e04fc6c 1289
charlesmn 0:c1910e04fc6c 1290
charlesmn 0:c1910e04fc6c 1291
charlesmn 0:c1910e04fc6c 1292
charlesmn 0:c1910e04fc6c 1293 VL53LX_Error VL53L3CX_set_system_results(
charlesmn 0:c1910e04fc6c 1294 VL53LX_system_results_t *pdata);
charlesmn 0:c1910e04fc6c 1295
charlesmn 0:c1910e04fc6c 1296
charlesmn 0:c1910e04fc6c 1297
charlesmn 0:c1910e04fc6c 1298
charlesmn 0:c1910e04fc6c 1299 VL53LX_Error VL53L3CX_get_system_results(
charlesmn 0:c1910e04fc6c 1300 VL53LX_system_results_t *pdata);
charlesmn 0:c1910e04fc6c 1301
charlesmn 0:c1910e04fc6c 1302
charlesmn 0:c1910e04fc6c 1303
charlesmn 0:c1910e04fc6c 1304
charlesmn 0:c1910e04fc6c 1305 VL53LX_Error VL53L3CX_i2c_encode_core_results(
charlesmn 0:c1910e04fc6c 1306 VL53LX_core_results_t *pdata,
charlesmn 0:c1910e04fc6c 1307 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1308 uint8_t *pbuffer);
charlesmn 0:c1910e04fc6c 1309
charlesmn 0:c1910e04fc6c 1310
charlesmn 0:c1910e04fc6c 1311
charlesmn 0:c1910e04fc6c 1312
charlesmn 0:c1910e04fc6c 1313 VL53LX_Error VL53L3CX_i2c_decode_core_results(
charlesmn 0:c1910e04fc6c 1314 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1315 uint8_t *pbuffer,
charlesmn 0:c1910e04fc6c 1316 VL53LX_core_results_t *pdata);
charlesmn 0:c1910e04fc6c 1317
charlesmn 0:c1910e04fc6c 1318
charlesmn 0:c1910e04fc6c 1319
charlesmn 0:c1910e04fc6c 1320
charlesmn 0:c1910e04fc6c 1321 VL53LX_Error VL53L3CX_set_core_results(
charlesmn 0:c1910e04fc6c 1322 VL53LX_core_results_t *pdata);
charlesmn 0:c1910e04fc6c 1323
charlesmn 0:c1910e04fc6c 1324
charlesmn 0:c1910e04fc6c 1325
charlesmn 0:c1910e04fc6c 1326
charlesmn 0:c1910e04fc6c 1327 VL53LX_Error VL53L3CX_get_core_results(
charlesmn 0:c1910e04fc6c 1328 VL53LX_core_results_t *pdata);
charlesmn 0:c1910e04fc6c 1329
charlesmn 0:c1910e04fc6c 1330
charlesmn 0:c1910e04fc6c 1331
charlesmn 0:c1910e04fc6c 1332
charlesmn 0:c1910e04fc6c 1333 VL53LX_Error VL53L3CX_i2c_encode_debug_results(
charlesmn 0:c1910e04fc6c 1334 VL53LX_debug_results_t *pdata,
charlesmn 0:c1910e04fc6c 1335 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1336 uint8_t *pbuffer);
charlesmn 0:c1910e04fc6c 1337
charlesmn 0:c1910e04fc6c 1338
charlesmn 0:c1910e04fc6c 1339
charlesmn 0:c1910e04fc6c 1340
charlesmn 0:c1910e04fc6c 1341 VL53LX_Error VL53L3CX_i2c_decode_debug_results(
charlesmn 0:c1910e04fc6c 1342 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1343 uint8_t *pbuffer,
charlesmn 0:c1910e04fc6c 1344 VL53LX_debug_results_t *pdata);
charlesmn 0:c1910e04fc6c 1345
charlesmn 0:c1910e04fc6c 1346
charlesmn 0:c1910e04fc6c 1347
charlesmn 0:c1910e04fc6c 1348
charlesmn 0:c1910e04fc6c 1349 VL53LX_Error VL53L3CX_set_debug_results(
charlesmn 0:c1910e04fc6c 1350 VL53LX_debug_results_t *pdata);
charlesmn 0:c1910e04fc6c 1351
charlesmn 0:c1910e04fc6c 1352
charlesmn 0:c1910e04fc6c 1353
charlesmn 0:c1910e04fc6c 1354
charlesmn 0:c1910e04fc6c 1355 VL53LX_Error VL53L3CX_get_debug_results(
charlesmn 0:c1910e04fc6c 1356 VL53LX_debug_results_t *pdata);
charlesmn 0:c1910e04fc6c 1357
charlesmn 0:c1910e04fc6c 1358
charlesmn 0:c1910e04fc6c 1359
charlesmn 0:c1910e04fc6c 1360
charlesmn 0:c1910e04fc6c 1361 VL53LX_Error VL53L3CX_i2c_encode_nvm_copy_data(
charlesmn 0:c1910e04fc6c 1362 VL53LX_nvm_copy_data_t *pdata,
charlesmn 0:c1910e04fc6c 1363 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1364 uint8_t *pbuffer);
charlesmn 0:c1910e04fc6c 1365
charlesmn 0:c1910e04fc6c 1366
charlesmn 0:c1910e04fc6c 1367
charlesmn 0:c1910e04fc6c 1368
charlesmn 0:c1910e04fc6c 1369 VL53LX_Error VL53L3CX_i2c_decode_nvm_copy_data(
charlesmn 0:c1910e04fc6c 1370 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1371 uint8_t *pbuffer,
charlesmn 0:c1910e04fc6c 1372 VL53LX_nvm_copy_data_t *pdata);
charlesmn 0:c1910e04fc6c 1373
charlesmn 0:c1910e04fc6c 1374
charlesmn 0:c1910e04fc6c 1375
charlesmn 0:c1910e04fc6c 1376
charlesmn 0:c1910e04fc6c 1377 VL53LX_Error VL53L3CX_set_nvm_copy_data(
charlesmn 0:c1910e04fc6c 1378 VL53LX_nvm_copy_data_t *pdata);
charlesmn 0:c1910e04fc6c 1379
charlesmn 0:c1910e04fc6c 1380
charlesmn 0:c1910e04fc6c 1381
charlesmn 0:c1910e04fc6c 1382
charlesmn 0:c1910e04fc6c 1383 VL53LX_Error VL53L3CX_get_nvm_copy_data(
charlesmn 0:c1910e04fc6c 1384 VL53LX_nvm_copy_data_t *pdata);
charlesmn 0:c1910e04fc6c 1385
charlesmn 0:c1910e04fc6c 1386
charlesmn 0:c1910e04fc6c 1387
charlesmn 0:c1910e04fc6c 1388
charlesmn 0:c1910e04fc6c 1389 VL53LX_Error VL53L3CX_i2c_encode_prev_shadow_system_results(
charlesmn 0:c1910e04fc6c 1390 VL53LX_prev_shadow_system_results_t *pdata,
charlesmn 0:c1910e04fc6c 1391 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1392 uint8_t *pbuffer);
charlesmn 0:c1910e04fc6c 1393
charlesmn 0:c1910e04fc6c 1394
charlesmn 0:c1910e04fc6c 1395
charlesmn 0:c1910e04fc6c 1396
charlesmn 0:c1910e04fc6c 1397 VL53LX_Error VL53L3CX_i2c_decode_prev_shadow_system_results(
charlesmn 0:c1910e04fc6c 1398 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1399 uint8_t *pbuffer,
charlesmn 0:c1910e04fc6c 1400 VL53LX_prev_shadow_system_results_t *pdata);
charlesmn 0:c1910e04fc6c 1401
charlesmn 0:c1910e04fc6c 1402
charlesmn 0:c1910e04fc6c 1403
charlesmn 0:c1910e04fc6c 1404
charlesmn 0:c1910e04fc6c 1405 VL53LX_Error VL53L3CX_set_prev_shadow_system_results(
charlesmn 0:c1910e04fc6c 1406 VL53LX_prev_shadow_system_results_t *pdata);
charlesmn 0:c1910e04fc6c 1407
charlesmn 0:c1910e04fc6c 1408
charlesmn 0:c1910e04fc6c 1409
charlesmn 0:c1910e04fc6c 1410
charlesmn 0:c1910e04fc6c 1411 VL53LX_Error VL53L3CX_get_prev_shadow_system_results(
charlesmn 0:c1910e04fc6c 1412 VL53LX_prev_shadow_system_results_t *pdata);
charlesmn 0:c1910e04fc6c 1413
charlesmn 0:c1910e04fc6c 1414
charlesmn 0:c1910e04fc6c 1415
charlesmn 0:c1910e04fc6c 1416
charlesmn 0:c1910e04fc6c 1417 VL53LX_Error VL53L3CX_i2c_encode_prev_shadow_core_results(
charlesmn 0:c1910e04fc6c 1418 VL53LX_prev_shadow_core_results_t *pdata,
charlesmn 0:c1910e04fc6c 1419 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1420 uint8_t *pbuffer);
charlesmn 0:c1910e04fc6c 1421
charlesmn 0:c1910e04fc6c 1422
charlesmn 0:c1910e04fc6c 1423
charlesmn 0:c1910e04fc6c 1424
charlesmn 0:c1910e04fc6c 1425 VL53LX_Error VL53L3CX_i2c_decode_prev_shadow_core_results(
charlesmn 0:c1910e04fc6c 1426 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1427 uint8_t *pbuffer,
charlesmn 0:c1910e04fc6c 1428 VL53LX_prev_shadow_core_results_t *pdata);
charlesmn 0:c1910e04fc6c 1429
charlesmn 0:c1910e04fc6c 1430
charlesmn 0:c1910e04fc6c 1431
charlesmn 0:c1910e04fc6c 1432
charlesmn 0:c1910e04fc6c 1433 VL53LX_Error VL53L3CX_set_prev_shadow_core_results(
charlesmn 0:c1910e04fc6c 1434 VL53LX_prev_shadow_core_results_t *pdata);
charlesmn 0:c1910e04fc6c 1435
charlesmn 0:c1910e04fc6c 1436
charlesmn 0:c1910e04fc6c 1437
charlesmn 0:c1910e04fc6c 1438
charlesmn 0:c1910e04fc6c 1439 VL53LX_Error VL53L3CX_get_prev_shadow_core_results(
charlesmn 0:c1910e04fc6c 1440 VL53LX_prev_shadow_core_results_t *pdata);
charlesmn 0:c1910e04fc6c 1441
charlesmn 0:c1910e04fc6c 1442
charlesmn 0:c1910e04fc6c 1443
charlesmn 0:c1910e04fc6c 1444
charlesmn 0:c1910e04fc6c 1445 VL53LX_Error VL53L3CX_i2c_encode_patch_debug(
charlesmn 0:c1910e04fc6c 1446 VL53LX_patch_debug_t *pdata,
charlesmn 0:c1910e04fc6c 1447 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1448 uint8_t *pbuffer);
charlesmn 0:c1910e04fc6c 1449
charlesmn 0:c1910e04fc6c 1450
charlesmn 0:c1910e04fc6c 1451
charlesmn 0:c1910e04fc6c 1452
charlesmn 0:c1910e04fc6c 1453 VL53LX_Error VL53L3CX_i2c_decode_patch_debug(
charlesmn 0:c1910e04fc6c 1454 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1455 uint8_t *pbuffer,
charlesmn 0:c1910e04fc6c 1456 VL53LX_patch_debug_t *pdata);
charlesmn 0:c1910e04fc6c 1457
charlesmn 0:c1910e04fc6c 1458
charlesmn 0:c1910e04fc6c 1459
charlesmn 0:c1910e04fc6c 1460
charlesmn 0:c1910e04fc6c 1461 VL53LX_Error VL53L3CX_set_patch_debug(
charlesmn 0:c1910e04fc6c 1462 VL53LX_patch_debug_t *pdata);
charlesmn 0:c1910e04fc6c 1463
charlesmn 0:c1910e04fc6c 1464
charlesmn 0:c1910e04fc6c 1465
charlesmn 0:c1910e04fc6c 1466
charlesmn 0:c1910e04fc6c 1467 VL53LX_Error VL53L3CX_get_patch_debug(
charlesmn 0:c1910e04fc6c 1468 VL53LX_patch_debug_t *pdata);
charlesmn 0:c1910e04fc6c 1469
charlesmn 0:c1910e04fc6c 1470
charlesmn 0:c1910e04fc6c 1471
charlesmn 0:c1910e04fc6c 1472
charlesmn 0:c1910e04fc6c 1473 VL53LX_Error VL53L3CX_i2c_encode_gph_general_config(
charlesmn 0:c1910e04fc6c 1474 VL53LX_gph_general_config_t *pdata,
charlesmn 0:c1910e04fc6c 1475 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1476 uint8_t *pbuffer);
charlesmn 0:c1910e04fc6c 1477
charlesmn 0:c1910e04fc6c 1478
charlesmn 0:c1910e04fc6c 1479
charlesmn 0:c1910e04fc6c 1480
charlesmn 0:c1910e04fc6c 1481 VL53LX_Error VL53L3CX_i2c_decode_gph_general_config(
charlesmn 0:c1910e04fc6c 1482 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1483 uint8_t *pbuffer,
charlesmn 0:c1910e04fc6c 1484 VL53LX_gph_general_config_t *pdata);
charlesmn 0:c1910e04fc6c 1485
charlesmn 0:c1910e04fc6c 1486
charlesmn 0:c1910e04fc6c 1487
charlesmn 0:c1910e04fc6c 1488
charlesmn 0:c1910e04fc6c 1489 VL53LX_Error VL53L3CX_set_gph_general_config(
charlesmn 0:c1910e04fc6c 1490 VL53LX_gph_general_config_t *pdata);
charlesmn 0:c1910e04fc6c 1491
charlesmn 0:c1910e04fc6c 1492
charlesmn 0:c1910e04fc6c 1493
charlesmn 0:c1910e04fc6c 1494
charlesmn 0:c1910e04fc6c 1495 VL53LX_Error VL53L3CX_get_gph_general_config(
charlesmn 0:c1910e04fc6c 1496 VL53LX_gph_general_config_t *pdata);
charlesmn 0:c1910e04fc6c 1497
charlesmn 0:c1910e04fc6c 1498
charlesmn 0:c1910e04fc6c 1499
charlesmn 0:c1910e04fc6c 1500
charlesmn 0:c1910e04fc6c 1501 VL53LX_Error VL53L3CX_i2c_encode_gph_static_config(
charlesmn 0:c1910e04fc6c 1502 VL53LX_gph_static_config_t *pdata,
charlesmn 0:c1910e04fc6c 1503 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1504 uint8_t *pbuffer);
charlesmn 0:c1910e04fc6c 1505
charlesmn 0:c1910e04fc6c 1506
charlesmn 0:c1910e04fc6c 1507
charlesmn 0:c1910e04fc6c 1508
charlesmn 0:c1910e04fc6c 1509 VL53LX_Error VL53L3CX_i2c_decode_gph_static_config(
charlesmn 0:c1910e04fc6c 1510 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1511 uint8_t *pbuffer,
charlesmn 0:c1910e04fc6c 1512 VL53LX_gph_static_config_t *pdata);
charlesmn 0:c1910e04fc6c 1513
charlesmn 0:c1910e04fc6c 1514
charlesmn 0:c1910e04fc6c 1515
charlesmn 0:c1910e04fc6c 1516
charlesmn 0:c1910e04fc6c 1517 VL53LX_Error VL53L3CX_set_gph_static_config(
charlesmn 0:c1910e04fc6c 1518 VL53LX_gph_static_config_t *pdata);
charlesmn 0:c1910e04fc6c 1519
charlesmn 0:c1910e04fc6c 1520
charlesmn 0:c1910e04fc6c 1521
charlesmn 0:c1910e04fc6c 1522
charlesmn 0:c1910e04fc6c 1523 VL53LX_Error VL53L3CX_get_gph_static_config(
charlesmn 0:c1910e04fc6c 1524 VL53LX_gph_static_config_t *pdata);
charlesmn 0:c1910e04fc6c 1525
charlesmn 0:c1910e04fc6c 1526
charlesmn 0:c1910e04fc6c 1527
charlesmn 0:c1910e04fc6c 1528
charlesmn 0:c1910e04fc6c 1529 VL53LX_Error VL53L3CX_i2c_encode_gph_timing_config(
charlesmn 0:c1910e04fc6c 1530 VL53LX_gph_timing_config_t *pdata,
charlesmn 0:c1910e04fc6c 1531 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1532 uint8_t *pbuffer);
charlesmn 0:c1910e04fc6c 1533
charlesmn 0:c1910e04fc6c 1534
charlesmn 0:c1910e04fc6c 1535
charlesmn 0:c1910e04fc6c 1536
charlesmn 0:c1910e04fc6c 1537 VL53LX_Error VL53L3CX_i2c_decode_gph_timing_config(
charlesmn 0:c1910e04fc6c 1538 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1539 uint8_t *pbuffer,
charlesmn 0:c1910e04fc6c 1540 VL53LX_gph_timing_config_t *pdata);
charlesmn 0:c1910e04fc6c 1541
charlesmn 0:c1910e04fc6c 1542
charlesmn 0:c1910e04fc6c 1543
charlesmn 0:c1910e04fc6c 1544
charlesmn 0:c1910e04fc6c 1545 VL53LX_Error VL53L3CX_set_gph_timing_config(
charlesmn 0:c1910e04fc6c 1546 VL53LX_gph_timing_config_t *pdata);
charlesmn 0:c1910e04fc6c 1547
charlesmn 0:c1910e04fc6c 1548
charlesmn 0:c1910e04fc6c 1549
charlesmn 0:c1910e04fc6c 1550
charlesmn 0:c1910e04fc6c 1551 VL53LX_Error VL53L3CX_get_gph_timing_config(
charlesmn 0:c1910e04fc6c 1552 VL53LX_gph_timing_config_t *pdata);
charlesmn 0:c1910e04fc6c 1553
charlesmn 0:c1910e04fc6c 1554
charlesmn 0:c1910e04fc6c 1555
charlesmn 0:c1910e04fc6c 1556
charlesmn 0:c1910e04fc6c 1557 VL53LX_Error VL53L3CX_i2c_encode_fw_internal(
charlesmn 0:c1910e04fc6c 1558 VL53LX_fw_internal_t *pdata,
charlesmn 0:c1910e04fc6c 1559 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1560 uint8_t *pbuffer);
charlesmn 0:c1910e04fc6c 1561
charlesmn 0:c1910e04fc6c 1562
charlesmn 0:c1910e04fc6c 1563
charlesmn 0:c1910e04fc6c 1564
charlesmn 0:c1910e04fc6c 1565 VL53LX_Error VL53L3CX_i2c_decode_fw_internal(
charlesmn 0:c1910e04fc6c 1566 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1567 uint8_t *pbuffer,
charlesmn 0:c1910e04fc6c 1568 VL53LX_fw_internal_t *pdata);
charlesmn 0:c1910e04fc6c 1569
charlesmn 0:c1910e04fc6c 1570
charlesmn 0:c1910e04fc6c 1571
charlesmn 0:c1910e04fc6c 1572
charlesmn 0:c1910e04fc6c 1573 VL53LX_Error VL53L3CX_set_fw_internal(
charlesmn 0:c1910e04fc6c 1574 VL53LX_fw_internal_t *pdata);
charlesmn 0:c1910e04fc6c 1575
charlesmn 0:c1910e04fc6c 1576
charlesmn 0:c1910e04fc6c 1577
charlesmn 0:c1910e04fc6c 1578
charlesmn 0:c1910e04fc6c 1579 VL53LX_Error VL53L3CX_get_fw_internal(
charlesmn 0:c1910e04fc6c 1580 VL53LX_fw_internal_t *pdata);
charlesmn 0:c1910e04fc6c 1581
charlesmn 0:c1910e04fc6c 1582
charlesmn 0:c1910e04fc6c 1583
charlesmn 0:c1910e04fc6c 1584
charlesmn 0:c1910e04fc6c 1585 VL53LX_Error VL53L3CX_i2c_encode_patch_results(
charlesmn 0:c1910e04fc6c 1586 VL53LX_patch_results_t *pdata,
charlesmn 0:c1910e04fc6c 1587 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1588 uint8_t *pbuffer);
charlesmn 0:c1910e04fc6c 1589
charlesmn 0:c1910e04fc6c 1590
charlesmn 0:c1910e04fc6c 1591
charlesmn 0:c1910e04fc6c 1592
charlesmn 0:c1910e04fc6c 1593 VL53LX_Error VL53L3CX_i2c_decode_patch_results(
charlesmn 0:c1910e04fc6c 1594 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1595 uint8_t *pbuffer,
charlesmn 0:c1910e04fc6c 1596 VL53LX_patch_results_t *pdata);
charlesmn 0:c1910e04fc6c 1597
charlesmn 0:c1910e04fc6c 1598
charlesmn 0:c1910e04fc6c 1599
charlesmn 0:c1910e04fc6c 1600
charlesmn 0:c1910e04fc6c 1601 VL53LX_Error VL53L3CX_set_patch_results(
charlesmn 0:c1910e04fc6c 1602 VL53LX_patch_results_t *pdata);
charlesmn 0:c1910e04fc6c 1603
charlesmn 0:c1910e04fc6c 1604
charlesmn 0:c1910e04fc6c 1605
charlesmn 0:c1910e04fc6c 1606
charlesmn 0:c1910e04fc6c 1607 VL53LX_Error VL53L3CX_get_patch_results(
charlesmn 0:c1910e04fc6c 1608 VL53LX_patch_results_t *pdata);
charlesmn 0:c1910e04fc6c 1609
charlesmn 0:c1910e04fc6c 1610
charlesmn 0:c1910e04fc6c 1611
charlesmn 0:c1910e04fc6c 1612
charlesmn 0:c1910e04fc6c 1613 VL53LX_Error VL53L3CX_i2c_encode_shadow_system_results(
charlesmn 0:c1910e04fc6c 1614 VL53LX_shadow_system_results_t *pdata,
charlesmn 0:c1910e04fc6c 1615 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1616 uint8_t *pbuffer);
charlesmn 0:c1910e04fc6c 1617
charlesmn 0:c1910e04fc6c 1618
charlesmn 0:c1910e04fc6c 1619
charlesmn 0:c1910e04fc6c 1620
charlesmn 0:c1910e04fc6c 1621 VL53LX_Error VL53L3CX_i2c_decode_shadow_system_results(
charlesmn 0:c1910e04fc6c 1622 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1623 uint8_t *pbuffer,
charlesmn 0:c1910e04fc6c 1624 VL53LX_shadow_system_results_t *pdata);
charlesmn 0:c1910e04fc6c 1625
charlesmn 0:c1910e04fc6c 1626
charlesmn 0:c1910e04fc6c 1627
charlesmn 0:c1910e04fc6c 1628
charlesmn 0:c1910e04fc6c 1629 VL53LX_Error VL53L3CX_set_shadow_system_results(
charlesmn 0:c1910e04fc6c 1630 VL53LX_shadow_system_results_t *pdata);
charlesmn 0:c1910e04fc6c 1631
charlesmn 0:c1910e04fc6c 1632
charlesmn 0:c1910e04fc6c 1633
charlesmn 0:c1910e04fc6c 1634
charlesmn 0:c1910e04fc6c 1635 VL53LX_Error VL53L3CX_get_shadow_system_results(
charlesmn 0:c1910e04fc6c 1636 VL53LX_shadow_system_results_t *pdata);
charlesmn 0:c1910e04fc6c 1637
charlesmn 0:c1910e04fc6c 1638
charlesmn 0:c1910e04fc6c 1639
charlesmn 0:c1910e04fc6c 1640
charlesmn 0:c1910e04fc6c 1641 VL53LX_Error VL53L3CX_i2c_encode_shadow_core_results(
charlesmn 0:c1910e04fc6c 1642 VL53LX_shadow_core_results_t *pdata,
charlesmn 0:c1910e04fc6c 1643 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1644 uint8_t *pbuffer);
charlesmn 0:c1910e04fc6c 1645
charlesmn 0:c1910e04fc6c 1646
charlesmn 0:c1910e04fc6c 1647
charlesmn 0:c1910e04fc6c 1648
charlesmn 0:c1910e04fc6c 1649 VL53LX_Error VL53L3CX_i2c_decode_shadow_core_results(
charlesmn 0:c1910e04fc6c 1650 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1651 uint8_t *pbuffer,
charlesmn 0:c1910e04fc6c 1652 VL53LX_shadow_core_results_t *pdata);
charlesmn 0:c1910e04fc6c 1653
charlesmn 0:c1910e04fc6c 1654
charlesmn 0:c1910e04fc6c 1655
charlesmn 0:c1910e04fc6c 1656
charlesmn 0:c1910e04fc6c 1657 VL53LX_Error VL53L3CX_set_shadow_core_results(
charlesmn 0:c1910e04fc6c 1658 VL53LX_shadow_core_results_t *pdata);
charlesmn 0:c1910e04fc6c 1659
charlesmn 0:c1910e04fc6c 1660
charlesmn 0:c1910e04fc6c 1661
charlesmn 0:c1910e04fc6c 1662
charlesmn 0:c1910e04fc6c 1663 VL53LX_Error VL53L3CX_get_shadow_core_results(
charlesmn 0:c1910e04fc6c 1664 VL53LX_shadow_core_results_t *pdata);
charlesmn 0:c1910e04fc6c 1665
charlesmn 0:c1910e04fc6c 1666
charlesmn 0:c1910e04fc6c 1667
charlesmn 0:c1910e04fc6c 1668 /* vl53lx_nvm.h */
charlesmn 0:c1910e04fc6c 1669
charlesmn 0:c1910e04fc6c 1670
charlesmn 0:c1910e04fc6c 1671 VL53LX_Error VL53L3CX_nvm_enable(
charlesmn 0:c1910e04fc6c 1672 uint16_t nvm_ctrl_pulse_width,
charlesmn 0:c1910e04fc6c 1673 int32_t nvm_power_up_delay_us);
charlesmn 0:c1910e04fc6c 1674
charlesmn 0:c1910e04fc6c 1675
charlesmn 0:c1910e04fc6c 1676
charlesmn 0:c1910e04fc6c 1677
charlesmn 0:c1910e04fc6c 1678 VL53LX_Error VL53L3CX_nvm_read(
charlesmn 0:c1910e04fc6c 1679 uint8_t start_address,
charlesmn 0:c1910e04fc6c 1680 uint8_t count,
charlesmn 0:c1910e04fc6c 1681 uint8_t *pdata);
charlesmn 0:c1910e04fc6c 1682
charlesmn 0:c1910e04fc6c 1683
charlesmn 0:c1910e04fc6c 1684
charlesmn 0:c1910e04fc6c 1685
charlesmn 0:c1910e04fc6c 1686 VL53LX_Error VL53L3CX_nvm_disable();
charlesmn 0:c1910e04fc6c 1687
charlesmn 0:c1910e04fc6c 1688
charlesmn 0:c1910e04fc6c 1689
charlesmn 0:c1910e04fc6c 1690
charlesmn 0:c1910e04fc6c 1691 VL53LX_Error VL53L3CX_nvm_format_decode(
charlesmn 0:c1910e04fc6c 1692 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1693 uint8_t *pbuffer,
charlesmn 0:c1910e04fc6c 1694 VL53LX_decoded_nvm_data_t *pdata);
charlesmn 0:c1910e04fc6c 1695
charlesmn 0:c1910e04fc6c 1696
charlesmn 0:c1910e04fc6c 1697
charlesmn 0:c1910e04fc6c 1698
charlesmn 0:c1910e04fc6c 1699 VL53LX_Error VL53L3CX_nvm_decode_optical_centre(
charlesmn 0:c1910e04fc6c 1700 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1701 uint8_t *pbuffer,
charlesmn 0:c1910e04fc6c 1702 VL53LX_optical_centre_t *pdata);
charlesmn 0:c1910e04fc6c 1703
charlesmn 0:c1910e04fc6c 1704
charlesmn 0:c1910e04fc6c 1705
charlesmn 0:c1910e04fc6c 1706
charlesmn 0:c1910e04fc6c 1707 VL53LX_Error VL53L3CX_nvm_decode_cal_peak_rate_map(
charlesmn 0:c1910e04fc6c 1708 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1709 uint8_t *pbuffer,
charlesmn 0:c1910e04fc6c 1710 VL53LX_cal_peak_rate_map_t *pdata);
charlesmn 0:c1910e04fc6c 1711
charlesmn 0:c1910e04fc6c 1712
charlesmn 0:c1910e04fc6c 1713
charlesmn 0:c1910e04fc6c 1714
charlesmn 0:c1910e04fc6c 1715 VL53LX_Error VL53L3CX_nvm_decode_additional_offset_cal_data(
charlesmn 0:c1910e04fc6c 1716 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1717 uint8_t *pbuffer,
charlesmn 0:c1910e04fc6c 1718 VL53LX_additional_offset_cal_data_t *pdata);
charlesmn 0:c1910e04fc6c 1719
charlesmn 0:c1910e04fc6c 1720
charlesmn 0:c1910e04fc6c 1721
charlesmn 0:c1910e04fc6c 1722
charlesmn 0:c1910e04fc6c 1723 VL53LX_Error VL53L3CX_nvm_decode_fmt_range_results_data(
charlesmn 0:c1910e04fc6c 1724 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1725 uint8_t *pbuffer,
charlesmn 0:c1910e04fc6c 1726 VL53LX_decoded_nvm_fmt_range_data_t *pdata);
charlesmn 0:c1910e04fc6c 1727
charlesmn 0:c1910e04fc6c 1728
charlesmn 0:c1910e04fc6c 1729
charlesmn 0:c1910e04fc6c 1730
charlesmn 0:c1910e04fc6c 1731 VL53LX_Error VL53L3CX_nvm_decode_fmt_info(
charlesmn 0:c1910e04fc6c 1732 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1733 uint8_t *pbuffer,
charlesmn 0:c1910e04fc6c 1734 VL53LX_decoded_nvm_fmt_info_t *pdata);
charlesmn 0:c1910e04fc6c 1735
charlesmn 0:c1910e04fc6c 1736
charlesmn 0:c1910e04fc6c 1737
charlesmn 0:c1910e04fc6c 1738
charlesmn 0:c1910e04fc6c 1739 VL53LX_Error VL53L3CX_nvm_decode_ews_info(
charlesmn 0:c1910e04fc6c 1740 uint16_t buf_size,
charlesmn 0:c1910e04fc6c 1741 uint8_t *pbuffer,
charlesmn 0:c1910e04fc6c 1742 VL53LX_decoded_nvm_ews_info_t *pdata);
charlesmn 0:c1910e04fc6c 1743
charlesmn 0:c1910e04fc6c 1744
charlesmn 0:c1910e04fc6c 1745
charlesmn 0:c1910e04fc6c 1746
charlesmn 0:c1910e04fc6c 1747 void VL53L3CX_nvm_format_encode(
charlesmn 0:c1910e04fc6c 1748 VL53LX_decoded_nvm_data_t *pnvm_info,
charlesmn 0:c1910e04fc6c 1749 uint8_t *pnvm_data);
charlesmn 0:c1910e04fc6c 1750
charlesmn 0:c1910e04fc6c 1751
charlesmn 0:c1910e04fc6c 1752
charlesmn 0:c1910e04fc6c 1753
charlesmn 0:c1910e04fc6c 1754 VL53LX_Error VL53L3CX_read_nvm_raw_data(
charlesmn 0:c1910e04fc6c 1755 uint8_t start_address,
charlesmn 0:c1910e04fc6c 1756 uint8_t count,
charlesmn 0:c1910e04fc6c 1757 uint8_t *pnvm_raw_data);
charlesmn 0:c1910e04fc6c 1758
charlesmn 0:c1910e04fc6c 1759
charlesmn 0:c1910e04fc6c 1760
charlesmn 0:c1910e04fc6c 1761
charlesmn 0:c1910e04fc6c 1762 VL53LX_Error VL53L3CX_read_nvm(
charlesmn 0:c1910e04fc6c 1763 uint8_t nvm_format,
charlesmn 0:c1910e04fc6c 1764 VL53LX_decoded_nvm_data_t *pnvm_info);
charlesmn 0:c1910e04fc6c 1765
charlesmn 0:c1910e04fc6c 1766
charlesmn 0:c1910e04fc6c 1767
charlesmn 0:c1910e04fc6c 1768
charlesmn 0:c1910e04fc6c 1769 VL53LX_Error VL53L3CX_read_nvm_optical_centre(
charlesmn 0:c1910e04fc6c 1770 VL53LX_optical_centre_t *pcentre);
charlesmn 0:c1910e04fc6c 1771
charlesmn 0:c1910e04fc6c 1772
charlesmn 0:c1910e04fc6c 1773
charlesmn 0:c1910e04fc6c 1774
charlesmn 0:c1910e04fc6c 1775 VL53LX_Error VL53L3CX_read_nvm_cal_peak_rate_map(
charlesmn 0:c1910e04fc6c 1776 VL53LX_cal_peak_rate_map_t *pcal_data);
charlesmn 0:c1910e04fc6c 1777
charlesmn 0:c1910e04fc6c 1778
charlesmn 0:c1910e04fc6c 1779
charlesmn 0:c1910e04fc6c 1780
charlesmn 0:c1910e04fc6c 1781 VL53LX_Error VL53L3CX_read_nvm_additional_offset_cal_data(
charlesmn 0:c1910e04fc6c 1782 VL53LX_additional_offset_cal_data_t *pcal_data);
charlesmn 0:c1910e04fc6c 1783
charlesmn 0:c1910e04fc6c 1784
charlesmn 0:c1910e04fc6c 1785
charlesmn 0:c1910e04fc6c 1786
charlesmn 0:c1910e04fc6c 1787 VL53LX_Error VL53L3CX_read_nvm_fmt_range_results_data(
charlesmn 0:c1910e04fc6c 1788 uint16_t range_results_select,
charlesmn 0:c1910e04fc6c 1789 VL53LX_decoded_nvm_fmt_range_data_t *prange_data);
charlesmn 0:c1910e04fc6c 1790
charlesmn 0:c1910e04fc6c 1791
charlesmn 0:c1910e04fc6c 1792
charlesmn 0:c1910e04fc6c 1793 /* vl53lx_platform_ipp.h */
charlesmn 0:c1910e04fc6c 1794
charlesmn 0:c1910e04fc6c 1795 VL53LX_Error VL53L3CX_ipp_hist_process_data(
charlesmn 0:c1910e04fc6c 1796 VL53LX_dmax_calibration_data_t *pdmax_cal,
charlesmn 0:c1910e04fc6c 1797 VL53LX_hist_gen3_dmax_config_t *pdmax_cfg,
charlesmn 0:c1910e04fc6c 1798 VL53LX_hist_post_process_config_t *ppost_cfg,
charlesmn 0:c1910e04fc6c 1799 VL53LX_histogram_bin_data_t *pbins,
charlesmn 0:c1910e04fc6c 1800 VL53LX_xtalk_histogram_data_t *pxtalk,
charlesmn 0:c1910e04fc6c 1801 uint8_t *pArea1,
charlesmn 0:c1910e04fc6c 1802 uint8_t *pArea2,
charlesmn 0:c1910e04fc6c 1803 uint8_t *phisto_merge_nb,
charlesmn 0:c1910e04fc6c 1804 VL53LX_range_results_t *presults);
charlesmn 0:c1910e04fc6c 1805
charlesmn 0:c1910e04fc6c 1806 VL53LX_Error VL53L3CX_ipp_hist_ambient_dmax(
charlesmn 0:c1910e04fc6c 1807 uint16_t target_reflectance,
charlesmn 0:c1910e04fc6c 1808 VL53LX_dmax_calibration_data_t *pdmax_cal,
charlesmn 0:c1910e04fc6c 1809 VL53LX_hist_gen3_dmax_config_t *pdmax_cfg,
charlesmn 0:c1910e04fc6c 1810 VL53LX_histogram_bin_data_t *pbins,
charlesmn 0:c1910e04fc6c 1811 int16_t *pambient_dmax_mm);
charlesmn 0:c1910e04fc6c 1812
charlesmn 0:c1910e04fc6c 1813 VL53LX_Error VL53L3CX_ipp_xtalk_calibration_process_data(
charlesmn 0:c1910e04fc6c 1814 VL53LX_xtalk_range_results_t *pxtalk_ranges,
charlesmn 0:c1910e04fc6c 1815 VL53LX_xtalk_histogram_data_t *pxtalk_shape,
charlesmn 0:c1910e04fc6c 1816 VL53LX_xtalk_calibration_results_t *pxtalk_cal);
charlesmn 0:c1910e04fc6c 1817
charlesmn 0:c1910e04fc6c 1818
charlesmn 0:c1910e04fc6c 1819
charlesmn 0:c1910e04fc6c 1820
charlesmn 0:c1910e04fc6c 1821 /* vl53lx_hist_funcs.h */
charlesmn 0:c1910e04fc6c 1822
charlesmn 0:c1910e04fc6c 1823
charlesmn 0:c1910e04fc6c 1824 VL53LX_Error VL53L3CX_hist_process_data(
charlesmn 0:c1910e04fc6c 1825 VL53LX_dmax_calibration_data_t *pdmax_cal,
charlesmn 0:c1910e04fc6c 1826 VL53LX_hist_gen3_dmax_config_t *pdmax_cfg,
charlesmn 0:c1910e04fc6c 1827 VL53LX_hist_post_process_config_t *ppost_cfg,
charlesmn 0:c1910e04fc6c 1828 VL53LX_histogram_bin_data_t *pbins,
charlesmn 0:c1910e04fc6c 1829 VL53LX_xtalk_histogram_data_t *pxtalk,
charlesmn 0:c1910e04fc6c 1830 uint8_t *pArea1,
charlesmn 0:c1910e04fc6c 1831 uint8_t *pArea2,
charlesmn 0:c1910e04fc6c 1832 VL53LX_range_results_t *presults,
charlesmn 0:c1910e04fc6c 1833 uint8_t *HistMergeNumber);
charlesmn 0:c1910e04fc6c 1834
charlesmn 0:c1910e04fc6c 1835
charlesmn 0:c1910e04fc6c 1836 VL53LX_Error VL53L3CX_hist_ambient_dmax(
charlesmn 0:c1910e04fc6c 1837 uint16_t target_reflectance,
charlesmn 0:c1910e04fc6c 1838 VL53LX_dmax_calibration_data_t *pdmax_cal,
charlesmn 0:c1910e04fc6c 1839 VL53LX_hist_gen3_dmax_config_t *pdmax_cfg,
charlesmn 0:c1910e04fc6c 1840 VL53LX_histogram_bin_data_t *pbins,
charlesmn 0:c1910e04fc6c 1841 int16_t *pambient_dmax_mm);
charlesmn 0:c1910e04fc6c 1842
charlesmn 0:c1910e04fc6c 1843
charlesmn 0:c1910e04fc6c 1844 /* vl53lx_core_support.h */
charlesmn 0:c1910e04fc6c 1845
charlesmn 0:c1910e04fc6c 1846 uint8_t VL53L3CX_decode_vcsel_period( uint8_t vcsel_period_reg);
charlesmn 0:c1910e04fc6c 1847
charlesmn 0:c1910e04fc6c 1848 uint32_t VL53L3CX_events_per_spad_maths(
charlesmn 0:c1910e04fc6c 1849 int32_t VL53LX_p_010,
charlesmn 0:c1910e04fc6c 1850 uint16_t num_spads,
charlesmn 0:c1910e04fc6c 1851 uint32_t duration);
charlesmn 0:c1910e04fc6c 1852
charlesmn 0:c1910e04fc6c 1853 uint32_t VL53L3CX_isqrt(
charlesmn 0:c1910e04fc6c 1854 uint32_t num);
charlesmn 0:c1910e04fc6c 1855
charlesmn 0:c1910e04fc6c 1856 void VL53L3CX_hist_calc_zero_distance_phase(
charlesmn 0:c1910e04fc6c 1857 VL53LX_histogram_bin_data_t *pdata);
charlesmn 0:c1910e04fc6c 1858
charlesmn 0:c1910e04fc6c 1859 void VL53L3CX_hist_estimate_ambient_from_thresholded_bins(
charlesmn 0:c1910e04fc6c 1860 int32_t ambient_threshold_sigma,
charlesmn 0:c1910e04fc6c 1861 VL53LX_histogram_bin_data_t *pdata);
charlesmn 0:c1910e04fc6c 1862
charlesmn 0:c1910e04fc6c 1863 void VL53L3CX_hist_remove_ambient_bins(
charlesmn 0:c1910e04fc6c 1864 VL53LX_histogram_bin_data_t *pdata);
charlesmn 0:c1910e04fc6c 1865
charlesmn 0:c1910e04fc6c 1866 uint32_t VL53L3CX_calc_pll_period_mm(
charlesmn 0:c1910e04fc6c 1867 uint16_t fast_osc_frequency);
charlesmn 0:c1910e04fc6c 1868
charlesmn 0:c1910e04fc6c 1869 uint16_t VL53L3CX_rate_maths(
charlesmn 0:c1910e04fc6c 1870 int32_t VL53LX_p_018,
charlesmn 0:c1910e04fc6c 1871 uint32_t time_us);
charlesmn 0:c1910e04fc6c 1872
charlesmn 0:c1910e04fc6c 1873 uint16_t VL53L3CX_rate_per_spad_maths(
charlesmn 0:c1910e04fc6c 1874 uint32_t frac_bits,
charlesmn 0:c1910e04fc6c 1875 uint32_t peak_count_rate,
charlesmn 0:c1910e04fc6c 1876 uint16_t num_spads,
charlesmn 0:c1910e04fc6c 1877 uint32_t max_output_value);
charlesmn 0:c1910e04fc6c 1878
charlesmn 0:c1910e04fc6c 1879 int32_t VL53L3CX_range_maths(
charlesmn 0:c1910e04fc6c 1880 uint16_t fast_osc_frequency,
charlesmn 0:c1910e04fc6c 1881 uint16_t VL53LX_p_014,
charlesmn 0:c1910e04fc6c 1882 uint16_t zero_distance_phase,
charlesmn 0:c1910e04fc6c 1883 uint8_t fractional_bits,
charlesmn 0:c1910e04fc6c 1884 int32_t gain_factor,
charlesmn 0:c1910e04fc6c 1885 int32_t range_offset_mm);
charlesmn 0:c1910e04fc6c 1886
charlesmn 0:c1910e04fc6c 1887
charlesmn 0:c1910e04fc6c 1888 void VL53L3CX_copy_xtalk_bin_data_to_histogram_data_struct(
charlesmn 0:c1910e04fc6c 1889 VL53LX_xtalk_histogram_shape_t *pxtalk,
charlesmn 0:c1910e04fc6c 1890 VL53LX_histogram_bin_data_t *phist);
charlesmn 0:c1910e04fc6c 1891
charlesmn 0:c1910e04fc6c 1892 void VL53L3CX_init_histogram_bin_data_struct(
charlesmn 0:c1910e04fc6c 1893 int32_t bin_value,
charlesmn 0:c1910e04fc6c 1894 uint16_t VL53LX_p_021,
charlesmn 0:c1910e04fc6c 1895 VL53LX_histogram_bin_data_t *pdata);
charlesmn 0:c1910e04fc6c 1896
charlesmn 0:c1910e04fc6c 1897 void VL53L3CX_decode_row_col(
charlesmn 0:c1910e04fc6c 1898 uint8_t spad_number,
charlesmn 0:c1910e04fc6c 1899 uint8_t *prow,
charlesmn 0:c1910e04fc6c 1900 uint8_t *pcol);
charlesmn 0:c1910e04fc6c 1901
charlesmn 0:c1910e04fc6c 1902 void VL53L3CX_hist_find_min_max_bin_values(
charlesmn 0:c1910e04fc6c 1903 VL53LX_histogram_bin_data_t *pdata);
charlesmn 0:c1910e04fc6c 1904
charlesmn 0:c1910e04fc6c 1905 void VL53L3CX_hist_estimate_ambient_from_ambient_bins(
charlesmn 0:c1910e04fc6c 1906 VL53LX_histogram_bin_data_t *pdata);
charlesmn 0:c1910e04fc6c 1907
charlesmn 0:c1910e04fc6c 1908 uint32_t VL53L3CX_calc_pll_period_us(
charlesmn 0:c1910e04fc6c 1909 uint16_t fast_osc_frequency);
charlesmn 0:c1910e04fc6c 1910
charlesmn 0:c1910e04fc6c 1911 uint32_t VL53L3CX_duration_maths(
charlesmn 0:c1910e04fc6c 1912 uint32_t pll_period_us,
charlesmn 0:c1910e04fc6c 1913 uint32_t vcsel_parm_pclks,
charlesmn 0:c1910e04fc6c 1914 uint32_t window_vclks,
charlesmn 0:c1910e04fc6c 1915 uint32_t periods_elapsed_mclks);
charlesmn 0:c1910e04fc6c 1916
charlesmn 0:c1910e04fc6c 1917
charlesmn 0:c1910e04fc6c 1918 /* vl53lx_core.h */
charlesmn 0:c1910e04fc6c 1919
charlesmn 0:c1910e04fc6c 1920 void VL53L3CX_init_version();
charlesmn 0:c1910e04fc6c 1921
charlesmn 0:c1910e04fc6c 1922 void VL53L3CX_init_ll_driver_state(
charlesmn 0:c1910e04fc6c 1923 VL53LX_DeviceState ll_state);
charlesmn 0:c1910e04fc6c 1924
charlesmn 0:c1910e04fc6c 1925 VL53LX_Error VL53L3CX_update_ll_driver_rd_state();
charlesmn 0:c1910e04fc6c 1926
charlesmn 0:c1910e04fc6c 1927 VL53LX_Error VL53L3CX_check_ll_driver_rd_state();
charlesmn 0:c1910e04fc6c 1928
charlesmn 0:c1910e04fc6c 1929 VL53LX_Error VL53L3CX_update_ll_driver_cfg_state();
charlesmn 0:c1910e04fc6c 1930
charlesmn 0:c1910e04fc6c 1931 void VL53L3CX_copy_rtn_good_spads_to_buffer(
charlesmn 0:c1910e04fc6c 1932 VL53LX_nvm_copy_data_t *pdata,
charlesmn 0:c1910e04fc6c 1933 uint8_t *pbuffer);
charlesmn 0:c1910e04fc6c 1934
charlesmn 0:c1910e04fc6c 1935 void VL53L3CX_init_system_results(
charlesmn 0:c1910e04fc6c 1936 VL53LX_system_results_t *pdata);
charlesmn 0:c1910e04fc6c 1937
charlesmn 0:c1910e04fc6c 1938 void VL53L3CX_init_zone_results_structure(
charlesmn 0:c1910e04fc6c 1939 uint8_t active_zones,
charlesmn 0:c1910e04fc6c 1940 VL53LX_zone_results_t *pdata);
charlesmn 0:c1910e04fc6c 1941
charlesmn 0:c1910e04fc6c 1942 void VL53L3CX_init_zone_dss_configs();
charlesmn 0:c1910e04fc6c 1943
charlesmn 0:c1910e04fc6c 1944 void VL53L3CX_init_histogram_config_structure(
charlesmn 0:c1910e04fc6c 1945 uint8_t even_bin0,
charlesmn 0:c1910e04fc6c 1946 uint8_t even_bin1,
charlesmn 0:c1910e04fc6c 1947 uint8_t even_bin2,
charlesmn 0:c1910e04fc6c 1948 uint8_t even_bin3,
charlesmn 0:c1910e04fc6c 1949 uint8_t even_bin4,
charlesmn 0:c1910e04fc6c 1950 uint8_t even_bin5,
charlesmn 0:c1910e04fc6c 1951 uint8_t odd_bin0,
charlesmn 0:c1910e04fc6c 1952 uint8_t odd_bin1,
charlesmn 0:c1910e04fc6c 1953 uint8_t odd_bin2,
charlesmn 0:c1910e04fc6c 1954 uint8_t odd_bin3,
charlesmn 0:c1910e04fc6c 1955 uint8_t odd_bin4,
charlesmn 0:c1910e04fc6c 1956 uint8_t odd_bin5,
charlesmn 0:c1910e04fc6c 1957 VL53LX_histogram_config_t *pdata);
charlesmn 0:c1910e04fc6c 1958
charlesmn 0:c1910e04fc6c 1959 void VL53L3CX_init_histogram_multizone_config_structure(
charlesmn 0:c1910e04fc6c 1960 uint8_t even_bin0,
charlesmn 0:c1910e04fc6c 1961 uint8_t even_bin1,
charlesmn 0:c1910e04fc6c 1962 uint8_t even_bin2,
charlesmn 0:c1910e04fc6c 1963 uint8_t even_bin3,
charlesmn 0:c1910e04fc6c 1964 uint8_t even_bin4,
charlesmn 0:c1910e04fc6c 1965 uint8_t even_bin5,
charlesmn 0:c1910e04fc6c 1966 uint8_t odd_bin0,
charlesmn 0:c1910e04fc6c 1967 uint8_t odd_bin1,
charlesmn 0:c1910e04fc6c 1968 uint8_t odd_bin2,
charlesmn 0:c1910e04fc6c 1969 uint8_t odd_bin3,
charlesmn 0:c1910e04fc6c 1970 uint8_t odd_bin4,
charlesmn 0:c1910e04fc6c 1971 uint8_t odd_bin5,
charlesmn 0:c1910e04fc6c 1972 VL53LX_histogram_config_t *pdata);
charlesmn 0:c1910e04fc6c 1973
charlesmn 0:c1910e04fc6c 1974 void VL53L3CX_init_xtalk_bin_data_struct(
charlesmn 0:c1910e04fc6c 1975 uint32_t bin_value,
charlesmn 0:c1910e04fc6c 1976 uint16_t VL53LX_p_021,
charlesmn 0:c1910e04fc6c 1977 VL53LX_xtalk_histogram_shape_t *pdata);
charlesmn 0:c1910e04fc6c 1978
charlesmn 0:c1910e04fc6c 1979 void VL53L3CX_i2c_encode_uint16_t(
charlesmn 0:c1910e04fc6c 1980 uint16_t ip_value,
charlesmn 0:c1910e04fc6c 1981 uint16_t count,
charlesmn 0:c1910e04fc6c 1982 uint8_t *pbuffer);
charlesmn 0:c1910e04fc6c 1983
charlesmn 0:c1910e04fc6c 1984 uint16_t VL53L3CX_i2c_decode_uint16_t(
charlesmn 0:c1910e04fc6c 1985 uint16_t count,
charlesmn 0:c1910e04fc6c 1986 uint8_t *pbuffer);
charlesmn 0:c1910e04fc6c 1987
charlesmn 0:c1910e04fc6c 1988 void VL53L3CX_i2c_encode_int16_t(
charlesmn 0:c1910e04fc6c 1989 int16_t ip_value,
charlesmn 0:c1910e04fc6c 1990 uint16_t count,
charlesmn 0:c1910e04fc6c 1991 uint8_t *pbuffer);
charlesmn 0:c1910e04fc6c 1992
charlesmn 0:c1910e04fc6c 1993 int16_t VL53L3CX_i2c_decode_int16_t(
charlesmn 0:c1910e04fc6c 1994 uint16_t count,
charlesmn 0:c1910e04fc6c 1995 uint8_t *pbuffer);
charlesmn 0:c1910e04fc6c 1996
charlesmn 0:c1910e04fc6c 1997 void VL53L3CX_i2c_encode_uint32_t(
charlesmn 0:c1910e04fc6c 1998 uint32_t ip_value,
charlesmn 0:c1910e04fc6c 1999 uint16_t count,
charlesmn 0:c1910e04fc6c 2000 uint8_t *pbuffer);
charlesmn 0:c1910e04fc6c 2001
charlesmn 0:c1910e04fc6c 2002 uint32_t VL53L3CX_i2c_decode_uint32_t(
charlesmn 0:c1910e04fc6c 2003 uint16_t count,
charlesmn 0:c1910e04fc6c 2004 uint8_t *pbuffer);
charlesmn 0:c1910e04fc6c 2005
charlesmn 0:c1910e04fc6c 2006 uint32_t VL53L3CX_i2c_decode_with_mask(
charlesmn 0:c1910e04fc6c 2007 uint16_t count,
charlesmn 0:c1910e04fc6c 2008 uint8_t *pbuffer,
charlesmn 0:c1910e04fc6c 2009 uint32_t bit_mask,
charlesmn 0:c1910e04fc6c 2010 uint32_t down_shift,
charlesmn 0:c1910e04fc6c 2011 uint32_t offset);
charlesmn 0:c1910e04fc6c 2012
charlesmn 0:c1910e04fc6c 2013 void VL53L3CX_i2c_encode_int32_t(
charlesmn 0:c1910e04fc6c 2014 int32_t ip_value,
charlesmn 0:c1910e04fc6c 2015 uint16_t count,
charlesmn 0:c1910e04fc6c 2016 uint8_t *pbuffer);
charlesmn 0:c1910e04fc6c 2017
charlesmn 0:c1910e04fc6c 2018 int32_t VL53L3CX_i2c_decode_int32_t(
charlesmn 0:c1910e04fc6c 2019 uint16_t count,
charlesmn 0:c1910e04fc6c 2020 uint8_t *pbuffer);
charlesmn 0:c1910e04fc6c 2021
charlesmn 0:c1910e04fc6c 2022 VL53LX_Error VL53L3CX_start_test(
charlesmn 0:c1910e04fc6c 2023 uint8_t test_mode__ctrl);
charlesmn 0:c1910e04fc6c 2024
charlesmn 0:c1910e04fc6c 2025 VL53LX_Error VL53L3CX_set_firmware_enable_register(uint8_t value);
charlesmn 0:c1910e04fc6c 2026
charlesmn 0:c1910e04fc6c 2027 VL53LX_Error VL53L3CX_enable_firmware();
charlesmn 0:c1910e04fc6c 2028
charlesmn 0:c1910e04fc6c 2029 VL53LX_Error VL53L3CX_disable_firmware();
charlesmn 0:c1910e04fc6c 2030
charlesmn 0:c1910e04fc6c 2031 VL53LX_Error VL53L3CX_set_powerforce_register(
charlesmn 0:c1910e04fc6c 2032 uint8_t value);
charlesmn 0:c1910e04fc6c 2033
charlesmn 0:c1910e04fc6c 2034 VL53LX_Error VL53L3CX_enable_powerforce();
charlesmn 0:c1910e04fc6c 2035
charlesmn 0:c1910e04fc6c 2036 VL53LX_Error VL53L3CX_disable_powerforce();
charlesmn 0:c1910e04fc6c 2037
charlesmn 0:c1910e04fc6c 2038 VL53LX_Error VL53L3CX_clear_interrupt();
charlesmn 0:c1910e04fc6c 2039
charlesmn 0:c1910e04fc6c 2040 VL53LX_Error VL53L3CX_force_shadow_stream_count_to_zero();
charlesmn 0:c1910e04fc6c 2041
charlesmn 0:c1910e04fc6c 2042 uint32_t VL53L3CX_calc_macro_period_us(
charlesmn 0:c1910e04fc6c 2043 uint16_t fast_osc_frequency,
charlesmn 0:c1910e04fc6c 2044 uint8_t VL53LX_p_005);
charlesmn 0:c1910e04fc6c 2045
charlesmn 0:c1910e04fc6c 2046 uint16_t VL53L3CX_calc_range_ignore_threshold(
charlesmn 0:c1910e04fc6c 2047 uint32_t central_rate,
charlesmn 0:c1910e04fc6c 2048 int16_t x_gradient,
charlesmn 0:c1910e04fc6c 2049 int16_t y_gradient,
charlesmn 0:c1910e04fc6c 2050 uint8_t rate_mult);
charlesmn 0:c1910e04fc6c 2051
charlesmn 0:c1910e04fc6c 2052 uint32_t VL53L3CX_calc_timeout_mclks(
charlesmn 0:c1910e04fc6c 2053 uint32_t timeout_us,
charlesmn 0:c1910e04fc6c 2054 uint32_t macro_period_us);
charlesmn 0:c1910e04fc6c 2055
charlesmn 0:c1910e04fc6c 2056 uint16_t VL53L3CX_calc_encoded_timeout(
charlesmn 0:c1910e04fc6c 2057 uint32_t timeout_us,
charlesmn 0:c1910e04fc6c 2058 uint32_t macro_period_us);
charlesmn 0:c1910e04fc6c 2059
charlesmn 0:c1910e04fc6c 2060 uint32_t VL53L3CX_calc_timeout_us(
charlesmn 0:c1910e04fc6c 2061 uint32_t timeout_mclks,
charlesmn 0:c1910e04fc6c 2062 uint32_t macro_period_us);
charlesmn 0:c1910e04fc6c 2063
charlesmn 0:c1910e04fc6c 2064 uint32_t VL53L3CX_calc_decoded_timeout_us(
charlesmn 0:c1910e04fc6c 2065 uint16_t timeout_encoded,
charlesmn 0:c1910e04fc6c 2066 uint32_t macro_period_us);
charlesmn 0:c1910e04fc6c 2067
charlesmn 0:c1910e04fc6c 2068 uint16_t VL53L3CX_encode_timeout(
charlesmn 0:c1910e04fc6c 2069 uint32_t timeout_mclks);
charlesmn 0:c1910e04fc6c 2070
charlesmn 0:c1910e04fc6c 2071 uint32_t VL53L3CX_decode_timeout(
charlesmn 0:c1910e04fc6c 2072 uint16_t encoded_timeout);
charlesmn 0:c1910e04fc6c 2073
charlesmn 0:c1910e04fc6c 2074 VL53LX_Error VL53L3CX_calc_timeout_register_values(
charlesmn 0:c1910e04fc6c 2075 uint32_t phasecal_config_timeout_us,
charlesmn 0:c1910e04fc6c 2076 uint32_t mm_config_timeout_us,
charlesmn 0:c1910e04fc6c 2077 uint32_t range_config_timeout_us,
charlesmn 0:c1910e04fc6c 2078 uint16_t fast_osc_frequency,
charlesmn 0:c1910e04fc6c 2079 VL53LX_general_config_t *pgeneral,
charlesmn 0:c1910e04fc6c 2080 VL53LX_timing_config_t *ptiming);
charlesmn 0:c1910e04fc6c 2081
charlesmn 0:c1910e04fc6c 2082 uint8_t VL53L3CX_encode_vcsel_period(
charlesmn 0:c1910e04fc6c 2083 uint8_t VL53LX_p_030);
charlesmn 0:c1910e04fc6c 2084
charlesmn 0:c1910e04fc6c 2085 uint32_t VL53L3CX_decode_unsigned_integer(
charlesmn 0:c1910e04fc6c 2086 uint8_t *pbuffer,
charlesmn 0:c1910e04fc6c 2087 uint8_t no_of_bytes);
charlesmn 0:c1910e04fc6c 2088
charlesmn 0:c1910e04fc6c 2089 void VL53L3CX_encode_unsigned_integer(
charlesmn 0:c1910e04fc6c 2090 uint32_t ip_value,
charlesmn 0:c1910e04fc6c 2091 uint8_t no_of_bytes,
charlesmn 0:c1910e04fc6c 2092 uint8_t *pbuffer);
charlesmn 0:c1910e04fc6c 2093
charlesmn 0:c1910e04fc6c 2094 VL53LX_Error VL53L3CX_hist_copy_and_scale_ambient_info(
charlesmn 0:c1910e04fc6c 2095 VL53LX_zone_hist_info_t *pidata,
charlesmn 0:c1910e04fc6c 2096 VL53LX_histogram_bin_data_t *podata);
charlesmn 0:c1910e04fc6c 2097
charlesmn 0:c1910e04fc6c 2098 void VL53L3CX_hist_get_bin_sequence_config(
charlesmn 0:c1910e04fc6c 2099 VL53LX_histogram_bin_data_t *pdata);
charlesmn 0:c1910e04fc6c 2100
charlesmn 0:c1910e04fc6c 2101 VL53LX_Error VL53L3CX_hist_phase_consistency_check(
charlesmn 0:c1910e04fc6c 2102 VL53LX_zone_hist_info_t *phist_prev,
charlesmn 0:c1910e04fc6c 2103 VL53LX_zone_objects_t *prange_prev,
charlesmn 0:c1910e04fc6c 2104 VL53LX_range_results_t *prange_curr);
charlesmn 0:c1910e04fc6c 2105
charlesmn 0:c1910e04fc6c 2106 VL53LX_Error VL53L3CX_hist_events_consistency_check(
charlesmn 0:c1910e04fc6c 2107 uint8_t event_sigma,
charlesmn 0:c1910e04fc6c 2108 uint16_t min_effective_spad_count,
charlesmn 0:c1910e04fc6c 2109 VL53LX_zone_hist_info_t *phist_prev,
charlesmn 0:c1910e04fc6c 2110 VL53LX_object_data_t *prange_prev,
charlesmn 0:c1910e04fc6c 2111 VL53LX_range_data_t *prange_curr,
charlesmn 0:c1910e04fc6c 2112 int32_t *pevents_tolerance,
charlesmn 0:c1910e04fc6c 2113 int32_t *pevents_delta,
charlesmn 0:c1910e04fc6c 2114 VL53LX_DeviceError *prange_status);
charlesmn 0:c1910e04fc6c 2115
charlesmn 0:c1910e04fc6c 2116 VL53LX_Error VL53L3CX_hist_merged_pulse_check(
charlesmn 0:c1910e04fc6c 2117 int16_t min_max_tolerance_mm,
charlesmn 0:c1910e04fc6c 2118 VL53LX_range_data_t *pdata,
charlesmn 0:c1910e04fc6c 2119 VL53LX_DeviceError *prange_status);
charlesmn 0:c1910e04fc6c 2120
charlesmn 0:c1910e04fc6c 2121 VL53LX_Error VL53L3CX_hist_xmonitor_consistency_check(
charlesmn 0:c1910e04fc6c 2122 VL53LX_zone_hist_info_t *phist_prev,
charlesmn 0:c1910e04fc6c 2123 VL53LX_zone_objects_t *prange_prev,
charlesmn 0:c1910e04fc6c 2124 VL53LX_range_data_t *prange_curr);
charlesmn 0:c1910e04fc6c 2125
charlesmn 0:c1910e04fc6c 2126 VL53LX_Error VL53L3CX_hist_wrap_dmax(
charlesmn 0:c1910e04fc6c 2127 VL53LX_hist_post_process_config_t *phistpostprocess,
charlesmn 0:c1910e04fc6c 2128 VL53LX_histogram_bin_data_t *pcurrent,
charlesmn 0:c1910e04fc6c 2129 int16_t *pwrap_dmax_mm);
charlesmn 0:c1910e04fc6c 2130
charlesmn 0:c1910e04fc6c 2131 void VL53L3CX_hist_combine_mm1_mm2_offsets(
charlesmn 0:c1910e04fc6c 2132 int16_t mm1_offset_mm,
charlesmn 0:c1910e04fc6c 2133 int16_t mm2_offset_mm,
charlesmn 0:c1910e04fc6c 2134 uint8_t encoded_mm_roi_centre,
charlesmn 0:c1910e04fc6c 2135 uint8_t encoded_mm_roi_size,
charlesmn 0:c1910e04fc6c 2136 uint8_t encoded_zone_centre,
charlesmn 0:c1910e04fc6c 2137 uint8_t encoded_zone_size,
charlesmn 0:c1910e04fc6c 2138 VL53LX_additional_offset_cal_data_t *pcal_data,
charlesmn 0:c1910e04fc6c 2139 uint8_t *pgood_spads,
charlesmn 0:c1910e04fc6c 2140 uint16_t aperture_attenuation,
charlesmn 0:c1910e04fc6c 2141 int16_t *prange_offset_mm);
charlesmn 0:c1910e04fc6c 2142
charlesmn 0:c1910e04fc6c 2143 VL53LX_Error VL53L3CX_hist_xtalk_extract_calc_window(
charlesmn 0:c1910e04fc6c 2144 int16_t target_distance_mm,
charlesmn 0:c1910e04fc6c 2145 uint16_t target_width_oversize,
charlesmn 0:c1910e04fc6c 2146 VL53LX_histogram_bin_data_t *phist_bins,
charlesmn 0:c1910e04fc6c 2147 VL53LX_hist_xtalk_extract_data_t *pxtalk_data);
charlesmn 0:c1910e04fc6c 2148
charlesmn 0:c1910e04fc6c 2149 VL53LX_Error VL53L3CX_hist_xtalk_extract_calc_event_sums(
charlesmn 0:c1910e04fc6c 2150 VL53LX_histogram_bin_data_t *phist_bins,
charlesmn 0:c1910e04fc6c 2151 VL53LX_hist_xtalk_extract_data_t *pxtalk_data);
charlesmn 0:c1910e04fc6c 2152
charlesmn 0:c1910e04fc6c 2153 VL53LX_Error VL53L3CX_hist_xtalk_extract_calc_rate_per_spad(
charlesmn 0:c1910e04fc6c 2154 VL53LX_hist_xtalk_extract_data_t *pxtalk_data);
charlesmn 0:c1910e04fc6c 2155
charlesmn 0:c1910e04fc6c 2156 VL53LX_Error VL53L3CX_hist_xtalk_extract_calc_shape(
charlesmn 0:c1910e04fc6c 2157 VL53LX_hist_xtalk_extract_data_t *pxtalk_data,
charlesmn 0:c1910e04fc6c 2158 VL53LX_xtalk_histogram_shape_t *pxtalk_shape);
charlesmn 0:c1910e04fc6c 2159
charlesmn 0:c1910e04fc6c 2160 VL53LX_Error VL53L3CX_hist_xtalk_shape_model(
charlesmn 0:c1910e04fc6c 2161 uint16_t events_per_bin,
charlesmn 0:c1910e04fc6c 2162 uint16_t pulse_centre,
charlesmn 0:c1910e04fc6c 2163 uint16_t pulse_width,
charlesmn 0:c1910e04fc6c 2164 VL53LX_xtalk_histogram_shape_t *pxtalk_shape);
charlesmn 0:c1910e04fc6c 2165
charlesmn 0:c1910e04fc6c 2166 uint16_t VL53L3CX_hist_xtalk_shape_model_interp(
charlesmn 0:c1910e04fc6c 2167 uint16_t events_per_bin,
charlesmn 0:c1910e04fc6c 2168 uint32_t phase_delta);
charlesmn 0:c1910e04fc6c 2169
charlesmn 0:c1910e04fc6c 2170 void VL53L3CX_spad_number_to_byte_bit_index(
charlesmn 0:c1910e04fc6c 2171 uint8_t spad_number,
charlesmn 0:c1910e04fc6c 2172 uint8_t *pbyte_index,
charlesmn 0:c1910e04fc6c 2173 uint8_t *pbit_index,
charlesmn 0:c1910e04fc6c 2174 uint8_t *pbit_mask);
charlesmn 0:c1910e04fc6c 2175
charlesmn 0:c1910e04fc6c 2176 void VL53L3CX_encode_row_col(
charlesmn 0:c1910e04fc6c 2177 uint8_t row,
charlesmn 0:c1910e04fc6c 2178 uint8_t col,
charlesmn 0:c1910e04fc6c 2179 uint8_t *pspad_number);
charlesmn 0:c1910e04fc6c 2180
charlesmn 0:c1910e04fc6c 2181 void VL53L3CX_decode_zone_size(
charlesmn 0:c1910e04fc6c 2182 uint8_t encoded_xy_size,
charlesmn 0:c1910e04fc6c 2183 uint8_t *pwidth,
charlesmn 0:c1910e04fc6c 2184 uint8_t *pheight);
charlesmn 0:c1910e04fc6c 2185
charlesmn 0:c1910e04fc6c 2186 void VL53L3CX_encode_zone_size(
charlesmn 0:c1910e04fc6c 2187 uint8_t width,
charlesmn 0:c1910e04fc6c 2188 uint8_t height,
charlesmn 0:c1910e04fc6c 2189 uint8_t *pencoded_xy_size);
charlesmn 0:c1910e04fc6c 2190
charlesmn 0:c1910e04fc6c 2191 void VL53L3CX_decode_zone_limits(
charlesmn 0:c1910e04fc6c 2192 uint8_t encoded_xy_centre,
charlesmn 0:c1910e04fc6c 2193 uint8_t encoded_xy_size,
charlesmn 0:c1910e04fc6c 2194 int16_t *px_ll,
charlesmn 0:c1910e04fc6c 2195 int16_t *py_ll,
charlesmn 0:c1910e04fc6c 2196 int16_t *px_ur,
charlesmn 0:c1910e04fc6c 2197 int16_t *py_ur);
charlesmn 0:c1910e04fc6c 2198
charlesmn 0:c1910e04fc6c 2199 uint8_t VL53L3CX_is_aperture_location(
charlesmn 0:c1910e04fc6c 2200 uint8_t row,
charlesmn 0:c1910e04fc6c 2201 uint8_t col);
charlesmn 0:c1910e04fc6c 2202
charlesmn 0:c1910e04fc6c 2203 void VL53L3CX_calc_max_effective_spads(
charlesmn 0:c1910e04fc6c 2204 uint8_t encoded_zone_centre,
charlesmn 0:c1910e04fc6c 2205 uint8_t encoded_zone_size,
charlesmn 0:c1910e04fc6c 2206 uint8_t *pgood_spads,
charlesmn 0:c1910e04fc6c 2207 uint16_t aperture_attenuation,
charlesmn 0:c1910e04fc6c 2208 uint16_t *pmax_effective_spads);
charlesmn 0:c1910e04fc6c 2209
charlesmn 0:c1910e04fc6c 2210 void VL53L3CX_calc_mm_effective_spads(
charlesmn 0:c1910e04fc6c 2211 uint8_t encoded_mm_roi_centre,
charlesmn 0:c1910e04fc6c 2212 uint8_t encoded_mm_roi_size,
charlesmn 0:c1910e04fc6c 2213 uint8_t encoded_zone_centre,
charlesmn 0:c1910e04fc6c 2214 uint8_t encoded_zone_size,
charlesmn 0:c1910e04fc6c 2215 uint8_t *pgood_spads,
charlesmn 0:c1910e04fc6c 2216 uint16_t aperture_attenuation,
charlesmn 0:c1910e04fc6c 2217 uint16_t *pmm_inner_effective_spads,
charlesmn 0:c1910e04fc6c 2218 uint16_t *pmm_outer_effective_spads);
charlesmn 0:c1910e04fc6c 2219
charlesmn 0:c1910e04fc6c 2220 void VL53L3CX_hist_copy_results_to_sys_and_core(
charlesmn 0:c1910e04fc6c 2221 VL53LX_histogram_bin_data_t *pbins,
charlesmn 0:c1910e04fc6c 2222 VL53LX_range_results_t *phist,
charlesmn 0:c1910e04fc6c 2223 VL53LX_system_results_t *psys,
charlesmn 0:c1910e04fc6c 2224 VL53LX_core_results_t *pcore);
charlesmn 0:c1910e04fc6c 2225
charlesmn 0:c1910e04fc6c 2226
charlesmn 0:c1910e04fc6c 2227
charlesmn 0:c1910e04fc6c 2228
charlesmn 0:c1910e04fc6c 2229 VL53LX_Error VL53L3CX_save_cfg_data();
charlesmn 0:c1910e04fc6c 2230
charlesmn 0:c1910e04fc6c 2231 VL53LX_Error VL53L3CX_dynamic_zone_update(
charlesmn 0:c1910e04fc6c 2232 VL53LX_range_results_t *presults);
charlesmn 0:c1910e04fc6c 2233
charlesmn 0:c1910e04fc6c 2234 VL53LX_Error VL53L3CX_update_internal_stream_counters(
charlesmn 0:c1910e04fc6c 2235 uint8_t external_stream_count,
charlesmn 0:c1910e04fc6c 2236 uint8_t *pinternal_stream_count,
charlesmn 0:c1910e04fc6c 2237 uint8_t *pinternal_stream_count_val
charlesmn 0:c1910e04fc6c 2238 );
charlesmn 0:c1910e04fc6c 2239
charlesmn 0:c1910e04fc6c 2240 VL53LX_Error VL53L3CX_multizone_hist_bins_update();
charlesmn 0:c1910e04fc6c 2241
charlesmn 0:c1910e04fc6c 2242 VL53LX_Error VL53L3CX_set_histogram_multizone_initial_bin_config(
charlesmn 0:c1910e04fc6c 2243 VL53LX_zone_config_t *pzone_cfg,
charlesmn 0:c1910e04fc6c 2244 VL53LX_histogram_config_t *phist_cfg,
charlesmn 0:c1910e04fc6c 2245 VL53LX_histogram_config_t *pmulti_hist
charlesmn 0:c1910e04fc6c 2246 );
charlesmn 0:c1910e04fc6c 2247
charlesmn 0:c1910e04fc6c 2248 uint8_t VL53L3CX_encode_GPIO_interrupt_config(
charlesmn 0:c1910e04fc6c 2249 VL53LX_GPIO_interrupt_config_t *pintconf);
charlesmn 0:c1910e04fc6c 2250
charlesmn 0:c1910e04fc6c 2251 VL53LX_GPIO_interrupt_config_t VL53L3CX_decode_GPIO_interrupt_config(
charlesmn 0:c1910e04fc6c 2252 uint8_t system__interrupt_config);
charlesmn 0:c1910e04fc6c 2253
charlesmn 0:c1910e04fc6c 2254 VL53LX_Error VL53L3CX_set_GPIO_distance_threshold(
charlesmn 0:c1910e04fc6c 2255 uint16_t threshold_high,
charlesmn 0:c1910e04fc6c 2256 uint16_t threshold_low);
charlesmn 0:c1910e04fc6c 2257
charlesmn 0:c1910e04fc6c 2258 VL53LX_Error VL53L3CX_set_GPIO_rate_threshold(
charlesmn 0:c1910e04fc6c 2259 uint16_t threshold_high,
charlesmn 0:c1910e04fc6c 2260 uint16_t threshold_low);
charlesmn 0:c1910e04fc6c 2261
charlesmn 0:c1910e04fc6c 2262 VL53LX_Error VL53L3CX_set_GPIO_thresholds_from_struct(
charlesmn 0:c1910e04fc6c 2263 VL53LX_GPIO_interrupt_config_t *pintconf);
charlesmn 0:c1910e04fc6c 2264
charlesmn 0:c1910e04fc6c 2265 VL53LX_Error VL53L3CX_set_ref_spad_char_config(
charlesmn 0:c1910e04fc6c 2266 uint8_t vcsel_period_a,
charlesmn 0:c1910e04fc6c 2267 uint32_t phasecal_timeout_us,
charlesmn 0:c1910e04fc6c 2268 uint16_t total_rate_target_mcps,
charlesmn 0:c1910e04fc6c 2269 uint16_t max_count_rate_rtn_limit_mcps,
charlesmn 0:c1910e04fc6c 2270 uint16_t min_count_rate_rtn_limit_mcps,
charlesmn 0:c1910e04fc6c 2271 uint16_t fast_osc_frequency);
charlesmn 0:c1910e04fc6c 2272
charlesmn 0:c1910e04fc6c 2273 VL53LX_Error VL53L3CX_set_ssc_config(
charlesmn 0:c1910e04fc6c 2274 VL53LX_ssc_config_t *pssc_cfg,
charlesmn 0:c1910e04fc6c 2275 uint16_t fast_osc_frequency);
charlesmn 0:c1910e04fc6c 2276
charlesmn 0:c1910e04fc6c 2277 VL53LX_Error VL53L3CX_get_spad_rate_data(
charlesmn 0:c1910e04fc6c 2278 VL53LX_spad_rate_data_t *pspad_rates);
charlesmn 0:c1910e04fc6c 2279
charlesmn 0:c1910e04fc6c 2280 uint32_t VL53L3CX_calc_crosstalk_plane_offset_with_margin(
charlesmn 0:c1910e04fc6c 2281 uint32_t plane_offset_kcps,
charlesmn 0:c1910e04fc6c 2282 int16_t margin_offset_kcps);
charlesmn 0:c1910e04fc6c 2283
charlesmn 0:c1910e04fc6c 2284 VL53LX_Error VL53L3CX_low_power_auto_data_init();
charlesmn 0:c1910e04fc6c 2285
charlesmn 0:c1910e04fc6c 2286 VL53LX_Error VL53L3CX_low_power_auto_data_stop_range();
charlesmn 0:c1910e04fc6c 2287
charlesmn 0:c1910e04fc6c 2288 VL53LX_Error VL53L3CX_dynamic_xtalk_correction_calc_required_samples();
charlesmn 0:c1910e04fc6c 2289
charlesmn 0:c1910e04fc6c 2290 VL53LX_Error VL53L3CX_dynamic_xtalk_correction_calc_new_xtalk(
charlesmn 0:c1910e04fc6c 2291 uint32_t xtalk_offset_out,
charlesmn 0:c1910e04fc6c 2292 VL53LX_smudge_corrector_config_t *pconfig,
charlesmn 0:c1910e04fc6c 2293 VL53LX_smudge_corrector_data_t *pout,
charlesmn 0:c1910e04fc6c 2294 uint8_t add_smudge,
charlesmn 0:c1910e04fc6c 2295 uint8_t soft_update
charlesmn 0:c1910e04fc6c 2296 );
charlesmn 0:c1910e04fc6c 2297
charlesmn 0:c1910e04fc6c 2298 VL53LX_Error VL53L3CX_dynamic_xtalk_correction_corrector();
charlesmn 0:c1910e04fc6c 2299
charlesmn 0:c1910e04fc6c 2300 VL53LX_Error VL53L3CX_dynamic_xtalk_correction_data_init();
charlesmn 0:c1910e04fc6c 2301
charlesmn 0:c1910e04fc6c 2302 VL53LX_Error VL53L3CX_dynamic_xtalk_correction_output_init(
charlesmn 0:c1910e04fc6c 2303 VL53LX_LLDriverResults_t *pres
charlesmn 0:c1910e04fc6c 2304 );
charlesmn 0:c1910e04fc6c 2305
charlesmn 0:c1910e04fc6c 2306 VL53LX_Error VL53L3CX_xtalk_cal_data_init();
charlesmn 0:c1910e04fc6c 2307
charlesmn 0:c1910e04fc6c 2308 VL53LX_Error VL53L3CX_config_low_power_auto_mode(
charlesmn 0:c1910e04fc6c 2309 VL53LX_general_config_t *pgeneral,
charlesmn 0:c1910e04fc6c 2310 VL53LX_dynamic_config_t *pdynamic,
charlesmn 0:c1910e04fc6c 2311 VL53LX_low_power_auto_data_t *plpadata
charlesmn 0:c1910e04fc6c 2312 );
charlesmn 0:c1910e04fc6c 2313
charlesmn 0:c1910e04fc6c 2314 VL53LX_Error VL53L3CX_low_power_auto_setup_manual_calibration();
charlesmn 0:c1910e04fc6c 2315
charlesmn 0:c1910e04fc6c 2316 VL53LX_Error VL53L3CX_low_power_auto_update_DSS();
charlesmn 0:c1910e04fc6c 2317
charlesmn 0:c1910e04fc6c 2318 VL53LX_Error VL53L3CX_compute_histo_merge_nb(uint8_t *histo_merge_nb);
charlesmn 0:c1910e04fc6c 2319
charlesmn 0:c1910e04fc6c 2320
charlesmn 0:c1910e04fc6c 2321
charlesmn 0:c1910e04fc6c 2322 /* vl53lx_wait.h */
charlesmn 0:c1910e04fc6c 2323
charlesmn 0:c1910e04fc6c 2324 VL53LX_Error VL53L3CX_wait_for_boot_completion();
charlesmn 0:c1910e04fc6c 2325
charlesmn 0:c1910e04fc6c 2326 VL53LX_Error VL53L3CX_wait_for_firmware_ready();
charlesmn 0:c1910e04fc6c 2327
charlesmn 0:c1910e04fc6c 2328 VL53LX_Error VL53L3CX_wait_for_range_completion();
charlesmn 0:c1910e04fc6c 2329
charlesmn 0:c1910e04fc6c 2330 VL53LX_Error VL53L3CX_wait_for_test_completion();
charlesmn 0:c1910e04fc6c 2331
charlesmn 0:c1910e04fc6c 2332 VL53LX_Error VL53L3CX_is_boot_complete(uint8_t *pready);
charlesmn 0:c1910e04fc6c 2333
charlesmn 0:c1910e04fc6c 2334 VL53LX_Error VL53L3CX_is_firmware_ready(uint8_t *pready);
charlesmn 0:c1910e04fc6c 2335
charlesmn 0:c1910e04fc6c 2336 VL53LX_Error VL53L3CX_is_new_data_ready(uint8_t *pready);
charlesmn 0:c1910e04fc6c 2337
charlesmn 0:c1910e04fc6c 2338 VL53LX_Error VL53L3CX_poll_for_boot_completion(uint32_t timeout_ms);
charlesmn 0:c1910e04fc6c 2339
charlesmn 0:c1910e04fc6c 2340 VL53LX_Error VL53L3CX_poll_for_firmware_ready(uint32_t timeout_ms);
charlesmn 0:c1910e04fc6c 2341
charlesmn 0:c1910e04fc6c 2342 VL53LX_Error VL53L3CX_poll_for_range_completion(uint32_t timeout_ms);
charlesmn 0:c1910e04fc6c 2343
charlesmn 0:c1910e04fc6c 2344
charlesmn 0:c1910e04fc6c 2345 /* vl53lx_zone_presets.h */
charlesmn 0:c1910e04fc6c 2346
charlesmn 0:c1910e04fc6c 2347 VL53LX_Error VL53L3CX_init_zone_config_structure(
charlesmn 0:c1910e04fc6c 2348 uint8_t x_off,
charlesmn 0:c1910e04fc6c 2349 uint8_t x_inc,
charlesmn 0:c1910e04fc6c 2350 uint8_t x_zones,
charlesmn 0:c1910e04fc6c 2351 uint8_t y_off,
charlesmn 0:c1910e04fc6c 2352 uint8_t y_inc,
charlesmn 0:c1910e04fc6c 2353 uint8_t y_zones,
charlesmn 0:c1910e04fc6c 2354 uint8_t width,
charlesmn 0:c1910e04fc6c 2355 uint8_t height,
charlesmn 0:c1910e04fc6c 2356 VL53LX_zone_config_t *pdata);
charlesmn 0:c1910e04fc6c 2357
charlesmn 0:c1910e04fc6c 2358
charlesmn 0:c1910e04fc6c 2359 VL53LX_Error VL53L3CX_init_zone_config_histogram_bins(
charlesmn 0:c1910e04fc6c 2360 VL53LX_zone_config_t *pdata);
charlesmn 0:c1910e04fc6c 2361
charlesmn 0:c1910e04fc6c 2362
charlesmn 0:c1910e04fc6c 2363 /* vl53lx_api_preset_modes.h */
charlesmn 0:c1910e04fc6c 2364
charlesmn 0:c1910e04fc6c 2365 VL53LX_Error VL53L3CX_init_refspadchar_config_struct(
charlesmn 0:c1910e04fc6c 2366 VL53LX_refspadchar_config_t *pdata);
charlesmn 0:c1910e04fc6c 2367
charlesmn 0:c1910e04fc6c 2368 VL53LX_Error VL53L3CX_init_ssc_config_struct(
charlesmn 0:c1910e04fc6c 2369 VL53LX_ssc_config_t *pdata);
charlesmn 0:c1910e04fc6c 2370
charlesmn 0:c1910e04fc6c 2371 VL53LX_Error VL53L3CX_init_xtalk_config_struct(
charlesmn 0:c1910e04fc6c 2372 VL53LX_customer_nvm_managed_t *pnvm,
charlesmn 0:c1910e04fc6c 2373 VL53LX_xtalk_config_t *pdata);
charlesmn 0:c1910e04fc6c 2374
charlesmn 0:c1910e04fc6c 2375 VL53LX_Error VL53L3CX_init_xtalk_extract_config_struct(
charlesmn 0:c1910e04fc6c 2376 VL53LX_xtalkextract_config_t *pdata);
charlesmn 0:c1910e04fc6c 2377
charlesmn 0:c1910e04fc6c 2378 VL53LX_Error VL53L3CX_init_offset_cal_config_struct(
charlesmn 0:c1910e04fc6c 2379 VL53LX_offsetcal_config_t *pdata);
charlesmn 0:c1910e04fc6c 2380
charlesmn 0:c1910e04fc6c 2381 VL53LX_Error VL53L3CX_init_zone_cal_config_struct(
charlesmn 0:c1910e04fc6c 2382 VL53LX_zonecal_config_t *pdata);
charlesmn 0:c1910e04fc6c 2383
charlesmn 0:c1910e04fc6c 2384 VL53LX_Error VL53L3CX_init_hist_post_process_config_struct(
charlesmn 0:c1910e04fc6c 2385 uint8_t xtalk_compensation_enable,
charlesmn 0:c1910e04fc6c 2386 VL53LX_hist_post_process_config_t *pdata);
charlesmn 0:c1910e04fc6c 2387
charlesmn 0:c1910e04fc6c 2388 VL53LX_Error VL53L3CX_init_dmax_calibration_data_struct(
charlesmn 0:c1910e04fc6c 2389 VL53LX_dmax_calibration_data_t *pdata);
charlesmn 0:c1910e04fc6c 2390
charlesmn 0:c1910e04fc6c 2391 VL53LX_Error VL53L3CX_init_tuning_parm_storage_struct(
charlesmn 0:c1910e04fc6c 2392 VL53LX_tuning_parm_storage_t *pdata);
charlesmn 0:c1910e04fc6c 2393
charlesmn 0:c1910e04fc6c 2394 VL53LX_Error VL53L3CX_init_hist_gen3_dmax_config_struct(
charlesmn 0:c1910e04fc6c 2395 VL53LX_hist_gen3_dmax_config_t *pdata);
charlesmn 0:c1910e04fc6c 2396
charlesmn 0:c1910e04fc6c 2397 VL53LX_Error VL53L3CX_preset_mode_standard_ranging(
charlesmn 0:c1910e04fc6c 2398 VL53LX_static_config_t *pstatic,
charlesmn 0:c1910e04fc6c 2399 VL53LX_histogram_config_t *phistogram,
charlesmn 0:c1910e04fc6c 2400 VL53LX_general_config_t *pgeneral,
charlesmn 0:c1910e04fc6c 2401 VL53LX_timing_config_t *ptiming,
charlesmn 0:c1910e04fc6c 2402 VL53LX_dynamic_config_t *pdynamic,
charlesmn 0:c1910e04fc6c 2403 VL53LX_system_control_t *psystem,
charlesmn 0:c1910e04fc6c 2404 VL53LX_tuning_parm_storage_t *ptuning_parms,
charlesmn 0:c1910e04fc6c 2405 VL53LX_zone_config_t *pzone_cfg);
charlesmn 0:c1910e04fc6c 2406
charlesmn 0:c1910e04fc6c 2407
charlesmn 0:c1910e04fc6c 2408
charlesmn 0:c1910e04fc6c 2409 VL53LX_Error VL53L3CX_preset_mode_histogram_ranging(
charlesmn 0:c1910e04fc6c 2410 VL53LX_hist_post_process_config_t *phistpostprocess,
charlesmn 0:c1910e04fc6c 2411 VL53LX_static_config_t *pstatic,
charlesmn 0:c1910e04fc6c 2412 VL53LX_histogram_config_t *phistogram,
charlesmn 0:c1910e04fc6c 2413 VL53LX_general_config_t *pgeneral,
charlesmn 0:c1910e04fc6c 2414 VL53LX_timing_config_t *ptiming,
charlesmn 0:c1910e04fc6c 2415 VL53LX_dynamic_config_t *pdynamic,
charlesmn 0:c1910e04fc6c 2416 VL53LX_system_control_t *psystem,
charlesmn 0:c1910e04fc6c 2417 VL53LX_tuning_parm_storage_t *ptuning_parms,
charlesmn 0:c1910e04fc6c 2418 VL53LX_zone_config_t *pzone_cfg);
charlesmn 0:c1910e04fc6c 2419
charlesmn 0:c1910e04fc6c 2420
charlesmn 0:c1910e04fc6c 2421 VL53LX_Error VL53L3CX_preset_mode_histogram_characterisation(
charlesmn 0:c1910e04fc6c 2422 VL53LX_hist_post_process_config_t *phistpostprocess,
charlesmn 0:c1910e04fc6c 2423 VL53LX_static_config_t *pstatic,
charlesmn 0:c1910e04fc6c 2424 VL53LX_histogram_config_t *phistogram,
charlesmn 0:c1910e04fc6c 2425 VL53LX_general_config_t *pgeneral,
charlesmn 0:c1910e04fc6c 2426 VL53LX_timing_config_t *ptiming,
charlesmn 0:c1910e04fc6c 2427 VL53LX_dynamic_config_t *pdynamic,
charlesmn 0:c1910e04fc6c 2428 VL53LX_system_control_t *psystem,
charlesmn 0:c1910e04fc6c 2429 VL53LX_tuning_parm_storage_t *ptuning_parms,
charlesmn 0:c1910e04fc6c 2430 VL53LX_zone_config_t *pzone_cfg);
charlesmn 0:c1910e04fc6c 2431
charlesmn 0:c1910e04fc6c 2432 VL53LX_Error VL53L3CX_preset_mode_histogram_xtalk_planar(
charlesmn 0:c1910e04fc6c 2433 VL53LX_hist_post_process_config_t *phistpostprocess,
charlesmn 0:c1910e04fc6c 2434 VL53LX_static_config_t *pstatic,
charlesmn 0:c1910e04fc6c 2435 VL53LX_histogram_config_t *phistogram,
charlesmn 0:c1910e04fc6c 2436 VL53LX_general_config_t *pgeneral,
charlesmn 0:c1910e04fc6c 2437 VL53LX_timing_config_t *ptiming,
charlesmn 0:c1910e04fc6c 2438 VL53LX_dynamic_config_t *pdynamic,
charlesmn 0:c1910e04fc6c 2439 VL53LX_system_control_t *psystem,
charlesmn 0:c1910e04fc6c 2440 VL53LX_tuning_parm_storage_t *ptuning_parms,
charlesmn 0:c1910e04fc6c 2441 VL53LX_zone_config_t *pzone_cfg);
charlesmn 0:c1910e04fc6c 2442
charlesmn 0:c1910e04fc6c 2443
charlesmn 0:c1910e04fc6c 2444 VL53LX_Error VL53L3CX_preset_mode_histogram_long_range(
charlesmn 0:c1910e04fc6c 2445 VL53LX_hist_post_process_config_t *phistpostprocess,
charlesmn 0:c1910e04fc6c 2446 VL53LX_static_config_t *pstatic,
charlesmn 0:c1910e04fc6c 2447 VL53LX_histogram_config_t *phistogram,
charlesmn 0:c1910e04fc6c 2448 VL53LX_general_config_t *pgeneral,
charlesmn 0:c1910e04fc6c 2449 VL53LX_timing_config_t *ptiming,
charlesmn 0:c1910e04fc6c 2450 VL53LX_dynamic_config_t *pdynamic,
charlesmn 0:c1910e04fc6c 2451 VL53LX_system_control_t *psystem,
charlesmn 0:c1910e04fc6c 2452 VL53LX_tuning_parm_storage_t *ptuning_parms,
charlesmn 0:c1910e04fc6c 2453 VL53LX_zone_config_t *pzone_cfg);
charlesmn 0:c1910e04fc6c 2454
charlesmn 0:c1910e04fc6c 2455 VL53LX_Error VL53L3CX_preset_mode_histogram_medium_range(
charlesmn 0:c1910e04fc6c 2456 VL53LX_hist_post_process_config_t *phistpostprocess,
charlesmn 0:c1910e04fc6c 2457 VL53LX_static_config_t *pstatic,
charlesmn 0:c1910e04fc6c 2458 VL53LX_histogram_config_t *phistogram,
charlesmn 0:c1910e04fc6c 2459 VL53LX_general_config_t *pgeneral,
charlesmn 0:c1910e04fc6c 2460 VL53LX_timing_config_t *ptiming,
charlesmn 0:c1910e04fc6c 2461 VL53LX_dynamic_config_t *pdynamic,
charlesmn 0:c1910e04fc6c 2462 VL53LX_system_control_t *psystem,
charlesmn 0:c1910e04fc6c 2463 VL53LX_tuning_parm_storage_t *ptuning_parms,
charlesmn 0:c1910e04fc6c 2464 VL53LX_zone_config_t *pzone_cfg);
charlesmn 0:c1910e04fc6c 2465
charlesmn 0:c1910e04fc6c 2466 VL53LX_Error VL53L3CX_preset_mode_histogram_short_range(
charlesmn 0:c1910e04fc6c 2467 VL53LX_hist_post_process_config_t *phistpostprocess,
charlesmn 0:c1910e04fc6c 2468 VL53LX_static_config_t *pstatic,
charlesmn 0:c1910e04fc6c 2469 VL53LX_histogram_config_t *phistogram,
charlesmn 0:c1910e04fc6c 2470 VL53LX_general_config_t *pgeneral,
charlesmn 0:c1910e04fc6c 2471 VL53LX_timing_config_t *ptiming,
charlesmn 0:c1910e04fc6c 2472 VL53LX_dynamic_config_t *pdynamic,
charlesmn 0:c1910e04fc6c 2473 VL53LX_system_control_t *psystem,
charlesmn 0:c1910e04fc6c 2474 VL53LX_tuning_parm_storage_t *ptuning_parms,
charlesmn 0:c1910e04fc6c 2475 VL53LX_zone_config_t *pzone_cfg);
charlesmn 0:c1910e04fc6c 2476
charlesmn 0:c1910e04fc6c 2477
charlesmn 0:c1910e04fc6c 2478
charlesmn 0:c1910e04fc6c 2479
charlesmn 0:c1910e04fc6c 2480 void VL53L3CX_copy_hist_cfg_to_static_cfg(
charlesmn 0:c1910e04fc6c 2481 VL53LX_histogram_config_t *phistogram,
charlesmn 0:c1910e04fc6c 2482 VL53LX_static_config_t *pstatic,
charlesmn 0:c1910e04fc6c 2483 VL53LX_general_config_t *pgeneral,
charlesmn 0:c1910e04fc6c 2484 VL53LX_timing_config_t *ptiming,
charlesmn 0:c1910e04fc6c 2485 VL53LX_dynamic_config_t *pdynamic);
charlesmn 0:c1910e04fc6c 2486
charlesmn 0:c1910e04fc6c 2487 void VL53L3CX_copy_hist_bins_to_static_cfg(
charlesmn 0:c1910e04fc6c 2488 VL53LX_histogram_config_t *phistogram,
charlesmn 0:c1910e04fc6c 2489 VL53LX_static_config_t *pstatic,
charlesmn 0:c1910e04fc6c 2490 VL53LX_timing_config_t *ptiming);
charlesmn 0:c1910e04fc6c 2491
charlesmn 0:c1910e04fc6c 2492
charlesmn 0:c1910e04fc6c 2493 /* vl53lx_silicon_core.h */
charlesmn 0:c1910e04fc6c 2494 VL53LX_Error VL53L3CX_is_firmware_ready_silicon(
charlesmn 0:c1910e04fc6c 2495 uint8_t *pready);
charlesmn 0:c1910e04fc6c 2496
charlesmn 0:c1910e04fc6c 2497
charlesmn 0:c1910e04fc6c 2498
charlesmn 0:c1910e04fc6c 2499
charlesmn 0:c1910e04fc6c 2500 /* vl53lx_xtalk.h */
charlesmn 0:c1910e04fc6c 2501
charlesmn 0:c1910e04fc6c 2502 VL53LX_Error VL53L3CX_xtalk_calibration_process_data(
charlesmn 0:c1910e04fc6c 2503 VL53LX_xtalk_range_results_t *pxtalk_ranges,
charlesmn 0:c1910e04fc6c 2504 VL53LX_xtalk_histogram_data_t *pxtalk_shape,
charlesmn 0:c1910e04fc6c 2505 VL53LX_xtalk_calibration_results_t *pxtalk_cal);
charlesmn 0:c1910e04fc6c 2506
charlesmn 0:c1910e04fc6c 2507
charlesmn 0:c1910e04fc6c 2508
charlesmn 0:c1910e04fc6c 2509 /* vl53lx_api_calibration.h */
charlesmn 0:c1910e04fc6c 2510
charlesmn 0:c1910e04fc6c 2511 VL53LX_Error VL53L3CX_run_ref_spad_char(
charlesmn 0:c1910e04fc6c 2512 VL53LX_Error *pcal_status);
charlesmn 0:c1910e04fc6c 2513
charlesmn 0:c1910e04fc6c 2514
charlesmn 0:c1910e04fc6c 2515
charlesmn 0:c1910e04fc6c 2516
charlesmn 0:c1910e04fc6c 2517 VL53LX_Error VL53L3CX_run_device_test(
charlesmn 0:c1910e04fc6c 2518 VL53LX_DeviceTestMode device_test_mode);
charlesmn 0:c1910e04fc6c 2519
charlesmn 0:c1910e04fc6c 2520
charlesmn 0:c1910e04fc6c 2521
charlesmn 0:c1910e04fc6c 2522 VL53LX_Error VL53L3CX_run_xtalk_extraction(
charlesmn 0:c1910e04fc6c 2523 VL53LX_Error *pcal_status);
charlesmn 0:c1910e04fc6c 2524
charlesmn 0:c1910e04fc6c 2525
charlesmn 0:c1910e04fc6c 2526
charlesmn 0:c1910e04fc6c 2527 VL53LX_Error VL53L3CX_get_and_avg_xtalk_samples(
charlesmn 0:c1910e04fc6c 2528 uint8_t num_of_samples,
charlesmn 0:c1910e04fc6c 2529 uint8_t measurement_mode,
charlesmn 0:c1910e04fc6c 2530 int16_t xtalk_filter_thresh_max_mm,
charlesmn 0:c1910e04fc6c 2531 int16_t xtalk_filter_thresh_min_mm,
charlesmn 0:c1910e04fc6c 2532 uint16_t xtalk_max_valid_rate_kcps,
charlesmn 0:c1910e04fc6c 2533 uint8_t xtalk_result_id,
charlesmn 0:c1910e04fc6c 2534 uint8_t xtalk_histo_id,
charlesmn 0:c1910e04fc6c 2535 VL53LX_xtalk_range_results_t *pxtalk_results,
charlesmn 0:c1910e04fc6c 2536 VL53LX_histogram_bin_data_t *psum_histo,
charlesmn 0:c1910e04fc6c 2537 VL53LX_histogram_bin_data_t *pavg_histo);
charlesmn 0:c1910e04fc6c 2538
charlesmn 0:c1910e04fc6c 2539
charlesmn 0:c1910e04fc6c 2540
charlesmn 0:c1910e04fc6c 2541 VL53LX_Error VL53L3CX__run_phasecal_average(
charlesmn 0:c1910e04fc6c 2542 uint8_t measurement_mode,
charlesmn 0:c1910e04fc6c 2543 uint8_t phasecal_result__vcsel_start,
charlesmn 0:c1910e04fc6c 2544 uint16_t phasecal_num_of_samples,
charlesmn 0:c1910e04fc6c 2545 VL53LX_range_results_t *prange_results,
charlesmn 0:c1910e04fc6c 2546 uint16_t *pphasecal_result__reference_phase,
charlesmn 0:c1910e04fc6c 2547 uint16_t *pzero_distance_phase);
charlesmn 0:c1910e04fc6c 2548
charlesmn 0:c1910e04fc6c 2549
charlesmn 0:c1910e04fc6c 2550 void VL53L3CX_hist_xtalk_extract_data_init(
charlesmn 0:c1910e04fc6c 2551 VL53LX_hist_xtalk_extract_data_t *pxtalk_data);
charlesmn 0:c1910e04fc6c 2552
charlesmn 0:c1910e04fc6c 2553
charlesmn 0:c1910e04fc6c 2554
charlesmn 0:c1910e04fc6c 2555 VL53LX_Error VL53L3CX_hist_xtalk_extract_update(
charlesmn 0:c1910e04fc6c 2556 int16_t target_distance_mm,
charlesmn 0:c1910e04fc6c 2557 uint16_t target_width_oversize,
charlesmn 0:c1910e04fc6c 2558 VL53LX_histogram_bin_data_t *phist_bins,
charlesmn 0:c1910e04fc6c 2559 VL53LX_hist_xtalk_extract_data_t *pxtalk_data);
charlesmn 0:c1910e04fc6c 2560
charlesmn 0:c1910e04fc6c 2561
charlesmn 0:c1910e04fc6c 2562
charlesmn 0:c1910e04fc6c 2563 VL53LX_Error VL53L3CX_hist_xtalk_extract_fini(
charlesmn 0:c1910e04fc6c 2564 VL53LX_histogram_bin_data_t *phist_bins,
charlesmn 0:c1910e04fc6c 2565 VL53LX_hist_xtalk_extract_data_t *pxtalk_data,
charlesmn 0:c1910e04fc6c 2566 VL53LX_xtalk_calibration_results_t *pxtalk_cal,
charlesmn 0:c1910e04fc6c 2567 VL53LX_xtalk_histogram_shape_t *pxtalk_shape);
charlesmn 0:c1910e04fc6c 2568
charlesmn 0:c1910e04fc6c 2569
charlesmn 0:c1910e04fc6c 2570
charlesmn 0:c1910e04fc6c 2571
charlesmn 0:c1910e04fc6c 2572 VL53LX_Error VL53L3CX_run_hist_xtalk_extraction(
charlesmn 0:c1910e04fc6c 2573 int16_t cal_distance_mm,
charlesmn 0:c1910e04fc6c 2574 VL53LX_Error *pcal_status);
charlesmn 0:c1910e04fc6c 2575
charlesmn 0:c1910e04fc6c 2576 /* vl53lx_api_core.c static functions */
charlesmn 0:c1910e04fc6c 2577 void VL53L3CX_histo_merge(VL53LX_histogram_bin_data_t *pdata);
charlesmn 0:c1910e04fc6c 2578
charlesmn 0:c1910e04fc6c 2579 /* vl53lx_api.c static functions */
charlesmn 0:c1910e04fc6c 2580
charlesmn 0:c1910e04fc6c 2581 int BDTable[11];
charlesmn 0:c1910e04fc6c 2582
charlesmn 0:c1910e04fc6c 2583
charlesmn 0:c1910e04fc6c 2584
charlesmn 0:c1910e04fc6c 2585 /* Write and read functions from I2C */
charlesmn 0:c1910e04fc6c 2586
charlesmn 0:c1910e04fc6c 2587 VL53LX_Error VL53L3CX_WrByte(VL53LX_DEV Dev, uint16_t index, uint8_t data);
charlesmn 0:c1910e04fc6c 2588 VL53LX_Error VL53L3CX_WrWord(VL53LX_DEV Dev, uint16_t index, uint16_t data);
charlesmn 0:c1910e04fc6c 2589 VL53LX_Error VL53L3CX_WrDWord(VL53LX_DEV Dev, uint16_t index, uint32_t data);
charlesmn 0:c1910e04fc6c 2590 VL53LX_Error VL53L3CX_RdByte(VL53LX_DEV Dev, uint16_t index, uint8_t *data);
charlesmn 0:c1910e04fc6c 2591 // VL53LX_Error VL53L3CX_RdWord(VL53LX_DEV Dev, uint16_t index, uint16_t *data);
charlesmn 0:c1910e04fc6c 2592 VL53LX_Error VL53L3CX_RdDWord(VL53LX_DEV Dev, uint16_t index, uint32_t *data);
charlesmn 0:c1910e04fc6c 2593 VL53LX_Error VL53L3CX_UpdateByte(VL53LX_DEV Dev, uint16_t index, uint8_t AndData, uint8_t OrData);
charlesmn 0:c1910e04fc6c 2594
charlesmn 0:c1910e04fc6c 2595 VL53LX_Error VL53L3CX_WriteMulti(VL53LX_DEV Dev, uint16_t index, uint8_t *pdata, uint32_t count);
charlesmn 0:c1910e04fc6c 2596 VL53LX_Error VL53L3CX_ReadMulti(VL53LX_DEV Dev, uint16_t index, uint8_t *pdata, uint32_t count);
charlesmn 0:c1910e04fc6c 2597
charlesmn 0:c1910e04fc6c 2598 VL53LX_Error VL53L3CX_I2CWrite(uint8_t DeviceAddr, uint16_t RegisterAddr, uint8_t *pBuffer, uint16_t NumByteToWrite);
charlesmn 0:c1910e04fc6c 2599 VL53LX_Error VL53L3CX_I2CRead(uint8_t DeviceAddr, uint16_t RegisterAddr, uint8_t *pBuffer, uint16_t NumByteToRead);
charlesmn 0:c1910e04fc6c 2600 VL53LX_Error VL53L3CX_GetTickCount(uint32_t *ptick_count_ms);
charlesmn 0:c1910e04fc6c 2601 VL53LX_Error VL53L3CX_WaitUs(VL53LX_Dev_t *pdev, int32_t wait_us);
charlesmn 0:c1910e04fc6c 2602 VL53LX_Error VL53L3CX_WaitMs(VL53LX_DEV Dev, int32_t wait_ms);
charlesmn 0:c1910e04fc6c 2603
charlesmn 0:c1910e04fc6c 2604 VL53LX_Error VL53L3CX_WaitValueMaskEx(VL53LX_DEV dev, uint32_t timeout_ms, uint16_t index, uint8_t value, uint8_t mask, uint32_t poll_delay_ms);
charlesmn 0:c1910e04fc6c 2605
charlesmn 0:c1910e04fc6c 2606 // dummy routines needed for inherited functions
charlesmn 0:c1910e04fc6c 2607 int read_id(uint8_t *id)
charlesmn 0:c1910e04fc6c 2608 {
charlesmn 0:c1910e04fc6c 2609 printf("dwwdji");
charlesmn 0:c1910e04fc6c 2610 return 26;
charlesmn 0:c1910e04fc6c 2611 }
charlesmn 0:c1910e04fc6c 2612
charlesmn 0:c1910e04fc6c 2613
charlesmn 0:c1910e04fc6c 2614
charlesmn 0:c1910e04fc6c 2615 int get_distance(uint32_t *pi_data)
charlesmn 0:c1910e04fc6c 2616 {
charlesmn 0:c1910e04fc6c 2617 return 43;
charlesmn 0:c1910e04fc6c 2618 }
charlesmn 0:c1910e04fc6c 2619
charlesmn 0:c1910e04fc6c 2620
charlesmn 0:c1910e04fc6c 2621 //protected:
charlesmn 0:c1910e04fc6c 2622
charlesmn 0:c1910e04fc6c 2623 /* IO Device */
charlesmn 0:c1910e04fc6c 2624 vl53L3_DevI2C *dev_i2c;
charlesmn 0:c1910e04fc6c 2625 /* Digital out pin */
charlesmn 0:c1910e04fc6c 2626 int gpio0;
charlesmn 0:c1910e04fc6c 2627
charlesmn 0:c1910e04fc6c 2628 /* Device data */
charlesmn 0:c1910e04fc6c 2629 VL53LX_Dev_t MyDevice;
charlesmn 0:c1910e04fc6c 2630 VL53LX_DEV Dev;
charlesmn 0:c1910e04fc6c 2631
charlesmn 0:c1910e04fc6c 2632 vl53L3_DevI2C *i2c_inst;
charlesmn 0:c1910e04fc6c 2633
charlesmn 0:c1910e04fc6c 2634 /* Digital out pin */
charlesmn 0:c1910e04fc6c 2635 DigitalOut *_gpio0;
charlesmn 0:c1910e04fc6c 2636 /* GPIO expander */
charlesmn 0:c1910e04fc6c 2637 Stmpe1600DigiOut *_expgpio0;
charlesmn 0:c1910e04fc6c 2638 /* Measure detection IRQ */
charlesmn 0:c1910e04fc6c 2639 InterruptIn *_gpio1Int;
charlesmn 0:c1910e04fc6c 2640 int I2cDevAddr;
charlesmn 0:c1910e04fc6c 2641 };
charlesmn 0:c1910e04fc6c 2642
charlesmn 0:c1910e04fc6c 2643 #endif /* _VL53LX_CLASS_H_ */
charlesmn 0:c1910e04fc6c 2644