71 #ifndef _VL53L1_LL_DEF_H_ 72 #define _VL53L1_LL_DEF_H_ 91 #define VL53L1_LL_API_IMPLEMENTATION_VER_MAJOR 1 93 #define VL53L1_LL_API_IMPLEMENTATION_VER_MINOR 2 95 #define VL53L1_LL_API_IMPLEMENTATION_VER_SUB 10 97 #define VL53L1_LL_API_IMPLEMENTATION_VER_REVISION 1840 99 #define VL53L1_LL_API_IMPLEMENTATION_VER_STRING "1.2.11.1840" 102 #define VL53L1_FIRMWARE_VER_MINIMUM 398 103 #define VL53L1_FIRMWARE_VER_MAXIMUM 400 110 #define VL53L1_LL_CALIBRATION_DATA_STRUCT_VERSION 0xECAB0102 115 #define VL53L1_LL_ZONE_CALIBRATION_DATA_STRUCT_VERSION 0xECAE0101 120 #define VL53L1_MAX_OFFSET_RANGE_RESULTS 3 125 #define VL53L1_NVM_MAX_FMT_RANGE_DATA 4 128 #define VL53L1_NVM_PEAK_RATE_MAP_SAMPLES 25 130 #define VL53L1_NVM_PEAK_RATE_MAP_WIDTH 5 132 #define VL53L1_NVM_PEAK_RATE_MAP_HEIGHT 5 140 #define VL53L1_ERROR_DEVICE_FIRMWARE_TOO_OLD ((VL53L1_Error) - 80) 142 #define VL53L1_ERROR_DEVICE_FIRMWARE_TOO_NEW ((VL53L1_Error) - 85) 144 #define VL53L1_ERROR_UNIT_TEST_FAIL ((VL53L1_Error) - 90) 146 #define VL53L1_ERROR_FILE_READ_FAIL ((VL53L1_Error) - 95) 148 #define VL53L1_ERROR_FILE_WRITE_FAIL ((VL53L1_Error) - 96) 1072 #define SUPPRESS_UNUSED_WARNING(x) \ 1076 #define IGNORE_STATUS(__FUNCTION_ID__, __ERROR_STATUS_CHECK__, __STATUS__) \ 1078 DISABLE_WARNINGS(); \ 1079 if (__FUNCTION_ID__) { \ 1080 if (__STATUS__ == __ERROR_STATUS_CHECK__) { \ 1081 __STATUS__ = VL53L1_ERROR_NONE; \ 1082 WARN_OVERRIDE_STATUS(__FUNCTION_ID__); \ 1085 ENABLE_WARNINGS(); \ 1089 #define VL53L1_COPYSTRING(str, ...) \ 1090 (strncpy(str, ##__VA_ARGS__, VL53L1_MAX_STRING_LENGTH-1)) uint32_t tp_mm_timeout_timed_us
Error Code definitions for VL53L1 API.
uint32_t inter_measurement_period_ms
VL53L1_ll_driver_state_t ll_state
VL53L1_optical_centre_t optical_centre
VL53L1_DeviceSscArray array_select
uint16_t vl53l1_tuningparm_version
uint8_t tp_timed_seed_cfg
VL53L1_user_zone_t mm_roi
uint32_t vl53l1_tuningparm_refspadchar_phasecal_timeout_us
uint16_t vl53l1_tuningparm_refspadchar_min_countrate_limit_mcps
uint8_t vl53l1_tuningparm_vhv_loopbound
uint32_t vl53l1_tuningparm_lite_mm_config_timeout_us
uint16_t vl53l1_tuningparm_lite_short_min_count_rate_rtn_mcps
VL53L1 LL Driver ST private data structure .
uint16_t max_count_rate_limit_mcps
VL53L1_static_nvm_managed_t stat_nvm
Reference SPAD Characterization (RefSpadChar) Config.
uint8_t vl53l1_tuningparm_lowpowerauto_vhv_loop_bound
uint8_t tp_lite_sigma_est_pulse_width_ns
uint32_t inter_measurement_period_ms
VL53L1_core_results_t core_results
Structure to hold state, tuning and output variables for the low power auto mode (Presence) ...
uint16_t vl53l1_tuningparm_lite_med_min_count_rate_rtn_mcps
uint32_t total_periods_elapsed
VL53L1_gain_calibration_data_t gain_cal
uint16_t vl53l1_tuningparm_spadmap_rate_limit_mcps
uint8_t tp_init_phase_ref_lite_med
uint16_t min_count_rate_limit_mcps
uint32_t vl53l1_tuningparm_timed_mm_config_timeout_us
uint8_t tp_lite_quantifier
uint32_t tp_mm_timeout_lpa_us
uint32_t vl53l1_tuningparm_offset_cal_phasecal_timeout_us
uint8_t tp_lite_sigma_ref_mm
VL53L1_OffsetCorrectionMode offset_correction_mode
VL53L1_OffsetCalibrationMode offset_calibration_mode
uint32_t tp_range_timeout_lpa_us
uint16_t dss__required_spads
EwokPlus25 LL Driver definitions for control of error handling in LL driver.
uint8_t tp_init_phase_ref_lite_long
VL53L1_additional_offset_cal_data_t add_off_cal_data
uint8_t vl53l1_tuningparm_offset_cal_mm2_samples
uint16_t vl53l1_tuningparm_refspadchar_max_countrate_limit_mcps
uint16_t result__mm_outer_actual_effective_spads
uint16_t ambient_count_rate_mcps
uint16_t dss_config__target_total_rate_mcps
VL53L1_refspadchar_config_t refspadchar
uint32_t nvm_default__crosstalk_compensation_plane_offset_kcps
int16_t lite_mode_crosstalk_margin_kcps
VL53L1_timing_config_t tim_cfg
short int16_t
Typedef defining 16 bit short type. The developer should modify this to suit the platform being deplo...
uint8_t tp_init_phase_rtn_lite_med
uint32_t mm_config_timeout_us
uint16_t zero_distance_phase
uint16_t tp_tuning_parm_key_table_version
SPAD Rate Data output by SSC.
uint16_t tp_lite_med_sigma_thresh_mm
uint32_t ambient_window_events
uint8_t vl53l1_tuningparm_timed_seed_config
VL53L1_additional_offset_cal_data_t add_off_cal_data
uint16_t vl53l1_tuningparm_lite_short_sigma_thresh_mm
Defines User Zone(ROI) parameters.
VL53L1_offset_range_results_t offset_results
uint8_t vl53l1_tuningparm_spadmap_vcsel_period
uint16_t tp_dss_target_timed_mcps
uint8_t tp_lite_sigma_est_amb_width_ns
uint8_t low_power_auto_range_count
VL53L1_general_config_t gen_cfg
VL53L1_DeviceState rd_device_state
VL53L1_DeviceState rd_device_state
uint16_t tp_cal_repeat_rate
uint16_t dss_config__target_total_rate_mcps
VL53L1_DeviceMeasurementModes measurement_mode
uint16_t threshold_distance_high
VL53L1_GPIO_interrupt_config_t gpio_interrupt_config
uint8_t tp_consistency_lite_phase_tolerance
uint32_t fw_ready_poll_duration_ms
uint32_t vl53l1_tuningparm_offset_cal_mm_timeout_us
uint16_t vl53l1_tuningparm_lite_cal_repeat_rate
VL53L1_GPIO_Interrupt_Mode intr_mode_rate
VL53L1_DevicePresetModes preset_mode
uint32_t ranging_total_events
uint8_t vl53l1_tuningparm_lite_quantifier
VL53L1_gain_calibration_data_t gain_cal
uint16_t vl53l1_tuningparm_lite_med_sigma_thresh_mm
int32_t signal_total_events
uint32_t tp_phasecal_timeout_timed_us
Structure for storing the set of range results required for the offset calibration functions...
VL53L1_system_results_t sys_results
uint16_t peak_signal_count_rate_mcps
uint32_t vl53l1_tuningparm_timed_range_config_timeout_us
uint16_t vl53l1_tuningparm_lite_ranging_gain_factor
VL53L1_xtalk_config_t xtalk_cfg
uint16_t threshold_distance_low
uint8_t vl53l1_tuningparm_lite_min_clip_mm
uint8_t vl53l1_tuningparm_phasecal_target
int16_t algo__crosstalk_compensation_x_plane_gradient_kcps
uint16_t vl53l1_tuningparm_lite_dss_config_target_total_rate_mcps
#define VL53L1_NO_OF_SPAD_ENABLES
LL Driver Device specific defines. To be adapted by implementer for the targeted device.
uint16_t tp_lite_short_sigma_thresh_mm
uint32_t mm_config_timeout_us
uint8_t tp_phasecal_target
uint32_t tp_range_timeout_lite_us
uint8_t vl53l1_tuningparm_offset_cal_pre_samples
VL53L1_DevicePresetModes preset_mode
uint8_t vl53l1_tuningparm_initial_phase_ref_lite_med_range
uint8_t vl53l1_tuningparm_refspadchar_vcsel_period
uint8_t vl53l1_tuningparm_refspadchar_device_test_mode
uint8_t vl53l1_tuningparm_lite_rit_mult
uint32_t algo__crosstalk_compensation_plane_offset_kcps
uint8_t VL53L1_OffsetCorrectionMode
uint8_t intr_new_measure_ready
int16_t nvm_default__crosstalk_compensation_y_plane_gradient_kcps
uint32_t peak_rate_per_spad_kcps
uint8_t vl53l1_tuningparm_initial_phase_rtn_lite_med_range
VL53L1_system_control_t sys_ctrl
uint8_t mm1_num_of_samples
uint16_t crosstalk_range_ignore_threshold_rate_mcps
Contains the driver state information.
Defines the parameters of the LL driver Get Version Functions.
Xtalk Extraction and Paramter Config.
uint32_t vl53l1_tuningparm_timed_phasecal_config_timeout_us
uint8_t vl53l1_tuningparm_lite_sigma_ref_mm
int int32_t
Typedef defining 32 bit int type. The developer should modify this to suit the platform being deploye...
uint16_t tp_dss_target_lite_mcps
uint8_t crosstalk_range_ignore_threshold_mult
uint16_t dss_config__manual_effective_spads_select
#define VL53L1_NVM_PEAK_RATE_MAP_SAMPLES
VL53L1_ssc_config_t ssc_cfg
uint8_t vl53l1_tuningparm_lite_sigma_est_pulse_width
uint32_t tp_phasecal_timeout_lite_us
uint8_t vl53l1_tuningparm_offset_cal_mm1_samples
uint8_t vl53l1_tuningparm_lite_seed_config
uint16_t avg_signal_count_rate_mcps
uint8_t vl53l1_tuningparm_initial_phase_ref_lite_long_range
VL53L1_optical_centre_t optical_centre
uint32_t phasecal_config_timeout_us
VL53L1_static_config_t stat_cfg
VL53L1_dynamic_config_t dyn_cfg
Structure for storing the calibration peak rate map Used by DMAX to understand the spatial roll off i...
uint16_t tp_lite_long_sigma_thresh_mm
uint32_t range_config_timeout_us
VL53L1_DeviceState cfg_device_state
#define VL53L1_RTN_SPAD_BUFFER_SIZE
uint8_t cfg_timing_status
uint8_t intr_combined_mode
VL53L1_debug_results_t dbg_results
uint16_t fast_osc_frequency
uint8_t saved_interrupt_config
uint32_t vl53l1_tuningparm_lowpowerauto_mm_config_timeout_us
uint8_t vl53l1_tuningparm_lite_first_order_select
VL53L1_DeviceMeasurementModes measurement_mode
int16_t vl53l1_tuningparm_lite_xtalk_margin_kcps
Structure to configure conditions when GPIO interrupt is trigerred.
uint32_t tp_mm_timeout_lite_us
uint8_t VL53L1_DeviceState
uint16_t vl53l1_tuningparm_timed_dss_config_target_total_rate_mcps
VL53L1_low_power_auto_data_t low_power_auto_data
uint16_t vl53l1_tuningparm_lite_long_sigma_thresh_mm
uint16_t tp_tuning_parm_version
uint16_t vl53l1_tuningparm_key_table_version
VL53L1_range_results_t range_results
uint16_t threshold_rate_high
VL53L1_nvm_copy_data_t nvm_copy_data
uint8_t VL53L1_GPIO_Interrupt_Mode
uint16_t result__mm_inner_peak_signal_count_rtn_mcps
uint8_t first_run_phasecal_result
uint8_t dss_config__roi_mode_control
uint16_t tp_lite_long_min_count_rate_rtn_mcps
uint8_t global_crosstalk_compensation_enable
uint16_t threshold_rate_low
uint8_t is_low_power_auto_mode
uint16_t standard_ranging_gain_factor
VL53L1_DeviceState cfg_device_state
uint16_t tp_lite_med_min_count_rate_rtn_mcps
uint8_t tp_init_phase_rtn_lite_short
VL53L1_offsetcal_config_t offsetcal_cfg
uint32_t dss__total_rate_per_spad_mcps
uint16_t dss_config__target_total_rate_mcps
#define VL53L1_MAX_OFFSET_RANGE_RESULTS
Structure for storing the set of range results required for the mm1 and mm2 offset calibration functi...
VL53L1_customer_nvm_managed_t customer
uint32_t phasecal_config_timeout_us
uint16_t result__mm_outer_peak_signal_count_rtn_mcps
SPAD Self Check (SSC) Config data structure.
uint8_t vl53l1_tuningparm_lite_sigma_est_amb_width_ns
uint32_t peak_duration_us
Tuning Parameters Debug data.
uint32_t mm_config_timeout_us
uint32_t vl53l1_tuningparm_offset_cal_range_timeout_us
uint32_t range_config_timeout_us
VL53L1_cal_peak_rate_map_t cal_peak_rate_map
uint16_t actual_effective_spads
uint8_t saved_vhv_timeout
VL53L1_tuning_parm_storage_t tuning_parms
uint8_t vl53l1_tuningparm_consistency_lite_phase_tolerance
uint8_t VL53L1_OffsetCalibrationMode
uint16_t vl53l1_tuningparm_refspadchar_target_count_rate_mcps
uint32_t vl53l1_tuningparm_lite_range_config_timeout_us
uint8_t vl53l1_tuningparm_initial_phase_rtn_lite_short_range
uint8_t vl53l1_tuningparm_initial_phase_ref_lite_short_range
VL53L1 LL Driver ST private results structure.
uint8_t VL53L1_DevicePresetModes
uint8_t VL53L1_DeviceSscArray
uint32_t vl53l1_tuningparm_lowpowerauto_range_config_timeout_us
int16_t algo__crosstalk_compensation_y_plane_gradient_kcps
uint8_t tp_lite_first_order_select
VL53L1_GPIO_Interrupt_Mode intr_mode_distance
VL53L1_customer_nvm_managed_t customer
uint16_t tp_tuning_parm_lld_version
uint8_t VL53L1_DeviceMeasurementModes
uint16_t result__mm_inner_actual_effective_spads
Additional Offset Calibration Data.
uint16_t vl53l1_tuningparm_lld_version
uint8_t vl53l1_tuningparm_initial_phase_rtn_lite_long_range
uint16_t total_rate_per_spad_mcps
VL53L1 Register Structure definitions.
Structure for storing the set of range results.
Per Part calibration data.
uint16_t vl53l1_tuningparm_offset_cal_dss_rate_mcps
uint32_t tp_range_timeout_timed_us
uint16_t target_count_rate_mcps
Run Offset Cal Function (offsetcal) Config.
VL53L1_ll_version_t version
unsigned short uint16_t
Typedef defining 16 bit unsigned short type. The developer should modify this to suit the platform be...
VL53L1_cal_peak_rate_map_t cal_peak_rate_map
uint32_t range_config_timeout_us
uint8_t pre_num_of_samples
uint8_t tp_init_phase_rtn_lite_long
uint8_t vl53l1_tuningparm_spadmap_vcsel_start
uint32_t vl53l1_tuningparm_lite_phasecal_config_timeout_us
uint32_t phasecal_config_timeout_us
uint16_t vl53l1_tuningparm_lite_long_min_count_rate_rtn_mcps
int16_t nvm_default__crosstalk_compensation_x_plane_gradient_kcps
uint8_t tp_init_phase_ref_lite_short
uint8_t mm2_num_of_samples
unsigned char uint8_t
Typedef defining 8 bit unsigned char type. The developer should modify this to suit the platform bein...
Internal data structure for storing post processed ranges.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type. The developer should modify this to suit the platform bein...
uint16_t tp_lite_short_min_count_rate_rtn_mcps