在线时间97 小时
UID384705
注册时间2017-3-8
NXP金币0
TA的每日心情 | 开心 2019-7-20 09:11 |
---|
签到天数: 7 天 连续签到: 1 天 [LV.3]偶尔看看II
高级会员

- 积分
- 642
- 最后登录
- 2019-12-2
|
本帖最后由 wbeast 于 2019-9-26 11:06 编辑
- <div class="blockcode"><blockquote> struct MenuItem
- {
- char MenuCount; //结构体数组的元素个数
- char *DisplayString; //当前LCD显示的信息
- void (*Subs)(); //执行的函数的指针.
- struct MenuItem *Childrenms; //指向子节点的指针
- struct MenuItem *Parentms; //指向父节点的指针
- };
- //菜单1-1函数
- void ME_1_1_Fun(){
- OLED_ShowString(0,0,"run ME_1_1_Fun",16);
-
- }
-
- void ME_2_1_Fun(){
-
- OLED_ShowString(0,0,"run ME_2_1_Fun",16);
- }
-
-
-
- void ME_3_1_Fun(){
-
-
-
- }
- struct MenuItem Paren_main[3]=
- {
- {3,"MENU_1",NullFun,MENU_1_1,NULL},
- {3,"MENU_2",NullFun,MENU_2_1,NULL},
- {3,"MENU_3",NullFun,MENU_3_1,NULL},
- };
- struct MenuItem MENU_1_1[3]=
- {
- {3,"ME_1_1",NullFun,MENU_1_1_1,Paren_main},
- {3,"ME_1_2",NullFun,NULL,Paren_main},
- {3,"ME_1_3",NullFun,NULL,Paren_main},
- };
- struct MenuItem MENU_1_1_1[1]=
- {
- {1,"",ME_1_1_Fun,NULL,MENU_1_1},
- };
- struct MenuItem MENU_2_1_1[1]=
- {
- {1,"",ME_2_1_Fun,NULL,MENU_2_1},
- };
- struct MenuItem MENU_2_1[3]=
- {
- {3,"ME_2_1",NullFun,MENU_2_1_1,Paren_main},
- {3,"ME_2_2",NullFun,NULL,Paren_main},
- {3,"ME_2_3",NullFun,NULL,Paren_main},
- };
- struct MenuItem MENU_3_1[3]=
- {
- {3,"ME_3_1",NullFun,NULL,Paren_main},
- {3,"ME_3_2",NullFun,NULL,Paren_main},
- {3,"ME_3_3",NullFun,NULL,Paren_main},
- };
- void NullFun(void)
- {
- //printf("fun === null");
- }
- 菜单框架来自著名的傻孩子菜单框架
复制代码
【03】LPC1768_OLED菜单.zip
(1.17 MB, 下载次数: 55)
|
|