Update project.
[bertos.git] / boards / stm32-p103 / templates / stm32-p103_kernel / cfg / cfg_fat.h
1 /**
2  * \file
3  * <!--
4  * This file is part of BeRTOS.
5  *
6  * Bertos is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19  *
20  * As a special exception, you may use this file as part of a free software
21  * library without restriction.  Specifically, if other files instantiate
22  * templates or use macros or inline functions from this file, or you compile
23  * this file and link it with other files to produce an executable, this
24  * file does not by itself cause the resulting executable to be covered by
25  * the GNU General Public License.  This exception does not however
26  * invalidate any other reasons why the executable file might be covered by
27  * the GNU General Public License.
28  *
29  * Copyright 2009 Develer S.r.l. (http://www.develer.com/)
30  * All Rights Reserved.
31  * -->
32  *
33  * \brief Configuration file for Fat module.
34  *
35  *
36  * \author Luca Ottaviano <lottaviano@develer.com>
37  * \author Francesco Sacchi <batt@develer.com>
38  */
39
40 #ifndef CFG_FAT_H
41 #define CFG_FAT_H
42
43 /**
44  * Module logging level.
45  *
46  * $WIZ$ type = "enum"
47  * $WIZ$ value_list = "log_level"
48  */
49 #define FAT_LOG_LEVEL      LOG_LVL_ERR
50
51 /**
52  * Module logging format.
53  *
54  * $WIZ$ type = "enum"
55  * $WIZ$ value_list = "log_format"
56  */
57 #define FAT_LOG_FORMAT     LOG_FMT_VERBOSE
58
59
60 /**
61  * Use word alignment to access FAT structure.
62  * $WIZ$ type = "boolean"
63  */
64 #define CONFIG_FAT_WORD_ACCESS   0
65 #define _WORD_ACCESS CONFIG_FAT_WORD_ACCESS
66
67 /**
68  * Enable read functions only.
69  * $WIZ$ type = "boolean"
70  */
71 #define CONFIG_FAT_FS_READONLY   0
72 #define _FS_READONLY CONFIG_FAT_FS_READONLY
73
74 /**
75  * Minimization level to remove some functions.
76  * $WIZ$ type = "int"; min = 0; max = 3
77  */
78 #define CONFIG_FAT_FS_MINIMIZE 0
79 #define _FS_MINIMIZE CONFIG_FAT_FS_MINIMIZE
80
81 /**
82  * If enabled, this reduces memory consumption 512 bytes each file object by using a shared buffer.
83  * $WIZ$ type = "boolean"
84  */
85 #define CONFIG_FAT_FS_TINY 1
86 #define _FS_TINY CONFIG_FAT_FS_TINY
87
88 /**
89  * To enable string functions, set _USE_STRFUNC to 1 or 2.
90  * $WIZ$ type = "int"
91  * $WIZ$ supports = "False"
92  */
93 #define CONFIG_FAT_USE_STRFUNC 0
94 #define _USE_STRFUNC CONFIG_FAT_USE_STRFUNC
95
96 /**
97  * Enable f_mkfs function. Requires CONFIG_FAT_FS_READONLY = 0.
98  * $WIZ$ type = "boolean"
99  */
100 #define CONFIG_FAT_USE_MKFS 0
101 #define _USE_MKFS (CONFIG_FAT_USE_MKFS && !CONFIG_FAT_FS_READONLY)
102
103 /**
104  * Enable f_forward function. Requires CONFIG_FAT_FS_TINY.
105  * $WIZ$ type = "boolean"
106  */
107 #define CONFIG_FAT_USE_FORWARD 0
108 #define _USE_FORWARD (CONFIG_FAT_USE_FORWARD && CONFIG_FAT_FS_TINY)
109
110 /**
111  * Number of volumes (logical drives) to be used.
112  * $WIZ$ type = "int"; min = 1; max = 255
113  */
114 #define CONFIG_FAT_DRIVES 1
115 #define _DRIVES CONFIG_FAT_DRIVES
116
117 /**
118  * Maximum sector size to be handled. (512/1024/2048/4096).
119  * 512 for memory card and hard disk, 1024 for floppy disk, 2048 for MO disk
120  * $WIZ$ type = "int"; min = 512; max = 4096
121  */
122 #define CONFIG_FAT_MAX_SS 512
123 #define _MAX_SS CONFIG_FAT_MAX_SS
124
125 /**
126  * When _MULTI_PARTITION is set to 0, each volume is bound to the same physical
127  * drive number and can mount only first primaly partition. When it is set to 1,
128  * each volume is tied to the partitions listed in Drives[].
129  * $WIZ$ type = "boolean"
130  * $WIZ$ supports = "False"
131  */
132 #define CONFIG_FAT_MULTI_PARTITION 0
133 #define _MULTI_PARTITION CONFIG_FAT_MULTI_PARTITION
134
135 /**
136  * Specifies the OEM code page to be used on the target system.
137  * $WIZ$ type = "int"
138  */
139 #define CONFIG_FAT_CODE_PAGE 850
140 #define _CODE_PAGE CONFIG_FAT_CODE_PAGE
141
142 /**
143  * Support for long filenames. Enable only if you have a valid Microsoft license.
144  * $WIZ$ type = "boolean"
145  */
146 #define CONFIG_FAT_USE_LFN 0
147 #define _USE_LFN CONFIG_FAT_USE_LFN
148
149 /**
150  * Maximum Long File Name length to handle.
151  * $WIZ$ type = "int"; min = 8; max = 255
152  */
153 #define CONFIG_FAT_MAX_LFN 255
154 #define _MAX_LFN CONFIG_FAT_MAX_LFN
155
156 #endif /* CFG_FAT_H */