Nordic Thingy:52 v2.2.0
|
CCS811 series ultra-low power digital gas sensor API. More...
Data Structures | |
struct | drv_ccs811_alg_result_t |
The algorithm result data of the CCS811 device. More... | |
struct | drv_ccs811_cfg_t |
CCS811 configuration. More... | |
Enumerations | |
enum | { DRV_CCS811_STATUS_CODE_SUCCESS, DRV_CCS811_STATUS_CODE_DISALLOWED, DRV_CCS811_STATUS_CODE_INVALID_PARAM, DRV_CCS811_STATUS_CODE_NOT_SUPPORTED } |
The CCS811 status codes. More... | |
enum | drv_ccs811_alg_result_descr_t { DRV_CCS811_ALG_RESULT_DESCR_ECO2_ONLY = 0, DRV_CCS811_ALG_RESULT_DESCR_TVOC_ONLY, DRV_CCS811_ALG_RESULT_DESCR_ECO2_TVOC, DRV_CCS811_ALG_RESULT_DESCR_ECO2_TVOC_STAT, DRV_CCS811_ALG_RESULT_DESCR_ALL } |
Descriptor of the CCS811 result data format. More... | |
Functions | |
uint32_t | drv_ccs811_alg_result_data_get (drv_ccs811_alg_result_descr_t alg_result_descr, drv_ccs811_alg_result_t *p_alg_result_data) |
Function for getting the calculation result data of the CCS811 device. More... | |
uint32_t | drv_ccs811_app_start (void) |
Function for starting the application of the CCS811 device. More... | |
uint32_t | drv_ccs811_baseline_get (uint16_t *p_baseline) |
Function for getting the baseline value from the CCS811 device. More... | |
uint32_t | drv_ccs811_baseline_set (uint16_t baseline) |
Function for writing the baseline value to the CCS811 device. More... | |
uint32_t | drv_ccs811_close (void) |
Function for closing the CCS811 driver. More... | |
uint32_t | drv_ccs811_env_data_set (uint16_t rh_ppth, int32_t temp_mdeg) |
Function for setting the environmental data of the CCS811 device. More... | |
uint32_t | drv_ccs811_err_id_get (uint8_t *p_err_id) |
Function for getting the error identifier of the CCS811 device. More... | |
uint32_t | drv_ccs811_fw_app_version_get (uint16_t *p_fw_app_version) |
Function for getting the version of the firmware application of the CCS811 device. More... | |
uint32_t | drv_ccs811_fw_boot_version_get (uint16_t *p_fw_boot_version) |
Function for getting the version of the firmware bootloader of the CCS811 device. More... | |
uint32_t | drv_ccs811_hw_id_get (uint8_t *p_hw_id) |
Function for getting the hardware identity of the CCS811 device. More... | |
uint32_t | drv_ccs811_hw_version_get (uint8_t *p_hw_version) |
Function for getting the hardware version of the CCS811 device. More... | |
void | drv_ccs811_init (void) |
Function for initializing the CCS811 driver. | |
uint32_t | drv_ccs811_meas_mode_get (uint8_t *p_meas_mode) |
Function for getting the measurement mode of the CCS811 device. More... | |
uint32_t | drv_ccs811_meas_mode_modify (uint8_t set_mask, uint8_t clr_mask) |
Function for modifying the measurement mode register of the CCS811 device. More... | |
uint32_t | drv_ccs811_ntc_get (uint16_t *p_r_ref_mv, uint16_t *p_r_ntc_mv) |
Function for getting the NTC data of the CCS811 device. More... | |
uint32_t | drv_ccs811_open (drv_ccs811_cfg_t const *const p_drv_ccs811_cfg) |
Function for opening the CCS811 driver according to the specified configuration. More... | |
uint32_t | drv_ccs811_raw_data_get (uint16_t *p_raw_data) |
Function for getting the raw data of the CCS811 device. More... | |
uint32_t | drv_ccs811_status_get (uint8_t *p_status) |
Function for getting the status of the CCS811 device. More... | |
uint32_t | drv_ccs811_sw_reset (void) |
Function for starting the application of the CCS811 device. More... | |
uint32_t | drv_ccs811_thresholds_get (uint16_t *p_low_to_medium, uint16_t *p_medium_to_high, uint8_t *p_hysteresis) |
Function for the thresholds of the CCS811 device. More... | |
uint32_t | drv_ccs811_thresholds_set (uint16_t low_to_medium, uint16_t medium_to_highm, uint8_t hysteresis) |
Function for setting the thresholds of the CCS811 device. More... | |
CCS811 series ultra-low power digital gas sensor API.
anonymous enum |
Descriptor of the CCS811 result data format.
uint32_t drv_ccs811_alg_result_data_get | ( | drv_ccs811_alg_result_descr_t | alg_result_descr, |
drv_ccs811_alg_result_t * | p_alg_result_data | ||
) |
Function for getting the calculation result data of the CCS811 device.
[in] | alg_result_descr | Descriptor for the format of the result (i.e. what values are requested). |
[in] | p_alg_result_data | Pointer to where the calculation result data is to be stored. |
uint32_t drv_ccs811_app_start | ( | void | ) |
Function for starting the application of the CCS811 device.
uint32_t drv_ccs811_baseline_get | ( | uint16_t * | p_baseline | ) |
Function for getting the baseline value from the CCS811 device.
[out] | p_baseline | Pointer to value. |
uint32_t drv_ccs811_baseline_set | ( | uint16_t | baseline | ) |
Function for writing the baseline value to the CCS811 device.
[in] | baseline | Value to write. |
uint32_t drv_ccs811_close | ( | void | ) |
Function for closing the CCS811 driver.
uint32_t drv_ccs811_env_data_set | ( | uint16_t | rh_ppth, |
int32_t | temp_mdeg | ||
) |
Function for setting the environmental data of the CCS811 device.
[in] | rh_ppth | Relative humidity in parts per thousand. |
[in] | temp_mdeg | Temperature in millidegrees Centigrade. |
uint32_t drv_ccs811_err_id_get | ( | uint8_t * | p_err_id | ) |
Function for getting the error identifier of the CCS811 device.
[in] | p_err_id | Pointer to where the error identifier is to be stored. |
uint32_t drv_ccs811_fw_app_version_get | ( | uint16_t * | p_fw_app_version | ) |
Function for getting the version of the firmware application of the CCS811 device.
[in] | p_fw_app_version | Pointer to where the hardware identity is to be stored. |
uint32_t drv_ccs811_fw_boot_version_get | ( | uint16_t * | p_fw_boot_version | ) |
Function for getting the version of the firmware bootloader of the CCS811 device.
[in] | p_fw_boot_version | Pointer to where the hardware identity is to be stored. |
uint32_t drv_ccs811_hw_id_get | ( | uint8_t * | p_hw_id | ) |
Function for getting the hardware identity of the CCS811 device.
[in] | p_hw_id | Pointer to where the hardware identity is to be stored. |
uint32_t drv_ccs811_hw_version_get | ( | uint8_t * | p_hw_version | ) |
Function for getting the hardware version of the CCS811 device.
[in] | p_hw_version | Pointer to where the hardware version is to be stored. |
uint32_t drv_ccs811_meas_mode_get | ( | uint8_t * | p_meas_mode | ) |
Function for getting the measurement mode of the CCS811 device.
[in] | p_meas_mode | Pointer to where the status is to be stored. |
uint32_t drv_ccs811_meas_mode_modify | ( | uint8_t | set_mask, |
uint8_t | clr_mask | ||
) |
Function for modifying the measurement mode register of the CCS811 device.
[in] | set_mask | A mask specifying which bits to set. |
[in] | clr_mask | A mask specifying which bits to clear. |
uint32_t drv_ccs811_ntc_get | ( | uint16_t * | p_r_ref_mv, |
uint16_t * | p_r_ntc_mv | ||
) |
Function for getting the NTC data of the CCS811 device.
[in] | p_r_ref_mv | Pointer to where the voltage (in millivolt) over the reference resistor is to be stored. |
[in] | p_r_ntc_mv | Pointer to where the voltage (in millivolt) over the NTC resistor is to be stored. |
uint32_t drv_ccs811_open | ( | drv_ccs811_cfg_t const *const | p_drv_ccs811_cfg | ) |
Function for opening the CCS811 driver according to the specified configuration.
[in] | p_drv_ccs811_cfg | Pointer to the driver configuration for the session to be opened. |
uint32_t drv_ccs811_raw_data_get | ( | uint16_t * | p_raw_data | ) |
Function for getting the raw data of the CCS811 device.
[in] | p_raw_data | Pointer to where the raw data is to be stored. |
uint32_t drv_ccs811_status_get | ( | uint8_t * | p_status | ) |
Function for getting the status of the CCS811 device.
[in] | p_status | Pointer to where the status is to be stored. |
uint32_t drv_ccs811_sw_reset | ( | void | ) |
Function for starting the application of the CCS811 device.
uint32_t drv_ccs811_thresholds_get | ( | uint16_t * | p_low_to_medium, |
uint16_t * | p_medium_to_high, | ||
uint8_t * | p_hysteresis | ||
) |
Function for the thresholds of the CCS811 device.
[in] | p_low_to_medium | Pointer to where the low to medium threshold is to be stored. |
[in] | p_medium_to_high | Pointer to where the medium to high threshold is to be stored. |
[in] | p_hysteresis | Pointer to where the hysteresis value is to be stored. |
uint32_t drv_ccs811_thresholds_set | ( | uint16_t | low_to_medium, |
uint16_t | medium_to_highm, | ||
uint8_t | hysteresis | ||
) |
Function for setting the thresholds of the CCS811 device.
[in] | low_to_medium | The low to medium threshold. |
[in] | medium_to_highm | The medium to high threshold. |
[in] | hysteresis | The hysteresis value. |