VL53L0X API Specification: VL53L0X Interrupt Functions

VL53L0X API

VL53L0X Interrupt Functions

Functions used for interrupt managements. More...

Functions

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...
 

Detailed Description

Functions used for interrupt managements.

Function Documentation

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.

Note
This function Access to the device
Parameters
DevDevice Handle
PinID of the GPIO Pin
FunctionalitySelect Pin functionality. Refer to VL53L0X_GpioFunctionality
DeviceModeDevice Mode associated to the Gpio.
PolaritySet 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
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.

Note
This function Access to the device
Parameters
DevDevice Handle
PinID of the GPIO Pin
pDeviceModePointer to Device Mode associated to the Gpio.
pFunctionalityPointer to Pin functionality. Refer to VL53L0X_GpioFunctionality
pPolarityPointer to 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
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.

Function Description
Set low and high Interrupt thresholds for a given mode (ranging, ALS, ...) for a given device
Note
This function Access to the device
DeviceMode is ignored for the current device
Parameters
DevDevice Handle
DeviceModeDevice Mode for which change thresholds
ThresholdLowLow threshold (mm, lux ..., depending on the mode)
ThresholdHighHigh threshold (mm, lux ..., depending on the mode)
Returns
VL53L0X_ERROR_NONE Success
"Other error code" See VL53L0X_Error
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.

Function Description
Get high and low Interrupt thresholds for a given mode (ranging, ALS, ...) for a given device
Note
This function Access to the device
DeviceMode is ignored for the current device
Parameters
DevDevice Handle
DeviceModeDevice Mode from which read thresholds
pThresholdLowLow threshold (mm, lux ..., depending on the mode)
pThresholdHighHigh threshold (mm, lux ..., depending on the mode)
Returns
VL53L0X_ERROR_NONE Success
"Other error code" See VL53L0X_Error
VL53L0X_API VL53L0X_Error VL53L0X_GetStopCompletedStatus ( VL53L0X_DEV  Dev,
uint32_t pStopStatus 
)

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
DevDevice Handle
pStopStatusPointer to status variable to update
Returns
VL53L0X_ERROR_NONE Success
"Other error code" See VL53L0X_Error
VL53L0X_API VL53L0X_Error VL53L0X_ClearInterruptMask ( VL53L0X_DEV  Dev,
uint32_t  InterruptMask 
)

Clear given system interrupt condition.

Function Description
Clear given interrupt(s).
Note
This function Access to the device
Parameters
DevDevice Handle
InterruptMaskMask of interrupts to clear
Returns
VL53L0X_ERROR_NONE Success
VL53L0X_ERROR_INTERRUPT_NOT_CLEARED Cannot clear interrupts
"Other error code" See VL53L0X_Error
VL53L0X_API VL53L0X_Error VL53L0X_GetInterruptMaskStatus ( VL53L0X_DEV  Dev,
uint32_t pInterruptMaskStatus 
)

Return device interrupt status.

Function Description
Returns currently raised interrupts by the device. User shall be able to activate/deactivate interrupts through VL53L0X_SetGpioConfig()
Note
This function Access to the device
Parameters
DevDevice Handle
pInterruptMaskStatusPointer to status variable to update
Returns
VL53L0X_ERROR_NONE Success
"Other error code" See VL53L0X_Error
VL53L0X_API VL53L0X_Error VL53L0X_EnableInterruptMask ( VL53L0X_DEV  Dev,
uint32_t  InterruptMask 
)

Configure ranging interrupt reported to system.

Note
This function is not Implemented
Parameters
DevDevice Handle
InterruptMaskMask of interrupt to Enable/disable (0:interrupt disabled or 1: interrupt enabled)
Returns
VL53L0X_ERROR_NOT_IMPLEMENTED Not implemented