proximity7 2.0.0.0
|
Functions | |
void | proximity7_cfg_setup (proximity7_cfg_t *cfg) |
Config Object Initialization function. | |
uint8_t | proximity7_init (proximity7_t *ctx, proximity7_cfg_t *cfg) |
Initialization function. | |
void | proximity7_default_cfg (proximity7_t *ctx) |
Click Default Configuration function. | |
void | proximity7_generic_write (proximity7_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | proximity7_generic_read (proximity7_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
uint8_t | proximity7_set_als_integration_time (proximity7_t *ctx, float integration_time) |
Setting ALS int_pinegration time. | |
uint8_t | proximity7_set_proximity_integration_time (proximity7_t *ctx, float integration_time) |
Setting proximity int_pinegration time. | |
uint8_t | proximity7_set_wait_time (proximity7_t *ctx, float wait_time) |
Setting wait time. | |
void | proximity7_set_low_alsCh0_threshold (proximity7_t *ctx, uint16_t low_als_ch0_threshold) |
Setting low ALS Ch0 threshold value. | |
void | proximity7_set_high_alsCh0_threshold (proximity7_t *ctx, uint16_t high_als_ch0_threshold) |
Setting high ALS Ch0 threshold value. | |
void | proximity7_set_low_proximity_threshold (proximity7_t *ctx, uint16_t low_proximity_threshold) |
Setting low proximity threshold. | |
void | proximity7_set_high_proximity_threshold (proximity7_t *ctx, uint16_t high_proximity_threshold) |
Setting high proximity threshold. | |
void | proximity7_set_int_persistance (proximity7_t *ctx, uint16_t proximity_int_persistence, uint16_t als_int_persistence) |
Setting int_pinerrupt persistance. | |
void | proximity7_set_proximity_pulse_count (proximity7_t *ctx, uint8_t proximity_pulse_count) |
Setting proximity pulse count. | |
uint16_t | proximity7_get_als_data_ch0 (proximity7_t *ctx) |
Getting channel measurement data. | |
uint16_t | proximity7_get_als_data_ch1 (proximity7_t *ctx) |
Getting channel 1 measurement data. | |
uint16_t | proximity7_get_proximity_data (proximity7_t *ctx) |
Getting proximity measurement data. | |
uint8_t | proximity7_set_proximity_offset (proximity7_t *ctx, uint8_t proximity_offset_sign, uint8_t proximity_offset_magnitude) |
Setting proximity offset. | |
float | proximity7_get_lux_level (proximity7_t *ctx) |
Calculating LUX level. | |
uint8_t | proximity7_get_int_pin (proximity7_t *ctx) |
Checking INT_pin pin status. | |
void | proximity7_set_constants (proximity7_t *ctx, proximity7_const_t *set_const_data) |
Generic read function. | |
void proximity7_cfg_setup | ( | proximity7_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void proximity7_default_cfg | ( | proximity7_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Proximity7 click.
void proximity7_generic_read | ( | proximity7_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 proximity7_generic_write | ( | proximity7_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 proximity7_get_als_data_ch0 | ( | proximity7_t * | ctx | ) |
Getting channel measurement data.
ctx | Click object. |
@description This function gets data from channel 0 measurement.
uint16_t proximity7_get_als_data_ch1 | ( | proximity7_t * | ctx | ) |
Getting channel 1 measurement data.
ctx | Click object. |
@description This function gets data from channel 1 measurement.
uint8_t proximity7_get_int_pin | ( | proximity7_t * | ctx | ) |
Checking INT_pin pin status.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function returns 0 if INT_pin pin is LOW. This function returns 1 if INT_pin pin is HIGH.
float proximity7_get_lux_level | ( | proximity7_t * | ctx | ) |
Calculating LUX level.
ctx | Click object. |
@description This function calculates LUX level based on Ch0 and Ch1 data.
uint16_t proximity7_get_proximity_data | ( | proximity7_t * | ctx | ) |
Getting proximity measurement data.
ctx | Click object. |
@description This function gets data from proximity measurement.
uint8_t proximity7_init | ( | proximity7_t * | ctx, |
proximity7_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 proximity7_set_als_integration_time | ( | proximity7_t * | ctx, |
float | integration_time ) |
Setting ALS int_pinegration time.
ctx | Click object. |
int_pinegration_time_ | Int_pinegration time. |
addr_reg |
@description This function sets ALS int_pinegration time.
void proximity7_set_constants | ( | proximity7_t * | ctx, |
proximity7_const_t * | set_const_data ) |
Generic read function.
ctx | Click object. |
set_const_data | Constant data. |
@description This function reads data from the desired register.
void proximity7_set_high_alsCh0_threshold | ( | proximity7_t * | ctx, |
uint16_t | high_als_ch0_threshold ) |
Setting high ALS Ch0 threshold value.
ctx | Click object. |
high_als_ch0_threshold_ | High ALS Ch0. |
@description This function sets high ALS Ch0 threshold value.
void proximity7_set_high_proximity_threshold | ( | proximity7_t * | ctx, |
uint16_t | high_proximity_threshold ) |
Setting high proximity threshold.
ctx | Click object. |
high_proximity_threshold_ | High proximity. |
@description This function sets high proximity threshold.
void proximity7_set_int_persistance | ( | proximity7_t * | ctx, |
uint16_t | proximity_int_persistence, | ||
uint16_t | als_int_persistence ) |
Setting int_pinerrupt persistance.
ctx | Click object. |
als_int_pin_persistence | ALS int_pinerrupt. |
@description This function sets int_pinerrupt persistance for ALS and Proximity measurements.
void proximity7_set_low_alsCh0_threshold | ( | proximity7_t * | ctx, |
uint16_t | low_als_ch0_threshold ) |
Setting low ALS Ch0 threshold value.
ctx | Click object. |
low_als_ch0_threshold_ | Low ALS Ch0. |
@description This function sets low ALS Ch0 threshold value.
void proximity7_set_low_proximity_threshold | ( | proximity7_t * | ctx, |
uint16_t | low_proximity_threshold ) |
Setting low proximity threshold.
ctx | Click object. |
low_proximity_threshold_ | Low proximity. |
@description This function sets low proximity threshold.
uint8_t proximity7_set_proximity_integration_time | ( | proximity7_t * | ctx, |
float | integration_time ) |
Setting proximity int_pinegration time.
ctx | Click object. |
int_pinegration_time_ | Int_pinegration time. |
@description This function sets priximity int_pinegration time.
uint8_t proximity7_set_proximity_offset | ( | proximity7_t * | ctx, |
uint8_t | proximity_offset_sign, | ||
uint8_t | proximity_offset_magnitude ) |
Setting proximity offset.
ctx | Click object. |
proximity_offset_sign | Offset sign. |
proximity_offset_magnitude_ | Offset magnitude. |
@description This function returns 0 if offset value is in range. This function returns 1 if offset value is not in range
void proximity7_set_proximity_pulse_count | ( | proximity7_t * | ctx, |
uint8_t | proximity_pulse_count ) |
Setting proximity pulse count.
ctx | Click object. |
proximity_pulse_count_ | Proximity pulse count. |
@description This function sets proximity pulse count.
uint8_t proximity7_set_wait_time | ( | proximity7_t * | ctx, |
float | wait_time ) |
Setting wait time.
ctx | Click object. |
wait_time_ | Wait time. |
@description This function sets wait time.