px-fwlib 0.10.0
Cross-platform embedded library and documentation for 8/16/32-bit microcontrollers generated with Doxygen 1.9.2
px_veml6075.h : Vishay VEML6075 UV light sensor driver

Description

File(s):

Reference:

Data Structures

struct  px_veml6075_data_t
 Raw sensor data. More...
 

Macros

#define PX_VEML6075_I2C_SLA_ADR   0x10
 VEML6075 I2C Slave address. More...
 

Functions

bool px_veml6075_init (px_i2c_handle_t *handle)
 Initialise driver. More...
 
bool px_veml6075_meas (px_veml6075_data_t *data)
 Take UVA & UVB measurement. More...
 
float px_veml6075_uva (const px_veml6075_data_t *data)
 Calculate UVA from raw sensor data. More...
 
float px_veml6075_uvb (const px_veml6075_data_t *data)
 Calculate UVB from raw sensor data. More...
 
float px_veml6075_uvi (const px_veml6075_data_t *data)
 Calculate UVI from raw sensor data. More...
 

Data Structure Documentation

◆ px_veml6075_data_t

struct px_veml6075_data_t

Raw sensor data.

Definition at line 51 of file px_veml6075.h.

Macro Definition Documentation

◆ PX_VEML6075_I2C_SLA_ADR

#define PX_VEML6075_I2C_SLA_ADR   0x10

VEML6075 I2C Slave address.

Definition at line 47 of file px_veml6075.h.

Function Documentation

◆ px_veml6075_init()

bool px_veml6075_init ( px_i2c_handle_t handle)

Initialise driver.

Parameters
handleI2C handle of device
Return values
trueDevice detected on I2C and ID value is correct
falseDevice not detected on I2C bus

Definition at line 120 of file px_veml6075.c.

◆ px_veml6075_meas()

bool px_veml6075_meas ( px_veml6075_data_t data)

Take UVA & UVB measurement.

Parameters
dataPointer to structure to contain sensor data
Return values
trueMeasurement made
falseFailure

Definition at line 165 of file px_veml6075.c.

◆ px_veml6075_uva()

float px_veml6075_uva ( const px_veml6075_data_t data)

Calculate UVA from raw sensor data.

Parameters
dataPointer to raw sensor data
Returns
float UVA

Definition at line 207 of file px_veml6075.c.

◆ px_veml6075_uvb()

float px_veml6075_uvb ( const px_veml6075_data_t data)

Calculate UVB from raw sensor data.

Parameters
dataPointer to raw sensor data
Returns
float UVB

Definition at line 218 of file px_veml6075.c.

◆ px_veml6075_uvi()

float px_veml6075_uvi ( const px_veml6075_data_t data)

Calculate UVI from raw sensor data.

Parameters
dataPointer to raw sensor data
Returns
float UVI

Definition at line 229 of file px_veml6075.c.