|  | LibDriver CCS811
    | 
ccs811 base driver modules More...
| Data Structures | |
| struct | ccs811_handle_s | 
| ccs811 handle structure definition  More... | |
| struct | ccs811_info_s | 
| ccs811 information structure definition  More... | |
| Typedefs | |
| typedef struct ccs811_handle_s | ccs811_handle_t | 
| ccs811 handle structure definition | |
| typedef struct ccs811_info_s | ccs811_info_t | 
| ccs811 information structure definition | |
| Functions | |
| uint8_t | ccs811_info (ccs811_info_t *info) | 
| get chip information | |
| uint8_t | ccs811_set_addr_pin (ccs811_handle_t *handle, ccs811_address_t addr_pin) | 
| set address pin | |
| uint8_t | ccs811_get_addr_pin (ccs811_handle_t *handle, ccs811_address_t *addr_pin) | 
| get address pin | |
| uint8_t | ccs811_init (ccs811_handle_t *handle) | 
| initialize the chip | |
| uint8_t | ccs811_deinit (ccs811_handle_t *handle) | 
| close the chip | |
| uint8_t | ccs811_read (ccs811_handle_t *handle, uint16_t *eco2_ppm, uint16_t *tvoc_ppb, uint16_t *raw) | 
| read data | |
| uint8_t | ccs811_get_raw_data (ccs811_handle_t *handle, uint16_t *raw, uint8_t *ua, uint16_t *adc_raw, float *adc_v) | 
| get raw data | |
| uint8_t | ccs811_get_status (ccs811_handle_t *handle, uint8_t *status) | 
| get status | |
| uint8_t | ccs811_set_mode (ccs811_handle_t *handle, ccs811_mode_t mode) | 
| set mode | |
| uint8_t | ccs811_get_mode (ccs811_handle_t *handle, ccs811_mode_t *mode) | 
| get mode | |
| uint8_t | ccs811_set_interrupt_data_ready (ccs811_handle_t *handle, ccs811_bool_t enable) | 
| enable or disable interrupt data ready | |
| uint8_t | ccs811_get_interrupt_data_ready (ccs811_handle_t *handle, ccs811_bool_t *enable) | 
| get interrupt data ready status | |
| uint8_t | ccs811_set_interrupt_threshold (ccs811_handle_t *handle, ccs811_bool_t enable) | 
| enable or disable interrupt threshold | |
| uint8_t | ccs811_get_interrupt_threshold (ccs811_handle_t *handle, ccs811_bool_t *enable) | 
| get interrupt threshold status | |
| uint8_t | ccs811_set_environment_data (ccs811_handle_t *handle, uint16_t humidity_raw, uint16_t temperature_raw) | 
| set environment data | |
| uint8_t | ccs811_set_eco2_threshold (ccs811_handle_t *handle, uint16_t low_medium_ppm, uint16_t medium_high_ppm, uint8_t hysteresis) | 
| set eco2 threshold | |
| uint8_t | ccs811_set_baseline (ccs811_handle_t *handle, uint16_t baseline) | 
| set baseline | |
| uint8_t | ccs811_get_baseline (ccs811_handle_t *handle, uint16_t *baseline) | 
| get baseline | |
| uint8_t | ccs811_get_error_id (ccs811_handle_t *handle, uint8_t *id) | 
| get error id | |
| uint8_t | ccs811_get_hardware_id (ccs811_handle_t *handle, uint8_t *id) | 
| get hardware id | |
| uint8_t | ccs811_get_hardware_version (ccs811_handle_t *handle, uint8_t *version) | 
| get hardware version | |
| uint8_t | ccs811_get_firmware_bootloader_version (ccs811_handle_t *handle, uint8_t *major, uint8_t *minor, uint8_t *trivial) | 
| get firmware bootloader version | |
| uint8_t | ccs811_get_firmware_application_version (ccs811_handle_t *handle, uint8_t *major, uint8_t *minor, uint8_t *trivial) | 
| get firmware application version | |
| uint8_t | ccs811_soft_reset (ccs811_handle_t *handle) | 
| soft reset | |
| uint8_t | ccs811_wake_up (ccs811_handle_t *handle, ccs811_bool_t enable) | 
| wake up | |
| uint8_t | ccs811_hard_reset (ccs811_handle_t *handle) | 
| hard reset | |
| uint8_t | ccs811_environment_humidity_convert_to_register (ccs811_handle_t *handle, float humidity, uint16_t *reg) | 
| convert real data format to register data format | |
| uint8_t | ccs811_environment_humidity_convert_to_data (ccs811_handle_t *handle, uint16_t reg, float *humidity) | 
| convert register data to real data format | |
| uint8_t | ccs811_environment_temperature_convert_to_register (ccs811_handle_t *handle, float temperature, uint16_t *reg) | 
| convert real data format to register data format | |
| uint8_t | ccs811_environment_temperature_convert_to_data (ccs811_handle_t *handle, uint16_t reg, float *temperature) | 
| convert register data to real data format | |
ccs811 base driver modules
| typedef struct ccs811_handle_s ccs811_handle_t | 
ccs811 handle structure definition
| typedef struct ccs811_info_s ccs811_info_t | 
ccs811 information structure definition
| enum ccs811_address_t | 
ccs811 address enumeration definition
| Enumerator | |
|---|---|
| CCS811_ADDRESS_GND | addr pin connected to the GND | 
| CCS811_ADDRESS_VCC | addr pin connected to the VCC | 
Definition at line 62 of file driver_ccs811.h.
| enum ccs811_bool_t | 
ccs811 bool enumeration definition
| Enumerator | |
|---|---|
| CCS811_BOOL_FALSE | disable | 
| CCS811_BOOL_TRUE | true | 
Definition at line 71 of file driver_ccs811.h.
| enum ccs811_error_t | 
ccs811 error enumeration definition
Definition at line 112 of file driver_ccs811.h.
| enum ccs811_interrupt | 
ccs811 interrupt enumeration definition
| Enumerator | |
|---|---|
| CCS811_INTERRUPT_READY | ready | 
| CCS811_INTERRUPT_THRESHOLD | threshold | 
Definition at line 103 of file driver_ccs811.h.
| enum ccs811_mode_t | 
ccs811 mode enumeration definition
Definition at line 80 of file driver_ccs811.h.
| enum ccs811_status_t | 
ccs811 status enumeration definition
| Enumerator | |
|---|---|
| CCS811_STATUS_FW_MODE | fw mode | 
| CCS811_STATUS_APP_VALID | app valid | 
| CCS811_STATUS_DATA_READY | data ready | 
| CCS811_STATUS_ERROR | error | 
Definition at line 92 of file driver_ccs811.h.
| uint8_t ccs811_deinit | ( | ccs811_handle_t * | handle | ) | 
close the chip
| [in] | *handle | pointer to a ccs811 handle structure | 
Definition at line 1961 of file driver_ccs811.c.
| uint8_t ccs811_environment_humidity_convert_to_data | ( | ccs811_handle_t * | handle, | 
| uint16_t | reg, | ||
| float * | humidity ) | 
convert register data to real data format
| [in] | *handle | pointer to a ccs811 handle structure | 
| [in] | reg | register data | 
| [out] | *humidity | pointer to a real data buffer | 
Definition at line 1287 of file driver_ccs811.c.
| uint8_t ccs811_environment_humidity_convert_to_register | ( | ccs811_handle_t * | handle, | 
| float | humidity, | ||
| uint16_t * | reg ) | 
convert real data format to register data format
| [in] | *handle | pointer to a ccs811 handle structure | 
| [in] | humidity | humidity in percentage | 
| [out] | *reg | pointer to a converted data buffer | 
Definition at line 1260 of file driver_ccs811.c.
| uint8_t ccs811_environment_temperature_convert_to_data | ( | ccs811_handle_t * | handle, | 
| uint16_t | reg, | ||
| float * | temperature ) | 
convert register data to real data format
| [in] | *handle | pointer to a ccs811 handle structure | 
| [in] | reg | register data | 
| [out] | *temperature | pointer to a real data buffer in degrees | 
Definition at line 1341 of file driver_ccs811.c.
| uint8_t ccs811_environment_temperature_convert_to_register | ( | ccs811_handle_t * | handle, | 
| float | temperature, | ||
| uint16_t * | reg ) | 
convert real data format to register data format
| [in] | *handle | pointer to a ccs811 handle structure | 
| [in] | temperature | temperature in degrees | 
| [out] | *reg | pointer to a converted data buffer | 
Definition at line 1314 of file driver_ccs811.c.
| uint8_t ccs811_get_addr_pin | ( | ccs811_handle_t * | handle, | 
| ccs811_address_t * | addr_pin ) | 
get address pin
| [in] | *handle | pointer to a ccs811 handle structure | 
| [out] | *addr_pin | pointer to an address pin buffer | 
Definition at line 144 of file driver_ccs811.c.
| uint8_t ccs811_get_baseline | ( | ccs811_handle_t * | handle, | 
| uint16_t * | baseline ) | 
get baseline
| [in] | *handle | pointer to a ccs811 handle structure | 
| [out] | *baseline | pointer to a baseline buffer | 
Definition at line 696 of file driver_ccs811.c.
| uint8_t ccs811_get_error_id | ( | ccs811_handle_t * | handle, | 
| uint8_t * | id ) | 
get error id
| [in] | *handle | pointer to a ccs811 handle structure | 
| [out] | *id | pointer to an id buffer | 
Definition at line 885 of file driver_ccs811.c.
| uint8_t ccs811_get_firmware_application_version | ( | ccs811_handle_t * | handle, | 
| uint8_t * | major, | ||
| uint8_t * | minor, | ||
| uint8_t * | trivial ) | 
get firmware application version
| [in] | *handle | pointer to a ccs811 handle structure | 
| [out] | *major | pointer to a major buffer | 
| [out] | *minor | pointer to a minor buffer | 
| [out] | *trivial | pointer to a trivial buffer | 
Definition at line 846 of file driver_ccs811.c.
| uint8_t ccs811_get_firmware_bootloader_version | ( | ccs811_handle_t * | handle, | 
| uint8_t * | major, | ||
| uint8_t * | minor, | ||
| uint8_t * | trivial ) | 
get firmware bootloader version
| [in] | *handle | pointer to a ccs811 handle structure | 
| [out] | *major | pointer to a major buffer | 
| [out] | *minor | pointer to a minor buffer | 
| [out] | *trivial | pointer to a trivial buffer | 
Definition at line 805 of file driver_ccs811.c.
| uint8_t ccs811_get_hardware_id | ( | ccs811_handle_t * | handle, | 
| uint8_t * | id ) | 
get hardware id
| [in] | *handle | pointer to a ccs811 handle structure | 
| [out] | *id | pointer to an id buffer | 
Definition at line 733 of file driver_ccs811.c.
| uint8_t ccs811_get_hardware_version | ( | ccs811_handle_t * | handle, | 
| uint8_t * | version ) | 
get hardware version
| [in] | *handle | pointer to a ccs811 handle structure | 
| [out] | *version | pointer to a version buffer | 
Definition at line 768 of file driver_ccs811.c.
| uint8_t ccs811_get_interrupt_data_ready | ( | ccs811_handle_t * | handle, | 
| ccs811_bool_t * | enable ) | 
get interrupt data ready status
| [in] | *handle | pointer to a ccs811 handle structure | 
| [out] | *enable | pointer to a bool value | 
Definition at line 329 of file driver_ccs811.c.
| uint8_t ccs811_get_interrupt_threshold | ( | ccs811_handle_t * | handle, | 
| ccs811_bool_t * | enable ) | 
get interrupt threshold status
| [in] | *handle | pointer to a ccs811 handle structure | 
| [out] | *enable | pointer to a bool value | 
Definition at line 411 of file driver_ccs811.c.
| uint8_t ccs811_get_mode | ( | ccs811_handle_t * | handle, | 
| ccs811_mode_t * | mode ) | 
get mode
| [in] | *handle | pointer to a ccs811 handle structure | 
| [out] | *mode | pointer to a mode buffer | 
Definition at line 247 of file driver_ccs811.c.
| uint8_t ccs811_get_raw_data | ( | ccs811_handle_t * | handle, | 
| uint16_t * | raw, | ||
| uint8_t * | ua, | ||
| uint16_t * | adc_raw, | ||
| float * | adc_v ) | 
get raw data
| [in] | *handle | pointer to a ccs811 handle structure | 
| [out] | *raw | pointer to a raw buffer | 
| [out] | *ua | pointer to a ua buffer | 
| [out] | *adc_raw | pointer to an adc raw buffer | 
| [out] | *adc_v | pointer to an adc converted data buffer in voltage | 
Definition at line 511 of file driver_ccs811.c.
| uint8_t ccs811_get_status | ( | ccs811_handle_t * | handle, | 
| uint8_t * | status ) | 
get status
| [in] | *handle | pointer to a ccs811 handle structure | 
| [out] | *status | pointer to a status buffer | 
Definition at line 167 of file driver_ccs811.c.
| uint8_t ccs811_hard_reset | ( | ccs811_handle_t * | handle | ) | 
hard reset
| [in] | *handle | pointer to a ccs811 handle structure | 
Definition at line 1217 of file driver_ccs811.c.
| uint8_t ccs811_info | ( | ccs811_info_t * | info | ) | 
get chip information
| [out] | *info | pointer to a ccs811 info structure | 
Definition at line 2074 of file driver_ccs811.c.
| uint8_t ccs811_init | ( | ccs811_handle_t * | handle | ) | 
initialize the chip
| [in] | *handle | pointer to a ccs811 handle structure | 
Definition at line 1528 of file driver_ccs811.c.
| uint8_t ccs811_read | ( | ccs811_handle_t * | handle, | 
| uint16_t * | eco2_ppm, | ||
| uint16_t * | tvoc_ppb, | ||
| uint16_t * | raw ) | 
read data
| [in] | *handle | pointer to a ccs811 handle structure | 
| [out] | *eco2_ppm | pointer to an eco2 ppm buffer | 
| [out] | *tvoc_ppb | pointer to a tvoc ppb buffer | 
| [out] | *raw | pointer to a raw buffer | 
Definition at line 452 of file driver_ccs811.c.
| uint8_t ccs811_set_addr_pin | ( | ccs811_handle_t * | handle, | 
| ccs811_address_t | addr_pin ) | 
set address pin
| [in] | *handle | pointer to a ccs811 handle structure | 
| [in] | addr_pin | address pin | 
Definition at line 123 of file driver_ccs811.c.
| uint8_t ccs811_set_baseline | ( | ccs811_handle_t * | handle, | 
| uint16_t | baseline ) | 
set baseline
| [in] | *handle | pointer to a ccs811 handle structure | 
| [in] | baseline | input baseline | 
Definition at line 658 of file driver_ccs811.c.
| uint8_t ccs811_set_eco2_threshold | ( | ccs811_handle_t * | handle, | 
| uint16_t | low_medium_ppm, | ||
| uint16_t | medium_high_ppm, | ||
| uint8_t | hysteresis ) | 
set eco2 threshold
| [in] | *handle | pointer to a ccs811 handle structure | 
| [in] | low_medium_ppm | low to medium threshold in ppm | 
| [in] | medium_high_ppm | medium to high threshold in ppm | 
| [in] | hysteresis | input hysteresis | 
Definition at line 617 of file driver_ccs811.c.
| uint8_t ccs811_set_environment_data | ( | ccs811_handle_t * | handle, | 
| uint16_t | humidity_raw, | ||
| uint16_t | temperature_raw ) | 
set environment data
| [in] | *handle | pointer to a ccs811 handle structure | 
| [in] | humidity_raw | input humidity raw | 
| [in] | temperature_raw | input temperature raw | 
Definition at line 575 of file driver_ccs811.c.
| uint8_t ccs811_set_interrupt_data_ready | ( | ccs811_handle_t * | handle, | 
| ccs811_bool_t | enable ) | 
enable or disable interrupt data ready
| [in] | *handle | pointer to a ccs811 handle structure | 
| [in] | enable | bool value | 
Definition at line 284 of file driver_ccs811.c.
| uint8_t ccs811_set_interrupt_threshold | ( | ccs811_handle_t * | handle, | 
| ccs811_bool_t | enable ) | 
enable or disable interrupt threshold
| [in] | *handle | pointer to a ccs811 handle structure | 
| [in] | enable | bool value | 
Definition at line 366 of file driver_ccs811.c.
| uint8_t ccs811_set_mode | ( | ccs811_handle_t * | handle, | 
| ccs811_mode_t | mode ) | 
set mode
| [in] | *handle | pointer to a ccs811 handle structure | 
| [in] | mode | chip mode | 
Definition at line 202 of file driver_ccs811.c.
| uint8_t ccs811_soft_reset | ( | ccs811_handle_t * | handle | ) | 
soft reset
| [in] | *handle | pointer to a ccs811 handle structure | 
Definition at line 919 of file driver_ccs811.c.
| uint8_t ccs811_wake_up | ( | ccs811_handle_t * | handle, | 
| ccs811_bool_t | enable ) | 
wake up
| [in] | *handle | pointer to a ccs811 handle structure | 
| [in] | enable | bool value | 
Definition at line 1170 of file driver_ccs811.c.