Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Calc_sigma_estimate
Functions | |
| VL53L0X_Error | VL53L0X_get_ranging_measurement_data (VL53L0X_RangingMeasurementData_t *p_ranging_measurement_data) |
| Retrieve the measurements from device for a given setup. | |
| VL53L0X_Error | VL53L0X_perform_single_ranging_measurement (VL53L0X_RangingMeasurementData_t *p_ranging_measurement_data) |
| Performs a single ranging measurement and retrieve the ranging measurement data. | |
| VL53L0X_Error | VL53L0X_set_reference_spads (uint32_t refSpadCount, uint8_t is_aperture_spads) |
| Applies Reference SPAD configuration. | |
| VL53L0X_Error | VL53L0X_perform_ref_calibration (uint8_t *p_vhv_settings, uint8_t *p_phase_cal) |
| Perform Reference Calibration. | |
| VL53L0X_Error | VL53L0X_perform_ref_spad_management (uint32_t *ref_spad_count, uint8_t *is_aperture_spads) |
| Performs Reference Spad Management. | |
| VL53L0X_Error | VL53L0X_set_device_address (uint8_t device_address) |
| Set new device address. | |
| VL53L0X_Error | VL53L0X_set_gpio_config (uint8_t pin, VL53L0X_DeviceModes device_mode, VL53L0X_GpioFunctionality functionality, VL53L0X_InterruptPolarity polarity) |
| Set the configuration of GPIO pin for a given device. | |
| VL53L0X_Error | VL53L0X_get_fraction_enable (uint8_t *p_enabled) |
| Gets the fraction enable parameter indicating the resolution of range measurements. | |
| uint16_t | VL53L0X_encode_timeout (uint32_t timeout_macro_clks) |
| VL53L0X_Error | VL53L0X_set_measurement_timing_budget_us (uint32_t measurement_timing_budget_us) |
| Set Ranging Timing Budget in us. | |
| VL53L0X_Error | VL53L0X_set_sequence_step_enable (VL53L0X_SequenceStepId sequence_step_id, uint8_t sequence_step_enabled) |
| Sets the (on/off) state of a requested sequence step. | |
| VL53L0X_Error | VL53L0X_set_limit_check_enable (uint16_t limit_check_id, uint8_t limit_check_enable) |
| Enable/Disable a specific limit check. | |
| VL53L0X_Error | VL53L0X_static_init (void) |
| Do basic device init (and eventually patch loading) This function will change the VL53L0X_State from VL53L0X_STATE_WAIT_STATICINIT to VL53L0X_STATE_IDLE. | |
| VL53L0X_Error | VL53L0X_stop_measurement (void) |
| Stop device measurement. | |
| VL53L0X_Error | VL53L0X_get_stop_completed_status (uint32_t *p_stop_status) |
| Return device stop completion status. | |
Detailed Description
Estimates the range sigma
Function Documentation
| uint16_t VL53L0X_encode_timeout | ( | uint32_t | timeout_macro_clks ) | [inherited] |
Encode timeout in macro periods in (LSByte * 2^MSByte) + 1 format
Definition at line 3831 of file VL53L0X.cpp.
| VL53L0X_Error VL53L0X_get_fraction_enable | ( | uint8_t * | p_enabled ) | [inherited] |
Gets the fraction enable parameter indicating the resolution of range measurements.
- Function Description
- Gets the fraction enable state, which translates to the resolution of range measurements as follows :Enabled:=0.25mm resolution, Not Enabled:=1mm resolution.
- Note:
- This function Accesses the device
- Parameters:
-
p_enabled Output Parameter reporting the fraction enable state.
- Returns:
- VL53L0X_ERROR_NONE Success
- "Other error code" See VL53L0X_Error
Definition at line 3824 of file VL53L0X.cpp.
| VL53L0X_Error VL53L0X_get_ranging_measurement_data | ( | VL53L0X_RangingMeasurementData_t * | p_ranging_measurement_data ) | [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. PAL will fill a NumberOfROIZones times the corresponding data structure used in the measurement function.
- Note:
- This function Access to the device
- Parameters:
-
p_ranging_measurement_data Pointer to the data structure to fill up.
- Returns:
- VL53L0X_ERROR_NONE Success
- "Other error code" See VL53L0X_Error
Definition at line 3228 of file VL53L0X.cpp.
| VL53L0X_Error VL53L0X_get_stop_completed_status | ( | uint32_t * | p_stop_status ) | [inherited] |
Return device stop completion status.
- Function Description
- Returns stop completiob status. User shall call this function after a stop command
- Note:
- This function Access to the device
- Parameters:
-
p_stop_status Pointer to status variable to update
- Returns:
- VL53L0X_ERROR_NONE Success
- "Other error code" See VL53L0X_Error
Definition at line 4407 of file VL53L0X.cpp.
| VL53L0X_Error VL53L0X_perform_ref_calibration | ( | uint8_t * | p_vhv_settings, |
| uint8_t * | p_phase_cal | ||
| ) | [inherited] |
Perform Reference Calibration.
Perform a reference calibration of the Device. This function should be run from time to time before doing a ranging measurement. This function will launch a special ranging measurement, so if interrupt are enable an interrupt will be done. This function will clear the interrupt generated automatically.
- Warning:
- This function is a blocking function
- Note:
- This function Access to the device
- Parameters:
-
p_vhv_settings Pointer to vhv settings parameter. p_phase_cal Pointer to PhaseCal parameter.
- Returns:
- VL53L0X_ERROR_NONE Success
- "Other error code" See VL53L0X_Error
Definition at line 3719 of file VL53L0X.cpp.
| VL53L0X_Error VL53L0X_perform_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_count Reports ref Spad Count is_aperture_spads Reports if spads are of type aperture or non-aperture. 1:=aperture, 0:=Non-Aperture
- Returns:
- VL53L0X_ERROR_NONE Success
- VL53L0X_ERROR_REF_SPAD_INIT Error in the Ref Spad procedure.
- "Other error code" See VL53L0X_Error
Definition at line 3728 of file VL53L0X.cpp.
| VL53L0X_Error VL53L0X_perform_single_ranging_measurement | ( | VL53L0X_RangingMeasurementData_t * | p_ranging_measurement_data ) | [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
- Parameters:
-
p_ranging_measurement_data Pointer to the data structure to fill up.
- Returns:
- VL53L0X_ERROR_NONE Success
- "Other error code" See VL53L0X_Error
Definition at line 3344 of file VL53L0X.cpp.
| VL53L0X_Error VL53L0X_set_device_address | ( | uint8_t | device_address ) | [inherited] |
Set new device address.
After completion the device will answer to the new address programmed. This function should be called when several devices are used in parallel before start programming the sensor. When a single device us used, there is no need to call this function.
- Note:
- This function Access to the device
- Parameters:
-
device_address The new Device address
- Returns:
- VL53L0X_ERROR_NONE Success
- "Other error code" See VL53L0X_Error
Definition at line 3738 of file VL53L0X.cpp.
| VL53L0X_Error VL53L0X_set_gpio_config | ( | uint8_t | pin, |
| VL53L0X_DeviceModes | device_mode, | ||
| VL53L0X_GpioFunctionality | functionality, | ||
| VL53L0X_InterruptPolarity | polarity | ||
| ) | [inherited] |
Set the configuration of GPIO pin for a given device.
- Note:
- This function Access to the device
- Parameters:
-
pin ID of the GPIO Pin functionality Select Pin functionality. Refer to VL53L0X_GpioFunctionality device_mode Device Mode associated to the Gpio. polarity Set interrupt polarity. Active high or active low see VL53L0X_InterruptPolarity
- Returns:
- VL53L0X_ERROR_NONE Success
- VL53L0X_ERROR_GPIO_NOT_EXISTING Only Pin=0 is accepted.
- VL53L0X_ERROR_GPIO_FUNCTIONALITY_NOT_SUPPORTED This error occurs when Functionality programmed is not in the supported list: Supported value are: VL53L0X_GPIOFUNCTIONALITY_OFF, VL53L0X_GPIOFUNCTIONALITY_THRESHOLD_CROSSED_LOW, VL53L0X_GPIOFUNCTIONALITY_THRESHOLD_CROSSED_HIGH, VL53L0X_GPIOFUNCTIONALITY_THRESHOLD_CROSSED_OUT, VL53L0X_GPIOFUNCTIONALITY_NEW_MEASURE_READY
- "Other error code" See VL53L0X_Error
Definition at line 3746 of file VL53L0X.cpp.
| VL53L0X_Error VL53L0X_set_limit_check_enable | ( | uint16_t | limit_check_id, |
| uint8_t | limit_check_enable | ||
| ) | [inherited] |
Enable/Disable a specific limit check.
- Function Description
- This function Enable/Disable a specific limit check. The limit check is identified with the LimitCheckId.
- Note:
- This function doesn't Access to the device
- Parameters:
-
limit_check_id Limit Check ID (0<= LimitCheckId < VL53L0X_GetNumberOfLimitCheck() ). limit_check_enable if 1 the check limit corresponding to LimitCheckId is Enabled if 0 the check limit corresponding to LimitCheckId is disabled
- Returns:
- VL53L0X_ERROR_NONE Success
- VL53L0X_ERROR_INVALID_PARAMS This error is returned when LimitCheckId value is out of range.
- "Other error code" See VL53L0X_Error
Definition at line 4174 of file VL53L0X.cpp.
| VL53L0X_Error VL53L0X_set_measurement_timing_budget_us | ( | uint32_t | measurement_timing_budget_us ) | [inherited] |
Set Ranging Timing Budget in us.
- 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:
-
measurement_timing_budget_us Max measurement time in us. Valid values are: >= 17000us when wraparound enabled >= 12000us when wraparound disabled
- Returns:
- VL53L0X_ERROR_NONE Success
- VL53L0X_ERROR_INVALID_PARAMS This error is returned if MeasurementTimingBudget_us out of range
- "Other error code" See VL53L0X_Error
Definition at line 4092 of file VL53L0X.cpp.
| VL53L0X_Error VL53L0X_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:
-
refSpadCount Number of ref spads. is_aperture_spads Defines if spads are of type aperture or non-aperture. 1:=aperture, 0:=Non-Aperture
- Returns:
- VL53L0X_ERROR_NONE Success
- VL53L0X_ERROR_REF_SPAD_INIT Error in the in the reference spad configuration.
- "Other error code" See VL53L0X_Error
Definition at line 3655 of file VL53L0X.cpp.
| VL53L0X_Error VL53L0X_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_id Sequence step identifier. sequence_step_enabled Demanded state {0=Off,1=On} is enabled.
- Returns:
- VL53L0X_ERROR_NONE Success
- VL53L0X_ERROR_INVALID_PARAMS Error SequenceStepId parameter not supported.
- "Other error code" See VL53L0X_Error
Definition at line 4098 of file VL53L0X.cpp.
| VL53L0X_Error VL53L0X_static_init | ( | void | ) | [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:
- VL53L0X_ERROR_NONE Success
- "Other error code" See VL53L0X_Error
Definition at line 4244 of file VL53L0X.cpp.
| VL53L0X_Error VL53L0X_stop_measurement | ( | void | ) | [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:
- VL53L0X_ERROR_NONE Success
- "Other error code" See VL53L0X_Error
Definition at line 4384 of file VL53L0X.cpp.
Generated on Thu Jul 14 2022 09:13:18 by
1.7.2