LibDriver HDC2080
Loading...
Searching...
No Matches
hdc2080 basic driver function

hdc2080 basic driver modules More...

Collaboration diagram for hdc2080 basic driver function:

Data Structures

struct  hdc2080_handle_s
 hdc2080 handle structure definition More...
struct  hdc2080_info_s
 hdc2080 information structure definition More...

Typedefs

typedef struct hdc2080_handle_s hdc2080_handle_t
 hdc2080 handle structure definition
typedef struct hdc2080_info_s hdc2080_info_t
 hdc2080 information structure definition

Enumerations

enum  hdc2080_address_t { HDC2080_ADDRESS_0 = (0x40 << 1) , HDC2080_ADDRESS_1 = (0x41 << 1) }
 hdc2080 address enumeration definition More...
enum  hdc2080_bool_t { HDC2080_BOOL_FALSE = 0x00 , HDC2080_BOOL_TRUE = 0x01 }
 hdc2080 bool enumeration definition More...
enum  hdc2080_resolution_t { HDC2080_RESOLUTION_14_BIT = 0x00 , HDC2080_RESOLUTION_11_BIT = 0x01 , HDC2080_RESOLUTION_9_BIT = 0x02 }
 hdc2080 resolution enumeration definition More...
enum  hdc2080_mode_t { HDC2080_MODE_HUMIDITY_TEMPERATURE = 0x00 , HDC2080_MODE_TEMPERATURE = 0x01 }
 hdc2080 mode enumeration definition More...
enum  hdc2080_auto_measurement_mode_t {
  HDC2080_AUTO_MEASUREMENT_MODE_DISABLED = 0x00 , HDC2080_AUTO_MEASUREMENT_MODE_1_DIV_120_HZ = 0x01 , HDC2080_AUTO_MEASUREMENT_MODE_1_DIV_60_HZ = 0x02 , HDC2080_AUTO_MEASUREMENT_MODE_1_DIV_10_HZ = 0x03 ,
  HDC2080_AUTO_MEASUREMENT_MODE_1_DIV_5_HZ = 0x04 , HDC2080_AUTO_MEASUREMENT_MODE_1_HZ = 0x05 , HDC2080_AUTO_MEASUREMENT_MODE_2_HZ = 0x06 , HDC2080_AUTO_MEASUREMENT_MODE_5_HZ = 0x07
}
 hdc2080 auto measurement mode enumeration definition More...
enum  hdc2080_interrupt_polarity_t { HDC2080_INTERRUPT_POLARITY_LOW = 0x00 , HDC2080_INTERRUPT_POLARITY_HIGH = 0x01 }
 hdc2080 interrupt polarity enumeration definition More...
enum  hdc2080_interrupt_t {
  HDC2080_INTERRUPT_DRDY = 7 , HDC2080_INTERRUPT_TEMPERATURE_HIGH_THRESHOLD = 6 , HDC2080_INTERRUPT_TEMPERATURE_LOW_THRESHOLD = 5 , HDC2080_INTERRUPT_HUMIDITY_HIGH_THRESHOLD = 4 ,
  HDC2080_INTERRUPT_HUMIDITY_LOW_THRESHOLD = 3
}
 hdc2080 interrupt enumeration definition More...
enum  hdc2080_interrupt_mode_t { HDC2080_INTERRUPT_MODE_LEVEL = 0x00 , HDC2080_INTERRUPT_MODE_COMPARATOR = 0x01 }
 hdc2080 interrupt mode enumeration definition More...

Functions

uint8_t hdc2080_info (hdc2080_info_t *info)
 get chip's information
uint8_t hdc2080_set_addr_pin (hdc2080_handle_t *handle, hdc2080_address_t addr_pin)
 set the iic address pin
uint8_t hdc2080_get_addr_pin (hdc2080_handle_t *handle, hdc2080_address_t *addr_pin)
 get the iic address pin
uint8_t hdc2080_init (hdc2080_handle_t *handle)
 initialize the chip
uint8_t hdc2080_deinit (hdc2080_handle_t *handle)
 close the chip
uint8_t hdc2080_read_temperature_humidity (hdc2080_handle_t *handle, uint16_t *temperature_raw, float *temperature_s, uint16_t *humidity_raw, float *humidity_s)
 read the temperature and humidity data
uint8_t hdc2080_read_temperature (hdc2080_handle_t *handle, uint16_t *temperature_raw, float *temperature_s)
 read the temperature
uint8_t hdc2080_read_humidity (hdc2080_handle_t *handle, uint16_t *humidity_raw, float *humidity_s)
 read the humidity data
uint8_t hdc2080_read_poll (hdc2080_handle_t *handle)
 read poll
