software/liblitesdcard: Fix compilation with picolibc.
This commit is contained in:
parent
727d898a6c
commit
01a906add7
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue