JZ_TempControl.h
1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef _JZ_TEMPCONTROL_H
#define _JZ_TEMPCONTROL_H
/* Includes ------------------------------------------------------------------*/
#ifdef __cplusplus
extern "C" {
#endif
#include <stdio.h>
#include <string.h>
#include <pthread.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <stdlib.h>
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
typedef struct TempControlData
{
int InputTemp; //全局输入温度
int InputLumen; //全局输入亮度
int OutLumen;//输出的需要调控到的亮度
}TempControlData;
typedef enum {
DEFAULT_STATUS = 0x0000, //默认状态
LUMEN_UP = 0x0001, //亮度提高
LUMEN_DOWN = 0x0002, //亮度降低
TEMP_TRIGGER = 0x0003, //触发温控
TEMP_NOTTRIGGER = 0x0004, //不触发温控
}JZ_TemControl_Code;
/* Exported functions --------------------------------------------------------*/
int Jz_TempControlTaskCreate(void);
int Jz_LampTempControl(float InputTemp, int InputLumen,int *InitialLumen,int *OutTime,int *OutLumen);
static int Jz_LampGetTempControlTime(float value);
void JZ_LightSetInitialLumen(int value);
void JZ_TempStructInit(void);
static void JZ_TempChangeJudgment(int lastTemp,int curTemp,int *ControlFlag);
static void *TempControl_TempChangeTask(void *arg);
#ifdef __cplusplus
}
#endif
#endif // TEMPCONTROL