@@ -436,7 +436,7 @@ DRESULT disk_read (
|
||||
BYTE drv, /* Physical drive nmuber (0) */
|
||||
BYTE *buff, /* Pointer to the data buffer to store read data */
|
||||
DWORD sector, /* Start sector number (LBA) */
|
||||
BYTE count /* Sector count (1..255) */
|
||||
UINT count /* Sector count (1..255) */
|
||||
)
|
||||
{
|
||||
if (drv || !count) return RES_PARERR;
|
||||
@@ -473,7 +473,7 @@ DRESULT disk_write (
|
||||
BYTE drv, /* Physical drive nmuber (0) */
|
||||
const BYTE *buff, /* Pointer to the data to be written */
|
||||
DWORD sector, /* Start sector number (LBA) */
|
||||
BYTE count /* Sector count (1..255) */
|
||||
UINT count /* Sector count (1..255) */
|
||||
)
|
||||
{
|
||||
if (drv || !count) return RES_PARERR;
|
||||
@@ -682,7 +682,7 @@ void sdMountPoll()
|
||||
if (mountTimer-- == 0) {
|
||||
mountTimer = 100;
|
||||
if (!sdMounted()) {
|
||||
f_mount(0, &g_FATFS_Obj);
|
||||
f_mount(&g_FATFS_Obj, "", 1);
|
||||
f_chdir(ROOT_PATH);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -497,7 +497,7 @@ FRESULT f_stat (const TCHAR * name, FILINFO *)
|
||||
return stat(path, &tmp) ? FR_INVALID_NAME : FR_OK;
|
||||
}
|
||||
|
||||
FRESULT f_mount (BYTE, FATFS*)
|
||||
FRESULT f_mount (FATFS* ,const TCHAR*, BYTE opt)
|
||||
{
|
||||
return FR_OK;
|
||||
}
|
||||
@@ -598,7 +598,7 @@ FRESULT f_readdir (DIR * rep, FILINFO * fil)
|
||||
return FR_OK;
|
||||
}
|
||||
|
||||
FRESULT f_mkfs (unsigned char, unsigned char, unsigned int)
|
||||
FRESULT f_mkfs (const TCHAR *path, BYTE, UINT)
|
||||
{
|
||||
printf("Format SD...\n"); fflush(stdout);
|
||||
return FR_OK;
|
||||
|
||||
@@ -1091,7 +1091,7 @@ void sdInit()
|
||||
// Should check the card can do this ****
|
||||
Card_state = SD_ST_DATA;
|
||||
|
||||
if (f_mount(0, &g_FATFS_Obj) == FR_OK) {
|
||||
if (f_mount(&g_FATFS_Obj, "", 1) == FR_OK) {
|
||||
referenceSystemAudioFiles();
|
||||
Card_state = SD_ST_MOUNTED;
|
||||
}
|
||||
@@ -1103,7 +1103,7 @@ void sdDone()
|
||||
{
|
||||
if (sdMounted()) {
|
||||
audioQueue.stopSD();
|
||||
f_mount(0, 0); // unmount SD
|
||||
f_mount(NULL, "", 0); // unmount SD
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1279,7 +1279,7 @@ DRESULT disk_read (
|
||||
BYTE drv, /* Physical drive nmuber (0) */
|
||||
BYTE *buff, /* Pointer to the data buffer to store read data */
|
||||
DWORD sector, /* Start sector number (LBA) */
|
||||
BYTE count /* Sector count (1..255) */
|
||||
UINT count /* Sector count (1..255) */
|
||||
)
|
||||
{
|
||||
uint32_t result ;
|
||||
@@ -1326,7 +1326,7 @@ DRESULT disk_write (
|
||||
BYTE drv, /* Physical drive nmuber (0) */
|
||||
const BYTE *buff, /* Pointer to the data to be written */
|
||||
DWORD sector, /* Start sector number (LBA) */
|
||||
BYTE count /* Sector count (1..255) */
|
||||
UINT count /* Sector count (1..255) */
|
||||
)
|
||||
{
|
||||
uint32_t result ;
|
||||
|
||||
@@ -193,7 +193,7 @@ void usbMassStorage()
|
||||
Card_state = SD_ST_DATA;
|
||||
audioQueue.stopSD();
|
||||
closeLogs();
|
||||
f_mount(0, 0); // unmount SD
|
||||
f_mount(NULL, "", 0); // unmount SD
|
||||
}
|
||||
|
||||
if (!initialized) {
|
||||
|
||||
@@ -756,7 +756,7 @@ DRESULT disk_read (
|
||||
BYTE drv, /* Physical drive number (0) */
|
||||
BYTE *buff, /* Pointer to the data buffer to store read data */
|
||||
DWORD sector, /* Start sector number (LBA) */
|
||||
BYTE count /* Sector count (1..255) */
|
||||
UINT count /* Sector count (1..255) */
|
||||
)
|
||||
{
|
||||
if (drv || !count) return RES_PARERR;
|
||||
@@ -816,7 +816,7 @@ DRESULT disk_write (
|
||||
BYTE drv, /* Physical drive number (0) */
|
||||
const BYTE *buff, /* Pointer to the data to be written */
|
||||
DWORD sector, /* Start sector number (LBA) */
|
||||
BYTE count /* Sector count (1..255) */
|
||||
UINT count /* Sector count (1..255) */
|
||||
)
|
||||
{
|
||||
if (drv || !count) return RES_PARERR;
|
||||
@@ -1040,7 +1040,7 @@ FIL g_telemetryFile = {0};
|
||||
#if defined(BOOT)
|
||||
void sdInit(void)
|
||||
{
|
||||
if (f_mount(0, &g_FATFS_Obj) == FR_OK) {
|
||||
if (f_mount(&g_FATFS_Obj, "", 1) == FR_OK) {
|
||||
f_chdir("/");
|
||||
}
|
||||
}
|
||||
@@ -1054,7 +1054,7 @@ void sdInit(void)
|
||||
return;
|
||||
}
|
||||
|
||||
if (f_mount(0, &g_FATFS_Obj) == FR_OK) {
|
||||
if (f_mount(&g_FATFS_Obj, "", 1) == FR_OK) {
|
||||
referenceSystemAudioFiles();
|
||||
|
||||
#if defined(SPORT_FILE_LOG)
|
||||
@@ -1073,7 +1073,7 @@ void sdDone()
|
||||
#if defined(SPORT_FILE_LOG)
|
||||
f_close(&g_telemetryFile);
|
||||
#endif
|
||||
f_mount(0, 0); // unmount SD
|
||||
f_mount(NULL, "", 0); // unmount SD
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user