ST Expansion SW Team / VL53L1

Dependencies:   X_NUCLEO_COMMON ST_INTERFACES

Dependents:   X_NUCLEO_53L1CB

Embed: (wiki syntax)

« Back to documentation index

VL53L1 Limit Check Functions

VL53L1 Limit Check Functions
[VL53L1 cut1.1 Function Definition]

Functions used for the Limit checks. More...

Functions

VL53L1_Error VL53L1_GetNumberOfLimitCheck (uint16_t *pNumberOfLimitCheck)
 Get the number of the check limit managed by a given Device.
VL53L1_Error VL53L1_GetLimitCheckInfo (uint16_t LimitCheckId, char *pLimitCheckString)
 Return a description string for a given limit check number.
VL53L1_Error VL53L1_GetLimitCheckStatus (VL53L1_DEV Dev, uint16_t LimitCheckId, uint8_t *pLimitCheckStatus)
 Return a the Status of the specified check limit.
VL53L1_Error VL53L1_SetLimitCheckEnable (VL53L1_DEV Dev, uint16_t LimitCheckId, uint8_t LimitCheckEnable)
 Enable/Disable a specific limit check.
VL53L1_Error VL53L1_GetLimitCheckEnable (VL53L1_DEV Dev, uint16_t LimitCheckId, uint8_t *pLimitCheckEnable)
 Get specific limit check enable state.
VL53L1_Error VL53L1_SetLimitCheckValue (VL53L1_DEV Dev, uint16_t LimitCheckId, FixPoint1616_t LimitCheckValue)
 Set a specific limit check value.
VL53L1_Error VL53L1_GetLimitCheckValue (VL53L1_DEV Dev, uint16_t LimitCheckId, FixPoint1616_t *pLimitCheckValue)
 Get a specific limit check value.
VL53L1_Error VL53L1_GetLimitCheckCurrent (VL53L1_DEV Dev, uint16_t LimitCheckId, FixPoint1616_t *pLimitCheckCurrent)
 Get the current value of the signal used for the limit check.

Detailed Description

Functions used for the Limit checks.


Function Documentation

VL53L1_Error VL53L1_GetLimitCheckCurrent ( VL53L1_DEV  Dev,
uint16_t  LimitCheckId,
FixPoint1616_t *  pLimitCheckCurrent 
)

Get the current value of the signal used for the limit check.

Function Description
This function get a the current value of the signal used for the limit check. To obtain the latest value you should run a valid ranging before. The value reported is linked to the limit check identified with the LimitCheckId.
Parameters:
DevDevice Handle
LimitCheckIdLimit Check ID (0<= LimitCheckId < VL53L1_GetNumberOfLimitCheck() ).
pLimitCheckCurrentPointer to current Value for a given LimitCheckId.
Returns:
VL53L1_ERROR_NONE Success
"Other error code" See VL53L1_Error

Definition at line 1433 of file vl53l1_api.c.

VL53L1_Error VL53L1_GetLimitCheckEnable ( VL53L1_DEV  Dev,
uint16_t  LimitCheckId,
uint8_t *  pLimitCheckEnable 
)

Get specific limit check enable state.

Function Description
This function get the enable state of a specific limit check. The limit check is identified with the LimitCheckId.
Note:
This function Access to the device
Parameters:
DevDevice Handle
LimitCheckIdLimit Check ID (0<= LimitCheckId < VL53L1_GetNumberOfLimitCheck() ).
pLimitCheckEnablePointer to the check limit enable value.

  • if 1 the check limit corresponding to LimitCheckId is Enabled
  • if 0 the check limit corresponding to LimitCheckId is disabled
Returns:
VL53L1_ERROR_NONE Success
VL53L1_ERROR_INVALID_PARAMS This error is returned when LimitCheckId value is out of range.
"Other error code" See VL53L1_Error

Definition at line 1327 of file vl53l1_api.c.

VL53L1_Error VL53L1_GetLimitCheckInfo ( uint16_t  LimitCheckId,
char *  pLimitCheckString 
)

Return a description string for a given limit check number.

Function Description
This function returns a description string for a given limit check number. The limit check is identified with the LimitCheckId.
Parameters:
LimitCheckIdLimit Check ID (0<= LimitCheckId < VL53L1_GetNumberOfLimitCheck() ).
pLimitCheckStringPointer to the description string of the given check limit. Shall be defined as char buf[VL53L1_MAX_STRING_LENGTH]
Returns:
VL53L1_ERROR_NONE Success
"Other error code" See VL53L1_Error

Definition at line 1233 of file vl53l1_api.c.

VL53L1_Error VL53L1_GetLimitCheckStatus ( VL53L1_DEV  Dev,
uint16_t  LimitCheckId,
uint8_t *  pLimitCheckStatus 
)

Return a the Status of the specified check limit.

Function Description
This function returns the Status of the specified check limit. The value indicate if the check is fail or not. The limit check is identified with the LimitCheckId.
Parameters:
DevDevice Handle
LimitCheckIdLimit Check ID (0<= LimitCheckId < VL53L1_GetNumberOfLimitCheck() ).
pLimitCheckStatusPointer to the Limit Check Status of the given check limit. LimitCheckStatus : 0 the check is not fail or not enabled 1 the check if fail
  • VL53L1_CHECKENABLE_SIGMA_FINAL_RANGE: the sigma indicate the quality of the measure. The more it is little the better it is. The status is 1 when current sigma is greater then the limit.
  • VL53L1_CHECKENABLE_SIGNAL_RATE_FINAL_RANGE: the signal rate indicate the strength of the returned signal. The more it is big the better it is. The status is 1 when current signal is lower then the limit.
Returns:
VL53L1_ERROR_NONE Success
"Other error code" See VL53L1_Error

Definition at line 1247 of file vl53l1_api.c.

VL53L1_Error VL53L1_GetLimitCheckValue ( VL53L1_DEV  Dev,
uint16_t  LimitCheckId,
FixPoint1616_t *  pLimitCheckValue 
)

Get a specific limit check value.

Function Description
This function get a specific limit check value from device then it updates internal values and check enables. The limit check is identified with the LimitCheckId.
Note:
This function get the current value from device if zero then the value returned is the one stored by the user, but in that case the check is store as disabled. If the value from device is not zero, this is returned and set into the memory at the same way that user call VL53L1_SetLimitCheckValue()
Parameters:
DevDevice Handle
LimitCheckIdLimit Check ID (0<= LimitCheckId < VL53L1_GetNumberOfLimitCheck() ).
pLimitCheckValuePointer to Limit check Value for a given LimitCheckId.
Returns:
VL53L1_ERROR_NONE Success
"Other error code" See VL53L1_Error

Definition at line 1386 of file vl53l1_api.c.

VL53L1_Error VL53L1_GetNumberOfLimitCheck ( uint16_t *  pNumberOfLimitCheck )

Get the number of the check limit managed by a given Device.

Function Description
This function give the number of the check limit managed by the Device
Parameters:
pNumberOfLimitCheckPointer to the number of check limit.
Returns:
VL53L1_ERROR_NONE Success
"Other error code" See VL53L1_Error

Definition at line 1221 of file vl53l1_api.c.

VL53L1_Error VL53L1_SetLimitCheckEnable ( VL53L1_DEV  Dev,
uint16_t  LimitCheckId,
uint8_t  LimitCheckEnable 
)

Enable/Disable a specific limit check.

Function Description
This function Enable/Disable a specific limit check. The limit check is identified with the LimitCheckId.
Note:
This function doesn't Access to the device
Parameters:
DevDevice Handle
LimitCheckIdLimit Check ID (0<= LimitCheckId < VL53L1_GetNumberOfLimitCheck() ).
LimitCheckEnable
  • set LimitCheckEnable=1 enables the LimitCheckId limit
  • set LimitCheckEnable=0 disables the LimitCheckId limit
Returns:
VL53L1_ERROR_NONE Success
VL53L1_ERROR_INVALID_PARAMS This error is returned when LimitCheckId value is out of range.
"Other error code" See VL53L1_Error

Definition at line 1293 of file vl53l1_api.c.

VL53L1_Error VL53L1_SetLimitCheckValue ( VL53L1_DEV  Dev,
uint16_t  LimitCheckId,
FixPoint1616_t  LimitCheckValue 
)

Set a specific limit check value.

Function Description
This function set a specific limit check value. The limit check is identified with the LimitCheckId.
Note:
Note that the value written with that function will not be applied if the limit is not enabled. In other words this function will not enable the limit but change only the value. In case the limit is not enabled the value is saved internally and applied with VL53L1_SetLimitCheckEnable.
Parameters:
DevDevice Handle
LimitCheckIdLimit Check ID (0<= LimitCheckId < VL53L1_GetNumberOfLimitCheck() ).
LimitCheckValueLimit check Value for a given LimitCheckId
Returns:
VL53L1_ERROR_NONE Success
"Other error code" See VL53L1_Error

Definition at line 1349 of file vl53l1_api.c.