![]() |
Defines | |
#define | SI7013_ADDR 0x82 |
I2C device address for Si7013. | |
#define | SI7021_ADDR 0x80 |
I2C device address for Si7021. | |
#define | SI7013_DEVICE_ID 0x0D |
Device ID value for Si7013. | |
#define | SI7020_DEVICE_ID 0x14 |
Device ID value for Si7020. | |
#define | SI7021_DEVICE_ID 0x21 |
Device ID value for Si7021. | |
Functions | |
int32_t | Si7013_MeasureRHAndTemp (I2C_TypeDef *i2c, uint8_t addr, uint32_t *rhData, int32_t *tData) |
Reads relative humidity and temperature from a Si7013 sensor. | |
int32_t | Si7013_GetFirmwareRevision (I2C_TypeDef *i2c, uint8_t addr, uint8_t *fwRev) |
Reads Firmware Revision from a Si7013 sensor. | |
bool | Si7013_Detect (I2C_TypeDef *i2c, uint8_t addr, uint8_t *deviceId) |
Checks if a Si7013 is present on the I2C bus or not. | |
int32_t | Si7013_ReadNoHoldRHAndTemp (I2C_TypeDef *i2c, uint8_t addr, uint32_t *rhData, int32_t *tData) |
Reads relative humidity and temperature from a Si7013 sensor. | |
int32_t | Si7013_StartNoHoldMeasureRHAndTemp (I2C_TypeDef *i2c, uint8_t addr) |
Starts no hold measurement of relative humidity and temperature from a Si7013 sensor. | |
int32_t | Si7013_MeasureV (I2C_TypeDef *i2c, uint8_t addr, int32_t *vData) |
Reads relative humidity and temperature from a Si7013 sensor. |
bool Si7013_Detect | ( | I2C_TypeDef * | i2c, | |
uint8_t | addr, | |||
uint8_t * | deviceId | |||
) |
Checks if a Si7013 is present on the I2C bus or not.
[in] | i2c | The I2C peripheral to use (Not used). |
[in] | addr | The I2C address to probe. |
[out] | deviceId | Write device ID from SNB_3 if device reponds. Pass in NULL to discard. Should be 0x0D for Si7013, 0x14 for Si7020 or 0x15 for Si7021 |
Definition at line 401 of file si7013.c.
References I2CSPM_Transfer().
int32_t Si7013_GetFirmwareRevision | ( | I2C_TypeDef * | i2c, | |
uint8_t | addr, | |||
uint8_t * | fwRev | |||
) |
Reads Firmware Revision from a Si7013 sensor.
[in] | i2c | The I2C peripheral to use. |
[in] | addr | The I2C address of the sensor. |
[out] | fwRev | The internal firmware revision. 0xFF === 1.0 |
Definition at line 153 of file si7013.c.
References I2CSPM_Transfer().
int32_t Si7013_MeasureRHAndTemp | ( | I2C_TypeDef * | i2c, | |
uint8_t | addr, | |||
uint32_t * | rhData, | |||
int32_t * | tData | |||
) |
Reads relative humidity and temperature from a Si7013 sensor.
[in] | i2c | The I2C peripheral to use. |
[in] | addr | The I2C address of the sensor. |
[out] | rhData | The relative humidity in percent (multiplied by 1000). |
[out] | tData | The temperature in milli-Celsius. |
Definition at line 298 of file si7013.c.
References Si7013_Measure().
int32_t Si7013_MeasureV | ( | I2C_TypeDef * | i2c, | |
uint8_t | addr, | |||
int32_t * | vData | |||
) |
Reads relative humidity and temperature from a Si7013 sensor.
[in] | i2c | The I2C peripheral to use. |
[in] | addr | The I2C address of the sensor. |
[out] | rhData | The relative humidity in percent (multiplied by 1000). |
[out] | tData | The temperature in milli-Celsius. |
Definition at line 370 of file si7013.c.
References Si7013_Measure().
int32_t Si7013_ReadNoHoldRHAndTemp | ( | I2C_TypeDef * | i2c, | |
uint8_t | addr, | |||
uint32_t * | rhData, | |||
int32_t * | tData | |||
) |
Reads relative humidity and temperature from a Si7013 sensor.
[in] | i2c | The I2C peripheral to use. |
[in] | addr | The I2C address of the sensor. |
[out] | rhData | The relative humidity in percent (multiplied by 1000). |
[out] | tData | The temperature in milli-Celsius. |
Definition at line 255 of file si7013.c.
References Si7013_Measure(), and Si7013_ReadNoHoldData().
int32_t Si7013_StartNoHoldMeasureRHAndTemp | ( | I2C_TypeDef * | i2c, | |
uint8_t | addr | |||
) |
Starts no hold measurement of relative humidity and temperature from a Si7013 sensor.
[in] | i2c | The I2C peripheral to use. |
[in] | addr | The I2C address of the sensor. |
Definition at line 193 of file si7013.c.
References Si7013_StartNoHoldMeasure().