ambient11  2.0.0.0
Functions

Functions

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

Detailed Description

Function Documentation

◆ ambient11_calc_illumination()

float ambient11_calc_illumination ( ambient11_t ctx,
float  typical_res 
)

Calculate Illumination function.

Parameters
[in]typical_resfloat value that defines resolution
Returns
lx_val float value that shows illumination in lux

@description Function is used to calculate ambiental illumination.

Note
The devices resolution depends on settings applied. User should consult the datasheet and choose resolution value that corresponds to the settings applied.

◆ ambient11_cfg_setup()

void ambient11_cfg_setup ( ambient11_cfg_t cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ ambient11_check_int()

uint8_t ambient11_check_int ( ambient11_t ctx)

Check interrupt function.

Returns
0 - Interrupt has occured / 1 - Interrupt has not occured

@description Function checks interrupt occurence.

◆ ambient11_default_cfg()

void ambient11_default_cfg ( ambient11_t ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for Ambient11 click.

◆ ambient11_generic_read()

uint16_t ambient11_generic_read ( ambient11_t ctx,
uint8_t  reg_addr 
)

Generic read function.

Parameters
ctxClick object.
regRegister address.
data_bufOutput data buf
lenNumber of the bytes to be read

@description This function reads data from the desired register.

◆ ambient11_generic_write()

void ambient11_generic_write ( ambient11_t ctx,
uint8_t  wr_cmd,
uint16_t  wr_data 
)

Generic write function.

Parameters
ctxClick object.
regRegister address.
data_bufData buf to be written.
lenNumber of the bytes in data buf.

@description This function writes data to the desired register.

◆ ambient11_init()

AMBIENT11_RETVAL ambient11_init ( ambient11_t ctx,
ambient11_cfg_t cfg 
)

Initialization function.

Parameters
ambient11Click object.
cfgClick configuration structure.

@description This function initializes all necessary pins and peripherals used for this click.