Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
circuitpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
circuitpython
Commits
b5f33ac2
Commit
b5f33ac2
authored
Feb 25, 2019
by
Damien George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ports: Update to work with new oofatfs version.
parent
e959f219
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
21 additions
and
21 deletions
+21
-21
ports/cc3200/application.mk
ports/cc3200/application.mk
+1
-1
ports/cc3200/fatfs_port.c
ports/cc3200/fatfs_port.c
+6
-6
ports/cc3200/mpconfigport.h
ports/cc3200/mpconfigport.h
+1
-1
ports/cc3200/mptask.c
ports/cc3200/mptask.c
+1
-1
ports/esp32/Makefile
ports/esp32/Makefile
+1
-1
ports/esp32/mpconfigport.h
ports/esp32/mpconfigport.h
+1
-1
ports/esp8266/Makefile
ports/esp8266/Makefile
+1
-1
ports/esp8266/mpconfigport.h
ports/esp8266/mpconfigport.h
+1
-1
ports/nrf/mpconfigport.h
ports/nrf/mpconfigport.h
+1
-1
ports/stm32/Makefile
ports/stm32/Makefile
+1
-1
ports/stm32/main.c
ports/stm32/main.c
+1
-1
ports/stm32/mboot/diskio.c
ports/stm32/mboot/diskio.c
+2
-2
ports/stm32/mpconfigport.h
ports/stm32/mpconfigport.h
+1
-1
ports/unix/Makefile
ports/unix/Makefile
+1
-1
ports/unix/mpconfigport.h
ports/unix/mpconfigport.h
+1
-1
No files found.
ports/cc3200/application.mk
View file @
b5f33ac2
...
...
@@ -140,7 +140,7 @@ APP_MAIN_SRC_C = \
APP_LIB_SRC_C
=
$(
addprefix
lib/,
\
oofatfs/ff.c
\
oofatfs/
option/
unicode.c
\
oofatfs/
ff
unicode.c
\
libc/string0.c
\
mp-readline/readline.c
\
netutils/netutils.c
\
...
...
ports/cc3200/fatfs_port.c
View file @
b5f33ac2
...
...
@@ -30,12 +30,12 @@
#include "lib/timeutils/timeutils.h"
#include "mods/pybrtc.h"
#if _FS_REENTRANT
#if
FF
_FS_REENTRANT
// Create a Synchronization Object
// This function is called in f_mount() function to create a new
// synchronization object, such as semaphore and mutex.
// A return of 0 indicates failure, and then f_mount() fails with FR_INT_ERR.
int
ff_cre_syncobj
(
FATFS
*
fatfs
,
_SYNC_t
*
sobj
)
{
int
ff_cre_syncobj
(
FATFS
*
fatfs
,
FF
_SYNC_t
*
sobj
)
{
vSemaphoreCreateBinary
((
*
sobj
));
return
(
int
)(
*
sobj
!=
NULL
);
}
...
...
@@ -44,7 +44,7 @@ int ff_cre_syncobj(FATFS *fatfs, _SYNC_t *sobj) {
// This function is called in f_mount() function to delete a synchronization
// object that created with ff_cre_syncobj function.
// A return of 0 indicates failure, and then f_mount() fails with FR_INT_ERR.
int
ff_del_syncobj
(
_SYNC_t
sobj
)
{
int
ff_del_syncobj
(
FF
_SYNC_t
sobj
)
{
vSemaphoreDelete
(
sobj
);
return
1
;
}
...
...
@@ -52,13 +52,13 @@ int ff_del_syncobj(_SYNC_t sobj) {
// Request Grant to Access the Volume
// This function is called on entering file functions to lock the volume.
// When a 0 is returned, the file function fails with FR_TIMEOUT.
int
ff_req_grant
(
_SYNC_t
sobj
)
{
return
(
int
)(
xSemaphoreTake
(
sobj
,
_FS_TIMEOUT
)
==
pdTRUE
);
int
ff_req_grant
(
FF
_SYNC_t
sobj
)
{
return
(
int
)(
xSemaphoreTake
(
sobj
,
FF
_FS_TIMEOUT
)
==
pdTRUE
);
}
// Release Grant to Access the Volume
// This function is called on leaving file functions to unlock the volume.
void
ff_rel_grant
(
_SYNC_t
sobj
)
{
void
ff_rel_grant
(
FF
_SYNC_t
sobj
)
{
xSemaphoreGive
(
sobj
);
}
...
...
ports/cc3200/mpconfigport.h
View file @
b5f33ac2
...
...
@@ -65,7 +65,7 @@
// fatfs configuration used in ffconf.h
#define MICROPY_FATFS_ENABLE_LFN (2)
#define MICROPY_FATFS_MAX_LFN (MICROPY_ALLOC_PATH_MAX)
#define MICROPY_FATFS_LFN_CODE_PAGE
(437)
// 1=SFN/ANSI 437=LFN/U.S.(OEM)
#define MICROPY_FATFS_LFN_CODE_PAGE
437
// 1=SFN/ANSI 437=LFN/U.S.(OEM)
#define MICROPY_FATFS_RPATH (2)
#define MICROPY_FATFS_REENTRANT (1)
#define MICROPY_FATFS_TIMEOUT (2500)
...
...
ports/cc3200/mptask.c
View file @
b5f33ac2
...
...
@@ -307,7 +307,7 @@ STATIC void mptask_init_sflash_filesystem (void) {
FRESULT
res
=
f_mount
(
&
vfs_fat
->
fatfs
);
if
(
res
==
FR_NO_FILESYSTEM
)
{
// no filesystem, so create a fresh one
uint8_t
working_buf
[
_MAX_SS
];
uint8_t
working_buf
[
FF
_MAX_SS
];
res
=
f_mkfs
(
&
vfs_fat
->
fatfs
,
FM_FAT
|
FM_SFD
,
0
,
working_buf
,
sizeof
(
working_buf
));
if
(
res
==
FR_OK
)
{
// success creating fresh LFS
...
...
ports/esp32/Makefile
View file @
b5f33ac2
...
...
@@ -209,7 +209,7 @@ LIB_SRC_C = $(addprefix lib/,\
ifeq
($(MICROPY_FATFS), 1)
LIB_SRC_C
+=
\
lib/oofatfs/ff.c
\
lib/oofatfs/
option/
unicode.c
lib/oofatfs/
ff
unicode.c
endif
DRIVERS_SRC_C
=
$(
addprefix
drivers/,
\
...
...
ports/esp32/mpconfigport.h
View file @
b5f33ac2
...
...
@@ -155,7 +155,7 @@
#define MICROPY_FATFS_ENABLE_LFN (1)
#define MICROPY_FATFS_RPATH (2)
#define MICROPY_FATFS_MAX_SS (4096)
#define MICROPY_FATFS_LFN_CODE_PAGE
(437)
/* 1=SFN/ANSI 437=LFN/U.S.(OEM) */
#define MICROPY_FATFS_LFN_CODE_PAGE
437
/* 1=SFN/ANSI 437=LFN/U.S.(OEM) */
#define mp_type_fileio mp_type_vfs_fat_fileio
#define mp_type_textio mp_type_vfs_fat_textio
...
...
ports/esp8266/Makefile
View file @
b5f33ac2
...
...
@@ -127,7 +127,7 @@ LIB_SRC_C = $(addprefix lib/,\
ifeq
($(MICROPY_FATFS), 1)
LIB_SRC_C
+=
\
lib/oofatfs/ff.c
\
lib/oofatfs/
option/
unicode.c
lib/oofatfs/
ff
unicode.c
endif
DRIVERS_SRC_C
=
$(
addprefix
drivers/,
\
...
...
ports/esp8266/mpconfigport.h
View file @
b5f33ac2
...
...
@@ -110,7 +110,7 @@
#define MICROPY_FATFS_ENABLE_LFN (1)
#define MICROPY_FATFS_RPATH (2)
#define MICROPY_FATFS_MAX_SS (4096)
#define MICROPY_FATFS_LFN_CODE_PAGE
(437)
/* 1=SFN/ANSI 437=LFN/U.S.(OEM) */
#define MICROPY_FATFS_LFN_CODE_PAGE
437
/* 1=SFN/ANSI 437=LFN/U.S.(OEM) */
#define MICROPY_VFS_FAT (1)
#define MICROPY_ESP8266_APA102 (1)
#define MICROPY_ESP8266_NEOPIXEL (1)
...
...
ports/nrf/mpconfigport.h
View file @
b5f33ac2
...
...
@@ -65,7 +65,7 @@
// fatfs configuration used in ffconf.h
#define MICROPY_FATFS_ENABLE_LFN (1)
#define MICROPY_FATFS_LFN_CODE_PAGE
(437)
/* 1=SFN/ANSI 437=LFN/U.S.(OEM) */
#define MICROPY_FATFS_LFN_CODE_PAGE
437
/* 1=SFN/ANSI 437=LFN/U.S.(OEM) */
#define MICROPY_FATFS_USE_LABEL (1)
#define MICROPY_FATFS_RPATH (2)
#define MICROPY_FATFS_MULTI_PARTITION (1)
...
...
ports/stm32/Makefile
View file @
b5f33ac2
...
...
@@ -108,7 +108,7 @@ endif
SRC_LIB
=
$(
addprefix
lib/,
\
libc/string0.c
\
oofatfs/ff.c
\
oofatfs/
option/
unicode.c
\
oofatfs/
ff
unicode.c
\
mp-readline/readline.c
\
netutils/netutils.c
\
netutils/trace.c
\
...
...
ports/stm32/main.c
View file @
b5f33ac2
...
...
@@ -201,7 +201,7 @@ MP_NOINLINE STATIC bool init_flash_fs(uint reset_mode) {
led_state
(
PYB_LED_GREEN
,
1
);
uint32_t
start_tick
=
HAL_GetTick
();
uint8_t
working_buf
[
_MAX_SS
];
uint8_t
working_buf
[
FF
_MAX_SS
];
res
=
f_mkfs
(
&
vfs_fat
->
fatfs
,
FM_FAT
,
0
,
working_buf
,
sizeof
(
working_buf
));
if
(
res
==
FR_OK
)
{
// success creating fresh LFS
...
...
ports/stm32/mboot/diskio.c
View file @
b5f33ac2
...
...
@@ -31,8 +31,8 @@
#if MBOOT_FSLOAD
#if
_MAX_SS ==
_MIN_SS
#define SECSIZE (_MIN_SS)
#if
FF_MAX_SS == FF
_MIN_SS
#define SECSIZE (
FF
_MIN_SS)
#else
#error Unsupported
#endif
...
...
ports/stm32/mpconfigport.h
View file @
b5f33ac2
...
...
@@ -169,7 +169,7 @@
// fatfs configuration used in ffconf.h
#define MICROPY_FATFS_ENABLE_LFN (1)
#define MICROPY_FATFS_LFN_CODE_PAGE
(437)
/* 1=SFN/ANSI 437=LFN/U.S.(OEM) */
#define MICROPY_FATFS_LFN_CODE_PAGE
437
/* 1=SFN/ANSI 437=LFN/U.S.(OEM) */
#define MICROPY_FATFS_USE_LABEL (1)
#define MICROPY_FATFS_RPATH (2)
#define MICROPY_FATFS_MULTI_PARTITION (1)
...
...
ports/unix/Makefile
View file @
b5f33ac2
...
...
@@ -162,7 +162,7 @@ LIB_SRC_C = $(addprefix lib/,\
# FatFS VFS support
LIB_SRC_C
+=
$(
addprefix
lib/,
\
oofatfs/ff.c
\
oofatfs/
option/
unicode.c
\
oofatfs/
ff
unicode.c
\
)
OBJ
=
$(PY_O)
...
...
ports/unix/mpconfigport.h
View file @
b5f33ac2
...
...
@@ -145,7 +145,7 @@
#define MICROPY_FATFS_ENABLE_LFN (1)
#define MICROPY_FATFS_RPATH (2)
#define MICROPY_FATFS_MAX_SS (4096)
#define MICROPY_FATFS_LFN_CODE_PAGE
(437)
/* 1=SFN/ANSI 437=LFN/U.S.(OEM) */
#define MICROPY_FATFS_LFN_CODE_PAGE
437
/* 1=SFN/ANSI 437=LFN/U.S.(OEM) */
#define MICROPY_VFS_FAT (0)
// Define to MICROPY_ERROR_REPORTING_DETAILED to get function, etc.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment