diff options
| author | Uros Majstorovic <majstor@majstor.org> | 2025-07-28 23:43:37 +0200 | 
|---|---|---|
| committer | Uros Majstorovic <majstor@majstor.org> | 2025-07-28 23:43:37 +0200 | 
| commit | b6ad7011fbf61181f077319dde51702329848a76 (patch) | |
| tree | ed6d62068fee36bee9248282d860c602679da5e1 /ext/fsfat | |
| parent | ae61013a946b522886e16e71138a0f46c13e4ef8 (diff) | |
synced with new eos
Diffstat (limited to 'ext/fsfat')
| -rw-r--r-- | ext/fsfat/diskio.c | 24 | 
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;
      }
 | 
