Skip to content

Commit

Permalink
fixup! tests: add test app for periph_sdmmc
Browse files Browse the repository at this point in the history
  • Loading branch information
gschorcht committed Jul 26, 2023
1 parent 4029a73 commit bf10661
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tests/drivers/sdmmc/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,13 @@ static int _cid(int argc, char **argv)
puts("----------------------------------------");
if (IS_USED(MODULE_SDMMC_MMC) && (dev->type == SDMMC_CARD_TYPE_MMC)) {
printf("MID: %d\n", cid->mmc.MID);
printf("OID: 0x%04x\n", ntohs(cid->mmc.OID));
printf("OID: 0x%04x\n", byteorder_ntohs(cid->mmc.OID));
printf("PNM: %c%c%c%c%c%c\n",
cid->mmc.PNM[0], cid->mmc.PNM[1], cid->mmc.PNM[2],
cid->mmc.PNM[3], cid->mmc.PNM[4], cid->mmc.PNM[5]);
printf("PRV: %d.%d\n", cid->mmc.PRV >> 4, cid->mmc.PRV & 0x0f);
printf("PSN: %" PRIu32 "\n", ntohl(cid->mmc.PSN));
printf("MDT: %u/%u\n", 1997 + (cid->sd.MDT >> 4), cid->sd.MDT & 0x000f);
printf("PSN: %" PRIu32 "\n", byteorder_ntohl(cid->mmc.PSN));
printf("MDT: %u/%u\n", 1997 + (cid->mmc.MDT >> 4), cid->mmc.MDT & 0x0f);
printf("CRC: 0x%02x\n", cid->mmc.CID_CRC >> 1);
}
else {
Expand All @@ -127,8 +127,9 @@ static int _cid(int argc, char **argv)
cid->sd.PNM[0], cid->sd.PNM[1], cid->sd.PNM[2],
cid->sd.PNM[3], cid->sd.PNM[4]);
printf("PRV: %d.%d\n", cid->sd.PRV >> 4, cid->sd.PRV & 0x0f);
printf("PSN: %" PRIu32 "\n", ntohl(cid->sd.PSN));
printf("MDT: %u/%u\n", 2000 + (cid->mmc.MDT >> 4), cid->mmc.MDT & 0x000f);
printf("PSN: %" PRIu32 "\n", byteorder_ntohl(cid->sd.PSN));
printf("MDT: %u/%u\n", 2000 + (byteorder_ntohs(cid->sd.MDT) >> 4),
bytepoder_ntohs(cid->sd.MDT) & 0x000f);
printf("CRC: 0x%02x\n", cid->sd.CID_CRC >> 1);
}
puts("----------------------------------------");
Expand Down

0 comments on commit bf10661

Please sign in to comment.