Re: if i have function (A) contains many function & i want to make to another ......
in my case variable is global i make some manipulation on it i will post to you one of my function
###########################################################
void edate_menu(void)
{
unsigned char prev_edate;
prev_edate=edate;
lcd_gotoxy(0,1);
lcd_putsf("date=");
lcd_gotoxy(5,1);
itoa(edate,string);
lcd_puts (string);
while(MENU==1 && CANCEL==1)
{
if(UP==0)
{
while(UP==0);
edate+=1;
if(edate==32)
{
lcd_gotoxy(0,1);
lcd_putsf("date= ");
edate=1;
}
lcd_gotoxy(5,1);
itoa(edate,string);
lcd_puts (string);
}
if(DOWN==0)
{
while(DOWN==0);
edate-=1;
if(edate==0)
{
lcd_gotoxy(0,1);
lcd_putsf("date= ");
edate=31 ;
}
lcd_gotoxy(5,1);
itoa(edate,string);
lcd_puts (string);
}
}
if(MENU==0)
{
// while(MENU==0);
SAVED_message() ;
EEprom_WRite(edate,edate_address);
// menu_index++;
sdate= EEprom_READ(edate_address);
long_delay();
}
else
{
//while(CANCEL==0);
NOT_SAVED_message();
EEprom_WRite(prev_edate,edate_address);
// menu_index++;
long_delay();
}
}
#########################################################