Functions
VL53L1 Parameters Functions

Functions used to prepare and setup the device. More...

Collaboration diagram for VL53L1 Parameters Functions:

Functions

VL53L1_Error VL53L1_GetDistanceMode (VL53L1_DEV Dev, VL53L1_DistanceModes *pDistanceMode)
 Get the distance mode. More...
 
VL53L1_Error VL53L1_GetInterMeasurementPeriodMilliSeconds (VL53L1_DEV Dev, uint32_t *pInterMeasurementPeriodMilliSeconds)
 
VL53L1_Error VL53L1_GetMeasurementTimingBudgetMicroSeconds (VL53L1_DEV Dev, uint32_t *pMeasurementTimingBudgetMicroSeconds)
 Get Ranging Timing Budget in microseconds. More...
 
VL53L1_Error VL53L1_GetPresetMode (VL53L1_DEV Dev, VL53L1_PresetModes *pPresetMode)
 Get current Preset Mode. More...
 
VL53L1_Error VL53L1_SetDistanceMode (VL53L1_DEV Dev, VL53L1_DistanceModes DistanceMode)
 Set the distance mode. More...
 
VL53L1_Error VL53L1_SetInterMeasurementPeriodMilliSeconds (VL53L1_DEV Dev, uint32_t InterMeasurementPeriodMilliSeconds)
 
VL53L1_Error VL53L1_SetMeasurementTimingBudgetMicroSeconds (VL53L1_DEV Dev, uint32_t MeasurementTimingBudgetMicroSeconds)
 Set Ranging Timing Budget in microseconds. More...
 
VL53L1_Error VL53L1_SetPresetMode (VL53L1_DEV Dev, VL53L1_PresetModes PresetMode)
 Set a new Preset Mode. More...
 

Detailed Description

Functions used to prepare and setup the device.

Function Documentation

◆ VL53L1_GetDistanceMode()

VL53L1_Error VL53L1_GetDistanceMode ( VL53L1_DEV  Dev,
VL53L1_DistanceModes pDistanceMode 
)

Get the distance mode.

Function Description
Get the distance mode used for the next ranging.
Parameters
DevDevice Handle
*pDistanceModePointer to Distance mode
Returns
VL53L1_ERROR_NONE Success
"Other error code" See VL53L1_Error

Definition at line 1100 of file vl53l1_api.c.

◆ VL53L1_GetInterMeasurementPeriodMilliSeconds()

VL53L1_Error VL53L1_GetInterMeasurementPeriodMilliSeconds ( VL53L1_DEV  Dev,
uint32_t pInterMeasurementPeriodMilliSeconds 
)

Get continuous mode Inter-Measurement period in milliseconds

Function Description
Parameters
DevDevice Handle
pInterMeasurementPeriodMilliSecondsPointer to programmed Inter-Measurement Period in milliseconds.
Returns
VL53L1_ERROR_NONE

Definition at line 1334 of file vl53l1_api.c.

◆ VL53L1_GetMeasurementTimingBudgetMicroSeconds()

VL53L1_Error VL53L1_GetMeasurementTimingBudgetMicroSeconds ( VL53L1_DEV  Dev,
uint32_t pMeasurementTimingBudgetMicroSeconds 
)

Get Ranging Timing Budget in microseconds.

Function Description
Returns the programmed the maximum time allowed by the user to the device to run a full ranging sequence for the current mode (ranging, histogram, ASL ...)
Parameters
DevDevice Handle
pMeasurementTimingBudgetMicroSecondsMax measurement time in microseconds.
Returns
VL53L1_ERROR_NONE Success
"Other error code" See VL53L1_Error

Definition at line 1233 of file vl53l1_api.c.

◆ VL53L1_GetPresetMode()

VL53L1_Error VL53L1_GetPresetMode ( VL53L1_DEV  Dev,
VL53L1_PresetModes pPresetMode 
)

Get current Preset Mode.

