![]() |
LibDriver STS3X
|
sts3x base driver modules More...
Data Structures | |
| struct | sts3x_handle_s |
| sts3x handle structure definition More... | |
| struct | sts3x_info_s |
| sts3x information structure definition More... | |
Typedefs | |
| typedef struct sts3x_handle_s | sts3x_handle_t |
| sts3x handle structure definition | |
| typedef struct sts3x_info_s | sts3x_info_t |
| sts3x information structure definition | |
Enumerations | |
| enum | sts3x_address_t { STS3X_ADDRESS_0 = (0x4A << 1) , STS3X_ADDRESS_1 = (0x4B << 1) } |
| sts3x address enumeration definition More... | |
| enum | sts3x_bool_t { STS3X_BOOL_FALSE = 0x00 , STS3X_BOOL_TRUE = 0x01 } |
| sts3x bool enumeration definition More... | |
| enum | sts3x_rate_t { STS3X_RATE_0P5HZ = 0x20 , STS3X_RATE_1HZ = 0x21 , STS3X_RATE_2HZ = 0x22 , STS3X_RATE_4HZ = 0x23 , STS3X_RATE_10HZ = 0x27 } |
| sts3x rate enumeration definition More... | |
| enum | sts3x_repeatability_t { STS3X_REPEATABILITY_HIGH = 0x00 , STS3X_REPEATABILITY_MEDIUM = 0x01 , STS3X_REPEATABILITY_LOW = 0x02 } |
| sts3x repeatability enumeration definition More... | |
| enum | sts3x_status_t { STS3X_STATUS_ALERT_PENDING_STATUS = (1 << 15) , STS3X_STATUS_HEATER_ON = (1 << 13) , STS3X_STATUS_TEMPERATURE_ALERT = (1 << 10) , STS3X_STATUS_SYSTEM_RESET = (1 << 4) , STS3X_STATUS_COMMAND_STATUS = (1 << 1) , STS3X_STATUS_CHECKSUM_STATUS = (1 << 0) } |
| sts3x status enumeration definition More... | |
Functions | |
| uint8_t | sts3x_info (sts3x_info_t *info) |
| get chip's information | |
| uint8_t | sts3x_set_addr_pin (sts3x_handle_t *handle, sts3x_address_t addr_pin) |
| set the iic address pin | |
| uint8_t | sts3x_get_addr_pin (sts3x_handle_t *handle, sts3x_address_t *addr_pin) |
| get the iic address pin | |
| uint8_t | sts3x_init (sts3x_handle_t *handle) |
| initialize the chip | |
| uint8_t | sts3x_deinit (sts3x_handle_t *handle) |
| close the chip | |
| uint8_t | sts3x_single_read (sts3x_handle_t *handle, sts3x_bool_t clock_stretching_enable, uint16_t *temperature_raw, float *temperature_s) |
| read data once | |
| uint8_t | sts3x_start_continuous_read (sts3x_handle_t *handle, sts3x_rate_t rate) |
| start reading | |
| uint8_t | sts3x_stop_continuous_read (sts3x_handle_t *handle) |
| stop reading | |
| uint8_t | sts3x_continuous_read (sts3x_handle_t *handle, uint16_t *temperature_raw, float *temperature_s) |
| read data continuously | |
| uint8_t | sts3x_get_status (sts3x_handle_t *handle, uint16_t *status) |
| get the current status | |
| uint8_t | sts3x_clear_status (sts3x_handle_t *handle) |
| clear the current status | |
| uint8_t | sts3x_set_repeatability (sts3x_handle_t *handle, sts3x_repeatability_t repeatability) |
| set the measurement repeatability | |
| uint8_t | sts3x_get_repeatability (sts3x_handle_t *handle, sts3x_repeatability_t *repeatability) |
| get the measurement repeatability | |
| uint8_t | sts3x_soft_reset (sts3x_handle_t *handle) |
| soft reset the chip | |
| uint8_t | sts3x_set_heater (sts3x_handle_t *handle, sts3x_bool_t enable) |
| enable or disable the chip heater | |
sts3x base driver modules
| typedef struct sts3x_handle_s sts3x_handle_t |
sts3x handle structure definition
| typedef struct sts3x_info_s sts3x_info_t |
sts3x information structure definition
| enum sts3x_address_t |
sts3x address enumeration definition
| Enumerator | |
|---|---|
| STS3X_ADDRESS_0 | ADDR pin connected to GND |
| STS3X_ADDRESS_1 | ADDR pin connected to VCC |
Definition at line 62 of file driver_sts3x.h.
| enum sts3x_bool_t |
sts3x bool enumeration definition
| Enumerator | |
|---|---|
| STS3X_BOOL_FALSE | disable function |
| STS3X_BOOL_TRUE | enable function |
Definition at line 71 of file driver_sts3x.h.
| enum sts3x_rate_t |
sts3x rate enumeration definition
| Enumerator | |
|---|---|
| STS3X_RATE_0P5HZ | 0.5Hz sample rate |
| STS3X_RATE_1HZ | 1Hz sample rate |
| STS3X_RATE_2HZ | 2Hz sample rate |
| STS3X_RATE_4HZ | 4Hz sample rate |
| STS3X_RATE_10HZ | 10Hz sample rate |
Definition at line 80 of file driver_sts3x.h.
sts3x repeatability enumeration definition
| Enumerator | |
|---|---|
| STS3X_REPEATABILITY_HIGH | high repeatability |
| STS3X_REPEATABILITY_MEDIUM | medium repeatability |
| STS3X_REPEATABILITY_LOW | low repeatability |
Definition at line 92 of file driver_sts3x.h.
| enum sts3x_status_t |
sts3x status enumeration definition
Definition at line 102 of file driver_sts3x.h.
| uint8_t sts3x_clear_status | ( | sts3x_handle_t * | handle | ) |
clear the current status
| [in] | *handle | pointer to an sts3x handle structure |
Definition at line 346 of file driver_sts3x.c.
| uint8_t sts3x_continuous_read | ( | sts3x_handle_t * | handle, |
| uint16_t * | temperature_raw, | ||
| float * | temperature_s ) |
read data continuously
| [in] | *handle | pointer to an sts3x handle structure |
| [out] | *temperature_raw | pointer to a raw temperature buffer |
| [out] | *temperature_s | pointer to a converted temperature buffer |
Definition at line 707 of file driver_sts3x.c.
| uint8_t sts3x_deinit | ( | sts3x_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to an sts3x handle structure |
Definition at line 212 of file driver_sts3x.c.
| uint8_t sts3x_get_addr_pin | ( | sts3x_handle_t * | handle, |
| sts3x_address_t * | addr_pin ) |
get the iic address pin
| [in] | *handle | pointer to an sts3x handle structure |
| [out] | *addr_pin | pointer to a chip iic address pin buffer |
Definition at line 277 of file driver_sts3x.c.
| uint8_t sts3x_get_repeatability | ( | sts3x_handle_t * | handle, |
| sts3x_repeatability_t * | repeatability ) |
get the measurement repeatability
| [in] | *handle | pointer to an sts3x handle structure |
| [out] | *repeatability | pointer to a measurement repeatability buffer |
Definition at line 408 of file driver_sts3x.c.
| uint8_t sts3x_get_status | ( | sts3x_handle_t * | handle, |
| uint16_t * | status ) |
get the current status
| [in] | *handle | pointer to an sts3x handle structure |
| [out] | *status | pointer to a status buffer |
Definition at line 299 of file driver_sts3x.c.
| uint8_t sts3x_info | ( | sts3x_info_t * | info | ) |
get chip's information
| [out] | *info | pointer to an sts3x info structure |
Definition at line 889 of file driver_sts3x.c.
| uint8_t sts3x_init | ( | sts3x_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to an sts3x handle structure |
Definition at line 137 of file driver_sts3x.c.
| uint8_t sts3x_set_addr_pin | ( | sts3x_handle_t * | handle, |
| sts3x_address_t | addr_pin ) |
set the iic address pin
| [in] | *handle | pointer to an sts3x handle structure |
| [in] | addr_pin | chip iic address pin |
Definition at line 255 of file driver_sts3x.c.
| uint8_t sts3x_set_heater | ( | sts3x_handle_t * | handle, |
| sts3x_bool_t | enable ) |
enable or disable the chip heater
| [in] | *handle | pointer to an sts3x handle structure |
| [in] | enable | bool value |
Definition at line 790 of file driver_sts3x.c.
| uint8_t sts3x_set_repeatability | ( | sts3x_handle_t * | handle, |
| sts3x_repeatability_t | repeatability ) |
set the measurement repeatability
| [in] | *handle | pointer to an sts3x handle structure |
| [in] | repeatability | measurement repeatability |
Definition at line 382 of file driver_sts3x.c.
| uint8_t sts3x_single_read | ( | sts3x_handle_t * | handle, |
| sts3x_bool_t | clock_stretching_enable, | ||
| uint16_t * | temperature_raw, | ||
| float * | temperature_s ) |
read data once
| [in] | *handle | pointer to an sts3x 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 |
Definition at line 437 of file driver_sts3x.c.
| uint8_t sts3x_soft_reset | ( | sts3x_handle_t * | handle | ) |
soft reset the chip
| [in] | *handle | pointer to an sts3x handle structure |
Definition at line 752 of file driver_sts3x.c.
| uint8_t sts3x_start_continuous_read | ( | sts3x_handle_t * | handle, |
| sts3x_rate_t | rate ) |
start reading
| [in] | *handle | pointer to an sts3x handle structure |
| [in] | rate | sample rate |
Definition at line 541 of file driver_sts3x.c.
| uint8_t sts3x_stop_continuous_read | ( | sts3x_handle_t * | handle | ) |
stop reading
| [in] | *handle | pointer to an sts3x handle structure |
Definition at line 669 of file driver_sts3x.c.