ambient9 2.0.0.0
Public function

Functions

void ambient9_cfg_setup (ambient9_cfg_t *cfg)
 Config Object Initialization function.
 
AMBIENT9_RETVAL ambient9_init (ambient9_t *ctx, ambient9_cfg_t *cfg)
 Initialization function.
 
void ambient9_generic_write (ambient9_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void ambient9_generic_read (ambient9_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
uint8_t ambient9_get_int_status (ambient9_t *ctx)
 Generic function for getting int pin status.
 
uint32_t ambient9_als_data (ambient9_t *ctx)
 Generic function for reading ALS data from sensor.
 
uint16_t ambient9_proxy_data (ambient9_t *ctx)
 Generic function for reading proximity data from sensor.
 
void ambient9_enable_data (ambient9_t *ctx, uint8_t als_ps)
 Function for enabeling sensor for ALS or proximity.
 

Detailed Description

Function Documentation

◆ ambient9_als_data()

uint32_t ambient9_als_data ( ambient9_t * ctx)

Generic function for reading ALS data from sensor.

Parameters
ctxClick object.
Returns
Sensor data

◆ ambient9_cfg_setup()

void ambient9_cfg_setup ( ambient9_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.

◆ ambient9_enable_data()

void ambient9_enable_data ( ambient9_t * ctx,
uint8_t als_ps )

Function for enabeling sensor for ALS or proximity.

Parameters
ctxClick object.
als_psAls or proximiy macro

◆ ambient9_generic_read()

void ambient9_generic_read ( ambient9_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

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.

◆ ambient9_generic_write()

void ambient9_generic_write ( ambient9_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

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.

◆ ambient9_get_int_status()

uint8_t ambient9_get_int_status ( ambient9_t * ctx)

Generic function for getting int pin status.

Parameters
ctxClick object.
Returns
Interrupt pin status

◆ ambient9_init()

AMBIENT9_RETVAL ambient9_init ( ambient9_t * ctx,
ambient9_cfg_t * cfg )

Initialization function.

Parameters
ambient9Click object.
cfgClick configuration structure.

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

◆ ambient9_proxy_data()

uint16_t ambient9_proxy_data ( ambient9_t * ctx)

Generic function for reading proximity data from sensor.

Parameters
ctxClick object.
Returns
Sensor data