uint8_t hdc2080_set_temperature_resolution (hdc2080_handle_t *handle, hdc2080_resolution_t resolution)
 set temperature resolution
uint8_t hdc2080_get_temperature_resolution (hdc2080_handle_t *handle, hdc2080_resolution_t *resolution)
 get temperature resolution
uint8_t hdc2080_set_humidity_resolution (hdc2080_handle_t *handle, hdc2080_resolution_t resolution)
 set humidity resolution
uint8_t hdc2080_get_humidity_resolution (hdc2080_handle_t *handle, hdc2080_resolution_t *resolution)
 get humidity resolution
uint8_t hdc2080_set_mode (hdc2080_handle_t *handle, hdc2080_mode_t mode)
 set the chip mode
uint8_t hdc2080_get_mode (hdc2080_handle_t *handle, hdc2080_mode_t *mode)
 get the chip mode
uint8_t hdc2080_set_measurement (hdc2080_handle_t *handle, hdc2080_bool_t enable)
 enable or disable measurement
uint8_t hdc2080_get_measurement (hdc2080_handle_t *handle, hdc2080_bool_t *enable)
 get measurement status
uint8_t hdc2080_soft_reset (hdc2080_handle_t *handle)
 soft reset
uint8_t hdc2080_set_auto_measurement_mode (hdc2080_handle_t *handle, hdc2080_auto_measurement_mode_t mode)
 set auto measurement mode
uint8_t hdc2080_get_auto_measurement_mode (hdc2080_handle_t *handle, hdc2080_auto_measurement_mode_t *mode)
 get auto measurement mode
uint8_t hdc2080_set_heater (hdc2080_handle_t *handle, hdc2080_bool_t enable)
 enable or disable heater
uint8_t hdc2080_get_heater (hdc2080_handle_t *handle, hdc2080_bool_t *enable)
 get heater status
uint8_t hdc2080_set_interrupt_pin (hdc2080_handle_t *handle, hdc2080_bool_t enable)
 enable or disable interrupt pin
uint8_t hdc2080_get_interrupt_pin (hdc2080_handle_t *handle, hdc2080_bool_t *enable)
 get interrupt pin status
uint8_t hdc2080_set_interrupt_polarity (hdc2080_handle_t *handle, hdc2080_interrupt_polarity_t polarity)
 set interrupt polarity
uint8_t hdc2080_get_interrupt_polarity (hdc2080_handle_t *handle, hdc2080_interrupt_polarity_t *polarity)
 get interrupt polarity
uint8_t hdc2080_set_interrupt_mode (hdc2080_handle_t *handle, hdc2080_interrupt_mode_t mode)
 set interrupt mode
uint8_t hdc2080_get_interrupt_mode (hdc2080_handle_t *handle, hdc2080_interrupt_mode_t *mode)
 get interrupt mode
uint8_t hdc2080_set_humidity_high_threshold (hdc2080_handle_t *handle, uint8_t threshold)
 set humidity high threshold
uint8_t hdc2080_get_humidity_high_threshold (hdc2080_handle_t *handle, uint8_t *threshold)
 get humidity high threshold
uint8_t hdc2080_set_humidity_low_threshold (hdc2080_handle_t *handle, uint8_t threshold)
 set humidity low threshold
uint8_t hdc2080_get_humidity_low_threshold (hdc2080_handle_t *handle, uint8_t *threshold)
 get humidity low threshold
uint8_t hdc2080_set_temperature_high_threshold (hdc2080_handle_t *handle, uint8_t threshold)
 set temperature high threshold
uint8_t hdc2080_get_temperature_high_threshold (hdc2080_handle_t *handle, uint8_t *threshold)
 get temperature high threshold
uint8_t hdc2080_set_temperature_low_threshold (hdc2080_handle_t *handle, uint8_t threshold)
 set temperature low threshold
uint8_t hdc2080_get_temperature_low_threshold (hdc2080_handle_t *handle, uint8_t *threshold)
 get temperature low threshold
uint8_t hdc2080_set_humidity_offset_adjustment (hdc2080_handle_t *handle, int8_t offset)
 set humidity offset adjustment
uint8_t hdc2080_get_humidity_offset_adjustment (hdc2080_handle_t *handle, int8_t *offset)
 get humidity offset adjustment
uint8_t hdc2080_set_temperature_offset_adjustment (hdc2080_handle_t *handle, int8_t offset)
 set temperature offset adjustment
uint8_t hdc2080_get_temperature_offset_adjustment (hdc2080_handle_t *handle, int8_t *offset)
 get temperature offset adjustment
uint8_t hdc2080_set_interrupt (hdc2080_handle_t *handle, hdc2080_interrupt_t interrupt, hdc2080_bool_t enable)
 enable or disable interrupt
