si70xx.h File Reference

Interface definition of the Si70xx driver. More...

Detailed Description

Author
Bas Stottelaar basst.nosp@m.otte.nosp@m.laar@.nosp@m.gmai.nosp@m.l.com

Definition in file si70xx.h.

#include "periph/i2c.h"
+ Include dependency graph for si70xx.h:

Go to the source code of this file.

Data Structures

struct  si70xx_t
 Si70xx device descriptor. More...
 
struct  si70xx_params_t
 Device initialization parameters. More...
 

Macros

Si70xx chip addresses.
#define SI70XX_ADDRESS_SI7006   (0x80)
 
#define SI70XX_ADDRESS_SI7013   (0x80)
 
#define SI70XX_ADDRESS_SI7013_ALT   (0x81)
 
#define SI70XX_ADDRESS_SI7020   (0x80)
 
#define SI70XX_ADDRESS_SI7021   (0x80)
 
Si70xx device commands.
#define SI70XX_MEASURE_RH_HOLD   (0xE5)
 
#define SI70XX_MEASURE_RH   (0xF5)
 
#define SI70XX_MEASURE_TEMP_HOLD   (0xE3)
 
#define SI70XX_MEASURE_TEMP   (0xF3)
 
#define SI70XX_MEASURE_TEMP_PREV   (0xE0)
 
#define SI70XX_RESET   (0xFE)
 
#define SI70XX_WRITE_USER_REG   (0xE6)
 
#define SI70XX_READ_USER_REG   (0xE7)
 
#define SI70XX_WRITE_HEATER_REG   (0x51)
 
#define SI70XX_READ_HEATER_REG   (0x11)
 
#define SI70XX_READ_ID_FIRST_A   (0xFA)
 
#define SI70XX_READ_ID_FIRST_B   (0x0F)
 
#define SI70XX_READ_ID_SECOND_A   (0xFC)
 
#define SI70XX_READ_ID_SECOND_B   (0xC9)
 
#define SI70XX_READ_REVISION_A   (0x84)
 
#define SI70XX_READ_REVISION_B   (0xB8)
 
Si70xx register values.
#define SI70XX_ID_SI7006   (0x06)
 
#define SI70XX_ID_SI7013   (0x0D)
 
#define SI70XX_ID_SI7020   (0x14)
 
#define SI70XX_ID_SI7021   (0x15)
 
#define SI70XX_REVISION_1   (0xFF)
 
#define SI70XX_REVISION_2   (0x20)
 

Functions

int si70xx_test (si70xx_t *dev)
 Test if the device id and revision number are as expected. More...
 
int si70xx_init (si70xx_t *dev, i2c_t i2c_dev, uint8_t address)
 Initialize and reset the sensor. More...
 
uint16_t si70xx_get_relative_humidity (si70xx_t *dev)
 Read the relative humidity from the sensor. More...
 
int16_t si70xx_get_temperature (si70xx_t *dev)
 Read the current temperature from the sensor. More...
 
void si70xx_get_both (si70xx_t *dev, uint16_t *humidity, int16_t *temperature)
 Read the relative humidity and temperature from the sensor. More...
 
uint64_t si70xx_get_serial (si70xx_t *dev)
 Read the sensor serial number. More...
 
uint8_t si70xx_get_id (si70xx_t *dev)
 Read the sensor id, to identifier the sensor variant. More...
 
uint8_t si70xx_get_revision (si70xx_t *dev)
 Read the firmware revision of the sensor. More...