Все очень просто
typedef
struct _menuItem {
char flash *itemText;
void (*itemFunction)(char);
char itemArg;
}
MenuItem;
static __flash char _read[] = "Read device ",
_program[] = "Program device ",
_set[] = "Set device ",
_insert[] = "Insert ",
_edit[] = "Edit buffer ",
_clear[] = "Clear buffer ",
_append[] = "Append ",
_run[] = "Run ",
_stop[] = "Stop ";
static MenuItem __flash
MenuItems[] = {
_set, SetType, 0,
_read, 0, 0,
_program, 0, 0,
_insert, Edit, INSERT_BUFFER,
_edit, Edit, EDIT_BUFFER,
_clear, Edit, CLEAR_BUFFER,
_append, Edit, APPEND_BUFFER,
_run, Run, 0,
_stop, Stop, 0
};