hdc1000 2.0.0.0
Public function

Functions

void hdc1000_cfg_setup (hdc1000_cfg_t *cfg)
 Config Object Initialization function.
 
HDC1000_RETVAL hdc1000_init (hdc1000_t *ctx, hdc1000_cfg_t *cfg)
 Initialization function.
 
void hdc1000_default_cfg (hdc1000_t *ctx)
 Click Default Configuration function.
 
void hdc1000_generic_write (hdc1000_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void hdc1000_generic_read (hdc1000_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
float hdc1000_get_temperature_data (hdc1000_t *ctx)
 Get temperature value.
 
float hdc1000_get_humidity_data (hdc1000_t *ctx)
 Get humidity value.
 
uint8_t hdc1000_get_interrupt (hdc1000_t *ctx)
 Get interrupt state.
 

Detailed Description

Function Documentation

◆ hdc1000_cfg_setup()

void hdc1000_cfg_setup ( hdc1000_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.

◆ hdc1000_default_cfg()

void hdc1000_default_cfg ( hdc1000_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for HDC1000 click.

Note
Click default configuration: Sets both temperature and humidity

like values with 14bit resolution.

    HDC1000_CONFIG
--------------------------------------
    HDC1000_BOTH_TEMP_HUMI 
  | HDC1000_TEMP_HUMI_14BIT

◆ hdc1000_generic_read()

void hdc1000_generic_read ( hdc1000_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.

◆ hdc1000_generic_write()

void hdc1000_generic_write ( hdc1000_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.

◆ hdc1000_get_humidity_data()

float hdc1000_get_humidity_data ( hdc1000_t * ctx)

Get humidity value.

Parameters
ctxClick object.
Returns
Humidity data.

@description This function gets humidity data from the HDC1000 sensor.

◆ hdc1000_get_interrupt()

uint8_t hdc1000_get_interrupt ( hdc1000_t * ctx)

Get interrupt state.

Parameters
ctxClick object.
Returns
Interrupt state:
   0 : Not active.
   1 : Active.

@description This function gets states of the RDY ( INT ) pin of the HDC1000 sensor.

◆ hdc1000_get_temperature_data()

float hdc1000_get_temperature_data ( hdc1000_t * ctx)

Get temperature value.

Parameters
ctxClick object.
Returns
Temperature data.

@description This function gets temperature data from the HDC1000 sensor.

◆ hdc1000_init()

HDC1000_RETVAL hdc1000_init ( hdc1000_t * ctx,
hdc1000_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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