uv3 2.0.0.0
|
Functions | |
void | uv3_cfg_setup (uv3_cfg_t *cfg) |
Config Object Initialization function. | |
UV3_RETVAL | uv3_init (uv3_t *ctx, uv3_cfg_t *cfg) |
Initialization function. | |
void | uv3_default_cfg (uv3_t *ctx) |
Click Default Configuration function. | |
void | uv3_write_command (uv3_t *ctx, uint8_t slave_addr, uint8_t command) |
Write function. | |
uint8_t | uv3_read_byte (uv3_t *ctx, uint8_t slave_addr) |
Read function. | |
void | uv3_clear_ack (uv3_t *ctx) |
Read ARA to clear interrupt function. | |
void | uv3_enable_sensor (uv3_t *ctx) |
Enable sensor function. | |
void | uv3_disable_mode (uv3_t *ctx) |
Disable sensor function. | |
void | uv3_set_integration_time (uv3_t *ctx, uint8_t int_data) |
Set integration time function. | |
uint16_t | uv3_read_measurements (uv3_t *ctx) |
Get UV data measurements function. | |
uint8_t | uv3_risk_level (uint16_t uv_data) |
Calculate UV risk level function. | |
uint8_t | uv3_get_interrupt (uv3_t *ctx) |
Get state of interrupt pin function. | |
void uv3_cfg_setup | ( | uv3_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void uv3_clear_ack | ( | uv3_t * | ctx | ) |
Read ARA to clear interrupt function.
ctx | Click object. |
@description Function read ARA clear interrupt from the target 8-bit ARA slave address of VEML6070 sensor on UV 3 Click.
void uv3_default_cfg | ( | uv3_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Uv3 click.
void uv3_disable_mode | ( | uv3_t * | ctx | ) |
Disable sensor function.
ctx | Click object. |
@description Function disable sensor by sets shutdown mode bits as HIGH to the target 8-bit CMD slave address of VEML6070 sensor on UV 3 Click.
void uv3_enable_sensor | ( | uv3_t * | ctx | ) |
Enable sensor function.
ctx | Click object. |
@description Function enable sensor by sets shutdown mode bits as LOW to the target 8-bit CMD slave address of VEML6070 sensor on UV 3 Click.
uint8_t uv3_get_interrupt | ( | uv3_t * | ctx | ) |
Get state of interrupt pin function.
ctx | Click object. |
@description Function get state of interrupt ( ACK ) pin.
UV3_RETVAL uv3_init | ( | uv3_t * | ctx, |
uv3_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 uv3_read_byte | ( | uv3_t * | ctx, |
uint8_t | slave_addr ) |
Read function.
ctx | Click object. |
slave_addr | Slave address. |
@description Function read the 8-bit of data from the target 8-bit reed slave address of VEML6070 sensor on UV 3 Click.
uint16_t uv3_read_measurements | ( | uv3_t * | ctx | ) |
Get UV data measurements function.
ctx | Click object. |
@description Function read UV data measurements from to the two target 8-bit slave address: DATA LSB and DATA HSB of VEML6070 sensor on UV 3 Click.
uint8_t uv3_risk_level | ( | uint16_t | uv_data | ) |
Calculate UV risk level function.
uv_data | 16-bit uv data for calculate. |
Risk level - 1: Low UV radiation; - 2: Moderate UV radiation; - 3: High UV radiation; - 4: Very High UV radiation; - 5: Extreme UV radiation;
@description Function calculate UV risk level of VEML6070 sensor on UV 3 Click.
void uv3_set_integration_time | ( | uv3_t * | ctx, |
uint8_t | int_data ) |
Set integration time function.
ctx | Click object. |
it_data |
Integration time data: - 0x00 : 1/2 T ( 62.5 ms or 125 ms ); - 0x04 : 1 T ( 125 ms or 250 ms ); - 0x08 : 2 T ( 250 ms or 500 ms ); - 0x0C : 4 T ( 500 ms or 1000 ms );
@description Function set integration time function by write it data to the target 8-bit write slave address of VEML6070 sensor on UV 3 Click.
void uv3_write_command | ( | uv3_t * | ctx, |
uint8_t | slave_addr, | ||
uint8_t | command ) |
Write function.
ctx | Click object. |
slave_addr | Slave address. |
command | Command to be written. |
@description Function write the 8-bit of data to the target 8-bit write slave address of VEML6070 sensor on UV 3 Click.