LibDriver CCS811
Loading...
Searching...
No Matches
ccs811 example driver function

ccs811 example driver modules More...

Collaboration diagram for ccs811 example driver function:

Macros

#define CCS811_BASIC_DEFAULT_MODE   CCS811_MODE_CONSTANT_POWER
 ccs811 basic example default definition
#define CCS811_INTERRUPT_DEFAULT_MODE   CCS811_MODE_CONSTANT_POWER
 ccs811 interrupt example default definition

Functions

uint8_t ccs811_basic_init (ccs811_address_t addr_pin)
 basic example init
uint8_t ccs811_basic_deinit (void)
 basic example deinit
uint8_t ccs811_basic_read (uint16_t *eco2_ppm, uint16_t *tvoc_ppb)
 basic example read
uint8_t ccs811_basic_get_hardware_id (uint8_t *id)
 basic example get hardware id
uint8_t ccs811_basic_get_hardware_version (uint8_t *version)
 basic example get hardware version
uint8_t ccs811_basic_get_firmware_bootloader_version (uint8_t *major, uint8_t *minor, uint8_t *trivial)
 basic example get firmware bootloader version
uint8_t ccs811_basic_get_firmware_application_version (uint8_t *major, uint8_t *minor, uint8_t *trivial)
 basic example get firmware application version
uint8_t ccs811_basic_soft_reset (void)
 basic example soft reset
uint8_t ccs811_basic_hard_reset (void)
 basic example hard reset
uint8_t ccs811_basic_wake_up (void)
 basic example wake up
uint8_t ccs811_basic_power_down (void)
 basic example power down
uint8_t ccs811_basic_get_status (uint8_t *status)
 basic example get status
uint8_t ccs811_basic_get_raw_data (uint8_t *ua, float *adc_v)
 basic example get raw data
uint8_t ccs811_basic_set_environment_data (float humidity, float temperature)
 basic example set environment data
uint8_t ccs811_basic_set_baseline (uint16_t baseline)
 basic example set baseline
uint8_t ccs811_interrupt_init (ccs811_address_t addr_pin, uint16_t low_medium_ppm, uint16_t medium_high_ppm, uint8_t hysteresis)
 interrupt example init
uint8_t ccs811_interrupt_deinit (void)
 interrupt example deinit
uint8_t ccs811_interrupt_read (uint16_t *eco2_ppm, uint16_t *tvoc_ppb)
 interrupt example read
uint8_t ccs811_interrupt_get_hardware_id (uint8_t *id)
 interrupt example get hardware id
uint8_t ccs811_interrupt_get_hardware_version (uint8_t *version)
 interrupt example get hardware version
uint8_t ccs811_interrupt_get_firmware_bootloader_version (uint8_t *major, uint8_t *minor, uint8_t *trivial)
 interrupt example get firmware bootloader version
uint8_t ccs811_interrupt_get_firmware_application_version (uint8_t *major, uint8_t *minor, uint8_t *trivial)
 interrupt example get firmware application version
uint8_t ccs811_interrupt_soft_reset (void)
 interrupt example soft reset
uint8_t ccs811_interrupt_hard_reset (void)
 interrupt example hard reset
uint8_t ccs811_interrupt_wake_up (void)
 interrupt example wake up
uint8_t ccs811_interrupt_power_down (void)
 interrupt example power down
uint8_t ccs811_interrupt_get_status (uint8_t *status)
 interrupt example get status
uint8_t ccs811_interrupt_get_raw_data (uint8_t *ua, float *adc_v)
 interrupt example get raw data
uint8_t ccs811_interrupt_set_environment_data (float humidity, float temperature)
 interrupt example set environment data
uint8_t ccs811_interrupt_set_baseline (uint16_t baseline)
 interrupt example set baseline
uint8_t ccs811_update_init (ccs811_address_t addr_pin)
 update example init
uint8_t ccs811_update_deinit (void)
 update example deinit
uint8_t ccs811_update_firmware (char *path)
 update example firmware

Detailed Description

ccs811 example driver modules

Macro Definition Documentation

◆ CCS811_BASIC_DEFAULT_MODE

#define CCS811_BASIC_DEFAULT_MODE   CCS811_MODE_CONSTANT_POWER

ccs811 basic example default definition

constant power

Definition at line 56 of file driver_ccs811_basic.h.

