Device driver for the ISL29020 light sensor. More...

Detailed Description

Device driver for the ISL29020 light sensor.

This driver provides [S]ensor [A]ctuator [U]ber [L]ayer capabilities.

Modules

 ISL29020 light sensor driver compile configuration
 

Files

file  isl29020.h
 Device driver interface for the ISL29020 light sensor.
 
file  isl29020-internal.h
 Definitions for the ISL29020 light sensor.
 
file  isl29020_params.h
 Default configuration for ISL29020 devices.
 

Data Structures

struct  isl29020_params_t
 Data structure holding the full set of configuration parameters. More...
 
struct  isl29020_t
 Device descriptor for ISL29020 sensors. More...
 

Enumerations

enum  isl29020_mode_t { ISL29020_MODE_AMBIENT = 0, ISL29020_MODE_IR = 1 }
 Possible modes for the ISL29020 sensor. More...
 
enum  isl29020_range_t { ISL29020_RANGE_1K = 0, ISL29020_RANGE_4K = 1, ISL29020_RANGE_16K = 2, ISL29020_RANGE_64K = 3 }
 Possible range values for the ISL29020 sensor. More...
 

Functions

int isl29020_init (isl29020_t *dev, const isl29020_params_t *params)
 Initialize a new ISL29020 device. More...
 
int isl29020_read (const isl29020_t *dev)
 Read a lighting value from the sensor, the result is given in lux. More...
 
int isl29020_enable (const isl29020_t *dev)
 Enable the given sensor. More...
 
int isl29020_disable (const isl29020_t *dev)
 Disable the given sensor. More...
 

Enumeration Type Documentation

◆ isl29020_mode_t

Possible modes for the ISL29020 sensor.

Enumerator
ISL29020_MODE_AMBIENT 

set sensor to detect ambient light

ISL29020_MODE_IR 

set sensor to detect infrared light

Definition at line 54 of file isl29020.h.

◆ isl29020_range_t

Possible range values for the ISL29020 sensor.

Enumerator
ISL29020_RANGE_1K 

set range to 0-1000 lux

ISL29020_RANGE_4K 

set range to 0-4000 lux

ISL29020_RANGE_16K 

set range to 0-16000 lux

ISL29020_RANGE_64K 

set range to 0-64000 lux

Definition at line 62 of file isl29020.h.

Function Documentation

◆ isl29020_disable()

int isl29020_disable ( const isl29020_t dev)

Disable the given sensor.

Parameters
[in]devdevice descriptor of an ISL29020 device
Returns
0 on success
-1 on error

◆ isl29020_enable()

int isl29020_enable ( const isl29020_t dev)

Enable the given sensor.

Parameters
[in]devdevice descriptor of an ISL29020 device
Returns
0 on success
-1 on error

◆ isl29020_init()

int isl29020_init ( isl29020_t dev,
const isl29020_params_t params 
)

Initialize a new ISL29020 device.

Parameters
[in]devdevice descriptor of an ISL29020 device
[in]paramsinitialization parameters
Returns
0 on success
-1 on error

◆ isl29020_read()

int isl29020_read ( const isl29020_t dev)

Read a lighting value from the sensor, the result is given in lux.

Parameters
[in]devdevice descriptor of an ISL29020 device
Returns
the measured brightness in lux
-1 on error