typedef struct {
unsigned char index;
char *line1;
char *line2;
char *line3;
char *line4;
} tmenuStr;
enum {
MENU_DISP_GREETING,
MENU_DISP_MENU1,
MENU_DISP_MENU2
};
const tmenuStr menuStruct[] = {
{MENU_DISP_GREETING, "My project here", "Hello World!", "Whatever else", "And more text"},
{MENU_DISP_MENU1, "Menu1 - line1", "Menu1 - line2", "Menu1 - line3", "Menu1 - line4"},
{MENU_DISP_MENU2, "Menu2 - line1", "Menu2 - line2", "Menu2 - line3", "Menu2 line four"}
};
void lcd_output (unsigned char menuPtr) {
lcd_print(menuStruct[menuPtr].line1);
lcd_gotoRow2();
lcd_print(menuStruct[menuPtr].line2);
lcd_gotoRow3();
lcd_print(menuStruct[menuPtr].line3);
lcd_gotoRow4();
lcd_print(menuStruct[menuPtr].line4);
}
lcd_output (MENU_DISP_GREETING);