JZ_TempControl.h 1.5 KB
/* 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