diff options
Diffstat (limited to 'backends/platform/ds/arm9/source/fat')
-rw-r--r-- | backends/platform/ds/arm9/source/fat/gba_nds_fat.c | 16 | ||||
-rw-r--r-- | backends/platform/ds/arm9/source/fat/io_dldi.s | 2 | ||||
-rw-r--r-- | backends/platform/ds/arm9/source/fat/io_njsd.c | 6 | ||||
-rw-r--r-- | backends/platform/ds/arm9/source/fat/io_nmmc.c | 4 | ||||
-rw-r--r-- | backends/platform/ds/arm9/source/fat/io_sd_common.c | 2 |
5 files changed, 15 insertions, 15 deletions
diff --git a/backends/platform/ds/arm9/source/fat/gba_nds_fat.c b/backends/platform/ds/arm9/source/fat/gba_nds_fat.c index 9594066f03..fffd8ab88b 100644 --- a/backends/platform/ds/arm9/source/fat/gba_nds_fat.c +++ b/backends/platform/ds/arm9/source/fat/gba_nds_fat.c @@ -362,7 +362,7 @@ u32 FAT_NextCluster(u32 cluster) if (cluster & 0x01) { nextCluster = nextCluster >> 4; - } else { + } else { nextCluster &= 0x0FFF; } @@ -1231,7 +1231,7 @@ bool FAT_GetAlias (char* alias) // Read in the last accessed directory entry disc_ReadSector ((wrkDirCluster == FAT16_ROOT_DIR_CLUSTER ? filesysRootDir : FAT_ClustToSect(wrkDirCluster)) + wrkDirSector, globalBuffer); - return FAT_GetFilename (((DIR_ENT*)globalBuffer)[wrkDirOffset], alias); + return FAT_GetFilename (((DIR_ENT*)globalBuffer)[wrkDirOffset], alias); } /*----------------------------------------------------------------- @@ -1245,7 +1245,7 @@ u32 FAT_GetFileSize (void) // Read in the last accessed directory entry disc_ReadSector ((wrkDirCluster == FAT16_ROOT_DIR_CLUSTER ? filesysRootDir : FAT_ClustToSect(wrkDirCluster)) + wrkDirSector, globalBuffer); - return ((DIR_ENT*)globalBuffer)[wrkDirOffset].fileSize; + return ((DIR_ENT*)globalBuffer)[wrkDirOffset].fileSize; } /*----------------------------------------------------------------- @@ -1258,7 +1258,7 @@ u32 FAT_GetFileCluster (void) // Read in the last accessed directory entry disc_ReadSector ((wrkDirCluster == FAT16_ROOT_DIR_CLUSTER ? filesysRootDir : FAT_ClustToSect(wrkDirCluster)) + wrkDirSector, globalBuffer); - return (((DIR_ENT*)globalBuffer)[wrkDirOffset].startCluster) | (((DIR_ENT*)globalBuffer)[wrkDirOffset].startClusterHigh << 16); + return (((DIR_ENT*)globalBuffer)[wrkDirOffset].startCluster) | (((DIR_ENT*)globalBuffer)[wrkDirOffset].startClusterHigh << 16); } /*----------------------------------------------------------------- @@ -1271,7 +1271,7 @@ u8 FAT_GetFileAttributes (void) // Read in the last accessed directory entry disc_ReadSector ((wrkDirCluster == FAT16_ROOT_DIR_CLUSTER ? filesysRootDir : FAT_ClustToSect(wrkDirCluster)) + wrkDirSector, globalBuffer); - return ((DIR_ENT*)globalBuffer)[wrkDirOffset].attrib; + return ((DIR_ENT*)globalBuffer)[wrkDirOffset].attrib; } #ifdef CAN_WRITE_TO_DISC @@ -1297,7 +1297,7 @@ u8 FAT_SetFileAttributes (const char* filename, u8 attributes, u8 mask) disc_WriteSector ((wrkDirCluster == FAT16_ROOT_DIR_CLUSTER ? filesysRootDir : FAT_ClustToSect(wrkDirCluster)) + wrkDirSector, globalBuffer); - return ((DIR_ENT*)globalBuffer)[wrkDirOffset].attrib; + return ((DIR_ENT*)globalBuffer)[wrkDirOffset].attrib; } #endif @@ -1327,7 +1327,7 @@ time_t FAT_GetFileCreationTime (void) // Read in the last accessed directory entry disc_ReadSector ((wrkDirCluster == FAT16_ROOT_DIR_CLUSTER ? filesysRootDir : FAT_ClustToSect(wrkDirCluster)) + wrkDirSector, globalBuffer); - return FAT_FileTimeToCTime(((DIR_ENT*)globalBuffer)[wrkDirOffset].cTime, ((DIR_ENT*)globalBuffer)[wrkDirOffset].cDate); + return FAT_FileTimeToCTime(((DIR_ENT*)globalBuffer)[wrkDirOffset].cTime, ((DIR_ENT*)globalBuffer)[wrkDirOffset].cDate); } /*----------------------------------------------------------------- @@ -1340,7 +1340,7 @@ time_t FAT_GetFileLastWriteTime (void) // Read in the last accessed directory entry disc_ReadSector ((wrkDirCluster == FAT16_ROOT_DIR_CLUSTER ? filesysRootDir : FAT_ClustToSect(wrkDirCluster)) + wrkDirSector, globalBuffer); - return FAT_FileTimeToCTime(((DIR_ENT*)globalBuffer)[wrkDirOffset].mTime, ((DIR_ENT*)globalBuffer)[wrkDirOffset].mDate); + return FAT_FileTimeToCTime(((DIR_ENT*)globalBuffer)[wrkDirOffset].mTime, ((DIR_ENT*)globalBuffer)[wrkDirOffset].mDate); } #endif diff --git a/backends/platform/ds/arm9/source/fat/io_dldi.s b/backends/platform/ds/arm9/source/fat/io_dldi.s index 311d43f3ff..657e475086 100644 --- a/backends/platform/ds/arm9/source/fat/io_dldi.s +++ b/backends/platform/ds/arm9/source/fat/io_dldi.s @@ -17,7 +17,7 @@ .byte 0x01 @ Version number .byte 0x0F @32KiB @ Log [base-2] of the size of this driver in bytes. .byte 0x00 @ Sections to fix - .byte 0x0F @32KiB @ Log [base-2] of the allocated space in bytes. + .byte 0x0F @32KiB @ Log [base-2] of the allocated space in bytes. @--------------------------------------------------------------------------------- @ Text identifier - can be anything up to 47 chars + terminating null -- 16 bytes diff --git a/backends/platform/ds/arm9/source/fat/io_njsd.c b/backends/platform/ds/arm9/source/fat/io_njsd.c index 12388da8e9..d8a0ff69ac 100644 --- a/backends/platform/ds/arm9/source/fat/io_njsd.c +++ b/backends/platform/ds/arm9/source/fat/io_njsd.c @@ -445,7 +445,7 @@ static bool _NJSD_cardInit (void) { _NJSD_sendCLK (SD_CLK_200KHz, 8); _NJSD_sendCLK (SD_CLK_200KHz, 256); - _NJSD_sendCMDN (SD_CLK_200KHz, GO_IDLE_STATE, 0); + _NJSD_sendCMDN (SD_CLK_200KHz, GO_IDLE_STATE, 0); _NJSD_sendCLK (SD_CLK_200KHz, 8); for (i = 0; i < MAX_STARTUP_TRIES ; i++) { @@ -473,7 +473,7 @@ static bool _NJSD_cardInit (void) { break; } } - if (i >= MAX_STARTUP_TRIES) { + if (i >= MAX_STARTUP_TRIES) { return false; } @@ -525,7 +525,7 @@ bool _NJSD_startup(void) { bool _NJSD_writeSectors (u32 sector, u32 numSectors, const void* buffer) { - u8 crc[8]; + u8 crc[8]; u32 offset = sector * BYTES_PER_READ; u8* data = (u8*) buffer; diff --git a/backends/platform/ds/arm9/source/fat/io_nmmc.c b/backends/platform/ds/arm9/source/fat/io_nmmc.c index 261096a27b..e9331ae58e 100644 --- a/backends/platform/ds/arm9/source/fat/io_nmmc.c +++ b/backends/platform/ds/arm9/source/fat/io_nmmc.c @@ -73,7 +73,7 @@ static inline void Neo_MK2GameMode() { static inline void Neo_EnableEEPROM( bool enable ) { Neo_OpenSPI(spi_freq); if(enable) Neo_SPI(0x06); - else Neo_SPI(0x0E); + else Neo_SPI(0x0E); Neo_CloseSPI(); } @@ -294,7 +294,7 @@ bool NMMC_WriteSectors (u32 sector, u8 numSecs, void* buffer) Neo_SPI( 0xFF ); // Send fake CRC16 Neo_SPI( 0xFF ); // Send fake CRC16 - Neo_SPI (0xFF); // Send 8 clocks + Neo_SPI (0xFF); // Send 8 clocks while( Neo_SPI( 0xFF ) == 0x00 ); // Wait for the busy signal to clear diff --git a/backends/platform/ds/arm9/source/fat/io_sd_common.c b/backends/platform/ds/arm9/source/fat/io_sd_common.c index ade9df0d80..36d4a3bfc8 100644 --- a/backends/platform/ds/arm9/source/fat/io_sd_common.c +++ b/backends/platform/ds/arm9/source/fat/io_sd_common.c @@ -169,7 +169,7 @@ bool _SD_InitCard (_SD_FN_CMD_6BYTE_RESPONSE cmd_6byte_response, break; } } - if (i >= MAX_STARTUP_TRIES) { + if (i >= MAX_STARTUP_TRIES) { return false; } |