generated from Embedded_Projects/Landzo_K60Z_LwIP
20 lines
305 B
C
20 lines
305 B
C
|
#include "ff.h"
|
||
|
|
||
|
FATFS g_fs; /* File system object */
|
||
|
|
||
|
int fs_mount(void) {
|
||
|
if (f_mount(&g_fs, "0:/", 1U)) {
|
||
|
return -1;
|
||
|
}
|
||
|
|
||
|
FRESULT error = f_mkdir(_T("0:/TMP"));
|
||
|
|
||
|
if (error) {
|
||
|
if (error == FR_EXIST) {
|
||
|
} else {
|
||
|
return -2;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return 0;
|
||
|
}
|