Hi,
ich habe mir ein kleines Menü für mein LCD Programmiert. Funktionieren tut es auch. Allerdings bekomme ich noch einige Compilerwarnungen.
Hier der Code:
Warnungen:Code://Definitionen (in der Funktion showMenu() ) #define HAUPT 0 #define SUB 1 uint8_t cursor = 0; //Zeilenposiition uint8_t menu_pos = HAUPT; //Enthält die aktuelle Position im Menü (Haupt oder SUB) uint8_t akt_cat = 0; //Wird für das SUB Menü benötigt, um die gewählt haupkategorie zu erkennen char * main_cat[4]; char * sub_cat[4][4]; uint8_t status = 0; //Wenn 1, dann wird die while schleife unterbrochen main_cat[0] = "---Hauptmenu---"; main_cat[1] = "Beep"; main_cat[2] = "Nix"; main_cat[3] = "Nix2"; main_cat[4] = ""; sub_cat[1][0] = "Zurueck"; sub_cat[1][1] = "Lang-kurz-Lang"; sub_cat[1][2] = "kurz-kurz-kurz"; sub_cat[1][3] = "kein Anschluss"; //Aufruf (aus der Funktion showMenu() ) redraw(&cursor, &akt_cat, &menu_pos, &main_cat, &status); //Funktion redraw() //Zeigt das Hauptmenü erneut an void redraw(uint8_t *_cursor, uint8_t *_akt_cat, uint8_t *_menu_pos, char* *_main_cat, uint8_t *_status){ #define HAUPT 0 #define SUB 1 lcd_clrscr(); *_cursor=0; *_akt_cat=0; *_menu_pos=HAUPT; for(uint8_t i=0; i<4; i++){ lcd_gotoxy(0,i); lcd_puts(_main_cat[i]); } *_status=0; }
Wie kann ich die noch beheben?Code:main.c: In function 'showMenu': main.c:287: warning: passing argument 4 of 'redraw' from incompatible pointer type main.c:293: warning: passing argument 4 of 'redraw' from incompatible pointer type main.c:299: warning: passing argument 4 of 'redraw' from incompatible pointer type main.c:305: warning: passing argument 4 of 'redraw' from incompatible pointer type main.c:308: warning: passing argument 4 of 'redraw' from incompatible pointer type main.c:317: warning: passing argument 4 of 'redraw' from incompatible pointer type main.c:324: warning: passing argument 4 of 'redraw' from incompatible pointer type
MfG Jörn







Zitieren

Lesezeichen