lightranger4 2.0.0.0
|
This file contains API for Light Ranger 4 Click driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"
Go to the source code of this file.
Data Structures | |
struct | lightranger4_t |
Click ctx object definition. More... | |
struct | lightranger4_cfg_t |
Click configuration structure definition. More... | |
struct | lightranger4_user_roi_t |
User ROI structure definition. More... | |
Functions | |
void | lightranger4_cfg_setup (lightranger4_cfg_t *cfg) |
Config Object Initialization function. | |
LIGHTRANGER4_RETVAL | lightranger4_init (lightranger4_t *ctx, lightranger4_cfg_t *cfg) |
Initialization function. | |
LIGHTRANGER4_RETVAL | lightranger4_default_cfg (lightranger4_t *ctx) |
Click Default Configuration function. | |
void | lightranger4_generic_write (lightranger4_t *ctx, uint16_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | lightranger4_generic_read (lightranger4_t *ctx, uint16_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
void | lightranger4_software_reset (lightranger4_t *ctx) |
Function for software reset. | |
void | lightranger4_start_measurement (lightranger4_t *ctx, uint32_t period_ms) |
Functions for start measurement. | |
uint8_t | lightranger4_new_data_ready (lightranger4_t *ctx) |
Function that checks whether the new data is ready for reading. | |
uint16_t | lightranger4_get_distance (lightranger4_t *ctx) |
Function reads distance of the object in front of the sensor. | |
uint16_t | lightranger4_get_signal_rate (lightranger4_t *ctx) |
Function reads signal rate. | |
uint8_t | lightranger4_set_distance_mode (lightranger4_t *ctx, uint8_t mode) |
Functions for sets distance measurement mode. | |
uint8_t | lightranger4_get_range_status (lightranger4_t *ctx) |
Function reads range status. | |
void | lightranger4_set_center (lightranger4_t *ctx, uint8_t center_x, uint8_t center_y) |
Functions for set center position. | |
void | lightranger4_set_zone_size (lightranger4_t *ctx, uint8_t width, uint8_t height) |
Functions for sets zone size. | |
void | lightranger4_set_user_roi (lightranger4_t *ctx, lightranger4_user_roi_t *roi) |
Functions for sets user Roi. | |
LIGHTRANGER4_RETVAL | lightranger4_set_measurement_timing_budget (lightranger4_t *ctx, uint32_t budget_us) |
Functions for sets measurement timing budget. | |
uint8_t | lightranger4_get_intrrupt_state (lightranger4_t *ctx) |
Function reads interrupt pin state. | |
void | lightranger4_set_xshut_pin (lightranger4_t *ctx, uint8_t state) |
Function for sets XSHUT pin. | |
void | lightranger4_power_on (lightranger4_t *ctx) |
Function for starts power ON procedure. | |
This file contains API for Light Ranger 4 Click driver.