temphum3 2.0.0.0
Public function

Functions

void temphum3_cfg_setup (temphum3_cfg_t *cfg)
 Config Object Initialization function.
 
err_t temphum3_init (temphum3_t *ctx, temphum3_cfg_t *cfg)
 Initialization function.
 
void temphum3_default_cfg (temphum3_t *ctx)
 Click Default Configuration function.
 
void temphum3_generic_write (temphum3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void temphum3_generic_read (temphum3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void temphum3_set_mode (temphum3_t *ctx, uint8_t value)
 Set measurement mode function.
 
void temphum3_set_configuration (temphum3_t *ctx, uint8_t value)
 Set configuration function.
 
void temphum3_set_measurement (temphum3_t *ctx, uint8_t value)
 Set measurement function.
 
float temphum3_get_temperature (temphum3_t *ctx)
 Get temperature function.
 
float temphum3_get_humidity (temphum3_t *ctx)
 Get humidity function.
 
uint16_t temphum3_get_id (temphum3_t *ctx)
 Get ID function.
 
uint16_t temphum3_get_manufacturer_id (temphum3_t *ctx)
 Get manufacturer's ID function.
 
uint8_t temphum3_get_status_interrupt (temphum3_t *ctx, uint8_t mask)
 Get interrupt status function.
 
uint8_t temphum3_get_interrupt_mask (temphum3_t *ctx, uint8_t mask)
 Get interrupt mask function.
 
void temphum3_set_offset (temphum3_t *ctx, uint8_t reg, uint8_t value)
 Set offset function.
 
void temphum3_set_high_temp (temphum3_t *ctx, uint8_t temp_data)
 Set high temperature function.
 
void temphum3_set_low_temp (temphum3_t *ctx, uint8_t temp_data)
 Set low temperature function.
 
void temphum3_set_high_hum (temphum3_t *ctx, uint8_t hum_data)
 Set high humidity function.
 
void temphum3_set_low_hum (temphum3_t *ctx, uint8_t hum_data)
 Set low humidity function.
 
float temphum3_get_max_hum (temphum3_t *ctx)
 Get maximum humidity function.
 
float temphum3_get_max_temp (temphum3_t *ctx)
 Get maximum temperature function.
 

Detailed Description

Function Documentation

◆ temphum3_cfg_setup()

void temphum3_cfg_setup ( temphum3_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ temphum3_default_cfg()

void temphum3_default_cfg ( temphum3_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

This function executes default configuration for TempHum3 click.

◆ temphum3_generic_read()

void temphum3_generic_read ( temphum3_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

This function reads data from the desired register.

◆ temphum3_generic_write()

void temphum3_generic_write ( temphum3_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.

This function writes data to the desired register.

◆ temphum3_get_humidity()

float temphum3_get_humidity ( temphum3_t * ctx)

Get humidity function.

Parameters
ctxClick object.

This function returns humidity value

◆ temphum3_get_id()

uint16_t temphum3_get_id ( temphum3_t * ctx)

Get ID function.

Parameters
ctxClick object.

This function returns ID of the module

◆ temphum3_get_interrupt_mask()

uint8_t temphum3_get_interrupt_mask ( temphum3_t * ctx,
uint8_t mask )

Get interrupt mask function.

Parameters
ctxClick object.
maskInterrupt mask

This function returns interrupt mask value

◆ temphum3_get_manufacturer_id()

uint16_t temphum3_get_manufacturer_id ( temphum3_t * ctx)

Get manufacturer's ID function.

Parameters
ctxClick object.

This function returns manufacturer's ID value

◆ temphum3_get_max_hum()

float temphum3_get_max_hum ( temphum3_t * ctx)

Get maximum humidity function.

Parameters
ctxClick object.

This function gets the maximum humidity value

◆ temphum3_get_max_temp()

float temphum3_get_max_temp ( temphum3_t * ctx)

Get maximum temperature function.

Parameters
ctxClick object.

This function gets the maximum temperature value

◆ temphum3_get_status_interrupt()

uint8_t temphum3_get_status_interrupt ( temphum3_t * ctx,
uint8_t mask )

Get interrupt status function.

Parameters
ctxClick object.

This function returns status of an interrupt

◆ temphum3_get_temperature()

float temphum3_get_temperature ( temphum3_t * ctx)

Get temperature function.

Parameters
ctxClick object.

This function returns temperature value

◆ temphum3_init()

err_t temphum3_init ( temphum3_t * ctx,
temphum3_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ temphum3_set_configuration()

void temphum3_set_configuration ( temphum3_t * ctx,
uint8_t value )

Set configuration function.

Parameters
ctxClick object.
valueRegister address value

This function configures the measurement values

◆ temphum3_set_high_hum()

void temphum3_set_high_hum ( temphum3_t * ctx,
uint8_t hum_data )

Set high humidity function.

Parameters
ctxClick object.
hum_dataHumidity data value

This function sets the high humidity value

◆ temphum3_set_high_temp()

void temphum3_set_high_temp ( temphum3_t * ctx,
uint8_t temp_data )

Set high temperature function.

Parameters
ctxClick object.
temp_dataTemperature data value

This function sets the high temperature value

◆ temphum3_set_low_hum()

void temphum3_set_low_hum ( temphum3_t * ctx,
uint8_t hum_data )

Set low humidity function.

Parameters
ctxClick object.
hum_dataHumidity data value

This function sets high humidity value

◆ temphum3_set_low_temp()

void temphum3_set_low_temp ( temphum3_t * ctx,
uint8_t temp_data )

Set low temperature function.

Parameters
ctxClick object.
temp_dataTemperature data value

This function sets the low temperature value

◆ temphum3_set_measurement()

void temphum3_set_measurement ( temphum3_t * ctx,
uint8_t value )

Set measurement function.

Parameters
ctxClick object.

This function returns temperature value

◆ temphum3_set_mode()

void temphum3_set_mode ( temphum3_t * ctx,
uint8_t value )

Set measurement mode function.

Parameters
ctxClick object.
valueRegister address value

This function sets measurement mode

◆ temphum3_set_offset()

void temphum3_set_offset ( temphum3_t * ctx,
uint8_t reg,
uint8_t value )

Set offset function.

Parameters
ctxClick object.
regRegistry value
valueBuffer value

This function sets value of a offset