summaryrefslogtreecommitdiff
path: root/extmod
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2019-10-29 12:29:56 +1100
committerDamien George <damien.p.george@gmail.com>2019-10-29 14:17:29 +1100
commit4cf054a130e90bec19399ef2b8181d434dd22d8e (patch)
treee638ee94aa41e7112fe8e445ac685523bfcf310f /extmod
parentcfe1c5abf884027eb0a5792d5a980fee8757051a (diff)
extmod/vfs: Add MP_BLOCKDEV_IOCTL_BLOCK_ERASE constant.
Diffstat (limited to 'extmod')
-rw-r--r--extmod/vfs.h1
-rw-r--r--extmod/vfs_lfsx.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/extmod/vfs.h b/extmod/vfs.h
index 15bd2a5f5..004b002f5 100644
--- a/extmod/vfs.h
+++ b/extmod/vfs.h
@@ -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 {
diff --git a/extmod/vfs_lfsx.c b/extmod/vfs_lfsx.c
index 6aa82b1ef..e5826803b 100644
--- a/extmod/vfs_lfsx.c
+++ b/extmod/vfs_lfsx.c
@@ -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) {