VL53L0X API Specification
1.0.2.4823PAL Register Access Functions
PAL Register Access Functions. More...
Functions | |
VL53L0X_Error | VL53L0X_LockSequenceAccess (VL53L0X_DEV Dev) |
Lock comms interface to serialize all commands to a shared I2C interface for a specific device. More... | |
VL53L0X_Error | VL53L0X_UnlockSequenceAccess (VL53L0X_DEV Dev) |
Unlock comms interface to serialize all commands to a shared I2C interface for a specific device. More... | |
VL53L0X_Error | VL53L0X_WriteMulti (VL53L0X_DEV Dev, uint8_t index, uint8_t *pdata, uint32_t count) |
Writes the supplied byte buffer to the device. More... | |
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. More... | |
VL53L0X_Error | VL53L0X_WrByte (VL53L0X_DEV Dev, uint8_t index, uint8_t data) |
Write single byte register. More... | |
VL53L0X_Error | VL53L0X_WrWord (VL53L0X_DEV Dev, uint8_t index, uint16_t data) |
Write word register. More... | |
VL53L0X_Error | VL53L0X_WrDWord (VL53L0X_DEV Dev, uint8_t index, uint32_t data) |
Write double word (4 byte) register. More... | |
VL53L0X_Error | VL53L0X_RdByte (VL53L0X_DEV Dev, uint8_t index, uint8_t *data) |
Read single byte register. More... | |
VL53L0X_Error | VL53L0X_RdWord (VL53L0X_DEV Dev, uint8_t index, uint16_t *data) |
Read word (2byte) register. More... | |
VL53L0X_Error | VL53L0X_RdDWord (VL53L0X_DEV Dev, uint8_t index, uint32_t *data) |
Read dword (4byte) register. More... | |
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. More... | |
Detailed Description
PAL Register Access Functions.
Function Documentation
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_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_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_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_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_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
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_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_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_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_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