ambient4 2.0.0.0
Public function

Functions

void ambient4_cfg_setup (ambient4_cfg_t *cfg)
 Config Object Initialization function.
 
AMBIENT4_RETVAL ambient4_init (ambient4_t *ctx, ambient4_cfg_t *cfg)
 Initialization function.
 
void ambient4_default_cfg (ambient4_t *ctx)
 Click Default Configuration function.
 
void ambient4_generic_write (ambient4_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void ambient4_generic_read (ambient4_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void ambient4_send_command (ambient4_t *ctx, uint8_t cmd)
 Function for send command.
 
uint16_t ambient4_read_data (ambient4_t *ctx)
 Function for read 16bit data.
 
void ambient4_device_reset (ambient4_t *ctx)
 Function for device reset.
 

Detailed Description

Function Documentation

◆ ambient4_cfg_setup()

void ambient4_cfg_setup ( ambient4_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.

◆ ambient4_default_cfg()

void ambient4_default_cfg ( ambient4_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for Ambient4 click.

◆ ambient4_device_reset()

void ambient4_device_reset ( ambient4_t * ctx)

Function for device reset.

Parameters
ctxClick object.

@description This function for device reset.

◆ ambient4_generic_read()

void ambient4_generic_read ( ambient4_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.

◆ ambient4_generic_write()

void ambient4_generic_write ( ambient4_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.

◆ ambient4_init()

AMBIENT4_RETVAL ambient4_init ( ambient4_t * ctx,
ambient4_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ ambient4_read_data()

uint16_t ambient4_read_data ( ambient4_t * ctx)

Function for read 16bit data.

Parameters
ctxClick object.

@description This function for read 16bit data.

◆ ambient4_send_command()

void ambient4_send_command ( ambient4_t * ctx,
uint8_t cmd )

Function for send command.

Parameters
ctxClick object.
cmdCommand.

@description This function for send command.