◆ CCS811_INTERRUPT_DEFAULT_MODE

#define CCS811_INTERRUPT_DEFAULT_MODE   CCS811_MODE_CONSTANT_POWER

ccs811 interrupt example default definition

constant power

Definition at line 54 of file driver_ccs811_interrupt.h.

Function Documentation

◆ ccs811_basic_deinit()

uint8_t ccs811_basic_deinit ( void )

basic example deinit

Returns
status code
  • 0 success
  • 1 deinit failed
Note
none

Definition at line 139 of file driver_ccs811_basic.c.

Here is the call graph for this function:

◆ ccs811_basic_get_firmware_application_version()

uint8_t ccs811_basic_get_firmware_application_version ( uint8_t * major,
uint8_t * minor,
uint8_t * trivial )

basic example get firmware application version

Parameters
[out]*majorpointer to a major buffer
[out]*minorpointer to a minor buffer
[out]*trivialpointer to a trivial buffer
Returns
status code
  • 0 success
  • 1 read failed
Note
none

Definition at line 332 of file driver_ccs811_basic.c.

Here is the call graph for this function:

◆ ccs811_basic_get_firmware_bootloader_version()

uint8_t ccs811_basic_get_firmware_bootloader_version ( uint8_t * major,
uint8_t * minor,
uint8_t * trivial )

basic example get firmware bootloader version

Parameters
[out]*majorpointer to a major buffer
[out]*minorpointer to a minor buffer
[out]*trivialpointer to a trivial buffer
Returns
status code
  • 0 success
  • 1 read failed
Note
none

Definition at line 312 of file driver_ccs811_basic.c.

Here is the call graph for this function:

◆ ccs811_basic_get_hardware_id()

uint8_t ccs811_basic_get_hardware_id ( uint8_t * id)

basic example get hardware id

Parameters
[out]*idpointer to an id buffer
Returns
status code
  • 0 success
  • 1 read failed
Note
none

Definition at line 274 of file driver_ccs811_basic.c.

Here is the call graph for this function:

◆ ccs811_basic_get_hardware_version()

uint8_t ccs811_basic_get_hardware_version ( uint8_t * version)

basic example get hardware version

Parameters
[out]*versionpointer to a version buffer
Returns
status code
  • 0 success
  • 1 read failed
Note
none

Definition at line 292 of file driver_ccs811_basic.c.

Here is the call graph for this function:

◆ ccs811_basic_get_raw_data()

uint8_t ccs811_basic_get_raw_data ( uint8_t * ua,
float * adc_v )

basic example get raw data

Parameters
[out]*uapointer to a ua buffer
[out]*adc_vpointer to an adc converted data buffer in voltage
Returns
status code
  • 0 success
  • 1 get raw data failed
Note
none

Definition at line 199 of file driver_ccs811_basic.c.

Here is the call graph for this function:

◆ ccs811_basic_get_status()

uint8_t ccs811_basic_get_status ( uint8_t * status)

basic example get status

Parameters
[out]*statuspointer to a status buffer
Returns
status code
  • 0 success
  • 1 get status failed
Note
none

Definition at line 180 of file driver_ccs811_basic.c.

Here is the call graph for this function:

◆ ccs811_basic_hard_reset()

uint8_t ccs811_basic_hard_reset ( void )

basic example hard reset

Returns
status code
  • 0 success
  • 1 hard reset failed
Note
none

Definition at line 366 of file driver_ccs811_basic.c.

Here is the call graph for this function:

◆ ccs811_basic_init()

uint8_t ccs811_basic_init ( ccs811_address_t addr_pin)

basic example init

Parameters
[in]addr_pinaddress pin
Returns
status code
  • 0 success
  • 1 init failed
Note
none

Definition at line 49 of file driver_ccs811_basic.c.

Here is the call graph for this function:

◆ ccs811_basic_power_down()

uint8_t ccs811_basic_power_down ( void )

basic example power down

Returns
status code
  • 0 success
  • 1 power down failed
Note
none

Definition at line 400 of file driver_ccs811_basic.c.

Here is the call graph for this function:

◆ ccs811_basic_read()

uint8_t ccs811_basic_read ( uint16_t * eco2_ppm,
uint16_t * tvoc_ppb )

basic example read

