48 #ifndef __DRV_GAS_SENSOR_H__ 49 #define __DRV_GAS_SENSOR_H__ 51 #include "nrf_drv_twi.h" 52 #include "drv_ccs811.h" 53 #include "drv_ccs811_bitfields.h" 54 #include "sdk_errors.h" 64 DRV_GAS_SENSOR_MODE_250MS,
65 DRV_GAS_SENSOR_MODE_1S,
66 DRV_GAS_SENSOR_MODE_10S,
67 DRV_GAS_SENSOR_MODE_60S
The algorithm result data of the CCS811 device.
Definition: drv_ccs811.h:87
drv_gas_sensor_mode_t
Gas sensor measurement intervals.
Definition: drv_gas_sensor.h:62
drv_gas_sensor_data_handler_t data_handler
Handler to be called when data capture has finished.
Definition: drv_gas_sensor.h:81
nrf_drv_twi_t const * p_twi_instance
The TWI instance.
Definition: drv_gas_sensor.h:78
ret_code_t drv_gas_sensor_start(drv_gas_sensor_mode_t mode)
Function for starting data acquisition from the the gas sensor.
Gas sensor init struct.
Definition: drv_gas_sensor.h:76
ret_code_t drv_gas_sensor_baseline_get(uint16_t *p_baseline)
Function for reading a baseline value from the gas sensor.
uint8_t twi_addr
TWI address on bus.
Definition: drv_gas_sensor.h:80
ret_code_t drv_gas_sensor_baseline_set(uint16_t baseline)
Function for writing a baseline value to the gas sensor.
ret_code_t drv_gas_sensor_init(drv_gas_init_t *p_init)
Function for initializing the gas sensor.
void(* drv_gas_sensor_data_handler_t)(drv_gas_sensor_data_t const *p_evt)
Gas sensor driver event handler callback type.
Definition: drv_gas_sensor.h:72
nrf_drv_twi_config_t const * p_twi_cfg
TWI configuraion.
Definition: drv_gas_sensor.h:79
ret_code_t drv_gas_sensor_raw_data_get(uint8_t *p_current_selected, uint16_t *p_raw_adc_reading)
Function for getting a baseline value from the gas sensor.
ret_code_t drv_gas_sensor_stop(void)
Function for stopping data acquisition from the the gas sensor.
ret_code_t drv_gas_sensor_calibrate_humid_temp(uint16_t rh_ppth, int32_t temp_mdeg)
Function for calibrating the gas sensor based on the ambient humidity and temperature.
drv_ccs811_alg_result_t drv_gas_sensor_data_t
Struct for holding the measurement results.
Definition: drv_gas_sensor.h:58