Qwiic_VL53L5CX_Py  packaging_test1-12-gfe85c0e
Python for SFE Qwiic VL53L5CX
Loading...
Searching...
No Matches
qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX Class Reference
Inheritance diagram for qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX:

Public Member Functions

def __init__ (self, address=None, i2c_driver=None, dataPath="/lib/qwiic_vl53l5cx/vl53l5cx_bin")
 Constructor. More...
 
def is_connected (self)
 Determines if this device is connected. More...
 
def check_data_directory (self)
 Checks if the data directory exists and contains the necessary files. More...
 
def begin (self)
 Initializes this device with default parameters. More...
 
def swap_buffer (self, buffer, size)
 Used to swap a buffer. More...
 
def poll_for_answer (self, size, pos, addr, mask, expected_value)
 This function is used to wait for an answer from the VL53L5CX sensor. More...
 
def send_offset_data (self, resolution)
 This function is used to set the offset data gathered from NVM. More...
 
def send_xtalk_data (self, resolution)
 This function is used to set the Xtalk data from generic configuration, or user's calibration. More...
 
def dci_write_data (self, data, index, data_size)
 This function can be used to write 'extra data' to DCI. More...
 
def dci_read_data (self, data, index, data_size)
 This function can be used to read 'extra data' from DCI. More...
 
def dci_replace_data (self, data, index, data_size, new_data, new_data_size, new_data_pos)
 This function can be used to replace 'extra data' in DCI. More...
 
def is_alive (self)
 Check if the device is alive. More...
 
def set_i2c_address (self, i2c_address)
 Set the I2C address of the device. More...
 
def get_i2c_address (self)
 Get the I2C address of the device. More...
 
def set_ranging_frequency_hz (self, frequency_hz)
 This function sets a new ranging frequency in Hz. More...
 
def get_ranging_frequency_hz (self)
 This function gets the current ranging frequency in Hz. More...
 
def set_resolution (self, resolution)
 This function sets a new resolution (4x4 or 8x8). More...
 
def get_resolution (self)
 This function gets the current resolution (4x4 or 8x8). More...
 
def uint32_list_to_byte_list (self, uint32_list)
 This function converts a list of uint32 values to a list of bytes. More...
 
def byte_list_to_uint32 (self, byte_list)
 This function converts a list of bytes to a single uint32 value. More...
 
def byte_list_to_uint32_list (self, byte_list, uint32_list)
 This function converts a list of bytes into uint32 values and places at the start of the uint32 list. More...
 
def byte_list_to_uint16_list (self, byte_list, uint16_list)
 This function converts a list of bytes to a list of uint16 values and places at the start of the uint16 list. More...
 
def byte_list_to_int16_list (self, byte_list, int16_list)
 This function converts a list of bytes to a list of int16 values and places at the start of the int16 list. More...
 
def set_ranging_mode (self, ranging_mode)
 This function is used to set the ranging mode. More...
 
def get_ranging_mode (self)
 This function is used to get the ranging mode. More...
 
def start_ranging (self)
 This function starts a ranging session. More...
 
def stop_ranging (self)
 This function stops a ranging session. More...
 
def check_data_ready (self)
 This function checks if new data is ready by polling I2C. More...
 
def get_ranging_data (self)
 This function gets the ranging data, using the selected output and the resolution. More...
 
def get_power_mode (self)
 This function is used to get the current sensor power mode. More...
 
def set_power_mode (self, power_mode)
 This function is used to set the sensor in Low Power mode, for example if the sensor is not used during a long time. More...
 
def get_integration_time_ms (self)
 This function gets the current integration time in ms. More...
 
def set_integration_time_ms (self, integration_time_ms)
 This function sets a new integration time in ms. More...
 
def get_sharpener_percent (self)
 This function gets the current sharpener in percent. More...
 
def set_sharpener_percent (self, sharpener_percent)
 This function sets a new sharpener value in percent. More...
 
def get_target_order (self)
 This function gets the current target order (closest or strongest). More...
 
def set_target_order (self, target_order)
 This function sets a new target order. More...
 
def wr_multi (self, addr, reg, values, chunkSize=30)
 This function writes multiple bytes to a register. More...
 
def rd_multi (self, addr, reg, numBytes, chunkSize=32)
 This function reads multiple bytes from a register. More...
 
def wr_byte (self, addr, reg, value)
 This function writes a byte to a register. More...
 
def rd_byte (self, addr, reg)
 This function reads a single byte from a register. More...
 
def get_buffer_from_open_file (self, f, startByte=0, endByte=None)
 This function gets the buffer from an open file. More...
 
def get_absolute_data_path (self, fileName)
 This function gets the absolute path to a data file. More...
 
def get_buffer_from_file (self, fileName, startByte=0, endByte=None)
 This function gets the buffer from the file. More...
 
def write_out_large_file (self, reg, fileName, startByte=0, size=0, writeChunkSize=31, readChunkSize=4096)
 This function writes out a large buffer file to i2c bus. More...
 

Public Attributes

 address
 
 offset_data
 
 xtalk_data
 
 temp_buffer
 
 data_read_size
 
 stream_count
 

Static Public Attributes

 device_name = _DEFAULT_NAME
 
 available_addresses = _AVAILABLE_I2C_ADDRESS
 
int kStatusOK = 0
 
int kMCUError = 1
 
int kStatusInvalidParam = 127
 
int kStatusError = 255
 
int kResolution4x4 = 16
 
int kResolution8x8 = 64
 
int kOffsetDataSize = 488
 
int kXTalkDataSize = 776
 
int kTempBufferSize = 1440
 
int kUiCmdStatus = 0x2C00
 
int kUiCmdStart = 0x2C04
 
int kUiCmdEnd = 0x2FFF
 
int kDciFreqHz = 0x5458
 
int kDciDssConfig = 0xAD38
 
int kDciZoneConfig = 0x5450
 
int kDciRangingMode = 0xAD30
 
int kRangingModeContinous = 1
 
int kRangingModeAutonomous = 3
 
int kDciSingleRange = 0xCD5C
 
int kDciPipeControl = 0xCF78
 
int kBlockHeaderTypeShift = 0
 
int kBlockHeaderTypeMask = 0x0F << kBlockHeaderTypeShift
 
int kBlockHeaderSizeShift = 4
 
int kBlockHeaderSizeMask = 0xFFF << kBlockHeaderSizeShift
 
int kBlockHeaderIdxShift = 16
 
int kBlockHeaderIdxMask = 0xFFFF << kBlockHeaderIdxShift
 
int kStartBh = 0x0000000D
 
int kMetadataBh = 0x54B400C0
 
int kCommonDataBh = 0x54C00040
 
int kAmbientRateBh = 0x54D00104
 
int kSpadCountBh = 0x55D00404
 
int kNbTargetDetectedBh = 0xCF7C0401
 
int kSignalRateBh = 0xCFBC0404
 
int kRangeSigmaMmBh = 0xD2BC0402
 
int kDistanceBh = 0xD33C0402
 
int kReflectanceBh = 0xD43C0401
 
int kTargetStatusBh = 0xD47C0401
 
int kMotionDetectBh = 0xCC5008C0
 
int kNbTargetPerZone = 1
 
int kDciOutputConfig = 0xCD60
 
int kDciOutputEnables = 0xCD68
 
int kDciOutputList = 0xCD78
 
int kMetadataIdx = 0x54B4
 
int kSpadCountIdx = 0x55D0
 
int kAmbientRateIdx = 0x54D0
 
int kNbTargetDetectedIdx = 0xCF7C
 
int kSignalRateIdx = 0xCFBC
 
int kRangeSigmaMmIdx = 0xD2BC
 
int kDistanceIdx = 0xD33C
 
int kReflectanceEstPcIdx = 0xD43C
 
int kTargetStatusIdx = 0xD47C
 
int kMotionDetectIdx = 0xCC50
 
int kPowerModeSleep = 0
 
int kPowerModeWakeup = 1
 
int kDciIntegrationTime = 0x545C
 
int kDciSharpenerPercent = 0xAED8
 