uint8_t hdc2080_get_interrupt (hdc2080_handle_t *handle, hdc2080_interrupt_t interrupt, hdc2080_bool_t *enable)
 get interrupt status
uint8_t hdc2080_set_humidity_max (hdc2080_handle_t *handle, uint8_t max)
 set humidity max
uint8_t hdc2080_get_humidity_max (hdc2080_handle_t *handle, uint8_t *max)
 get humidity max
uint8_t hdc2080_set_temperature_max (hdc2080_handle_t *handle, uint8_t max)
 set temperature max
uint8_t hdc2080_get_temperature_max (hdc2080_handle_t *handle, uint8_t *max)
 get temperature max
uint8_t hdc2080_get_interrupt_status (hdc2080_handle_t *handle, uint8_t *status)
 get interrupt status
uint8_t hdc2080_humidity_convert_to_register (hdc2080_handle_t *handle, float percent, uint8_t *reg)
 convert the humidity to the register raw data
uint8_t hdc2080_humidity_convert_to_data (hdc2080_handle_t *handle, uint8_t reg, float *percent)
 convert the register raw data to the humidity
uint8_t hdc2080_temperature_convert_to_register (hdc2080_handle_t *handle, float deg, uint8_t *reg)
 convert the temperature to the register raw data
uint8_t hdc2080_temperature_convert_to_data (hdc2080_handle_t *handle, uint8_t reg, float *deg)
 convert the register raw data to the temperature
uint8_t hdc2080_humidity_offset_convert_to_register (hdc2080_handle_t *handle, float percent, int8_t *reg)
 convert the humidity offset to the register raw data
uint8_t hdc2080_humidity_offset_convert_to_data (hdc2080_handle_t *handle, int8_t reg, float *percent)
 convert the register raw data to the humidity offset
uint8_t hdc2080_temperature_offset_convert_to_register (hdc2080_handle_t *handle, float deg, int8_t *reg)
 convert the temperature offset to the register raw data
uint8_t hdc2080_temperature_offset_convert_to_data (hdc2080_handle_t *handle, int8_t reg, float *deg)
 convert the register raw data to the temperature offset

Detailed Description

hdc2080 basic driver modules

Typedef Documentation

◆ hdc2080_handle_t

hdc2080 handle structure definition

◆ hdc2080_info_t

hdc2080 information structure definition

Enumeration Type Documentation

◆ hdc2080_address_t

hdc2080 address enumeration definition

Enumerator
HDC2080_ADDRESS_0 

addr pin connected to the GND

HDC2080_ADDRESS_1 

addr pin connected to the VCC

Definition at line 62 of file driver_hdc2080.h.

◆ hdc2080_auto_measurement_mode_t

hdc2080 auto measurement mode enumeration definition

Enumerator
HDC2080_AUTO_MEASUREMENT_MODE_DISABLED 

disable

HDC2080_AUTO_MEASUREMENT_MODE_1_DIV_120_HZ 

1/120 hz

HDC2080_AUTO_MEASUREMENT_MODE_1_DIV_60_HZ 

1/60 hz

HDC2080_AUTO_MEASUREMENT_MODE_1_DIV_10_HZ 

1/10 hz

HDC2080_AUTO_MEASUREMENT_MODE_1_DIV_5_HZ 

1/5 hz

HDC2080_AUTO_MEASUREMENT_MODE_1_HZ 

1 hz

HDC2080_AUTO_MEASUREMENT_MODE_2_HZ 

2 hz

HDC2080_AUTO_MEASUREMENT_MODE_5_HZ 

5 hz

Definition at line 99 of file driver_hdc2080.h.

◆ hdc2080_bool_t

hdc2080 bool enumeration definition

Enumerator
HDC2080_BOOL_FALSE 

disable

HDC2080_BOOL_TRUE 

enable

Definition at line 71 of file driver_hdc2080.h.

◆ hdc2080_interrupt_mode_t

hdc2080 interrupt mode enumeration definition

Enumerator
HDC2080_INTERRUPT_MODE_LEVEL 

level sensitive

HDC2080_INTERRUPT_MODE_COMPARATOR 

comparator mode

Definition at line 135 of file driver_hdc2080.h.

◆ hdc2080_interrupt_polarity_t

hdc2080 interrupt polarity enumeration definition

Enumerator
HDC2080_INTERRUPT_POLARITY_LOW 

active low

HDC2080_INTERRUPT_POLARITY_HIGH 

active high

Definition at line 114 of file driver_hdc2080.h.

◆ hdc2080_interrupt_t

hdc2080 interrupt enumeration definition

Enumerator
HDC2080_INTERRUPT_DRDY 

data ready

HDC2080_INTERRUPT_TEMPERATURE_HIGH_THRESHOLD 

temperature high threshold

HDC2080_INTERRUPT_TEMPERATURE_LOW_THRESHOLD 

temperature low threshold

HDC2080_INTERRUPT_HUMIDITY_HIGH_THRESHOLD 

humidity high threshold

HDC2080_INTERRUPT_HUMIDITY_LOW_THRESHOLD 

humidity low threshold

Definition at line 123 of file driver_hdc2080.h.

◆ hdc2080_mode_t

hdc2080 mode enumeration definition

Enumerator
HDC2080_MODE_HUMIDITY_TEMPERATURE 

humidity temperature

HDC2080_MODE_TEMPERATURE 

temperature only

Definition at line 90 of file driver_hdc2080.h.

◆ hdc2080_resolution_t

hdc2080 resolution enumeration definition

Enumerator
HDC2080_RESOLUTION_14_BIT 

14 bit

HDC2080_RESOLUTION_11_BIT 

11 bit

HDC2080_RESOLUTION_9_BIT 

9 bit

Definition at line 80 of file driver_hdc2080.h.

Function Documentation

◆ hdc2080_deinit()

uint8_t hdc2080_deinit ( hdc2080_handle_t * handle)

close the chip

Parameters
[in]*handlepointer to an hdc2080 handle structure
Returns
status code
  • 0 success
  • 1 deinit failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 294 of file driver_hdc2080.c.

◆ hdc2080_get_addr_pin()

uint8_t hdc2080_get_addr_pin ( hdc2080_handle_t * handle,
hdc2080_address_t * addr_pin )

get the iic address pin

Parameters
[in]*handlepointer to an hdc2080 handle structure
[out]*addr_pinpointer to an address pin buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 151 of file driver_hdc2080.c.

◆ hdc2080_get_auto_measurement_mode()

uint8_t hdc2080_get_auto_measurement_mode ( hdc2080_handle_t * handle,
hdc2080_auto_measurement_mode_t * mode )

get auto measurement mode

Parameters
[in]*handlepointer to an hdc2080 handle structure
[out]*modepointer to a mode buffer
Returns
status code
  • 0 success
  • 1 get auto measurement mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 763 of file driver_hdc2080.c.

◆ hdc2080_get_heater()

uint8_t hdc2080_get_heater ( hdc2080_handle_t * handle,
hdc2080_bool_t * enable )

get heater status

Parameters
[in]*handlepointer to an hdc2080 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get heater failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 845 of file driver_hdc2080.c.

◆ hdc2080_get_humidity_high_threshold()

uint8_t hdc2080_get_humidity_high_threshold ( hdc2080_handle_t * handle,
uint8_t * threshold )

get humidity high threshold

Parameters
[in]*handlepointer to an hdc2080 handle structure
[out]*thresholdpointer to a threshold buffer
Returns
status code
  • 0 success
  • 1 get humidity high threshold failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1165 of file driver_hdc2080.c.

◆ hdc2080_get_humidity_low_threshold()

uint8_t hdc2080_get_humidity_low_threshold ( hdc2080_handle_t * handle,
uint8_t * threshold )

get humidity low threshold

Parameters
[in]*handlepointer to an hdc2080 handle structure
[out]*thresholdpointer to a threshold buffer
Returns
status code
  • 0 success
  • 1 get humidity low threshold failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1239 of file driver_hdc2080.c.

◆ hdc2080_get_humidity_max()

uint8_t hdc2080_get_humidity_max ( hdc2080_handle_t * handle,
uint8_t * max )

get humidity max

Parameters
[in]*handlepointer to an hdc2080 handle structure
[out]*maxpointer to a humidity max buffer
Returns
status code
  • 0 success
  • 1 get humidity max failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1693 of file driver_hdc2080.c.

◆ hdc2080_get_humidity_offset_adjustment()

uint8_t hdc2080_get_humidity_offset_adjustment ( hdc2080_handle_t * handle,
int8_t * offset )

get humidity offset adjustment

Parameters
[in]*handlepointer to an hdc2080 handle structure
[out]*offsetpointer to an offset buffer
Returns
status code
  • 0 success
  • 1 get humidity offset adjustment failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1461 of file driver_hdc2080.c.

◆ hdc2080_get_humidity_resolution()

uint8_t hdc2080_get_humidity_resolution ( hdc2080_handle_t * handle,
hdc2080_resolution_t * resolution )

get humidity resolution

Parameters
[in]*handlepointer to an hdc2080 handle structure
[out]*resolutionpointer to a resolution buffer
Returns
status code
  • 0 success
  • 1 get humidity resolution failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 472 of file driver_hdc2080.c.

