void enter_graphic_menu(uint8_t menu_no, uint8_t submenu_no) { char s[20]; LcdFillLine(1); slide_down(); // animacja LcdClear(); if(menu_no==0 && submenu_no==2) // Menu 1.2 { LcdRectangle(0, 0, 83, 47,TRANSPARENT); // ramka rez=enter_integer(rez,-10,100,2,3, "WART." , "s"); // funkcja obslugi danej pozycji menu } LcdRectangle(0, 0, 83, 47,TRANSPARENT); // przykladowy kod po powrocie z funkcji obslugi menu LcdClearArea(3,2,13); LcdGotoXY(2,3); sprintf(s,"MENU %1u.%1u:%d",menu_no + 1, submenu_no, rez); LcdStr(FONT_1X, FONT_POSITIVE, (unsigned char*)s); delay_ms(1000); LcdFillLine(1); // powrot do menu LcdGotoXY(2,1); slide_up(); // animacja LcdStr(FONT_1X,FONT_NEGATIVE,"MENU"); slide_down(); // animacja show_graphic_menu(menu_item,submenu_item); // pokazanie menu }
void enter_menu(uint8_t menu_no, uint8_t submenu_no) { char s[20]; if(menu_no==0 && submenu_no==2) // Menu 1.2 rez=enter_integer(rez,-10,100,1,3, "WARTOSC" , "s"); LcdClearLine(3); LcdGotoXY(1,3); sprintf(s,"ENTER %1u.%1u:%d",menu_no + 1, submenu_no, rez); LcdStr(FONT_1X, FONT_POSITIVE, (unsigned char*)s); delay_ms(1000); LcdClearLine(3); }
void enter_token () { int i; if (CTok.type == IDENT_DUMMY) i = c_symbol (CTok.p, CTok.len); else if (CTok.type == STRING) { string_constant (CTok.p, CTok.len); return; } else if (CTok.type == CONSTANT || CTok.type == CCONSTANT) i = (include_values) ? enter_integer () : INT8BASE; else if (CTok.type == FCONSTANT) i = (include_values) ? enter_float () : FLOATBASE; else i = CTok.type; if (string) { _enter_token ((include_strings) ? enter_string () : STRINGBASE); string = NULL; } _enter_token (i); }