Screen interface arduino mkrzero

hello, i'm using an arduino MKZERO in order to program it to use a screen of differents menu and pages. each menu has many items. i have four physical buttons.

for the screen i'm using an array of structurs, each array is a page.
my question is: i'm a beginner in strucutres and i don't know if how correct my code in the right way. where are the problems in my code. can you guide me ?

i just putted the first page, when it works without error i will add the others
typedef enum {
IDM_MAIN=0,
IDM_FIX_MODE,
IDM_MOBILE_MODE,
IDM_LAST_SETTING,
IDM_POSITION=11,
IDM_RESET,
IDM_YOUR_COORDINATES=21,
IDM_APPLY_LAST_SETTING=31,
IDM_OLD_POSITION=111,
IDM_NEW_POSITION,
IDM_APPLY_RESET=121,
IDM_LAST_SETTING_CONFIRMED=131,
IDM_APPLY_OLD_POSITION=1111,
IDM_NAME=2111,
IDM_X,
IDM_Y,
IDM_Z,
IDM_RESET_CONFIRMED = 1211,
IDM_OLD_POSITION_CONFIRMED = 11111
}t_page;

typedef struct
{
t_page next_page;
void function(void);
}t_ITEM_MODE;

typedef struct {
t_page page;
char page_title[20];
t_page parent_page;
t_ITEM_MODE item[10];
}t_PAGE;

int N=50;
t_PAGE screen[N] = {
//enum page, page_title[ ], enum parent_page,Item item[{item1}, {item2}]

[ IDM_MAIN , "PRINCIPAL MENU", IDM_MAIN,[ {IDM_FIX_MODE, NULL }, {IDM_MOBILE_MODE, NULL }, {IDM_LAST_SETTING, NULL} ] ], // t_page1

};

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.