◆ hdc2080_get_interrupt()

uint8_t hdc2080_get_interrupt ( hdc2080_handle_t * handle,
hdc2080_interrupt_t interrupt,
hdc2080_bool_t * enable )

get interrupt status

Parameters
[in]*handlepointer to an hdc2080 handle structure
[in]interruptchip interrupt
[out]*enablepointer to a bool buffer
Returns
status code
  • 0 success
  • 1 get interrupt failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1619 of file driver_hdc2080.c.

◆ hdc2080_get_interrupt_mode()

uint8_t hdc2080_get_interrupt_mode ( hdc2080_handle_t * handle,
hdc2080_interrupt_mode_t * mode )

get interrupt mode

Parameters
[in]*handlepointer to an hdc2080 handle structure
[out]*modepointer to an interrupt mode buffer
Returns
status code
  • 0 success
  • 1 get interrupt mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1091 of file driver_hdc2080.c.

◆ hdc2080_get_interrupt_pin()

uint8_t hdc2080_get_interrupt_pin ( hdc2080_handle_t * handle,
hdc2080_bool_t * enable )

get interrupt pin status

Parameters
[in]*handlepointer to an hdc2080 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get interrupt pin failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 927 of file driver_hdc2080.c.

◆ hdc2080_get_interrupt_polarity()

uint8_t hdc2080_get_interrupt_polarity ( hdc2080_handle_t * handle,
hdc2080_interrupt_polarity_t * polarity )

get interrupt polarity

Parameters
[in]*handlepointer to an hdc2080 handle structure
[out]*polaritypointer to a polarity buffer
Returns
status code
  • 0 success
  • 1 get interrupt polarity failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1009 of file driver_hdc2080.c.

◆ hdc2080_get_interrupt_status()

uint8_t hdc2080_get_interrupt_status ( hdc2080_handle_t * handle,
uint8_t * status )

get interrupt status

Parameters
[in]*handlepointer to an hdc2080 handle structure
[out]*statuspointer to an interrupt status buffer
Returns
status code
  • 0 success
  • 1 get interrupt status failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1804 of file driver_hdc2080.c.

◆ hdc2080_get_measurement()

uint8_t hdc2080_get_measurement ( hdc2080_handle_t * handle,
hdc2080_bool_t * enable )

get measurement status

Parameters
[in]*handlepointer to an hdc2080 handle structure
[out]*enablepointer to a bool value
Returns
status code
  • 0 success
  • 1 get measurement failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 636 of file driver_hdc2080.c.

◆ hdc2080_get_mode()

uint8_t hdc2080_get_mode ( hdc2080_handle_t * handle,
hdc2080_mode_t * mode )

get the chip mode

Parameters
[in]*handlepointer to an hdc2080 handle structure
[out]*modepointer to a chip mode buffer
Returns
status code
  • 0 success
  • 1 get mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 554 of file driver_hdc2080.c.

◆ hdc2080_get_temperature_high_threshold()

uint8_t hdc2080_get_temperature_high_threshold ( hdc2080_handle_t * handle,
uint8_t * threshold )

get temperature high threshold

Parameters
[in]*handlepointer to an hdc2080 handle structure
[out]*thresholdpointer to a threshold buffer
Returns
status code
  • 0 success
  • 1 get temperature high threshold failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1313 of file driver_hdc2080.c.

◆ hdc2080_get_temperature_low_threshold()

uint8_t hdc2080_get_temperature_low_threshold ( hdc2080_handle_t * handle,
uint8_t * threshold )

get temperature low threshold

Parameters
[in]*handlepointer to an hdc2080 handle structure
[out]*thresholdpointer to a threshold buffer
Returns
status code
  • 0 success
  • 1 get temperature low threshold failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1387 of file driver_hdc2080.c.

◆ hdc2080_get_temperature_max()

uint8_t hdc2080_get_temperature_max ( hdc2080_handle_t * handle,
uint8_t * max )

get temperature max

Parameters
[in]*handlepointer to an hdc2080 handle structure
[out]*maxpointer to a temperature max buffer
Returns
status code
  • 0 success
  • 1 get temperature max failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1767 of file driver_hdc2080.c.

◆ hdc2080_get_temperature_offset_adjustment()

uint8_t hdc2080_get_temperature_offset_adjustment ( hdc2080_handle_t * handle,
int8_t * offset )

get temperature offset adjustment

Parameters
[in]*handlepointer to an hdc2080 handle structure
[out]*offsetpointer to an offset buffer
Returns
status code
  • 0 success
  • 1 get temperature offset adjustment failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1535 of file driver_hdc2080.c.

◆ hdc2080_get_temperature_resolution()