Function Description
Get actual mode of the device(ranging, histogram ...)
Note
This function doesn't Access to the device
Parameters
DevDevice Handle
pPresetModePointer to current apply mode value
Returns
VL53L1_ERROR_NONE Success
VL53L1_ERROR_MODE_NOT_SUPPORTED This error occurs when DeviceMode is not in the supported list

Definition at line 1009 of file vl53l1_api.c.

◆ VL53L1_SetDistanceMode()

VL53L1_Error VL53L1_SetDistanceMode ( VL53L1_DEV  Dev,
VL53L1_DistanceModes  DistanceMode 
)

Set the distance mode.

Function Description
Set the distance mode to be used for the next ranging.
The modes Short, Medium and Long are used to optimize the ranging accuracy in a specific range of distance.
The user select one of these modes to select the distance range.
Note
This function doesn't Access to the device
Warning
This function should be called after VL53L1_SetPresetMode().
Parameters
DevDevice Handle
DistanceModeDistance mode to apply, valid values are:
  • VL53L1_DISTANCEMODE_SHORT
  • VL53L1_DISTANCEMODE_MEDIUM
  • VL53L1_DISTANCEMODE_LONG
Returns
VL53L1_ERROR_NONE Success
VL53L1_ERROR_MODE_NOT_SUPPORTED This error occurs when DistanceMode is not in the supported list
"Other error code" See VL53L1_Error

Definition at line 1022 of file vl53l1_api.c.

◆ VL53L1_SetInterMeasurementPeriodMilliSeconds()

VL53L1_Error VL53L1_SetInterMeasurementPeriodMilliSeconds ( VL53L1_DEV  Dev,
uint32_t  InterMeasurementPeriodMilliSeconds 
)

Program continuous mode Inter-Measurement period in milliseconds

Function Description
When trying to set too short time return INVALID_PARAMS minimal value
Parameters
DevDevice Handle
InterMeasurementPeriodMilliSecondsInter-Measurement Period in ms. this value should be greater than the duration set in VL53L1_SetMeasurementTimingBudgetMicroSeconds() to ensure smooth ranging operation.
Returns
VL53L1_ERROR_NONE Success
"Other error code" See VL53L1_Error

Definition at line 1315 of file vl53l1_api.c.

◆ VL53L1_SetMeasurementTimingBudgetMicroSeconds()

VL53L1_Error VL53L1_SetMeasurementTimingBudgetMicroSeconds ( VL53L1_DEV  Dev,
uint32_t  MeasurementTimingBudgetMicroSeconds 
)

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 ...)
Parameters
DevDevice Handle
MeasurementTimingBudgetMicroSecondsMax measurement time in microseconds.
Returns
VL53L1_ERROR_NONE Success
VL53L1_ERROR_INVALID_PARAMS Error timing parameter not supported. The maximum accepted value for the computed timing budget is 10 seconds the minimum value depends on the preset mode selected.
"Other error code" See VL53L1_Error

Definition at line 1116 of file vl53l1_api.c.

◆ VL53L1_SetPresetMode()

VL53L1_Error VL53L1_SetPresetMode ( VL53L1_DEV  Dev,
VL53L1_PresetModes  PresetMode 
)

Set a new Preset Mode.

Function Description
Set device to a new Operating Mode (High speed ranging, Multi objects ...)
Note
This function doesn't Access to the device
Warning
This function change the timing budget to 16 ms and the inter- measurement period to 1000 ms. Also the VL53L1_DISTANCEMODE_LONG is used.
Parameters
DevDevice Handle
PresetModeNew Preset mode to apply
Valid values are:
  • VL53L1_PRESETMODE_LITE_RANGING
  • VL53L1_PRESETMODE_AUTONOMOUS
  • VL53L1_PRESETMODE_LOWPOWER_AUTONOMOUS
Returns
VL53L1_ERROR_NONE Success
VL53L1_ERROR_MODE_NOT_SUPPORTED This error occurs when PresetMode is not in the supported list

Definition at line 968 of file vl53l1_api.c.



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