void menu_option_set_date( state_t* currentState ){ static uint8_t tempDD, tempMM, tempYY; static char writeOnce = 1; if(writeOnce){ lcd_clearf(); //lcd_clear(); lcd_setcursor(1,1); lcd_string("option_set_date"); tempDD = rtc_data[4]; tempMM = rtc_data[5]; tempYY = rtc_data[6]; lcd_setcursor(2,1); lcd_zahl(tempDD,2,'m'); lcd_data('.'); lcd_zahl(tempMM,2,'m'); lcd_data('.'); lcd_zahl(tempYY,2,'m'); lcd_data(' '); lcd_string("Test"); writeOnce--; } lcd_setcursor(2,10); lcd_zahl(rtc_data[0],2,'m'); if(currentState->input == KEY_LEFT_L){ writeOnce = 1; currentState->function = menu_option_date; } };