Fork of X-NUCLEO-53L0A1 Library and deleted the board related files. Just use a VL53L0X chip as a ToF sensor.
Dependents: Check_VL53L0X_simple_with_three_ToF Check_VL53L0X_simple_ToF_Sensor lidarproj Check_VL53L0X_simple_with_three_ToF ... more
Fork of VL53L0X by
PAL Register Access Functions
[VL53L0 Platform Functions]
PAL Register Access Functions. More...
Functions | |
| VL53L0X_Error | VL53L0X_lock_sequence_access (VL53L0X_DEV dev) |
| Lock comms interface to serialize all commands to a shared I2C interface for a specific device. | |
| VL53L0X_Error | VL53L0X_unlock_sequence_access (VL53L0X_DEV dev) |
| Unlock comms interface to serialize all commands to a shared I2C interface for a specific device. | |
| VL53L0X_Error | vl53L0x_set_device_parameters (VL53L0X_DEV Dev, const VL53L0X_DeviceParameters_t *pDeviceParameters) |
| Prepare device for operation. | |
| VL53L0X_Error | VL53L0X_set_group_param_hold (VL53L0X_DEV dev, uint8_t group_param_hold) |
| Set Group parameter Hold state. | |
| VL53L0X_Error | VL53L0X_wait_device_ready_for_new_measurement (VL53L0X_DEV dev, uint32_t max_loop) |
| Wait for device ready for a new measurement command. | |
| VL53L0X_Error | VL53L0X_LockSequenceAccess (VL53L0X_DEV Dev) |
| Lock comms interface to serialize all commands to a shared I2C interface for a specific device. | |
| VL53L0X_Error | VL53L0X_UnlockSequenceAccess (VL53L0X_DEV Dev) |
| Unlock comms interface to serialize all commands to a shared I2C interface for a specific device. | |
| VL53L0X_Error | VL53L0X_WriteMulti (VL53L0X_DEV Dev, uint8_t index, uint8_t *pdata, uint32_t count) |
| Writes the supplied byte buffer to the device. | |
| VL53L0X_Error | VL53L0X_ReadMulti (VL53L0X_DEV Dev, uint8_t index, uint8_t *pdata, uint32_t count) |
| Reads the requested number of bytes from the device. | |
| VL53L0X_Error | VL53L0X_WrByte (VL53L0X_DEV Dev, uint8_t index, uint8_t data) |
| Write single byte register. | |
| VL53L0X_Error | VL53L0X_WrWord (VL53L0X_DEV Dev, uint8_t index, uint16_t data) |
| Write word register. | |
| VL53L0X_Error | VL53L0X_WrDWord (VL53L0X_DEV Dev, uint8_t index, uint32_t data) |
| Write double word (4 byte) register. | |
| VL53L0X_Error | VL53L0X_RdByte (VL53L0X_DEV Dev, uint8_t index, uint8_t *data) |
| Read single byte register. | |
| VL53L0X_Error | VL53L0X_RdWord (VL53L0X_DEV Dev, uint8_t index, uint16_t *data) |
| Read word (2byte) register. | |
| VL53L0X_Error | VL53L0X_RdDWord (VL53L0X_DEV Dev, uint8_t index, uint32_t *data) |
| Read dword (4byte) register. | |
| VL53L0X_Error | VL53L0X_UpdateByte (VL53L0X_DEV Dev, uint8_t index, uint8_t AndData, uint8_t OrData) |
| Threat safe Update (read/modify/write) single byte register. | |
Detailed Description
PAL Register Access Functions.
Function Documentation
| VL53L0X_Error VL53L0X_lock_sequence_access | ( | VL53L0X_DEV | dev ) |
Lock comms interface to serialize all commands to a shared I2C interface for a specific device.
- Parameters:
-
dev Device Handle
- Returns:
- VL53L0X_ERROR_NONE Success
- "Other error code" See VL53L0X_Error
| VL53L0X_Error VL53L0X_LockSequenceAccess | ( | VL53L0X_DEV | Dev ) |
Lock comms interface to serialize all commands to a shared I2C interface for a specific device.
- Parameters:
-
Dev Device Handle
- Returns:
- VL53L0X_ERROR_NONE Success
- "Other error code" See VL53L0X_Error
| VL53L0X_Error VL53L0X_RdByte | ( | VL53L0X_DEV | Dev, |
| uint8_t | index, | ||
| uint8_t * | data | ||
| ) |
Read single byte register.
- Parameters:
-
Dev Device Handle index The register index data pointer to 8 bit data
- Returns:
- VL53L0X_ERROR_NONE Success
- "Other error code" See VL53L0X_Error
| VL53L0X_Error VL53L0X_RdDWord | ( | VL53L0X_DEV | Dev, |
| uint8_t | index, | ||
| uint32_t * | data | ||
| ) |
Read dword (4byte) register.
- Parameters:
-
Dev Device Handle index The register index data pointer to 32 bit data
- Returns:
- VL53L0X_ERROR_NONE Success
- "Other error code" See VL53L0X_Error
| VL53L0X_Error VL53L0X_RdWord | ( | VL53L0X_DEV | Dev, |
| uint8_t | index, | ||
| uint16_t * | data | ||
| ) |
Read word (2byte) register.
- Parameters:
-
Dev Device Handle index The register index data pointer to 16 bit data
- Returns:
- VL53L0X_ERROR_NONE Success
- "Other error code" See VL53L0X_Error
| VL53L0X_Error VL53L0X_ReadMulti | ( | VL53L0X_DEV | Dev, |
| uint8_t | index, | ||
| uint8_t * | pdata, | ||
| uint32_t | count | ||
| ) |
Reads the requested number of bytes from the device.
- Parameters:
-
Dev Device Handle index The register index pdata Pointer to the uint8_t buffer to store read data count Number of uint8_t's to read
- Returns:
- VL53L0X_ERROR_NONE Success
- "Other error code" See VL53L0X_Error
| VL53L0X_Error vl53L0x_set_device_parameters | ( | VL53L0X_DEV | Dev, |
| const VL53L0X_DeviceParameters_t * | pDeviceParameters | ||
| ) |
Prepare device for operation.
- Function Description
- Update device with provided parameters
- Then start ranging operation.
- Note:
- This function Access to the device
- Parameters:
-
Dev Device Handle pDeviceParameters Pointer to store current device parameters.
- Returns:
- VL53L0X_ERROR_NONE Success
- "Other error code" See VL53L0X_Error
| VL53L0X_Error VL53L0X_set_group_param_hold | ( | VL53L0X_DEV | dev, |
| uint8_t | group_param_hold | ||
| ) |
Set Group parameter Hold state.
- Function Description
- Set or remove device internal group parameter hold
- Note:
- This function is not Implemented
- Parameters:
-
dev Device Handle group_param_hold Group parameter Hold state to be set (on/off)
- Returns:
- VL53L0X_ERROR_NOT_IMPLEMENTED Not implemented
| VL53L0X_Error VL53L0X_unlock_sequence_access | ( | VL53L0X_DEV | dev ) |
Unlock comms interface to serialize all commands to a shared I2C interface for a specific device.
- Parameters:
-
dev Device Handle
- Returns:
- VL53L0X_ERROR_NONE Success
- "Other error code" See VL53L0X_Error
| VL53L0X_Error VL53L0X_UnlockSequenceAccess | ( | VL53L0X_DEV | Dev ) |
Unlock comms interface to serialize all commands to a shared I2C interface for a specific device.
- Parameters:
-
Dev Device Handle
- Returns:
- VL53L0X_ERROR_NONE Success
- "Other error code" See VL53L0X_Error
| VL53L0X_Error VL53L0X_UpdateByte | ( | VL53L0X_DEV | Dev, |
| uint8_t | index, | ||
| uint8_t | AndData, | ||
| uint8_t | OrData | ||
| ) |
Threat safe Update (read/modify/write) single byte register.
Final_reg = (Initial_reg & and_data) |or_data
- Parameters:
-
Dev Device Handle index The register index AndData 8 bit and data OrData 8 bit or data
- Returns:
- VL53L0X_ERROR_NONE Success
- "Other error code" See VL53L0X_Error
| VL53L0X_Error VL53L0X_wait_device_ready_for_new_measurement | ( | VL53L0X_DEV | dev, |
| uint32_t | max_loop | ||
| ) |
Wait for device ready for a new measurement command.
Blocking function.
- Note:
- This function is not Implemented
- Parameters:
-
dev Device Handle max_loop Max Number of polling loop (timeout).
- Returns:
- VL53L0X_ERROR_NOT_IMPLEMENTED Not implemented
| VL53L0X_Error VL53L0X_WrByte | ( | VL53L0X_DEV | Dev, |
| uint8_t | index, | ||
| uint8_t | data | ||
| ) |
Write single byte register.
- Parameters:
-
Dev Device Handle index The register index data 8 bit register data
- Returns:
- VL53L0X_ERROR_NONE Success
- "Other error code" See VL53L0X_Error
| VL53L0X_Error VL53L0X_WrDWord | ( | VL53L0X_DEV | Dev, |
| uint8_t | index, | ||
| uint32_t | data | ||
| ) |
Write double word (4 byte) register.
- Parameters:
-
Dev Device Handle index The register index data 32 bit register data
- Returns:
- VL53L0X_ERROR_NONE Success
- "Other error code" See VL53L0X_Error
| VL53L0X_Error VL53L0X_WriteMulti | ( | VL53L0X_DEV | Dev, |
| uint8_t | index, | ||
| uint8_t * | pdata, | ||
| uint32_t | count | ||
| ) |
Writes the supplied byte buffer to the device.
- Parameters:
-
Dev Device Handle index The register index pdata Pointer to uint8_t buffer containing the data to be written count Number of bytes in the supplied byte buffer
- Returns:
- VL53L0X_ERROR_NONE Success
- "Other error code" See VL53L0X_Error
| VL53L0X_Error VL53L0X_WrWord | ( | VL53L0X_DEV | Dev, |
| uint8_t | index, | ||
| uint16_t | data | ||
| ) |
Write word register.
- Parameters:
-
Dev Device Handle index The register index data 16 bit register data
- Returns:
- VL53L0X_ERROR_NONE Success
- "Other error code" See VL53L0X_Error
Generated on Wed Jul 13 2022 18:43:14 by
1.7.2
