vl53l1_core.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2017, STMicroelectronics - All Rights Reserved
3 *
4 * This file is part of VL53L1 Core and is dual licensed,
5 * either 'STMicroelectronics
6 * Proprietary license'
7 * or 'BSD 3-clause "New" or "Revised" License' , at your option.
8 *
9 ********************************************************************************
10 *
11 * 'STMicroelectronics Proprietary license'
12 *
13 ********************************************************************************
14 *
15 * License terms: STMicroelectronics Proprietary in accordance with licensing
16 * terms at www.st.com/sla0081
17 *
18 * STMicroelectronics confidential
19 * Reproduction and Communication of this document is strictly prohibited unless
20 * specifically authorized in writing by STMicroelectronics.
21 *
22 *
23 ********************************************************************************
24 *
25 * Alternatively, VL53L1 Core may be distributed under the terms of
26 * 'BSD 3-clause "New" or "Revised" License', in which case the following
27 * provisions apply instead of the ones mentioned above :
28 *
29 ********************************************************************************
30 *
31 * License terms: BSD 3-clause "New" or "Revised" License.
32 *
33 * Redistribution and use in source and binary forms, with or without
34 * modification, are permitted provided that the following conditions are met:
35 *
36 * 1. Redistributions of source code must retain the above copyright notice, this
37 * list of conditions and the following disclaimer.
38 *
39 * 2. Redistributions in binary form must reproduce the above copyright notice,
40 * this list of conditions and the following disclaimer in the documentation
41 * and/or other materials provided with the distribution.
42 *
43 * 3. Neither the name of the copyright holder nor the names of its contributors
44 * may be used to endorse or promote products derived from this software
45 * without specific prior written permission.
46 *
47 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
48 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
49 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
50 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
51 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
52 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
53 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
54 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
55 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
56 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
57 *
58 *
59 ********************************************************************************
60 *
61 */
62 
69 #ifndef _VL53L1_CORE_H_
70 #define _VL53L1_CORE_H_
71 
72 #include "vl53l1_platform.h"
73 #include "vl53l1_core_support.h"
74 
75 #ifdef __cplusplus
76 extern "C" {
77 #endif
78 
79 
87  VL53L1_DEV Dev);
88 
89 
98  VL53L1_DEV Dev,
99  VL53L1_DeviceState ll_state);
100 
101 
112  VL53L1_DEV Dev);
113 
114 
126  VL53L1_DEV Dev);
127 
128 
139  VL53L1_DEV Dev);
140 
141 
150  VL53L1_nvm_copy_data_t *pdata,
151  uint8_t *pbuffer);
152 
153 
164  VL53L1_system_results_t *pdata);
165 
166 
174  VL53L1_DEV Dev);
175 
176 
188  uint16_t ip_value,
189  uint16_t count,
190  uint8_t *pbuffer);
191 
192 
205  uint16_t count,
206  uint8_t *pbuffer);
207 
208 
220  int16_t ip_value,
221  uint16_t count,
222  uint8_t *pbuffer);
223 
224 
237  uint16_t count,
238  uint8_t *pbuffer);
239 
240 
252  uint32_t ip_value,
253  uint16_t count,
254  uint8_t *pbuffer);
255 
256 
269  uint16_t count,
270  uint8_t *pbuffer);
271 
272 
288  uint16_t count,
289  uint8_t *pbuffer,
290  uint32_t bit_mask,
291  uint32_t down_shift,
292  uint32_t offset);
293 
294 
306  int32_t ip_value,
307  uint16_t count,
308  uint8_t *pbuffer);
309 
310 
323  uint16_t count,
324  uint8_t *pbuffer);
325 
326 
337 #ifndef VL53L1_NOCALIB
339  VL53L1_DEV Dev,
340  uint8_t test_mode__ctrl);
341 #endif
342 
343 
358  VL53L1_DEV Dev,
359  uint8_t value);
360 
361 
372  VL53L1_DEV Dev);
373 
374 
387  VL53L1_DEV Dev);
388 
389 
404  VL53L1_DEV Dev,
405  uint8_t value);
406 
407 
424  VL53L1_DEV Dev);
425 
440  VL53L1_DEV Dev);
441 
442 
454  VL53L1_DEV Dev);
455 
456 
467 #ifdef VL53L1_DEBUG
468 VL53L1_Error VL53L1_force_shadow_stream_count_to_zero(
469  VL53L1_DEV Dev);
470 #endif
471 
489  uint16_t fast_osc_frequency,
490  uint8_t vcsel_period);
491 
492 
509  uint32_t central_rate,
510  int16_t x_gradient,
511  int16_t y_gradient,
512  uint8_t rate_mult);
513 
514 
526  uint32_t timeout_us,
527  uint32_t macro_period_us);
528 
540  uint32_t timeout_us,
541  uint32_t macro_period_us);
542 
543 
555  uint32_t timeout_mclks,
556  uint32_t macro_period_us);
557 
569  uint16_t timeout_encoded,
570  uint32_t macro_period_us);
571 
572 
582  uint32_t timeout_mclks);
583 
584 
595  uint16_t encoded_timeout);
596 
597 
616  uint32_t phasecal_config_timeout_us,
617  uint32_t mm_config_timeout_us,
618  uint32_t range_config_timeout_us,
619  uint16_t fast_osc_frequency,
620  VL53L1_general_config_t *pgeneral,
621  VL53L1_timing_config_t *ptiming);
622 
623 
634  uint8_t vcsel_period_pclks);
635 
636 
650  uint8_t *pbuffer,
651  uint8_t no_of_bytes);
652 
653 
664  uint32_t ip_value,
665  uint8_t no_of_bytes,
666  uint8_t *pbuffer);
667 
684  uint8_t spad_number,
685  uint8_t *pbyte_index,
686  uint8_t *pbit_index,
687  uint8_t *pbit_mask);
688 
689 
701  uint8_t row,
702  uint8_t col,
703  uint8_t *pspad_number);
704 
705 
716  uint8_t encoded_xy_size,
717  uint8_t *pwidth,
718  uint8_t *pheight);
719 
720 
731  uint8_t width,
732  uint8_t height,
733  uint8_t *pencoded_xy_size);
734 
735 
751  uint8_t encoded_xy_centre,
752  uint8_t encoded_xy_size,
753  int16_t *px_ll,
754  int16_t *py_ll,
755  int16_t *px_ur,
756  int16_t *py_ur);
757 
758 
769  uint8_t row,
770  uint8_t col);
771 
772 
790  uint8_t encoded_mm_roi_centre,
791  uint8_t encoded_mm_roi_size,
792  uint8_t encoded_zone_centre,
793  uint8_t encoded_zone_size,
794  uint8_t *pgood_spads,
795  uint16_t aperture_attenuation,
796  uint16_t *pmm_inner_effective_spads,
797  uint16_t *pmm_outer_effective_spads);
798 
810  VL53L1_DEV Dev);
811 
812 
822 
831  uint8_t system__interrupt_config);
832 
842  VL53L1_DEV Dev,
843  uint16_t threshold_high,
844  uint16_t threshold_low);
845 
855  VL53L1_DEV Dev,
856  uint16_t threshold_high,
857  uint16_t threshold_low);
858 
868  VL53L1_DEV Dev,
870 
871 
902 #ifndef VL53L1_NOCALIB
904  VL53L1_DEV Dev,
905  uint8_t vcsel_period_a,
906  uint32_t phasecal_timeout_us,
907  uint16_t total_rate_target_mcps,
908  uint16_t max_count_rate_rtn_limit_mcps,
909  uint16_t min_count_rate_rtn_limit_mcps,
910  uint16_t fast_osc_frequency);
911 #endif
912 
913 
950 #ifndef VL53L1_NOCALIB
952  VL53L1_DEV Dev,
953  VL53L1_ssc_config_t *pssc_cfg,
954  uint16_t fast_osc_frequency);
955 #endif
956 
957 
983 #ifndef VL53L1_NOCALIB
985  VL53L1_DEV Dev,
986  VL53L1_spad_rate_data_t *pspad_rates);
987 #endif
988 
1004  uint32_t plane_offset_kcps,
1005  int16_t margin_offset_kcps);
1006 
1019  VL53L1_DEV Dev
1020  );
1021 
1034  VL53L1_DEV Dev
1035  );
1036 
1052  VL53L1_general_config_t *pgeneral,
1053  VL53L1_dynamic_config_t *pdynamic,
1055  );
1056 
1070  VL53L1_DEV Dev);
1071 
1084  VL53L1_DEV Dev);
1085 
1086 #ifdef __cplusplus
1087 }
1088 #endif
1089 
1090 #endif /* _VL53L1_API_CORE_H_ */
VL53L1_system_results_t
Definition: vl53l1_register_structs.h:1359
VL53L1_encode_timeout
uint16_t VL53L1_encode_timeout(uint32_t timeout_mclks)
Encode timeout in (LSByte * 2^MSByte) + 1 register format.
Definition: vl53l1_core.c:1231
VL53L1_timing_config_t
Definition: vl53l1_register_structs.h:932
VL53L1_low_power_auto_data_t
Structure to hold state, tuning and output variables for the low power auto mode (Presence)
Definition: vl53l1_ll_def.h:480
VL53L1_spad_number_to_byte_bit_index
void VL53L1_spad_number_to_byte_bit_index(uint8_t spad_number, uint8_t *pbyte_index, uint8_t *pbit_index, uint8_t *pbit_mask)
Get the SPAD number, byte index (0-31) and bit index (0-7) for.
Definition: vl53l1_core.c:1429
uint32_t
unsigned int uint32_t
Typedef defining 32 bit unsigned int type. The developer should modify this to suit the platform bein...
Definition: vl53l1_types.h:113
uint8_t
unsigned char uint8_t
Typedef defining 8 bit unsigned char type. The developer should modify this to suit the platform bein...
Definition: vl53l1_types.h:133
vl53l1_core_support.h
EwokPlus25 core function definitions.
VL53L1_copy_rtn_good_spads_to_buffer
void VL53L1_copy_rtn_good_spads_to_buffer(VL53L1_nvm_copy_data_t *pdata, uint8_t *pbuffer)
Convenience function to copy return SPAD enables to buffer.
Definition: vl53l1_core.c:437
VL53L1_disable_firmware
VL53L1_Error VL53L1_disable_firmware(VL53L1_DEV Dev)
Disables MCU firmware.
Definition: vl53l1_core.c:787
VL53L1_i2c_decode_with_mask
uint32_t VL53L1_i2c_decode_with_mask(uint16_t count, uint8_t *pbuffer, uint32_t bit_mask, uint32_t down_shift, uint32_t offset)
Decodes an integer register value from an I2C read buffer.
Definition: vl53l1_core.c:643
VL53L1_calc_timeout_us
uint32_t VL53L1_calc_timeout_us(uint32_t timeout_mclks, uint32_t macro_period_us)
Calculates the timeout in us based on the input timeout im macro periods value and the macro period i...
Definition: vl53l1_core.c:1133
VL53L1_calc_macro_period_us
uint32_t VL53L1_calc_macro_period_us(uint16_t fast_osc_frequency, uint8_t vcsel_period)
Forces shadow stream count to zero.
Definition: vl53l1_core.c:920
VL53L1_init_ll_driver_state
void VL53L1_init_ll_driver_state(VL53L1_DEV Dev, VL53L1_DeviceState ll_state)
Initialise LL Driver State.
Definition: vl53l1_core.c:114
VL53L1_calc_range_ignore_threshold
uint16_t VL53L1_calc_range_ignore_threshold(uint32_t central_rate, int16_t x_gradient, int16_t y_gradient, uint8_t rate_mult)
Calculates the Xtalk Range Ignore Threshold rate per spad in 3.13Mcps.
Definition: vl53l1_core.c:987
VL53L1_set_ssc_config
VL53L1_Error VL53L1_set_ssc_config(VL53L1_DEV Dev, VL53L1_ssc_config_t *pssc_cfg, uint16_t fast_osc_frequency)
Applies SSC (SPAD Self Check) configuration to device.
Definition: vl53l1_core.c:1935
VL53L1_decode_timeout
uint32_t VL53L1_decode_timeout(uint16_t encoded_timeout)
Decode 16-bit timeout register value.
Definition: vl53l1_core.c:1257
VL53L1_check_ll_driver_rd_state
VL53L1_Error VL53L1_check_ll_driver_rd_state(VL53L1_DEV Dev)
Checks if the LL Driver Read state and expected stream count matches the state and stream count recei...
Definition: vl53l1_core.c:255
VL53L1_disable_powerforce
VL53L1_Error VL53L1_disable_powerforce(VL53L1_DEV Dev)
Disables power force.
Definition: vl53l1_core.c:847
VL53L1_general_config_t
Definition: vl53l1_register_structs.h:743
VL53L1_i2c_encode_int32_t
void VL53L1_i2c_encode_int32_t(int32_t ip_value, uint16_t count, uint8_t *pbuffer)
Encodes a int32_t register value into an I2C write buffer.
Definition: vl53l1_core.c:675
VL53L1_enable_firmware
VL53L1_Error VL53L1_enable_firmware(VL53L1_DEV Dev)
Enables MCU firmware.
Definition: vl53l1_core.c:768
VL53L1_DeviceState
uint8_t VL53L1_DeviceState
Definition: vl53l1_ll_device.h:101
VL53L1_i2c_decode_int32_t
int32_t VL53L1_i2c_decode_int32_t(uint16_t count, uint8_t *pbuffer)
Decodes a int32_t register value from an I2C read buffer.
Definition: vl53l1_core.c:696
VL53L1_set_ref_spad_char_config
VL53L1_Error VL53L1_set_ref_spad_char_config(VL53L1_DEV Dev, uint8_t vcsel_period_a, uint32_t phasecal_timeout_us, uint16_t total_rate_target_mcps, uint16_t max_count_rate_rtn_limit_mcps, uint16_t min_count_rate_rtn_limit_mcps, uint16_t fast_osc_frequency)
Set Ref SPAD Characterisation Config.
Definition: vl53l1_core.c:1819
VL53L1_i2c_encode_uint16_t
void VL53L1_i2c_encode_uint16_t(uint16_t ip_value, uint16_t count, uint8_t *pbuffer)
Encodes a uint16_t register value into an I2C write buffer.
Definition: vl53l1_core.c:519
VL53L1_i2c_encode_int16_t
void VL53L1_i2c_encode_int16_t(int16_t ip_value, uint16_t count, uint8_t *pbuffer)
Encodes a int16_t register value into an I2C write buffer.
Definition: vl53l1_core.c:559
VL53L1_spad_rate_data_t
SPAD Rate Data output by SSC.
Definition: vl53l1_ll_def.h:1019
VL53L1_decode_unsigned_integer
uint32_t VL53L1_decode_unsigned_integer(uint8_t *pbuffer, uint8_t no_of_bytes)
Decodes an unsigned integer from a uint8_t buffer 16-bit, 24-bit or 32-bit integers.
Definition: vl53l1_core.c:1390
VL53L1_encode_GPIO_interrupt_config
uint8_t VL53L1_encode_GPIO_interrupt_config(VL53L1_GPIO_interrupt_config_t *pintconf)
Encodes VL53L1_GPIO_interrupt_config_t structure to FW register format.
Definition: vl53l1_core.c:1706
VL53L1_ssc_config_t
SPAD Self Check (SSC) Config data structure.
Definition: vl53l1_ll_def.h:187
VL53L1_i2c_encode_uint32_t
void VL53L1_i2c_encode_uint32_t(uint32_t ip_value, uint16_t count, uint8_t *pbuffer)
Encodes a uint32_t register value into an I2C write buffer.
Definition: vl53l1_core.c:603
VL53L1_GPIO_interrupt_config_t
Structure to configure conditions when GPIO interrupt is trigerred.
Definition: vl53l1_ll_def.h:430
VL53L1_low_power_auto_update_DSS
VL53L1_Error VL53L1_low_power_auto_update_DSS(VL53L1_DEV Dev)
Do a DSS calculation and update manual config.
Definition: vl53l1_core.c:2256
VL53L1_is_aperture_location
uint8_t VL53L1_is_aperture_location(uint8_t row, uint8_t col)
Returns > 0 if input (row,col) location is an apertured SPAD.
Definition: vl53l1_core.c:1561
V53L1_init_zone_dss_configs
void V53L1_init_zone_dss_configs(VL53L1_DEV Dev)
Initialise zone dynamic config DSS control values.
VL53L1_low_power_auto_data_init
VL53L1_Error VL53L1_low_power_auto_data_init(VL53L1_DEV Dev)
Initialize the Low Power Auto data structure.
Definition: vl53l1_core.c:2101
VL53L1_Dev_t
Definition: vl53l1_platform_user_data.h:78
VL53L1_dynamic_config_t
Definition: vl53l1_register_structs.h:1105
int16_t
short int16_t
Typedef defining 16 bit short type. The developer should modify this to suit the platform being deplo...
Definition: vl53l1_types.h:128
VL53L1_set_powerforce_register
VL53L1_Error VL53L1_set_powerforce_register(VL53L1_DEV Dev, uint8_t value)
Set power force register.
Definition: vl53l1_core.c:806
VL53L1_set_firmware_enable_register
VL53L1_Error VL53L1_set_firmware_enable_register(VL53L1_DEV Dev, uint8_t value)
Set firmware enable register.
Definition: vl53l1_core.c:747
VL53L1_i2c_decode_int16_t
int16_t VL53L1_i2c_decode_int16_t(uint16_t count, uint8_t *pbuffer)
Decodes a int16_t register value from an I2C read buffer.
Definition: vl53l1_core.c:580
VL53L1_i2c_decode_uint16_t
uint16_t VL53L1_i2c_decode_uint16_t(uint16_t count, uint8_t *pbuffer)
Decodes a uint16_t register value from an I2C read buffer.
Definition: vl53l1_core.c:540
VL53L1_update_ll_driver_rd_state
VL53L1_Error VL53L1_update_ll_driver_rd_state(VL53L1_DEV Dev)
Update LL Driver Read State.
Definition: vl53l1_core.c:138
VL53L1_set_GPIO_rate_threshold
VL53L1_Error VL53L1_set_GPIO_rate_threshold(VL53L1_DEV Dev, uint16_t threshold_high, uint16_t threshold_low)
SET GPIO rate threshold.
Definition: vl53l1_core.c:1770
VL53L1_calc_timeout_register_values
VL53L1_Error VL53L1_calc_timeout_register_values(uint32_t phasecal_config_timeout_us, uint32_t mm_config_timeout_us, uint32_t range_config_timeout_us, uint16_t fast_osc_frequency, VL53L1_general_config_t *pgeneral, VL53L1_timing_config_t *ptiming)
Converts the input MM and range timeouts in [us] into the appropriate register values.
Definition: vl53l1_core.c:1273
VL53L1_set_GPIO_thresholds_from_struct
VL53L1_Error VL53L1_set_GPIO_thresholds_from_struct(VL53L1_DEV Dev, VL53L1_GPIO_interrupt_config_t *pintconf)
SET GPIO thresholds from structure. Sets both rate and distance thresholds.
Definition: vl53l1_core.c:1792
VL53L1_encode_zone_size
void VL53L1_encode_zone_size(uint8_t width, uint8_t height, uint8_t *pencoded_xy_size)
Encodes a zone width & height into encoded size format.
Definition: vl53l1_core.c:1489
VL53L1_encode_unsigned_integer
void VL53L1_encode_unsigned_integer(uint32_t ip_value, uint8_t no_of_bytes, uint8_t *pbuffer)
Encodes an unsigned integer into a uint8_t buffer MS byte first.
Definition: vl53l1_core.c:1409
VL53L1_low_power_auto_data_stop_range
VL53L1_Error VL53L1_low_power_auto_data_stop_range(VL53L1_DEV Dev)
Reset internal state but leave low_power_auto mode intact.
Definition: vl53l1_core.c:2133
VL53L1_set_GPIO_distance_threshold
VL53L1_Error VL53L1_set_GPIO_distance_threshold(VL53L1_DEV Dev, uint16_t threshold_high, uint16_t threshold_low)
SET GPIO distance threshold.
Definition: vl53l1_core.c:1748
VL53L1_enable_powerforce
VL53L1_Error VL53L1_enable_powerforce(VL53L1_DEV Dev)
Enables power force.
Definition: vl53l1_core.c:828
VL53L1_get_spad_rate_data
VL53L1_Error VL53L1_get_spad_rate_data(VL53L1_DEV Dev, VL53L1_spad_rate_data_t *pspad_rates)
Gets the 256 return array SSC rates from the Patch RAM.
Definition: vl53l1_core.c:2039
int32_t
int int32_t
Typedef defining 32 bit int type. The developer should modify this to suit the platform being deploye...
Definition: vl53l1_types.h:118
VL53L1_init_system_results
void VL53L1_init_system_results(VL53L1_system_results_t *pdata)
Initialise system results structure to all ones.
Definition: vl53l1_core.c:480
VL53L1_config_low_power_auto_mode
VL53L1_Error VL53L1_config_low_power_auto_mode(VL53L1_general_config_t *pgeneral, VL53L1_dynamic_config_t *pdynamic, VL53L1_low_power_auto_data_t *plpadata)
Initialize the config strcutures when low power auto preset modes are selected.
Definition: vl53l1_core.c:2174
VL53L1_init_version
void VL53L1_init_version(VL53L1_DEV Dev)
Initialise version info in pdev.
Definition: vl53l1_core.c:98
VL53L1_calc_crosstalk_plane_offset_with_margin
uint32_t VL53L1_calc_crosstalk_plane_offset_with_margin(uint32_t plane_offset_kcps, int16_t margin_offset_kcps)
Function to add signed margin to the xtalk plane offset value, dealing with signed and unsigned value...
Definition: vl53l1_core.c:1172
vl53l1_platform.h
VL53L1_update_ll_driver_cfg_state
VL53L1_Error VL53L1_update_ll_driver_cfg_state(VL53L1_DEV Dev)
Update LL Driver Configuration State.
Definition: vl53l1_core.c:349
VL53L1_encode_vcsel_period
uint8_t VL53L1_encode_vcsel_period(uint8_t vcsel_period_pclks)
Encodes the real period in PLL clocks into the register value.
Definition: vl53l1_core.c:1375
VL53L1_low_power_auto_setup_manual_calibration
VL53L1_Error VL53L1_low_power_auto_setup_manual_calibration(VL53L1_DEV Dev)
Setup ranges after the first one in low power auto mode by turning off FW calibration steps and progr...
Definition: vl53l1_core.c:2216
VL53L1_nvm_copy_data_t
Definition: vl53l1_register_structs.h:2208
VL53L1_decode_zone_size
void VL53L1_decode_zone_size(uint8_t encoded_xy_size, uint8_t *pwidth, uint8_t *pheight)
Decodes encoded zone size format into width and height values.
Definition: vl53l1_core.c:1468
VL53L1_encode_row_col
void VL53L1_encode_row_col(uint8_t row, uint8_t col, uint8_t *pspad_number)
Encodes a (col,row) coord value into ByteIndex.BitIndex format.
Definition: vl53l1_core.c:1451
VL53L1_Error
int8_t VL53L1_Error
Definition: vl53l1_error_codes.h:89
VL53L1_calc_decoded_timeout_us
uint32_t VL53L1_calc_decoded_timeout_us(uint16_t timeout_encoded, uint32_t macro_period_us)
Calculates the decoded timeout in us based on the input encoded timeout register value and the macro ...
Definition: vl53l1_core.c:1201
VL53L1_calc_encoded_timeout
uint16_t VL53L1_calc_encoded_timeout(uint32_t timeout_us, uint32_t macro_period_us)
Calculates the encoded timeout register value based on the input timeout period in milliseconds and t...
Definition: vl53l1_core.c:1094
uint16_t
unsigned short uint16_t
Typedef defining 16 bit unsigned short type. The developer should modify this to suit the platform be...
Definition: vl53l1_types.h:123
VL53L1_decode_zone_limits
void VL53L1_decode_zone_limits(uint8_t encoded_xy_centre, uint8_t encoded_xy_size, int16_t *px_ll, int16_t *py_ll, int16_t *px_ur, int16_t *py_ur)
Decodes encoded zone info into min/max limits.
Definition: vl53l1_core.c:1508
VL53L1_start_test
VL53L1_Error VL53L1_start_test(VL53L1_DEV Dev, uint8_t test_mode__ctrl)
Triggers the start of the provided test_mode.
Definition: vl53l1_core.c:721
VL53L1_calc_timeout_mclks
uint32_t VL53L1_calc_timeout_mclks(uint32_t timeout_us, uint32_t macro_period_us)
Calculates the timeout value in macro period based on the input timeout period in milliseconds and th...
Definition: vl53l1_core.c:1067
VL53L1_i2c_decode_uint32_t
uint32_t VL53L1_i2c_decode_uint32_t(uint16_t count, uint8_t *pbuffer)
Decodes a uint32_t register value from an I2C read buffer.
Definition: vl53l1_core.c:624
VL53L1_save_cfg_data
VL53L1_Error VL53L1_save_cfg_data(VL53L1_DEV Dev)
Function to save dynamic config data per zone at init and start range.
VL53L1_calc_mm_effective_spads
void VL53L1_calc_mm_effective_spads(uint8_t encoded_mm_roi_centre, uint8_t encoded_mm_roi_size, uint8_t encoded_zone_centre, uint8_t encoded_zone_size, uint8_t *pgood_spads, uint16_t aperture_attenuation, uint16_t *pmm_inner_effective_spads, uint16_t *pmm_outer_effective_spads)
Calculates the effective SPAD counts for the MM inner and outer regions based on the input MM ROI,...
Definition: vl53l1_core.c:1583
VL53L1_clear_interrupt
VL53L1_Error VL53L1_clear_interrupt(VL53L1_DEV Dev)
Clears Ranging Interrupt.
Definition: vl53l1_core.c:866
VL53L1_decode_GPIO_interrupt_config
VL53L1_GPIO_interrupt_config_t VL53L1_decode_GPIO_interrupt_config(uint8_t system__interrupt_config)
Decodes FW register to VL53L1_GPIO_interrupt_config_t structure.
Definition: vl53l1_core.c:1724


vl53l1x
Author(s):
autogenerated on Fri Aug 2 2024 08:35:54