Fix diskio indentation

This commit is contained in:
Aurora Wright 2017-08-28 02:54:20 +02:00
parent 618ce671ac
commit ecd27f7eaa

View File

@ -41,8 +41,8 @@ DSTATUS disk_initialize (
if(sdmmcInitResult == 4) sdmmcInitResult = sdmmc_sdcard_init(); if(sdmmcInitResult == 4) sdmmcInitResult = sdmmc_sdcard_init();
return ((pdrv == SDCARD && !(sdmmcInitResult & 2)) || return ((pdrv == SDCARD && !(sdmmcInitResult & 2)) ||
(pdrv == CTRNAND && !(sdmmcInitResult & 1) && !ctrNandInit())) ? 0 : STA_NOINIT; (pdrv == CTRNAND && !(sdmmcInitResult & 1) && !ctrNandInit())) ? 0 : STA_NOINIT;
} }
@ -58,8 +58,8 @@ DRESULT disk_read (
UINT count /* Number of sectors to read */ UINT count /* Number of sectors to read */
) )
{ {
return ((pdrv == SDCARD && !sdmmc_sdcard_readsectors(sector, count, buff)) || return ((pdrv == SDCARD && !sdmmc_sdcard_readsectors(sector, count, buff)) ||
(pdrv == CTRNAND && !ctrNandRead(sector, count, buff))) ? RES_OK : RES_PARERR; (pdrv == CTRNAND && !ctrNandRead(sector, count, buff))) ? RES_OK : RES_PARERR;
} }
@ -76,8 +76,8 @@ DRESULT disk_write (
UINT count /* Number of sectors to write */ UINT count /* Number of sectors to write */
) )
{ {
return ((pdrv == SDCARD && (*(vu16 *)(SDMMC_BASE + REG_SDSTATUS0) & TMIO_STAT0_WRPROTECT) != 0 && !sdmmc_sdcard_writesectors(sector, count, buff)) || return ((pdrv == SDCARD && (*(vu16 *)(SDMMC_BASE + REG_SDSTATUS0) & TMIO_STAT0_WRPROTECT) != 0 && !sdmmc_sdcard_writesectors(sector, count, buff)) ||
(pdrv == CTRNAND && !ctrNandWrite(sector, count, buff))) ? RES_OK : RES_PARERR; (pdrv == CTRNAND && !ctrNandWrite(sector, count, buff))) ? RES_OK : RES_PARERR;
} }
#endif #endif
@ -96,6 +96,6 @@ DRESULT disk_ioctl (
void *buff /* Buffer to send/receive control data */ void *buff /* Buffer to send/receive control data */
) )
{ {
return cmd == CTRL_SYNC ? RES_OK : RES_PARERR; return cmd == CTRL_SYNC ? RES_OK : RES_PARERR;
} }
#endif #endif