temphum3  2.0.0.0
Functions
Public function

Functions

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

Detailed Description

Function Documentation

◆ temphum3_cfg_setup()

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

◆ temphum3_default_cfg()

void temphum3_default_cfg ( temphum3_t ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description 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

@description 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.

@description This function writes data to the desired register.

◆ temphum3_get_humidity()

float temphum3_get_humidity ( temphum3_t ctx)

Get humidity function.

Parameters
ctxClick object.

@description This function returns humidity value

◆ temphum3_get_id()

uint16_t temphum3_get_id ( temphum3_t ctx)

Get ID function.

Parameters
ctxClick object.

@description 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

@description 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.

@description 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.

@description 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.

@description 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.

@description This function returns status of an interrupt

◆ temphum3_get_temperature()

float temphum3_get_temperature ( temphum3_t ctx)

Get temperature function.

Parameters
ctxClick object.

@description This function returns temperature value

◆ temphum3_init()

TEMPHUM3_RETVAL temphum3_init ( temphum3_t ctx,
temphum3_cfg_t cfg 
)

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

@description 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

@description 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

@description 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

@description 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

@description 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

@description 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.

@description 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

@description 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

@description This function sets value of a offset