Parameters
[out]*eco2_ppmpointer to an eco2 ppm buffer
[out]*tvoc_ppbpointer to a tvoc buffer
Returns
status code
  • 0 success
  • 1 read failed
Note
none

Definition at line 159 of file driver_ccs811_basic.c.

Here is the call graph for this function:

◆ ccs811_basic_set_baseline()

uint8_t ccs811_basic_set_baseline ( uint16_t baseline)

basic example set baseline

Parameters
[in]baselineinput baseline
Returns
status code
  • 0 success
  • 1 set baseline failed
Note
none

Definition at line 256 of file driver_ccs811_basic.c.

Here is the call graph for this function:

◆ ccs811_basic_set_environment_data()

uint8_t ccs811_basic_set_environment_data ( float humidity,
float temperature )

basic example set environment data

Parameters
[in]humidityhumidity in percentage
[in]temperaturetemperature in degrees
Returns
status code
  • 0 success
  • 1 set environment data failed
Note
none

Definition at line 222 of file driver_ccs811_basic.c.

Here is the call graph for this function:

◆ ccs811_basic_soft_reset()

uint8_t ccs811_basic_soft_reset ( void )

basic example soft reset

Returns
status code
  • 0 success
  • 1 soft reset failed
Note
none

Definition at line 349 of file driver_ccs811_basic.c.

Here is the call graph for this function:

◆ ccs811_basic_wake_up()

uint8_t ccs811_basic_wake_up ( void )

basic example wake up

Returns
status code
  • 0 success
  • 1 wake up failed
Note
none

Definition at line 383 of file driver_ccs811_basic.c.

Here is the call graph for this function:

◆ ccs811_interrupt_deinit()

uint8_t ccs811_interrupt_deinit ( void )

interrupt example deinit

Returns
status code
  • 0 success
  • 1 deinit failed
Note
none

Definition at line 153 of file driver_ccs811_interrupt.c.

Here is the call graph for this function:

◆ ccs811_interrupt_get_firmware_application_version()

uint8_t ccs811_interrupt_get_firmware_application_version ( uint8_t * major,
uint8_t * minor,
uint8_t * trivial )

interrupt example get firmware application version

Parameters
[out]*majorpointer to a major buffer
[out]*minorpointer to a minor buffer
[out]*trivialpointer to a trivial buffer
Returns
status code
  • 0 success
  • 1 read failed
Note
none

Definition at line 252 of file driver_ccs811_interrupt.c.

Here is the call graph for this function:

◆ ccs811_interrupt_get_firmware_bootloader_version()

uint8_t ccs811_interrupt_get_firmware_bootloader_version ( uint8_t * major,
uint8_t * minor,
uint8_t * trivial )

interrupt example get firmware bootloader version

Parameters
[out]*majorpointer to a major buffer
[out]*minorpointer to a minor buffer
[out]*trivialpointer to a trivial buffer
Returns
status code
  • 0 success
  • 1 read failed
Note
none

Definition at line 232 of file driver_ccs811_interrupt.c.

Here is the call graph for this function:

◆ ccs811_interrupt_get_hardware_id()

uint8_t ccs811_interrupt_get_hardware_id ( uint8_t * id)

interrupt example get hardware id

Parameters
[out]*idpointer to an id buffer
Returns
status code
  • 0 success
  • 1 read failed
Note
none

Definition at line 194 of file driver_ccs811_interrupt.c.

Here is the call graph for this function:

◆ ccs811_interrupt_get_hardware_version()

uint8_t ccs811_interrupt_get_hardware_version ( uint8_t * version)

interrupt example get hardware version

Parameters
[out]*versionpointer to a version buffer
Returns
status code
  • 0 success
  • 1 read failed
Note
none

Definition at line 212 of file driver_ccs811_interrupt.c.

Here is the call graph for this function:

◆ ccs811_interrupt_get_raw_data()

uint8_t ccs811_interrupt_get_raw_data ( uint8_t * ua,
float * adc_v )

interrupt example get raw data

Parameters
[out]*uapointer to a ua buffer
[out]*adc_vpointer to an adc converted data buffer in voltage
Returns
status code
  • 0 success
  • 1 get raw data failed
Note
none

Definition at line 357 of file driver_ccs811_interrupt.c.

Here is the call graph for this function:

◆ ccs811_interrupt_get_status()

uint8_t ccs811_interrupt_get_status ( uint8_t * status)

interrupt example get status

Parameters
[out]*statuspointer to a status buffer
Returns
status code
  • 0 success
  • 1 get status failed
Note
none

Definition at line 338 of file driver_ccs811_interrupt.c.

Here is the call graph for this function:

◆ ccs811_interrupt_hard_reset()

uint8_t ccs811_interrupt_hard_reset ( void )

interrupt example hard reset

Returns
status code
  • 0 success
  • 1 hard reset failed
Note
none

Definition at line 286 of file driver_ccs811_interrupt.c.

Here is the call graph for this function:

◆ ccs811_interrupt_init()

uint8_t ccs811_interrupt_init ( ccs811_address_t addr_pin,
uint16_t low_medium_ppm,
uint16_t medium_high_ppm,
uint8_t hysteresis )

interrupt example init

Parameters
[in]addr_pinaddress pin
[in]low_medium_ppmlow to medium threshold in ppm
[in]medium_high_ppmmedium to high threshold in ppm
[in]hysteresisinput hysteresis
Returns
status code
  • 0 success
  • 1 init failed
Note
none

Definition at line 52 of file driver_ccs811_interrupt.c.

Here is the call graph for this function:

◆ ccs811_interrupt_power_down()

uint8_t ccs811_interrupt_power_down ( void )

interrupt example power down

Returns
status code
  • 0 success
  • 1 power down failed
Note
none

Definition at line 320 of file driver_ccs811_interrupt.c.

Here is the call graph for this function:

◆ ccs811_interrupt_read()

uint8_t ccs811_interrupt_read ( uint16_t * eco2_ppm,
uint16_t * tvoc_ppb )

interrupt example read

Parameters
[out]*eco2_ppmpointer to an eco2 ppm buffer
[out]*tvoc_ppbpointer to a tvoc buffer
Returns
status code
  • 0 success
  • 1 read failed
Note
none

Definition at line 173 of file driver_ccs811_interrupt.c.

Here is the call graph for this function:

◆ ccs811_interrupt_set_baseline()

uint8_t ccs811_interrupt_set_baseline ( uint16_t baseline)

interrupt example set baseline

Parameters
[in]baselineinput baseline
Returns
status code
  • 0 success
  • 1 set baseline failed
Note
none

Definition at line 414 of file driver_ccs811_interrupt.c.

Here is the call graph for this function:

◆ ccs811_interrupt_set_environment_data()

uint8_t ccs811_interrupt_set_environment_data ( float humidity,
float temperature )

interrupt example set environment data

Parameters
[in]humidityhumidity in percentage
[in]temperaturetemperature in degrees
Returns
status code
  • 0 success
  • 1 set environment data failed
Note
none

Definition at line 380 of file driver_ccs811_interrupt.c.

Here is the call graph for this function:

◆ ccs811_interrupt_soft_reset()

uint8_t ccs811_interrupt_soft_reset ( void )

interrupt example soft reset

Returns
status code
  • 0 success
  • 1 soft reset failed
Note
none

Definition at line 269 of file driver_ccs811_interrupt.c.

Here is the call graph for this function:

◆ ccs811_interrupt_wake_up()

uint8_t ccs811_interrupt_wake_up ( void )

interrupt example wake up

Returns
status code
  • 0 success
  • 1 wake up failed
Note
none

Definition at line 303 of file driver_ccs811_interrupt.c.

Here is the call graph for this function:

◆ ccs811_update_deinit()

uint8_t ccs811_update_deinit ( void )

update example deinit

Returns
status code
  • 0 success
  • 1 deinit failed
Note
none

Definition at line 99 of file driver_ccs811_update.c.

Here is the call graph for this function:

◆ ccs811_update_firmware()

uint8_t ccs811_update_firmware ( char * path)

update example firmware

Parameters
[in]*pathpointer a path buffer
Returns
status code
  • 0 success
  • 1 update failed
Note
none

Definition at line 118 of file driver_ccs811_update.c.

Here is the call graph for this function:

◆ ccs811_update_init()

uint8_t ccs811_update_init ( ccs811_address_t addr_pin)

update example init

Parameters
[in]addr_pinaddress pin
Returns
status code
  • 0 success
  • 1 init failed
Note
none

Definition at line 49 of file driver_ccs811_update.c.

Here is the call graph for this function: