![]() |
LibDriver STTS22H
|
stts22h base driver modules More...
Data Structures | |
| struct | stts22h_handle_s |
| stts22h handle structure definition More... | |
| struct | stts22h_info_s |
| stts22h information structure definition More... | |
Typedefs | |
| typedef struct stts22h_handle_s | stts22h_handle_t |
| stts22h handle structure definition | |
| typedef struct stts22h_info_s | stts22h_info_t |
| stts22h information structure definition | |
Enumerations | |
| enum | stts22h_address_t { STTS22H_ADDRESS_VDD = 0x70 , STTS22H_ADDRESS_15K = 0x78 , STTS22H_ADDRESS_56K = 0x7C , STTS22H_ADDRESS_GND = 0x7E } |
| stts22h address enumeration definition More... | |
| enum | stts22h_bool_t { STTS22H_BOOL_FALSE = 0x00 , STTS22H_BOOL_TRUE = 0x01 } |
| stts22h bool enumeration definition More... | |
| enum | stts22h_output_data_rate_t { STTS22H_OUTPUT_DATA_RATE_25HZ = 0x00 , STTS22H_OUTPUT_DATA_RATE_50HZ = 0x01 , STTS22H_OUTPUT_DATA_RATE_100HZ = 0x02 , STTS22H_OUTPUT_DATA_RATE_200HZ = 0x03 , STTS22H_OUTPUT_DATA_RATE_1HZ = 0x04 } |
| stts22h output data rate enumeration definition More... | |
| enum | stts22h_status_t { STTS22H_STATUS_UNDER_LOW_LIMIT = (1 << 2) , STTS22H_STATUS_OVER_HIGH_LIMIT = (1 << 1) } |
| stts22h status enumeration definition More... | |
Functions | |
| uint8_t | stts22h_info (stts22h_info_t *info) |
| get chip's information | |
| uint8_t | stts22h_set_addr_pin (stts22h_handle_t *handle, stts22h_address_t addr_pin) |
| set the iic address pin | |
| uint8_t | stts22h_get_addr_pin (stts22h_handle_t *handle, stts22h_address_t *addr_pin) |
| get the iic address pin | |
| uint8_t | stts22h_irq_handler (stts22h_handle_t *handle) |
| irq handler | |
| uint8_t | stts22h_init (stts22h_handle_t *handle) |
| initialize the chip | |
| uint8_t | stts22h_deinit (stts22h_handle_t *handle) |
| close the chip | |
| uint8_t | stts22h_single_read (stts22h_handle_t *handle, int16_t *raw, float *celsius_deg) |
| read data from the chip once | |
| uint8_t | stts22h_start_continuous_read (stts22h_handle_t *handle) |
| start the chip reading | |
| uint8_t | stts22h_stop_continuous_read (stts22h_handle_t *handle) |
| stop the chip reading | |
| uint8_t | stts22h_continuous_read (stts22h_handle_t *handle, int16_t *raw, float *celsius_deg) |
| read data from the chip continuously | |
| uint8_t | stts22h_set_temperature_high_limit (stts22h_handle_t *handle, uint8_t raw) |
| set temperature high limit | |
| uint8_t | stts22h_get_temperature_high_limit (stts22h_handle_t *handle, uint8_t *raw) |
| get temperature high limit | |
| uint8_t | stts22h_set_temperature_low_limit (stts22h_handle_t *handle, uint8_t raw) |
| set temperature low limit | |
| uint8_t | stts22h_get_temperature_low_limit (stts22h_handle_t *handle, uint8_t *raw) |
| get temperature low limit | |
| uint8_t | stts22h_set_output_data_rate (stts22h_handle_t *handle, stts22h_output_data_rate_t rate) |
| set output data rate | |
| uint8_t | stts22h_get_output_data_rate (stts22h_handle_t *handle, stts22h_output_data_rate_t *rate) |
| get output data rate | |
| uint8_t | stts22h_set_block_data_update (stts22h_handle_t *handle, stts22h_bool_t enable) |
| enable or disable block data update | |
| uint8_t | stts22h_get_block_data_update (stts22h_handle_t *handle, stts22h_bool_t *enable) |
| get block data update status | |
| uint8_t | stts22h_set_iic_address_auto_increment (stts22h_handle_t *handle, stts22h_bool_t enable) |
| enable or disable iic address auto increment | |
| uint8_t | stts22h_get_iic_address_auto_increment (stts22h_handle_t *handle, stts22h_bool_t *enable) |
| get iic address auto increment status | |
| uint8_t | stts22h_set_disable_smbus_timeout (stts22h_handle_t *handle, stts22h_bool_t enable) |
| enable or disable disable smbus timeout | |
| uint8_t | stts22h_get_disable_smbus_timeout (stts22h_handle_t *handle, stts22h_bool_t *enable) |
| get disable smbus timeout status | |
| uint8_t | stts22h_get_status (stts22h_handle_t *handle, uint8_t *status) |
| get status | |
| uint8_t | stts22h_temperature_convert_to_register (stts22h_handle_t *handle, float celsius_deg, uint8_t *reg) |
| convert the temperature to the register raw data | |
| uint8_t | stts22h_temperature_convert_to_data (stts22h_handle_t *handle, uint8_t reg, float *celsius_deg) |
| convert the register raw data to the temperature | |
stts22h base driver modules
| typedef struct stts22h_handle_s stts22h_handle_t |
stts22h handle structure definition
| typedef struct stts22h_info_s stts22h_info_t |
stts22h information structure definition
| enum stts22h_address_t |
stts22h address enumeration definition
Definition at line 62 of file driver_stts22h.h.
| enum stts22h_bool_t |
stts22h bool enumeration definition
| Enumerator | |
|---|---|
| STTS22H_BOOL_FALSE | false |
| STTS22H_BOOL_TRUE | true |
Definition at line 73 of file driver_stts22h.h.
stts22h output data rate enumeration definition
| Enumerator | |
|---|---|
| STTS22H_OUTPUT_DATA_RATE_25HZ | 25hz |
| STTS22H_OUTPUT_DATA_RATE_50HZ | 50hz |
| STTS22H_OUTPUT_DATA_RATE_100HZ | 100hz |
| STTS22H_OUTPUT_DATA_RATE_200HZ | 200hz |
| STTS22H_OUTPUT_DATA_RATE_1HZ | 1hz |
Definition at line 82 of file driver_stts22h.h.
| enum stts22h_status_t |
stts22h status enumeration definition
| Enumerator | |
|---|---|
| STTS22H_STATUS_UNDER_LOW_LIMIT | under low limit |
| STTS22H_STATUS_OVER_HIGH_LIMIT | over high limit |
Definition at line 94 of file driver_stts22h.h.
| uint8_t stts22h_continuous_read | ( | stts22h_handle_t * | handle, |
| int16_t * | raw, | ||
| float * | celsius_deg ) |
read data from the chip continuously
| [in] | *handle | pointer to a stts22h handle structure |
| [out] | *raw | pointer to a raw adc buffer |
| [out] | *celsius_deg | pointer to a celsius degrees buffer |
Definition at line 891 of file driver_stts22h.c.
| uint8_t stts22h_deinit | ( | stts22h_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to a stts22h handle structure |
Definition at line 1141 of file driver_stts22h.c.
| uint8_t stts22h_get_addr_pin | ( | stts22h_handle_t * | handle, |
| stts22h_address_t * | addr_pin ) |
get the iic address pin
| [in] | *handle | pointer to a stts22h handle structure |
| [out] | *addr_pin | pointer to an address pin buffer |
Definition at line 164 of file driver_stts22h.c.
| uint8_t stts22h_get_block_data_update | ( | stts22h_handle_t * | handle, |
| stts22h_bool_t * | enable ) |
get block data update status
| [in] | *handle | pointer to a stts22h handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 478 of file driver_stts22h.c.
| uint8_t stts22h_get_disable_smbus_timeout | ( | stts22h_handle_t * | handle, |
| stts22h_bool_t * | enable ) |
get disable smbus timeout status
| [in] | *handle | pointer to a stts22h handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 643 of file driver_stts22h.c.
| uint8_t stts22h_get_iic_address_auto_increment | ( | stts22h_handle_t * | handle, |
| stts22h_bool_t * | enable ) |
get iic address auto increment status
| [in] | *handle | pointer to a stts22h handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 561 of file driver_stts22h.c.
| uint8_t stts22h_get_output_data_rate | ( | stts22h_handle_t * | handle, |
| stts22h_output_data_rate_t * | rate ) |
get output data rate
| [in] | *handle | pointer to a stts22h handle structure |
| [out] | *rate | pointer to an output data rate buffer |
Definition at line 388 of file driver_stts22h.c.
| uint8_t stts22h_get_status | ( | stts22h_handle_t * | handle, |
| uint8_t * | status ) |
get status
| [in] | *handle | pointer to a stts22h handle structure |
| [out] | *status | pointer to a status buffer |
Definition at line 680 of file driver_stts22h.c.
| uint8_t stts22h_get_temperature_high_limit | ( | stts22h_handle_t * | handle, |
| uint8_t * | raw ) |
get temperature high limit
| [in] | *handle | pointer to a stts22h handle structure |
| [out] | *raw | pointer to a raw data buffer |
Definition at line 224 of file driver_stts22h.c.
| uint8_t stts22h_get_temperature_low_limit | ( | stts22h_handle_t * | handle, |
| uint8_t * | raw ) |
get temperature low limit
| [in] | *handle | pointer to a stts22h handle structure |
| [out] | *raw | pointer to a raw data buffer |
Definition at line 298 of file driver_stts22h.c.
| uint8_t stts22h_info | ( | stts22h_info_t * | info | ) |
get chip's information
| [out] | *info | pointer to a stts22h info structure |
Definition at line 1246 of file driver_stts22h.c.
| uint8_t stts22h_init | ( | stts22h_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to a stts22h handle structure |
Definition at line 1032 of file driver_stts22h.c.
| uint8_t stts22h_irq_handler | ( | stts22h_handle_t * | handle | ) |
irq handler
| [in] | *handle | pointer to a stts22h handle structure |
Definition at line 928 of file driver_stts22h.c.
| uint8_t stts22h_set_addr_pin | ( | stts22h_handle_t * | handle, |
| stts22h_address_t | addr_pin ) |
set the iic address pin
| [in] | *handle | pointer to a stts22h handle structure |
| [in] | addr_pin | address pin |
Definition at line 143 of file driver_stts22h.c.
| uint8_t stts22h_set_block_data_update | ( | stts22h_handle_t * | handle, |
| stts22h_bool_t | enable ) |
enable or disable block data update
| [in] | *handle | pointer to a stts22h handle structure |
| [in] | enable | bool value |
Definition at line 433 of file driver_stts22h.c.
| uint8_t stts22h_set_disable_smbus_timeout | ( | stts22h_handle_t * | handle, |
| stts22h_bool_t | enable ) |
enable or disable disable smbus timeout
| [in] | *handle | pointer to a stts22h handle structure |
| [in] | enable | bool value |
Definition at line 598 of file driver_stts22h.c.
| uint8_t stts22h_set_iic_address_auto_increment | ( | stts22h_handle_t * | handle, |
| stts22h_bool_t | enable ) |
enable or disable iic address auto increment
| [in] | *handle | pointer to a stts22h handle structure |
| [in] | enable | bool value |
Definition at line 515 of file driver_stts22h.c.
| uint8_t stts22h_set_output_data_rate | ( | stts22h_handle_t * | handle, |
| stts22h_output_data_rate_t | rate ) |
set output data rate
| [in] | *handle | pointer to a stts22h handle structure |
| [in] | rate | output data rate |
Definition at line 335 of file driver_stts22h.c.
| uint8_t stts22h_set_temperature_high_limit | ( | stts22h_handle_t * | handle, |
| uint8_t | raw ) |
set temperature high limit
| [in] | *handle | pointer to a stts22h handle structure |
| [in] | raw | raw data |
Definition at line 187 of file driver_stts22h.c.
| uint8_t stts22h_set_temperature_low_limit | ( | stts22h_handle_t * | handle, |
| uint8_t | raw ) |
set temperature low limit
| [in] | *handle | pointer to a stts22h handle structure |
| [in] | raw | raw data |
Definition at line 261 of file driver_stts22h.c.
| uint8_t stts22h_single_read | ( | stts22h_handle_t * | handle, |
| int16_t * | raw, | ||
| float * | celsius_deg ) |
read data from the chip once
| [in] | *handle | pointer to a stts22h handle structure |
| [out] | *raw | pointer to a raw adc buffer |
| [out] | *celsius_deg | pointer to a celsius degrees buffer |
Definition at line 719 of file driver_stts22h.c.
| uint8_t stts22h_start_continuous_read | ( | stts22h_handle_t * | handle | ) |
start the chip reading
| [in] | *handle | pointer to a stts22h handle structure |
Definition at line 800 of file driver_stts22h.c.
| uint8_t stts22h_stop_continuous_read | ( | stts22h_handle_t * | handle | ) |
stop the chip reading
| [in] | *handle | pointer to a stts22h handle structure |
Definition at line 844 of file driver_stts22h.c.
| uint8_t stts22h_temperature_convert_to_data | ( | stts22h_handle_t * | handle, |
| uint8_t | reg, | ||
| float * | celsius_deg ) |
convert the register raw data to the temperature
| [in] | *handle | pointer to a stts22h handle structure |
| [in] | reg | register raw data |
| [out] | *celsius_deg | pointer to a celsius degrees buffer |
Definition at line 1005 of file driver_stts22h.c.
| uint8_t stts22h_temperature_convert_to_register | ( | stts22h_handle_t * | handle, |
| float | celsius_deg, | ||
| uint8_t * | reg ) |
convert the temperature to the register raw data
| [in] | *handle | pointer to a stts22h handle structure |
| [in] | celsius_deg | celsius degrees |
| [out] | *reg | pointer to a register raw buffer |
Definition at line 978 of file driver_stts22h.c.