Skip to content

Commit

Permalink
Fixed 16 bit FIFO transfers in sdmmc.c (thanks @PoroCYon).
Browse files Browse the repository at this point in the history
  • Loading branch information
profi200 committed Aug 26, 2020
1 parent 4b7fe6a commit b744165
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/arm9/hardware/sdmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b744165

Please sign in to comment.