Function xensiv_pas_gas_perform_forced_compensation(const xensiv_pas_gas_t *, uint16_t)

Function Documentation

int32_t xensiv_pas_gas_perform_forced_compensation(const xensiv_pas_gas_t *dev, uint16_t gas_ref)

Performs force compensation. Used to calculate the offset compensation when the sensor is exposed to a GAS reference value. The device is left in idle mode and the new offset compensation value is stored in non-volatile memory.

Parameters:
  • dev[in] Pointer to the XENSIV™ PAS GAS sensor device

  • gas_ref[in] GAS reference value

Returns:

XENSIV_PAS_GAS_OK if the force compensation was successful; an error indicating what went wrong otherwise