LCD menu help needed / C Code

Status
Not open for further replies.

ltg

Member level 4
Joined
Feb 24, 2002
Messages
76
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
533
menu lcd

Hi,

Would you please give some hints how to build up a logical menu with submenus in C code. This is first time I do that. I don't know how. I have three buttons used to choice and select alteratives.
Have you some exemples you can share with me? Thank you in advace!

Best Regards,
ltg
 

I don´t have a sample code to send to you because each case is diferent, and i don´t know what you want. Never the less the best way to make a menu, with C, is using
void main_menu (int key) {
Switch (key) {
case 0: /*code*/ submenu0 (); break;
case 1: /*code*/ submenu1(); break;
case 2: /*code*/ submenu2(); break;
default: /*error code*/ break;
}
}

and then repeat it for all the submenus.
I hope it helps you.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…