Skip to content

Commit 3a1bbcc

Browse files
committed
extmod: Move fsusermount.c from stmhal for cross-port reuse.
1 parent c8437f9 commit 3a1bbcc

9 files changed

Lines changed: 8 additions & 5 deletions

File tree

py/builtin.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,7 @@ extern const mp_obj_module_t mp_module_ussl;
105105
extern const mp_obj_module_t mp_module_machine;
106106
extern const mp_obj_module_t mp_module_lwip;
107107

108+
// extmod functions
109+
MP_DECLARE_CONST_FUN_OBJ(pyb_mount_obj);
110+
108111
#endif // __MICROPY_INCLUDED_PY_BUILTIN_H__

py/py.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ PY_O_BASENAME = \
167167
../extmod/modubinascii.o \
168168
../extmod/modmachine.o \
169169
../extmod/modussl.o \
170+
../extmod/fsusermount.o \
170171

171172
# prepend the build destination prefix to the py object files
172173
PY_O = $(addprefix $(PY_BUILD)/, $(PY_O_BASENAME))

stmhal/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ SRC_C = \
153153
storage.c \
154154
file.c \
155155
sdcard.c \
156-
fsusermount.c \
157156
diskio.c \
158157
ffconf.c \
159158
lcd.c \

stmhal/diskio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
#include "rtc.h"
3939
#include "storage.h"
4040
#include "sdcard.h"
41-
#include "fsusermount.h"
41+
#include "extmod/fsusermount.h"
4242

4343
const PARTITION VolToPart[] = {
4444
{0, 1}, // Logical drive 0 ==> Physical drive 0, 1st partition

stmhal/ffconf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#include "lib/fatfs/ff.h"
3131
#include "lib/fatfs/ffconf.h"
3232
#include "lib/fatfs/diskio.h"
33-
#include "fsusermount.h"
33+
#include "extmod/fsusermount.h"
3434

3535
STATIC bool check_path(const TCHAR **path, const char *mount_point_str, mp_uint_t mount_point_len) {
3636
if (strncmp(*path, mount_point_str, mount_point_len) == 0) {

stmhal/modpyb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#include "py/nlr.h"
3434
#include "py/obj.h"
3535
#include "py/gc.h"
36+
#include "py/builtin.h"
3637
#include "lib/utils/pyexec.h"
3738
#include "lib/fatfs/ff.h"
3839
#include "lib/fatfs/diskio.h"
@@ -58,7 +59,6 @@
5859
#include "dac.h"
5960
#include "lcd.h"
6061
#include "usb.h"
61-
#include "fsusermount.h"
6262
#include "portmodules.h"
6363
#include "modmachine.h"
6464

stmhal/moduos.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
#include "uart.h"
3939
#include "file.h"
4040
#include "sdcard.h"
41-
#include "fsusermount.h"
41+
#include "extmod/fsusermount.h"
4242
#include "portmodules.h"
4343

4444
/// \module os - basic "operating system" services

0 commit comments

Comments
 (0)