LibDriver SHT2X
Loading...
Searching...
No Matches
sht2x extend driver function

sht2x extend driver modules More...

Collaboration diagram for sht2x extend driver function:

Functions

uint8_t sht2x_set_reg (sht2x_handle_t *handle, uint8_t reg, uint8_t *data, uint16_t len)
 set the chip register
uint8_t sht2x_get_reg (sht2x_handle_t *handle, uint8_t reg, uint8_t *data, uint16_t len)
 get the chip register
uint8_t sht2x_get_reg16 (sht2x_handle_t *handle, uint16_t reg, uint8_t *data, uint16_t len)
 get the chip register16
uint8_t sht2x_set_cmd (sht2x_handle_t *handle, uint8_t *data, uint16_t len)
 set command
uint8_t sht2x_get_cmd (sht2x_handle_t *handle, uint8_t *data, uint16_t len)
 get command

Detailed Description

sht2x extend driver modules

Function Documentation

◆ sht2x_get_cmd()

uint8_t sht2x_get_cmd ( sht2x_handle_t * handle,
uint8_t * data,
uint16_t len )

get command

Parameters
[in]*handlepointer to a sht2x handle structure
[out]*datapointer to a data buffer
[in]lendata length
Returns
status code
  • 0 success
  • 1 read failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1132 of file driver_sht2x.c.

◆ sht2x_get_reg()

uint8_t sht2x_get_reg ( sht2x_handle_t * handle,
uint8_t reg,
uint8_t * data,
uint16_t len )

get the chip register

Parameters
[in]*handlepointer to a sht2x handle structure
[in]regiic register address
[out]*datapointer to a data buffer
[in]lendata length
Returns
status code
  • 0 success
  • 1 read failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1053 of file driver_sht2x.c.

◆ sht2x_get_reg16()

uint8_t sht2x_get_reg16 ( sht2x_handle_t * handle,
uint16_t reg,
uint8_t * data,
uint16_t len )

get the chip register16

Parameters
[in]*handlepointer to a sht2x handle structure
[in]regiic register address
[out]*datapointer to a data buffer
[in]lendata length
Returns
status code
  • 0 success
  • 1 read failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1080 of file driver_sht2x.c.

◆ sht2x_set_cmd()

uint8_t sht2x_set_cmd ( sht2x_handle_t * handle,
uint8_t * data,
uint16_t len )

set command

Parameters
[in]*handlepointer to a sht2x handle structure
[in]*datapointer to a data buffer
[in]lendata length
Returns
status code
  • 0 success
  • 1 write failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1106 of file driver_sht2x.c.

◆ sht2x_set_reg()

uint8_t sht2x_set_reg ( sht2x_handle_t * handle,
uint8_t reg,
uint8_t * data,
uint16_t len )

set the chip register

Parameters
[in]*handlepointer to a sht2x handle structure
[in]regiic register address
[in]*datapointer to a data buffer
[in]lendata length
Returns
status code
  • 0 success
  • 1 write failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1026 of file driver_sht2x.c.