cnandha19
Member level 3
I want to go to sub menu is it correct way
1.Enter key pressed means it prints
1.ADMIN
2.Operator
3.Setter
In sub menu if '1' pressed it has to go to 1st menu (ADMIN) please help regarding this
if '2' pressed it has to go to 2nd menu (Setter)
1.Enter key pressed means it prints
1.ADMIN
2.Operator
3.Setter
In sub menu if '1' pressed it has to go to 1st menu (ADMIN) please help regarding this
if '2' pressed it has to go to 2nd menu (Setter)
Code:
key =READ_SWITCHES();
switch(menu)
{
case mIdle:
{
switch (key)
{
unsigned char ret ;
case enterkeystore:
{
lcdClear();
lcdMoveCursor(0,0);
lcdPrintStr("1.ADMIN");
lcdMoveCursor(1,0);
lcdPrintStr("2.SETTER");
lcdMoveCursor(2,0);
lcdPrintStr("3.OPERATOR");
delay_s(1);
ret =READ_SWITCHES();
if(ret == '1')
{
lcdClear();
lcdMoveCursor(1,0);
lcdPrintStr("ADMIN");
delay_s(1);
}
if(ret == '2')
{
lcdClear();
lcdMoveCursor(1,0);
lcdPrintStr("SETTER");
delay_s(1);
}
}
break;