Function xensiv_pas_gas_init
Defined in File xensiv_pas_gas.h
Function Documentation
-
int32_t xensiv_pas_gas_init(xensiv_pas_gas_t *dev, xensiv_pas_gas_interface_t itf, void *ctx)
Initializes the XENSIV™ PAS GAS device for the specified interface. It initializes the dev structure, verifies the integrity of the communication layer of the serial communication interface, and checks whether the sensor is ready.
- Parameters:
dev – [inout] Pointer to a XENSIV™ PAS GAS sensor device structure allocated by user, but the init function will initialize its contents
itf – [in] Communication interface (I2C/UART)
ctx – [in] Pointer to the platform-specific I2C communication handler
- Returns:
XENSIV_PAS_GAS_OK if the initialization was successful; an error indicating what went wrong otherwise