mbed compatible API for the VL53L0X Time-of-Flight sensor
Dependents: VL53L0X_SingleRanging_Example robot_sm VL53L0X_SingleRanging_HighAccuracy_HANSL ENGR6002_P001unk
VL53L0X Interrupt Functions
[VL53L0X cut1.1 Function Definition]
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. | |
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. | |
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. | |
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. | |
VL53L0X_API VL53L0X_Error | VL53L0X_GetStopCompletedStatus (VL53L0X_DEV Dev, uint32_t *pStopStatus) |
Return device stop completion status. | |
VL53L0X_API VL53L0X_Error | VL53L0X_ClearInterruptMask (VL53L0X_DEV Dev, uint32_t InterruptMask) |
Clear given system interrupt condition. | |
VL53L0X_API VL53L0X_Error | VL53L0X_GetInterruptMaskStatus (VL53L0X_DEV Dev, uint32_t *pInterruptMaskStatus) |
Return device interrupt status. | |
VL53L0X_API VL53L0X_Error | VL53L0X_EnableInterruptMask (VL53L0X_DEV Dev, uint32_t InterruptMask) |
Configure ranging interrupt reported to system. |
Detailed Description
Functions used for interrupt managements.
Function Documentation
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:
-
Dev Device Handle InterruptMask Mask of interrupts to clear
- Returns:
- VL53L0X_ERROR_NONE Success
- VL53L0X_ERROR_INTERRUPT_NOT_CLEARED Cannot clear interrupts
- "Other error code" See VL53L0X_Error
Definition at line 2861 of file vl53l0x_api.c.
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:
-
Dev Device Handle InterruptMask Mask of interrupt to Enable/disable (0:interrupt disabled or 1: interrupt enabled)
- Returns:
- VL53L0X_ERROR_NOT_IMPLEMENTED Not implemented
Definition at line 2907 of file vl53l0x_api.c.
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:
-
Dev Device Handle Pin ID of the GPIO Pin pDeviceMode Pointer to Device Mode associated to the Gpio. pFunctionality Pointer to Pin functionality. Refer to VL53L0X_GpioFunctionality pPolarity Pointer 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
Definition at line 2707 of file vl53l0x_api.c.
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:
-
Dev Device Handle pInterruptMaskStatus Pointer to status variable to update
- Returns:
- VL53L0X_ERROR_NONE Success
- "Other error code" See VL53L0X_Error
Definition at line 2890 of file vl53l0x_api.c.
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:
-
Dev Device Handle DeviceMode Device Mode from which read thresholds pThresholdLow Low threshold (mm, lux ..., depending on the mode) pThresholdHigh High threshold (mm, lux ..., depending on the mode)
- Returns:
- VL53L0X_ERROR_NONE Success
- "Other error code" See VL53L0X_Error
Definition at line 2802 of file vl53l0x_api.c.
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:
-
Dev Device Handle pStopStatus Pointer to status variable to update
- Returns:
- VL53L0X_ERROR_NONE Success
- "Other error code" See VL53L0X_Error
Definition at line 2828 of file vl53l0x_api.c.
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:
-
Dev Device Handle Pin ID of the GPIO Pin Functionality Select Pin functionality. Refer to VL53L0X_GpioFunctionality DeviceMode 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 2612 of file vl53l0x_api.c.
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:
-
Dev Device Handle DeviceMode Device Mode for which change thresholds ThresholdLow Low threshold (mm, lux ..., depending on the mode) ThresholdHigh High threshold (mm, lux ..., depending on the mode)
- Returns:
- VL53L0X_ERROR_NONE Success
- "Other error code" See VL53L0X_Error
Definition at line 2778 of file vl53l0x_api.c.
Generated on Wed Jul 13 2022 02:54:36 by 1.7.2