Digital gas sensor API.
More...
Digital gas sensor API.
◆ drv_gas_sensor_baseline_get()
ret_code_t drv_gas_sensor_baseline_get |
( |
uint16_t * |
p_baseline | ) |
|
Function for reading a baseline value from the gas sensor.
- Parameters
-
[out] | p_baseline | Baseline value read from the sensor. |
- Returns
- NRF_SUCCESS If the call was successful.
-
Other codes from the underlying drivers.
◆ drv_gas_sensor_baseline_set()
ret_code_t drv_gas_sensor_baseline_set |
( |
uint16_t |
baseline | ) |
|
Function for writing a baseline value to the gas sensor.
- Parameters
-
[in] | baseline | Baseline value for writing to the sensor. |
- Returns
- NRF_SUCCESS If the call was successful.
-
Other codes from the underlying drivers.
◆ drv_gas_sensor_calibrate_humid_temp()
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.
- Parameters
-
[in] | rh_ppth | Relative humidity in parts per thousand (ppt). |
[in] | temp_mdeg | Temperature in millidegrees Centigrade. |
- Returns
- NRF_SUCCESS If the call was successful.
-
Other codes from the underlying drivers.
◆ drv_gas_sensor_init()
Function for initializing the gas sensor.
- Parameters
-
[in] | p_init | Pointer with configuration parameters. |
- Returns
- NRF_SUCCESS If the call was successful.
-
Other codes from the underlying drivers.
◆ drv_gas_sensor_raw_data_get()
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.
- Parameters
-
[out] | p_current_selected | The current through the sensor [uA] (0 to 63 uA). |
[out] | p_raw_adc_reading | Raw ADC read (0 to 1023). |
- Returns
- NRF_SUCCESS If the call was successful.
-
Other codes from the underlying drivers.
◆ drv_gas_sensor_start()
Function for starting data acquisition from the the gas sensor.
- Parameters
-
[in] | mode | The given mode (frequency) of sensor reads. |
- Returns
- NRF_SUCCESS If the call was successful.
-
Other codes from the underlying drivers.
◆ drv_gas_sensor_stop()
ret_code_t drv_gas_sensor_stop |
( |
void |
| ) |
|
Function for stopping data acquisition from the the gas sensor.
- Returns
- NRF_SUCCESS If the call was successful.
-
NRF_ERROR_NOT_SUPPORTED The mode is currently not supported.
-
NRF_ERROR_INVALID_PARAM Invalid parameters supplied.
-
NRF_ERROR_INVALID_STATE The sensor is in an invalid state.
-
Other codes from the underlying drivers.