|
| 1 | + |
| 2 | +/* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause */ |
| 3 | +/****************************************************************************** |
| 4 | + * Copyright (c) 2020, STMicroelectronics - All Rights Reserved |
| 5 | +
|
| 6 | + This file is part of VL53LX and is dual licensed, |
| 7 | + either GPL-2.0+ |
| 8 | + or 'BSD 3-clause "New" or "Revised" License' , at your option. |
| 9 | + ****************************************************************************** |
| 10 | + */ |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | +#ifndef _VL53LX_API_CALIBRATION_H_ |
| 16 | +#define _VL53LX_API_CALIBRATION_H_ |
| 17 | + |
| 18 | +#include "vl53lx_platform.h" |
| 19 | + |
| 20 | +#ifdef __cplusplus |
| 21 | +extern "C" { |
| 22 | +#endif |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | +VL53LX_Error VL53LX_run_ref_spad_char(VL53LX_DEV Dev, |
| 28 | + VL53LX_Error * pcal_status); |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | +VL53LX_Error VL53LX_run_device_test( |
| 34 | + VL53LX_DEV Dev, |
| 35 | + VL53LX_DeviceTestMode device_test_mode); |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | +VL53LX_Error VL53LX_get_and_avg_xtalk_samples( |
| 41 | + VL53LX_DEV Dev, |
| 42 | + uint8_t num_of_samples, |
| 43 | + uint8_t measurement_mode, |
| 44 | + int16_t xtalk_filter_thresh_max_mm, |
| 45 | + int16_t xtalk_filter_thresh_min_mm, |
| 46 | + uint16_t xtalk_max_valid_rate_kcps, |
| 47 | + uint8_t xtalk_result_id, |
| 48 | + uint8_t xtalk_histo_id, |
| 49 | + VL53LX_xtalk_range_results_t *pxtalk_results, |
| 50 | + VL53LX_histogram_bin_data_t *psum_histo, |
| 51 | + VL53LX_histogram_bin_data_t *pavg_histo); |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | +VL53LX_Error VL53LX_run_phasecal_average( |
| 58 | + VL53LX_DEV Dev, |
| 59 | + uint8_t measurement_mode, |
| 60 | + uint8_t phasecal_result__vcsel_start, |
| 61 | + uint16_t phasecal_num_of_samples, |
| 62 | + VL53LX_range_results_t *prange_results, |
| 63 | + uint16_t *pphasecal_result__reference_phase, |
| 64 | + uint16_t *pzero_distance_phase); |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | +void VL53LX_hist_xtalk_extract_data_init( |
| 70 | + VL53LX_hist_xtalk_extract_data_t *pxtalk_data); |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | +VL53LX_Error VL53LX_hist_xtalk_extract_update( |
| 75 | + int16_t target_distance_mm, |
| 76 | + uint16_t target_width_oversize, |
| 77 | + VL53LX_histogram_bin_data_t *phist_bins, |
| 78 | + VL53LX_hist_xtalk_extract_data_t *pxtalk_data); |
| 79 | + |
| 80 | + |
| 81 | + |
| 82 | +VL53LX_Error VL53LX_hist_xtalk_extract_fini( |
| 83 | + VL53LX_histogram_bin_data_t *phist_bins, |
| 84 | + VL53LX_hist_xtalk_extract_data_t *pxtalk_data, |
| 85 | + VL53LX_xtalk_calibration_results_t *pxtalk_cal, |
| 86 | + VL53LX_xtalk_histogram_shape_t *pxtalk_shape); |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | + |
| 91 | +VL53LX_Error VL53LX_run_hist_xtalk_extraction( |
| 92 | + VL53LX_DEV Dev, |
| 93 | + int16_t cal_distance_mm, |
| 94 | + VL53LX_Error *pcal_status); |
| 95 | + |
| 96 | + |
| 97 | +#ifdef __cplusplus |
| 98 | +} |
| 99 | +#endif |
| 100 | + |
| 101 | +#endif |
| 102 | + |
0 commit comments