uint8_t hdc2080_get_temperature_resolution ( hdc2080_handle_t * handle,
hdc2080_resolution_t * resolution )

get temperature resolution

Parameters
[in]*handlepointer to an hdc2080 handle structure
[out]*resolutionpointer to a resolution buffer
Returns
status code
  • 0 success
  • 1 get temperature resolution failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 390 of file driver_hdc2080.c.

◆ hdc2080_humidity_convert_to_data()

uint8_t hdc2080_humidity_convert_to_data ( hdc2080_handle_t * handle,
uint8_t reg,
float * percent )

convert the register raw data to the humidity

Parameters
[in]*handlepointer to an hdc2080 handle structure
[in]regregister raw data
[out]*percentpointer to a percent buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1868 of file driver_hdc2080.c.

◆ hdc2080_humidity_convert_to_register()

uint8_t hdc2080_humidity_convert_to_register ( hdc2080_handle_t * handle,
float percent,
uint8_t * reg )

convert the humidity to the register raw data

Parameters
[in]*handlepointer to an hdc2080 handle structure
[in]percentset percent
[out]*regpointer to a register raw buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1841 of file driver_hdc2080.c.

◆ hdc2080_humidity_offset_convert_to_data()

uint8_t hdc2080_humidity_offset_convert_to_data ( hdc2080_handle_t * handle,
int8_t reg,
float * percent )

convert the register raw data to the humidity offset

Parameters
[in]*handlepointer to an hdc2080 handle structure
[in]regregister raw data
[out]*percentpointer to a percent buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1976 of file driver_hdc2080.c.

◆ hdc2080_humidity_offset_convert_to_register()

uint8_t hdc2080_humidity_offset_convert_to_register ( hdc2080_handle_t * handle,
float percent,
int8_t * reg )

convert the humidity offset to the register raw data

Parameters
[in]*handlepointer to an hdc2080 handle structure
[in]percentset percent
[out]*regpointer to a register raw buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1949 of file driver_hdc2080.c.

◆ hdc2080_info()

uint8_t hdc2080_info ( hdc2080_info_t * info)

get chip's information

Parameters
[out]*infopointer to an hdc2080 info structure
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 2319 of file driver_hdc2080.c.

◆ hdc2080_init()

uint8_t hdc2080_init ( hdc2080_handle_t * handle)

initialize the chip

Parameters
[in]*handlepointer to an hdc2080 handle structure
Returns
status code
  • 0 success
  • 1 iic init failed
  • 2 handle is NULL
  • 3 linked functions is NULL
  • 4 read id failed
  • 5 id is invalid
  • 6 reset failed
Note
none

Definition at line 176 of file driver_hdc2080.c.

◆ hdc2080_read_humidity()

uint8_t hdc2080_read_humidity ( hdc2080_handle_t * handle,
uint16_t * humidity_raw,
float * humidity_s )

read the humidity data

Parameters
[in]*handlepointer to an hdc2080 handle structure
[out]*humidity_rawpointer to a raw humidity buffer
[out]*humidity_spointer to a converted humidity buffer
Returns
status code
  • 0 success
  • 1 read humidity failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2148 of file driver_hdc2080.c.

◆ hdc2080_read_poll()

uint8_t hdc2080_read_poll ( hdc2080_handle_t * handle)

read poll

Parameters
[in]*handlepointer to an hdc2080 handle structure
Returns
status code
  • 0 success
  • 1 read poll failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 read timeout
Note
none

Definition at line 2186 of file driver_hdc2080.c.

◆ hdc2080_read_temperature()

uint8_t hdc2080_read_temperature ( hdc2080_handle_t * handle,
uint16_t * temperature_raw,
float * temperature_s )

read the temperature

Parameters
[in]*handlepointer to an hdc2080 handle structure
[out]*temperature_rawpointer to a raw temperature buffer
[out]*temperature_spointer to a converted temperature buffer
Returns
status code
  • 0 success
  • 1 read temperature failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2109 of file driver_hdc2080.c.

◆ hdc2080_read_temperature_humidity()

uint8_t hdc2080_read_temperature_humidity ( hdc2080_handle_t * handle,
uint16_t * temperature_raw,
float * temperature_s,
uint16_t * humidity_raw,
float * humidity_s )

read the temperature and humidity data

Parameters
[in]*handlepointer to an hdc2080 handle structure
[out]*temperature_rawpointer to a raw temperature buffer
[out]*temperature_spointer to a converted temperature buffer
[out]*humidity_rawpointer to a raw humidity buffer
[out]*humidity_spointer to a converted humidity buffer
Returns
status code
  • 0 success
  • 1 read temperature humidity failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2060 of file driver_hdc2080.c.

◆ hdc2080_set_addr_pin()

uint8_t hdc2080_set_addr_pin ( hdc2080_handle_t * handle,
hdc2080_address_t addr_pin )

set the iic address pin

Parameters
[in]*handlepointer to an hdc2080 handle structure
[in]addr_pinaddress pin
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 130 of file driver_hdc2080.c.

◆ hdc2080_set_auto_measurement_mode()

uint8_t hdc2080_set_auto_measurement_mode ( hdc2080_handle_t * handle,
hdc2080_auto_measurement_mode_t mode )

set auto measurement mode

Parameters
[in]*handlepointer to an hdc2080 handle structure
[in]modechip mode
Returns
status code
  • 0 success
  • 1 set auto measurement mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 718 of file driver_hdc2080.c.

◆ hdc2080_set_heater()

uint8_t hdc2080_set_heater ( hdc2080_handle_t * handle,
hdc2080_bool_t enable )

enable or disable heater

Parameters
[in]*handlepointer to an hdc2080 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set heater failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 800 of file driver_hdc2080.c.

◆ hdc2080_set_humidity_high_threshold()

uint8_t hdc2080_set_humidity_high_threshold ( hdc2080_handle_t * handle,
uint8_t threshold )

set humidity high threshold

Parameters
[in]*handlepointer to an hdc2080 handle structure
[in]thresholdhigh threshold
Returns
status code
  • 0 success
  • 1 set humidity high threshold failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1128 of file driver_hdc2080.c.

◆ hdc2080_set_humidity_low_threshold()

uint8_t hdc2080_set_humidity_low_threshold ( hdc2080_handle_t * handle,
uint8_t threshold )

set humidity low threshold

Parameters
[in]*handlepointer to an hdc2080 handle structure
[in]thresholdlow threshold
Returns
status code
  • 0 success
  • 1 set humidity low threshold failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1202 of file driver_hdc2080.c.

◆ hdc2080_set_humidity_max()

uint8_t hdc2080_set_humidity_max ( hdc2080_handle_t * handle,
uint8_t max )

set humidity max

Parameters
[in]*handlepointer to an hdc2080 handle structure
[in]maxhumidity max
Returns
status code
  • 0 success
  • 1 set humidity max failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1656 of file driver_hdc2080.c.

◆ hdc2080_set_humidity_offset_adjustment()

uint8_t hdc2080_set_humidity_offset_adjustment ( hdc2080_handle_t * handle,
int8_t offset )

set humidity offset adjustment

Parameters
[in]*handlepointer to an hdc2080 handle structure
[in]offsethumidity offset
Returns
status code
  • 0 success
  • 1 set humidity offset adjustment failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1424 of file driver_hdc2080.c.

◆ hdc2080_set_humidity_resolution()

uint8_t hdc2080_set_humidity_resolution ( hdc2080_handle_t * handle,
hdc2080_resolution_t resolution )

set humidity resolution

Parameters
[in]*handlepointer to an hdc2080 handle structure
[in]resolutionhumidity resolution
Returns
status code
  • 0 success
  • 1 set humidity resolution failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 427 of file driver_hdc2080.c.

◆ hdc2080_set_interrupt()

uint8_t hdc2080_set_interrupt ( hdc2080_handle_t * handle,
hdc2080_interrupt_t interrupt,
hdc2080_bool_t enable )

enable or disable interrupt

Parameters
[in]*handlepointer to an hdc2080 handle structure
[in]interruptchip interrupt
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set interrupt failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1573 of file driver_hdc2080.c.

◆ hdc2080_set_interrupt_mode()

uint8_t hdc2080_set_interrupt_mode ( hdc2080_handle_t * handle,
hdc2080_interrupt_mode_t mode )

set interrupt mode

Parameters
[in]*handlepointer to an hdc2080 handle structure
[in]modeinterrupt mode
Returns
status code
  • 0 success
  • 1 set interrupt mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1046 of file driver_hdc2080.c.

◆ hdc2080_set_interrupt_pin()

uint8_t hdc2080_set_interrupt_pin ( hdc2080_handle_t * handle,
hdc2080_bool_t enable )

enable or disable interrupt pin

Parameters
[in]*handlepointer to an hdc2080 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set interrupt pin failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 882 of file driver_hdc2080.c.

◆ hdc2080_set_interrupt_polarity()

uint8_t hdc2080_set_interrupt_polarity ( hdc2080_handle_t * handle,
hdc2080_interrupt_polarity_t polarity )

set interrupt polarity

Parameters
[in]*handlepointer to an hdc2080 handle structure
[in]polarityinterrupt polarity
Returns
status code
  • 0 success
  • 1 set interrupt polarity failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 964 of file driver_hdc2080.c.

