Condensed Version of Public VL53L0X

Dependents:   ToF-Only-Tryout

Embed: (wiki syntax)

« Back to documentation index

Calc_sigma_estimate

Calc_sigma_estimate

Functions

void Get_ranging_results (TRangeResults *p_ranging_results)
 Retrieve the measurements from device for a given setup.
void Perf_single_ranging_measurement (TRangeResults *p_ranging_results)
 Performs a single ranging measurement and retrieve the ranging measurement data.
void Perf_Ref_SPAD_management (uint32_t *ref_SPAD_count, uint8_t *is_aperture_SPADS)
 Performs Reference SPAD Management.
void Set_Reference_SPADS (uint32_t refSPADCount, uint8_t is_aperture_SPADS)
 Applies Reference SPAD configuration.
void Set_GPIO_config (VL53L0X_DeviceModes device_mode, TGPIO_Func functionality, VL53L0X_InterruptPolarity polarity)
 Set the configuration of GPIO pin for a given device.
void Set_Measure_Time_Budget_us (uint32_t Measure_Time_Budget_us)
 Set Ranging Timing Budget in microseconds.
void Set_sequence_step_enable (VL53L0X_SequenceStepId sequence_step_id, uint8_t sequence_step_enabled)
 Sets the (on/off) state of a requested sequence step.
void Set_limit_chk_en (uint16_t limit_check_id, uint8_t limit_chk_en)
 Enable/Disable a specific limit check.
void Static_init ()
 Do basic device init (and eventually patch loading) This function will change the VL53L0X_State from VL53L0X_STATE_WAIT_STATICINIT to VL53L0X_STATE_IDLE.
void Stop_Measurement ()
 Stop device measurement.
uint8_t Get_Stop_Completed ()
 Return device stop completion ErrState.
VL53L0X_Error Start_Measurement (TOperatingMode operating_mode, void(*fptr)(void))
 Start the measure indicated by operating mode.
VL53L0X_Error Stop_Measurement (TOperatingMode operating_mode)
 Stop the currently running measure indicate by operating_mode.
TRangeResults Handle_irq (TOperatingMode operating_mode)
 Interrupt handling func to be called by user after an INT is occourred.

Detailed Description

Estimates the range sigma


Function Documentation

void Get_ranging_results ( TRangeResults *  p_ranging_results ) [inherited]

Retrieve the measurements from device for a given setup.

Function Description
Get data from last successful Ranging measurement
Warning:
USER should take care about VL53L0X_GetNumberOfROIZones() before get data. Device will fill a NumberOfROIZones times the corresponding data structure used in the measurement function.
Note:
This function Access to the device
Parameters:
p_ranging_resultsPointer to the data structure to fill up.
Returns:
None; instead check class Field "ErrState"

Definition at line 1996 of file VL53L0X.cpp.

uint8_t Get_Stop_Completed (  ) [inherited]

Return device stop completion ErrState.

Function Description
Returns stop completiob ErrState. User shall call this function after a stop command
Note:
This function Access to the device
Returns:
p_stop_status Pointer to ErrState variable to update Also instead check class Field "ErrState"

Definition at line 2804 of file VL53L0X.cpp.

TRangeResults Handle_irq ( TOperatingMode  operating_mode ) [inherited]

Interrupt handling func to be called by user after an INT is occourred.

Parameters:
[in]operating_modeOpeating_mode indicating the in progress measure
Returns:
TRangeResults The Measurement Data structure given back

Definition at line 2969 of file VL53L0X.cpp.

void Perf_Ref_SPAD_management ( uint32_t *  ref_SPAD_count,
uint8_t *  is_aperture_SPADS 
) [inherited]

Performs Reference SPAD Management.

Function Description
The reference SPAD initialization procedure determines the minimum amount of reference SPADS to be enables to achieve a target reference signal rate and should be performed once during initialization.
Note:
This function Access to the device
This function change the device mode to VL53L0X_DEVICEMODE_SINGLE_RANGING
Parameters:
ref_SPAD_countReports ref SPAD Count
is_aperture_SPADSReports if SPADS are of type aperture or non-aperture. 1:=aperture, 0:=Non-Aperture
Returns:
None; instead check class Field "ErrState"
VL53L0X_ERROR_REF_SPAD_INIT Error in the Ref SPAD procedure.

Definition at line 2149 of file VL53L0X.cpp.

void Perf_single_ranging_measurement ( TRangeResults *  p_ranging_results ) [inherited]

Performs a single ranging measurement and retrieve the ranging measurement data.

Function Description
This function will change the device mode to VL53L0X_DEVICEMODE_SINGLE_RANGING with VL53L0X_SetDeviceMode(), It performs measurement with VL53L0X_PerformSingleMeasurement() It get data from last successful Ranging measurement with VL53L0X_GetRangingMeasurementData. Finally it clear the interrupt with VL53L0X_ClearInterruptMask().
Note:
This function Access to the device
This function change the device mode to VL53L0X_DEVICEMODE_SINGLE_RANGING
Parameters:
p_ranging_resultsPointer to the data structure to fill up.
Returns:
None; instead check class Field "ErrState"

Definition at line 2111 of file VL53L0X.cpp.

void Set_GPIO_config ( VL53L0X_DeviceModes  device_mode,
TGPIO_Func  functionality,
VL53L0X_InterruptPolarity  polarity 
) [inherited]

