![]() |
LibDriver STCC4
|
stcc4 basic driver modules More...
Data Structures | |
| struct | stcc4_handle_s |
| stcc4 handle structure definition More... | |
| struct | stcc4_info_s |
| stcc4 information structure definition More... | |
Typedefs | |
| typedef struct stcc4_handle_s | stcc4_handle_t |
| stcc4 handle structure definition | |
| typedef struct stcc4_info_s | stcc4_info_t |
| stcc4 information structure definition | |
Enumerations | |
| enum | stcc4_address_t { STCC4_ADDRESS_0 = (0x64 << 1) , STCC4_ADDRESS_1 = (0x65 << 1) } |
| stcc4 address enumeration definition More... | |
| enum | stcc4_bool_t { STCC4_BOOL_FALSE = 0x00 , STCC4_BOOL_TRUE = 0x01 } |
| stcc4 bool enumeration definition More... | |
Functions | |
| uint8_t | stcc4_info (stcc4_info_t *info) |
| get chip information | |
| uint8_t | stcc4_set_address_pin (stcc4_handle_t *handle, stcc4_address_t address) |
| set address pin | |
| uint8_t | stcc4_get_address_pin (stcc4_handle_t *handle, stcc4_address_t *address) |
| get address pin | |
| uint8_t | stcc4_init (stcc4_handle_t *handle) |
| initialize the chip | |
| uint8_t | stcc4_deinit (stcc4_handle_t *handle) |
| close the chip | |
| uint8_t | stcc4_read (stcc4_handle_t *handle, int16_t *co2_raw, int16_t *co2_ppm, uint16_t *temperature_raw, float *temperature_s, uint16_t *humidity_raw, float *humidity_s, uint16_t *sensor_status) |
| read data | |
| uint8_t | stcc4_start_continuous_measurement (stcc4_handle_t *handle) |
| start continuous measurement | |
| uint8_t | stcc4_stop_continuous_measurement (stcc4_handle_t *handle) |
| stop continuous measurement | |
| uint8_t | stcc4_set_rht_compensation (stcc4_handle_t *handle, uint16_t temperature_raw, uint16_t humidity_raw) |
| set rht compensation | |
| uint8_t | stcc4_set_pressure_compensation (stcc4_handle_t *handle, uint16_t pressure_raw) |
| set pressure compensation | |
| uint8_t | stcc4_measure_single_shot (stcc4_handle_t *handle) |
| measure single shot | |
| uint8_t | stcc4_enter_sleep_mode (stcc4_handle_t *handle) |
| enter sleep mode | |
| uint8_t | stcc4_exit_sleep_mode (stcc4_handle_t *handle) |
| exit sleep mode | |
| uint8_t | stcc4_perform_conditioning (stcc4_handle_t *handle) |
| perform conditioning | |
| uint8_t | stcc4_perform_soft_reset (stcc4_handle_t *handle) |
| perform soft reset | |
| uint8_t | stcc4_perform_factory_reset (stcc4_handle_t *handle) |
| perform factory reset | |
| uint8_t | stcc4_perform_self_test (stcc4_handle_t *handle, uint16_t *result) |
| perform self test | |
| uint8_t | stcc4_enable_testing_mode (stcc4_handle_t *handle) |
| enable testing mode | |
| uint8_t | stcc4_disable_testing_mode (stcc4_handle_t *handle) |
| disable testing mode | |
| uint8_t | stcc4_perform_forced_recalibration (stcc4_handle_t *handle, uint16_t target_co2, uint16_t *correct_co2) |
| perform forced recalibration | |
| uint8_t | stcc4_get_product_id (stcc4_handle_t *handle, uint32_t *product_id, uint8_t unique_serial_number[8]) |
| get product id | |
| uint8_t | stcc4_frc_co2_convert_to_register (stcc4_handle_t *handle, float ppm, uint16_t *reg) |
| convert the frc co2 to the register raw data | |
| uint8_t | stcc4_frc_co2_convert_to_data (stcc4_handle_t *handle, uint16_t reg, float *ppm) |
| convert the register raw data to frc co2 ppm | |
| uint8_t | stcc4_humidity_convert_to_register (stcc4_handle_t *handle, float percentage, uint16_t *reg) |
| convert the humidity to the register raw data | |
| uint8_t | stcc4_humidity_convert_to_data (stcc4_handle_t *handle, uint16_t reg, float *percentage) |
| convert the register raw data to humidity | |
| uint8_t | stcc4_temperature_convert_to_register (stcc4_handle_t *handle, float deg, uint16_t *reg) |
| convert the temperature to the register raw data | |
| uint8_t | stcc4_temperature_convert_to_data (stcc4_handle_t *handle, uint16_t reg, float *deg) |
| convert the register raw data to temperature | |
| uint8_t | stcc4_pressure_convert_to_register (stcc4_handle_t *handle, float pa, uint16_t *reg) |
| convert the pressure to the register raw data | |
| uint8_t | stcc4_pressure_convert_to_data (stcc4_handle_t *handle, uint16_t reg, float *pa) |
| convert the register raw data to pressure | |
stcc4 basic driver modules
| typedef struct stcc4_handle_s stcc4_handle_t |
stcc4 handle structure definition
| typedef struct stcc4_info_s stcc4_info_t |
stcc4 information structure definition
| enum stcc4_address_t |
stcc4 address enumeration definition
| Enumerator | |
|---|---|
| STCC4_ADDRESS_0 | addr pin connected to the GND |
| STCC4_ADDRESS_1 | addr pin connected to the VCC |
Definition at line 62 of file driver_stcc4.h.
| enum stcc4_bool_t |
stcc4 bool enumeration definition
| Enumerator | |
|---|---|
| STCC4_BOOL_FALSE | false |
| STCC4_BOOL_TRUE | true |
Definition at line 71 of file driver_stcc4.h.
| uint8_t stcc4_deinit | ( | stcc4_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to an stcc4 handle structure |
Definition at line 1049 of file driver_stcc4.c.
| uint8_t stcc4_disable_testing_mode | ( | stcc4_handle_t * | handle | ) |
disable testing mode
| [in] | *handle | pointer to an stcc4 handle structure |
Definition at line 719 of file driver_stcc4.c.
| uint8_t stcc4_enable_testing_mode | ( | stcc4_handle_t * | handle | ) |
enable testing mode
| [in] | *handle | pointer to an stcc4 handle structure |
Definition at line 685 of file driver_stcc4.c.
| uint8_t stcc4_enter_sleep_mode | ( | stcc4_handle_t * | handle | ) |
enter sleep mode
| [in] | *handle | pointer to an stcc4 handle structure |
Definition at line 469 of file driver_stcc4.c.
| uint8_t stcc4_exit_sleep_mode | ( | stcc4_handle_t * | handle | ) |
exit sleep mode
| [in] | *handle | pointer to an stcc4 handle structure |
Definition at line 503 of file driver_stcc4.c.
| uint8_t stcc4_frc_co2_convert_to_data | ( | stcc4_handle_t * | handle, |
| uint16_t | reg, | ||
| float * | ppm ) |
convert the register raw data to frc co2 ppm
| [in] | *handle | pointer to a stcc4 handle structure |
| [in] | reg | register raw data |
| [out] | *ppm | pointer to a ppm buffer |
Definition at line 1118 of file driver_stcc4.c.
| uint8_t stcc4_frc_co2_convert_to_register | ( | stcc4_handle_t * | handle, |
| float | ppm, | ||
| uint16_t * | reg ) |
convert the frc co2 to the register raw data
| [in] | *handle | pointer to a stcc4 handle structure |
| [in] | ppm | co2 ppm |
| [out] | *reg | pointer to a register raw buffer |
Definition at line 1091 of file driver_stcc4.c.
| uint8_t stcc4_get_address_pin | ( | stcc4_handle_t * | handle, |
| stcc4_address_t * | address ) |
get address pin
| [in] | *handle | pointer to a stcc4 handle structure |
| [out] | *address | pointer to an address buffer |
Definition at line 258 of file driver_stcc4.c.
| uint8_t stcc4_get_product_id | ( | stcc4_handle_t * | handle, |
| uint32_t * | product_id, | ||
| uint8_t | unique_serial_number[8] ) |
get product id
| [in] | *handle | pointer to a stcc4 handle structure |
| [out] | *product_id | pointer to a product id buffer |
| [out] | *unique_serial_number | pointer to a unique serial number buffer |
Definition at line 806 of file driver_stcc4.c.
| uint8_t stcc4_humidity_convert_to_data | ( | stcc4_handle_t * | handle, |
| uint16_t | reg, | ||
| float * | percentage ) |
convert the register raw data to humidity
| [in] | *handle | pointer to a stcc4 handle structure |
| [in] | reg | register raw data |
| [out] | *percentage | pointer to a percentage buffer |
Definition at line 1172 of file driver_stcc4.c.
| uint8_t stcc4_humidity_convert_to_register | ( | stcc4_handle_t * | handle, |
| float | percentage, | ||
| uint16_t * | reg ) |
convert the humidity to the register raw data
| [in] | *handle | pointer to a stcc4 handle structure |
| [in] | percentage | humidity percentage |
| [out] | *reg | pointer to a register raw buffer |
Definition at line 1145 of file driver_stcc4.c.
| uint8_t stcc4_info | ( | stcc4_info_t * | info | ) |
get chip information
| [out] | *info | pointer to an stcc4 info structure |
Definition at line 1359 of file driver_stcc4.c.
| uint8_t stcc4_init | ( | stcc4_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to an stcc4 handle structure |
Definition at line 947 of file driver_stcc4.c.
| uint8_t stcc4_measure_single_shot | ( | stcc4_handle_t * | handle | ) |
measure single shot
| [in] | *handle | pointer to an stcc4 handle structure |
Definition at line 434 of file driver_stcc4.c.
| uint8_t stcc4_perform_conditioning | ( | stcc4_handle_t * | handle | ) |
perform conditioning
| [in] | *handle | pointer to an stcc4 handle structure |
Definition at line 533 of file driver_stcc4.c.
| uint8_t stcc4_perform_factory_reset | ( | stcc4_handle_t * | handle | ) |
perform factory reset
| [in] | *handle | pointer to an stcc4 handle structure |
Definition at line 598 of file driver_stcc4.c.
| uint8_t stcc4_perform_forced_recalibration | ( | stcc4_handle_t * | handle, |
| uint16_t | target_co2, | ||
| uint16_t * | correct_co2 ) |
perform forced recalibration
| [in] | *handle | pointer to a stcc4 handle structure |
| [in] | target_co2 | input target co2 |
| [out] | *correct_co2 | pointer to a correct co2 buffer |
Definition at line 756 of file driver_stcc4.c.
| uint8_t stcc4_perform_self_test | ( | stcc4_handle_t * | handle, |
| uint16_t * | result ) |
perform self test
| [in] | *handle | pointer to a stcc4 handle structure |
| [out] | *result | pointer to a result buffer |
Definition at line 643 of file driver_stcc4.c.
| uint8_t stcc4_perform_soft_reset | ( | stcc4_handle_t * | handle | ) |
perform soft reset
| [in] | *handle | pointer to an stcc4 handle structure |
Definition at line 567 of file driver_stcc4.c.
| uint8_t stcc4_pressure_convert_to_data | ( | stcc4_handle_t * | handle, |
| uint16_t | reg, | ||
| float * | pa ) |
convert the register raw data to pressure
| [in] | *handle | pointer to a stcc4 handle structure |
| [in] | reg | register raw data |
| [out] | *pa | pointer to a pressure buffer |
Definition at line 1280 of file driver_stcc4.c.
| uint8_t stcc4_pressure_convert_to_register | ( | stcc4_handle_t * | handle, |
| float | pa, | ||
| uint16_t * | reg ) |
convert the pressure to the register raw data
| [in] | *handle | pointer to a stcc4 handle structure |
| [in] | pa | pressure pascal |
| [out] | *reg | pointer to a register raw buffer |
Definition at line 1253 of file driver_stcc4.c.
| uint8_t stcc4_read | ( | stcc4_handle_t * | handle, |
| int16_t * | co2_raw, | ||
| int16_t * | co2_ppm, | ||
| uint16_t * | temperature_raw, | ||
| float * | temperature_s, | ||
| uint16_t * | humidity_raw, | ||
| float * | humidity_s, | ||
| uint16_t * | sensor_status ) |
read data
| [in] | *handle | pointer to a stcc4 handle structure |
| [out] | *co2_raw | pointer to a co2 raw buffer |
| [out] | *co2_ppm | pointer to a co2 ppm buffer |
| [out] | *temperature_raw | pointer to a temperature raw buffer |
| [out] | *temperature_s | pointer to a temperature buffer |
| [out] | *humidity_raw | pointer to a humidity raw buffer |
| [out] | *humidity_s | pointer to a humidity buffer |
| [out] | *sensor_status | pointer to a sensor status buffer |
Definition at line 870 of file driver_stcc4.c.
| uint8_t stcc4_set_address_pin | ( | stcc4_handle_t * | handle, |
| stcc4_address_t | address ) |
set address pin
| [in] | *handle | pointer to a stcc4 handle structure |
| [in] | address | address pin |
Definition at line 237 of file driver_stcc4.c.
| uint8_t stcc4_set_pressure_compensation | ( | stcc4_handle_t * | handle, |
| uint16_t | pressure_raw ) |
set pressure compensation
| [in] | *handle | pointer to a stcc4 handle structure |
| [in] | pressure_raw | raw pressure |
Definition at line 395 of file driver_stcc4.c.
| uint8_t stcc4_set_rht_compensation | ( | stcc4_handle_t * | handle, |
| uint16_t | temperature_raw, | ||
| uint16_t | humidity_raw ) |
set rht compensation
| [in] | *handle | pointer to a stcc4 handle structure |
| [in] | temperature_raw | raw temperature |
| [in] | humidity_raw | raw humidity |
Definition at line 352 of file driver_stcc4.c.
| uint8_t stcc4_start_continuous_measurement | ( | stcc4_handle_t * | handle | ) |
start continuous measurement
| [in] | *handle | pointer to an stcc4 handle structure |
Definition at line 280 of file driver_stcc4.c.
| uint8_t stcc4_stop_continuous_measurement | ( | stcc4_handle_t * | handle | ) |
stop continuous measurement
| [in] | *handle | pointer to an stcc4 handle structure |
Definition at line 315 of file driver_stcc4.c.
| uint8_t stcc4_temperature_convert_to_data | ( | stcc4_handle_t * | handle, |
| uint16_t | reg, | ||
| float * | deg ) |
convert the register raw data to temperature
| [in] | *handle | pointer to a stcc4 handle structure |
| [in] | reg | register raw data |
| [out] | *deg | pointer to a degrees buffer |
Definition at line 1226 of file driver_stcc4.c.
| uint8_t stcc4_temperature_convert_to_register | ( | stcc4_handle_t * | handle, |
| float | deg, | ||
| uint16_t * | reg ) |
convert the temperature to the register raw data
| [in] | *handle | pointer to a stcc4 handle structure |
| [in] | deg | celsius degrees |
| [out] | *reg | pointer to a register raw buffer |
Definition at line 1199 of file driver_stcc4.c.