BLE_TYQ_CH584M/BSP/inc/bsp_gxhtc3c.h

42 lines
1.2 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef __BSP_GXHTC3C_H__
#define __BSP_GXHTC3C_H__
#include "CONFIG.h"
#include <stdbool.h>
#define GXHTC3C_ADDR 0x70
// #define GXHTC3C_7BIT_ADDR 0x38 // (GXHTC3C_ADDR >> 1)
// 供电电压VDD从0上升上电电压VPOR芯片会进入空闲状态。然后应该通过发送命令让芯片进入休眠状态以降低芯片功耗
#define GXHTC3C_CMD_SLEEP 0xB098
// 当芯片处于休眠状态时,如果要进行其它的命令操作,需要发送唤醒命令
#define GXHTC3C_CMD_WAKEUP 0x3517
#define GXHTC3C_CMD_NORMAL_CLK_STRE_ON_TEMP_FRONT 0x7CA2
#define GXHTC3C_CMD_NORMAL_CLK_STRE_ON_HUMI_FRONT 0x5C24
#define GXHTC3C_CMD_NORMAL_CLK_STRE_OFF_TEMP_FRONT 0x7866
#define GXHTC3C_CMD_NORMAL_CLK_STRE_OFF_HUMI_FRONT 0x58E0
#define GXHTC3C_CMD_LOW_CLK_STRE_ON_TEMP_FRONT 0x6458
#define GXHTC3C_CMD_LOW_CLK_STRE_ON_HUMI_FRONT 0x44DE
#define GXHTC3C_CMD_LOW_CLK_STRE_OFF_TEMP_FRONT 0x609C
#define GXHTC3C_CMD_LOW_CLK_STRE_OFF_HUMI_FRONT 0x401A
#define GXHTC3C_CMD_SOFT_REST 0x805D
// 读传感器序列号
#define GXHTC3C_CMD_READ_ID 0xEFC8
int BSP_ReadTempHumi(float *humi, float *temp);
void GXHTC3C_Init(void);
#endif // !__BSP_GXHTC3C_H__