Interface definition for the OPT3001 sensor driver. More...

Detailed Description

Interface definition for the OPT3001 sensor driver.

Author
Jannes Volkens janne.nosp@m.s.vo.nosp@m.lkens.nosp@m.@haw.nosp@m.-hamb.nosp@m.urg..nosp@m.de

Definition in file opt3001.h.

#include <stdint.h>
#include "periph/i2c.h"
#include "kernel_defines.h"
+ Include dependency graph for opt3001.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  opt3001_params_t
 Parameters needed for device initialization. More...
 
struct  opt3001_t
 Device descriptor for OPT3001 sensors. More...
 

Macros

#define CONFIG_OPT3001_I2C_ADDRESS   (0x45)
 OPT3001 Default Address. More...
 
#define CONFIG_OPT3001_CONVERSION_TIME   OPT3001_CONVERSION_TIME_800_MS
 OPT3001 Default conversion time. More...
 

Enumerations

enum  { OPT3001_OK, OPT3001_ERROR_BUS, OPT3001_ERROR_DEV, OPT3001_ERROR }
 OPT3001 specific return values. More...
 

Functions

int opt3001_init (opt3001_t *dev, const opt3001_params_t *params)
 Initialize the OPT3001 sensor driver. More...
 
int opt3001_reset (const opt3001_t *dev)
 Reset the OPT3001 sensor while simultaneous deactivating measurements. More...
 
int opt3001_set_active (const opt3001_t *dev)
 Set active mode, this enables periodic measurements. More...
 
int opt3001_read_lux (const opt3001_t *dev, uint32_t *convl)
 Read sensor's raw data and convert it to milliLux. More...
 

Conversion time

#define OPT3001_CONVERSION_TIME_100_MS   (0x0000)
 Conversion time of 100ms.
 
#define OPT3001_CONVERSION_TIME_800_MS   (0x0800)
 Conversion time of 800ms.