LCD多级菜单 LCD多级菜单C51程序 //Last Modify Time:03/11/07 01:22 //ReadMe //屏宽:112 //屏高:64 #include #include #include // typedef struct { unsigned int KeyTab_MenuIndex; //当前状态索引号 unsigned int KeyTab_MaxItems; //本级菜单最大条目数 unsigned int KeyTab_PressOk; //按下"回车"键时转向的状态索引号 unsigned int KeyTab_PressEsc; //按下"返回"键时转向的状态索引号 unsigned int KeyTab_PressDown; //按下"向下"键时转向的状态索引号 unsigned int KeyTab_PressUp; //按下"向上"键时转向的状态索引号 void (*CurrentOperate)(); //当前状态应该执行的功能操作 }KeyTabStruct; void (*KeyFuncPtr)(); //按键功能指针 // #define S_S 0x80//上 =1000,0000=0x80, #define S_X 0x40//下 =0100,0000=0x40, #define S_Z 0x20//左 =0010,0000=0x20, #define S_Y 0x10//右 =0001,0000=0x10, #define S_ZS 0xa0//左上 =1010,0000=0xa0, #define ……