extmod: Move fsusermount.c from stmhal for cross-port reuse.
This commit is contained in:
parent
c8437f97ae
commit
3a1bbcc2ef
@ -105,4 +105,7 @@ extern const mp_obj_module_t mp_module_ussl;
|
|||||||
extern const mp_obj_module_t mp_module_machine;
|
extern const mp_obj_module_t mp_module_machine;
|
||||||
extern const mp_obj_module_t mp_module_lwip;
|
extern const mp_obj_module_t mp_module_lwip;
|
||||||
|
|
||||||
|
// extmod functions
|
||||||
|
MP_DECLARE_CONST_FUN_OBJ(pyb_mount_obj);
|
||||||
|
|
||||||
#endif // __MICROPY_INCLUDED_PY_BUILTIN_H__
|
#endif // __MICROPY_INCLUDED_PY_BUILTIN_H__
|
||||||
|
1
py/py.mk
1
py/py.mk
@ -167,6 +167,7 @@ PY_O_BASENAME = \
|
|||||||
../extmod/modubinascii.o \
|
../extmod/modubinascii.o \
|
||||||
../extmod/modmachine.o \
|
../extmod/modmachine.o \
|
||||||
../extmod/modussl.o \
|
../extmod/modussl.o \
|
||||||
|
../extmod/fsusermount.o \
|
||||||
|
|
||||||
# prepend the build destination prefix to the py object files
|
# prepend the build destination prefix to the py object files
|
||||||
PY_O = $(addprefix $(PY_BUILD)/, $(PY_O_BASENAME))
|
PY_O = $(addprefix $(PY_BUILD)/, $(PY_O_BASENAME))
|
||||||
|
@ -153,7 +153,6 @@ SRC_C = \
|
|||||||
storage.c \
|
storage.c \
|
||||||
file.c \
|
file.c \
|
||||||
sdcard.c \
|
sdcard.c \
|
||||||
fsusermount.c \
|
|
||||||
diskio.c \
|
diskio.c \
|
||||||
ffconf.c \
|
ffconf.c \
|
||||||
lcd.c \
|
lcd.c \
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
#include "rtc.h"
|
#include "rtc.h"
|
||||||
#include "storage.h"
|
#include "storage.h"
|
||||||
#include "sdcard.h"
|
#include "sdcard.h"
|
||||||
#include "fsusermount.h"
|
#include "extmod/fsusermount.h"
|
||||||
|
|
||||||
const PARTITION VolToPart[] = {
|
const PARTITION VolToPart[] = {
|
||||||
{0, 1}, // Logical drive 0 ==> Physical drive 0, 1st partition
|
{0, 1}, // Logical drive 0 ==> Physical drive 0, 1st partition
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
#include "lib/fatfs/ff.h"
|
#include "lib/fatfs/ff.h"
|
||||||
#include "lib/fatfs/ffconf.h"
|
#include "lib/fatfs/ffconf.h"
|
||||||
#include "lib/fatfs/diskio.h"
|
#include "lib/fatfs/diskio.h"
|
||||||
#include "fsusermount.h"
|
#include "extmod/fsusermount.h"
|
||||||
|
|
||||||
STATIC bool check_path(const TCHAR **path, const char *mount_point_str, mp_uint_t mount_point_len) {
|
STATIC bool check_path(const TCHAR **path, const char *mount_point_str, mp_uint_t mount_point_len) {
|
||||||
if (strncmp(*path, mount_point_str, mount_point_len) == 0) {
|
if (strncmp(*path, mount_point_str, mount_point_len) == 0) {
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include "py/nlr.h"
|
#include "py/nlr.h"
|
||||||
#include "py/obj.h"
|
#include "py/obj.h"
|
||||||
#include "py/gc.h"
|
#include "py/gc.h"
|
||||||
|
#include "py/builtin.h"
|
||||||
#include "lib/utils/pyexec.h"
|
#include "lib/utils/pyexec.h"
|
||||||
#include "lib/fatfs/ff.h"
|
#include "lib/fatfs/ff.h"
|
||||||
#include "lib/fatfs/diskio.h"
|
#include "lib/fatfs/diskio.h"
|
||||||
@ -58,7 +59,6 @@
|
|||||||
#include "dac.h"
|
#include "dac.h"
|
||||||
#include "lcd.h"
|
#include "lcd.h"
|
||||||
#include "usb.h"
|
#include "usb.h"
|
||||||
#include "fsusermount.h"
|
|
||||||
#include "portmodules.h"
|
#include "portmodules.h"
|
||||||
#include "modmachine.h"
|
#include "modmachine.h"
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
#include "uart.h"
|
#include "uart.h"
|
||||||
#include "file.h"
|
#include "file.h"
|
||||||
#include "sdcard.h"
|
#include "sdcard.h"
|
||||||
#include "fsusermount.h"
|
#include "extmod/fsusermount.h"
|
||||||
#include "portmodules.h"
|
#include "portmodules.h"
|
||||||
|
|
||||||
/// \module os - basic "operating system" services
|
/// \module os - basic "operating system" services
|
||||||
|
Loading…
x
Reference in New Issue
Block a user