lightranger2 2.0.0.0
|
Functions | |
void | lightranger2_cfg_setup (lightranger2_cfg_t *cfg) |
Config Object Initialization function. | |
LIGHTRANGER2_RETVAL | lightranger2_init (lightranger2_t *ctx, lightranger2_cfg_t *cfg) |
Initialization function. | |
LIGHTRANGER2_RETVAL | lightranger2_default_cfg (lightranger2_t *ctx) |
Click Default Configuration function. | |
void | lightranger2_write_byte (lightranger2_t *ctx, uint8_t reg_address, uint8_t write_data) |
Click Default Configuration function. | |
uint8_t | lightranger2_read_byte (lightranger2_t *ctx, uint8_t reg_address) |
Click Default Configuration function. | |
void | lightranger2_write_data (lightranger2_t *ctx, uint8_t reg_address, uint16_t write_data) |
Click Default Configuration function. | |
uint16_t | lightranger2_read_data (lightranger2_t *ctx, uint8_t reg_address) |
Click Default Configuration function. | |
void | lightranger2_write_bytes (lightranger2_t *ctx, uint8_t reg_address, uint8_t *write_data, uint8_t n_bytes) |
Generic sequential data write function. | |
void | lightranger2_read_bytes (lightranger2_t *ctx, uint8_t reg_address, uint8_t *read_data, uint8_t n_bytes) |
Generic sequential data read function. | |
void | lightranger2_hw_reset (lightranger2_t *ctx) |
Hardware reset function. | |
void | lightranger2_enable (lightranger2_t *ctx) |
Enable function. | |
void | lightranger2_disable (lightranger2_t *ctx) |
Disable function. | |
uint8_t | lightranger2_get_interrupt (lightranger2_t *ctx) |
Get interrupt state function. | |
void | lightranger2_start_continuous (lightranger2_t *ctx, uint32_t period_ms) |
Start continuous ranging measurements function. | |
void | lightranger2_stop_continuous (lightranger2_t *ctx) |
Stop continuous measurements function. | |
LIGHTRANGER2_RETVAL | lightranger2_set_signal_rate_limit (lightranger2_t *ctx, float limit_mcps) |
Set the signal rate limit check value function. | |
float | lightranger2_get_signal_rate_limit (lightranger2_t *ctx) |
Get the signal rate limit check value function. | |
LIGHTRANGER2_RETVAL | lightranger2_get_spad_info (lightranger2_t *ctx, uint8_t *count_data, uint8_t *aperture_type) |
Get reference SPAD ( single photon avalanche diode ) function. | |
LIGHTRANGER2_RETVAL | lightranger2_single_calibration (lightranger2_t *ctx, uint8_t vhv_init_byte) |
Perform single reference calibration function. | |
uint16_t | lightranger2_get_range_continuous (lightranger2_t *ctx) |
Get a range measurement ( continuous mode ) function. | |
uint16_t | lightranger2_get_range_single (lightranger2_t *ctx) |
Get a range measurement ( single mode ) function. | |
void lightranger2_cfg_setup | ( | lightranger2_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
LIGHTRANGER2_RETVAL lightranger2_default_cfg | ( | lightranger2_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for LightRanger2 click.
void lightranger2_disable | ( | lightranger2_t * | ctx | ) |
Disable function.
ctx | Click object. |
@description Function disable VL53L0X ranging and gesture detection sensor by cleared to '0' states of RST pin of the LightRanger 2 click board.
void lightranger2_enable | ( | lightranger2_t * | ctx | ) |
Enable function.
ctx | Click object. |
@description Function enable VL53L0X ranging and gesture detection sensor by sets to '1' states of RST pin of the LightRanger 2 click board.
uint8_t lightranger2_get_interrupt | ( | lightranger2_t * | ctx | ) |
Get interrupt state function.
ctx | Click object. |
@description The function gets interrupt state by return status of INT pin of the LightRanger 2 click board.
uint16_t lightranger2_get_range_continuous | ( | lightranger2_t * | ctx | ) |
Get a range measurement ( continuous mode ) function.
ctx | Click object. |
@description Function gets a range measurement in millimeters when continuous mode is active of the VL53L0X ranging and gesture detection sensor on the LightRanger 2 click board.
uint16_t lightranger2_get_range_single | ( | lightranger2_t * | ctx | ) |
Get a range measurement ( single mode ) function.
ctx | Click object. |
@description Function gets a range measurement in millimeters when single mode is active of the VL53L0X ranging and gesture detection sensor on the LightRanger 2 click board.
float lightranger2_get_signal_rate_limit | ( | lightranger2_t * | ctx | ) |
Get the signal rate limit check value function.
ctx | Click object. |
@description Function gets the signal rate limit check value of the VL53L0X ranging and gesture detection sensor on the LightRanger 2 click board.
LIGHTRANGER2_RETVAL lightranger2_get_spad_info | ( | lightranger2_t * | ctx, |
uint8_t * | count_data, | ||
uint8_t * | aperture_type ) |
Get reference SPAD ( single photon avalanche diode ) function.
ctx | Click object. |
count_data | pointer to the memory location where count data data be stored |
aperture_Type | pointer to the memory location where aperture type data be stored |
@description Function get reference SPAD ( single photon avalanche diode ) count and type of the VL53L0X ranging and gesture detection sensor on the LightRanger 2 click board.
void lightranger2_hw_reset | ( | lightranger2_t * | ctx | ) |
Hardware reset function.
ctx | Click object. |
@description Function hardware reset the VL53L0X ranging and gesture detection sensor by cleared to '0' states of RST pin, wait 100 ms, sets to '1' states of RST pin and wait for another 100 ms.
LIGHTRANGER2_RETVAL lightranger2_init | ( | lightranger2_t * | ctx, |
lightranger2_cfg_t * | cfg ) |
Initialization function.
lightranger2 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint8_t lightranger2_read_byte | ( | lightranger2_t * | ctx, |
uint8_t | reg_address ) |
Click Default Configuration function.
ctx | Click object. |
reg_address | 8-bit register address. |
@description Function reads a byte of data from the targeted 8-bit register address of the VL53L0X ranging and gesture detection sensor on the LightRanger 2 click board.
void lightranger2_read_bytes | ( | lightranger2_t * | ctx, |
uint8_t | reg_address, | ||
uint8_t * | read_data, | ||
uint8_t | n_bytes ) |
Generic sequential data read function.
ctx | Click object. |
reg_address | 8-bit register address |
read_data | pointer to the memory location where data be stored |
n_bytes | number of bytes to be written |
@description Function read a sequential data starting from the targeted 8-bit register address of the VL53L0X ranging and gesture detection sensor on the LightRanger 2 click board.
uint16_t lightranger2_read_data | ( | lightranger2_t * | ctx, |
uint8_t | reg_address ) |
Click Default Configuration function.
ctx | Click object. |
reg_address | 8-bit register address. |
@description Function reads the 16-bit data from the targeted 8-bit register address of the VL53L0X ranging and gesture detection sensor on the LightRanger 2 click board.
LIGHTRANGER2_RETVAL lightranger2_set_signal_rate_limit | ( | lightranger2_t * | ctx, |
float | limit_mcps ) |
Set the signal rate limit check value function.
ctx | Click object. |
period_ms | float signal rate limit check value |
@description Function sets the limit presumably determines the minimum measurement necessary for the sensor to report a valid reading of the VL53L0X ranging and gesture detection sensor on the LightRanger 2 click board.
LIGHTRANGER2_RETVAL lightranger2_single_calibration | ( | lightranger2_t * | ctx, |
uint8_t | vhv_init_byte ) |
Perform single reference calibration function.
ctx | Click object. |
vhv_init_byte | 8-bit vhv init byte |
@description Function perform single reference calibration of the VL53L0X ranging and gesture detection sensor on the LightRanger 2 click board.
void lightranger2_start_continuous | ( | lightranger2_t * | ctx, |
uint32_t | period_ms ) |
Start continuous ranging measurements function.
ctx | Click object. |
period_ms | 32-bit period in ms |
@description Function start continuous ranging measurements of the VL53L0X ranging and gesture detection sensor on the LightRanger 2 click board.
void lightranger2_stop_continuous | ( | lightranger2_t * | ctx | ) |
Stop continuous measurements function.
ctx | Click object. |
@description Function stop continuous ranging measurements of the VL53L0X ranging and gesture detection sensor on the LightRanger 2 click board.
void lightranger2_write_byte | ( | lightranger2_t * | ctx, |
uint8_t | reg_address, | ||
uint8_t | write_data ) |
Click Default Configuration function.
ctx | Click object. |
reg_address | 8-bit register address. |
write_data | 8-bit data to write. |
@description This function writes a byte of data to the targeted 8-bit register address of the VL53L0X ranging and gesture detection sensor on the LightRanger 2 click board.
void lightranger2_write_bytes | ( | lightranger2_t * | ctx, |
uint8_t | reg_address, | ||
uint8_t * | write_data, | ||
uint8_t | n_bytes ) |
Generic sequential data write function.
ctx | Click object. |
reg_address | 8-bit register address |
write_data | pointer to the data to be written |
n_bytes | number of bytes to be written |
@description Function writes a sequential data starting to the targeted 8-bit register address of the VL53L0X ranging and gesture detection sensor on the LightRanger 2 click board.
void lightranger2_write_data | ( | lightranger2_t * | ctx, |
uint8_t | reg_address, | ||
uint16_t | write_data ) |
Click Default Configuration function.
ctx | Click object. |
reg_address | 8-bit register address. |
write_data | 16-bit data to write. |
@description This function writes the 16-bit data to the targeted 8-bit register address of the VL53L0X ranging and gesture detection sensor on the LightRanger 2 click board.