extmod/vfs: Add MP_BLOCKDEV_IOCTL_BLOCK_ERASE constant.

pull/1/head
Damien George 2019-10-29 12:29:56 +11:00
parent cfe1c5abf8
commit 4cf054a130
2 changed files with 2 additions and 1 deletions

View File

@ -50,6 +50,7 @@
#define MP_BLOCKDEV_IOCTL_SYNC (3)
#define MP_BLOCKDEV_IOCTL_BLOCK_COUNT (4)
#define MP_BLOCKDEV_IOCTL_BLOCK_SIZE (5)
#define MP_BLOCKDEV_IOCTL_BLOCK_ERASE (6)
// At the moment the VFS protocol just has import_stat, but could be extended to other methods
typedef struct _mp_vfs_proto_t {

View File

@ -52,7 +52,7 @@ STATIC int MP_VFS_LFSx(dev_prog)(const struct LFSx_API(config) *c, LFSx_API(bloc
}
STATIC int MP_VFS_LFSx(dev_erase)(const struct LFSx_API(config) *c, LFSx_API(block_t) block) {
return MP_VFS_LFSx(dev_ioctl)(c, 6, block, true); // erase
return MP_VFS_LFSx(dev_ioctl)(c, MP_BLOCKDEV_IOCTL_BLOCK_ERASE, block, true);
}
STATIC int MP_VFS_LFSx(dev_sync)(const struct LFSx_API(config) *c) {