Device driver interface for the ISL29125 RGB light sensor. More...

Detailed Description

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

Go to the source code of this file.

Data Structures

struct  isl29125_rgb_t
 Data type for storing lux RGB sensor readings. More...
 
struct  isl29125_params_t
 Device parameters for ISL29125 sensors. More...
 
struct  isl29125_t
 Device descriptor for ISL29125 sensors. More...
 

Enumerations

enum  isl29125_mode_t {
  ISL29125_MODE_DOWN = 0x00, ISL29125_MODE_STANDBY = 0x04, ISL29125_MODE_RGB = 0x05, ISL29125_MODE_R = 0x02,
  ISL29125_MODE_G = 0x01, ISL29125_MODE_B = 0x03, ISL29125_MODE_RG = 0x06, ISL29125_MODE_GB = 0x07
}
 Supported operation modes of the ISL29125 sensor's AD conversion. More...
 
enum  isl29125_range_t { ISL29125_RANGE_375 = 0x00, ISL29125_RANGE_10K = 0x08 }
 Supported RGB sensing range values of the ISL29125 sensor. More...
 
enum  isl29125_resolution_t { ISL29125_RESOLUTION_12 = 0x10, ISL29125_RESOLUTION_16 = 0x00 }
 Supported color resolutions of the ISL29125 sensor's AD conversion. More...
 
enum  isl29125_interrupt_status_t { ISL29125_INTERRUPT_STATUS_NONE = 0x00, ISL29125_INTERRUPT_STATUS_GREEN = 0x01, ISL29125_INTERRUPT_STATUS_RED = 0x02, ISL29125_INTERRUPT_STATUS_BLUE = 0x03 }
 Configuration-3 Register 0x03 B1:0. More...
 
enum  isl29125_interrupt_persist_t { ISL29125_INTERRUPT_PERSIST_1 = (0x00 << 2), ISL29125_INTERRUPT_PERSIST_2 = (0x01 << 2), ISL29125_INTERRUPT_PERSIST_4 = (0x02 << 2), ISL29125_INTERRUPT_PERSIST_8 = (0x03 << 2) }
 Configuration-3 Register 0x03 B3:2. More...
 
enum  isl29125_interrupt_conven_t { ISL29125_INTERRUPT_CONV_DIS = (0x0 << 4), ISL29125_INTERRUPT_CONV_EN = (0x1 << 4) }
 Configuration-3 Register 0x03 B4. More...
 

Functions

int isl29125_init (isl29125_t *dev, const isl29125_params_t *params)
 Initialize a new ISL29125 device. More...
 
int isl29125_init_int (isl29125_t *dev, isl29125_interrupt_status_t interrupt_status, isl29125_interrupt_persist_t interrupt_persist, isl29125_interrupt_conven_t interrupt_conven, uint16_t lower_threshold, uint16_t higher_threshold, gpio_cb_t cb, void *arg)
 Initialize interrupts. More...
 
void isl29125_read_rgb_lux (const isl29125_t *dev, isl29125_rgb_t *dest)
 Read RGB values from device. More...
 
void isl29125_read_rgb_color (const isl29125_t *dev, color_rgb_t *dest)
 Read color values from device. More...
 
void isl29125_set_mode (const isl29125_t *dev, isl29125_mode_t mode)
 Set the device's operation mode. More...
 
int isl29125_read_irq_status (const isl29125_t *dev)
 Read isl29125 interrupt status. More...