si7013.h
Go to the documentation of this file.00001
00016 #ifndef __SI7013_H
00017 #define __SI7013_H
00018
00019 #include "em_device.h"
00020 #include <stdbool.h>
00021
00022
00027
00032 #ifdef __cplusplus
00033 extern "C" {
00034 #endif
00035
00036
00037
00038
00039
00041 #define SI7013_ADDR 0x82
00042
00043 #define SI7021_ADDR 0x80
00044
00045
00047 #define SI7013_DEVICE_ID 0x0D
00048
00049 #define SI7020_DEVICE_ID 0x14
00050
00051 #define SI7021_DEVICE_ID 0x21
00052
00053
00054
00055
00056
00057 int32_t Si7013_MeasureRHAndTemp(I2C_TypeDef *i2c, uint8_t addr,
00058 uint32_t *rhData, int32_t *tData);
00059
00060 int32_t Si7013_GetFirmwareRevision(I2C_TypeDef *i2c, uint8_t addr, uint8_t *fwRev);
00061
00062 bool Si7013_Detect(I2C_TypeDef *i2c, uint8_t addr, uint8_t *deviceId);
00063 int32_t Si7013_ReadNoHoldRHAndTemp(I2C_TypeDef *i2c, uint8_t addr, uint32_t *rhData,
00064 int32_t *tData);
00065 int32_t Si7013_StartNoHoldMeasureRHAndTemp(I2C_TypeDef *i2c, uint8_t addr);
00066 int32_t Si7013_MeasureV(I2C_TypeDef *i2c, uint8_t addr, int32_t *vData);
00067 #ifdef __cplusplus
00068 }
00069 #endif
00070
00073 #endif