summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2019-02-25 23:46:17 +1100
committerDamien George <damien.p.george@gmail.com>2019-03-05 15:56:39 +1100
commitb5f33ac2cb6076468a77f36d69df6db16b62134a (patch)
tree60e2e618325ffe628ae5299f91c1bad4090df0ab
parente959f21986e13bada076d47ea71a6ac1370295c1 (diff)
ports: Update to work with new oofatfs version.
-rw-r--r--ports/cc3200/application.mk2
-rw-r--r--ports/cc3200/fatfs_port.c12
-rw-r--r--ports/cc3200/mpconfigport.h2
-rw-r--r--ports/cc3200/mptask.c2
-rw-r--r--ports/esp32/Makefile2
-rw-r--r--ports/esp32/mpconfigport.h2
-rw-r--r--ports/esp8266/Makefile2
-rw-r--r--ports/esp8266/mpconfigport.h2
-rw-r--r--ports/nrf/mpconfigport.h2
-rw-r--r--ports/stm32/Makefile2
-rw-r--r--ports/stm32/main.c2
-rw-r--r--ports/stm32/mboot/diskio.c4
-rw-r--r--ports/stm32/mpconfigport.h2
-rw-r--r--ports/unix/Makefile2
-rw-r--r--ports/unix/mpconfigport.h2
15 files changed, 21 insertions, 21 deletions
diff --git a/ports/cc3200/application.mk b/ports/cc3200/application.mk
index 7bfd43d62..468fa134f 100644
--- a/ports/cc3200/application.mk
+++ b/ports/cc3200/application.mk
@@ -140,7 +140,7 @@ APP_MAIN_SRC_C = \
APP_LIB_SRC_C = $(addprefix lib/,\
oofatfs/ff.c \
- oofatfs/option/unicode.c \
+ oofatfs/ffunicode.c \
libc/string0.c \
mp-readline/readline.c \
netutils/netutils.c \
diff --git a/ports/cc3200/fatfs_port.c b/ports/cc3200/fatfs_port.c
index 658c94e88..6cfc17c3d 100644
--- a/ports/cc3200/fatfs_port.c
+++ b/ports/cc3200/fatfs_port.c
@@ -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);
}
diff --git a/ports/cc3200/mpconfigport.h b/ports/cc3200/mpconfigport.h
index 17de4a2f6..e7894dd02 100644
--- a/ports/cc3200/mpconfigport.h
+++ b/ports/cc3200/mpconfigport.h
@@ -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)
diff --git a/ports/cc3200/mptask.c b/ports/cc3200/mptask.c
index 939097847..9d75f4678 100644
--- a/ports/cc3200/mptask.c
+++ b/ports/cc3200/mptask.c
@@ -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
diff --git a/ports/esp32/Makefile b/ports/esp32/Makefile
index 068757834..36ee4b3b0 100644
--- a/ports/esp32/Makefile
+++ b/ports/esp32/Makefile
@@ -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/ffunicode.c
endif
DRIVERS_SRC_C = $(addprefix drivers/,\
diff --git a/ports/esp32/mpconfigport.h b/ports/esp32/mpconfigport.h
index 01b23de05..7b9b40025 100644
--- a/ports/esp32/mpconfigport.h
+++ b/ports/esp32/mpconfigport.h
@@ -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
diff --git a/ports/esp8266/Makefile b/ports/esp8266/Makefile
index 0bbb990d2..64116b139 100644
--- a/ports/esp8266/Makefile
+++ b/ports/esp8266/Makefile
@@ -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/ffunicode.c
endif
DRIVERS_SRC_C = $(addprefix drivers/,\
diff --git a/ports/esp8266/mpconfigport.h b/ports/esp8266/mpconfigport.h
index c6bd4c87d..03be59b06 100644
--- a/ports/esp8266/mpconfigport.h
+++ b/ports/esp8266/mpconfigport.h
@@ -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)
diff --git a/ports/nrf/mpconfigport.h b/ports/nrf/mpconfigport.h
index a5e16421c..0e3cf7b39 100644
--- a/ports/nrf/mpconfigport.h
+++ b/ports/nrf/mpconfigport.h
@@ -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)
diff --git a/ports/stm32/Makefile b/ports/stm32/Makefile
index a4f3cb2d0..4fddc6c7d 100644
--- a/ports/stm32/Makefile
+++ b/ports/stm32/Makefile
@@ -108,7 +108,7 @@ endif
SRC_LIB = $(addprefix lib/,\
libc/string0.c \
oofatfs/ff.c \
- oofatfs/option/unicode.c \
+ oofatfs/ffunicode.c \
mp-readline/readline.c \
netutils/netutils.c \
netutils/trace.c \
diff --git a/ports/stm32/main.c b/ports/stm32/main.c
index c7b189dab..48b4692bc 100644
--- a/ports/stm32/main.c
+++ b/ports/stm32/main.c
@@ -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
diff --git a/ports/stm32/mboot/diskio.c b/ports/stm32/mboot/diskio.c
index 2426f9329..5f68f26a8 100644
--- a/ports/stm32/mboot/diskio.c
+++ b/ports/stm32/mboot/diskio.c
@@ -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
diff --git a/ports/stm32/mpconfigport.h b/ports/stm32/mpconfigport.h
index 712697c80..bdceb8c53 100644
--- a/ports/stm32/mpconfigport.h
+++ b/ports/stm32/mpconfigport.h
@@ -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)
diff --git a/ports/unix/Makefile b/ports/unix/Makefile
index badfac7c8..be45513c3 100644
--- a/ports/unix/Makefile
+++ b/ports/unix/Makefile
@@ -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/ffunicode.c \
)
OBJ = $(PY_O)
diff --git a/ports/unix/mpconfigport.h b/ports/unix/mpconfigport.h
index 2614af839..97a9f4908 100644
--- a/ports/unix/mpconfigport.h
+++ b/ports/unix/mpconfigport.h
@@ -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.