temphum9  2.0.0.0
Functions

Functions

void temphum9_cfg_setup (temphum9_cfg_t *cfg)
 Config Object Initialization function. More...
 
TEMPHUM9_RETVAL temphum9_init (temphum9_t *ctx, temphum9_cfg_t *cfg)
 Initialization function. More...
 
void temphum9_default_cfg (temphum9_t *ctx)
 Click Default Configuration function. More...
 
void temphum9_generic_write (temphum9_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function. More...
 
void temphum9_generic_read (temphum9_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function. More...
 
void temphum9_read_register (temphum9_t *ctx, uint16_t register_address, uint8_t n_data_, uint16_t *register_buffer)
 Readinig register content. More...
 
void temphum9_send_command (temphum9_t *ctx, uint16_t command)
 Issuing a command. More...
 
float temphum9_get_temperature (temphum9_t *ctx, uint8_t data_mode)
 Calculating temperature. More...
 
float temphum9_get_relative_humidity (temphum9_t *ctx, uint8_t data_mode)
 Calculating relative humidity. More...
 
void temhum9_get_temperature_and_humidity (temphum9_t *ctx, uint8_t data_mode, float *measurement_data)
 Calculating temperature and relative humidity. More...
 

Detailed Description

Function Documentation

◆ temhum9_get_temperature_and_humidity()

void temhum9_get_temperature_and_humidity ( temphum9_t ctx,
uint8_t  data_mode,
float *  measurement_data 
)

Calculating temperature and relative humidity.

Parameters
ctxClick object.
datamode to be used for measurement (normal or low power mode)
measurement_datameasurend data is stored into this array @description This function performs temperature and relative humidity measurement and calculates temperature and relative humidity

◆ temphum9_cfg_setup()

void temphum9_cfg_setup ( temphum9_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.

◆ temphum9_default_cfg()

void temphum9_default_cfg ( temphum9_t ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for TempHum9 click.

◆ temphum9_generic_read()

void temphum9_generic_read ( temphum9_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.

◆ temphum9_generic_write()

void temphum9_generic_write ( temphum9_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.

◆ temphum9_get_relative_humidity()

float temphum9_get_relative_humidity ( temphum9_t ctx,
uint8_t  data_mode 
)

Calculating relative humidity.

Parameters
ctxClick object.
datamode to be used for measurement (normal or low power mode)

@description This function performs relative humidity measurement and calculates relative humidity

◆ temphum9_get_temperature()

float temphum9_get_temperature ( temphum9_t ctx,
uint8_t  data_mode 
)

Calculating temperature.

Parameters
ctxClick object.
datamode to be used for measurement (normal or low power mode)

@description This function performs temperature measurement and calculates temperature

◆ temphum9_init()

TEMPHUM9_RETVAL temphum9_init ( temphum9_t ctx,
temphum9_cfg_t cfg 
)

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ temphum9_read_register()

void temphum9_read_register ( temphum9_t ctx,
uint16_t  register_address,
uint8_t  n_data_,
uint16_t *  register_buffer 
)

Readinig register content.

Parameters
ctxClick object.
register_addressddress of a register to read (command)
n_datasingle for one 16-bit register or dual for two 16-bit registers
register_bufferread data is stored into this array

@description This function reads one or two 16-bit registers

◆ temphum9_send_command()

void temphum9_send_command ( temphum9_t ctx,
uint16_t  command 
)

Issuing a command.

Parameters
ctxClick object.
commandcommand to be sent to device

@description This function issues (sends) command to device