Digital gas sensor API.
More...
Digital gas sensor API.
ret_code_t drv_gas_sensor_baseline_get |
( |
uint16_t * |
p_baseline | ) |
|
Reads the 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 driver(s).
ret_code_t drv_gas_sensor_baseline_set |
( |
uint16_t |
baseline | ) |
|
Writes 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 driver(s).
ret_code_t drv_gas_sensor_calibrate_humid_temp |
( |
uint16_t |
rh_ppth, |
|
|
int32_t |
temp_mdeg |
|
) |
| |
Calibrates 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 driver(s).
Initializes the the gas sensor.
- Parameters
-
[in] | p_init | Pointer with configuration parameters. |
- Returns
- NRF_SUCCESS If the call was successful.
-
Other codes from the underlying driver(s).
ret_code_t drv_gas_sensor_raw_data_get |
( |
uint8_t * |
p_current_selected, |
|
|
uint16_t * |
p_raw_adc_reading |
|
) |
| |
Writes baseline value to the gas sensor.
- Parameters
-
[out] | p_current_selected | The current trough 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 driver(s).
Starts 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 driver(s).
ret_code_t drv_gas_sensor_stop |
( |
void |
| ) |
|
Stops 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 driver(s).