proximity11 2.0.0.0
|
Functions | |
void | proximity11_cfg_setup (proximity11_cfg_t *cfg) |
Config Object Initialization function. | |
PROXIMITY11_RETVAL | proximity11_init (proximity11_t *ctx, proximity11_cfg_t *cfg) |
Initialization function. | |
uint8_t | proximity11_default_cfg (proximity11_t *ctx) |
Click Default Configuration function. | |
void | proximity11_generic_write (proximity11_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | proximity11_generic_read (proximity11_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
uint8_t | proximity11_int_get (proximity11_t *ctx) |
Int pin get functuin. | |
uint8_t | proximity11_get (proximity11_t *ctx, uint8_t register_address, uint8_t *output_buffer, uint8_t n_bytes) |
Proximity value get function. | |
uint8_t | proximity11_set (proximity11_t *ctx, uint8_t register_address, uint8_t *input_buffer, uint8_t n_bytes) |
Proximity value set function. | |
void | proximity11_update (proximity11_t *ctx) |
Updating data for Lux calculation. | |
float | proximity11_convert_lx (proximity11_t *ctx, uint16_t *input_data) |
Converting raw data to Lux. | |
void | proximity11_get_raw_ps_als_values (proximity11_t *ctx, uint8_t *data_buffer) |
Getting raw ALS and PS data. | |
void | proximity11_get_ps_als_values (proximity11_t *ctx, uint16_t *ps_value, float *als_value) |
Getting ALS and PS values. | |
uint8_t | proximity11_set_ps_threshold_high (proximity11_t *ctx, uint16_t threshold_value) |
Setting High PS threshold value. | |
uint8_t | proximity11_set_ps_threshold_low (proximity11_t *ctx, uint16_t threshold_value) |
Setting Low PS threshold value. | |
void | proximity11_set_als_threshold_high (proximity11_t *ctx, uint16_t threshold_value) |
Setting High Als threshold value. | |
void | proximity11_set_als_threshold_low (proximity11_t *ctx, uint16_t threshold_value) |
Setting Low Als threshold value. | |
uint8_t | proximity11_set_ps_offset (proximity11_t *ctx, uint16_t offset_value) |
Setting PS offset value. | |
void proximity11_cfg_setup | ( | proximity11_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
float proximity11_convert_lx | ( | proximity11_t * | ctx, |
uint16_t * | input_data ) |
Converting raw data to Lux.
ctx | Click object. |
input_data | buffer that holds ALS data0 and ALS data1 |
@description This function takes ALS data 0 and ALS data 1 values and converts them to Lux value
uint8_t proximity11_default_cfg | ( | proximity11_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Proximity11 click.
void proximity11_generic_read | ( | proximity11_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 proximity11_generic_write | ( | proximity11_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.
uint8_t proximity11_get | ( | proximity11_t * | ctx, |
uint8_t | register_address, | ||
uint8_t * | output_buffer, | ||
uint8_t | n_bytes ) |
Proximity value get function.
ctx | Click object. |
register_address | Register address. |
output_buffer | Output data buf |
n_bytes | Number of the bytes to be read |
@description This function reads proximity values from the desired registers.
void proximity11_get_ps_als_values | ( | proximity11_t * | ctx, |
uint16_t * | ps_value, | ||
float * | als_value ) |
Getting ALS and PS values.
ctx | Click object. |
ps_value | PS value |
als_value | ALS value |
@description This function gets raw ALS and PS data and converts raw ALS data to Lux value
void proximity11_get_raw_ps_als_values | ( | proximity11_t * | ctx, |
uint8_t * | data_buffer ) |
Getting raw ALS and PS data.
ctx | Click object. |
data_buffer | data buffer |
@description This function gets raw ALS and PS data and stores them into data buffer
PROXIMITY11_RETVAL proximity11_init | ( | proximity11_t * | ctx, |
proximity11_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint8_t proximity11_int_get | ( | proximity11_t * | ctx | ) |
Int pin get functuin.
ctx | Click object. |
@description This function reads and returns int_pin state.
uint8_t proximity11_set | ( | proximity11_t * | ctx, |
uint8_t | register_address, | ||
uint8_t * | input_buffer, | ||
uint8_t | n_bytes ) |
Proximity value set function.
ctx | Click object. |
register_address | Register address. |
input_buffer | Output data buf |
n_bytes | Number of the bytes to be written |
@description This function writes proximity values to the desired registers.
void proximity11_set_als_threshold_high | ( | proximity11_t * | ctx, |
uint16_t | threshold_value ) |
Setting High Als threshold value.
ctx | Click object. |
threshold_value | threshold value |
@description This function sets High ALS threshold value
void proximity11_set_als_threshold_low | ( | proximity11_t * | ctx, |
uint16_t | threshold_value ) |
Setting Low Als threshold value.
ctx | Click object. |
threshold_value | threshold value |
@description This function sets Low ALS threshold value
uint8_t proximity11_set_ps_offset | ( | proximity11_t * | ctx, |
uint16_t | offset_value ) |
Setting PS offset value.
ctx | Click object. |
offset_value | offset value |
@description This function sets PS offset value
uint8_t proximity11_set_ps_threshold_high | ( | proximity11_t * | ctx, |
uint16_t | threshold_value ) |
Setting High PS threshold value.
ctx | Click object. |
threshold_value | threshold value |
@description This function sets High PS threshold value
uint8_t proximity11_set_ps_threshold_low | ( | proximity11_t * | ctx, |
uint16_t | threshold_value ) |
Setting Low PS threshold value.
ctx | Click object. |
threshold_value | threshold value |
@description This function sets Low PS threshold value
void proximity11_update | ( | proximity11_t * | ctx | ) |
Updating data for Lux calculation.
ctx | Click object. |
@description This function updates data used to calculate Lux. This function should be called if changing als measurement time and als gain.