Subversion Repositories svn.mios32

Rev

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

Rev 1911 Rev 1920
Line 1... Line 1...
1
// $Id: app.c 1911 2014-01-02 15:40:40Z tk $
1
// $Id: app.c 1920 2014-01-08 19:29:35Z tk $
2
/*
2
/*
3
 * MIDIbox KB
3
 * MIDIbox KB
4
 *
4
 *
5
 * ==========================================================================
5
 * ==========================================================================
6
 *
6
 *
Line 135... Line 135...
135
/////////////////////////////////////////////////////////////////////////////
135
/////////////////////////////////////////////////////////////////////////////
136
// This task is running endless in background
136
// This task is running endless in background
137
/////////////////////////////////////////////////////////////////////////////
137
/////////////////////////////////////////////////////////////////////////////
138
void APP_Background(void)
138
void APP_Background(void)
139
{
139
{
140
  // init LCD
140
}
141
  MIOS32_LCD_Clear();
-
 
142
  MIOS32_LCD_CursorSet(0, 0);
-
 
143
  MIOS32_LCD_PrintString("see README.txt   ");
-
 
144
  MIOS32_LCD_CursorSet(0, 1);
-
 
145
  MIOS32_LCD_PrintString("for details     ");
-
 
146
141
-
 
142
-
 
143
/////////////////////////////////////////////////////////////////////////////
-
 
144
// This hook is called each mS from the main task which also handles DIN, ENC
-
 
145
// and AIN events. You could add more jobs here, but they shouldn't consume
-
 
146
// more than 300 uS to ensure the responsiveness of buttons, encoders, pots.
-
 
147
// Alternatively you could create a dedicated task for application specific
-
 
148
// jobs as explained in $MIOS32_PATH/apps/tutorials/006_rtos_tasks
-
 
149
/////////////////////////////////////////////////////////////////////////////
147
  // endless loop
150
void APP_Tick(void)
148
  while( 1 ) {
151
{
149
    // toggle the state of all LEDs (allows to measure the execution speed with a scope)
152
  // PWM modulate the status LED (this is a sign of life)
-
 
153
  u32 timestamp = MIOS32_TIMESTAMP_Get();
150
    MIOS32_BOARD_LED_Set(0xffffffff, ~MIOS32_BOARD_LED_Get());
154
  MIOS32_BOARD_LED_Set(1, (timestamp % 20) <= ((timestamp / 100) % 10));
151
  }
155
}
-
 
156
-
 
157
-
 
158
/////////////////////////////////////////////////////////////////////////////
-
 
159
// This hook is called each mS from the MIDI task which checks for incoming
-
 
160
// MIDI events. You could add more MIDI related jobs here, but they shouldn't
-
 
161
// consume more than 300 uS to ensure the responsiveness of incoming MIDI.
-
 
162
/////////////////////////////////////////////////////////////////////////////
-
 
163
void APP_MIDI_Tick(void)
-
 
164
{
152
}
165
}
153
166
154
167
155
/////////////////////////////////////////////////////////////////////////////
168
/////////////////////////////////////////////////////////////////////////////
156
// This hook is called when a MIDI package has been received
169
// This hook is called when a MIDI package has been received