75 lines
1.7 KiB
C
75 lines
1.7 KiB
C
/***********************************************************************************
|
|
* @Copyright (c):(C)2017, Qindao ieslab Co., Ltd
|
|
* @FileName : GP22Gas_pt_app.h
|
|
* @Author :
|
|
* @Version :V1.0
|
|
* @Date :2017-5-19
|
|
* @Description :Data type definition
|
|
************************************************************************************/
|
|
|
|
#ifndef __UWater_PT_APP_H
|
|
#define __UWater_PT_APP_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include "sys_config.h"
|
|
#include "type.h"
|
|
#include "ddl.h"
|
|
|
|
#if (HARDWARE_VERSION==0x14)//方壳表
|
|
#define TEMP_PWR_GPIOx (GpioPortF)
|
|
#define TEMP_PWR_GPIO_NUM (GpioPin7)
|
|
|
|
#define T_CHECK_CHANNEL 12//PC2端口 12通道
|
|
|
|
#elif (HARDWARE_VERSION==0x18)//圆壳表
|
|
#define TEMP_PWR_GPIOx (GpioPortA)
|
|
#define TEMP_PWR_GPIO_NUM (GpioPin6)
|
|
|
|
#define T_CHECK_CHANNEL 7//PA5端口 5通道
|
|
#endif
|
|
|
|
#define T_CHECK_NUM 6
|
|
#define T_CHECK_INTERVAL 100
|
|
|
|
#define POWER_ON_DELAY 4000 //4000us
|
|
|
|
#define PT_FILTER_NUM 10
|
|
#define TMEP_NUM 10
|
|
|
|
//温度检测状态机
|
|
#define TEMP_S0 0 //IDLE
|
|
#define TEMP_S1 1
|
|
#define TEMP_S2 2
|
|
#define TEMP_S3 3
|
|
#define TEMP_S4 4
|
|
#define TEMP_S5 5
|
|
#define TEMP_S6 6
|
|
#define TEMP_S7 7
|
|
#define TEMP_S8 8
|
|
#define TEMP_S9 9
|
|
#define TEMP_S10 10
|
|
|
|
#define TEMP_SEGMENT_SMALL 2853
|
|
#define TEMP_SEGMENT_MIDDLE 929
|
|
|
|
|
|
void TempInitApp(void);
|
|
void TempMachineApp(void);
|
|
u8 TempStartTaskApp(void);
|
|
float TempCheckValueApp(void);
|
|
u8 TempIfSleepApp(void);
|
|
void TempPreSleep(void);
|
|
void TempWakeSleep(void);
|
|
#endif /* __GP30W_TEMP_APP_H */
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|