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:
committed by
Bertrand Songis
parent
2910488a30
commit
b7acee5723
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user