EFM32 Happy Gecko Software Documentation  efm32hg-doc-5.1.2
si7021.c File Reference

Detailed Description

Driver for the Si7021 I2C Humidity and Temperature Sensor.

Version
5.1.1

License

Copyright 2016 Silicon Laboratories, Inc. http://www.silabs.com

This file is licensed under the Silicon Labs 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 si7021.c.

#include "i2cspm.h"
#include "thunderboard/util.h"
#include "thunderboard/board.h"
#include "thunderboard/si7021.h"

Go to the source code of this file.

Functions

uint32_t SI7021_cmdRead (uint8_t *cmd, size_t cmdLen, uint8_t *result, size_t resultLen)
 Sends a command and reads the result byte(s) over the I2C bus. More...
 
uint32_t SI7021_cmdWrite (uint8_t *cmd, size_t cmdLen, uint8_t *data, size_t dataLen)
 Sends a command and data to the chip over the I2C bus. More...
 
void SI7021_deInit (void)
 De-initializes the Si7021 chip. Disables the sensor power domain, this also disables other sensors. More...
 
uint32_t SI7021_getFwRev (uint8_t *fwRev)
 Reads the firmware revision of the Si7021 chip. More...
 
uint32_t SI7021_init (void)
 Initializes the Si7021 chip. More...
 
uint32_t SI7021_measure (uint32_t *rhData, int32_t *tData)
 Performs relative humidity and temperature measurements. More...