ambient11 2.0.0.0
ambient11.h File Reference

This file contains API for Ambient 11 Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"

Go to the source code of this file.

Data Structures

struct  ambient11_t
 Click ctx object definition. More...
 
struct  ambient11_cfg_t
 Click configuration structure definition. More...
 

Macros

#define AMBIENT11_MAP_MIKROBUS(cfg, mikrobus)
 
#define AMBIENT11_RETVAL   uint8_t
 
#define AMBIENT11_OK   0x00
 
#define AMBIENT11_INIT_ERROR   0xFF
 
#define AMBIENT11_SLAVE_ADDRESS   0x29
 
#define AMBIENT11_ALS_CONF_WR   0x00
 
#define AMBIENT11_TRSHLD_WINDOW_SET_HIGH   0x01
 
#define AMBIENT11_TRSHLD_WINDOW_SET_LOW   0x02
 
#define AMBIENT11_ALS_CONF_RD   0x04
 
#define AMBIENT11_WHITE_VAL   0x05
 
#define AMBIENT11_TRSHLD_TRIG_INT   0x06
 
#define AMBIENT11_ALS_CONF_SENS_LOW   0x1000
 
#define AMBIENT11_ALS_CONF_DG_DOUBLE   0x0800
 
#define AMBIENT11_ALS_CONF_GAIN_DOUBLE_SENS   0x0400
 
#define AMBIENT11_ALS_CONF_IT_25   0x0300
 
#define AMBIENT11_ALS_CONF_IT_50   0x0200
 
#define AMBIENT11_ALS_CONF_IT_100   0x0000
 
#define AMBIENT11_ALS_CONF_IT_200   0x0040
 
#define AMBIENT11_ALS_CONF_IT_400   0x0080
 
#define AMBIENT11_ALS_CONF_IT_800   0x00C0
 
#define AMBIENT11_ALS_CONF_PERS_1   0x0000
 
#define AMBIENT11_ALS_CONF_PERS_2   0x0010
 
#define AMBIENT11_ALS_CONF_PERS_4   0x0020
 
#define AMBIENT11_ALS_CONF_PERS_8   0x0030
 
#define AMBIENT11_ALS_CONF_INT_CHAN   0x0008
 
#define AMBIENT11_ALS_CONF_CHAN_EN   0x0004
 
#define AMBIENT11_ALS_CONF_INT_EN   0x0002
 
#define AMBIENT11_ALS_CONF_SHUT_DOWN   0x0001
 

Functions

void ambient11_cfg_setup (ambient11_cfg_t *cfg)
 Config Object Initialization function.
 
AMBIENT11_RETVAL ambient11_init (ambient11_t *ctx, ambient11_cfg_t *cfg)
 Initialization function.
 
void ambient11_default_cfg (ambient11_t *ctx)
 Click Default Configuration function.
 
void ambient11_generic_write (ambient11_t *ctx, uint8_t wr_cmd, uint16_t wr_data)
 Generic write function.
 
uint16_t ambient11_generic_read (ambient11_t *ctx, uint8_t reg_addr)
 Generic read function.
 
float ambient11_calc_illumination (ambient11_t *ctx, float typical_res)
 Calculate Illumination function.
 
uint8_t ambient11_check_int (ambient11_t *ctx)
 Check interrupt function.
 

Detailed Description

This file contains API for Ambient 11 Click driver.