📄 main.c
字号:
/*************************************************************************
* Copyright (c) CDHK 801
* File Name : AirC
* Engineer : CDHK 801
* Location :
* Date Created : 2005
* Current Revision :
*
* Notes:
*
*************************************************************************/
#include <hidef.h> /* for EnableInterrupts macro */
#include <MC68HC908GZ60.h> /* include peripheral declarations */
#include "COMMON.h"
#include "INIT.h"
#include "VFD.h"
#include "TBM.h"
#include "AD.h"
#include "MOTOR.h"
#include "KBI.h"
#include "TIM.h"
#include "PROCESS.h"
#include "IRQ.h"
#include "FAULT.h"
/* Global Variables */
UINT8 target_prosition[4];
extern UINT8 process_flag;
extern UINT8 fan_flag;
/* Wait time*/
void wait(UINT8 time){
for(;time>0;time--);
}
/*****************************************************************************
* Function: main(void)
*
* Description: main application
*
* Returns: none
*
* Notes:
*
*****************************************************************************/
void main(void) {
GZ60_Init();
HT16512_Init();
wait(0x3F);
EnableInterrupts; //Enable Interrupts
TBCR_TBIE =1; //Open TBM interrupt
target_prosition[0]=S6;
Motor_Service();
for(;;) {
// MOTOR
Motor_Service();
// Compressor and Fan are controled in TBM Subprogram.
// Motor fault protect
if(FAULT_MIX==0 || FAULT_CYCLE==0 || FAULT_MODE==0 || FAULT_CENTER==0){
Motor_Fault();
}
__RESET_WATCHDOG(); /* kicks the dog */
} /* loop forever */
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -