Minor stuff (2)

This commit is contained in:
Aurora 2016-09-29 16:21:08 +02:00
parent 3ef2ab2cc7
commit a46bf2a4ba
2 changed files with 12 additions and 13 deletions

View File

@ -37,8 +37,7 @@ DSTATUS disk_initialize (
BYTE pdrv /* Physical drive nmuber to identify the drive */
)
{
if(pdrv == CTRNAND)
ctrNandInit();
if(pdrv == CTRNAND) ctrNandInit();
return RES_OK;
}

View File

@ -275,8 +275,8 @@ static u32 calcSDSize(u8 *csd, int type)
result = (result << 8) | csd[7];
result = (result << 2) | (csd[6] >> 6);
result = (result + 1) * mult * block_len / 512;
}
break;
}
case 1:
result = csd[7] & 0x3F;
result = (result << 8) | csd[6];
@ -473,5 +473,5 @@ void sdmmc_get_cid(bool isNand, u32 *info)
bool sdmmc_sdcard_init()
{
InitSD();
return Nand_Init() + SD_Init() == 0;
return (Nand_Init() | SD_Init()) == 0;
}