资源描述:
《lcd多级菜单c51程序》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、LCD多级菜单C51程序//LastModifyTime:03/11/0701:22//ReadMe//屏宽:112//屏髙:64#include^include^include〈absacc.h>//typcdofstructunsignedintKeyTab_Menulndex;//当前状态索引号unsignedintKeyTabMaxItems;//本级菜早iS大条U数unsignedintKeyTabPressOk;unsignedintKeyTab_PressEsc;un
2、signedintKeyTab_PressDown:unsignedintKeyTab_PressUp;void(*CurrentOperate)();}KeyTabStruct;//按下"M车"键吋转向的状态索引号//按下"返回"键时转向的状态索引号//按K"向K"键时转向的状态索引号//按下"向上"键时转向的状态索引号//当前状态应该执行的功能操作void(*KeyFuncPtr)();//按键功能指针//^defineSs0x80//h=1000,0000-0x80,#defineSX0x40//下=0100,00
3、00=0x40舞defineSz0x20//左=0010,0000=0x20,^defines__Y0x10//右=0001,0000-0x10,舞defines__ZSOxaO//左上=1010,0000=0xa0,則efines■—ZX0x60//左下=0110,0000-0x60,#definesYS0x90//右上=1001,0000=0x90,舞definesYX0x50//右下=0101,0000=0x50,^defines_SXZY0xf0//上卜•左右=llll,0000-0xf0//林defineKEY
4、OK0x11舞defineKEYUP0x12^defineKEY_ESC0x13//^defineKEYLEFT0x21#dofincKEYD0^0x22舞defineKEY_R1GHT0x23//#defineKEY10x31^defineKEY_20x32^defineKEY30x33//tklefineKEY40x41^defineKEY_50x42^defineKEY_60x43//^defineKEY70x51^defineKEY80x52^defineKEY_90x53//^defineKEY_X1NG0x6
5、1^defineKEY00x62OlefineKEY—JTNG0x63//舞defineKEY_P0WER0x71^defineKEY_NULL0x00////^defineMAX_KEYTABSTRUCT_NUM19^defineMENUJ'ACE0^defineMENU_ROOT1^defineMENUVTEW2^defineMENUVTEWAR0UTREC0RDE3^defineMENU_VIEW_HANDSETCLOCK4^define.1ENU_OPERATION5^defineMENU_OPERAT1ON_
6、SETPOS1T1ON6^defineMENUOPERATIONREADZJTOFLASH7^defineMENUOPERATIONRDZJTORAM8^defineMENUOPERATIONDELGIVENZL9MM^define.1ENU_OPERATION_DELALLZJ10^defineMENU_TEST11^defineMENUTESTRAMTEST12^defineMENUTESTFLASHTEST13^defineMENU_SYSTEMSET14^define.1ENU_SYSTEMSET_DEBUG
7、15^defineMENU_SYSTEMSET_DEBUG_PASSWORD16^defineMENUSYSTEMSETDEBUGSEEPTCTURE17^defineMENUSYSTEMSRTSETHANDCLK18//舞defineAddr_KeyOxcOOO//1100,0000,0000,0000^defineAddr_XRamBeginl0x0000//0000,0000,0000,0000//共32K^defineAddrXRamEndl0x3fff//0011,1111,1111,1111^defineAd
8、drXRaniRegin20x4000//0100,0000,0000,0000^defineAddr_XRamEnd20x7fff//Olli,1111,1111,1111^defineAddrXFlashBegin0x9000/71000,OOOO,OOOO,OOOO16K/每自然扇区^defineAddr^XE