ambient10 2.0.0.0
ambient10.h File Reference

This file contains API for Ambient 10 Click Driver. More...

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

Go to the source code of this file.

Data Structures

struct  ambient10_t
 Ambient 10 Click context object. More...
 
struct  ambient10_cfg_t
 Ambient 10 Click configuration object. More...
 

Macros

#define AMBIENT10_SET_DEV_ADDR   0x4D
 Ambient 10 device address setting.
 
#define AMBIENT10_ADC_RESOLUTION   0x0FFF
 Ambient 10 ADC setting.
 
#define AMBIENT10_VREF_3V3   3.3
 
#define AMBIENT10_VREF_5V   5.0
 
#define AMBIENT10_MICROAMPER_TO_AMPER   0.000001
 Ambient 10 ambient light constants.
 
#define AMBIENT10_IOUT_TO_LUX   2.5
 
#define AMBIENT10_IOUT_RESISTOR   5100
 
#define AMBIENT10_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  ambient10_return_value_t { AMBIENT10_OK = 0 , AMBIENT10_ERROR = -1 }
 Ambient 10 Click return value data. More...
 

Functions

void ambient10_cfg_setup (ambient10_cfg_t *cfg)
 Ambient 10 configuration object setup function.
 
err_t ambient10_init (ambient10_t *ctx, ambient10_cfg_t *cfg)
 Ambient 10 initialization function.
 
err_t ambient10_read_an_pin_value (ambient10_t *ctx, uint16_t *data_out)
 Ambient 10 read AN pin value function.
 
err_t ambient10_read_an_pin_voltage (ambient10_t *ctx, float *data_out)
 Ambient 10 read AN pin voltage level function.
 
err_t ambient10_read_raw_adc (ambient10_t *ctx, uint16_t *raw_adc)
 Ambient 10 read raw ADC function.
 
err_t ambient10_read_adc_voltage (ambient10_t *ctx, float *voltage)
 Ambient 10 read ADC voltage function.
 
err_t ambient10_set_vref (ambient10_t *ctx, float vref)
 Ambient 10 set vref function.
 
uint16_t ambient10_voltage_to_lux (ambient10_t *ctx, float voltage)
 Ambient 10 voltage to illuminance function.
 

Detailed Description

This file contains API for Ambient 10 Click Driver.

Enumeration Type Documentation

◆ ambient10_return_value_t

Ambient 10 Click return value data.

Predefined enum values for driver return values.

Enumerator
AMBIENT10_OK 
AMBIENT10_ERROR