aboutsummaryrefslogtreecommitdiff
path: root/extmod/vfs_lfs.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2019-10-18 17:25:08 +1100
committerDamien George <damien.p.george@gmail.com>2019-10-29 14:17:29 +1100
commita099505420221790509ab92611db52d0131e401a (patch)
tree73b4b6ec67b1bacbb697101ea604b2ed1b604361 /extmod/vfs_lfs.h
parent98beea9cedca522857d12a741ff8ea90f6b873a3 (diff)
extmod: Add VFS littlefs bindings.
Both LFS1 and LFS2 are supported at the same time.
Diffstat (limited to 'extmod/vfs_lfs.h')
-rw-r--r--extmod/vfs_lfs.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/extmod/vfs_lfs.h b/extmod/vfs_lfs.h
new file mode 100644
index 000000000..1fdf792f1
--- /dev/null
+++ b/extmod/vfs_lfs.h
@@ -0,0 +1,39 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2019 Damien P. George
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#ifndef MICROPY_INCLUDED_EXTMOD_VFS_LFS_H
+#define MICROPY_INCLUDED_EXTMOD_VFS_LFS_H
+
+#include "py/obj.h"
+
+extern const mp_obj_type_t mp_type_vfs_lfs1;
+extern const mp_obj_type_t mp_type_vfs_lfs1_fileio;
+extern const mp_obj_type_t mp_type_vfs_lfs1_textio;
+
+extern const mp_obj_type_t mp_type_vfs_lfs2;
+extern const mp_obj_type_t mp_type_vfs_lfs2_fileio;
+extern const mp_obj_type_t mp_type_vfs_lfs2_textio;
+
+#endif // MICROPY_INCLUDED_EXTMOD_VFS_LFS_H