◆ hdc2080_set_measurement()

uint8_t hdc2080_set_measurement ( hdc2080_handle_t * handle,
hdc2080_bool_t enable )

enable or disable measurement

Parameters
[in]*handlepointer to an hdc2080 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set measurement failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 591 of file driver_hdc2080.c.

◆ hdc2080_set_mode()

uint8_t hdc2080_set_mode ( hdc2080_handle_t * handle,
hdc2080_mode_t mode )

set the chip mode

Parameters
[in]*handlepointer to an hdc2080 handle structure
[in]modechip mode
Returns
status code
  • 0 success
  • 1 set mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 509 of file driver_hdc2080.c.

◆ hdc2080_set_temperature_high_threshold()

uint8_t hdc2080_set_temperature_high_threshold ( hdc2080_handle_t * handle,
uint8_t threshold )

set temperature high threshold

Parameters
[in]*handlepointer to an hdc2080 handle structure
[in]thresholdhigh threshold
Returns
status code
  • 0 success
  • 1 set temperature high threshold failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1276 of file driver_hdc2080.c.

◆ hdc2080_set_temperature_low_threshold()

uint8_t hdc2080_set_temperature_low_threshold ( hdc2080_handle_t * handle,
uint8_t threshold )

set temperature low threshold

Parameters
[in]*handlepointer to an hdc2080 handle structure
[in]thresholdlow threshold
Returns
status code
  • 0 success
  • 1 set temperature low threshold failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1350 of file driver_hdc2080.c.

◆ hdc2080_set_temperature_max()

uint8_t hdc2080_set_temperature_max ( hdc2080_handle_t * handle,
uint8_t max )

set temperature max

Parameters
[in]*handlepointer to an hdc2080 handle structure
[in]maxtemperature max
Returns
status code
  • 0 success
  • 1 set temperature max failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1730 of file driver_hdc2080.c.

◆ hdc2080_set_temperature_offset_adjustment()

uint8_t hdc2080_set_temperature_offset_adjustment ( hdc2080_handle_t * handle,
int8_t offset )

set temperature offset adjustment

Parameters
[in]*handlepointer to an hdc2080 handle structure
[in]offsettemperature offset
Returns
status code
  • 0 success
  • 1 set temperature offset adjustment failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1498 of file driver_hdc2080.c.

◆ hdc2080_set_temperature_resolution()

uint8_t hdc2080_set_temperature_resolution ( hdc2080_handle_t * handle,
hdc2080_resolution_t resolution )

set temperature resolution

Parameters
[in]*handlepointer to an hdc2080 handle structure
[in]resolutiontemperature resolution
Returns
status code
  • 0 success
  • 1 set temperature resolution failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 345 of file driver_hdc2080.c.

◆ hdc2080_soft_reset()

uint8_t hdc2080_soft_reset ( hdc2080_handle_t * handle)

soft reset

Parameters
[in]*handlepointer to an hdc2080 handle structure
Returns
status code
  • 0 success
  • 1 soft reset failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 672 of file driver_hdc2080.c.

◆ hdc2080_temperature_convert_to_data()

uint8_t hdc2080_temperature_convert_to_data ( hdc2080_handle_t * handle,
uint8_t reg,
float * deg )

convert the register raw data to the temperature

Parameters
[in]*handlepointer to an hdc2080 handle structure
[in]regregister raw data
[out]*degpointer to a deg buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1922 of file driver_hdc2080.c.

◆ hdc2080_temperature_convert_to_register()

uint8_t hdc2080_temperature_convert_to_register ( hdc2080_handle_t * handle,
float deg,
uint8_t * reg )

convert the temperature to the register raw data

Parameters
[in]*handlepointer to an hdc2080 handle structure
[in]degdegress
[out]*regpointer to a register raw buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1895 of file driver_hdc2080.c.

◆ hdc2080_temperature_offset_convert_to_data()

uint8_t hdc2080_temperature_offset_convert_to_data ( hdc2080_handle_t * handle,
int8_t reg,
float * deg )

convert the register raw data to the temperature offset

Parameters
[in]*handlepointer to an hdc2080 handle structure
[in]regregister raw data
[out]*degpointer to a deg buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2030 of file driver_hdc2080.c.

◆ hdc2080_temperature_offset_convert_to_register()

uint8_t hdc2080_temperature_offset_convert_to_register ( hdc2080_handle_t * handle,
float deg,
int8_t * reg )

convert the temperature offset to the register raw data

Parameters
[in]*handlepointer to an hdc2080 handle structure
[in]degdegress
[out]*regpointer to a register raw buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2003 of file driver_hdc2080.c.