Files
mgos_i2c_mock/include/mgos_sht31.h
2018-04-02 17:54:39 +02:00

47 lines
572 B
C

#pragma once
#include "mgos.h"
#include "mgos_i2c.h"
#define MGOS_SHT31_READ_DELAY (2)
#ifdef __cplusplus
extern "C" {
#endif
struct mgos_sht31;
/*
*
*/
struct mgos_sht31 *mgos_sht31_create(struct mgos_i2c *i2c, uint8_t i2caddr);
/*
*
*/
void mgos_sht31_destroy(struct mgos_sht31 **sensor);
/*
*
*/
bool mgos_sht31_read(struct mgos_sht31 *sensor);
/*
*
*/
float mgos_sht31_getTemperature(struct mgos_sht31 *sensor);
/*
*
*/
float mgos_sht31_getHumidity(struct mgos_sht31 *sensor);
/*
*
*/
bool mgos_sht31_i2c_init(void);
#ifdef __cplusplus
}
#endif