📄 global.c
字号:
//
// Copyright (c) 2007, 北京动力源科技股份有限公司
// All rights reserved.
//
// 项目名称: EPS_Controller
// 文件名称: Global.c
//
// 版 本: Ver 1.01
//
// 完成日期: 2009年9月
// 作 者: Zhang Tingting
//
// 修订日期: 2009年12月
// 修 订 者: Zhang Tingting
//
// 编辑工具:UEStudio(TAB should be set to 4)
//
// 编译工具:Code Composer Studio V3.3
//--------------------------------------------------------------------------------
// Include files
//--------------------------------------------------------------------------------
#include "DSP280x_Device.h"
#include "DSP280x_Examples.h"
#include "Global.h"
//--------------------------------------------------------------------------------
// 全局数据类型定义
//--------------------------------------------------------------------------------
volatile struct PHASE_SECTOR PhaseSector;
volatile struct RUN_STATE RunState;
volatile struct SET_PARA SetPara;
volatile struct OUTPUT_VAR OutputVar;
volatile struct PID_REGS PidRegs;
//--------------------------------------------------------------------------------
// 全局变量定义
//--------------------------------------------------------------------------------
volatile Uint16 uiCnt25uS;
volatile Uint16 uiCnt25uS1;
volatile Uint16 uiSample;
volatile Uint16 uiSampleCnt;
volatile Uint16 ulSum;
volatile Uint16 uiSampleTrue;
volatile Uint16 uiKeyOk;
volatile Uint16 uiFlag;
volatile Uint16 uiRamValueTemp;
volatile Uint16 uiCntCode;
volatile Uint16 uiRamValue;
volatile Uint16 uiPage;
volatile Uint16 uiSampleTrue;
volatile Uint16 uiKeyOk;
volatile Uint16 uiKeyTrueValue;
volatile Uint16 uiTest;
volatile Uint16 uiFacSDCnt;
volatile Uint16 uiFacNBCnt;
volatile Uint16 uiCnt1S;
volatile Uint16 uiSoftStartCnt;
volatile Uint16 uiTime10ms;
volatile Uint16 uiPidCnt;
volatile Uint16 uiTime1ms;
volatile Uint16 uiVolNB_U;
volatile Uint16 uiVolNB_V;
volatile Uint16 uiVolNB_W;
volatile Uint16 uiVolSD_U;
volatile Uint16 uiVolSD_V;
volatile Uint16 uiVolSD_W;
volatile Uint16 uiAdVRef;
volatile Uint16 uiRmsNBAvg;
volatile Uint32 uiAddNBW;
volatile Uint32 uiAddNBU;
volatile Uint32 uiAddNBV;
volatile Uint16 uiRmsNBW;
volatile Uint16 uiRmsNBU;
volatile Uint16 uiRmsNBV;
volatile Uint16 uiAvgNBW;
volatile Uint16 uiAvgNBU;
volatile Uint16 uiAvgNBV;
volatile Uint16 uiRmsNBAvg;
volatile Uint16 uiPhaseOk;
volatile Uint16 uiRmsNBAvgSum;
volatile Uint16 uiNBCnt;
volatile Uint32 uiAddSDW;
volatile Uint32 uiAddSDU;
volatile Uint32 uiAddSDV;
volatile Uint16 uiRmsSDW;
volatile Uint16 uiRmsSDU;
volatile Uint16 uiRmsSDV;
volatile Uint16 uiAvgSDW;
volatile Uint16 uiAvgSDU;
volatile Uint16 uiAvgSDV;
volatile Uint16 uiRmsSDAvg;
volatile Uint16 uiECapTime1;
volatile Uint16 uiECapTime2;
volatile Uint16 uiECapTime;
volatile Uint16 uiECapFlag;
volatile Uint16 uiTmpC1;
volatile Uint16 uiPhaseOK;
volatile Uint16 uiPhaseCnt;
volatile Uint32 ulECapCnt;
volatile Uint32 ulECapCnt1;
//--------------------------------------------------------------------------------
// 初始化数据
//--------------------------------------------------------------------------------
void InitialSysData()
{
uiCnt25uS = 0;
uiCnt25uS1= 0;
uiSample = 0;
uiSampleCnt = 0;
ulSum = 0;
uiSampleTrue = 0;
uiKeyOk = 0;
uiFlag= 0;
uiRamValueTemp= 0;
uiCntCode = 0;
uiRamValue = 0;
uiPage = 0;
uiKeyTrueValue = 0;
uiTest = 0;
uiECapTime1 = 0;
uiFacSDCnt = 0;
uiECapTime = 0;
uiECapTime2 = 0;
uiECapFlag = 0;
uiTmpC1 = 0;
uiPhaseOk = 1;
uiPhaseCnt = 0;
ulECapCnt = 0;
ulECapCnt1 = 0;
uiPhaseCnt = 0;
}
//--------------------------------------------------------------------------------
// 全局函数定义
//--------------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -