Allow USB mode selection on USB connect (#5193)

Allow all USB modes to be compiled in at the same time
This commit is contained in:
Arne Schwabe
2017-09-10 17:28:08 +02:00
committed by Bertrand Songis
parent 2910488a30
commit b7acee5723
45 changed files with 1515 additions and 1239 deletions
+7 -2
View File
@@ -993,13 +993,18 @@ void sdInit(void)
void sdInit(void)
{
TRACE("sdInit");
ioMutex = CoCreateMutex();
if (ioMutex >= CFG_MAX_MUTEX ) {
if (ioMutex >= CFG_MAX_MUTEX) {
//sd error
return;
}
sdMount();
}
void sdMount()
{
TRACE("sdMount");
if (f_mount(&g_FATFS_Obj, "", 1) == FR_OK) {
// call sdGetFreeSectors() now because f_getfree() takes a long time first time it's called
sdGetFreeSectors();