LibDriver SHTC3
Loading...
Searching...
No Matches
shtc3 base driver function

shtc3 base driver modules More...

Collaboration diagram for shtc3 base driver function:

Data Structures

struct  shtc3_handle_s
 shtc3 handle structure definition More...
struct  shtc3_info_s
 shtc3 information structure definition More...

Typedefs

typedef struct shtc3_handle_s shtc3_handle_t
 shtc3 handle structure definition
typedef struct shtc3_info_s shtc3_info_t
 shtc3 information structure definition

Enumerations

enum  shtc3_bool_t { SHTC3_BOOL_FALSE = 0x00 , SHTC3_BOOL_TRUE = 0x01 }
 shtc3 bool enumeration definition More...

Functions

uint8_t shtc3_info (shtc3_info_t *info)
 get chip's information
uint8_t shtc3_init (shtc3_handle_t *handle)
 initialize the chip
uint8_t shtc3_deinit (shtc3_handle_t *handle)
 close the chip
uint8_t shtc3_read (shtc3_handle_t *handle, shtc3_bool_t clock_stretching_enable, uint16_t *temperature_raw, float *temperature_s, uint16_t *humidity_raw, float *humidity_s)
 normal read
uint8_t shtc3_read_low_power (shtc3_handle_t *handle, shtc3_bool_t clock_stretching_enable, uint16_t *temperature_raw, float *temperature_s, uint16_t *humidity_raw, float *humidity_s)
 read in low power mode
uint8_t shtc3_soft_reset (shtc3_handle_t *handle)
 soft reset the chip
uint8_t shtc3_sleep (shtc3_handle_t *handle)
 sleep
uint8_t shtc3_wakeup (shtc3_handle_t *handle)
 wakeup

Detailed Description

shtc3 base driver modules

Typedef Documentation

◆ shtc3_handle_t

shtc3 handle structure definition

◆ shtc3_info_t

typedef struct shtc3_info_s shtc3_info_t

shtc3 information structure definition

Enumeration Type Documentation

◆ shtc3_bool_t

shtc3 bool enumeration definition

Enumerator
SHTC3_BOOL_FALSE 

disable

SHTC3_BOOL_TRUE 

enable

Definition at line 62 of file driver_shtc3.h.

Function Documentation

◆ shtc3_deinit()

uint8_t shtc3_deinit ( shtc3_handle_t * handle)

close the chip

Parameters
[in]*handlepointer to a shtc3 handle structure
Returns
status code
  • 0 success
  • 1 iic deinit failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 reset failed
Note
none

Definition at line 251 of file driver_shtc3.c.

◆ shtc3_info()

uint8_t shtc3_info ( shtc3_info_t * info)

get chip's information

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

Definition at line 622 of file driver_shtc3.c.

◆ shtc3_init()

uint8_t shtc3_init ( shtc3_handle_t * handle)

initialize the chip

Parameters
[in]*handlepointer to a shtc3 handle structure
Returns
status code
  • 0 success
  • 1 iic initialization failed
  • 2 handle is NULL
  • 3 linked functions is NULL
  • 4 read id failed
  • 5 id is invalid
Note
none

Definition at line 149 of file driver_shtc3.c.

◆ shtc3_read()

uint8_t shtc3_read ( shtc3_handle_t * handle,
shtc3_bool_t clock_stretching_enable,
uint16_t * temperature_raw,
float * temperature_s,
uint16_t * humidity_raw,
float * humidity_s )

normal read

Parameters
[in]*handlepointer to a shtc3 handle structure
[in]clock_stretching_enableclock stretching bool value
[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 single read failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 301 of file driver_shtc3.c.

◆ shtc3_read_low_power()

uint8_t shtc3_read_low_power ( shtc3_handle_t * handle,
shtc3_bool_t clock_stretching_enable,
uint16_t * temperature_raw,
float * temperature_s,
uint16_t * humidity_raw,
float * humidity_s )

read in low power mode

Parameters
[in]*handlepointer to a shtc3 handle structure
[in]clock_stretching_enableclock stretching bool value
[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 single read failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 384 of file driver_shtc3.c.

◆ shtc3_sleep()

uint8_t shtc3_sleep ( shtc3_handle_t * handle)

sleep

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

Definition at line 499 of file driver_shtc3.c.

◆ shtc3_soft_reset()

uint8_t shtc3_soft_reset ( shtc3_handle_t * handle)

soft reset the chip

Parameters
[in]*handlepointer to a shtc3 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 462 of file driver_shtc3.c.

◆ shtc3_wakeup()

uint8_t shtc3_wakeup ( shtc3_handle_t * handle)

wakeup

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

Definition at line 535 of file driver_shtc3.c.