单片机c语言中菜单系统源码分析
int main()
{
typedef struct
{
u8 KeyCurrentIndex;//当前状态索引号
u8 KeyEnterState;//按下键时转向的索引号
u8 KeyCancelState;//按下键时转向的索引号
u8 KeyUpState;//按下键时转向的索引号
u8 KeyDownState;//按下键时转向的索引号
void (*CurrentOperate)(); //当前状态下执行的功能操作
}KbdTabStruct;
const KbdTabStruct KBD[]=
{
{0,1,2,3,4,(*main)},
{6,7,8,9,10,(*main)},
{0,1,2,3,4,,(*main)},
{0,1,2,3,4,(*main)},
};
printf("%d",KBD[0].KeyCurrentIndex);
printf("%d",KBD[0].KeyEnterState);
printf("%d",KBD[0].KeyCancelState);
printf("%d",KBD[0].KeyUpState);
printf("%d",KBD[0].KeyDownState);
printf("%d",KBD[1].KeyCurrentIndex);
printf("%d",KBD[1].KeyEnterState);
printf("%d",KBD[1].KeyCancelState);
printf("%d",KBD[1].KeyUpState);
printf("%d",KBD[1].KeyDownState);
printf("%5s",KBD[0].CurrentOperate);
}
单片机c语言菜单系统源码分 相关文章:
- Windows CE 进程、线程和内存管理(11-09)
- RedHatLinux新手入门教程(5)(11-12)
- uClinux介绍(11-09)
- openwebmailV1.60安装教学(11-12)
- Linux嵌入式系统开发平台选型探讨(11-09)
- Windows CE 进程、线程和内存管理(二)(11-09)