temphum8 2.0.0.0

Functions

void temphum8_cfg_setup (temphum8_cfg_t *cfg)
 Config Object Initialization function.
 
TEMPHUM8_RETVAL temphum8_init (temphum8_t *ctx, temphum8_cfg_t *cfg)
 Initialization function.
 
void temphum8_default_cfg (temphum8_t *ctx)
 Click Default Configuration function.
 
void temphum8_generic_write (temphum8_t *ctx, uint8_t reg, uint8_t *data_buffer, uint8_t len)
 Generic write function.
 
void temphum8_generic_read (temphum8_t *ctx, uint8_t reg, uint8_t *data_buffer, uint8_t len)
 Generic read function.
 
void temphum8_software_reset (temphum8_t *ctx)
 Functions for device software reset.
 
void temphum8_set_cfg_register (temphum8_t *ctx, uint8_t cfg)
 Configuration device for measurement.
 
float temphum8_get_temperature_data (temphum8_t *ctx, uint8_t temp_format)
 Temperature data.
 
float temphum8_get_humidity_data (temphum8_t *ctx)
 Relative Huminidy data.
 

Detailed Description

Function Documentation

◆ temphum8_cfg_setup()

void temphum8_cfg_setup ( temphum8_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.

◆ temphum8_default_cfg()

void temphum8_default_cfg ( temphum8_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for TempHum8 click.

Note
Default configuration of the chip contains the settings :
  • Measurement resolution (Temp/Hum - 14bit/12bit)
  • Status: End of battery (VDD > 2.25V)
  • Enable on-chip heater
  • Disable OTP Reload

◆ temphum8_generic_read()

void temphum8_generic_read ( temphum8_t * ctx,
uint8_t reg,
uint8_t * data_buffer,
uint8_t len )

Generic read function.

Parameters
ctxClick object.
regRegister address.
data_bufferData buffer to be written.
lenNumber of the bytes in data buffer.

@description This function reads data from the desired register.

◆ temphum8_generic_write()

void temphum8_generic_write ( temphum8_t * ctx,
uint8_t reg,
uint8_t * data_buffer,
uint8_t len )

Generic write function.

Parameters
ctxClick object.
regRegister address.
data_bufferOutput data buffer
lenNumber of the bytes to be read

@description This function writes data to the desired register.

◆ temphum8_get_humidity_data()

float temphum8_get_humidity_data ( temphum8_t * ctx)

Relative Huminidy data.

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

◆ temphum8_get_temperature_data()

float temphum8_get_temperature_data ( temphum8_t * ctx,
uint8_t temp_format )

Temperature data.

Parameters
ctxClick object.
temp_formatTemperature format ... (FAHRENHEIT, KELVIN, CELSIUS)
Returns
Temperature data

◆ temphum8_init()

TEMPHUM8_RETVAL temphum8_init ( temphum8_t * ctx,
temphum8_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ temphum8_set_cfg_register()

void temphum8_set_cfg_register ( temphum8_t * ctx,
uint8_t cfg )

Configuration device for measurement.

Parameters
ctxClick object.
cfgData to be written in user register
Note
- Options for sets: Measurement resolution (Temp/Hum - 14bit/12bit, 12bit/8bit, 13bit/10bit or 11bit/11bit) Status: End of battery (VDD > 2.25V or VDD < 2.25V) Enable on-chip heater Disable OTP Reload

◆ temphum8_software_reset()

void temphum8_software_reset ( temphum8_t * ctx)

Functions for device software reset.

Parameters
ctxClick object.