📄 #wmtest.c
字号:
#include<msp430x16x.h>
#include"ControlBlock.h"
#include"Keyboard.h"
#include"new_main.h"
#include"lcd.h"
void InitTest()
{
}
void Test()
{
unsigned long test_temp;
LCD_LcmClearTXT();
LCD_PutStr(0,0,"进入Test模块");
while(ReturnState(GO))
{
if(ReturnState(RESET)) //初始化模块,参数输入
{
LCD_LcmClearTXT();
LCD_PutStr(0,0,"输入");
InitTest();
Set(SET,1);
LPM0;
_NOP();
//while(ReturnState(SET));
test_temp=ReturnTotal();
test_temp++;
test_temp=ReturnBin();
test_temp++;
test_temp=ReturnNeg();
test_temp++;
Set(RESET,0);
}
if(ReturnState(UP)) //处理键盘输入程控量
{
_NOP();
Set(UP,0);
}
if(ReturnState(DOWN))
{
_NOP();
Set(DOWN,0);
}
if(ReturnState(RIGHT))
{
_NOP();
Set(RIGHT,0);
}
if(ReturnState(LEFT))
{
_NOP();
Set(LEFT,0);
}
if(ReturnState(ADD))
{
_NOP();
Set(ADD,0);
}
if(ReturnState(BEGING))
{
_NOP();
Set(BEGING,0);
}
if(ReturnState(SELET)) //此处建立堆栈,进入另一模块
{
_NOP();
main();
Set(RESET,0);
LCD_LcmClearTXT();
LCD_PutStr(0,0,"返回Test模块");
}
LPM0;
_NOP();
}
ExitBlock(TEST); //退出本模块
}