中级会员
 
- 积分
- 224
- 金钱
- 224
- 注册时间
- 2015-7-1
- 在线时间
- 2 小时
|

楼主 |
发表于 2015-8-4 11:05:03
|
显示全部楼层
回复【5楼】正点原子:
---------------------------------
恩 我在菜单界面切换的时候定义了一个结构体
通过按键让其进行界面切换,但是却不能修改某一数值,原子哥帮我出出主意.
Menu_table table[56] =
{
{0,1,0,1,(*fun0)},//主界面
{1,2,0,100,(*fun1)},// 第二级
{2,3,1,2,(*fun2)},// 第三级 功能界面
{3,4,2,4,(*fun3)},// 第三级
{4,5,3,5,(*fun4)},// 第三级
{5,6,4,6,(*fun5)},//
{6,0,5,5,(*fun6)}, //
};
num =KEY_Scan();
if(num)
{
switch(num)
{
case 1:
func_index = table[func_index].up;
break;
case 2:
func_index = table[func_index].down;
break;
case 3:
func_index = table[func_index].enter;
break;
}
LCD_Clear(GRAY);
}
current_operation_index = table[func_index].current_operation;
(*current_operation_index)();
只能实现界面切换= = |
|