103 lines
2.4 KiB
C
103 lines
2.4 KiB
C
/****************************************************************************************************
|
||
* mainTyck.c
|
||
* 描述:馈线保护主函数,包含入口程序,主要模拟采样中断程序和保护中断程序
|
||
* 函数:STATUS progStart()
|
||
* void sysInit()
|
||
* void ReadSampleValue()
|
||
* void funcBH()
|
||
* void progStop()
|
||
*
|
||
*
|
||
******************************************************************************************************/
|
||
|
||
/****************************************** includes ***********************************************/
|
||
#include "..\h\predefine.h"
|
||
#ifdef _tyck_c_
|
||
|
||
#undef _tyck_c_
|
||
|
||
/* Sys relational*/
|
||
|
||
#include "stdio.h"
|
||
|
||
/* APP relational */
|
||
#include "..\h\lib.h"
|
||
#include "..\h\variable.h"
|
||
#include "..\h\tyck.h"
|
||
#include "..\h\com_lib.h"
|
||
|
||
/* BSP relational */
|
||
//#include "config.h"
|
||
#include <string.h>
|
||
|
||
//#include "uicDcr.h"
|
||
|
||
/**************************************** forward declarations ***************************************/
|
||
|
||
int progStart(int ErrCode);
|
||
void ReadSampleValue();
|
||
void progStop();
|
||
void comm();
|
||
|
||
extern void timer_interrupt();
|
||
extern void tyck_main();
|
||
extern void Reset_Init();
|
||
extern void PowerInitData();
|
||
extern void InitCommTable();
|
||
|
||
/*************************************************************
|
||
* STATUS progStart(int ErrCode)
|
||
* 描述:入口程序
|
||
* 参数:无
|
||
* 返回:无
|
||
* 调用:
|
||
* 被调用:
|
||
* 历史:
|
||
***************************************************************/
|
||
int progStart(int ErrCode)
|
||
{
|
||
PowerInitData(); //上电初始化
|
||
|
||
InitCommTable(); //通信初始化
|
||
|
||
InitSample(); //初始化模拟量通道相关变量
|
||
|
||
digit_init(); //数字接口初始化
|
||
|
||
Reset_Init(); //复位初始化
|
||
|
||
QdInfoShow();
|
||
|
||
//block_Init(); //闭锁初始化
|
||
|
||
return (OK);
|
||
}
|
||
|
||
/****************************************************************************************
|
||
* void ReadSampleValue()
|
||
* 描述:采样中断ISR,由系统辅助时钟中断触发,采样周期设定约1/4096s,采样四次调用保护程序
|
||
* warning:读AD逻辑尚未确定,此段未完成
|
||
* 历史:
|
||
*
|
||
*****************************************************************************************/
|
||
void ReadSampleValue()
|
||
{
|
||
digit_CheckAninQuality();
|
||
}
|
||
|
||
/*******************************************************************************************
|
||
* void progStop()
|
||
* 描述:cancel programe
|
||
* 参数:无
|
||
* 返回;无
|
||
* 调用:
|
||
* 被调用:
|
||
*
|
||
*******************************************************************************************/
|
||
void progStop()
|
||
{
|
||
|
||
}
|
||
|
||
#endif
|