int kDciTargetOrder = 0xAE64
 
int kTargetOrderClosest = 1
 
int kTargetOrderStrongest = 2
 
int kNvmDataSize = 492
 
int kConfigurationSize = 972
 
int kOffsetBufferSize = 488
 
int kXTalkBufferSize = 776
 
int kNvmCmdSize = 40
 

Properties

 connected = property(is_connected)
 

Constructor & Destructor Documentation

◆ __init__()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.__init__ (   self,
  address = None,
  i2c_driver = None,
  dataPath = "/lib/qwiic_vl53l5cx/vl53l5cx_bin" 
)

Constructor.

Parameters
int,optionaladdress: The I2C address to use for the device If not provided, the default address is used
I2CDriver,optionali2c_driver: An existing i2c driver object If not provided, a driver object is created
strdataPath: The absolute path to the data directory.

Member Function Documentation

◆ begin()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.begin (   self)

Initializes this device with default parameters.

Returns
bool Returns True if successful, otherwise False

◆ byte_list_to_int16_list()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.byte_list_to_int16_list (   self,
  byte_list,
  int16_list 
)

This function converts a list of bytes to a list of int16 values and places at the start of the int16 list.

Parameters
listbyte_list: The list of bytes to convert.
listint16_list: The list of int16 values to convert.
Returns
0 if successful, -1 if the byte list is not a multiple of 2, or if the int16 list is too small.

◆ byte_list_to_uint16_list()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.byte_list_to_uint16_list (   self,
  byte_list,
  uint16_list 
)

This function converts a list of bytes to a list of uint16 values and places at the start of the uint16 list.

Parameters
listbyte_list: The list of bytes to convert.
listuint16_list: The list of uint16 values to convert.
Returns
0 if successful, -1 if the byte list is not a multiple of 2, or if the uint16 list is too small.

◆ byte_list_to_uint32()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.byte_list_to_uint32 (   self,
  byte_list 
)

This function converts a list of bytes to a single uint32 value.

Parameters
listbyte_list: The list of bytes to convert.
Returns
The uint32 value

◆ byte_list_to_uint32_list()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.byte_list_to_uint32_list (   self,
  byte_list,
  uint32_list 
)

This function converts a list of bytes into uint32 values and places at the start of the uint32 list.

Parameters
listbyte_list: The list of bytes to convert.
listuint32_list: The list of uint32 values to convert.
Returns
0 if successful, -1 if the byte list is not a multiple of 4, or if the uint32 list is too small.

◆ check_data_directory()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.check_data_directory (   self)

Checks if the data directory exists and contains the necessary files.

Returns
bool True if the data directory exists and contains the necessary files, otherwise False

◆ check_data_ready()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.check_data_ready (   self)

This function checks if new data is ready by polling I2C.

If new data is ready, a flag will be raised.

Returns
bool True if new data is ready, otherwise False

◆ dci_read_data()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.dci_read_data (   self,
  data,
  index,
  data_size 
)

This function can be used to read 'extra data' from DCI.

Using a known index, the function fills the casted structure passed in argument.

Parameters
listdata: This field can be a casted structure, or a simple array. Please note that the FW only accept data of 32 bits. So field data can only have a size of 32, 64, 96, 128, bits ....
intindex: Index of required value.
intdata_size: This field must be the structure or array size
Returns
int status: 0 if OK

◆ dci_replace_data()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.dci_replace_data (   self,
  data,
  index,
  data_size,
  new_data,
  new_data_size,
  new_data_pos 
)

This function can be used to replace 'extra data' in DCI.

The data can be simple data, or casted structure.

Parameters
listdata: This field can be a casted structure, or a simple array. Please note that the FW only accepts data of 32 bits. So field data can only have a size of 32, 64, 96, 128 bits, etc.
intindex: Index of required value.
intdata_size: This field must be the structure or array size.
listnew_data: Contains the new fields.
intnew_data_size: New data size.
intnew_data_pos: New data position into the buffer.
Returns
int status: 0 if OK

◆ dci_write_data()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.dci_write_data (   self,
  data,
  index,
  data_size 
)

This function can be used to write 'extra data' to DCI.

The data can be simple data, or casted structure.

Parameters
listdata: This field can be a casted structure, or a simple array. Please note that the FW only accept data of 32 bits. So field data can only have a size of 32, 64, 96, 128, bits ..
intindex: Index of required value.
intdata_size: This field must be the structure or array size
Returns
int status: 0 if OK

◆ get_absolute_data_path()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.get_absolute_data_path (   self,
  fileName 
)

This function gets the absolute path to a data file.

Parameters
strfileName: The relative path of the data file to get the absolute path for.
Returns
str The absolute path to the file.

◆ get_buffer_from_file()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.get_buffer_from_file (   self,
  fileName,
  startByte = 0,
  endByte = None 
)

This function gets the buffer from the file.

If endByte is None, the function will read until the end of the file. Bytes returned will be [startByte, endByte) (endByte not included)

Parameters
strfileName: The name of the file to read from. fileName should be relative to the dataPath set in the constructor.
intstartByte: The start byte to read from the file.
intendByte: The end byte to read from the file.
Returns
list The buffer read from the file.

◆ get_buffer_from_open_file()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.get_buffer_from_open_file (   self,
  f,
  startByte = 0,
  endByte = None 
)

This function gets the buffer from an open file.

If endByte is None, the function will read until the end of the file. Bytes returned will be [startByte, endByte) (endByte not included)

Parameters
openbinary file f: The file to read from.
intstartByte: The start byte to read from the file.
intendByte: The end byte to read from the file.
Returns
list The buffer read from the file.

◆ get_i2c_address()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.get_i2c_address (   self)

Get the I2C address of the device.

Returns
int The current I2C address

◆ get_integration_time_ms()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.get_integration_time_ms (   self)

This function gets the current integration time in ms.

Returns
int The current integration time in ms.

◆ get_power_mode()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.get_power_mode (   self)

This function is used to get the current sensor power mode.

Returns
int The current power mode.

◆ get_ranging_data()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.get_ranging_data (   self)

This function gets the ranging data, using the selected output and the resolution.

Returns
RangingDataResults The ranging data

◆ get_ranging_frequency_hz()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.get_ranging_frequency_hz (   self)

This function gets the current ranging frequency in Hz.

Ranging frequency corresponds to the time between each measurement.

Returns
int The current ranging frequency in Hz.

◆ get_ranging_mode()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.get_ranging_mode (   self)

This function is used to get the ranging mode.

Two modes are available using ULD: Continuous and autonomous. The default mode is Autonomous.

Returns
int The current ranging mode.

◆ get_resolution()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.get_resolution (   self)

This function gets the current resolution (4x4 or 8x8).

Returns
int The current resolution. 16 for 4x4 mode, and 64 for 8x8 mode.

◆ get_sharpener_percent()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.get_sharpener_percent (   self)

This function gets the current sharpener in percent.

Sharpener can be changed to blur more or less zones depending on the application.

Returns
int The current sharpener in percent.

◆ get_target_order()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.get_target_order (   self)

This function gets the current target order (closest or strongest).

Returns
int The current target order.

◆ is_alive()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.is_alive (   self)

Check if the device is alive.

Returns
bool True if the device is alive, otherwise False

◆ is_connected()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.is_connected (   self)

Determines if this device is connected.

Returns
bool True if connected, otherwise False

◆ poll_for_answer()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.poll_for_answer (   self,
  size,
  pos,
  addr,
  mask,
  expected_value 
)

This function is used to wait for an answer from the VL53L5CX sensor.

Parameters
intsize: The number of bytes to read
intpos: The position in the buffer to check against expected_value
intaddress: The address to read from
intmask: The mask to apply to the value read (at pos) before comparing to expected_value
intexpected_value: The value to compare against the value read (at pos)
Returns
int kStatusOk on success, other on failure

◆ rd_byte()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.rd_byte (   self,
  addr,
  reg 
)

This function reads a single byte from a register.

Enables 16 bit register address reads.

Parameters
intreg: The 16-bit register to read from.
Returns
int The value read from the register.

◆ rd_multi()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.rd_multi (   self,
  addr,
  reg,
  numBytes,
  chunkSize = 32 
)

This function reads multiple bytes from a register.

Enables 16 bit register address reads.

Parameters
intreg: The 16-bit register to read from.
intnumBytes: The number of bytes to read from the register.
intchunkSize: The max size of the chunks to read at a time.
Returns
list The values read from the register.

◆ send_offset_data()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.send_offset_data (   self,
  resolution 
)

This function is used to set the offset data gathered from NVM.

Parameters
intresolution: The resolution of the sensor
Allowable values for resolution:
- kResolution4x4
- kResolution8x8
Returns
kStatusOk on success, other on failure

◆ send_xtalk_data()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.send_xtalk_data (   self,
  resolution 
)

This function is used to set the Xtalk data from generic configuration, or user's calibration.

Parameters
intresolution: The resolution of the sensor
Allowable values for resolution:
- kResolution4x4
- kResolution8x8
Returns
kStatusOk on success, other on failure

◆ set_i2c_address()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.set_i2c_address (   self,
  i2c_address 
)

Set the I2C address of the device.

Parameters
inti2c_address: The new I2C address to use
Returns
bool True if the address was set successfully, otherwise False

◆ set_integration_time_ms()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.set_integration_time_ms (   self,
  integration_time_ms 
)

This function sets a new integration time in ms.

Integration time must be computed to be lower than the ranging period, for a selected resolution. Please note that this function has no impact on ranging mode continuous.

Parameters
intintegration_time_ms: Contains the integration time in ms. For all resolutions and frequency, the minimum value is 2ms, and the maximum is 1000ms.
Returns
int status: 0 if set integration time is OK.

◆ set_power_mode()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.set_power_mode (   self,
  power_mode 
)

This function is used to set the sensor in Low Power mode, for example if the sensor is not used during a long time.

The macro kPowerModeSleep can be used to enable the low power mode. When user wants to restart the sensor, they can use the macro kPowerModeWakeup. Please ensure that the device is not streaming before calling the function.

Parameters
intpower_mode: Selected power mode (kPowerModeSleep or kPowerModeWakeup)
Returns
int status: 0 if set power mode is OK.

◆ set_ranging_frequency_hz()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.set_ranging_frequency_hz (   self,
  frequency_hz 
)

This function sets a new ranging frequency in Hz.

Ranging frequency corresponds to the measurements frequency. This setting depends on the resolution, so please select your resolution before using this function.

Parameters
intfrequency_hz: Contains the ranging frequency in Hz.
  • For 4x4, min and max allowed values are: [1;60]
  • For 8x8, min and max allowed values are: [1;15]
Returns
True on success and False on error.

◆ set_ranging_mode()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.set_ranging_mode (   self,
  ranging_mode 
)

This function is used to set the ranging mode.

Two modes are available using ULD: Continuous and autonomous. The default mode is Autonomous.

Parameters
intranging_mode: Use kRangingModeAutonomous, kRangingModeContinous
Returns
int status: 0 if set ranging mode is OK.

◆ set_resolution()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.set_resolution (   self,
  resolution 
)

This function sets a new resolution (4x4 or 8x8).

Parameters
intresolution: Use kResolution4x4 or kResolution8x8 to set the resolution.
Returns
int status: 0 if set resolution is OK.

◆ set_sharpener_percent()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.set_sharpener_percent (   self,
  sharpener_percent 
)

This function sets a new sharpener value in percent.

Sharpener can be changed to blur more or less zones depending on the application. Min value is 0 (disabled), and max is 99.

Parameters
intsharpener_percent: Value between 0 (disabled) and 99%.
Returns
int status: 0 if set sharpener is OK.

◆ set_target_order()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.set_target_order (   self,
  target_order 
)

This function sets a new target order.

Please use macros VL53L5CX_TARGET_ORDER_STRONGEST and VL53L5CX_TARGET_ORDER_CLOSEST to define the new output order. By default, the sensor is configured with the strongest output.

Parameters
inttarget_order: Required target order.
Returns
int status: 0 if set target order is OK, or 127 if target order is unknown.

◆ start_ranging()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.start_ranging (   self)

This function starts a ranging session.

When the sensor streams, host cannot change settings 'on-the-fly'.

Returns
int status: 0 if start is OK.

◆ stop_ranging()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.stop_ranging (   self)

This function stops a ranging session.

It must be used when the sensor streams, after calling vl53l5cx_start_ranging().

Returns
int status: 0 if stop is OK.

◆ swap_buffer()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.swap_buffer (   self,
  buffer,
  size 
)

Used to swap a buffer.

The buffer size is always a multiple of 4 (4, 8, 12, 16, ...).

Parameters
listbuffer: The byte buffer to swap
intsize: Buffer size to swap

◆ uint32_list_to_byte_list()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.uint32_list_to_byte_list (   self,
  uint32_list 
)

This function converts a list of uint32 values to a list of bytes.

Parameters
listuint32_list: The list of uint32 values to convert.
Returns
The list of bytes.

◆ wr_byte()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.wr_byte (   self,
  addr,
  reg,
  value 
)

This function writes a byte to a register.

Enables 16 bit register address writes.

Parameters
intreg: The 16-bit register to write to.
intvalue: The value to write to the register.

◆ wr_multi()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.wr_multi (   self,
  addr,
  reg,
  values,
  chunkSize = 30 
)

This function writes multiple bytes to a register.

Enables 16 bit register address writes.

Parameters
intreg: The 16-bit register to write to.
listvalues: The values to write to the register.

◆ write_out_large_file()

def qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.write_out_large_file (   self,
  reg,
  fileName,
  startByte = 0,
  size = 0,
  writeChunkSize = 31,
  readChunkSize = 4096 
)

This function writes out a large buffer file to i2c bus.

The function will write out the file in chunks of chunkSize bytes.

Parameters
strfileName: The name of the file to write from fileName should be relative to the dataPath set in the constructor.
intstartByte: The start byte to write from the file.
intsize: How many bytes of the file to write.
intchunkSize: The size of the chunks to write out.

Member Data Documentation

◆ address

qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.address

◆ available_addresses

qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.available_addresses = _AVAILABLE_I2C_ADDRESS
static

◆ data_read_size

qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.data_read_size

◆ device_name

qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.device_name = _DEFAULT_NAME
static

◆ kAmbientRateBh

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kAmbientRateBh = 0x54D00104
static

◆ kAmbientRateIdx

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kAmbientRateIdx = 0x54D0
static

◆ kBlockHeaderIdxMask

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kBlockHeaderIdxMask = 0xFFFF << kBlockHeaderIdxShift
static

◆ kBlockHeaderIdxShift

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kBlockHeaderIdxShift = 16
static

◆ kBlockHeaderSizeMask

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kBlockHeaderSizeMask = 0xFFF << kBlockHeaderSizeShift
static

◆ kBlockHeaderSizeShift

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kBlockHeaderSizeShift = 4
static

◆ kBlockHeaderTypeMask

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kBlockHeaderTypeMask = 0x0F << kBlockHeaderTypeShift
static

◆ kBlockHeaderTypeShift

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kBlockHeaderTypeShift = 0
static

◆ kCommonDataBh

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kCommonDataBh = 0x54C00040
static

◆ kConfigurationSize

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kConfigurationSize = 972
static

◆ kDciDssConfig

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kDciDssConfig = 0xAD38
static

◆ kDciFreqHz

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kDciFreqHz = 0x5458
static

◆ kDciIntegrationTime

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kDciIntegrationTime = 0x545C
static

◆ kDciOutputConfig

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kDciOutputConfig = 0xCD60
static

◆ kDciOutputEnables

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kDciOutputEnables = 0xCD68
static

◆ kDciOutputList

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kDciOutputList = 0xCD78
static

◆ kDciPipeControl

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kDciPipeControl = 0xCF78
static

◆ kDciRangingMode

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kDciRangingMode = 0xAD30
static

◆ kDciSharpenerPercent

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kDciSharpenerPercent = 0xAED8
static

◆ kDciSingleRange

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kDciSingleRange = 0xCD5C
static

◆ kDciTargetOrder

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kDciTargetOrder = 0xAE64
static

◆ kDciZoneConfig

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kDciZoneConfig = 0x5450
static

◆ kDistanceBh

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kDistanceBh = 0xD33C0402
static

◆ kDistanceIdx

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kDistanceIdx = 0xD33C
static

◆ kMCUError

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kMCUError = 1
static

◆ kMetadataBh

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kMetadataBh = 0x54B400C0
static

◆ kMetadataIdx

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kMetadataIdx = 0x54B4
static

◆ kMotionDetectBh

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kMotionDetectBh = 0xCC5008C0
static

◆ kMotionDetectIdx

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kMotionDetectIdx = 0xCC50
static

◆ kNbTargetDetectedBh

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kNbTargetDetectedBh = 0xCF7C0401
static

◆ kNbTargetDetectedIdx

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kNbTargetDetectedIdx = 0xCF7C
static

◆ kNbTargetPerZone

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kNbTargetPerZone = 1
static

◆ kNvmCmdSize

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kNvmCmdSize = 40
static

◆ kNvmDataSize

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kNvmDataSize = 492
static

◆ kOffsetBufferSize

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kOffsetBufferSize = 488
static

◆ kOffsetDataSize

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kOffsetDataSize = 488
static

◆ kPowerModeSleep

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kPowerModeSleep = 0
static

◆ kPowerModeWakeup

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kPowerModeWakeup = 1
static

◆ kRangeSigmaMmBh

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kRangeSigmaMmBh = 0xD2BC0402
static

◆ kRangeSigmaMmIdx

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kRangeSigmaMmIdx = 0xD2BC
static

◆ kRangingModeAutonomous

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kRangingModeAutonomous = 3
static

◆ kRangingModeContinous

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kRangingModeContinous = 1
static

◆ kReflectanceBh

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kReflectanceBh = 0xD43C0401
static

◆ kReflectanceEstPcIdx

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kReflectanceEstPcIdx = 0xD43C
static

◆ kResolution4x4

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kResolution4x4 = 16
static

◆ kResolution8x8

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kResolution8x8 = 64
static

◆ kSignalRateBh

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kSignalRateBh = 0xCFBC0404
static

◆ kSignalRateIdx

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kSignalRateIdx = 0xCFBC
static

◆ kSpadCountBh

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kSpadCountBh = 0x55D00404
static

◆ kSpadCountIdx

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kSpadCountIdx = 0x55D0
static

◆ kStartBh

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kStartBh = 0x0000000D
static

◆ kStatusError

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kStatusError = 255
static

◆ kStatusInvalidParam

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kStatusInvalidParam = 127
static

◆ kStatusOK

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kStatusOK = 0
static

◆ kTargetOrderClosest

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kTargetOrderClosest = 1
static

◆ kTargetOrderStrongest

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kTargetOrderStrongest = 2
static

◆ kTargetStatusBh

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kTargetStatusBh = 0xD47C0401
static

◆ kTargetStatusIdx

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kTargetStatusIdx = 0xD47C
static

◆ kTempBufferSize

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kTempBufferSize = 1440
static

◆ kUiCmdEnd

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kUiCmdEnd = 0x2FFF
static

◆ kUiCmdStart

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kUiCmdStart = 0x2C04
static

◆ kUiCmdStatus

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kUiCmdStatus = 0x2C00
static

◆ kXTalkBufferSize

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kXTalkBufferSize = 776
static

◆ kXTalkDataSize

int qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.kXTalkDataSize = 776
static

◆ offset_data

qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.offset_data

◆ stream_count

qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.stream_count

◆ temp_buffer

qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.temp_buffer

◆ xtalk_data

qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.xtalk_data

Property Documentation

◆ connected

qwiic_vl53l5cx.qwiic_vl53l5cx.QwiicVL53L5CX.connected = property(is_connected)
static

The documentation for this class was generated from the following file: