si7013.c File Reference

Driver for the Si7013 Temperature / Humidity sensor. More...

#include "si7013.h"
#include "em_device.h"
#include <stdbool.h>
#include "i2cdrv.h"
Include dependency graph for si7013.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

static int Si7013_Measure (I2C_TypeDef *i2c, uint8_t addr, uint32_t *data, uint8_t command)
 Reads data from the Si7013 sensor.
int Si7013_MeasureRHAndTemp (I2C_TypeDef *i2c, uint8_t addr, uint32_t *rhData, int32_t *tData)
 Reads relative humidity and temperature from a Si7013 sensor.
bool Si7013_Detect (I2C_TypeDef *i2c, uint8_t addr)
 Checks if a Si7013 is present on the I2C bus or not.

Detailed Description

Driver for the Si7013 Temperature / Humidity sensor.

Version:
3.20.5

License

(C) Copyright 2014 Silicon Labs, http://www.silabs.com

This file is licensensed under the Silabs License Agreement. See the file "Silabs_License_Agreement.txt" for details. Before using this software for any purpose, you must agree to the terms of that agreement.

Definition in file si7013.c.


Function Documentation

static int Si7013_Measure ( I2C_TypeDef *  i2c,
uint8_t  addr,
uint32_t *  data,
uint8_t  command 
) [static]

Reads data from the Si7013 sensor.

Parameters:
[in] i2c The I2C peripheral to use (not used).
[in] addr The I2C address of the sensor.
[out] data The data read from the sensor.
[in] command The command to send to device. See the #define's for details.
Returns:
Returns number of bytes read on success. Otherwise returns error codes based on the I2CDRV.

Definition at line 59 of file si7013.c.

References I2CDRV_Transfer().

Referenced by Si7013_MeasureRHAndTemp().

Here is the call graph for this function:

Here is the caller graph for this function: