uv2 2.0.0.0
|
Functions | |
void | uv2_cfg_setup (uv2_cfg_t *cfg) |
Config Object Initialization function. | |
UV2_RETVAL | uv2_init (uv2_t *ctx, uv2_cfg_t *cfg) |
Initialization function. | |
void | uv2_default_cfg (uv2_t *ctx) |
Click Default Configuration function. | |
void | uv2_generic_write (uv2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | uv2_generic_read (uv2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
void | uv2_write_data (uv2_t *ctx, uint8_t reg_address, uint8_t write_data) |
Write 16-bit data function. | |
uint16_t | uv2_read_data (uv2_t *ctx, uint8_t reg_address) |
Read 16-bit data from 8-bit address function. | |
void | uv2_set_config (uv2_t *ctx, uint8_t config_value) |
Set configuration function. | |
void | uv2_set_integration_time (uv2_t *ctx, uint16_t intg_time) |
Set integration time function. | |
void | uv2_set_normal_dynamic (uv2_t *ctx) |
Set normal dynamic function. | |
void | uv2_set_high_dynamic (uv2_t *ctx) |
Set high dynamic function. | |
void | uv2_set_trigger_measurement (uv2_t *ctx) |
Set trigger one measurement function. | |
void | uv2_set_active_force_mode (uv2_t *ctx, uint8_t force_mode) |
Set active force mode function. | |
void | uv2_set_power_on (uv2_t *ctx) |
Set power ON function. | |
void | uv2_set_power_off (uv2_t *ctx) |
Set power OFF function. | |
uint8_t | uv2_check_id (uv2_t *ctx) |
Check sensor ID function. | |
uint16_t | uv2_get_uva (uv2_t *ctx) |
Get UVA data function. | |
uint16_t | uv2_get_uvb (uv2_t *ctx) |
Get UVB data function. | |
float | uv2_get_uv_index (uv2_t *ctx) |
Get UV index function. | |
void uv2_cfg_setup | ( | uv2_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint8_t uv2_check_id | ( | uv2_t * | ctx | ) |
Check sensor ID function.
ctx | Click object. |
@description This function check sensor ID of VEML6075 sesnor on UV 2 Click.
void uv2_default_cfg | ( | uv2_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for UV2 click.
void uv2_generic_read | ( | uv2_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 uv2_generic_write | ( | uv2_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.
float uv2_get_uv_index | ( | uv2_t * | ctx | ) |
Get UV index function.
ctx | Click object. |
@description This function get UV index by calculating data from UVA and UVB register of VEML6075 sesnor on UV 2 Click.
uint16_t uv2_get_uva | ( | uv2_t * | ctx | ) |
Get UVA data function.
ctx | Click object. |
@description This function get UVA data by read UVA register value of VEML6075 sesnor on UV 2 Click.
uint16_t uv2_get_uvb | ( | uv2_t * | ctx | ) |
Get UVB data function.
ctx | Click object. |
@description This function get UVB data by read UVB register value of VEML6075 sesnor on UV 2 Click.
UV2_RETVAL uv2_init | ( | uv2_t * | ctx, |
uv2_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.
uint16_t uv2_read_data | ( | uv2_t * | ctx, |
uint8_t | reg_address ) |
Read 16-bit data from 8-bit address function.
ctx | Click object. |
reg_address | 8-bit register address. |
@description This function read 16-bit data from given 8-bit register address of VEML6075 sesnor on UV 2 Click.
void uv2_set_active_force_mode | ( | uv2_t * | ctx, |
uint8_t | force_mode ) |
Set active force mode function.
ctx | Click object. |
force_mode | Trigger mode. |
@description This function set active force mode by write force mode UV_AF bit to config register of VEML6075 sesnor on UV 2 Click.
void uv2_set_config | ( | uv2_t * | ctx, |
uint8_t | config_value ) |
Set configuration function.
ctx | Click object. |
config_value | 8-bit configuration value. |
@description This function set configuration by write configuration value to config register of VEML6075 sesnor on UV 2 Click.
void uv2_set_high_dynamic | ( | uv2_t * | ctx | ) |
Set high dynamic function.
ctx | Click object. |
@description This function set high dynamic by set HD bit high to config register of VEML6075 sesnor on UV 2 Click.
void uv2_set_integration_time | ( | uv2_t * | ctx, |
uint16_t | intg_time ) |
Set integration time function.
ctx | Click object. |
intg_time | 8-bit configuration value. |
@description This function set configuration by write configuration value to config register of VEML6075 sesnor on UV 2 Click.
void uv2_set_normal_dynamic | ( | uv2_t * | ctx | ) |
Set normal dynamic function.
ctx | Click object. |
@description This function set normal dynamic by set HD bit low to config register of VEML6075 sesnor on UV 2 Click.
void uv2_set_power_off | ( | uv2_t * | ctx | ) |
Set power OFF function.
ctx | Click object. |
@description This function set power OFF by set SD bit high to config register of VEML6075 sesnor on UV 2 Click.
void uv2_set_power_on | ( | uv2_t * | ctx | ) |
Set power ON function.
ctx | Click object. |
@description This function set power ON by set SD bit low to config register of VEML6075 sesnor on UV 2 Click.
void uv2_set_trigger_measurement | ( | uv2_t * | ctx | ) |
Set trigger one measurement function.
ctx | Click object. |
@description This function trigger one measurement by set UV_TRIG bit high to config register of VEML6075 sesnor on UV 2 Click.
void uv2_write_data | ( | uv2_t * | ctx, |
uint8_t | reg_address, | ||
uint8_t | write_data ) |
Write 16-bit data function.
ctx | Click object. |
reg_address | 8-bit register address. |
write_data | 16-bit data to write to given address. |
@description This function write 16-bit data to given 8-bit register address of VEML6075 sesnor on UV 2 Click.