diff --git a/litex/soc/software/liblitesdcard/sdcard.c b/litex/soc/software/liblitesdcard/sdcard.c index e559bfaab..4631c1366 100644 --- a/litex/soc/software/liblitesdcard/sdcard.c +++ b/litex/soc/software/liblitesdcard/sdcard.c @@ -565,19 +565,19 @@ void sdcard_write(uint32_t block, uint32_t count, uint8_t* buf) static DSTATUS sdcardstatus = STA_NOINIT; -DSTATUS disk_status(uint8_t drv) { +DSTATUS disk_status(BYTE drv) { if (drv) return STA_NOINIT; return sdcardstatus; } -DSTATUS disk_initialize(uint8_t drv) { +DSTATUS disk_initialize(BYTE drv) { if (drv) return STA_NOINIT; if (sdcardstatus) sdcardstatus = sdcard_init() ? 0 : STA_NOINIT; return sdcardstatus; } -DRESULT disk_read(uint8_t drv, uint8_t *buf, uint32_t block, uint32_t count) { +DRESULT disk_read(BYTE drv, BYTE *buf, LBA_t block, UINT count) { sdcard_read(block, count, buf); return RES_OK; } diff --git a/litex/soc/software/liblitesdcard/spisdcard.c b/litex/soc/software/liblitesdcard/spisdcard.c index 438267c87..2116d50a7 100644 --- a/litex/soc/software/liblitesdcard/spisdcard.c +++ b/litex/soc/software/liblitesdcard/spisdcard.c @@ -264,12 +264,12 @@ uint8_t spisdcard_init(void) { static DSTATUS spisdcardstatus = STA_NOINIT; -DSTATUS disk_status(uint8_t drv) { +DSTATUS disk_status(BYTE drv) { if (drv) return STA_NOINIT; return spisdcardstatus; } -DSTATUS disk_initialize(uint8_t drv) { +DSTATUS disk_initialize(BYTE drv) { if (drv) return STA_NOINIT; if (spisdcardstatus) { spisdcardstatus = spisdcard_init() ? 0 : STA_NOINIT; @@ -278,7 +278,7 @@ DSTATUS disk_initialize(uint8_t drv) { return spisdcardstatus; } -DRESULT disk_read(uint8_t drv, uint8_t *buf, uint32_t sector, uint32_t count) { +DRESULT disk_read(BYTE drv, BYTE *buf, LBA_t block, UINT count) { uint8_t cmd; if (count > 1) cmd = CMD18; /* READ_MULTIPLE_BLOCK */