Code: Select all
void main_menu() {
unsigned int ex = 1;
unsigned int sw = 1;
CustomChar(1,1);
Lcd_out(1,3,"Battery Capacity");
Lcd_out(2,3,"Charge Alarm");
Lcd_out(3,3,"Tire Size");
Lcd_out(4,3,"Exit");
while(ex==1);
{
if(PORTB.F3 == 0)
if(sw !=4)
{
sw++;
CustomChar(sw,1);
}
else if (PORTB.F2 == 0)
if (sw !=1)
{
sw--;
CustomChar(sw,1);
}
if(PORTB.F4 == 0)
{
Delay_ms(2);
while(PORTB.F4 == 0);
{
switch (sw){
case 1:
//{
//ex=0;
battery_capacity();
break;
//}
case 2:
//{
ex=0;
charge_alarm();
//break;
//}
case 3:
//{
ex=0;
tire_size();
//break;
//}
case 4:
//{
ex=0;
break;
//}
}
}
}
}
}