lightranger3 2.0.0.0
|
Functions | |
void | lightranger3_cfg_setup (lightranger3_cfg_t *cfg) |
Config Object Initialization function. | |
LIGHTRANGER3_RETVAL | lightranger3_init (lightranger3_t *ctx, lightranger3_cfg_t *cfg) |
Initialization function. | |
void | lightranger3_generic_write (lightranger3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | lightranger3_generic_read (lightranger3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
void | lightranger3_write_byte (lightranger3_t *ctx, uint8_t reg, uint8_t w_data) |
Functions for write one byte in register. | |
void | lightranger3_write_data (lightranger3_t *ctx, uint8_t reg, uint16_t w_data) |
Functions for write data in register. | |
uint8_t | lightranger3_read_byte (lightranger3_t *ctx, uint8_t reg) |
Functions for read one byte from register. | |
uint16_t | lightranger3_read_data (lightranger3_t *ctx, uint8_t reg) |
Functions for read data from register. | |
uint8_t | lightranger3_set_standby_mode (lightranger3_t *ctx) |
Functions for go to standby mode. | |
uint8_t | lightranger3_set_off_mode (lightranger3_t *ctx) |
Functions for go to OFF mode. | |
uint8_t | lightranger3_set_on_mode (lightranger3_t *ctx) |
Functions for go to ON mode. | |
uint8_t | lightranger3_set_measurement_mode (lightranger3_t *ctx) |
Functions for go to measurement mode. | |
uint8_t | lightranger3_take_single_measurement (lightranger3_t *ctx) |
Functions for measurement. | |
uint16_t | lightranger3_get_distance (lightranger3_t *ctx) |
Functions for reads distance. | |
uint16_t | lightranger3_get_confidence_value (lightranger3_t *ctx) |
Functions for reads confidence value. | |
uint16_t | lightranger3_get_device_id (lightranger3_t *ctx) |
Functions for reads device ID. | |
void | lightranger3_soft_reset (lightranger3_t *ctx) |
Functions for soft reset. | |
uint8_t | lightranger3_get_interrupt (lightranger3_t *ctx) |
Functions for reads interrupt pin. | |
uint8_t | lightranger3_device_init (lightranger3_t *ctx) |
Functions for initializes chip. | |
void lightranger3_cfg_setup | ( | lightranger3_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint8_t lightranger3_device_init | ( | lightranger3_t * | ctx | ) |
Functions for initializes chip.
ctx | Click object. |
@description This function initializes chip.
void lightranger3_generic_read | ( | lightranger3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function reads data from the desired register.
void lightranger3_generic_write | ( | lightranger3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function writes data to the desired register.
uint16_t lightranger3_get_confidence_value | ( | lightranger3_t * | ctx | ) |
Functions for reads confidence value.
ctx | Click object. |
@description This function reads confidence value.
uint16_t lightranger3_get_device_id | ( | lightranger3_t * | ctx | ) |
Functions for reads device ID.
ctx | Click object. |
@description This function reads device ID.
uint16_t lightranger3_get_distance | ( | lightranger3_t * | ctx | ) |
Functions for reads distance.
ctx | Click object. |
@description This function reads distance.
uint8_t lightranger3_get_interrupt | ( | lightranger3_t * | ctx | ) |
Functions for reads interrupt pin.
ctx | Click object. |
@description This function reads interrupt pin.
LIGHTRANGER3_RETVAL lightranger3_init | ( | lightranger3_t * | ctx, |
lightranger3_cfg_t * | cfg ) |
Initialization function.
lightranger3 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint8_t lightranger3_read_byte | ( | lightranger3_t * | ctx, |
uint8_t | reg ) |
Functions for read one byte from register.
ctx | Click object. |
reg | Register address. |
@description This function use when you need to reads one byte from the register.
uint16_t lightranger3_read_data | ( | lightranger3_t * | ctx, |
uint8_t | reg ) |
Functions for read data from register.
ctx | Click object. |
reg | Register address. |
@description This function use when you need to reads data from the register.
uint8_t lightranger3_set_measurement_mode | ( | lightranger3_t * | ctx | ) |
Functions for go to measurement mode.
ctx | Click object. |
@description This function go to measurement mode.
uint8_t lightranger3_set_off_mode | ( | lightranger3_t * | ctx | ) |
Functions for go to OFF mode.
ctx | Click object. |
@description This function sets OFF mode.
uint8_t lightranger3_set_on_mode | ( | lightranger3_t * | ctx | ) |
Functions for go to ON mode.
ctx | Click object. |
@description This function sets ON mode.
uint8_t lightranger3_set_standby_mode | ( | lightranger3_t * | ctx | ) |
Functions for go to standby mode.
ctx | Click object. |
@description This function sets standby mode.
void lightranger3_soft_reset | ( | lightranger3_t * | ctx | ) |
Functions for soft reset.
ctx | Click object. |
@description This function for soft reset.
uint8_t lightranger3_take_single_measurement | ( | lightranger3_t * | ctx | ) |
Functions for measurement.
ctx | Click object. |
@description This function must be called in to start measuring.
void lightranger3_write_byte | ( | lightranger3_t * | ctx, |
uint8_t | reg, | ||
uint8_t | w_data ) |
Functions for write one byte in register.
ctx | Click object. |
reg | Register in which the data will be written. |
w_data | Data which be written in the register. |
@description This function use when you need to written one byte into the register.
void lightranger3_write_data | ( | lightranger3_t * | ctx, |
uint8_t | reg, | ||
uint16_t | w_data ) |
Functions for write data in register.
ctx | Click object. |
reg | Register in which the data will be written. |
w_data | Data which be written in the register. |
@description This function use when you need to written data into the register.