File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3232#include "py/obj.h"
3333#include "lib/oofatfs/ff.h"
3434#include "extmod/vfs.h"
35- #include "extmod/fsusermount .h"
35+ #include "extmod/vfs_fat .h"
3636#include "inc/hw_types.h"
3737#include "inc/hw_ints.h"
3838#include "inc/hw_memmap.h"
Original file line number Diff line number Diff line change 3131#include "lib/oofatfs/ff.h"
3232#include "lib/oofatfs/diskio.h"
3333#include "extmod/vfs_fat.h"
34- #include "extmod/fsusermount.h"
3534
3635#include "fatfs/src/drivers/sflash_diskio.h"
3736#include "mods/pybflash.h"
Original file line number Diff line number Diff line change 2929#include "py/runtime.h"
3030#include "lib/oofatfs/ff.h"
3131#include "lib/oofatfs/diskio.h"
32- #include "extmod/fsusermount .h"
32+ #include "extmod/vfs_fat .h"
3333#include "inc/hw_types.h"
3434#include "inc/hw_gpio.h"
3535#include "inc/hw_ints.h"
Original file line number Diff line number Diff line change 3636#include "lib/oofatfs/ff.h"
3737#include "lib/oofatfs/diskio.h"
3838#include "extmod/vfs.h"
39- #include "extmod/fsusermount .h"
39+ #include "extmod/vfs_fat .h"
4040#include "inc/hw_memmap.h"
4141#include "inc/hw_types.h"
4242#include "inc/hw_ints.h"
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 3131#include "py/objstr.h"
3232#include "py/mperrno.h"
3333#include "extmod/vfs.h"
34- #include "extmod/vfs_fat.h"
3534
3635#if MICROPY_VFS
3736
37+ #if MICROPY_VFS_FAT
38+ #include "extmod/vfs_fat.h"
39+ #endif
40+
3841// path is the path to lookup and *path_out holds the path within the VFS
3942// object (starts with / if an absolute path).
4043// Returns MP_VFS_ROOT for root dir (and then path_out is undefined) and
Original file line number Diff line number Diff line change 3535#define MP_VFS_NONE ((mp_vfs_mount_t*)1)
3636#define MP_VFS_ROOT ((mp_vfs_mount_t*)0)
3737
38+ // constants for block protocol ioctl
39+ #define BP_IOCTL_INIT (1)
40+ #define BP_IOCTL_DEINIT (2)
41+ #define BP_IOCTL_SYNC (3)
42+ #define BP_IOCTL_SEC_COUNT (4)
43+ #define BP_IOCTL_SEC_SIZE (5)
44+
3845typedef struct _mp_vfs_mount_t {
3946 const char * str ; // mount point with leading /
4047 size_t len ;
Original file line number Diff line number Diff line change 3838#include "py/mperrno.h"
3939#include "lib/oofatfs/ff.h"
4040#include "extmod/vfs_fat.h"
41- #include "extmod/fsusermount.h"
4241#include "timeutils.h"
4342
4443#if _MAX_SS == _MIN_SS
Original file line number Diff line number Diff line change 2525 */
2626
2727#include "py/lexer.h"
28+ #include "py/obj.h"
29+ #include "lib/oofatfs/ff.h"
30+ #include "extmod/vfs.h"
2831
29- struct _fs_user_mount_t ;
32+ // these are the values for fs_user_mount_t.flags
33+ #define FSUSER_NATIVE (0x0001) // readblocks[2]/writeblocks[2] contain native func
34+ #define FSUSER_FREE_OBJ (0x0002) // fs_user_mount_t obj should be freed on umount
35+ #define FSUSER_HAVE_IOCTL (0x0004) // new protocol with ioctl
36+
37+ typedef struct _fs_user_mount_t {
38+ mp_obj_base_t base ;
39+ const char * str ;
40+ uint16_t len ; // length of str
41+ uint16_t flags ;
42+ mp_obj_t readblocks [4 ];
43+ mp_obj_t writeblocks [4 ];
44+ // new protocol uses just ioctl, old uses sync (optional) and count
45+ union {
46+ mp_obj_t ioctl [4 ];
47+ struct {
48+ mp_obj_t sync [2 ];
49+ mp_obj_t count [2 ];
50+ } old ;
51+ } u ;
52+ FATFS fatfs ;
53+ } fs_user_mount_t ;
3054
3155extern const byte fresult_to_errno_table [20 ];
3256extern const mp_obj_type_t mp_fat_vfs_type ;
Original file line number Diff line number Diff line change 3838#include "py/runtime.h"
3939#include "lib/oofatfs/ff.h"
4040#include "lib/oofatfs/diskio.h"
41- #include "extmod/fsusermount .h"
41+ #include "extmod/vfs_fat .h"
4242
4343#if _MAX_SS == _MIN_SS
4444#define SECSIZE (fs ) (_MIN_SS)
You can’t perform that action at this time.
0 commit comments