LibDriver HTU21D
Loading...
Searching...
No Matches
htu21d example driver function

htu21d example driver modules More...

Collaboration diagram for htu21d example driver function:

Macros

#define HTU21D_BASIC_DEFAULT_MODE   HTU21D_MODE_NO_HOLD_MASTER
 htu21d basic example default definition
#define HTU21D_BASIC_DEFAULT_RESOLUTION   HTU21D_RESOLUTION_TEMP_14_BITS_RH_12_BITS
#define HTU21D_BASIC_DEFAULT_HEATER   HTU21D_BOOL_FALSE
#define HTU21D_BASIC_DEFAULT_OTP_RELOAD   HTU21D_BOOL_FALSE

Functions

uint8_t htu21d_basic_init (void)
 basic example init
uint8_t htu21d_basic_read (float *temperature, float *humidity)
 basic example read
uint8_t htu21d_basic_deinit (void)
 basic example deinit
uint8_t htu21d_basic_get_serial_number (uint64_t *number)
 basic example get the serial number

Detailed Description

htu21d example driver modules

Macro Definition Documentation

◆ HTU21D_BASIC_DEFAULT_HEATER

#define HTU21D_BASIC_DEFAULT_HEATER   HTU21D_BOOL_FALSE

disable heater

Definition at line 58 of file driver_htu21d_basic.h.

◆ HTU21D_BASIC_DEFAULT_MODE

#define HTU21D_BASIC_DEFAULT_MODE   HTU21D_MODE_NO_HOLD_MASTER

htu21d basic example default definition

no hold master mode

Definition at line 56 of file driver_htu21d_basic.h.

◆ HTU21D_BASIC_DEFAULT_OTP_RELOAD

#define HTU21D_BASIC_DEFAULT_OTP_RELOAD   HTU21D_BOOL_FALSE

enable otp reload

Definition at line 59 of file driver_htu21d_basic.h.

◆ HTU21D_BASIC_DEFAULT_RESOLUTION

#define HTU21D_BASIC_DEFAULT_RESOLUTION   HTU21D_RESOLUTION_TEMP_14_BITS_RH_12_BITS

temp 14 bits and rh 12 bits

Definition at line 57 of file driver_htu21d_basic.h.

Function Documentation

◆ htu21d_basic_deinit()

uint8_t htu21d_basic_deinit ( void )

basic example deinit

Returns
status code
  • 0 success
  • 1 deinit failed
Note
none

Definition at line 149 of file driver_htu21d_basic.c.

Here is the call graph for this function:

◆ htu21d_basic_get_serial_number()

uint8_t htu21d_basic_get_serial_number ( uint64_t * number)

basic example get the serial number

Parameters
[out]*numberpointer to a number buffer
Returns
status code
  • 0 success
  • 1 get serial number failed
Note
none

Definition at line 170 of file driver_htu21d_basic.c.

Here is the call graph for this function:

◆ htu21d_basic_init()

uint8_t htu21d_basic_init ( void )

basic example init

Returns
status code
  • 0 success
  • 1 init failed
Note
none

Definition at line 48 of file driver_htu21d_basic.c.

Here is the call graph for this function:

◆ htu21d_basic_read()

uint8_t htu21d_basic_read ( float * temperature,
float * humidity )

basic example read

Parameters
[out]*temperaturepointer to a converted temperature buffer
[out]*humiditypointer to a converted humidity buffer
Returns
status code
  • 0 success
  • 1 read failed
Note
none

Definition at line 125 of file driver_htu21d_basic.c.

Here is the call graph for this function: