ambient3 2.0.0.0
Public function

Functions

void ambient3_cfg_setup (ambient3_cfg_t *cfg)
 Config Object Initialization function.
 
AMBIENT3_RETVAL ambient3_init (ambient3_t *ctx, ambient3_cfg_t *cfg)
 Initialization function.
 
void ambient3_default_cfg (ambient3_t *ctx)
 Default Config Initialization function.
 
void ambient3_write_byte (ambient3_t *ctx, uint8_t virtual_reg, uint8_t data_buf)
 Write function.
 
uint8_t ambient3_read_byte (ambient3_t *ctx, uint8_t virtual_reg)
 Read function.
 
void ambient3_hardware_reset (ambient3_t *ctx)
 Hardware reset function.
 
uint8_t ambient3_get_device_temperature (ambient3_t *ctx)
 Getting temperature function.
 
uint16_t ambient3_get_data_in_lux (ambient3_t *ctx)
 This function reads data in LUX.
 
uint16_t ambient3_get_cct_data (ambient3_t *ctx)
 This function reads CCT data in K.
 
uint8_t ambient3_get_interrupt (ambient3_t *ctx)
 This function reads interrupt state.
 

Detailed Description

Function Documentation

◆ ambient3_cfg_setup()

void ambient3_cfg_setup ( ambient3_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.

◆ ambient3_default_cfg()

void ambient3_default_cfg ( ambient3_t * ctx)

Default Config Initialization function.

Parameters
ctxClick object.

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

◆ ambient3_get_cct_data()

uint16_t ambient3_get_cct_data ( ambient3_t * ctx)

This function reads CCT data in K.

Parameters
ctxClick object.
Returns
Value for sensed CCT in Kelvin.

@description This function create a 16 bit integer value for sensed CCT (Kelvin).

◆ ambient3_get_data_in_lux()

uint16_t ambient3_get_data_in_lux ( ambient3_t * ctx)

This function reads data in LUX.

Parameters
ctxClick object.
Returns
Light data in the LUX.

@description This function reads data in LUX value.

◆ ambient3_get_device_temperature()

uint8_t ambient3_get_device_temperature ( ambient3_t * ctx)

Getting temperature function.

Parameters
ctxClick object.
Returns
Device temperature in Celsius.

@description This function reads device temperature.

◆ ambient3_get_interrupt()

uint8_t ambient3_get_interrupt ( ambient3_t * ctx)

This function reads interrupt state.

Parameters
ctxClick object.
Returns
State INT pins.

@description This function reads interrupt state.

◆ ambient3_hardware_reset()

void ambient3_hardware_reset ( ambient3_t * ctx)

Hardware reset function.

Parameters
ctxClick object.

@description This function sets rst_pin to high.

◆ ambient3_init()

AMBIENT3_RETVAL ambient3_init ( ambient3_t * ctx,
ambient3_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ ambient3_read_byte()

uint8_t ambient3_read_byte ( ambient3_t * ctx,
uint8_t virtual_reg )

Read function.

Parameters
ctxClick object.
virtual_regRegister address.
Returns
Read byte.

@description This function reads byte from the desired register.

◆ ambient3_write_byte()

void ambient3_write_byte ( ambient3_t * ctx,
uint8_t virtual_reg,
uint8_t data_buf )

Write function.

Parameters
ctxClick object.
virtual_regRegister address.
data_bufData buf to be written.

@description This function writes one byte to the desired register.