Set the configuration of GPIO pin for a given device.

Note:
This function Access to the device
Parameters:
pinID of the GPIO Pin
functionalitySelect Pin functionality. Refer to TGPIO_Func
device_modeDevice Mode associated to the Gpio.
polaritySet interrupt polarity. Active high or active low see VL53L0X_InterruptPolarity
Returns:
None; instead check class Field "ErrState"
VL53L0X_ERROR_GPIO_NOT_EXISTING Only Pin=0 is accepted.
VL53L0X_ERROR_GPIO_FUNC_NOT_SUPPORTED This error occurs when Functionality programmed is not in the supported list: Supported value are: GPIO_FUNC_OFF, GPIO_FUNC_THRESHOLD_CROSSED_LOW, GPIO_FUNC_THRESHOLD_CROSSED_HIGH, GPIO_FUNC_THRESHOLD_CROSSED_OUT, GPIO_FUNC_NEW_MEASURE_READY

Definition at line 2385 of file VL53L0X.cpp.

void Set_limit_chk_en ( uint16_t  limit_check_id,
uint8_t  limit_chk_en 
) [inherited]

Enable/Disable a specific limit check.

Function Description
This function Enable/Disable a specific limit check. The limit check is identified with the limit_check_id.
Note:
This function doesn't Access to the device
Parameters:
limit_check_idLimit Check ID (0<= limit_check_id < VL53L0X_GetNumberOfLimitCheck() ).
limit_chk_enif 1 the check limit corresponding to limit_check_id is Enabled if 0 the check limit corresponding to limit_check_id is disabled
Returns:
None; instead check class Field "ErrState"
VL53L0X_ERROR_INVALID_PARAMS This error is returned when limit_check_id value is out of range.

Definition at line 2660 of file VL53L0X.cpp.

void Set_Measure_Time_Budget_us ( uint32_t  Measure_Time_Budget_us ) [inherited]

Set Ranging Timing Budget in microseconds.

Function Description
Defines the maximum time allowed by the user to the device to run a full ranging sequence for the current mode (ranging, histogram, ASL ...)
Note:
This function Access to the device
Parameters:
Measure_Time_Budget_usMax measurement time in microseconds. Valid values are: >= 17000 microsecs when wraparound enabled >= 12000 microsecs when wraparound disabled
Returns:
None; instead check class Field "ErrState"
VL53L0X_ERROR_INVALID_PARAMS This error is returned if MeasurementTimingBudgetMicroSeconds out of range

Definition at line 2532 of file VL53L0X.cpp.

void Set_Reference_SPADS ( uint32_t  refSPADCount,
uint8_t  is_aperture_SPADS 
) [inherited]

Applies Reference SPAD configuration.

Function Description
This function applies a given number of reference SPADS, identified as either Aperture or Non-Aperture. The requested SPAD count and type are stored within the device specific parameters data for access by the host.
Note:
This function Access to the device
Parameters:
refSPADCountNumber of ref SPADS.
is_aperture_SPADSDefines if SPADS are of type aperture or non-aperture. 1:=aperture, 0:=Non-Aperture
Returns:
None; instead check class Field "ErrState"
VL53L0X_ERROR_REF_SPAD_INIT Error in the in the reference SPAD configuration.

Definition at line 2345 of file VL53L0X.cpp.

void Set_sequence_step_enable ( VL53L0X_SequenceStepId  sequence_step_id,
uint8_t  sequence_step_enabled 
) [inherited]

Sets the (on/off) state of a requested sequence step.

Function Description
This function enables/disables a requested sequence step.
Note:
This function Accesses the device
Parameters:
sequence_step_idSequence step identifier.
sequence_step_enabledDemanded state {0=Off,1=On} is enabled.
Returns:
None; instead check class Field "ErrState"
VL53L0X_ERROR_INVALID_PARAMS Error SequenceStepId parameter not supported.

Definition at line 2641 of file VL53L0X.cpp.

VL53L0X_Error Start_Measurement ( TOperatingMode  operating_mode,
void(*)(void)  fptr 
) [inherited]

Start the measure indicated by operating mode.

Parameters:
[in]operating_modespecifies requested measure
[in]fptrspecifies call back function must be !NULL in case of interrupt measure

Definition at line 2861 of file VL53L0X.cpp.

void Static_init (  ) [inherited]

Do basic device init (and eventually patch loading) This function will change the VL53L0X_State from VL53L0X_STATE_WAIT_STATICINIT to VL53L0X_STATE_IDLE.

In this stage all default setting will be applied.

Note:
This function Access to the device
Returns:
None; instead check class Field "ErrState"

Definition at line 2691 of file VL53L0X.cpp.

VL53L0X_Error Stop_Measurement ( TOperatingMode  operating_mode ) [inherited]

Stop the currently running measure indicate by operating_mode.

Parameters:
[in]operating_modespecifies requested measure to stop "0" on success

Definition at line 2958 of file VL53L0X.cpp.

void Stop_Measurement (  ) [inherited]

Stop device measurement.

Will set the device in standby mode at end of current measurement
Not necessary in single mode as device shall return automatically in standby mode at end of measurement. This function will change the VL53L0X_State from VL53L0X_STATE_RUNNING to VL53L0X_STATE_IDLE.

Note:
This function Access to the device
Returns:
None; instead check class Field "ErrState"

Definition at line 2790 of file VL53L0X.cpp.