summaryrefslogtreecommitdiff
path: root/ext/fsfat/diskio.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fsfat/diskio.c')
-rw-r--r--ext/fsfat/diskio.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/ext/fsfat/diskio.c b/ext/fsfat/diskio.c
index 90a12e6..1c93466 100644
--- a/ext/fsfat/diskio.c
+++ b/ext/fsfat/diskio.c
@@ -10,7 +10,7 @@
#include "ff.h" /* Obtains integer types */
#include "diskio.h" /* Declarations of disk functions */
-#include <eos/dev/sdcard.h>
+#include <eos/dev/drv/sdcard.h>
#define TIMEOUT 1000
#define TIMEOUT_TRIM 60000
@@ -23,7 +23,7 @@ DSTATUS disk_status (
BYTE pdrv /* Physical drive nmuber to identify the drive */
)
{
- if (pdrv || (eos_sdc_type() == 0)) return STA_NOINIT;
+ if (pdrv || (sdc_get_type() == 0)) return STA_NOINIT;
return 0;
}
@@ -37,7 +37,7 @@ DSTATUS disk_initialize (
BYTE pdrv /* Physical drive nmuber to identify the drive */
)
{
- if (pdrv || (eos_sdc_type() == 0)) return STA_NOINIT;
+ if (pdrv || (sdc_get_type() == 0)) return STA_NOINIT;
return 0;
}
@@ -57,9 +57,9 @@ DRESULT disk_read (
int rv;
if (pdrv) return RES_PARERR;
- if (eos_sdc_type() == 0) return RES_NOTRDY;
+ if (sdc_get_type() == 0) return RES_NOTRDY;
- rv = eos_sdc_sect_read(sector, count, (uint8_t *)buff);
+ rv = sdc_sect_read(sector, count, (uint8_t *)buff);
return rv ? RES_ERROR : RES_OK;
}
@@ -81,9 +81,9 @@ DRESULT disk_write (
int rv;
if (pdrv) return RES_PARERR;
- if (eos_sdc_type() == 0) return RES_NOTRDY;
+ if (sdc_get_type() == 0) return RES_NOTRDY;
- rv = eos_sdc_sect_write(sector, count, (uint8_t *)buff);
+ rv = sdc_sect_write(sector, count, (uint8_t *)buff);
return rv ? RES_ERROR : RES_OK;
}
@@ -105,18 +105,18 @@ DRESULT disk_ioctl (
int rv;
if (pdrv) return RES_PARERR;
- if (eos_sdc_type() == 0) return RES_NOTRDY;
+ if (sdc_get_type() == 0) return RES_NOTRDY;
res = RES_ERROR;
switch (cmd) {
case CTRL_SYNC:
- rv = eos_sdc_sync(TIMEOUT);
+ rv = sdc_sync(TIMEOUT);
if (!rv) res = RES_OK;
break;
case GET_SECTOR_COUNT:
- rv = eos_sdc_get_sect_count(TIMEOUT, &ret);
+ rv = sdc_get_sect_count(&ret, TIMEOUT);
if (!rv) {
*(LBA_t*)buff = ret;
res = RES_OK;
@@ -124,7 +124,7 @@ DRESULT disk_ioctl (
break;
case GET_BLOCK_SIZE:
- rv = eos_sdc_get_blk_size(TIMEOUT, &ret);
+ rv = sdc_get_blk_size(&ret, TIMEOUT);
if (!rv) {
*(DWORD*)buff = ret;
res = RES_OK;
@@ -132,7 +132,7 @@ DRESULT disk_ioctl (
break;
case CTRL_TRIM:
- rv = eos_sdc_erase(((LBA_t*)buff)[0], ((LBA_t*)buff)[1], TIMEOUT_TRIM);
+ rv = sdc_erase(((LBA_t*)buff)[0], ((LBA_t*)buff)[1], TIMEOUT_TRIM);
if (!rv) res = RES_OK;
break;
}