Subversion Repositories svn.mios32

Rev

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

Rev 2294 Rev 2301
Line 1... Line 1...
1
// $Id: seq_ui.c 2294 2016-02-08 21:21:34Z tk $
1
// $Id: seq_ui.c 2301 2016-02-10 20:31:46Z tk $
2
/*
2
/*
3
 * User Interface Routines
3
 * User Interface Routines
4
 *
4
 *
5
 * ==========================================================================
5
 * ==========================================================================
6
 *
6
 *
Line 2984... Line 2984...
2984
  if( !SEQ_FILE_HW_ConfigLocked() )
2984
  if( !SEQ_FILE_HW_ConfigLocked() )
2985
    return -1;
2985
    return -1;
2986
2986
2987
  // GP LEDs are updated when ui_gp_leds has changed
2987
  // GP LEDs are updated when ui_gp_leds has changed
2988
  static u16 prev_ui_gp_leds = 0x0000;
2988
  static u16 prev_ui_gp_leds = 0x0000;
-
 
2989
  u8 sequencer_running = SEQ_BPM_IsRunning();
2989
2990
2990
  // beat LED
2991
  // beat LED
2991
  u8 sequencer_running = SEQ_BPM_IsRunning();
-
 
2992
  u8 beat_led_on = sequencer_running && ((seq_core_state.ref_step & 3) == 0);
2992
  u8 beat_led_on = sequencer_running && ((seq_core_state.ref_step % 4) == 0);
2993
  SEQ_LED_PinSet(seq_hwcfg_led.beat, beat_led_on);
2993
  SEQ_LED_PinSet(seq_hwcfg_led.beat, beat_led_on);
2994
2994
2995
  // mirror to status LED (inverted, so that LED is normaly on)
2995
  // mirror to status LED (inverted, so that LED is normaly on)
2996
  MIOS32_BOARD_LED_Set(0xffffffff, beat_led_on ? 0 : 1);
2996
  MIOS32_BOARD_LED_Set(0xffffffff, beat_led_on ? 0 : 1);
-
 
2997
-
 
2998
  // measure LED
-
 
2999
  u8 measure_led_on = sequencer_running && ((seq_core_state.ref_step % (seq_core_steps_per_measure+1)) == 0);
-
 
3000
  SEQ_LED_PinSet(seq_hwcfg_led.measure, measure_led_on);
2997
3001
2998
  // MIDI IN/OUT LEDs
3002
  // MIDI IN/OUT LEDs
2999
  SEQ_LED_PinSet(seq_hwcfg_led.midi_in_combined, seq_midi_port_in_combined_ctr);
3003
  SEQ_LED_PinSet(seq_hwcfg_led.midi_in_combined, seq_midi_port_in_combined_ctr);
3000
  SEQ_LED_PinSet(seq_hwcfg_led.midi_out_combined, seq_midi_port_out_combined_ctr);  
3004
  SEQ_LED_PinSet(seq_hwcfg_led.midi_out_combined, seq_midi_port_out_combined_ctr);  
3001
3005