📄 menu.c
字号:
#include <stdio.h>
#include <reg52.h>
#include <menu.h>
#include <string.h>
unsigned char MenuState;
unsigned char MenuSubState;
#define MENU_NUM 5
char code Menutable1[MENU_NUM][20]= {"system test","harddisk veri","harddisk copy","harddisk image","directory"};
char code Menutable2[MENU_NUM][20]= {"SYSTEM TEST","HARDDISK VERI","HARDDISK COPY","HARDDISK IMAGE","DIRECTORY"};
void Display(byte State,byte SubState)
{
char i;
char temp[20];
SubState = SubState;
printf("\n");
if((State > (MENU_NUM + 0x30)) || (State < 0x30))
{
printf("param error!\n");
return ;
}
for(i=1;i<=MENU_NUM;i++)
{
if(State == (i + 0x30))
{
strcpy(temp,Menutable2[i-1]);
printf("%x:",i);
printf("%s\n",temp);
}
else
{
strcpy(temp,Menutable1[i-1]);
printf("%x:",i);
printf("%s\n",temp);
}
}
printf("\n");
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -