VL53L0X API Specification: vl53l0x_api.h File Reference

VL53L0X API

vl53l0x_api.h File Reference
#include "vl53l0x_api_strings.h" #include "vl53l0x_def.h"
#include "vl53l0x_platform.h"

Go to the source code of this file.

Macros

#define VL53L0X_API
 

Functions

VL53L0X_API VL53L0X_Error VL53L0X_GetVersion (VL53L0X_Version_t *pVersion)
 Return the VL53L0X PAL Implementation Version. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetPalSpecVersion (VL53L0X_Version_t *pPalSpecVersion)
 Return the PAL Specification Version used for the current implementation. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetProductRevision (VL53L0X_DEV Dev, uint8_t *pProductRevisionMajor, uint8_t *pProductRevisionMinor)
 Reads the Product Revision for a for given Device This function can be used to distinguish cut1.0 from cut1.1. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetDeviceInfo (VL53L0X_DEV Dev, VL53L0X_DeviceInfo_t *pVL53L0X_DeviceInfo)
 Reads the Device information for given Device. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetDeviceErrorStatus (VL53L0X_DEV Dev, VL53L0X_DeviceError *pDeviceErrorStatus)
 Read current status of the error register for the selected device. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetRangeStatusString (uint8_t RangeStatus, char *pRangeStatusString)
 Human readable Range Status string for a given RangeStatus. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetDeviceErrorString (VL53L0X_DeviceError ErrorCode, char *pDeviceErrorString)
 Human readable error string for a given Error Code. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetPalErrorString (VL53L0X_Error PalErrorCode, char *pPalErrorString)
 Human readable error string for current PAL error status. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetPalStateString (VL53L0X_State PalStateCode, char *pPalStateString)
 Human readable PAL State string. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetPalState (VL53L0X_DEV Dev, VL53L0X_State *pPalState)
 Reads the internal state of the PAL for a given Device. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_SetPowerMode (VL53L0X_DEV Dev, VL53L0X_PowerModes PowerMode)
 Set the power mode for a given Device The power mode can be Standby or Idle. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetPowerMode (VL53L0X_DEV Dev, VL53L0X_PowerModes *pPowerMode)
 Get the power mode for a given Device. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_SetOffsetCalibrationDataMicroMeter (VL53L0X_DEV Dev, int32_t OffsetCalibrationDataMicroMeter)
 Set or over-hide part to part calibration offset. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetOffsetCalibrationDataMicroMeter (VL53L0X_DEV Dev, int32_t *pOffsetCalibrationDataMicroMeter)
 Get part to part calibration offset. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_SetLinearityCorrectiveGain (VL53L0X_DEV Dev, int16_t LinearityCorrectiveGain)
 Set the linearity corrective gain. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetLinearityCorrectiveGain (VL53L0X_DEV Dev, uint16_t *pLinearityCorrectiveGain)
 Get the linearity corrective gain. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_SetGroupParamHold (VL53L0X_DEV Dev, uint8_t GroupParamHold)
 Set Group parameter Hold state. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetUpperLimitMilliMeter (VL53L0X_DEV Dev, uint16_t *pUpperLimitMilliMeter)
 Get the maximal distance for actual setup. More...
 
VL53L0X_Error VL53L0X_GetTotalSignalRate (VL53L0X_DEV Dev, FixPoint1616_t *pTotalSignalRate)
 Get the Total Signal Rate. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_SetDeviceAddress (VL53L0X_DEV Dev, uint8_t DeviceAddress)
 Set new device address. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_DataInit (VL53L0X_DEV Dev)
 One time device initialization. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_SetTuningSettingBuffer (VL53L0X_DEV Dev, uint8_t *pTuningSettingBuffer, uint8_t UseInternalTuningSettings)
 Set the tuning settings pointer. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetTuningSettingBuffer (VL53L0X_DEV Dev, uint8_t **ppTuningSettingBuffer, uint8_t *pUseInternalTuningSettings)
 Get the tuning settings pointer and the internal external switch value. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_StaticInit (VL53L0X_DEV Dev)
 Do basic device init (and eventually patch loading) This function will change the VL53L0X_State from VL53L0X_STATE_WAIT_STATICINIT to VL53L0X_STATE_IDLE. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_WaitDeviceBooted (VL53L0X_DEV Dev)
 Wait for device booted after chip enable (hardware standby) This function can be run only when VL53L0X_State is VL53L0X_STATE_POWERDOWN. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_ResetDevice (VL53L0X_DEV Dev)
 Do an hard reset or soft reset (depending on implementation) of the device call of this function, device must be in same state as right after a power-up sequence.This function will change the VL53L0X_State to VL53L0X_STATE_POWERDOWN. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_SetDeviceParameters (VL53L0X_DEV Dev, const VL53L0X_DeviceParameters_t *pDeviceParameters)
 Prepare device for operation. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetDeviceParameters (VL53L0X_DEV Dev, VL53L0X_DeviceParameters_t *pDeviceParameters)
 Retrieve current device parameters. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_SetDeviceMode (VL53L0X_DEV Dev, VL53L0X_DeviceModes DeviceMode)
 Set a new device mode. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetDeviceMode (VL53L0X_DEV Dev, VL53L0X_DeviceModes *pDeviceMode)
 Get current new device mode. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_SetRangeFractionEnable (VL53L0X_DEV Dev, uint8_t Enable)
 Sets the resolution of range measurements. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetFractionEnable (VL53L0X_DEV Dev, uint8_t *pEnable)
 Gets the fraction enable parameter indicating the resolution of range measurements. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_SetHistogramMode (VL53L0X_DEV Dev, VL53L0X_HistogramModes HistogramMode)
 Set a new Histogram mode. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetHistogramMode (VL53L0X_DEV Dev, VL53L0X_HistogramModes *pHistogramMode)
 Get current new device mode. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_SetMeasurementTimingBudgetMicroSeconds (VL53L0X_DEV Dev, uint32_t MeasurementTimingBudgetMicroSeconds)
 Set Ranging Timing Budget in microseconds. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetMeasurementTimingBudgetMicroSeconds (VL53L0X_DEV Dev, uint32_t *pMeasurementTimingBudgetMicroSeconds)
 Get Ranging Timing Budget in microseconds. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetVcselPulsePeriod (VL53L0X_DEV Dev, VL53L0X_VcselPeriod VcselPeriodType, uint8_t *pVCSELPulsePeriod)
 Gets the VCSEL pulse period. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_SetVcselPulsePeriod (VL53L0X_DEV Dev, VL53L0X_VcselPeriod VcselPeriodType, uint8_t VCSELPulsePeriod)
 Sets the VCSEL pulse period. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_SetSequenceStepEnable (VL53L0X_DEV Dev, VL53L0X_SequenceStepId SequenceStepId, uint8_t SequenceStepEnabled)
 Sets the (on/off) state of a requested sequence step. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetSequenceStepEnable (VL53L0X_DEV Dev, VL53L0X_SequenceStepId SequenceStepId, uint8_t *pSequenceStepEnabled)
 Gets the (on/off) state of a requested sequence step. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetSequenceStepEnables (VL53L0X_DEV Dev, VL53L0X_SchedulerSequenceSteps_t *pSchedulerSequenceSteps)
 Gets the (on/off) state of all sequence steps. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_SetSequenceStepTimeout (VL53L0X_DEV Dev, VL53L0X_SequenceStepId SequenceStepId, FixPoint1616_t TimeOutMilliSecs)
 Sets the timeout of a requested sequence step. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetSequenceStepTimeout (VL53L0X_DEV Dev, VL53L0X_SequenceStepId SequenceStepId, FixPoint1616_t *pTimeOutMilliSecs)
 Gets the timeout of a requested sequence step. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetNumberOfSequenceSteps (VL53L0X_DEV Dev, uint8_t *pNumberOfSequenceSteps)
 Gets number of sequence steps managed by the API. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetSequenceStepsInfo (VL53L0X_SequenceStepId SequenceStepId, char *pSequenceStepsString)
 Gets the name of a given sequence step. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_SetInterMeasurementPeriodMilliSeconds (VL53L0X_DEV Dev, uint32_t InterMeasurementPeriodMilliSeconds)
 Program continuous mode Inter-Measurement period in milliseconds. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetInterMeasurementPeriodMilliSeconds (VL53L0X_DEV Dev, uint32_t *pInterMeasurementPeriodMilliSeconds)
 Get continuous mode Inter-Measurement period in milliseconds. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_SetXTalkCompensationEnable (VL53L0X_DEV Dev, uint8_t XTalkCompensationEnable)
 Enable/Disable Cross talk compensation feature. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetXTalkCompensationEnable (VL53L0X_DEV Dev, uint8_t *pXTalkCompensationEnable)
 Get Cross talk compensation rate. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_SetXTalkCompensationRateMegaCps (VL53L0X_DEV Dev, FixPoint1616_t XTalkCompensationRateMegaCps)
 Set Cross talk compensation rate. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetXTalkCompensationRateMegaCps (VL53L0X_DEV Dev, FixPoint1616_t *pXTalkCompensationRateMegaCps)
 Get Cross talk compensation rate. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_SetRefCalibration (VL53L0X_DEV Dev, uint8_t VhvSettings, uint8_t PhaseCal)
 Set Reference Calibration Parameters. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetRefCalibration (VL53L0X_DEV Dev, uint8_t *pVhvSettings, uint8_t *pPhaseCal)
 Get Reference Calibration Parameters. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetNumberOfLimitCheck (uint16_t *pNumberOfLimitCheck)
 Get the number of the check limit managed by a given Device. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetLimitCheckInfo (VL53L0X_DEV Dev, uint16_t LimitCheckId, char *pLimitCheckString)
 Return a description string for a given limit check number. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetLimitCheckStatus (VL53L0X_DEV Dev, uint16_t LimitCheckId, uint8_t *pLimitCheckStatus)
 Return a the Status of the specified check limit. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_SetLimitCheckEnable (VL53L0X_DEV Dev, uint16_t LimitCheckId, uint8_t LimitCheckEnable)
 Enable/Disable a specific limit check. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetLimitCheckEnable (VL53L0X_DEV Dev, uint16_t LimitCheckId, uint8_t *pLimitCheckEnable)
 Get specific limit check enable state. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_SetLimitCheckValue (VL53L0X_DEV Dev, uint16_t LimitCheckId, FixPoint1616_t LimitCheckValue)
 Set a specific limit check value. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetLimitCheckValue (VL53L0X_DEV Dev, uint16_t LimitCheckId, FixPoint1616_t *pLimitCheckValue)
 Get a specific limit check value. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetLimitCheckCurrent (VL53L0X_DEV Dev, uint16_t LimitCheckId, FixPoint1616_t *pLimitCheckCurrent)
 Get the current value of the signal used for the limit check. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_SetWrapAroundCheckEnable (VL53L0X_DEV Dev, uint8_t WrapAroundCheckEnable)
 Enable (or disable) Wrap around Check. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetWrapAroundCheckEnable (VL53L0X_DEV Dev, uint8_t *pWrapAroundCheckEnable)
 Get setup of Wrap around Check. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_SetDmaxCalParameters (VL53L0X_DEV Dev, uint16_t RangeMilliMeter, FixPoint1616_t SignalRateRtnMegaCps)
 Set Dmax Calibration Parameters for a given device When one of the parameter is zero, this function will get parameter from NVM. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetDmaxCalParameters (VL53L0X_DEV Dev, uint16_t *pRangeMilliMeter, FixPoint1616_t *pSignalRateRtnMegaCps)
 Get Dmax Calibration Parameters for a given device. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_PerformSingleMeasurement (VL53L0X_DEV Dev)
 Single shot measurement. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_PerformRefCalibration (VL53L0X_DEV Dev, uint8_t *pVhvSettings, uint8_t *pPhaseCal)
 Perform Reference Calibration. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_PerformXTalkMeasurement (VL53L0X_DEV Dev, uint32_t TimeoutMs, FixPoint1616_t *pXtalkPerSpad, uint8_t *pAmbientTooHigh)
 Perform XTalk Measurement. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_PerformXTalkCalibration (VL53L0X_DEV Dev, FixPoint1616_t XTalkCalDistance, FixPoint1616_t *pXTalkCompensationRateMegaCps)
 Perform XTalk Calibration. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_PerformOffsetCalibration (VL53L0X_DEV Dev, FixPoint1616_t CalDistanceMilliMeter, int32_t *pOffsetMicroMeter)
 Perform Offset Calibration. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_StartMeasurement (VL53L0X_DEV Dev)
 Start device measurement. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_StopMeasurement (VL53L0X_DEV Dev)
 Stop device measurement. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetMeasurementDataReady (VL53L0X_DEV Dev, uint8_t *pMeasurementDataReady)
 Return Measurement Data Ready. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_WaitDeviceReadyForNewMeasurement (VL53L0X_DEV Dev, uint32_t MaxLoop)
 Wait for device ready for a new measurement command. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetMeasurementRefSignal (VL53L0X_DEV Dev, FixPoint1616_t *pMeasurementRefSignal)
 Retrieve the Reference Signal after a measurements. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetRangingMeasurementData (VL53L0X_DEV Dev, VL53L0X_RangingMeasurementData_t *pRangingMeasurementData)
 Retrieve the measurements from device for a given setup. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetHistogramMeasurementData (VL53L0X_DEV Dev, VL53L0X_HistogramMeasurementData_t *pHistogramMeasurementData)
 Retrieve the measurements from device for a given setup. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_PerformSingleRangingMeasurement (VL53L0X_DEV Dev, VL53L0X_RangingMeasurementData_t *pRangingMeasurementData)
 Performs a single ranging measurement and retrieve the ranging measurement data. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_PerformSingleHistogramMeasurement (VL53L0X_DEV Dev, VL53L0X_HistogramMeasurementData_t *pHistogramMeasurementData)
 Performs a single histogram measurement and retrieve the histogram measurement data Is equivalent to VL53L0X_PerformSingleMeasurement + VL53L0X_GetHistogramMeasurementData. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_SetNumberOfROIZones (VL53L0X_DEV Dev, uint8_t NumberOfROIZones)
 Set the number of ROI Zones to be used for a specific Device. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetNumberOfROIZones (VL53L0X_DEV Dev, uint8_t *pNumberOfROIZones)
 Get the number of ROI Zones managed by the Device. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetMaxNumberOfROIZones (VL53L0X_DEV Dev, uint8_t *pMaxNumberOfROIZones)
 Get the Maximum number of ROI Zones managed by the Device. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_SetGpioConfig (VL53L0X_DEV Dev, uint8_t Pin, VL53L0X_DeviceModes DeviceMode, VL53L0X_GpioFunctionality Functionality, VL53L0X_InterruptPolarity Polarity)
 Set the configuration of GPIO pin for a given device. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetGpioConfig (VL53L0X_DEV Dev, uint8_t Pin, VL53L0X_DeviceModes *pDeviceMode, VL53L0X_GpioFunctionality *pFunctionality, VL53L0X_InterruptPolarity *pPolarity)
 Get current configuration for GPIO pin for a given device. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_SetInterruptThresholds (VL53L0X_DEV Dev, VL53L0X_DeviceModes DeviceMode, FixPoint1616_t ThresholdLow, FixPoint1616_t ThresholdHigh)
 Set low and high Interrupt thresholds for a given mode (ranging, ALS, ...) for a given device. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetInterruptThresholds (VL53L0X_DEV Dev, VL53L0X_DeviceModes DeviceMode, FixPoint1616_t *pThresholdLow, FixPoint1616_t *pThresholdHigh)
 Get high and low Interrupt thresholds for a given mode (ranging, ALS, ...) for a given device. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetStopCompletedStatus (VL53L0X_DEV Dev, uint32_t *pStopStatus)
 Return device stop completion status. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_ClearInterruptMask (VL53L0X_DEV Dev, uint32_t InterruptMask)
 Clear given system interrupt condition. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetInterruptMaskStatus (VL53L0X_DEV Dev, uint32_t *pInterruptMaskStatus)
 Return device interrupt status. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_EnableInterruptMask (VL53L0X_DEV Dev, uint32_t InterruptMask)
 Configure ranging interrupt reported to system. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_SetSpadAmbientDamperThreshold (VL53L0X_DEV Dev, uint16_t SpadAmbientDamperThreshold)
 Set the SPAD Ambient Damper Threshold value. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetSpadAmbientDamperThreshold (VL53L0X_DEV Dev, uint16_t *pSpadAmbientDamperThreshold)
 Get the current SPAD Ambient Damper Threshold value. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_SetSpadAmbientDamperFactor (VL53L0X_DEV Dev, uint16_t SpadAmbientDamperFactor)
 Set the SPAD Ambient Damper Factor value. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetSpadAmbientDamperFactor (VL53L0X_DEV Dev, uint16_t *pSpadAmbientDamperFactor)
 Get the current SPAD Ambient Damper Factor value. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_PerformRefSpadManagement (VL53L0X_DEV Dev, uint32_t *refSpadCount, uint8_t *isApertureSpads)
 Performs Reference Spad Management. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_SetReferenceSpads (VL53L0X_DEV Dev, uint32_t refSpadCount, uint8_t isApertureSpads)
 Applies Reference SPAD configuration. More...
 
VL53L0X_API VL53L0X_Error VL53L0X_GetReferenceSpads (VL53L0X_DEV Dev, uint32_t *refSpadCount, uint8_t *isApertureSpads)
 Retrieves SPAD configuration. More...
 

Macro Definition Documentation

#define VL53L0X_API

Definition at line 48 of file vl53l0x_api.h.