micro_climate/Drivers/Sht3x/sht30.h

27 lines
609 B
C
Raw Normal View History

2024-07-05 03:52:43 +00:00
#ifndef __SHT30_H_
#define __SHT30_H_
#include "comm_types.h"
#define SHT30 "SHT30"
/* <20><>ʪ<EFBFBD>ȴ<EFBFBD><C8B4><EFBFBD><EFBFBD><EFBFBD> */
typedef struct _stTempHumiSensor{
char model[32]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͺ<EFBFBD>
u_int8_t i2c_reg_addr; // <20>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD>ַ
u_int16_t cmd_init_mode; // ת<><D7AA>ģʽ
u_int16_t cmd_read_data; // <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>
}stTempHumiSensor;
/* <20><>ʪ<EFBFBD><CAAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
typedef struct _stTempHumiData{
float temp;
float humi;
}stTempHumiData;
extern stTempHumiData g_stTempHumiData;
u_int8_t sht30_init();
BOOL get_temp_humi_data(float* temdata, float* humidata);
//void TEST_read_sht30_value();
#endif