static unsigned _action_cb(u32 button, unsigned flags, void *data) { u8 i; if ((flags & BUTTON_PRESS) && CHAN_ButtonIsPressed(button, BUT_ENTER)) { u8 page = (0 << 4) | MENUTYPE_MAINMENU; PAGE_ChangeByID(PAGEID_MENU, page); } else if ((flags & BUTTON_PRESS) && CHAN_ButtonIsPressed(button, BUT_RIGHT)) { for ( i=0; i< NUM_TIMERS; i++) TIMER_StartStop(i); } else if ((flags & BUTTON_PRESS) && CHAN_ButtonIsPressed(button, BUT_LEFT)) { for ( i=0; i< NUM_TIMERS; i++) TIMER_Reset(i); } else if (! PAGE_QuickPage(button, flags, data)) { MIXER_UpdateTrim(button, flags, data); } return 1; }
static unsigned _action_cb(u32 button, unsigned flags, void *data) { u8 i; if ((flags & BUTTON_PRESS) && CHAN_ButtonIsPressed(button, BUT_ENTER)) { //see pagelist.h for mapping of 'page' to menu_id PAGE_PushByID(PAGEID_MENU, 0); } else if ((flags & BUTTON_PRESS) && CHAN_ButtonIsPressed(button, BUT_RIGHT)) { for ( i=0; i< NUM_TIMERS; i++) TIMER_StartStop(i); } else if ((flags & BUTTON_PRESS) && CHAN_ButtonIsPressed(button, BUT_LEFT)) { for ( i=0; i< NUM_TIMERS; i++) TIMER_Reset(i); } else if (! PAGE_QuickPage(button, flags, data)) { MIXER_UpdateTrim(button, flags, data); } return 1; }