Subversion Repositories svn.mios32

Rev

Rev 2301 | Rev 2322 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2301 Rev 2308
Line 1... Line 1...
1
// $Id: seq_ui.c 2301 2016-02-10 20:31:46Z tk $
1
// $Id: seq_ui.c 2308 2016-02-14 19:30:07Z tk $
2
/*
2
/*
3
 * User Interface Routines
3
 * User Interface Routines
4
 *
4
 *
5
 * ==========================================================================
5
 * ==========================================================================
6
 *
6
 *
Line 1154... Line 1154...
1154
      SEQ_UI_Msg_Track("Undo applied");
1154
      SEQ_UI_Msg_Track("Undo applied");
1155
    }
1155
    }
1156
1156
1157
    return status;
1157
    return status;
1158
  }
1158
  }
-
 
1159
}
-
 
1160
-
 
1161
static s32 SEQ_UI_Button_Move(s32 depressed)
-
 
1162
{
-
 
1163
  static seq_ui_page_t prev_page = SEQ_UI_PAGE_NONE;
-
 
1164
-
 
1165
  seq_ui_button_state.MOVE = depressed ? 0 : 1;
-
 
1166
-
 
1167
  if( !depressed ) {
-
 
1168
    prev_page = ui_page;
-
 
1169
    SEQ_UI_PageSet(SEQ_UI_PAGE_UTIL);
-
 
1170
  }
-
 
1171
-
 
1172
  s32 status = SEQ_UI_UTIL_MoveButton(depressed);
-
 
1173
  if( depressed ) {
-
 
1174
    if( prev_page != SEQ_UI_PAGE_UTIL )
-
 
1175
      SEQ_UI_PageSet(prev_page);
-
 
1176
  }
-
 
1177
-
 
1178
  return status;
-
 
1179
}
-
 
1180
-
 
1181
static s32 SEQ_UI_Button_Scroll(s32 depressed)
-
 
1182
{
-
 
1183
  static seq_ui_page_t prev_page = SEQ_UI_PAGE_NONE;
-
 
1184
-
 
1185
  seq_ui_button_state.SCROLL = depressed ? 0 : 1;
-
 
1186
-
 
1187
  if( !depressed ) {
-
 
1188
    prev_page = ui_page;
-
 
1189
    SEQ_UI_PageSet(SEQ_UI_PAGE_UTIL);
-
 
1190
  }
-
 
1191
-
 
1192
  s32 status = SEQ_UI_UTIL_ScrollButton(depressed);
-
 
1193
  if( depressed ) {
-
 
1194
    if( prev_page != SEQ_UI_PAGE_UTIL )
-
 
1195
      SEQ_UI_PageSet(prev_page);
-
 
1196
  }
-
 
1197
-
 
1198
  return status;
1159
}
1199
}
1160
1200
1161
1201
1162
static s32 SEQ_UI_Button_Menu(s32 depressed)
1202
static s32 SEQ_UI_Button_Menu(s32 depressed)
1163
{
1203
{
Line 2117... Line 2157...
2117
    return SEQ_UI_Button_Paste(pin_value);
2157
    return SEQ_UI_Button_Paste(pin_value);
2118
  if( pin == seq_hwcfg_button.clear )
2158
  if( pin == seq_hwcfg_button.clear )
2119
    return SEQ_UI_Button_Clear(pin_value);
2159
    return SEQ_UI_Button_Clear(pin_value);
2120
  if( pin == seq_hwcfg_button.undo )
2160
  if( pin == seq_hwcfg_button.undo )
2121
    return SEQ_UI_Button_Undo(pin_value);
2161
    return SEQ_UI_Button_Undo(pin_value);
-
 
2162
  if( pin == seq_hwcfg_button.move )
-
 
2163
    return SEQ_UI_Button_Move(pin_value);
-
 
2164
  if( pin == seq_hwcfg_button.scroll )
-
 
2165
    return SEQ_UI_Button_Scroll(pin_value);
2122
2166
2123
  if( pin == seq_hwcfg_button.menu )
2167
  if( pin == seq_hwcfg_button.menu )
2124
    return SEQ_UI_Button_Menu(pin_value);
2168
    return SEQ_UI_Button_Menu(pin_value);
2125
  if( pin == seq_hwcfg_button.bookmark )
2169
  if( pin == seq_hwcfg_button.bookmark )
2126
    return SEQ_UI_Button_Bookmark(pin_value);
2170
    return SEQ_UI_Button_Bookmark(pin_value);
Line 2884... Line 2928...
2884
  SEQ_LED_PinSet(seq_hwcfg_led.utility, ui_page == SEQ_UI_PAGE_UTIL);
2928
  SEQ_LED_PinSet(seq_hwcfg_led.utility, ui_page == SEQ_UI_PAGE_UTIL);
2885
  SEQ_LED_PinSet(seq_hwcfg_led.copy, seq_ui_button_state.COPY);
2929
  SEQ_LED_PinSet(seq_hwcfg_led.copy, seq_ui_button_state.COPY);
2886
  SEQ_LED_PinSet(seq_hwcfg_led.paste, seq_ui_button_state.PASTE);
2930
  SEQ_LED_PinSet(seq_hwcfg_led.paste, seq_ui_button_state.PASTE);
2887
  SEQ_LED_PinSet(seq_hwcfg_led.undo, seq_ui_button_state.UNDO);
2931
  SEQ_LED_PinSet(seq_hwcfg_led.undo, seq_ui_button_state.UNDO);
2888
  SEQ_LED_PinSet(seq_hwcfg_led.clear, seq_ui_button_state.CLEAR);
2932
  SEQ_LED_PinSet(seq_hwcfg_led.clear, seq_ui_button_state.CLEAR);
-
 
2933
  SEQ_LED_PinSet(seq_hwcfg_led.move, seq_ui_button_state.MOVE);
-
 
2934
  SEQ_LED_PinSet(seq_hwcfg_led.scroll, seq_ui_button_state.SCROLL);
2889
2935
2890
  SEQ_LED_PinSet(seq_hwcfg_led.tap_tempo, seq_ui_button_state.TAP_TEMPO);
2936
  SEQ_LED_PinSet(seq_hwcfg_led.tap_tempo, seq_ui_button_state.TAP_TEMPO);
2891
  SEQ_LED_PinSet(seq_hwcfg_led.tempo_preset, ui_page == SEQ_UI_PAGE_BPM_PRESETS);
2937
  SEQ_LED_PinSet(seq_hwcfg_led.tempo_preset, ui_page == SEQ_UI_PAGE_BPM_PRESETS);
2892
  SEQ_LED_PinSet(seq_hwcfg_led.ext_restart, seq_core_state.EXT_RESTART_REQ);
2938
  SEQ_LED_PinSet(seq_hwcfg_led.ext_restart, seq_core_state.EXT_RESTART_REQ);
2893
2939