Fixed 16 bit FIFO transfers in sdmmc.c (thanks @PoroCYon).

This commit is contained in:
profi200 2020-08-27 00:08:27 +02:00
parent 4b7fe6adf0
commit b7441659ca
No known key found for this signature in database
GPG Key ID: 17B42AE5911139F3
1 changed files with 2 additions and 2 deletions

View File

@ -133,14 +133,14 @@ static void sdmmc_send_command(struct mmcdevice *ctx, u32 cmd, u32 args)
#else
if(!((u32)rDataPtr16 & 1))
{
for(u32 i = 0; i < blkSize; i += 4)
for(u32 i = 0; i < blkSize; i += 2)
{
*rDataPtr16++ = sdmmc_read16(REG_SDFIFO);
}
}
else
{
for(u32 i = 0; i < blkSize; i += 4)
for(u32 i = 0; i < blkSize; i += 2)
{
u16 data = sdmmc_read16(REG_SDFIFO);
*rDataPtr8++ = data;