Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
PAL Register Access Functions. More...
Functions | |
| VL53L0X_Error | vl53L0x_set_device_parameters (const VL53L0X_DeviceParameters_t *pDeviceParameters) |
| Prepare device for operation. | |
| VL53L0X_Error | VL53L0X_write_byte (uint8_t index, uint8_t data) |
| Write single byte register. | |
| VL53L0X_Error | VL53L0X_write_word (uint8_t index, uint16_t data) |
| Write word register. | |
| VL53L0X_Error | VL53L0X_write_dword (uint8_t index, uint32_t data) |
| Write double word (4 byte) register. | |
| VL53L0X_Error | VL53L0X_read_byte (uint8_t index, uint8_t *p_data) |
| Read single byte register. | |
| VL53L0X_Error | VL53L0X_read_word (uint8_t index, uint16_t *p_data) |
| Read word (2byte) register. | |
| VL53L0X_Error | VL53L0X_read_dword (uint8_t index, uint32_t *p_data) |
| Read dword (4byte) register. | |
| VL53L0X_Error | VL53L0X_update_byte (uint8_t index, uint8_t and_data, uint8_t or_data) |
| Thread safe Update (read/modify/write) single byte register. | |
| VL53L0X_Error | VL53L0X_read_multi (uint8_t index, uint8_t *p_data, uint32_t count) |
| Reads the requested number of bytes from the device. | |
| VL53L0X_Error | VL53L0X_i2c_write (uint8_t index, uint8_t *p_data, uint16_t number_of_bytes) |
| Writes a buffer towards the I2C peripheral device. | |
| VL53L0X_Error | VL53L0X_i2c_read (uint8_t index, uint8_t *p_data, uint16_t number_of_bytes) |
| Reads a buffer from the I2C peripheral device. | |
Variables | |
| VL53L0X_DeviceParameters_t | CurrentParameters |
| VL53L0X_RangingMeasurementData_t | LastRangeMeasure |
| uint8_t | I2cDevAddr |
| uint8_t | comms_type |
| uint16_t | comms_speed_khz |
Detailed Description
PAL Register Access Functions.
Function Documentation
| VL53L0X_Error VL53L0X_i2c_read | ( | uint8_t | index, |
| uint8_t * | p_data, | ||
| uint16_t | number_of_bytes | ||
| ) | [inherited] |
Reads a buffer from the I2C peripheral device.
- Parameters:
-
p_data pointer to the byte-array to read data in to number_of_bytes number of bytes to be read.
- Return values:
-
0 if ok, -1 if an I2C error has occured
- Note:
- On some devices if NumByteToWrite is greater than one, the RegisterAddr must be masked correctly!
Reads a buffer from the I2C peripheral device.
Definition at line 4520 of file VL53L0X.cpp.
| VL53L0X_Error VL53L0X_i2c_write | ( | uint8_t | index, |
| uint8_t * | p_data, | ||
| uint16_t | number_of_bytes | ||
| ) | [inherited] |
Writes a buffer towards the I2C peripheral device.
- Parameters:
-
p_data pointer to the byte-array data to send number_of_bytes number of bytes to be written.
- Return values:
-
0 if ok, -1 if an I2C error has occured
- Note:
- On some devices if NumByteToWrite is greater than one, the RegisterAddr must be masked correctly!
Writes a buffer towards the I2C peripheral device.
Definition at line 4504 of file VL53L0X.cpp.
| VL53L0X_Error VL53L0X_read_byte | ( | uint8_t | index, |
| uint8_t * | p_data | ||
| ) | [inherited] |
Read single byte register.
- Parameters:
-
index The register index data pointer to 8 bit data
- Returns:
- VL53L0X_ERROR_NONE Success
- "Other error code" See VL53L0X_Error
Definition at line 4470 of file VL53L0X.cpp.
| VL53L0X_Error VL53L0X_read_dword | ( | uint8_t | index, |
| uint32_t * | p_data | ||
| ) | [inherited] |
Read dword (4byte) register.
- Parameters:
-
index The register index data pointer to 32 bit data
- Returns:
- VL53L0X_ERROR_NONE Success
- "Other error code" See VL53L0X_Error
Definition at line 4482 of file VL53L0X.cpp.
| VL53L0X_Error VL53L0X_read_multi | ( | uint8_t | index, |
| uint8_t * | p_data, | ||
| uint32_t | count | ||
| ) | [inherited] |
Reads the requested number of bytes from the device.
- Parameters:
-
index The register index p_data 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
Definition at line 4438 of file VL53L0X.cpp.
| VL53L0X_Error VL53L0X_read_word | ( | uint8_t | index, |
| uint16_t * | p_data | ||
| ) | [inherited] |
Read word (2byte) register.
- Parameters:
-
index The register index data pointer to 16 bit data
- Returns:
- VL53L0X_ERROR_NONE Success
- "Other error code" See VL53L0X_Error
Definition at line 4473 of file VL53L0X.cpp.
| VL53L0X_Error vl53L0x_set_device_parameters | ( | const VL53L0X_DeviceParameters_t * | pDeviceParameters ) | [inherited] |
Prepare device for operation.
- Function Description
- Update device with provided parameters
- Then start ranging operation.
- Note:
- This function Access to the device
- Parameters:
-
pDeviceParameters Pointer to store current device parameters.
- Returns:
- VL53L0X_ERROR_NONE Success
- "Other error code" See VL53L0X_Error
| VL53L0X_Error VL53L0X_update_byte | ( | uint8_t | index, |
| uint8_t | and_data, | ||
| uint8_t | or_data | ||
| ) | [inherited] |
Thread safe Update (read/modify/write) single byte register.
Final_reg = (Initial_reg & and_data) |or_data
- Parameters:
-
index The register index and_data 8 bit and data or_data 8 bit or data
- Returns:
- VL53L0X_ERROR_NONE Success
- "Other error code" See VL53L0X_Error
Definition at line 4491 of file VL53L0X.cpp.
| VL53L0X_Error VL53L0X_write_byte | ( | uint8_t | index, |
| uint8_t | data | ||
| ) | [inherited] |
Write single byte register.
- Parameters:
-
index The register index data 8 bit register data
- Returns:
- VL53L0X_ERROR_NONE Success
- "Other error code" See VL53L0X_Error
Definition at line 4444 of file VL53L0X.cpp.
| VL53L0X_Error VL53L0X_write_dword | ( | uint8_t | index, |
| uint32_t | data | ||
| ) | [inherited] |
Write double word (4 byte) register.
- Parameters:
-
index The register index data 32 bit register data
- Returns:
- VL53L0X_ERROR_NONE Success
- "Other error code" See VL53L0X_Error
Definition at line 4458 of file VL53L0X.cpp.
| VL53L0X_Error VL53L0X_write_word | ( | uint8_t | index, |
| uint16_t | data | ||
| ) | [inherited] |
Write word register.
- Parameters:
-
index The register index data 16 bit register data
- Returns:
- VL53L0X_ERROR_NONE Success
- "Other error code" See VL53L0X_Error
Definition at line 4448 of file VL53L0X.cpp.
Variable Documentation
uint16_t comms_speed_khz [inherited] |
uint8_t comms_type [inherited] |
VL53L0X_DeviceParameters_t CurrentParameters [inherited] |
uint8_t I2cDevAddr [inherited] |
Generated on Thu Jul 14 2022 09:13:18 by
1.7.2