Fork, renaming of VL53L1CB-2

Dependencies:   X_NUCLEO_COMMON ST_INTERFACES

Dependents:   X_NUCLEO_53L1CB

Committer:
Charles MacNeill
Date:
Fri Jun 11 17:08:27 2021 +0100
Revision:
13:3f1b341901dd
Parent:
7:1add29d51e72
changing case of vl53l1cb.* so it works in linux

Who changed what in which revision?

UserRevisionLine numberNew contents of line
charlesmn 0:3ac96e360672 1
Charles MacNeill 7:1add29d51e72 2 /* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause */
charlesmn 0:3ac96e360672 3 /******************************************************************************
Charles MacNeill 7:1add29d51e72 4 * Copyright (c) 2020, STMicroelectronics - All Rights Reserved
charlesmn 0:3ac96e360672 5
Charles MacNeill 7:1add29d51e72 6 This file is part of VL53L1 and is dual licensed,
Charles MacNeill 7:1add29d51e72 7 either GPL-2.0+
Charles MacNeill 7:1add29d51e72 8 or 'BSD 3-clause "New" or "Revised" License' , at your option.
Charles MacNeill 7:1add29d51e72 9 ******************************************************************************
charlesmn 0:3ac96e360672 10 */
charlesmn 0:3ac96e360672 11
charlesmn 0:3ac96e360672 12 #ifndef _VL53L1_PRESET_SETUP_H_
charlesmn 0:3ac96e360672 13 #define _VL53L1_PRESET_SETUP_H_
charlesmn 0:3ac96e360672 14
charlesmn 0:3ac96e360672 15 #ifdef __cplusplus
charlesmn 0:3ac96e360672 16 extern "C"
charlesmn 0:3ac96e360672 17 {
charlesmn 0:3ac96e360672 18 #endif
charlesmn 0:3ac96e360672 19
charlesmn 0:3ac96e360672 20 /* indexes for the bare driver tuning setting API function */
charlesmn 0:3ac96e360672 21 enum VL53L1_Tuning_t {
charlesmn 0:3ac96e360672 22 VL53L1_TUNING_VERSION = 0,
charlesmn 0:3ac96e360672 23 VL53L1_TUNING_PROXY_MIN,
charlesmn 0:3ac96e360672 24 VL53L1_TUNING_SINGLE_TARGET_XTALK_TARGET_DISTANCE_MM,
charlesmn 0:3ac96e360672 25 VL53L1_TUNING_SINGLE_TARGET_XTALK_SAMPLE_NUMBER,
charlesmn 0:3ac96e360672 26 VL53L1_TUNING_MIN_AMBIENT_DMAX_VALID,
charlesmn 0:3ac96e360672 27 VL53L1_TUNING_MAX_SIMPLE_OFFSET_CALIBRATION_SAMPLE_NUMBER,
charlesmn 0:3ac96e360672 28 VL53L1_TUNING_XTALK_FULL_ROI_TARGET_DISTANCE_MM,
charlesmn 0:3ac96e360672 29 VL53L1_TUNING_SIMPLE_OFFSET_CALIBRATION_REPEAT,
charlesmn 0:3ac96e360672 30 VL53L1_TUNING_XTALK_FULL_ROI_BIN_SUM_MARGIN,
charlesmn 0:3ac96e360672 31 VL53L1_TUNING_XTALK_FULL_ROI_DEFAULT_OFFSET,
charlesmn 0:3ac96e360672 32 VL53L1_TUNING_ZERO_DISTANCE_OFFSET_NON_LINEAR_FACTOR,
charlesmn 0:3ac96e360672 33 VL53L1_TUNING_MAX_TUNABLE_KEY
charlesmn 0:3ac96e360672 34 };
charlesmn 0:3ac96e360672 35
charlesmn 0:3ac96e360672 36 /* default values for the tuning settings parameters */
charlesmn 0:3ac96e360672 37 #define TUNING_VERSION 0x0007
charlesmn 0:3ac96e360672 38
charlesmn 0:3ac96e360672 39 #define TUNING_PROXY_MIN -30 /* min distance in mm */
charlesmn 0:3ac96e360672 40 #define TUNING_SINGLE_TARGET_XTALK_TARGET_DISTANCE_MM 600
charlesmn 0:3ac96e360672 41 /* Target distance in mm for single target Xtalk */
charlesmn 0:3ac96e360672 42 #define TUNING_SINGLE_TARGET_XTALK_SAMPLE_NUMBER 50
charlesmn 0:3ac96e360672 43 /* Number of sample used for single target Xtalk */
charlesmn 0:3ac96e360672 44 #define TUNING_MIN_AMBIENT_DMAX_VALID 8
charlesmn 0:3ac96e360672 45 /* Minimum ambient level to state the Dmax returned by the device is valid */
charlesmn 0:3ac96e360672 46 #define TUNING_MAX_SIMPLE_OFFSET_CALIBRATION_SAMPLE_NUMBER 10
charlesmn 0:3ac96e360672 47 /* Maximum loops to perform simple offset calibration */
charlesmn 0:3ac96e360672 48 #define TUNING_XTALK_FULL_ROI_TARGET_DISTANCE_MM 600
charlesmn 0:3ac96e360672 49 /* Target distance in mm for target Xtalk from Bins method*/
charlesmn 0:3ac96e360672 50 #define TUNING_SIMPLE_OFFSET_CALIBRATION_REPEAT 3
charlesmn 0:3ac96e360672 51 /* Number of loops done during the simple offset calibration*/
charlesmn 0:3ac96e360672 52 #define TUNING_ZERO_DISTANCE_OFFSET_NON_LINEAR_FACTOR_DEFAULT 9
charlesmn 0:3ac96e360672 53 /* zero distance offset calibration non linear compensation default value */
charlesmn 0:3ac96e360672 54
charlesmn 0:3ac96e360672 55 /* The following settings are related to the fix for ticket EwokP #558410 */
charlesmn 0:3ac96e360672 56 #define TUNING_XTALK_FULL_ROI_BIN_SUM_MARGIN 24
charlesmn 0:3ac96e360672 57 /* Acceptance margin for the xtalk_shape bin_data sum computation */
charlesmn 0:3ac96e360672 58 #define TUNING_XTALK_FULL_ROI_DEFAULT_OFFSET 50
charlesmn 0:3ac96e360672 59 /* Recovery value for Xtalk compensation plane offset in kcps */
charlesmn 0:3ac96e360672 60 /* 50 stands for ~0.10 kcps cover glass in 7.9 format */
charlesmn 0:3ac96e360672 61 /* End of settings related to the fix for ticket EwokP #558410 */
charlesmn 0:3ac96e360672 62
charlesmn 0:3ac96e360672 63 #ifdef __cplusplus
charlesmn 0:3ac96e360672 64 }
charlesmn 0:3ac96e360672 65 #endif
charlesmn 0:3ac96e360672 66
charlesmn 0:3ac96e360672 67 #endif /* _VL53L1_PRESET_SETUP_H_ */