uva 2.0.0.0
uva.h File Reference

This file contains API for UVA Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"

Go to the source code of this file.

Data Structures

struct  uva_t
 UVA Click context object. More...
 
struct  uva_cfg_t
 UVA Click configuration object. More...
 

Macros

#define UVA_REG_CHIP_ID   0x00
 UVA Register Map.
 
#define UVA_REG_MODE   0x01
 
#define UVA_REG_RES_UV   0x04
 
#define UVA_REG_RANGE_UVA   0x05
 
#define UVA_REG_MODE_CTRL   0x0A
 
#define UVA_REG_SOFT_RESET   0x0B
 
#define UVA_REG_UVA_LSB   0x15
 
#define UVA_REG_UVA_MSB   0x16
 
#define UVA_REG_NVM_READ_CTRL   0x30
 
#define UVA_REG_NVM_MSB   0x31
 
#define UVA_REG_NVM_LSB   0x32
 
#define UVA_CHIP_ID   0x62
 UVA chip ID value.
 
#define UVA_MODE_NO_OPERATION   0x00
 UVA mode register setting.
 
#define UVA_MODE_UVA_OPERATION   0x10
 
#define UVA_MODE_NORMAL   0x00
 
#define UVA_MODE_LOW_POWER   0x01
 
#define UVA_MODE_AUTO_SHUTDOWN   0x02
 
#define UVA_MODE_SHUTDOWN   0x03
 
#define UVA_RESOLUTION_800MS   0x00
 UVA resolution register setting.
 
#define UVA_RESOLUTION_400MS   0x01
 
#define UVA_RESOLUTION_200MS   0x02
 
#define UVA_RESOLUTION_100MS   0x03
 
#define UVA_RANGE_X1   0x00
 UVA range register setting.
 
#define UVA_RANGE_X2   0x01
 
#define UVA_RANGE_X4   0x02
 
#define UVA_RANGE_X8   0x03
 
#define UVA_RANGE_X16   0x04
 
#define UVA_RANGE_X32   0x05
 
#define UVA_RANGE_X64   0x06
 
#define UVA_RANGE_X128   0x07
 
#define UVA_MODE_CTRL_SLEEP_2_TIMES   0x00
 UVA mode control register setting.
 
#define UVA_MODE_CTRL_SLEEP_4_TIMES   0x01
 
#define UVA_MODE_CTRL_SLEEP_8_TIMES   0x02
 
#define UVA_MODE_CTRL_SLEEP_16_TIMES   0x03
 
#define UVA_MODE_CTRL_SLEEP_32_TIMES   0x04
 
#define UVA_MODE_CTRL_SLEEP_64_TIMES   0x05
 
#define UVA_MODE_CTRL_SLEEP_128_TIMES   0x06
 
#define UVA_MODE_CTRL_SLEEP_256_TIMES   0x07
 
#define UVA_SOFT_RESET   0xA5
 UVA Soft Reset value.
 
#define UVA_NVM_READ_ADDRESS_OFFSET   0x0A
 UVA NVM read address values.
 
#define UVA_NVM_READ_ADDRESS_A_SCALE   0x0B
 
#define UVA_SET_DEV_ADDR   0x39
 UVA device address setting.
 
#define UVA_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  uva_return_value_t { UVA_OK = 0 , UVA_ERROR = -1 }
 UVA Click return value data. More...
 

Functions

void uva_cfg_setup (uva_cfg_t *cfg)
 UVA configuration object setup function.
 
err_t uva_init (uva_t *ctx, uva_cfg_t *cfg)
 UVA initialization function.
 
err_t uva_default_cfg (uva_t *ctx)
 UVA default configuration function.
 
err_t uva_generic_write (uva_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len)
 UVA I2C writing function.
 
err_t uva_generic_read (uva_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len)
 UVA I2C reading function.
 
err_t uva_write_register (uva_t *ctx, uint8_t reg, uint8_t data_in)
 UVA write register function.
 
err_t uva_read_register (uva_t *ctx, uint8_t reg, uint8_t *data_out)
 UVA read register function.
 
err_t uva_check_communication (uva_t *ctx)
 UVA check communication function.
 
err_t uva_read_data (uva_t *ctx, uint16_t *uva_data)
 UVA read data function.
 
err_t uva_soft_reset (uva_t *ctx)
 UVA soft reset function.
 

Detailed Description

This file contains API for UVA Click Driver.

Enumeration Type Documentation

◆ uva_return_value_t

UVA Click return value data.

Predefined enum values for driver return values.

Enumerator
UVA_OK 
UVA_ERROR