uv3
2.0.0.0
|
Functions | |
void | uv3_cfg_setup (uv3_cfg_t *cfg) |
Config Object Initialization function. More... | |
UV3_RETVAL | uv3_init (uv3_t *ctx, uv3_cfg_t *cfg) |
Initialization function. More... | |
void | uv3_default_cfg (uv3_t *ctx) |
Click Default Configuration function. More... | |
void | uv3_write_command (uv3_t *ctx, uint8_t slave_addr, uint8_t command) |
Write function. More... | |
uint8_t | uv3_read_byte (uv3_t *ctx, uint8_t slave_addr) |
Read function. More... | |
void | uv3_clear_ack (uv3_t *ctx) |
Read ARA to clear interrupt function. More... | |
void | uv3_enable_sensor (uv3_t *ctx) |
Enable sensor function. More... | |
void | uv3_disable_mode (uv3_t *ctx) |
Disable sensor function. More... | |
void | uv3_set_integration_time (uv3_t *ctx, uint8_t int_data) |
Set integration time function. More... | |
uint16_t | uv3_read_measurements (uv3_t *ctx) |
Get UV data measurements function. More... | |
uint8_t | uv3_risk_level (uint16_t uv_data) |
Calculate UV risk level function. More... | |
uint8_t | uv3_get_interrupt (uv3_t *ctx) |
Get state of interrupt pin function. More... | |
void uv3_cfg_setup | ( | uv3_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
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. |
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. |
This function executes default configuration for Uv3 click.
void uv3_disable_mode | ( | uv3_t * | ctx | ) |
Disable sensor function.
ctx | Click object. |
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. |
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. |
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. |
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. |
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. |
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
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:
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. |
Function write the 8-bit of data to the target 8-bit write slave address of VEML6070 sensor on UV 3 Click.