Subversion Repositories svn.mios32

Rev

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

Rev 2628 Rev 2629
Line 1... Line 1...
1
// $Id: seq_ui.c 2628 2018-12-30 21:14:09Z tk $
1
// $Id: seq_ui.c 2629 2018-12-31 19:12:32Z tk $
2
/*
2
/*
3
 * User Interface Routines
3
 * User Interface Routines
4
 *
4
 *
5
 * ==========================================================================
5
 * ==========================================================================
6
 *
6
 *
Line 3440... Line 3440...
3440
  static u16 prev_ui_gp_leds = 0x0000;
3440
  static u16 prev_ui_gp_leds = 0x0000;
3441
  u8 sequencer_running = SEQ_BPM_IsRunning();
3441
  u8 sequencer_running = SEQ_BPM_IsRunning();
3442
3442
3443
  // beat LED
3443
  // beat LED
3444
  u8 beat_led_on = sequencer_running && ((seq_core_state.ref_step % 4) == 0);
3444
  u8 beat_led_on = sequencer_running && ((seq_core_state.ref_step % 4) == 0);
-
 
3445
  u8 measure_led_on = sequencer_running && ((seq_core_state.ref_step % (seq_core_steps_per_measure+1)) == 0);
3445
  SEQ_LED_PinSet(seq_hwcfg_led.beat, beat_led_on);
3446
  SEQ_LED_PinSet(seq_hwcfg_led.beat, (seq_hwcfg_led.measure && measure_led_on) ? 0 : beat_led_on);
3446
3447
3447
  // mirror to green status LED (inverted, so that LED is normaly on)
3448
  // mirror to green status LED (inverted, so that LED is normaly on)
3448
  MIOS32_BOARD_LED_Set(0x00000001, sequencer_running ? (beat_led_on ? 1 : 0) : 1);
3449
  MIOS32_BOARD_LED_Set(0x00000001, sequencer_running ? (beat_led_on ? 1 : 0) : 1);
3449
3450
3450
  // measure LED
3451
  // measure LED
3451
  u8 measure_led_on = sequencer_running && ((seq_core_state.ref_step % (seq_core_steps_per_measure+1)) == 0);
-
 
3452
  SEQ_LED_PinSet(seq_hwcfg_led.measure, measure_led_on);
3452
  SEQ_LED_PinSet(seq_hwcfg_led.measure, measure_led_on);
3453
3453
3454
  // mirror to red status LED
3454
  // mirror to red status LED
3455
  //MIOS32_BOARD_LED_Set(0x00000002, measure_led_on ? 2 : 0);
3455
  //MIOS32_BOARD_LED_Set(0x00000002, measure_led_on ? 2 : 0);
3456
  // now used for SD Card indicator
3456
  // now used for SD Card indicator