Functions
VL53L1 Measurement Functions

Functions used for the measurements. More...

Collaboration diagram for VL53L1 Measurement Functions:

Functions

VL53L1_Error VL53L1_ClearInterruptAndStartMeasurement (VL53L1_DEV Dev)
 Clear the Interrupt flag and start new measurement *. More...
 
VL53L1_Error VL53L1_GetMeasurementDataReady (VL53L1_DEV Dev, uint8_t *pMeasurementDataReady)
 Return Measurement Data Ready. More...
 
VL53L1_Error VL53L1_GetRangingMeasurementData (VL53L1_DEV Dev, VL53L1_RangingMeasurementData_t *pRangingMeasurementData)
 Retrieve the measurements from device for a given setup. More...
 
VL53L1_Error VL53L1_StartMeasurement (VL53L1_DEV Dev)
 Start device measurement. More...
 
VL53L1_Error VL53L1_StopMeasurement (VL53L1_DEV Dev)
 Stop device measurement. More...
 
VL53L1_Error VL53L1_WaitMeasurementDataReady (VL53L1_DEV Dev)
 Wait for measurement data ready. Blocking function. Note that the timeout is given by: VL53L1_RANGE_COMPLETION_POLLING_TIMEOUT_MS defined in def.h. More...
 

Detailed Description

Functions used for the measurements.

Function Documentation

◆ VL53L1_ClearInterruptAndStartMeasurement()

VL53L1_Error VL53L1_ClearInterruptAndStartMeasurement ( VL53L1_DEV  Dev)

Clear the Interrupt flag and start new measurement *.

Note
This function Access to the device
Parameters
DevDevice Handle
Returns
VL53L1_ERROR_NONE Success
"Other error code" See VL53L1_Error

Definition at line 1883 of file vl53l1_api.c.

◆ VL53L1_GetMeasurementDataReady()

VL53L1_Error VL53L1_GetMeasurementDataReady ( VL53L1_DEV  Dev,
uint8_t pMeasurementDataReady 
)

Return Measurement Data Ready.

Function Description
This function indicate that a measurement data is ready. This function is used for non-blocking capture.
Note
This function Access to the device
Parameters
DevDevice Handle
pMeasurementDataReadyPointer to Measurement Data Ready. 0 = data not ready, 1 = data ready
Returns
VL53L1_ERROR_NONE Success
"Other error code" See VL53L1_Error

Definition at line 1910 of file vl53l1_api.c.

◆ VL53L1_GetRangingMeasurementData()

VL53L1_Error VL53L1_GetRangingMeasurementData ( VL53L1_DEV  Dev,
VL53L1_RangingMeasurementData_t pRangingMeasurementData 
)

Retrieve the measurements from device for a given setup.

Function Description
Get data from last successful Ranging measurement
Warning
USER must call VL53L1_ClearInterruptAndStartMeasurement() prior to call again this function
Note
This function Access to the device
The first valid value returned by this function will have a range status equal to VL53L1_RANGESTATUS_RANGE_VALID_NO_WRAP_CHECK which means that the data is valid but no wrap around check have been done. User should take care about that.
Parameters
DevDevice Handle
pRangingMeasurementDataPointer to the data structure to fill up.
Returns
VL53L1_ERROR_NONE Success
VL53L1_ERROR_MODE_NOT_SUPPORTED in case of MULTIZONES_SCANNING
"Other error code" See VL53L1_Error

Definition at line 2159 of file vl53l1_api.c.

◆ VL53L1_StartMeasurement()

VL53L1_Error VL53L1_StartMeasurement ( VL53L1_DEV  Dev)

Start device measurement.

Started measurement will depend on preset parameters set through VL53L1_SetPreseMode() This function will change the VL53L1_State from VL53L1_STATE_IDLE to VL53L1_STATE_RUNNING.

Note
This function Access to the device
Parameters
DevDevice Handle
Returns
VL53L1_ERROR_NONE Success
VL53L1_ERROR_MODE_NOT_SUPPORTED This error occurs when PresetMode programmed with VL53L1_SetPresetMode
VL53L1_ERROR_TIME_OUT Time out on start measurement
VL53L1_ERROR_INVALID_PARAMS This error might occur in timed mode when inter measurement period is smaller or too close to the timing budget. In such case measurements are not started and user must correct the timings passed to VL53L1_SetMeasurementTimingBudgetMicroSeconds() and VL53L1_SetInterMeasurementPeriodMilliSeconds() functions.
"Other error code" See VL53L1_Error

Definition at line 1732 of file vl53l1_api.c.

◆ VL53L1_StopMeasurement()

VL53L1_Error VL53L1_StopMeasurement ( VL53L1_DEV  Dev)

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 VL53L1_State from VL53L1_STATE_RUNNING to VL53L1_STATE_IDLE.

Note
This function Access to the device
Parameters
DevDevice Handle
Returns
VL53L1_ERROR_NONE Success
"Other error code" See VL53L1_Error

Definition at line 1794 of file vl53l1_api.c.

◆ VL53L1_WaitMeasurementDataReady()

VL53L1_Error VL53L1_WaitMeasurementDataReady ( VL53L1_DEV  Dev)

Wait for measurement data ready. Blocking function. Note that the timeout is given by: VL53L1_RANGE_COMPLETION_POLLING_TIMEOUT_MS defined in def.h.

Note
This function Access to the device
Parameters
DevDevice Handle
Returns
VL53L1_ERROR_NONE Success
VL53L1_ERROR_TIME_OUT In case of timeout

Definition at line 1923 of file vl53l1_api.c.



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