![]() |
LibDriver SHT30
|
sht30 base driver modules More...
Data Structures | |
| struct | sht30_handle_s |
| sht30 handle structure definition More... | |
| struct | sht30_info_s |
| sht30 information structure definition More... | |
Typedefs | |
| typedef struct sht30_handle_s | sht30_handle_t |
| sht30 handle structure definition | |
| typedef struct sht30_info_s | sht30_info_t |
| sht30 information structure definition | |
Enumerations | |
| enum | sht30_address_t { SHT30_ADDRESS_0 = (0x44 << 1) , SHT30_ADDRESS_1 = (0x45 << 1) } |
| sht30 address enumeration definition More... | |
| enum | sht30_bool_t { SHT30_BOOL_FALSE = 0x00 , SHT30_BOOL_TRUE = 0x01 } |
| sht30 bool enumeration definition More... | |
| enum | sht30_rate_t { SHT30_RATE_0P5HZ = 0x20 , SHT30_RATE_1HZ = 0x21 , SHT30_RATE_2HZ = 0x22 , SHT30_RATE_4HZ = 0x23 , SHT30_RATE_10HZ = 0x27 } |
| sht30 rate enumeration definition More... | |
| enum | sht30_repeatability_t { SHT30_REPEATABILITY_HIGH = 0x00 , SHT30_REPEATABILITY_MEDIUM = 0x01 , SHT30_REPEATABILITY_LOW = 0x02 } |
| sht30 repeatability enumeration definition More... | |
| enum | sht30_status_t { SHT30_STATUS_ALERT_PENDING_STATUS = (1 << 15) , SHT30_STATUS_HEATER_ON = (1 << 13) , SHT30_STATUS_HUMIDITY_ALERT = (1 << 11) , SHT30_STATUS_TEMPERATURE_ALERT = (1 << 10) , SHT30_STATUS_SYSTEM_RESET = (1 << 4) , SHT30_STATUS_COMMAND_STATUS = (1 << 1) , SHT30_STATUS_CHECKSUM_STATUS = (1 << 0) } |
| sht30 status enumeration definition More... | |
Functions | |
| uint8_t | sht30_info (sht30_info_t *info) |
| get chip's information | |
| uint8_t | sht30_set_addr_pin (sht30_handle_t *handle, sht30_address_t addr_pin) |
| set the iic address pin | |
| uint8_t | sht30_get_addr_pin (sht30_handle_t *handle, sht30_address_t *addr_pin) |
| get the iic address pin | |
| uint8_t | sht30_irq_handler (sht30_handle_t *handle) |
| irq handler | |
| uint8_t | sht30_init (sht30_handle_t *handle) |
| initialize the chip | |
| uint8_t | sht30_deinit (sht30_handle_t *handle) |
| close the chip | |
| uint8_t | sht30_single_read (sht30_handle_t *handle, sht30_bool_t clock_stretching_enable, uint16_t *temperature_raw, float *temperature_s, uint16_t *humidity_raw, float *humidity_s) |
| read data once | |
| uint8_t | sht30_start_continuous_read (sht30_handle_t *handle, sht30_rate_t rate) |
| start reading | |
| uint8_t | sht30_stop_continuous_read (sht30_handle_t *handle) |
| stop reading | |
| uint8_t | sht30_continuous_read (sht30_handle_t *handle, uint16_t *temperature_raw, float *temperature_s, uint16_t *humidity_raw, float *humidity_s) |
| read data continuously | |
| uint8_t | sht30_get_status (sht30_handle_t *handle, uint16_t *status) |
| get the current status | |
| uint8_t | sht30_clear_status (sht30_handle_t *handle) |
| clear the current status | |
| uint8_t | sht30_set_repeatability (sht30_handle_t *handle, sht30_repeatability_t repeatability) |
| set the measurement repeatability | |
| uint8_t | sht30_get_repeatability (sht30_handle_t *handle, sht30_repeatability_t *repeatability) |
| get the measurement repeatability | |
| uint8_t | sht30_set_art (sht30_handle_t *handle) |
| set the chip art | |
| uint8_t | sht30_soft_reset (sht30_handle_t *handle) |
| soft reset the chip | |
| uint8_t | sht30_set_heater (sht30_handle_t *handle, sht30_bool_t enable) |
| enable or disable the chip heater | |
| uint8_t | sht30_get_serial_number (sht30_handle_t *handle, uint8_t sn[4]) |
| get serial number | |
| uint8_t | sht30_set_high_alert_limit (sht30_handle_t *handle, uint16_t set, uint16_t clear) |
| set high alert limit | |
| uint8_t | sht30_get_high_alert_limit (sht30_handle_t *handle, uint16_t *set, uint16_t *clear) |
| get high alert limit | |
| uint8_t | sht30_set_low_alert_limit (sht30_handle_t *handle, uint16_t set, uint16_t clear) |
| set low alert limit | |
| uint8_t | sht30_get_low_alert_limit (sht30_handle_t *handle, uint16_t *set, uint16_t *clear) |
| get low alert limit | |
| uint8_t | sht30_alert_limit_convert_to_register (sht30_handle_t *handle, float temperature, float humidity, uint16_t *reg) |
| alert limit convert to register raw data | |
sht30 base driver modules
| typedef struct sht30_handle_s sht30_handle_t |
sht30 handle structure definition
| typedef struct sht30_info_s sht30_info_t |
sht30 information structure definition
| enum sht30_address_t |
sht30 address enumeration definition
| Enumerator | |
|---|---|
| SHT30_ADDRESS_0 | ADDR pin connected to GND |
| SHT30_ADDRESS_1 | ADDR pin connected to VCC |
Definition at line 63 of file driver_sht30.h.
| enum sht30_bool_t |
sht30 bool enumeration definition
| Enumerator | |
|---|---|
| SHT30_BOOL_FALSE | disable function |
| SHT30_BOOL_TRUE | enable function |
Definition at line 72 of file driver_sht30.h.
| enum sht30_rate_t |
sht30 rate enumeration definition
| Enumerator | |
|---|---|
| SHT30_RATE_0P5HZ | 0.5Hz sample rate |
| SHT30_RATE_1HZ | 1Hz sample rate |
| SHT30_RATE_2HZ | 2Hz sample rate |
| SHT30_RATE_4HZ | 4Hz sample rate |
| SHT30_RATE_10HZ | 10Hz sample rate |
Definition at line 81 of file driver_sht30.h.
sht30 repeatability enumeration definition
| Enumerator | |
|---|---|
| SHT30_REPEATABILITY_HIGH | high repeatability |
| SHT30_REPEATABILITY_MEDIUM | medium repeatability |
| SHT30_REPEATABILITY_LOW | low repeatability |
Definition at line 93 of file driver_sht30.h.
| enum sht30_status_t |
sht30 status enumeration definition
Definition at line 103 of file driver_sht30.h.
| uint8_t sht30_alert_limit_convert_to_register | ( | sht30_handle_t * | handle, |
| float | temperature, | ||
| float | humidity, | ||
| uint16_t * | reg ) |
alert limit convert to register raw data
| [in] | *handle | pointer to an sht30 handle structure |
| [in] | temperature | converted temperature |
| [in] | humidity | converted humidity |
| [out] | *reg | pointer to a register raw buffer |
Definition at line 1225 of file driver_sht30.c.
| uint8_t sht30_clear_status | ( | sht30_handle_t * | handle | ) |
clear the current status
| [in] | *handle | pointer to an sht30 handle structure |
Definition at line 385 of file driver_sht30.c.
| uint8_t sht30_continuous_read | ( | sht30_handle_t * | handle, |
| uint16_t * | temperature_raw, | ||
| float * | temperature_s, | ||
| uint16_t * | humidity_raw, | ||
| float * | humidity_s ) |
read data continuously
| [in] | *handle | pointer to an sht30 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 760 of file driver_sht30.c.
| uint8_t sht30_deinit | ( | sht30_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to an sht30 handle structure |
Definition at line 249 of file driver_sht30.c.
| uint8_t sht30_get_addr_pin | ( | sht30_handle_t * | handle, |
| sht30_address_t * | addr_pin ) |
get the iic address pin
| [in] | *handle | pointer to an sht30 handle structure |
| [out] | *addr_pin | pointer to a chip iic address pin buffer |
Definition at line 314 of file driver_sht30.c.
| uint8_t sht30_get_high_alert_limit | ( | sht30_handle_t * | handle, |
| uint16_t * | set, | ||
| uint16_t * | clear ) |
get high alert limit
| [in] | *handle | pointer to an sht30 handle structure |
| [out] | *set | pointer to a high alert limit set buffer |
| [out] | *clear | pointer to a high alert limit clear buffer |
Definition at line 1047 of file driver_sht30.c.
| uint8_t sht30_get_low_alert_limit | ( | sht30_handle_t * | handle, |
| uint16_t * | set, | ||
| uint16_t * | clear ) |
get low alert limit
| [in] | *handle | pointer to an sht30 handle structure |
| [out] | *set | pointer to a low alert limit set buffer |
| [out] | *clear | pointer to a low alert limit clear buffer |
Definition at line 1163 of file driver_sht30.c.
| uint8_t sht30_get_repeatability | ( | sht30_handle_t * | handle, |
| sht30_repeatability_t * | repeatability ) |
get the measurement repeatability
| [in] | *handle | pointer to an sht30 handle structure |
| [out] | *repeatability | pointer to a measurement repeatability buffer |
Definition at line 447 of file driver_sht30.c.
| uint8_t sht30_get_serial_number | ( | sht30_handle_t * | handle, |
| uint8_t | sn[4] ) |
get serial number
| [in] | *handle | pointer to an sht30 handle structure |
| [out] | *sn | pointer to a serial number buffer |
Definition at line 938 of file driver_sht30.c.
| uint8_t sht30_get_status | ( | sht30_handle_t * | handle, |
| uint16_t * | status ) |
get the current status
| [in] | *handle | pointer to an sht30 handle structure |
| [out] | *status | pointer to a status buffer |
Definition at line 337 of file driver_sht30.c.
| uint8_t sht30_info | ( | sht30_info_t * | info | ) |
get chip's information
| [out] | *info | pointer to an sht30 info structure |
Definition at line 1387 of file driver_sht30.c.
| uint8_t sht30_init | ( | sht30_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to an sht30 handle structure |
Definition at line 175 of file driver_sht30.c.
| uint8_t sht30_irq_handler | ( | sht30_handle_t * | handle | ) |
irq handler
| [in] | *handle | pointer to an sht30 handle structure |
Definition at line 1258 of file driver_sht30.c.
| uint8_t sht30_set_addr_pin | ( | sht30_handle_t * | handle, |
| sht30_address_t | addr_pin ) |
set the iic address pin
| [in] | *handle | pointer to an sht30 handle structure |
| [in] | addr_pin | chip iic address pin |
Definition at line 292 of file driver_sht30.c.
| uint8_t sht30_set_art | ( | sht30_handle_t * | handle | ) |
set the chip art
| [in] | *handle | pointer to an sht30 handle structure |
Definition at line 815 of file driver_sht30.c.
| uint8_t sht30_set_heater | ( | sht30_handle_t * | handle, |
| sht30_bool_t | enable ) |
enable or disable the chip heater
| [in] | *handle | pointer to an sht30 handle structure |
| [in] | enable | bool value |
Definition at line 888 of file driver_sht30.c.
| uint8_t sht30_set_high_alert_limit | ( | sht30_handle_t * | handle, |
| uint16_t | set, | ||
| uint16_t | clear ) |
set high alert limit
| [in] | *handle | pointer to an sht30 handle structure |
| [in] | set | high alert limit set |
| [in] | clear | high alert limit clear |
Definition at line 993 of file driver_sht30.c.
| uint8_t sht30_set_low_alert_limit | ( | sht30_handle_t * | handle, |
| uint16_t | set, | ||
| uint16_t | clear ) |
set low alert limit
| [in] | *handle | pointer to an sht30 handle structure |
| [in] | set | low alert limit set |
| [in] | clear | low alert limit clear |
Definition at line 1109 of file driver_sht30.c.
| uint8_t sht30_set_repeatability | ( | sht30_handle_t * | handle, |
| sht30_repeatability_t | repeatability ) |
set the measurement repeatability
| [in] | *handle | pointer to an sht30 handle structure |
| [in] | repeatability | measurement repeatability |
Definition at line 421 of file driver_sht30.c.
| uint8_t sht30_single_read | ( | sht30_handle_t * | handle, |
| sht30_bool_t | clock_stretching_enable, | ||
| uint16_t * | temperature_raw, | ||
| float * | temperature_s, | ||
| uint16_t * | humidity_raw, | ||
| float * | humidity_s ) |
read data once
| [in] | *handle | pointer to an sht30 handle structure |
| [in] | clock_stretching_enable | clock stretching bool value |
| [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 478 of file driver_sht30.c.
| uint8_t sht30_soft_reset | ( | sht30_handle_t * | handle | ) |
soft reset the chip
| [in] | *handle | pointer to an sht30 handle structure |
Definition at line 851 of file driver_sht30.c.
| uint8_t sht30_start_continuous_read | ( | sht30_handle_t * | handle, |
| sht30_rate_t | rate ) |
start reading
| [in] | *handle | pointer to an sht30 handle structure |
| [in] | rate | sample rate |
Definition at line 592 of file driver_sht30.c.
| uint8_t sht30_stop_continuous_read | ( | sht30_handle_t * | handle | ) |
stop reading
| [in] | *handle | pointer to an sht30 handle structure |
Definition at line 720 of file driver_sht30.c.