12
12
#include "py/mpconfig.h"
13
13
#include "py/runtime.h"
14
14
#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 */
16
17
#include "sflash_diskio.h" /* Serial flash disk IO API */
17
18
#include "sd_diskio.h" /* SDCARD disk IO API */
18
19
#include "inc/hw_types.h"
22
23
#include "prcm.h"
23
24
#include "pybrtc.h"
24
25
#include "timeutils.h"
25
- #include "ff.h"
26
26
#include "pybsd.h"
27
27
#include "moduos.h"
28
28
@@ -35,7 +35,7 @@ DSTATUS disk_status (
35
35
BYTE pdrv /* Physical drive nmuber to identify the drive */
36
36
)
37
37
{
38
- if (pdrv == FLASH ) {
38
+ if (pdrv == PD_FLASH ) {
39
39
return sflash_disk_status ();
40
40
} else {
41
41
os_fs_mount_t * mount_obj ;
@@ -57,7 +57,7 @@ DSTATUS disk_initialize (
57
57
BYTE pdrv /* Physical drive nmuber to identify the drive */
58
58
)
59
59
{
60
- if (pdrv == FLASH ) {
60
+ if (pdrv == PD_FLASH ) {
61
61
if (RES_OK != sflash_disk_init ()) {
62
62
return STA_NOINIT ;
63
63
}
@@ -84,7 +84,7 @@ DRESULT disk_read (
84
84
UINT count /* Number of sectors to read */
85
85
)
86
86
{
87
- if (pdrv == FLASH ) {
87
+ if (pdrv == PD_FLASH ) {
88
88
return sflash_disk_read (buff , sector , count );
89
89
} else {
90
90
os_fs_mount_t * mount_obj ;
@@ -115,7 +115,7 @@ DRESULT disk_write (
115
115
UINT count /* Number of sectors to write */
116
116
)
117
117
{
118
- if (pdrv == FLASH ) {
118
+ if (pdrv == PD_FLASH ) {
119
119
return sflash_disk_write (buff , sector , count );
120
120
} else {
121
121
os_fs_mount_t * mount_obj ;
@@ -147,7 +147,7 @@ DRESULT disk_ioctl (
147
147
void * buff /* Buffer to send/receive control data */
148
148
)
149
149
{
150
- if (pdrv == FLASH ) {
150
+ if (pdrv == PD_FLASH ) {
151
151
switch (cmd ) {
152
152
case CTRL_SYNC :
153
153
return sflash_disk_flush ();
0 commit comments