Function xensiv_pasco2_init_uart(xensiv_pasco2_t *, void *)¶
Defined in File xensiv_pasco2.h
Function Documentation¶
-
int32_t xensiv_pasco2_init_uart(xensiv_pasco2_t *dev, void *ctx)¶
Initializes the XENSIV™ PAS CO2 device using the UART 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 CO2 sensor device structure allocated by user, but the init function will initialize its contents
ctx – [in] Pointer to the platform-specific I2C communication handler
- Returns
XENSIV_PASCO2_OK if the initialization was successful; an error indicating what went wrong otherwise