Subversion Repositories svn.mios32

Compare Revisions

Ignore whitespace Rev 1164 → Rev 1165

/trunk/apps/synthesizers/midibox_sid_v3/core/app.cpp
241,9 → 241,11
static u8 wait_boot_ctr = 2; // wait 2 seconds before loading from SD Card - this is to increase the time where the boot screen is print!
//u8 load_sd_content = 0;
 
#if USE_MSD
// don't check for SD Card if MSD enabled
if( TASK_MSD_EnableGet() > 0 )
return;
#endif
 
// boot phase of 2 seconds finished?
if( wait_boot_ctr ) {
/trunk/apps/synthesizers/midibox_sid_v3/mios32/tasks.c
18,12 → 18,15
 
#include <mios32.h>
 
#include <msd.h>
 
#include "app.h"
#include "tasks.h"
 
#if USE_MSD
#include <msd.h>
#endif
 
 
 
/////////////////////////////////////////////////////////////////////////////
// Global variables
/////////////////////////////////////////////////////////////////////////////
46,6 → 49,7
// Local types
/////////////////////////////////////////////////////////////////////////////
 
#if USE_MSD
typedef enum {
MSD_DISABLED,
MSD_INIT,
52,6 → 56,7
MSD_READY,
MSD_SHUTDOWN
} msd_state_t;
#endif
 
 
/////////////////////////////////////////////////////////////////////////////
61,7 → 66,10
#define PRIORITY_TASK_PERIOD1MS ( tskIDLE_PRIORITY + 2 )
#define PRIORITY_TASK_PERIOD1MS_LOW_PRIO ( tskIDLE_PRIORITY + 2 )
#define PRIORITY_TASK_PERIOD1S ( tskIDLE_PRIORITY + 2 )
 
#if USE_MSD
#define PRIORITY_TASK_MSD ( tskIDLE_PRIORITY + 3 )
#endif
 
 
/////////////////////////////////////////////////////////////////////////////
70,7 → 78,10
static void TASK_Period1mS(void *pvParameters);
static void TASK_Period1mS_LowPrio(void *pvParameters);
static void TASK_Period1S(void *pvParameters);
 
#if USE_MSD
static void TASK_MSD(void *pvParameters);
#endif
 
 
/////////////////////////////////////////////////////////////////////////////
77,8 → 88,10
// Local variables
/////////////////////////////////////////////////////////////////////////////
 
#if USE_MSD
static msd_state_t msd_state;
static xTaskHandle xMSDHandle;
#endif
 
/////////////////////////////////////////////////////////////////////////////
86,14 → 99,18
/////////////////////////////////////////////////////////////////////////////
s32 TASKS_Init(u32 mode)
{
#if USE_MSD
// disable MSD by default (has to be enabled in SID_UI_FILE menu)
msd_state = MSD_DISABLED;
#endif
 
// start tasks
xTaskCreate(TASK_Period1mS, (signed portCHAR *)"Period1mS", configMINIMAL_STACK_SIZE, NULL, PRIORITY_TASK_PERIOD1MS, NULL);
xTaskCreate(TASK_Period1mS_LowPrio, (signed portCHAR *)"Period1mS_LP", configMINIMAL_STACK_SIZE, NULL, PRIORITY_TASK_PERIOD1MS_LOW_PRIO, NULL);
xTaskCreate(TASK_Period1S, (signed portCHAR *)"Period1S", configMINIMAL_STACK_SIZE, NULL, PRIORITY_TASK_PERIOD1S, NULL);
#if USE_MSD
xTaskCreate(TASK_MSD, (signed portCHAR *)"MSD", configMINIMAL_STACK_SIZE, NULL, PRIORITY_TASK_MSD, &xMSDHandle);
#endif
 
// create semaphores
xSDCardSemaphore = xSemaphoreCreateRecursiveMutex();
165,6 → 182,7
}
 
 
#if USE_MSD
/////////////////////////////////////////////////////////////////////////////
// This task is called periodically each mS when USB MSD access is enabled
/////////////////////////////////////////////////////////////////////////////
251,3 → 269,4
 
return 0; // no error
}
#endif
/trunk/apps/synthesizers/midibox_sid_v3/mios32/mios32_config.h
86,4 → 86,7
 
#endif
 
// MSD not enabled yet...
#undef USE_MSD
 
#endif /* _MIOS32_CONFIG_H */
/trunk/apps/synthesizers/midibox_sid_v3/Makefile
104,7 → 104,7
include $(MIOS32_PATH)/modules/random/random.mk
 
# USB Mass Storage Device Driver
include $(MIOS32_PATH)/modules/msd/msd.mk
#include $(MIOS32_PATH)/modules/msd/msd.mk
 
# For performance measurings
include $(MIOS32_PATH)/modules/freertos_utils/freertos_utils.mk