temphum10 2.0.0.0

Functions

void temphum10_cfg_setup (temphum10_cfg_t *cfg)
 Config Object Initialization function.
 
TEMPHUM10_RETVAL temphum10_init (temphum10_t *ctx, temphum10_cfg_t *cfg)
 Initialization function.
 
void temphum10_generic_write (temphum10_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void temphum10_generic_read (temphum10_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
float temphum10_get_humidity (temphum10_t *ctx)
 Functions for read Relative Huminidy data.
 
float temphum10_get_temperature (temphum10_t *ctx)
 Functions for read Temperature data.
 
void temphum10_set_device_mode (temphum10_t *ctx, uint8_t mode)
 Functions for sets Device mode.
 
void temphum10_repeat_measurement (temphum10_t *ctx, uint8_t average)
 Functions for repeat measurement.
 

Detailed Description

Function Documentation

◆ temphum10_cfg_setup()

void temphum10_cfg_setup ( temphum10_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.

◆ temphum10_generic_read()

void temphum10_generic_read ( temphum10_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.

◆ temphum10_generic_write()

void temphum10_generic_write ( temphum10_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.

◆ temphum10_get_humidity()

float temphum10_get_humidity ( temphum10_t * ctx)

Functions for read Relative Huminidy data.

Parameters
ctxClick object.
Returns
Relative Huminidy data in [RH]

◆ temphum10_get_temperature()

float temphum10_get_temperature ( temphum10_t * ctx)

Functions for read Temperature data.

Parameters
ctxClick object.
Returns
Temperature data in [C]

◆ temphum10_init()

TEMPHUM10_RETVAL temphum10_init ( temphum10_t * ctx,
temphum10_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ temphum10_repeat_measurement()

void temphum10_repeat_measurement ( temphum10_t * ctx,
uint8_t average )

Functions for repeat measurement.

Parameters
ctxClick object.
averageSets average times(2, 4, 8 times or no average) and temperature (_TEMPHUM10_AM_TEMP_AVERAGE_MODE_TIMES_8 or _TEMPHUM10_AM_TEMP_AVERAGE_MODE_TIMES_16)

◆ temphum10_set_device_mode()

void temphum10_set_device_mode ( temphum10_t * ctx,
uint8_t mode )

Functions for sets Device mode.

Parameters
ctxClick object.
modeDevice mode ( TEMPHUM10_MODE_SLEEP or TEMPHUM10_MODE_STANDBY )