1212#include "py/mpconfig.h"
1313#include "py/runtime.h"
1414#include "py/obj.h"
15- #include "diskio.h" /* FatFs lower layer API */
15+ #include "lib/fatfs/ff.h"
16+ #include "lib/fatfs/diskio.h" /* FatFs lower layer API */
1617#include "sflash_diskio.h" /* Serial flash disk IO API */
1718#include "sd_diskio.h" /* SDCARD disk IO API */
1819#include "inc/hw_types.h"
2223#include "prcm.h"
2324#include "pybrtc.h"
2425#include "timeutils.h"
25- #include "ff.h"
2626#include "pybsd.h"
2727#include "moduos.h"
2828
@@ -35,7 +35,7 @@ DSTATUS disk_status (
3535 BYTE pdrv /* Physical drive nmuber to identify the drive */
3636)
3737{
38- if (pdrv == FLASH ) {
38+ if (pdrv == PD_FLASH ) {
3939 return sflash_disk_status ();
4040 } else {
4141 os_fs_mount_t * mount_obj ;
@@ -57,7 +57,7 @@ DSTATUS disk_initialize (
5757 BYTE pdrv /* Physical drive nmuber to identify the drive */
5858)
5959{
60- if (pdrv == FLASH ) {
60+ if (pdrv == PD_FLASH ) {
6161 if (RES_OK != sflash_disk_init ()) {
6262 return STA_NOINIT ;
6363 }
@@ -84,7 +84,7 @@ DRESULT disk_read (
8484 UINT count /* Number of sectors to read */
8585)
8686{
87- if (pdrv == FLASH ) {
87+ if (pdrv == PD_FLASH ) {
8888 return sflash_disk_read (buff , sector , count );
8989 } else {
9090 os_fs_mount_t * mount_obj ;
@@ -115,7 +115,7 @@ DRESULT disk_write (
115115 UINT count /* Number of sectors to write */
116116)
117117{
118- if (pdrv == FLASH ) {
118+ if (pdrv == PD_FLASH ) {
119119 return sflash_disk_write (buff , sector , count );
120120 } else {
121121 os_fs_mount_t * mount_obj ;
@@ -147,7 +147,7 @@ DRESULT disk_ioctl (
147147 void * buff /* Buffer to send/receive control data */
148148)
149149{
150- if (pdrv == FLASH ) {
150+ if (pdrv == PD_FLASH ) {
151151 switch (cmd ) {
152152 case CTRL_SYNC :
153153 return sflash_disk_flush ();
0 commit comments