diff options
| author | Scott Shawcroft <scott@chickadee.tech> | 2016-10-13 14:53:31 -0700 |
|---|---|---|
| committer | Scott Shawcroft <scott@chickadee.tech> | 2016-10-21 15:36:59 -0700 |
| commit | 306c921ed1437fc79423958a5e4bd8b0e96bc863 (patch) | |
| tree | 634189a017a0fb428b21755c528548415f4ffbcf /extmod | |
| parent | 6fe8c7b32c04e8c0b1ad8618920e241430634ad2 (diff) | |
atmel-samd: Rework mass storage interaction with underlying block
storage to use micropython's VFS interface.
This makes mass storage work with any VFS implementation rather
than a single one.
Diffstat (limited to 'extmod')
| -rw-r--r-- | extmod/fsusermount.h | 3 | ||||
| -rw-r--r-- | extmod/vfs_fat_diskio.c | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/extmod/fsusermount.h b/extmod/fsusermount.h index e1f26f2ce..3eb54f8bd 100644 --- a/extmod/fsusermount.h +++ b/extmod/fsusermount.h @@ -24,6 +24,9 @@ * THE SOFTWARE. */ +#include "lib/fatfs/ff.h" +#include "py/obj.h" + // these are the values for fs_user_mount_t.flags #define FSUSER_NATIVE (0x0001) // readblocks[2]/writeblocks[2] contain native func #define FSUSER_FREE_OBJ (0x0002) // fs_user_mount_t obj should be freed on umount diff --git a/extmod/vfs_fat_diskio.c b/extmod/vfs_fat_diskio.c index 3f1902b2e..5608e0645 100644 --- a/extmod/vfs_fat_diskio.c +++ b/extmod/vfs_fat_diskio.c @@ -90,7 +90,7 @@ DSTATUS disk_initialize ( /*-----------------------------------------------------------------------*/ DSTATUS disk_status ( - BYTE pdrv /* Physical drive nmuber (0..) */ + BYTE pdrv /* Physical drive number (0..) */ ) { fs_user_mount_t *vfs = disk_get_device(pdrv); @@ -110,7 +110,7 @@ DSTATUS disk_status ( /*-----------------------------------------------------------------------*/ DRESULT disk_read ( - BYTE pdrv, /* Physical drive nmuber (0..) */ + BYTE pdrv, /* Physical drive number (0..) */ BYTE *buff, /* Data buffer to store read data */ DWORD sector, /* Sector address (LBA) */ UINT count /* Number of sectors to read (1..128) */ |
