mirror of
https://github.com/eclipse/upm.git
synced 2025-03-15 04:57:30 +03:00
VEML6070: Adding back documentation
Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
This commit is contained in:
parent
b4bc15201b
commit
a56b83fa37
@ -61,12 +61,39 @@ extern "C" {
|
||||
uint8_t i2c_bus_number;
|
||||
} *veml6070_context;
|
||||
|
||||
/**
|
||||
* VEML6070 Initialization function
|
||||
*
|
||||
* @param bus I2C bus to use
|
||||
* @param address I2C address to use
|
||||
*
|
||||
* @return device context pointer
|
||||
*/
|
||||
veml6070_context veml6070_init(uint8_t bus);
|
||||
|
||||
/**
|
||||
* VEML6070 Close function
|
||||
*
|
||||
* @param dev veml6070_context pointer
|
||||
*/
|
||||
void veml6070_close(veml6070_context dev);
|
||||
|
||||
/**
|
||||
* Function to get the UV values
|
||||
*
|
||||
* @param dev veml6070_context pointer
|
||||
* @return int16_t UV value
|
||||
*/
|
||||
int16_t veml6070_get_uv_intensity(veml6070_context dev);
|
||||
|
||||
/**
|
||||
* Function to set the integration time of the sensor
|
||||
*
|
||||
* @param dev veml6070_context pointer
|
||||
* @param time veml6070_integration_time_t
|
||||
*
|
||||
* @return upm_result_t
|
||||
*/
|
||||
upm_result_t veml6070_set_integration_time(veml6070_context dev, veml6070_integration_time_t time);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -27,7 +27,45 @@
|
||||
#include "veml6070.h"
|
||||
|
||||
namespace upm {
|
||||
/**
|
||||
* @defgroup veml6070 libupm-veml6070
|
||||
* @ingroup vishay i2c light
|
||||
*/
|
||||
|
||||
/**
|
||||
* @library veml6070
|
||||
* @sensor veml6070
|
||||
* @comname Vishay VEML6070 UV Sensor
|
||||
* @type other
|
||||
* @man Vishay
|
||||
* @web http://www.vishay.com/docs/84277/veml6070.pdf
|
||||
* @con i2c
|
||||
* @kit other
|
||||
*
|
||||
* @brief API for the Vishay VEML6070 UV Sensor
|
||||
*
|
||||
* VEML6070 is an advanced ultraviolet (UV) light sensor with
|
||||
* I2C protocol interface and designed by the CMOS process.
|
||||
* It is easily operated via a simple I2C command. The active
|
||||
* acknowledge (ACK) feature with threshold windows setting
|
||||
* allows the UV sensor to send out a UVI alert message.
|
||||
* Under a strong solar UVI condition, the smart ACK signal
|
||||
* can be easily implemented by the software programming.
|
||||
* VEML6070 incorporates a photodiode, amplifiers, and
|
||||
* analog / digital circuits into a single chip. VEML6070's
|
||||
* adoption of FiltronTM UV technology provides the best
|
||||
* spectral sensitivity to cover UV spectrum sensing. It has an
|
||||
* excellent temperature compensation and a robust refresh
|
||||
* rate setting that does not use an external RC low pass filter.
|
||||
* VEML6070 has linear sensitivity to solar UV light and is
|
||||
* easily adjusted by an external resistor. Software shutdown
|
||||
* mode is provided, which reduces power consumption to be
|
||||
* less than 1 uA. VEML6070's operating voltage ranges from
|
||||
* 2.7 V to 5.5 V.
|
||||
*
|
||||
* @image html veml6070.jpg
|
||||
* @snippet veml6070.cxx Interesting
|
||||
*/
|
||||
class VEML6070 {
|
||||
|
||||
public:
|
||||
@ -43,8 +81,26 @@ namespace upm {
|
||||
*/
|
||||
~VEML6070();
|
||||
|
||||
/**
|
||||
* Function to get the UV value.
|
||||
*
|
||||
* @return int16_t UV value
|
||||
*/
|
||||
int getUVIntensity();
|
||||
|
||||
/**
|
||||
* Function to allow the user to set the intergration time
|
||||
* for the sensor.
|
||||
* Integration time:
|
||||
* Bit Setting | Description | RSet
|
||||
* IT1 IT0 | | 300 k-ohms | 600 k-ohms
|
||||
* 0 0 | 1/2T | 62.5 ms | 125 ms
|
||||
* 0 1 | 1T | 125 ms | 250 ms
|
||||
* 1 0 | 2T | 250 ms | 500 ms
|
||||
* 1 1 | 4T | 500 ms | 1000 ms
|
||||
*
|
||||
* @param time veml6070_integration_time_t
|
||||
*/
|
||||
void setIntegrationTime(veml6070_integration_time_t time);
|
||||
|
||||
private:
|
||||
|
Loading…
x
Reference in New Issue
Block a user