uv2 2.0.0.0
Public function

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.
 

Detailed Description

Function Documentation

◆ uv2_cfg_setup()

void uv2_cfg_setup ( uv2_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ uv2_check_id()

uint8_t uv2_check_id ( uv2_t * ctx)

Check sensor ID function.

Parameters
ctxClick object.

@description This function check sensor ID of VEML6075 sesnor on UV 2 Click.

◆ uv2_default_cfg()

void uv2_default_cfg ( uv2_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for UV2 click.

◆ uv2_generic_read()

void uv2_generic_read ( uv2_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic read function.

Parameters
ctxClick object.
regRegister address.
data_bufOutput data buf.
lenNumber of the bytes to be read.

@description This function reads data from the desired register.

◆ uv2_generic_write()

void uv2_generic_write ( uv2_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic write function.

Parameters
ctxClick object.
regRegister address.
data_bufData buf to be written.
lenNumber of the bytes in data buf.

@description This function writes data to the desired register.

◆ uv2_get_uv_index()

float uv2_get_uv_index ( uv2_t * ctx)

Get UV index function.

Parameters
ctxClick object.

@description This function get UV index by calculating data from UVA and UVB register of VEML6075 sesnor on UV 2 Click.

◆ uv2_get_uva()

uint16_t uv2_get_uva ( uv2_t * ctx)

Get UVA data function.

Parameters
ctxClick object.

@description This function get UVA data by read UVA register value of VEML6075 sesnor on UV 2 Click.

◆ uv2_get_uvb()

uint16_t uv2_get_uvb ( uv2_t * ctx)

Get UVB data function.

Parameters
ctxClick object.

@description This function get UVB data by read UVB register value of VEML6075 sesnor on UV 2 Click.

◆ uv2_init()

UV2_RETVAL uv2_init ( uv2_t * ctx,
uv2_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

@description This function initializes all necessary pins and peripherals used for this click.

◆ uv2_read_data()

uint16_t uv2_read_data ( uv2_t * ctx,
uint8_t reg_address )

Read 16-bit data from 8-bit address function.

Parameters
ctxClick object.
reg_address8-bit register address.

@description This function read 16-bit data from given 8-bit register address of VEML6075 sesnor on UV 2 Click.

◆ uv2_set_active_force_mode()

void uv2_set_active_force_mode ( uv2_t * ctx,
uint8_t force_mode )

Set active force mode function.

Parameters
ctxClick object.
force_modeTrigger 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.

◆ uv2_set_config()

void uv2_set_config ( uv2_t * ctx,
uint8_t config_value )

Set configuration function.

Parameters
ctxClick object.
config_value8-bit configuration value.

@description This function set configuration by write configuration value to config register of VEML6075 sesnor on UV 2 Click.

◆ uv2_set_high_dynamic()

void uv2_set_high_dynamic ( uv2_t * ctx)

Set high dynamic function.

Parameters
ctxClick object.

@description This function set high dynamic by set HD bit high to config register of VEML6075 sesnor on UV 2 Click.

◆ uv2_set_integration_time()

void uv2_set_integration_time ( uv2_t * ctx,
uint16_t intg_time )

Set integration time function.

Parameters
ctxClick object.
intg_time8-bit configuration value.

@description This function set configuration by write configuration value to config register of VEML6075 sesnor on UV 2 Click.

◆ uv2_set_normal_dynamic()

void uv2_set_normal_dynamic ( uv2_t * ctx)

Set normal dynamic function.

Parameters
ctxClick object.

@description This function set normal dynamic by set HD bit low to config register of VEML6075 sesnor on UV 2 Click.

◆ uv2_set_power_off()

void uv2_set_power_off ( uv2_t * ctx)

Set power OFF function.

Parameters
ctxClick object.

@description This function set power OFF by set SD bit high to config register of VEML6075 sesnor on UV 2 Click.

◆ uv2_set_power_on()

void uv2_set_power_on ( uv2_t * ctx)

Set power ON function.

Parameters
ctxClick object.

@description This function set power ON by set SD bit low to config register of VEML6075 sesnor on UV 2 Click.

◆ uv2_set_trigger_measurement()

void uv2_set_trigger_measurement ( uv2_t * ctx)

Set trigger one measurement function.

Parameters
ctxClick object.

@description This function trigger one measurement by set UV_TRIG bit high to config register of VEML6075 sesnor on UV 2 Click.

◆ uv2_write_data()

void uv2_write_data ( uv2_t * ctx,
uint8_t reg_address,
uint8_t write_data )

Write 16-bit data function.

Parameters
ctxClick object.
reg_address8-bit register address.
write_data16-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.