![]() |
LibDriver SCD4X
|
scd4x basic driver modules More...
Data Structures | |
| struct | scd4x_handle_s |
| scd4x handle structure definition More... | |
| struct | scd4x_info_s |
| scd4x information structure definition More... | |
Typedefs | |
| typedef struct scd4x_handle_s | scd4x_handle_t |
| scd4x handle structure definition | |
| typedef struct scd4x_info_s | scd4x_info_t |
| scd4x information structure definition | |
Enumerations | |
| enum | scd4x_t { SCD40 = 0x00 , SCD41 = 0x01 , SCD43 = 0x02 } |
| scd4x type enumeration definition More... | |
| enum | scd4x_bool_t { SCD4X_BOOL_FALSE = 0x00 , SCD4X_BOOL_TRUE = 0x01 } |
| scd4x bool enumeration definition More... | |
Functions | |
| uint8_t | scd4x_info (scd4x_info_t *info) |
| get chip information | |
| uint8_t | scd4x_set_type (scd4x_handle_t *handle, scd4x_t type) |
| set type | |
| uint8_t | scd4x_get_type (scd4x_handle_t *handle, scd4x_t *type) |
| get type | |
| uint8_t | scd4x_init (scd4x_handle_t *handle) |
| initialize the chip | |
| uint8_t | scd4x_deinit (scd4x_handle_t *handle) |
| close the chip | |
| uint8_t | scd4x_start_periodic_measurement (scd4x_handle_t *handle) |
| start periodic measurement | |
| uint8_t | scd4x_read (scd4x_handle_t *handle, uint16_t *co2_raw, uint16_t *co2_ppm, uint16_t *temperature_raw, float *temperature_s, uint16_t *humidity_raw, float *humidity_s) |
| read data | |
| uint8_t | scd4x_stop_periodic_measurement (scd4x_handle_t *handle) |
| stop periodic measurement | |
| uint8_t | scd4x_set_temperature_offset (scd4x_handle_t *handle, uint16_t offset) |
| set temperature offset | |
| uint8_t | scd4x_get_temperature_offset (scd4x_handle_t *handle, uint16_t *offset) |
| get temperature offset | |
| uint8_t | scd4x_temperature_offset_convert_to_register (scd4x_handle_t *handle, float degrees, uint16_t *reg) |
| convert the temperature offset to the register raw data | |
| uint8_t | scd4x_temperature_offset_convert_to_data (scd4x_handle_t *handle, uint16_t reg, float *degrees) |
| convert the register raw data to the temperature offset | |
| uint8_t | scd4x_set_sensor_altitude (scd4x_handle_t *handle, uint16_t altitude) |
| set sensor altitude | |
| uint8_t | scd4x_get_sensor_altitude (scd4x_handle_t *handle, uint16_t *altitude) |
| get sensor altitude | |
| uint8_t | scd4x_sensor_altitude_convert_to_register (scd4x_handle_t *handle, float m, uint16_t *reg) |
| convert the sensor altitude to the register raw data | |
| uint8_t | scd4x_sensor_altitude_convert_to_data (scd4x_handle_t *handle, uint16_t reg, float *m) |
| convert the register raw data to the sensor altitude | |
| uint8_t | scd4x_set_ambient_pressure (scd4x_handle_t *handle, uint16_t pressure) |
| set ambient pressure | |
| uint8_t | scd4x_get_ambient_pressure (scd4x_handle_t *handle, uint16_t *pressure) |
| get ambient pressure | |
| uint8_t | scd4x_ambient_pressure_convert_to_register (scd4x_handle_t *handle, float pa, uint16_t *reg) |
| convert the ambient pressure to the register raw data | |
| uint8_t | scd4x_ambient_pressure_convert_to_data (scd4x_handle_t *handle, uint16_t reg, float *pa) |
| convert the register raw data to the ambient pressure | |
| uint8_t | scd4x_perform_forced_recalibration (scd4x_handle_t *handle, uint16_t co2_raw, uint16_t *frc) |
| perform forced recalibration | |
| uint8_t | scd4x_co2_convert_to_register (scd4x_handle_t *handle, float ppm, uint16_t *reg) |
| convert the co2 to the register raw data | |
| uint8_t | scd4x_co2_convert_to_data (scd4x_handle_t *handle, uint16_t reg, float *ppm) |
| convert the register raw data to the co2 | |
| uint8_t | scd4x_set_automatic_self_calibration (scd4x_handle_t *handle, scd4x_bool_t enable) |
| enable or disable automatic self calibration | |
| uint8_t | scd4x_get_automatic_self_calibration (scd4x_handle_t *handle, scd4x_bool_t *enable) |
| get automatic self calibration status | |
| uint8_t | scd4x_start_low_power_periodic_measurement (scd4x_handle_t *handle) |
| start low power periodic measurement | |
| uint8_t | scd4x_get_data_ready_status (scd4x_handle_t *handle, scd4x_bool_t *enable) |
| get data ready status | |
| uint8_t | scd4x_persist_settings (scd4x_handle_t *handle) |
| persist settings | |
| uint8_t | scd4x_get_serial_number (scd4x_handle_t *handle, uint16_t number[3]) |
| get serial number | |
| uint8_t | scd4x_perform_self_test (scd4x_handle_t *handle, scd4x_bool_t *malfunction_detected) |
| perform self test | |
| uint8_t | scd4x_perform_factory_reset (scd4x_handle_t *handle) |
| perform factory reset | |
| uint8_t | scd4x_reinit (scd4x_handle_t *handle) |
| reinit | |
scd4x basic driver modules
| typedef struct scd4x_handle_s scd4x_handle_t |
scd4x handle structure definition
| typedef struct scd4x_info_s scd4x_info_t |
scd4x information structure definition
| enum scd4x_bool_t |
scd4x bool enumeration definition
| Enumerator | |
|---|---|
| SCD4X_BOOL_FALSE | false |
| SCD4X_BOOL_TRUE | true |
Definition at line 72 of file driver_scd4x.h.
| enum scd4x_t |
scd4x type enumeration definition
| Enumerator | |
|---|---|
| SCD40 | scd40 |
| SCD41 | scd41 |
| SCD43 | scd43 |
Definition at line 62 of file driver_scd4x.h.
| uint8_t scd4x_ambient_pressure_convert_to_data | ( | scd4x_handle_t * | handle, |
| uint16_t | reg, | ||
| float * | pa ) |
convert the register raw data to the ambient pressure
| [in] | *handle | pointer to an scd4x handle structure |
| [in] | reg | register raw data |
| [out] | *pa | pointer to a pa buffer |
Definition at line 846 of file driver_scd4x.c.
| uint8_t scd4x_ambient_pressure_convert_to_register | ( | scd4x_handle_t * | handle, |
| float | pa, | ||
| uint16_t * | reg ) |
convert the ambient pressure to the register raw data
| [in] | *handle | pointer to an scd4x handle structure |
| [in] | pa | set pa |
| [out] | *reg | pointer to a register raw buffer |
Definition at line 819 of file driver_scd4x.c.
| uint8_t scd4x_co2_convert_to_data | ( | scd4x_handle_t * | handle, |
| uint16_t | reg, | ||
| float * | ppm ) |
convert the register raw data to the co2
| [in] | *handle | pointer to an scd4x handle structure |
| [in] | reg | register raw data |
| [out] | *ppm | pointer to a ppm buffer |
Definition at line 950 of file driver_scd4x.c.
| uint8_t scd4x_co2_convert_to_register | ( | scd4x_handle_t * | handle, |
| float | ppm, | ||
| uint16_t * | reg ) |
convert the co2 to the register raw data
| [in] | *handle | pointer to an scd4x handle structure |
| [in] | ppm | set ppm |
| [out] | *reg | pointer to a register raw buffer |
Definition at line 923 of file driver_scd4x.c.
| uint8_t scd4x_deinit | ( | scd4x_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to an scd4x handle structure |
Definition at line 1800 of file driver_scd4x.c.
| uint8_t scd4x_get_ambient_pressure | ( | scd4x_handle_t * | handle, |
| uint16_t * | pressure ) |
get ambient pressure
| [in] | *handle | pointer to an scd4x handle structure |
| [out] | *pressure | pointer to a pressure buffer |
Definition at line 776 of file driver_scd4x.c.
| uint8_t scd4x_get_automatic_self_calibration | ( | scd4x_handle_t * | handle, |
| scd4x_bool_t * | enable ) |
get automatic self calibration status
| [in] | *handle | pointer to an scd4x handle structure |
| [out] | *enable | pointer to a bool buffer |
Definition at line 1020 of file driver_scd4x.c.
| uint8_t scd4x_get_data_ready_status | ( | scd4x_handle_t * | handle, |
| scd4x_bool_t * | enable ) |
get data ready status
| [in] | *handle | pointer to an scd4x handle structure |
| [out] | *enable | pointer to a bool buffer |
Definition at line 1100 of file driver_scd4x.c.
| uint8_t scd4x_get_sensor_altitude | ( | scd4x_handle_t * | handle, |
| uint16_t * | altitude ) |
get sensor altitude
| [in] | *handle | pointer to an scd4x handle structure |
| [out] | *altitude | pointer to an altitude buffer |
Definition at line 638 of file driver_scd4x.c.
| uint8_t scd4x_get_serial_number | ( | scd4x_handle_t * | handle, |
| uint16_t | number[3] ) |
get serial number
| [in] | *handle | pointer to an scd4x handle structure |
| [out] | *number | pointer to a number buffer |
Definition at line 1188 of file driver_scd4x.c.
| uint8_t scd4x_get_temperature_offset | ( | scd4x_handle_t * | handle, |
| uint16_t * | offset ) |
get temperature offset
| [in] | *handle | pointer to an scd4x handle structure |
| [out] | *offset | pointer to a temperature offset buffer |
Definition at line 500 of file driver_scd4x.c.
| uint8_t scd4x_get_type | ( | scd4x_handle_t * | handle, |
| scd4x_t * | type ) |
get type
| [in] | *handle | pointer to an scd4x handle structure |
| [out] | *type | pointer to a chip type buffer |
Definition at line 274 of file driver_scd4x.c.
| uint8_t scd4x_info | ( | scd4x_info_t * | info | ) |
get chip information
| [out] | *info | pointer to an scd4x info structure |
Definition at line 1894 of file driver_scd4x.c.
| uint8_t scd4x_init | ( | scd4x_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to an scd4x handle structure |
Definition at line 1737 of file driver_scd4x.c.
| uint8_t scd4x_perform_factory_reset | ( | scd4x_handle_t * | handle | ) |
perform factory reset
| [in] | *handle | pointer to an scd4x handle structure |
Definition at line 1297 of file driver_scd4x.c.
| uint8_t scd4x_perform_forced_recalibration | ( | scd4x_handle_t * | handle, |
| uint16_t | co2_raw, | ||
| uint16_t * | frc ) |
perform forced recalibration
| [in] | *handle | pointer to an scd4x handle structure |
| [in] | co2_raw | co2 raw data |
| [out] | *frc | pointer to a frc buffer |
Definition at line 875 of file driver_scd4x.c.
| uint8_t scd4x_perform_self_test | ( | scd4x_handle_t * | handle, |
| scd4x_bool_t * | malfunction_detected ) |
perform self test
| [in] | *handle | pointer to an scd4x handle structure |
| [out] | *malfunction_detected | pointer to a bool value buffer |
Definition at line 1246 of file driver_scd4x.c.
| uint8_t scd4x_persist_settings | ( | scd4x_handle_t * | handle | ) |
persist settings
| [in] | *handle | pointer to an scd4x handle structure |
Definition at line 1151 of file driver_scd4x.c.
| uint8_t scd4x_read | ( | scd4x_handle_t * | handle, |
| uint16_t * | co2_raw, | ||
| uint16_t * | co2_ppm, | ||
| uint16_t * | temperature_raw, | ||
| float * | temperature_s, | ||
| uint16_t * | humidity_raw, | ||
| float * | humidity_s ) |
read data
| [in] | *handle | pointer to an scd4x 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 |
Definition at line 338 of file driver_scd4x.c.
| uint8_t scd4x_reinit | ( | scd4x_handle_t * | handle | ) |
reinit
| [in] | *handle | pointer to an scd4x handle structure |
Definition at line 1332 of file driver_scd4x.c.
| uint8_t scd4x_sensor_altitude_convert_to_data | ( | scd4x_handle_t * | handle, |
| uint16_t | reg, | ||
| float * | m ) |
convert the register raw data to the sensor altitude
| [in] | *handle | pointer to an scd4x handle structure |
| [in] | reg | register raw data |
| [out] | *m | pointer to an m buffer |
Definition at line 708 of file driver_scd4x.c.
| uint8_t scd4x_sensor_altitude_convert_to_register | ( | scd4x_handle_t * | handle, |
| float | m, | ||
| uint16_t * | reg ) |
convert the sensor altitude to the register raw data
| [in] | *handle | pointer to an scd4x handle structure |
| [in] | m | set m |
| [out] | *reg | pointer to a register raw buffer |
Definition at line 681 of file driver_scd4x.c.
| uint8_t scd4x_set_ambient_pressure | ( | scd4x_handle_t * | handle, |
| uint16_t | pressure ) |
set ambient pressure
| [in] | *handle | pointer to an scd4x handle structure |
| [in] | pressure | set pressure |
Definition at line 735 of file driver_scd4x.c.
| uint8_t scd4x_set_automatic_self_calibration | ( | scd4x_handle_t * | handle, |
| scd4x_bool_t | enable ) |
enable or disable automatic self calibration
| [in] | *handle | pointer to an scd4x handle structure |
| [in] | enable | bool value |
Definition at line 977 of file driver_scd4x.c.
| uint8_t scd4x_set_sensor_altitude | ( | scd4x_handle_t * | handle, |
| uint16_t | altitude ) |
set sensor altitude
| [in] | *handle | pointer to an scd4x handle structure |
| [in] | altitude | set altitude |
Definition at line 597 of file driver_scd4x.c.
| uint8_t scd4x_set_temperature_offset | ( | scd4x_handle_t * | handle, |
| uint16_t | offset ) |
set temperature offset
| [in] | *handle | pointer to an scd4x handle structure |
| [in] | offset | temperature offset |
Definition at line 459 of file driver_scd4x.c.
| uint8_t scd4x_set_type | ( | scd4x_handle_t * | handle, |
| scd4x_t | type ) |
set type
| [in] | *handle | pointer to an scd4x handle structure |
| [in] | type | chip type |
Definition at line 253 of file driver_scd4x.c.
| uint8_t scd4x_start_low_power_periodic_measurement | ( | scd4x_handle_t * | handle | ) |
start low power periodic measurement
| [in] | *handle | pointer to an scd4x handle structure |
Definition at line 1064 of file driver_scd4x.c.
| uint8_t scd4x_start_periodic_measurement | ( | scd4x_handle_t * | handle | ) |
start periodic measurement
| [in] | *handle | pointer to an scd4x handle structure |
Definition at line 296 of file driver_scd4x.c.
| uint8_t scd4x_stop_periodic_measurement | ( | scd4x_handle_t * | handle | ) |
stop periodic measurement
| [in] | *handle | pointer to an scd4x handle structure |
Definition at line 423 of file driver_scd4x.c.
| uint8_t scd4x_temperature_offset_convert_to_data | ( | scd4x_handle_t * | handle, |
| uint16_t | reg, | ||
| float * | degrees ) |
convert the register raw data to the temperature offset
| [in] | *handle | pointer to an scd4x handle structure |
| [in] | reg | register raw data |
| [out] | *degrees | pointer to a temperature offset buffer |
Definition at line 570 of file driver_scd4x.c.
| uint8_t scd4x_temperature_offset_convert_to_register | ( | scd4x_handle_t * | handle, |
| float | degrees, | ||
| uint16_t * | reg ) |
convert the temperature offset to the register raw data
| [in] | *handle | pointer to an scd4x handle structure |
| [in] | degrees | set degrees |
| [out] | *reg | pointer to a register raw buffer |
Definition at line 543 of file driver_scd4x.c.