![]() |
LibDriver SHT2X
|
sht2x base driver modules More...
Data Structures | |
| struct | sht2x_handle_s |
| sht2x handle structure definition More... | |
| struct | sht2x_info_s |
| sht2x information structure definition More... | |
Typedefs | |
| typedef struct sht2x_handle_s | sht2x_handle_t |
| sht2x handle structure definition | |
| typedef struct sht2x_info_s | sht2x_info_t |
| sht2x information structure definition | |
Enumerations | |
| enum | sht2x_bool_t { SHT2X_BOOL_FALSE = 0x00 , SHT2X_BOOL_TRUE = 0x01 } |
| sht2x bool enumeration definition More... | |
| enum | sht2x_status_t { SHT35_STATUS_VDD_OVER_2P25V = 0 , SHT35_STATUS_VDD_LESS_2P25V = 1 } |
| sht2x status enumeration definition More... | |
| enum | sht2x_mode_t { SHT2X_MODE_HOLD_MASTER = 0x00 , SHT2X_MODE_NO_HOLD_MASTER = 0x01 } |
| sht2x mode enumeration definition More... | |
| enum | sht2x_resolution_t { SHT2X_RESOLUTION_RH_12BIT_T_14BIT = 0x00 , SHT2X_RESOLUTION_RH_8BIT_T_12BIT = 0x01 , SHT2X_RESOLUTION_RH_10BIT_T_13BIT = 0x02 , SHT2X_RESOLUTION_RH_11BIT_T_11BIT = 0x03 } |
| sht2x resolution enumeration definition More... | |
Functions | |
| uint8_t | sht2x_info (sht2x_info_t *info) |
| get chip's information | |
| uint8_t | sht2x_init (sht2x_handle_t *handle) |
| initialize the chip | |
| uint8_t | sht2x_deinit (sht2x_handle_t *handle) |
| close the chip | |
| uint8_t | sht2x_read (sht2x_handle_t *handle, uint16_t *temperature_raw, float *temperature_s, uint16_t *humidity_raw, float *humidity_s) |
| read data | |
| uint8_t | sht2x_set_mode (sht2x_handle_t *handle, sht2x_mode_t mode) |
| set chip mode | |
| uint8_t | sht2x_get_mode (sht2x_handle_t *handle, sht2x_mode_t *mode) |
| get chip mode | |
| uint8_t | sht2x_soft_reset (sht2x_handle_t *handle) |
| soft reset the chip | |
| uint8_t | sht2x_set_resolution (sht2x_handle_t *handle, sht2x_resolution_t resolution) |
| set resolution | |
| uint8_t | sht2x_get_resolution (sht2x_handle_t *handle, sht2x_resolution_t *resolution) |
| get resolution | |
| uint8_t | sht2x_set_heater (sht2x_handle_t *handle, sht2x_bool_t enable) |
| enable or disable heater | |
| uint8_t | sht2x_get_heater (sht2x_handle_t *handle, sht2x_bool_t *enable) |
| get heater status | |
| uint8_t | sht2x_set_disable_otp_reload (sht2x_handle_t *handle, sht2x_bool_t enable) |
| enable or disable disable otp reload | |
| uint8_t | sht2x_get_disable_otp_reload (sht2x_handle_t *handle, sht2x_bool_t *enable) |
| get disable otp reload status | |
| uint8_t | sht2x_get_status (sht2x_handle_t *handle, sht2x_status_t *status) |
| get status | |
| uint8_t | sht2x_get_serial_number (sht2x_handle_t *handle, uint8_t sn[8]) |
| get serial number | |
sht2x base driver modules
| typedef struct sht2x_handle_s sht2x_handle_t |
sht2x handle structure definition
| typedef struct sht2x_info_s sht2x_info_t |
sht2x information structure definition
| enum sht2x_bool_t |
sht2x bool enumeration definition
| Enumerator | |
|---|---|
| SHT2X_BOOL_FALSE | disable |
| SHT2X_BOOL_TRUE | enable |
Definition at line 62 of file driver_sht2x.h.
| enum sht2x_mode_t |
sht2x mode enumeration definition
| Enumerator | |
|---|---|
| SHT2X_MODE_HOLD_MASTER | hold master mode |
| SHT2X_MODE_NO_HOLD_MASTER | no hold master mode |
Definition at line 80 of file driver_sht2x.h.
| enum sht2x_resolution_t |
sht2x resolution enumeration definition
Definition at line 89 of file driver_sht2x.h.
| enum sht2x_status_t |
sht2x status enumeration definition
| Enumerator | |
|---|---|
| SHT35_STATUS_VDD_OVER_2P25V | vdd > 2.25v |
| SHT35_STATUS_VDD_LESS_2P25V | vdd < 2.25v |
Definition at line 71 of file driver_sht2x.h.
| uint8_t sht2x_deinit | ( | sht2x_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to a sht2x handle structure |
Definition at line 336 of file driver_sht2x.c.
| uint8_t sht2x_get_disable_otp_reload | ( | sht2x_handle_t * | handle, |
| sht2x_bool_t * | enable ) |
get disable otp reload status
| [in] | *handle | pointer to a sht2x handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 645 of file driver_sht2x.c.
| uint8_t sht2x_get_heater | ( | sht2x_handle_t * | handle, |
| sht2x_bool_t * | enable ) |
get heater status
| [in] | *handle | pointer to a sht2x handle structure |
| [out] | *enable | pointer to bool value buffer |
Definition at line 558 of file driver_sht2x.c.
| uint8_t sht2x_get_mode | ( | sht2x_handle_t * | handle, |
| sht2x_mode_t * | mode ) |
get chip mode
| [in] | *handle | pointer to a sht2x handle structure |
| [out] | *mode | pointer to a chip mode buffer |
Definition at line 748 of file driver_sht2x.c.
| uint8_t sht2x_get_resolution | ( | sht2x_handle_t * | handle, |
| sht2x_resolution_t * | resolution ) |
get resolution
| [in] | *handle | pointer to a sht2x handle structure |
| [out] | *resolution | pointer to a resolution buffer |
Definition at line 469 of file driver_sht2x.c.
| uint8_t sht2x_get_serial_number | ( | sht2x_handle_t * | handle, |
| uint8_t | sn[8] ) |
get serial number
| [in] | *handle | pointer to a sht2x handle structure |
| [out] | *sn | pointer to a serial number buffer |
Definition at line 933 of file driver_sht2x.c.
| uint8_t sht2x_get_status | ( | sht2x_handle_t * | handle, |
| sht2x_status_t * | status ) |
get status
| [in] | *handle | pointer to a sht2x handle structure |
| [out] | *status | pointer to a status buffer |
Definition at line 684 of file driver_sht2x.c.
| uint8_t sht2x_info | ( | sht2x_info_t * | info | ) |
get chip's information
| [out] | *info | pointer to a sht2x info structure |
Definition at line 1154 of file driver_sht2x.c.
| uint8_t sht2x_init | ( | sht2x_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to a sht2x handle structure |
Definition at line 236 of file driver_sht2x.c.
| uint8_t sht2x_read | ( | sht2x_handle_t * | handle, |
| uint16_t * | temperature_raw, | ||
| float * | temperature_s, | ||
| uint16_t * | humidity_raw, | ||
| float * | humidity_s ) |
read data
| [in] | *handle | pointer to a sht2x handle structure |
| [out] | *temperature_raw | pointer to a raw temperature buffer |
| [out] | *temperature_s | pointer to a converted temperature buffer |
| [out] | *humidity_raw | pointer to a raw humidity buffer |
| [out] | *humidity_s | pointer to a converted humidity buffer |
Definition at line 779 of file driver_sht2x.c.
| uint8_t sht2x_set_disable_otp_reload | ( | sht2x_handle_t * | handle, |
| sht2x_bool_t | enable ) |
enable or disable disable otp reload
| [in] | *handle | pointer to a sht2x handle structure |
| [in] | enable | bool value |
Definition at line 597 of file driver_sht2x.c.
| uint8_t sht2x_set_heater | ( | sht2x_handle_t * | handle, |
| sht2x_bool_t | enable ) |
enable or disable heater
| [in] | *handle | pointer to a sht2x handle structure |
| [in] | enable | bool value |
Definition at line 510 of file driver_sht2x.c.
| uint8_t sht2x_set_mode | ( | sht2x_handle_t * | handle, |
| sht2x_mode_t | mode ) |
set chip mode
| [in] | *handle | pointer to a sht2x handle structure |
| [in] | mode | chip mode |
Definition at line 722 of file driver_sht2x.c.
| uint8_t sht2x_set_resolution | ( | sht2x_handle_t * | handle, |
| sht2x_resolution_t | resolution ) |
set resolution
| [in] | *handle | pointer to a sht2x handle structure |
| [in] | resolution | chip resolution |
Definition at line 418 of file driver_sht2x.c.
| uint8_t sht2x_soft_reset | ( | sht2x_handle_t * | handle | ) |
soft reset the chip
| [in] | *handle | pointer to a sht2x handle structure |
Definition at line 380 of file driver_sht2x.c.