Commit ed73fcd7 authored by Damien George's avatar Damien George
Browse files

Merge pull request #316 from iabdalkader/fatfs_lfn

Add Configurable LFN support to FatFS
parents 9982f279 1e2cf746
......@@ -141,6 +141,7 @@ SRC_STMUSBH = $(addprefix $(STMUSBH_DIR)/,\
SRC_FATFS = $(addprefix $(FATFS_DIR)/,\
ff.c \
diskio.c \
ccsbcs.c \
)
SRC_CC3K = $(addprefix $(CC3K_DIR)/,\
......
This diff is collapsed.
......@@ -9,6 +9,7 @@
#ifndef _FFCONF
#define _FFCONF 80960 /* Revision ID */
#include "mpconfigport.h"
/*---------------------------------------------------------------------------/
/ Functions and Buffer Configurations
......@@ -60,7 +61,7 @@
/ Locale and Namespace Configurations
/----------------------------------------------------------------------------*/
#define _CODE_PAGE 1
#define _CODE_PAGE (MICROPY_LFN_CODE_PAGE)
/* The _CODE_PAGE specifies the OEM code page to be used on the target system.
/ Incorrect setting of the code page can cause a file open failure.
/
......@@ -92,8 +93,7 @@
/ 1 - ASCII (Valid for only non-LFN cfg.)
*/
#define _USE_LFN 0 /* 0 to 3 */
#define _USE_LFN (MICROPY_ENABLE_LFN) /* 0 to 3 */
#define _MAX_LFN 255 /* Maximum LFN length to handle (12 to 255) */
/* The _USE_LFN option switches the LFN feature.
/
......
......@@ -9,6 +9,14 @@
#define MICROPY_ENABLE_FLOAT (1)
#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_MPZ)
#define MICROPY_PATH_MAX (128)
/* Enable FatFS LFNs
0: Disable LFN feature.
1: Enable LFN with static working buffer on the BSS. Always NOT reentrant.
2: Enable LFN with dynamic working buffer on the STACK.
3: Enable LFN with dynamic working buffer on the HEAP.
*/
#define MICROPY_ENABLE_LFN (0)
#define MICROPY_LFN_CODE_PAGE (1) /* 1=SFN/ANSI 437=LFN/U.S.(OEM) */
// type definitions for the specific machine
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment