temphum12 2.0.0.0

Functions

void temphum12_cfg_setup (temphum12_cfg_t *cfg)
 Config Object Initialization function.
 
TEMPHUM12_RETVAL temphum12_init (temphum12_t *ctx, temphum12_cfg_t *cfg)
 Initialization function.
 
void temphum12_default_cfg (temphum12_t *ctx)
 Click Default Configuration function.
 
void temphum12_generic_write (temphum12_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void temphum12_generic_read (temphum12_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
float temphum12_get_temperature (temphum12_t *ctx, uint8_t temp_in)
 Temperature data.
 
float temphum12_get_humidity (temphum12_t *ctx)
 Relative Huminidy data.
 
uint8_t temphum12_get_intrrupt_state (temphum12_t *ctx)
 Interrupt state.
 

Detailed Description

Function Documentation

◆ temphum12_cfg_setup()

void temphum12_cfg_setup ( temphum12_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.

◆ temphum12_default_cfg()

void temphum12_default_cfg ( temphum12_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.
Note
 Configuration device
     TEMPHUM12_REG_INT_ENABLE:
       - TEMPHUM12_INTE_DRDY_ENABLE
     TEMPHUM12_REG_DRDY_INT_CONFIG:
       - TEMPHUM12_ICFG_NORAML_OPERATION 
       - TEMPHUM12_ICFG_AMM_5Hz 
       - TEMPHUM12_ICFG_HEATER_DISABLE 
       - TEMPHUM12_ICFG_DRDY_ENABLE  
       - TEMPHUM12_ICFG_INT_ACTIVE_HIGH 
       - TEMPHUM12_ICFG_COMPARATOR_MODE
     TEMPHUM12_REG_CONFIGURATION:
       - TEMPHUM12_MCFG_TEMP_RES_14bit  
       - TEMPHUM12_MCFG_HUM_RES_14bit  
       - TEMPHUM12_MCFG_TEMP_HUM_READ  
       - TEMPHUM12_MCFG_TRIG_START_MEASUREMEN

@description This function executes default configuration for Temphum 12 click.

◆ temphum12_generic_read()

void temphum12_generic_read ( temphum12_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.

◆ temphum12_generic_write()

void temphum12_generic_write ( temphum12_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.

◆ temphum12_get_humidity()

float temphum12_get_humidity ( temphum12_t * ctx)

Relative Huminidy data.

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

◆ temphum12_get_intrrupt_state()

uint8_t temphum12_get_intrrupt_state ( temphum12_t * ctx)

Interrupt state.

Parameters
ctxClick object.
Returns
Interrupt state on the INT pin

◆ temphum12_get_temperature()

float temphum12_get_temperature ( temphum12_t * ctx,
uint8_t temp_in )

Temperature data.

Parameters
ctxClick object.
temp_inTemperature in ... (FAHRENHEIT, KELVIN or CELSIUS)
Returns
Temperature data

◆ temphum12_init()

TEMPHUM12_RETVAL temphum12_init ( temphum12_t * ctx,
temphum12_cfg_t * cfg )

Initialization function.

Parameters
temphum12Click object.
cfgClick configuration structure.

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