| ... | ... |
@@ -23,11 +23,11 @@ FS_DIR = ../fs |
| 23 | 23 |
FS_APP = app |
| 24 | 24 |
FS_FILE = file |
| 25 | 25 |
|
| 26 |
-#IO_SRC_DIR = ../io/firmware/src |
|
| 27 |
-#IO_HEX = io.hex |
|
| 26 |
+FW_DIR = ../fw |
|
| 27 |
+FW_HEX = Objects/io.hex |
|
| 28 | 28 |
|
| 29 | 29 |
.PHONY: all |
| 30 |
-all: urom rom fs io |
|
| 30 |
+all: urom rom fs fw |
|
| 31 | 31 |
|
| 32 | 32 |
urom: tools |
| 33 | 33 |
rm -rf urom |
| ... | ... |
@@ -60,11 +60,11 @@ fs: tools rom |
| 60 | 60 |
cp -r $(FS_DIR)/$(FS_APP) fs |
| 61 | 61 |
cp -r $(FS_DIR)/$(FS_FILE) fs |
| 62 | 62 |
|
| 63 |
-io: |
|
| 64 |
- #rm -rf io |
|
| 65 |
- #$(MAKE) -C $(IO_SRC_DIR) |
|
| 66 |
- #mkdir -p io |
|
| 67 |
- #cp $(IO_SRC)/$(IO_HEX) $(IO_DST)/ |
|
| 63 |
+fw: |
|
| 64 |
+ rm -rf fw |
|
| 65 |
+ $(MAKE) -C $(FW_DIR) |
|
| 66 |
+ mkdir -p fw |
|
| 67 |
+ cp -f $(FW_DIR)/src/$(FW_HEX) fw | true |
|
| 68 | 68 |
|
| 69 | 69 |
tools: tools_urom tools_asm tools_emu |
| 70 | 70 |
rm -rf tools |
| ... | ... |
@@ -98,9 +98,10 @@ clean: |
| 98 | 98 |
$(MAKE) -C $(ASM_DIR) clean |
| 99 | 99 |
$(MAKE) -C $(EMU_DIR) clean |
| 100 | 100 |
$(MAKE) -C $(FS_DIR) clean |
| 101 |
+ $(MAKE) -C $(FW_DIR) clean |
|
| 101 | 102 |
|
| 102 | 103 |
rm -rf tools |
| 103 | 104 |
rm -rf urom |
| 104 | 105 |
rm -rf rom |
| 105 | 106 |
rm -rf fs |
| 106 |
- rm -rf io |
|
| 107 |
+ rm -rf fw |
| ... | ... |
@@ -1,10 +1,10 @@ |
| 1 | 1 |
UROM_DOC_DIR = ../urom/doc |
| 2 | 2 |
ASM_DOC_DIR = ../asm/doc |
| 3 | 3 |
EMU_DOC_DIR = ../emu/doc |
| 4 |
-IO_DOC_DIR = ../io/firmware/doc |
|
| 4 |
+FW_DOC_DIR = ../fw/doc |
|
| 5 | 5 |
|
| 6 | 6 |
.PHONY: all |
| 7 |
-all: urom asm emu io |
|
| 7 |
+all: urom asm emu fw |
|
| 8 | 8 |
|
| 9 | 9 |
.PHONY: urom |
| 10 | 10 |
urom: |
| ... | ... |
@@ -24,20 +24,20 @@ emu: |
| 24 | 24 |
$(MAKE) -C $(EMU_DOC_DIR) |
| 25 | 25 |
cp -R $(EMU_DOC_DIR)/html emu |
| 26 | 26 |
|
| 27 |
-.PHONY: io |
|
| 28 |
-io: |
|
| 29 |
- #rm -rf io |
|
| 30 |
- #$(MAKE) -C $(IO_DOC_DIR) |
|
| 31 |
- #cp -R $(IO_DOC_DIR)/html io |
|
| 27 |
+.PHONY: fw |
|
| 28 |
+fw: |
|
| 29 |
+ rm -rf fw |
|
| 30 |
+ $(MAKE) -C $(FW_DOC_DIR) |
|
| 31 |
+ cp -R $(FW_DOC_DIR)/html fw |
|
| 32 | 32 |
|
| 33 | 33 |
.PHONY: clean |
| 34 | 34 |
clean: |
| 35 | 35 |
$(MAKE) -C $(UROM_DOC_DIR) clean |
| 36 | 36 |
$(MAKE) -C $(ASM_DOC_DIR) clean |
| 37 | 37 |
$(MAKE) -C $(EMU_DOC_DIR) clean |
| 38 |
- #$(MAKE) -C $(IO_DOC_DIR) clean |
|
| 38 |
+ $(MAKE) -C $(FW_DOC_DIR) clean |
|
| 39 | 39 |
|
| 40 | 40 |
rm -rf urom |
| 41 | 41 |
rm -rf asm |
| 42 | 42 |
rm -rf emu |
| 43 |
- rm -rf io |
|
| 43 |
+ rm -rf fw |
| 44 | 44 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,38 @@ |
| 1 |
+UV4 ?= UV4.exe |
|
| 2 |
+ |
|
| 3 |
+FW_HEX = src/Objects/io.hex |
|
| 4 |
+FW_PRO = io.uvprojx |
|
| 5 |
+FW_LOG = build.log |
|
| 6 |
+ |
|
| 7 |
+.PHONY: all |
|
| 8 |
+all: src doc |
|
| 9 |
+ |
|
| 10 |
+.PHONY: src |
|
| 11 |
+src: $(FW_HEX) |
|
| 12 |
+ |
|
| 13 |
+$(FW_HEX): src/*.c src/*.h |
|
| 14 |
+ifeq ($(OS),Windows_NT) |
|
| 15 |
+ifndef WINE |
|
| 16 |
+ cd src; \ |
|
| 17 |
+ $(UV4) -j0 -b $(FW_PRO) -o $(FW_LOG) |
|
| 18 |
+endif |
|
| 19 |
+endif |
|
| 20 |
+ |
|
| 21 |
+.PHONY: doc |
|
| 22 |
+doc: |
|
| 23 |
+ $(MAKE) -C doc |
|
| 24 |
+ |
|
| 25 |
+.PHONY: clean |
|
| 26 |
+clean: clean_src clean_doc |
|
| 27 |
+ |
|
| 28 |
+.PHONY: clean_src |
|
| 29 |
+clean_src: |
|
| 30 |
+ cd src; \ |
|
| 31 |
+ rm -rf DebugConfig; \ |
|
| 32 |
+ rm -rf Listings; \ |
|
| 33 |
+ rm -rf Objects; \ |
|
| 34 |
+ rm -rf $(FW_LOG) |
|
| 35 |
+ |
|
| 36 |
+.PHONY: clean_doc |
|
| 37 |
+clean_doc: |
|
| 38 |
+ $(MAKE) -C doc clean |
| 0 | 39 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,2671 @@ |
| 1 |
+# Doxyfile 1.9.5 |
|
| 2 |
+ |
|
| 3 |
+# This file describes the settings to be used by the documentation system |
|
| 4 |
+# doxygen (www.doxygen.org) for a project. |
|
| 5 |
+# |
|
| 6 |
+# All text after a double hash (##) is considered a comment and is placed in |
|
| 7 |
+# front of the TAG it is preceding. |
|
| 8 |
+# |
|
| 9 |
+# All text after a single hash (#) is considered a comment and will be ignored. |
|
| 10 |
+# The format is: |
|
| 11 |
+# TAG = value [value, ...] |
|
| 12 |
+# For lists, items can also be appended using: |
|
| 13 |
+# TAG += value [value, ...] |
|
| 14 |
+# Values that contain spaces should be placed between quotes (\" \"). |
|
| 15 |
+# |
|
| 16 |
+# Note: |
|
| 17 |
+# |
|
| 18 |
+# Use doxygen to compare the used configuration file with the template |
|
| 19 |
+# configuration file: |
|
| 20 |
+# doxygen -x [configFile] |
|
| 21 |
+# Use doxygen to compare the used configuration file with the template |
|
| 22 |
+# configuration file without replacing the environment variables or CMake type |
|
| 23 |
+# replacement variables: |
|
| 24 |
+# doxygen -x_noenv [configFile] |
|
| 25 |
+ |
|
| 26 |
+#--------------------------------------------------------------------------- |
|
| 27 |
+# Project related configuration options |
|
| 28 |
+#--------------------------------------------------------------------------- |
|
| 29 |
+ |
|
| 30 |
+# This tag specifies the encoding used for all characters in the configuration |
|
| 31 |
+# file that follow. The default is UTF-8 which is also the encoding used for all |
|
| 32 |
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the |
|
| 33 |
+# iconv built into libc) for the transcoding. See |
|
| 34 |
+# https://www.gnu.org/software/libiconv/ for the list of possible encodings. |
|
| 35 |
+# The default value is: UTF-8. |
|
| 36 |
+ |
|
| 37 |
+DOXYFILE_ENCODING = UTF-8 |
|
| 38 |
+ |
|
| 39 |
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by |
|
| 40 |
+# double-quotes, unless you are using Doxywizard) that should identify the |
|
| 41 |
+# project for which the documentation is generated. This name is used in the |
|
| 42 |
+# title of most generated pages and in a few other places. |
|
| 43 |
+# The default value is: My Project. |
|
| 44 |
+ |
|
| 45 |
+PROJECT_NAME = "XiPU IO Board" |
|
| 46 |
+ |
|
| 47 |
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. This |
|
| 48 |
+# could be handy for archiving the generated documentation or if some version |
|
| 49 |
+# control system is used. |
|
| 50 |
+ |
|
| 51 |
+PROJECT_NUMBER = |
|
| 52 |
+ |
|
| 53 |
+# Using the PROJECT_BRIEF tag one can provide an optional one line description |
|
| 54 |
+# for a project that appears at the top of each page and should give viewer a |
|
| 55 |
+# quick idea about the purpose of the project. Keep the description short. |
|
| 56 |
+ |
|
| 57 |
+PROJECT_BRIEF = |
|
| 58 |
+ |
|
| 59 |
+# With the PROJECT_LOGO tag one can specify a logo or an icon that is included |
|
| 60 |
+# in the documentation. The maximum height of the logo should not exceed 55 |
|
| 61 |
+# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy |
|
| 62 |
+# the logo to the output directory. |
|
| 63 |
+ |
|
| 64 |
+PROJECT_LOGO = |
|
| 65 |
+ |
|
| 66 |
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path |
|
| 67 |
+# into which the generated documentation will be written. If a relative path is |
|
| 68 |
+# entered, it will be relative to the location where doxygen was started. If |
|
| 69 |
+# left blank the current directory will be used. |
|
| 70 |
+ |
|
| 71 |
+OUTPUT_DIRECTORY = |
|
| 72 |
+ |
|
| 73 |
+# If the CREATE_SUBDIRS tag is set to YES then doxygen will create up to 4096 |
|
| 74 |
+# sub-directories (in 2 levels) under the output directory of each output format |
|
| 75 |
+# and will distribute the generated files over these directories. Enabling this |
|
| 76 |
+# option can be useful when feeding doxygen a huge amount of source files, where |
|
| 77 |
+# putting all generated files in the same directory would otherwise causes |
|
| 78 |
+# performance problems for the file system. Adapt CREATE_SUBDIRS_LEVEL to |
|
| 79 |
+# control the number of sub-directories. |
|
| 80 |
+# The default value is: NO. |
|
| 81 |
+ |
|
| 82 |
+CREATE_SUBDIRS = NO |
|
| 83 |
+ |
|
| 84 |
+# Controls the number of sub-directories that will be created when |
|
| 85 |
+# CREATE_SUBDIRS tag is set to YES. Level 0 represents 16 directories, and every |
|
| 86 |
+# level increment doubles the number of directories, resulting in 4096 |
|
| 87 |
+# directories at level 8 which is the default and also the maximum value. The |
|
| 88 |
+# sub-directories are organized in 2 levels, the first level always has a fixed |
|
| 89 |
+# numer of 16 directories. |
|
| 90 |
+# Minimum value: 0, maximum value: 8, default value: 8. |
|
| 91 |
+# This tag requires that the tag CREATE_SUBDIRS is set to YES. |
|
| 92 |
+ |
|
| 93 |
+CREATE_SUBDIRS_LEVEL = 8 |
|
| 94 |
+ |
|
| 95 |
+# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII |
|
| 96 |
+# characters to appear in the names of generated files. If set to NO, non-ASCII |
|
| 97 |
+# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode |
|
| 98 |
+# U+3044. |
|
| 99 |
+# The default value is: NO. |
|
| 100 |
+ |
|
| 101 |
+ALLOW_UNICODE_NAMES = NO |
|
| 102 |
+ |
|
| 103 |
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all |
|
| 104 |
+# documentation generated by doxygen is written. Doxygen will use this |
|
| 105 |
+# information to generate all constant output in the proper language. |
|
| 106 |
+# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Bulgarian, |
|
| 107 |
+# Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, English |
|
| 108 |
+# (United States), Esperanto, Farsi (Persian), Finnish, French, German, Greek, |
|
| 109 |
+# Hindi, Hungarian, Indonesian, Italian, Japanese, Japanese-en (Japanese with |
|
| 110 |
+# English messages), Korean, Korean-en (Korean with English messages), Latvian, |
|
| 111 |
+# Lithuanian, Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, |
|
| 112 |
+# Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, |
|
| 113 |
+# Swedish, Turkish, Ukrainian and Vietnamese. |
|
| 114 |
+# The default value is: English. |
|
| 115 |
+ |
|
| 116 |
+OUTPUT_LANGUAGE = English |
|
| 117 |
+ |
|
| 118 |
+# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member |
|
| 119 |
+# descriptions after the members that are listed in the file and class |
|
| 120 |
+# documentation (similar to Javadoc). Set to NO to disable this. |
|
| 121 |
+# The default value is: YES. |
|
| 122 |
+ |
|
| 123 |
+BRIEF_MEMBER_DESC = YES |
|
| 124 |
+ |
|
| 125 |
+# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief |
|
| 126 |
+# description of a member or function before the detailed description |
|
| 127 |
+# |
|
| 128 |
+# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the |
|
| 129 |
+# brief descriptions will be completely suppressed. |
|
| 130 |
+# The default value is: YES. |
|
| 131 |
+ |
|
| 132 |
+REPEAT_BRIEF = YES |
|
| 133 |
+ |
|
| 134 |
+# This tag implements a quasi-intelligent brief description abbreviator that is |
|
| 135 |
+# used to form the text in various listings. Each string in this list, if found |
|
| 136 |
+# as the leading text of the brief description, will be stripped from the text |
|
| 137 |
+# and the result, after processing the whole list, is used as the annotated |
|
| 138 |
+# text. Otherwise, the brief description is used as-is. If left blank, the |
|
| 139 |
+# following values are used ($name is automatically replaced with the name of |
|
| 140 |
+# the entity):The $name class, The $name widget, The $name file, is, provides, |
|
| 141 |
+# specifies, contains, represents, a, an and the. |
|
| 142 |
+ |
|
| 143 |
+ABBREVIATE_BRIEF = |
|
| 144 |
+ |
|
| 145 |
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then |
|
| 146 |
+# doxygen will generate a detailed section even if there is only a brief |
|
| 147 |
+# description. |
|
| 148 |
+# The default value is: NO. |
|
| 149 |
+ |
|
| 150 |
+ALWAYS_DETAILED_SEC = NO |
|
| 151 |
+ |
|
| 152 |
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all |
|
| 153 |
+# inherited members of a class in the documentation of that class as if those |
|
| 154 |
+# members were ordinary class members. Constructors, destructors and assignment |
|
| 155 |
+# operators of the base classes will not be shown. |
|
| 156 |
+# The default value is: NO. |
|
| 157 |
+ |
|
| 158 |
+INLINE_INHERITED_MEMB = NO |
|
| 159 |
+ |
|
| 160 |
+# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path |
|
| 161 |
+# before files name in the file list and in the header files. If set to NO the |
|
| 162 |
+# shortest path that makes the file name unique will be used |
|
| 163 |
+# The default value is: YES. |
|
| 164 |
+ |
|
| 165 |
+FULL_PATH_NAMES = NO |
|
| 166 |
+ |
|
| 167 |
+# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. |
|
| 168 |
+# Stripping is only done if one of the specified strings matches the left-hand |
|
| 169 |
+# part of the path. The tag can be used to show relative paths in the file list. |
|
| 170 |
+# If left blank the directory from which doxygen is run is used as the path to |
|
| 171 |
+# strip. |
|
| 172 |
+# |
|
| 173 |
+# Note that you can specify absolute paths here, but also relative paths, which |
|
| 174 |
+# will be relative from the directory where doxygen is started. |
|
| 175 |
+# This tag requires that the tag FULL_PATH_NAMES is set to YES. |
|
| 176 |
+ |
|
| 177 |
+STRIP_FROM_PATH = |
|
| 178 |
+ |
|
| 179 |
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the |
|
| 180 |
+# path mentioned in the documentation of a class, which tells the reader which |
|
| 181 |
+# header file to include in order to use a class. If left blank only the name of |
|
| 182 |
+# the header file containing the class definition is used. Otherwise one should |
|
| 183 |
+# specify the list of include paths that are normally passed to the compiler |
|
| 184 |
+# using the -I flag. |
|
| 185 |
+ |
|
| 186 |
+STRIP_FROM_INC_PATH = |
|
| 187 |
+ |
|
| 188 |
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but |
|
| 189 |
+# less readable) file names. This can be useful is your file systems doesn't |
|
| 190 |
+# support long names like on DOS, Mac, or CD-ROM. |
|
| 191 |
+# The default value is: NO. |
|
| 192 |
+ |
|
| 193 |
+SHORT_NAMES = NO |
|
| 194 |
+ |
|
| 195 |
+# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the |
|
| 196 |
+# first line (until the first dot) of a Javadoc-style comment as the brief |
|
| 197 |
+# description. If set to NO, the Javadoc-style will behave just like regular Qt- |
|
| 198 |
+# style comments (thus requiring an explicit @brief command for a brief |
|
| 199 |
+# description.) |
|
| 200 |
+# The default value is: NO. |
|
| 201 |
+ |
|
| 202 |
+JAVADOC_AUTOBRIEF = NO |
|
| 203 |
+ |
|
| 204 |
+# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line |
|
| 205 |
+# such as |
|
| 206 |
+# /*************** |
|
| 207 |
+# as being the beginning of a Javadoc-style comment "banner". If set to NO, the |
|
| 208 |
+# Javadoc-style will behave just like regular comments and it will not be |
|
| 209 |
+# interpreted by doxygen. |
|
| 210 |
+# The default value is: NO. |
|
| 211 |
+ |
|
| 212 |
+JAVADOC_BANNER = NO |
|
| 213 |
+ |
|
| 214 |
+# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first |
|
| 215 |
+# line (until the first dot) of a Qt-style comment as the brief description. If |
|
| 216 |
+# set to NO, the Qt-style will behave just like regular Qt-style comments (thus |
|
| 217 |
+# requiring an explicit \brief command for a brief description.) |
|
| 218 |
+# The default value is: NO. |
|
| 219 |
+ |
|
| 220 |
+QT_AUTOBRIEF = NO |
|
| 221 |
+ |
|
| 222 |
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a |
|
| 223 |
+# multi-line C++ special comment block (i.e. a block of //! or /// comments) as |
|
| 224 |
+# a brief description. This used to be the default behavior. The new default is |
|
| 225 |
+# to treat a multi-line C++ comment block as a detailed description. Set this |
|
| 226 |
+# tag to YES if you prefer the old behavior instead. |
|
| 227 |
+# |
|
| 228 |
+# Note that setting this tag to YES also means that rational rose comments are |
|
| 229 |
+# not recognized any more. |
|
| 230 |
+# The default value is: NO. |
|
| 231 |
+ |
|
| 232 |
+MULTILINE_CPP_IS_BRIEF = NO |
|
| 233 |
+ |
|
| 234 |
+# By default Python docstrings are displayed as preformatted text and doxygen's |
|
| 235 |
+# special commands cannot be used. By setting PYTHON_DOCSTRING to NO the |
|
| 236 |
+# doxygen's special commands can be used and the contents of the docstring |
|
| 237 |
+# documentation blocks is shown as doxygen documentation. |
|
| 238 |
+# The default value is: YES. |
|
| 239 |
+ |
|
| 240 |
+PYTHON_DOCSTRING = YES |
|
| 241 |
+ |
|
| 242 |
+# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the |
|
| 243 |
+# documentation from any documented member that it re-implements. |
|
| 244 |
+# The default value is: YES. |
|
| 245 |
+ |
|
| 246 |
+INHERIT_DOCS = YES |
|
| 247 |
+ |
|
| 248 |
+# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new |
|
| 249 |
+# page for each member. If set to NO, the documentation of a member will be part |
|
| 250 |
+# of the file/class/namespace that contains it. |
|
| 251 |
+# The default value is: NO. |
|
| 252 |
+ |
|
| 253 |
+SEPARATE_MEMBER_PAGES = NO |
|
| 254 |
+ |
|
| 255 |
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen |
|
| 256 |
+# uses this value to replace tabs by spaces in code fragments. |
|
| 257 |
+# Minimum value: 1, maximum value: 16, default value: 4. |
|
| 258 |
+ |
|
| 259 |
+TAB_SIZE = 4 |
|
| 260 |
+ |
|
| 261 |
+# This tag can be used to specify a number of aliases that act as commands in |
|
| 262 |
+# the documentation. An alias has the form: |
|
| 263 |
+# name=value |
|
| 264 |
+# For example adding |
|
| 265 |
+# "sideeffect=@par Side Effects:^^" |
|
| 266 |
+# will allow you to put the command \sideeffect (or @sideeffect) in the |
|
| 267 |
+# documentation, which will result in a user-defined paragraph with heading |
|
| 268 |
+# "Side Effects:". Note that you cannot put \n's in the value part of an alias |
|
| 269 |
+# to insert newlines (in the resulting output). You can put ^^ in the value part |
|
| 270 |
+# of an alias to insert a newline as if a physical newline was in the original |
|
| 271 |
+# file. When you need a literal { or } or , in the value part of an alias you
|
|
| 272 |
+# have to escape them by means of a backslash (\), this can lead to conflicts |
|
| 273 |
+# with the commands \{ and \} for these it is advised to use the version @{ and
|
|
| 274 |
+# @} or use a double escape (\\{ and \\})
|
|
| 275 |
+ |
|
| 276 |
+ALIASES = |
|
| 277 |
+ |
|
| 278 |
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources |
|
| 279 |
+# only. Doxygen will then generate output that is more tailored for C. For |
|
| 280 |
+# instance, some of the names that are used will be different. The list of all |
|
| 281 |
+# members will be omitted, etc. |
|
| 282 |
+# The default value is: NO. |
|
| 283 |
+ |
|
| 284 |
+OPTIMIZE_OUTPUT_FOR_C = YES |
|
| 285 |
+ |
|
| 286 |
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or |
|
| 287 |
+# Python sources only. Doxygen will then generate output that is more tailored |
|
| 288 |
+# for that language. For instance, namespaces will be presented as packages, |
|
| 289 |
+# qualified scopes will look different, etc. |
|
| 290 |
+# The default value is: NO. |
|
| 291 |
+ |
|
| 292 |
+OPTIMIZE_OUTPUT_JAVA = NO |
|
| 293 |
+ |
|
| 294 |
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran |
|
| 295 |
+# sources. Doxygen will then generate output that is tailored for Fortran. |
|
| 296 |
+# The default value is: NO. |
|
| 297 |
+ |
|
| 298 |
+OPTIMIZE_FOR_FORTRAN = NO |
|
| 299 |
+ |
|
| 300 |
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL |
|
| 301 |
+# sources. Doxygen will then generate output that is tailored for VHDL. |
|
| 302 |
+# The default value is: NO. |
|
| 303 |
+ |
|
| 304 |
+OPTIMIZE_OUTPUT_VHDL = NO |
|
| 305 |
+ |
|
| 306 |
+# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice |
|
| 307 |
+# sources only. Doxygen will then generate output that is more tailored for that |
|
| 308 |
+# language. For instance, namespaces will be presented as modules, types will be |
|
| 309 |
+# separated into more groups, etc. |
|
| 310 |
+# The default value is: NO. |
|
| 311 |
+ |
|
| 312 |
+OPTIMIZE_OUTPUT_SLICE = NO |
|
| 313 |
+ |
|
| 314 |
+# Doxygen selects the parser to use depending on the extension of the files it |
|
| 315 |
+# parses. With this tag you can assign which parser to use for a given |
|
| 316 |
+# extension. Doxygen has a built-in mapping, but you can override or extend it |
|
| 317 |
+# using this tag. The format is ext=language, where ext is a file extension, and |
|
| 318 |
+# language is one of the parsers supported by doxygen: IDL, Java, JavaScript, |
|
| 319 |
+# Csharp (C#), C, C++, Lex, D, PHP, md (Markdown), Objective-C, Python, Slice, |
|
| 320 |
+# VHDL, Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: |
|
| 321 |
+# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser |
|
| 322 |
+# tries to guess whether the code is fixed or free formatted code, this is the |
|
| 323 |
+# default for Fortran type files). For instance to make doxygen treat .inc files |
|
| 324 |
+# as Fortran files (default is PHP), and .f files as C (default is Fortran), |
|
| 325 |
+# use: inc=Fortran f=C. |
|
| 326 |
+# |
|
| 327 |
+# Note: For files without extension you can use no_extension as a placeholder. |
|
| 328 |
+# |
|
| 329 |
+# Note that for custom extensions you also need to set FILE_PATTERNS otherwise |
|
| 330 |
+# the files are not read by doxygen. When specifying no_extension you should add |
|
| 331 |
+# * to the FILE_PATTERNS. |
|
| 332 |
+# |
|
| 333 |
+# Note see also the list of default file extension mappings. |
|
| 334 |
+ |
|
| 335 |
+EXTENSION_MAPPING = |
|
| 336 |
+ |
|
| 337 |
+# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments |
|
| 338 |
+# according to the Markdown format, which allows for more readable |
|
| 339 |
+# documentation. See https://daringfireball.net/projects/markdown/ for details. |
|
| 340 |
+# The output of markdown processing is further processed by doxygen, so you can |
|
| 341 |
+# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in |
|
| 342 |
+# case of backward compatibilities issues. |
|
| 343 |
+# The default value is: YES. |
|
| 344 |
+ |
|
| 345 |
+MARKDOWN_SUPPORT = NO |
|
| 346 |
+ |
|
| 347 |
+# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up |
|
| 348 |
+# to that level are automatically included in the table of contents, even if |
|
| 349 |
+# they do not have an id attribute. |
|
| 350 |
+# Note: This feature currently applies only to Markdown headings. |
|
| 351 |
+# Minimum value: 0, maximum value: 99, default value: 5. |
|
| 352 |
+# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. |
|
| 353 |
+ |
|
| 354 |
+TOC_INCLUDE_HEADINGS = 5 |
|
| 355 |
+ |
|
| 356 |
+# When enabled doxygen tries to link words that correspond to documented |
|
| 357 |
+# classes, or namespaces to their corresponding documentation. Such a link can |
|
| 358 |
+# be prevented in individual cases by putting a % sign in front of the word or |
|
| 359 |
+# globally by setting AUTOLINK_SUPPORT to NO. |
|
| 360 |
+# The default value is: YES. |
|
| 361 |
+ |
|
| 362 |
+AUTOLINK_SUPPORT = YES |
|
| 363 |
+ |
|
| 364 |
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want |
|
| 365 |
+# to include (a tag file for) the STL sources as input, then you should set this |
|
| 366 |
+# tag to YES in order to let doxygen match functions declarations and |
|
| 367 |
+# definitions whose arguments contain STL classes (e.g. func(std::string); |
|
| 368 |
+# versus func(std::string) {}). This also make the inheritance and collaboration
|
|
| 369 |
+# diagrams that involve STL classes more complete and accurate. |
|
| 370 |
+# The default value is: NO. |
|
| 371 |
+ |
|
| 372 |
+BUILTIN_STL_SUPPORT = YES |
|
| 373 |
+ |
|
| 374 |
+# If you use Microsoft's C++/CLI language, you should set this option to YES to |
|
| 375 |
+# enable parsing support. |
|
| 376 |
+# The default value is: NO. |
|
| 377 |
+ |
|
| 378 |
+CPP_CLI_SUPPORT = NO |
|
| 379 |
+ |
|
| 380 |
+# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: |
|
| 381 |
+# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen |
|
| 382 |
+# will parse them like normal C++ but will assume all classes use public instead |
|
| 383 |
+# of private inheritance when no explicit protection keyword is present. |
|
| 384 |
+# The default value is: NO. |
|
| 385 |
+ |
|
| 386 |
+SIP_SUPPORT = NO |
|
| 387 |
+ |
|
| 388 |
+# For Microsoft's IDL there are propget and propput attributes to indicate |
|
| 389 |
+# getter and setter methods for a property. Setting this option to YES will make |
|
| 390 |
+# doxygen to replace the get and set methods by a property in the documentation. |
|
| 391 |
+# This will only work if the methods are indeed getting or setting a simple |
|
| 392 |
+# type. If this is not the case, or you want to show the methods anyway, you |
|
| 393 |
+# should set this option to NO. |
|
| 394 |
+# The default value is: YES. |
|
| 395 |
+ |
|
| 396 |
+IDL_PROPERTY_SUPPORT = YES |
|
| 397 |
+ |
|
| 398 |
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC |
|
| 399 |
+# tag is set to YES then doxygen will reuse the documentation of the first |
|
| 400 |
+# member in the group (if any) for the other members of the group. By default |
|
| 401 |
+# all members of a group must be documented explicitly. |
|
| 402 |
+# The default value is: NO. |
|
| 403 |
+ |
|
| 404 |
+DISTRIBUTE_GROUP_DOC = NO |
|
| 405 |
+ |
|
| 406 |
+# If one adds a struct or class to a group and this option is enabled, then also |
|
| 407 |
+# any nested class or struct is added to the same group. By default this option |
|
| 408 |
+# is disabled and one has to add nested compounds explicitly via \ingroup. |
|
| 409 |
+# The default value is: NO. |
|
| 410 |
+ |
|
| 411 |
+GROUP_NESTED_COMPOUNDS = NO |
|
| 412 |
+ |
|
| 413 |
+# Set the SUBGROUPING tag to YES to allow class member groups of the same type |
|
| 414 |
+# (for instance a group of public functions) to be put as a subgroup of that |
|
| 415 |
+# type (e.g. under the Public Functions section). Set it to NO to prevent |
|
| 416 |
+# subgrouping. Alternatively, this can be done per class using the |
|
| 417 |
+# \nosubgrouping command. |
|
| 418 |
+# The default value is: YES. |
|
| 419 |
+ |
|
| 420 |
+SUBGROUPING = YES |
|
| 421 |
+ |
|
| 422 |
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions |
|
| 423 |
+# are shown inside the group in which they are included (e.g. using \ingroup) |
|
| 424 |
+# instead of on a separate page (for HTML and Man pages) or section (for LaTeX |
|
| 425 |
+# and RTF). |
|
| 426 |
+# |
|
| 427 |
+# Note that this feature does not work in combination with |
|
| 428 |
+# SEPARATE_MEMBER_PAGES. |
|
| 429 |
+# The default value is: NO. |
|
| 430 |
+ |
|
| 431 |
+INLINE_GROUPED_CLASSES = NO |
|
| 432 |
+ |
|
| 433 |
+# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions |
|
| 434 |
+# with only public data fields or simple typedef fields will be shown inline in |
|
| 435 |
+# the documentation of the scope in which they are defined (i.e. file, |
|
| 436 |
+# namespace, or group documentation), provided this scope is documented. If set |
|
| 437 |
+# to NO, structs, classes, and unions are shown on a separate page (for HTML and |
|
| 438 |
+# Man pages) or section (for LaTeX and RTF). |
|
| 439 |
+# The default value is: NO. |
|
| 440 |
+ |
|
| 441 |
+INLINE_SIMPLE_STRUCTS = NO |
|
| 442 |
+ |
|
| 443 |
+# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or |
|
| 444 |
+# enum is documented as struct, union, or enum with the name of the typedef. So |
|
| 445 |
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
|
|
| 446 |
+# with name TypeT. When disabled the typedef will appear as a member of a file, |
|
| 447 |
+# namespace, or class. And the struct will be named TypeS. This can typically be |
|
| 448 |
+# useful for C code in case the coding convention dictates that all compound |
|
| 449 |
+# types are typedef'ed and only the typedef is referenced, never the tag name. |
|
| 450 |
+# The default value is: NO. |
|
| 451 |
+ |
|
| 452 |
+TYPEDEF_HIDES_STRUCT = NO |
|
| 453 |
+ |
|
| 454 |
+# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This |
|
| 455 |
+# cache is used to resolve symbols given their name and scope. Since this can be |
|
| 456 |
+# an expensive process and often the same symbol appears multiple times in the |
|
| 457 |
+# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small |
|
| 458 |
+# doxygen will become slower. If the cache is too large, memory is wasted. The |
|
| 459 |
+# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range |
|
| 460 |
+# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 |
|
| 461 |
+# symbols. At the end of a run doxygen will report the cache usage and suggest |
|
| 462 |
+# the optimal cache size from a speed point of view. |
|
| 463 |
+# Minimum value: 0, maximum value: 9, default value: 0. |
|
| 464 |
+ |
|
| 465 |
+LOOKUP_CACHE_SIZE = 0 |
|
| 466 |
+ |
|
| 467 |
+# The NUM_PROC_THREADS specifies the number of threads doxygen is allowed to use |
|
| 468 |
+# during processing. When set to 0 doxygen will based this on the number of |
|
| 469 |
+# cores available in the system. You can set it explicitly to a value larger |
|
| 470 |
+# than 0 to get more control over the balance between CPU load and processing |
|
| 471 |
+# speed. At this moment only the input processing can be done using multiple |
|
| 472 |
+# threads. Since this is still an experimental feature the default is set to 1, |
|
| 473 |
+# which effectively disables parallel processing. Please report any issues you |
|
| 474 |
+# encounter. Generating dot graphs in parallel is controlled by the |
|
| 475 |
+# DOT_NUM_THREADS setting. |
|
| 476 |
+# Minimum value: 0, maximum value: 32, default value: 1. |
|
| 477 |
+ |
|
| 478 |
+NUM_PROC_THREADS = 1 |
|
| 479 |
+ |
|
| 480 |
+#--------------------------------------------------------------------------- |
|
| 481 |
+# Build related configuration options |
|
| 482 |
+#--------------------------------------------------------------------------- |
|
| 483 |
+ |
|
| 484 |
+# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in |
|
| 485 |
+# documentation are documented, even if no documentation was available. Private |
|
| 486 |
+# class members and static file members will be hidden unless the |
|
| 487 |
+# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. |
|
| 488 |
+# Note: This will also disable the warnings about undocumented members that are |
|
| 489 |
+# normally produced when WARNINGS is set to YES. |
|
| 490 |
+# The default value is: NO. |
|
| 491 |
+ |
|
| 492 |
+EXTRACT_ALL = YES |
|
| 493 |
+ |
|
| 494 |
+# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will |
|
| 495 |
+# be included in the documentation. |
|
| 496 |
+# The default value is: NO. |
|
| 497 |
+ |
|
| 498 |
+EXTRACT_PRIVATE = YES |
|
| 499 |
+ |
|
| 500 |
+# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual |
|
| 501 |
+# methods of a class will be included in the documentation. |
|
| 502 |
+# The default value is: NO. |
|
| 503 |
+ |
|
| 504 |
+EXTRACT_PRIV_VIRTUAL = NO |
|
| 505 |
+ |
|
| 506 |
+# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal |
|
| 507 |
+# scope will be included in the documentation. |
|
| 508 |
+# The default value is: NO. |
|
| 509 |
+ |
|
| 510 |
+EXTRACT_PACKAGE = NO |
|
| 511 |
+ |
|
| 512 |
+# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be |
|
| 513 |
+# included in the documentation. |
|
| 514 |
+# The default value is: NO. |
|
| 515 |
+ |
|
| 516 |
+EXTRACT_STATIC = YES |
|
| 517 |
+ |
|
| 518 |
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined |
|
| 519 |
+# locally in source files will be included in the documentation. If set to NO, |
|
| 520 |
+# only classes defined in header files are included. Does not have any effect |
|
| 521 |
+# for Java sources. |
|
| 522 |
+# The default value is: YES. |
|
| 523 |
+ |
|
| 524 |
+EXTRACT_LOCAL_CLASSES = YES |
|
| 525 |
+ |
|
| 526 |
+# This flag is only useful for Objective-C code. If set to YES, local methods, |
|
| 527 |
+# which are defined in the implementation section but not in the interface are |
|
| 528 |
+# included in the documentation. If set to NO, only methods in the interface are |
|
| 529 |
+# included. |
|
| 530 |
+# The default value is: NO. |
|
| 531 |
+ |
|
| 532 |
+EXTRACT_LOCAL_METHODS = NO |
|
| 533 |
+ |
|
| 534 |
+# If this flag is set to YES, the members of anonymous namespaces will be |
|
| 535 |
+# extracted and appear in the documentation as a namespace called |
|
| 536 |
+# 'anonymous_namespace{file}', where file will be replaced with the base name of
|
|
| 537 |
+# the file that contains the anonymous namespace. By default anonymous namespace |
|
| 538 |
+# are hidden. |
|
| 539 |
+# The default value is: NO. |
|
| 540 |
+ |
|
| 541 |
+EXTRACT_ANON_NSPACES = YES |
|
| 542 |
+ |
|
| 543 |
+# If this flag is set to YES, the name of an unnamed parameter in a declaration |
|
| 544 |
+# will be determined by the corresponding definition. By default unnamed |
|
| 545 |
+# parameters remain unnamed in the output. |
|
| 546 |
+# The default value is: YES. |
|
| 547 |
+ |
|
| 548 |
+RESOLVE_UNNAMED_PARAMS = YES |
|
| 549 |
+ |
|
| 550 |
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all |
|
| 551 |
+# undocumented members inside documented classes or files. If set to NO these |
|
| 552 |
+# members will be included in the various overviews, but no documentation |
|
| 553 |
+# section is generated. This option has no effect if EXTRACT_ALL is enabled. |
|
| 554 |
+# The default value is: NO. |
|
| 555 |
+ |
|
| 556 |
+HIDE_UNDOC_MEMBERS = NO |
|
| 557 |
+ |
|
| 558 |
+# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all |
|
| 559 |
+# undocumented classes that are normally visible in the class hierarchy. If set |
|
| 560 |
+# to NO, these classes will be included in the various overviews. This option |
|
| 561 |
+# has no effect if EXTRACT_ALL is enabled. |
|
| 562 |
+# The default value is: NO. |
|
| 563 |
+ |
|
| 564 |
+HIDE_UNDOC_CLASSES = NO |
|
| 565 |
+ |
|
| 566 |
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend |
|
| 567 |
+# declarations. If set to NO, these declarations will be included in the |
|
| 568 |
+# documentation. |
|
| 569 |
+# The default value is: NO. |
|
| 570 |
+ |
|
| 571 |
+HIDE_FRIEND_COMPOUNDS = NO |
|
| 572 |
+ |
|
| 573 |
+# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any |
|
| 574 |
+# documentation blocks found inside the body of a function. If set to NO, these |
|
| 575 |
+# blocks will be appended to the function's detailed documentation block. |
|
| 576 |
+# The default value is: NO. |
|
| 577 |
+ |
|
| 578 |
+HIDE_IN_BODY_DOCS = NO |
|
| 579 |
+ |
|
| 580 |
+# The INTERNAL_DOCS tag determines if documentation that is typed after a |
|
| 581 |
+# \internal command is included. If the tag is set to NO then the documentation |
|
| 582 |
+# will be excluded. Set it to YES to include the internal documentation. |
|
| 583 |
+# The default value is: NO. |
|
| 584 |
+ |
|
| 585 |
+INTERNAL_DOCS = NO |
|
| 586 |
+ |
|
| 587 |
+# With the correct setting of option CASE_SENSE_NAMES doxygen will better be |
|
| 588 |
+# able to match the capabilities of the underlying filesystem. In case the |
|
| 589 |
+# filesystem is case sensitive (i.e. it supports files in the same directory |
|
| 590 |
+# whose names only differ in casing), the option must be set to YES to properly |
|
| 591 |
+# deal with such files in case they appear in the input. For filesystems that |
|
| 592 |
+# are not case sensitive the option should be set to NO to properly deal with |
|
| 593 |
+# output files written for symbols that only differ in casing, such as for two |
|
| 594 |
+# classes, one named CLASS and the other named Class, and to also support |
|
| 595 |
+# references to files without having to specify the exact matching casing. On |
|
| 596 |
+# Windows (including Cygwin) and MacOS, users should typically set this option |
|
| 597 |
+# to NO, whereas on Linux or other Unix flavors it should typically be set to |
|
| 598 |
+# YES. |
|
| 599 |
+# Possible values are: SYSTEM, NO and YES. |
|
| 600 |
+# The default value is: SYSTEM. |
|
| 601 |
+ |
|
| 602 |
+CASE_SENSE_NAMES = NO |
|
| 603 |
+ |
|
| 604 |
+# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with |
|
| 605 |
+# their full class and namespace scopes in the documentation. If set to YES, the |
|
| 606 |
+# scope will be hidden. |
|
| 607 |
+# The default value is: NO. |
|
| 608 |
+ |
|
| 609 |
+HIDE_SCOPE_NAMES = NO |
|
| 610 |
+ |
|
| 611 |
+# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will |
|
| 612 |
+# append additional text to a page's title, such as Class Reference. If set to |
|
| 613 |
+# YES the compound reference will be hidden. |
|
| 614 |
+# The default value is: NO. |
|
| 615 |
+ |
|
| 616 |
+HIDE_COMPOUND_REFERENCE= NO |
|
| 617 |
+ |
|
| 618 |
+# If the SHOW_HEADERFILE tag is set to YES then the documentation for a class |
|
| 619 |
+# will show which file needs to be included to use the class. |
|
| 620 |
+# The default value is: YES. |
|
| 621 |
+ |
|
| 622 |
+SHOW_HEADERFILE = YES |
|
| 623 |
+ |
|
| 624 |
+# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of |
|
| 625 |
+# the files that are included by a file in the documentation of that file. |
|
| 626 |
+# The default value is: YES. |
|
| 627 |
+ |
|
| 628 |
+SHOW_INCLUDE_FILES = YES |
|
| 629 |
+ |
|
| 630 |
+# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each |
|
| 631 |
+# grouped member an include statement to the documentation, telling the reader |
|
| 632 |
+# which file to include in order to use the member. |
|
| 633 |
+# The default value is: NO. |
|
| 634 |
+ |
|
| 635 |
+SHOW_GROUPED_MEMB_INC = YES |
|
| 636 |
+ |
|
| 637 |
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include |
|
| 638 |
+# files with double quotes in the documentation rather than with sharp brackets. |
|
| 639 |
+# The default value is: NO. |
|
| 640 |
+ |
|
| 641 |
+FORCE_LOCAL_INCLUDES = NO |
|
| 642 |
+ |
|
| 643 |
+# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the |
|
| 644 |
+# documentation for inline members. |
|
| 645 |
+# The default value is: YES. |
|
| 646 |
+ |
|
| 647 |
+INLINE_INFO = YES |
|
| 648 |
+ |
|
| 649 |
+# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the |
|
| 650 |
+# (detailed) documentation of file and class members alphabetically by member |
|
| 651 |
+# name. If set to NO, the members will appear in declaration order. |
|
| 652 |
+# The default value is: YES. |
|
| 653 |
+ |
|
| 654 |
+SORT_MEMBER_DOCS = YES |
|
| 655 |
+ |
|
| 656 |
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief |
|
| 657 |
+# descriptions of file, namespace and class members alphabetically by member |
|
| 658 |
+# name. If set to NO, the members will appear in declaration order. Note that |
|
| 659 |
+# this will also influence the order of the classes in the class list. |
|
| 660 |
+# The default value is: NO. |
|
| 661 |
+ |
|
| 662 |
+SORT_BRIEF_DOCS = NO |
|
| 663 |
+ |
|
| 664 |
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the |
|
| 665 |
+# (brief and detailed) documentation of class members so that constructors and |
|
| 666 |
+# destructors are listed first. If set to NO the constructors will appear in the |
|
| 667 |
+# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. |
|
| 668 |
+# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief |
|
| 669 |
+# member documentation. |
|
| 670 |
+# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting |
|
| 671 |
+# detailed member documentation. |
|
| 672 |
+# The default value is: NO. |
|
| 673 |
+ |
|
| 674 |
+SORT_MEMBERS_CTORS_1ST = NO |
|
| 675 |
+ |
|
| 676 |
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy |
|
| 677 |
+# of group names into alphabetical order. If set to NO the group names will |
|
| 678 |
+# appear in their defined order. |
|
| 679 |
+# The default value is: NO. |
|
| 680 |
+ |
|
| 681 |
+SORT_GROUP_NAMES = NO |
|
| 682 |
+ |
|
| 683 |
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by |
|
| 684 |
+# fully-qualified names, including namespaces. If set to NO, the class list will |
|
| 685 |
+# be sorted only by class name, not including the namespace part. |
|
| 686 |
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. |
|
| 687 |
+# Note: This option applies only to the class list, not to the alphabetical |
|
| 688 |
+# list. |
|
| 689 |
+# The default value is: NO. |
|
| 690 |
+ |
|
| 691 |
+SORT_BY_SCOPE_NAME = NO |
|
| 692 |
+ |
|
| 693 |
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper |
|
| 694 |
+# type resolution of all parameters of a function it will reject a match between |
|
| 695 |
+# the prototype and the implementation of a member function even if there is |
|
| 696 |
+# only one candidate or it is obvious which candidate to choose by doing a |
|
| 697 |
+# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still |
|
| 698 |
+# accept a match between prototype and implementation in such cases. |
|
| 699 |
+# The default value is: NO. |
|
| 700 |
+ |
|
| 701 |
+STRICT_PROTO_MATCHING = NO |
|
| 702 |
+ |
|
| 703 |
+# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo |
|
| 704 |
+# list. This list is created by putting \todo commands in the documentation. |
|
| 705 |
+# The default value is: YES. |
|
| 706 |
+ |
|
| 707 |
+GENERATE_TODOLIST = YES |
|
| 708 |
+ |
|
| 709 |
+# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test |
|
| 710 |
+# list. This list is created by putting \test commands in the documentation. |
|
| 711 |
+# The default value is: YES. |
|
| 712 |
+ |
|
| 713 |
+GENERATE_TESTLIST = YES |
|
| 714 |
+ |
|
| 715 |
+# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug |
|
| 716 |
+# list. This list is created by putting \bug commands in the documentation. |
|
| 717 |
+# The default value is: YES. |
|
| 718 |
+ |
|
| 719 |
+GENERATE_BUGLIST = YES |
|
| 720 |
+ |
|
| 721 |
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) |
|
| 722 |
+# the deprecated list. This list is created by putting \deprecated commands in |
|
| 723 |
+# the documentation. |
|
| 724 |
+# The default value is: YES. |
|
| 725 |
+ |
|
| 726 |
+GENERATE_DEPRECATEDLIST= YES |
|
| 727 |
+ |
|
| 728 |
+# The ENABLED_SECTIONS tag can be used to enable conditional documentation |
|
| 729 |
+# sections, marked by \if <section_label> ... \endif and \cond <section_label> |
|
| 730 |
+# ... \endcond blocks. |
|
| 731 |
+ |
|
| 732 |
+ENABLED_SECTIONS = |
|
| 733 |
+ |
|
| 734 |
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the |
|
| 735 |
+# initial value of a variable or macro / define can have for it to appear in the |
|
| 736 |
+# documentation. If the initializer consists of more lines than specified here |
|
| 737 |
+# it will be hidden. Use a value of 0 to hide initializers completely. The |
|
| 738 |
+# appearance of the value of individual variables and macros / defines can be |
|
| 739 |
+# controlled using \showinitializer or \hideinitializer command in the |
|
| 740 |
+# documentation regardless of this setting. |
|
| 741 |
+# Minimum value: 0, maximum value: 10000, default value: 30. |
|
| 742 |
+ |
|
| 743 |
+MAX_INITIALIZER_LINES = 30 |
|
| 744 |
+ |
|
| 745 |
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at |
|
| 746 |
+# the bottom of the documentation of classes and structs. If set to YES, the |
|
| 747 |
+# list will mention the files that were used to generate the documentation. |
|
| 748 |
+# The default value is: YES. |
|
| 749 |
+ |
|
| 750 |
+SHOW_USED_FILES = YES |
|
| 751 |
+ |
|
| 752 |
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This |
|
| 753 |
+# will remove the Files entry from the Quick Index and from the Folder Tree View |
|
| 754 |
+# (if specified). |
|
| 755 |
+# The default value is: YES. |
|
| 756 |
+ |
|
| 757 |
+SHOW_FILES = YES |
|
| 758 |
+ |
|
| 759 |
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces |
|
| 760 |
+# page. This will remove the Namespaces entry from the Quick Index and from the |
|
| 761 |
+# Folder Tree View (if specified). |
|
| 762 |
+# The default value is: YES. |
|
| 763 |
+ |
|
| 764 |
+SHOW_NAMESPACES = YES |
|
| 765 |
+ |
|
| 766 |
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that |
|
| 767 |
+# doxygen should invoke to get the current version for each file (typically from |
|
| 768 |
+# the version control system). Doxygen will invoke the program by executing (via |
|
| 769 |
+# popen()) the command command input-file, where command is the value of the |
|
| 770 |
+# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided |
|
| 771 |
+# by doxygen. Whatever the program writes to standard output is used as the file |
|
| 772 |
+# version. For an example see the documentation. |
|
| 773 |
+ |
|
| 774 |
+FILE_VERSION_FILTER = |
|
| 775 |
+ |
|
| 776 |
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed |
|
| 777 |
+# by doxygen. The layout file controls the global structure of the generated |
|
| 778 |
+# output files in an output format independent way. To create the layout file |
|
| 779 |
+# that represents doxygen's defaults, run doxygen with the -l option. You can |
|
| 780 |
+# optionally specify a file name after the option, if omitted DoxygenLayout.xml |
|
| 781 |
+# will be used as the name of the layout file. See also section "Changing the |
|
| 782 |
+# layout of pages" for information. |
|
| 783 |
+# |
|
| 784 |
+# Note that if you run doxygen from a directory containing a file called |
|
| 785 |
+# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE |
|
| 786 |
+# tag is left empty. |
|
| 787 |
+ |
|
| 788 |
+LAYOUT_FILE = |
|
| 789 |
+ |
|
| 790 |
+# The CITE_BIB_FILES tag can be used to specify one or more bib files containing |
|
| 791 |
+# the reference definitions. This must be a list of .bib files. The .bib |
|
| 792 |
+# extension is automatically appended if omitted. This requires the bibtex tool |
|
| 793 |
+# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. |
|
| 794 |
+# For LaTeX the style of the bibliography can be controlled using |
|
| 795 |
+# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the |
|
| 796 |
+# search path. See also \cite for info how to create references. |
|
| 797 |
+ |
|
| 798 |
+CITE_BIB_FILES = |
|
| 799 |
+ |
|
| 800 |
+#--------------------------------------------------------------------------- |
|
| 801 |
+# Configuration options related to warning and progress messages |
|
| 802 |
+#--------------------------------------------------------------------------- |
|
| 803 |
+ |
|
| 804 |
+# The QUIET tag can be used to turn on/off the messages that are generated to |
|
| 805 |
+# standard output by doxygen. If QUIET is set to YES this implies that the |
|
| 806 |
+# messages are off. |
|
| 807 |
+# The default value is: NO. |
|
| 808 |
+ |
|
| 809 |
+QUIET = NO |
|
| 810 |
+ |
|
| 811 |
+# The WARNINGS tag can be used to turn on/off the warning messages that are |
|
| 812 |
+# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES |
|
| 813 |
+# this implies that the warnings are on. |
|
| 814 |
+# |
|
| 815 |
+# Tip: Turn warnings on while writing the documentation. |
|
| 816 |
+# The default value is: YES. |
|
| 817 |
+ |
|
| 818 |
+WARNINGS = YES |
|
| 819 |
+ |
|
| 820 |
+# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate |
|
| 821 |
+# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag |
|
| 822 |
+# will automatically be disabled. |
|
| 823 |
+# The default value is: YES. |
|
| 824 |
+ |
|
| 825 |
+WARN_IF_UNDOCUMENTED = YES |
|
| 826 |
+ |
|
| 827 |
+# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for |
|
| 828 |
+# potential errors in the documentation, such as documenting some parameters in |
|
| 829 |
+# a documented function twice, or documenting parameters that don't exist or |
|
| 830 |
+# using markup commands wrongly. |
|
| 831 |
+# The default value is: YES. |
|
| 832 |
+ |
|
| 833 |
+WARN_IF_DOC_ERROR = YES |
|
| 834 |
+ |
|
| 835 |
+# If WARN_IF_INCOMPLETE_DOC is set to YES, doxygen will warn about incomplete |
|
| 836 |
+# function parameter documentation. If set to NO, doxygen will accept that some |
|
| 837 |
+# parameters have no documentation without warning. |
|
| 838 |
+# The default value is: YES. |
|
| 839 |
+ |
|
| 840 |
+WARN_IF_INCOMPLETE_DOC = YES |
|
| 841 |
+ |
|
| 842 |
+# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that |
|
| 843 |
+# are documented, but have no documentation for their parameters or return |
|
| 844 |
+# value. If set to NO, doxygen will only warn about wrong parameter |
|
| 845 |
+# documentation, but not about the absence of documentation. If EXTRACT_ALL is |
|
| 846 |
+# set to YES then this flag will automatically be disabled. See also |
|
| 847 |
+# WARN_IF_INCOMPLETE_DOC |
|
| 848 |
+# The default value is: NO. |
|
| 849 |
+ |
|
| 850 |
+WARN_NO_PARAMDOC = YES |
|
| 851 |
+ |
|
| 852 |
+# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when |
|
| 853 |
+# a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS |
|
| 854 |
+# then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but |
|
| 855 |
+# at the end of the doxygen process doxygen will return with a non-zero status. |
|
| 856 |
+# Possible values are: NO, YES and FAIL_ON_WARNINGS. |
|
| 857 |
+# The default value is: NO. |
|
| 858 |
+ |
|
| 859 |
+WARN_AS_ERROR = YES |
|
| 860 |
+ |
|
| 861 |
+# The WARN_FORMAT tag determines the format of the warning messages that doxygen |
|
| 862 |
+# can produce. The string should contain the $file, $line, and $text tags, which |
|
| 863 |
+# will be replaced by the file and line number from which the warning originated |
|
| 864 |
+# and the warning text. Optionally the format may contain $version, which will |
|
| 865 |
+# be replaced by the version of the file (if it could be obtained via |
|
| 866 |
+# FILE_VERSION_FILTER) |
|
| 867 |
+# See also: WARN_LINE_FORMAT |
|
| 868 |
+# The default value is: $file:$line: $text. |
|
| 869 |
+ |
|
| 870 |
+WARN_FORMAT = "$file:$line: $text" |
|
| 871 |
+ |
|
| 872 |
+# In the $text part of the WARN_FORMAT command it is possible that a reference |
|
| 873 |
+# to a more specific place is given. To make it easier to jump to this place |
|
| 874 |
+# (outside of doxygen) the user can define a custom "cut" / "paste" string. |
|
| 875 |
+# Example: |
|
| 876 |
+# WARN_LINE_FORMAT = "'vi $file +$line'" |
|
| 877 |
+# See also: WARN_FORMAT |
|
| 878 |
+# The default value is: at line $line of file $file. |
|
| 879 |
+ |
|
| 880 |
+WARN_LINE_FORMAT = "at line $line of file $file" |
|
| 881 |
+ |
|
| 882 |
+# The WARN_LOGFILE tag can be used to specify a file to which warning and error |
|
| 883 |
+# messages should be written. If left blank the output is written to standard |
|
| 884 |
+# error (stderr). In case the file specified cannot be opened for writing the |
|
| 885 |
+# warning and error messages are written to standard error. When as file - is |
|
| 886 |
+# specified the warning and error messages are written to standard output |
|
| 887 |
+# (stdout). |
|
| 888 |
+ |
|
| 889 |
+WARN_LOGFILE = warnings.log |
|
| 890 |
+ |
|
| 891 |
+#--------------------------------------------------------------------------- |
|
| 892 |
+# Configuration options related to the input files |
|
| 893 |
+#--------------------------------------------------------------------------- |
|
| 894 |
+ |
|
| 895 |
+# The INPUT tag is used to specify the files and/or directories that contain |
|
| 896 |
+# documented source files. You may enter file names like myfile.cpp or |
|
| 897 |
+# directories like /usr/src/myproject. Separate the files or directories with |
|
| 898 |
+# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING |
|
| 899 |
+# Note: If this tag is empty the current directory is searched. |
|
| 900 |
+ |
|
| 901 |
+INPUT = ../src |
|
| 902 |
+ |
|
| 903 |
+# This tag can be used to specify the character encoding of the source files |
|
| 904 |
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses |
|
| 905 |
+# libiconv (or the iconv built into libc) for the transcoding. See the libiconv |
|
| 906 |
+# documentation (see: |
|
| 907 |
+# https://www.gnu.org/software/libiconv/) for the list of possible encodings. |
|
| 908 |
+# See also: INPUT_FILE_ENCODING |
|
| 909 |
+# The default value is: UTF-8. |
|
| 910 |
+ |
|
| 911 |
+INPUT_ENCODING = UTF-8 |
|
| 912 |
+ |
|
| 913 |
+# This tag can be used to specify the character encoding of the source files |
|
| 914 |
+# that doxygen parses The INPUT_FILE_ENCODING tag can be used to specify |
|
| 915 |
+# character encoding on a per file pattern basis. Doxygen will compare the file |
|
| 916 |
+# name with each pattern and apply the encoding instead of the default |
|
| 917 |
+# INPUT_ENCODING) if there is a match. The character encodings are a list of the |
|
| 918 |
+# form: pattern=encoding (like *.php=ISO-8859-1). See cfg_input_encoding |
|
| 919 |
+# "INPUT_ENCODING" for further information on supported encodings. |
|
| 920 |
+ |
|
| 921 |
+INPUT_FILE_ENCODING = |
|
| 922 |
+ |
|
| 923 |
+# If the value of the INPUT tag contains directories, you can use the |
|
| 924 |
+# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and |
|
| 925 |
+# *.h) to filter out the source-files in the directories. |
|
| 926 |
+# |
|
| 927 |
+# Note that for custom extensions or not directly supported extensions you also |
|
| 928 |
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not |
|
| 929 |
+# read by doxygen. |
|
| 930 |
+# |
|
| 931 |
+# Note the list of default checked file patterns might differ from the list of |
|
| 932 |
+# default file extension mappings. |
|
| 933 |
+# |
|
| 934 |
+# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, |
|
| 935 |
+# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, |
|
| 936 |
+# *.hh, *.hxx, *.hpp, *.h++, *.l, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, |
|
| 937 |
+# *.inc, *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C |
|
| 938 |
+# comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd, |
|
| 939 |
+# *.vhdl, *.ucf, *.qsf and *.ice. |
|
| 940 |
+ |
|
| 941 |
+FILE_PATTERNS = *.h \ |
|
| 942 |
+ *.c |
|
| 943 |
+ |
|
| 944 |
+# The RECURSIVE tag can be used to specify whether or not subdirectories should |
|
| 945 |
+# be searched for input files as well. |
|
| 946 |
+# The default value is: NO. |
|
| 947 |
+ |
|
| 948 |
+RECURSIVE = NO |
|
| 949 |
+ |
|
| 950 |
+# The EXCLUDE tag can be used to specify files and/or directories that should be |
|
| 951 |
+# excluded from the INPUT source files. This way you can easily exclude a |
|
| 952 |
+# subdirectory from a directory tree whose root is specified with the INPUT tag. |
|
| 953 |
+# |
|
| 954 |
+# Note that relative paths are relative to the directory from which doxygen is |
|
| 955 |
+# run. |
|
| 956 |
+ |
|
| 957 |
+EXCLUDE = |
|
| 958 |
+ |
|
| 959 |
+# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or |
|
| 960 |
+# directories that are symbolic links (a Unix file system feature) are excluded |
|
| 961 |
+# from the input. |
|
| 962 |
+# The default value is: NO. |
|
| 963 |
+ |
|
| 964 |
+EXCLUDE_SYMLINKS = NO |
|
| 965 |
+ |
|
| 966 |
+# If the value of the INPUT tag contains directories, you can use the |
|
| 967 |
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude |
|
| 968 |
+# certain files from those directories. |
|
| 969 |
+# |
|
| 970 |
+# Note that the wildcards are matched against the file with absolute path, so to |
|
| 971 |
+# exclude all test directories for example use the pattern */test/* |
|
| 972 |
+ |
|
| 973 |
+EXCLUDE_PATTERNS = |
|
| 974 |
+ |
|
| 975 |
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names |
|
| 976 |
+# (namespaces, classes, functions, etc.) that should be excluded from the |
|
| 977 |
+# output. The symbol name can be a fully qualified name, a word, or if the |
|
| 978 |
+# wildcard * is used, a substring. Examples: ANamespace, AClass, |
|
| 979 |
+# ANamespace::AClass, ANamespace::*Test |
|
| 980 |
+# |
|
| 981 |
+# Note that the wildcards are matched against the file with absolute path, so to |
|
| 982 |
+# exclude all test directories use the pattern */test/* |
|
| 983 |
+ |
|
| 984 |
+EXCLUDE_SYMBOLS = |
|
| 985 |
+ |
|
| 986 |
+# The EXAMPLE_PATH tag can be used to specify one or more files or directories |
|
| 987 |
+# that contain example code fragments that are included (see the \include |
|
| 988 |
+# command). |
|
| 989 |
+ |
|
| 990 |
+EXAMPLE_PATH = |
|
| 991 |
+ |
|
| 992 |
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the |
|
| 993 |
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and |
|
| 994 |
+# *.h) to filter out the source-files in the directories. If left blank all |
|
| 995 |
+# files are included. |
|
| 996 |
+ |
|
| 997 |
+EXAMPLE_PATTERNS = |
|
| 998 |
+ |
|
| 999 |
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be |
|
| 1000 |
+# searched for input files to be used with the \include or \dontinclude commands |
|
| 1001 |
+# irrespective of the value of the RECURSIVE tag. |
|
| 1002 |
+# The default value is: NO. |
|
| 1003 |
+ |
|
| 1004 |
+EXAMPLE_RECURSIVE = NO |
|
| 1005 |
+ |
|
| 1006 |
+# The IMAGE_PATH tag can be used to specify one or more files or directories |
|
| 1007 |
+# that contain images that are to be included in the documentation (see the |
|
| 1008 |
+# \image command). |
|
| 1009 |
+ |
|
| 1010 |
+IMAGE_PATH = |
|
| 1011 |
+ |
|
| 1012 |
+# The INPUT_FILTER tag can be used to specify a program that doxygen should |
|
| 1013 |
+# invoke to filter for each input file. Doxygen will invoke the filter program |
|
| 1014 |
+# by executing (via popen()) the command: |
|
| 1015 |
+# |
|
| 1016 |
+# <filter> <input-file> |
|
| 1017 |
+# |
|
| 1018 |
+# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the |
|
| 1019 |
+# name of an input file. Doxygen will then use the output that the filter |
|
| 1020 |
+# program writes to standard output. If FILTER_PATTERNS is specified, this tag |
|
| 1021 |
+# will be ignored. |
|
| 1022 |
+# |
|
| 1023 |
+# Note that the filter must not add or remove lines; it is applied before the |
|
| 1024 |
+# code is scanned, but not when the output code is generated. If lines are added |
|
| 1025 |
+# or removed, the anchors will not be placed correctly. |
|
| 1026 |
+# |
|
| 1027 |
+# Note that doxygen will use the data processed and written to standard output |
|
| 1028 |
+# for further processing, therefore nothing else, like debug statements or used |
|
| 1029 |
+# commands (so in case of a Windows batch file always use @echo OFF), should be |
|
| 1030 |
+# written to standard output. |
|
| 1031 |
+# |
|
| 1032 |
+# Note that for custom extensions or not directly supported extensions you also |
|
| 1033 |
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not |
|
| 1034 |
+# properly processed by doxygen. |
|
| 1035 |
+ |
|
| 1036 |
+INPUT_FILTER = |
|
| 1037 |
+ |
|
| 1038 |
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern |
|
| 1039 |
+# basis. Doxygen will compare the file name with each pattern and apply the |
|
| 1040 |
+# filter if there is a match. The filters are a list of the form: pattern=filter |
|
| 1041 |
+# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how |
|
| 1042 |
+# filters are used. If the FILTER_PATTERNS tag is empty or if none of the |
|
| 1043 |
+# patterns match the file name, INPUT_FILTER is applied. |
|
| 1044 |
+# |
|
| 1045 |
+# Note that for custom extensions or not directly supported extensions you also |
|
| 1046 |
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not |
|
| 1047 |
+# properly processed by doxygen. |
|
| 1048 |
+ |
|
| 1049 |
+FILTER_PATTERNS = |
|
| 1050 |
+ |
|
| 1051 |
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using |
|
| 1052 |
+# INPUT_FILTER) will also be used to filter the input files that are used for |
|
| 1053 |
+# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). |
|
| 1054 |
+# The default value is: NO. |
|
| 1055 |
+ |
|
| 1056 |
+FILTER_SOURCE_FILES = NO |
|
| 1057 |
+ |
|
| 1058 |
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file |
|
| 1059 |
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and |
|
| 1060 |
+# it is also possible to disable source filtering for a specific pattern using |
|
| 1061 |
+# *.ext= (so without naming a filter). |
|
| 1062 |
+# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. |
|
| 1063 |
+ |
|
| 1064 |
+FILTER_SOURCE_PATTERNS = |
|
| 1065 |
+ |
|
| 1066 |
+# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that |
|
| 1067 |
+# is part of the input, its contents will be placed on the main page |
|
| 1068 |
+# (index.html). This can be useful if you have a project on for instance GitHub |
|
| 1069 |
+# and want to reuse the introduction page also for the doxygen output. |
|
| 1070 |
+ |
|
| 1071 |
+USE_MDFILE_AS_MAINPAGE = |
|
| 1072 |
+ |
|
| 1073 |
+# The Fortran standard specifies that for fixed formatted Fortran code all |
|
| 1074 |
+# characters from position 72 are to be considered as comment. A common |
|
| 1075 |
+# extension is to allow longer lines before the automatic comment starts. The |
|
| 1076 |
+# setting FORTRAN_COMMENT_AFTER will also make it possible that longer lines can |
|
| 1077 |
+# be processed before the automatic comment starts. |
|
| 1078 |
+# Minimum value: 7, maximum value: 10000, default value: 72. |
|
| 1079 |
+ |
|
| 1080 |
+FORTRAN_COMMENT_AFTER = 72 |
|
| 1081 |
+ |
|
| 1082 |
+#--------------------------------------------------------------------------- |
|
| 1083 |
+# Configuration options related to source browsing |
|
| 1084 |
+#--------------------------------------------------------------------------- |
|
| 1085 |
+ |
|
| 1086 |
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will be |
|
| 1087 |
+# generated. Documented entities will be cross-referenced with these sources. |
|
| 1088 |
+# |
|
| 1089 |
+# Note: To get rid of all source code in the generated output, make sure that |
|
| 1090 |
+# also VERBATIM_HEADERS is set to NO. |
|
| 1091 |
+# The default value is: NO. |
|
| 1092 |
+ |
|
| 1093 |
+SOURCE_BROWSER = YES |
|
| 1094 |
+ |
|
| 1095 |
+# Setting the INLINE_SOURCES tag to YES will include the body of functions, |
|
| 1096 |
+# classes and enums directly into the documentation. |
|
| 1097 |
+# The default value is: NO. |
|
| 1098 |
+ |
|
| 1099 |
+INLINE_SOURCES = YES |
|
| 1100 |
+ |
|
| 1101 |
+# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any |
|
| 1102 |
+# special comment blocks from generated source code fragments. Normal C, C++ and |
|
| 1103 |
+# Fortran comments will always remain visible. |
|
| 1104 |
+# The default value is: YES. |
|
| 1105 |
+ |
|
| 1106 |
+STRIP_CODE_COMMENTS = NO |
|
| 1107 |
+ |
|
| 1108 |
+# If the REFERENCED_BY_RELATION tag is set to YES then for each documented |
|
| 1109 |
+# entity all documented functions referencing it will be listed. |
|
| 1110 |
+# The default value is: NO. |
|
| 1111 |
+ |
|
| 1112 |
+REFERENCED_BY_RELATION = YES |
|
| 1113 |
+ |
|
| 1114 |
+# If the REFERENCES_RELATION tag is set to YES then for each documented function |
|
| 1115 |
+# all documented entities called/used by that function will be listed. |
|
| 1116 |
+# The default value is: NO. |
|
| 1117 |
+ |
|
| 1118 |
+REFERENCES_RELATION = YES |
|
| 1119 |
+ |
|
| 1120 |
+# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set |
|
| 1121 |
+# to YES then the hyperlinks from functions in REFERENCES_RELATION and |
|
| 1122 |
+# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will |
|
| 1123 |
+# link to the documentation. |
|
| 1124 |
+# The default value is: YES. |
|
| 1125 |
+ |
|
| 1126 |
+REFERENCES_LINK_SOURCE = YES |
|
| 1127 |
+ |
|
| 1128 |
+# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the |
|
| 1129 |
+# source code will show a tooltip with additional information such as prototype, |
|
| 1130 |
+# brief description and links to the definition and documentation. Since this |
|
| 1131 |
+# will make the HTML file larger and loading of large files a bit slower, you |
|
| 1132 |
+# can opt to disable this feature. |
|
| 1133 |
+# The default value is: YES. |
|
| 1134 |
+# This tag requires that the tag SOURCE_BROWSER is set to YES. |
|
| 1135 |
+ |
|
| 1136 |
+SOURCE_TOOLTIPS = YES |
|
| 1137 |
+ |
|
| 1138 |
+# If the USE_HTAGS tag is set to YES then the references to source code will |
|
| 1139 |
+# point to the HTML generated by the htags(1) tool instead of doxygen built-in |
|
| 1140 |
+# source browser. The htags tool is part of GNU's global source tagging system |
|
| 1141 |
+# (see https://www.gnu.org/software/global/global.html). You will need version |
|
| 1142 |
+# 4.8.6 or higher. |
|
| 1143 |
+# |
|
| 1144 |
+# To use it do the following: |
|
| 1145 |
+# - Install the latest version of global |
|
| 1146 |
+# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file |
|
| 1147 |
+# - Make sure the INPUT points to the root of the source tree |
|
| 1148 |
+# - Run doxygen as normal |
|
| 1149 |
+# |
|
| 1150 |
+# Doxygen will invoke htags (and that will in turn invoke gtags), so these |
|
| 1151 |
+# tools must be available from the command line (i.e. in the search path). |
|
| 1152 |
+# |
|
| 1153 |
+# The result: instead of the source browser generated by doxygen, the links to |
|
| 1154 |
+# source code will now point to the output of htags. |
|
| 1155 |
+# The default value is: NO. |
|
| 1156 |
+# This tag requires that the tag SOURCE_BROWSER is set to YES. |
|
| 1157 |
+ |
|
| 1158 |
+USE_HTAGS = NO |
|
| 1159 |
+ |
|
| 1160 |
+# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a |
|
| 1161 |
+# verbatim copy of the header file for each class for which an include is |
|
| 1162 |
+# specified. Set to NO to disable this. |
|
| 1163 |
+# See also: Section \class. |
|
| 1164 |
+# The default value is: YES. |
|
| 1165 |
+ |
|
| 1166 |
+VERBATIM_HEADERS = YES |
|
| 1167 |
+ |
|
| 1168 |
+#--------------------------------------------------------------------------- |
|
| 1169 |
+# Configuration options related to the alphabetical class index |
|
| 1170 |
+#--------------------------------------------------------------------------- |
|
| 1171 |
+ |
|
| 1172 |
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all |
|
| 1173 |
+# compounds will be generated. Enable this if the project contains a lot of |
|
| 1174 |
+# classes, structs, unions or interfaces. |
|
| 1175 |
+# The default value is: YES. |
|
| 1176 |
+ |
|
| 1177 |
+ALPHABETICAL_INDEX = YES |
|
| 1178 |
+ |
|
| 1179 |
+# In case all classes in a project start with a common prefix, all classes will |
|
| 1180 |
+# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag |
|
| 1181 |
+# can be used to specify a prefix (or a list of prefixes) that should be ignored |
|
| 1182 |
+# while generating the index headers. |
|
| 1183 |
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. |
|
| 1184 |
+ |
|
| 1185 |
+IGNORE_PREFIX = |
|
| 1186 |
+ |
|
| 1187 |
+#--------------------------------------------------------------------------- |
|
| 1188 |
+# Configuration options related to the HTML output |
|
| 1189 |
+#--------------------------------------------------------------------------- |
|
| 1190 |
+ |
|
| 1191 |
+# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output |
|
| 1192 |
+# The default value is: YES. |
|
| 1193 |
+ |
|
| 1194 |
+GENERATE_HTML = YES |
|
| 1195 |
+ |
|
| 1196 |
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a |
|
| 1197 |
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of |
|
| 1198 |
+# it. |
|
| 1199 |
+# The default directory is: html. |
|
| 1200 |
+# This tag requires that the tag GENERATE_HTML is set to YES. |
|
| 1201 |
+ |
|
| 1202 |
+HTML_OUTPUT = |
|
| 1203 |
+ |
|
| 1204 |
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each |
|
| 1205 |
+# generated HTML page (for example: .htm, .php, .asp). |
|
| 1206 |
+# The default value is: .html. |
|
| 1207 |
+# This tag requires that the tag GENERATE_HTML is set to YES. |
|
| 1208 |
+ |
|
| 1209 |
+HTML_FILE_EXTENSION = .html |
|
| 1210 |
+ |
|
| 1211 |
+# The HTML_HEADER tag can be used to specify a user-defined HTML header file for |
|
| 1212 |
+# each generated HTML page. If the tag is left blank doxygen will generate a |
|
| 1213 |
+# standard header. |
|
| 1214 |
+# |
|
| 1215 |
+# To get valid HTML the header file that includes any scripts and style sheets |
|
| 1216 |
+# that doxygen needs, which is dependent on the configuration options used (e.g. |
|
| 1217 |
+# the setting GENERATE_TREEVIEW). It is highly recommended to start with a |
|
| 1218 |
+# default header using |
|
| 1219 |
+# doxygen -w html new_header.html new_footer.html new_stylesheet.css |
|
| 1220 |
+# YourConfigFile |
|
| 1221 |
+# and then modify the file new_header.html. See also section "Doxygen usage" |
|
| 1222 |
+# for information on how to generate the default header that doxygen normally |
|
| 1223 |
+# uses. |
|
| 1224 |
+# Note: The header is subject to change so you typically have to regenerate the |
|
| 1225 |
+# default header when upgrading to a newer version of doxygen. For a description |
|
| 1226 |
+# of the possible markers and block names see the documentation. |
|
| 1227 |
+# This tag requires that the tag GENERATE_HTML is set to YES. |
|
| 1228 |
+ |
|
| 1229 |
+HTML_HEADER = |
|
| 1230 |
+ |
|
| 1231 |
+# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each |
|
| 1232 |
+# generated HTML page. If the tag is left blank doxygen will generate a standard |
|
| 1233 |
+# footer. See HTML_HEADER for more information on how to generate a default |
|
| 1234 |
+# footer and what special commands can be used inside the footer. See also |
|
| 1235 |
+# section "Doxygen usage" for information on how to generate the default footer |
|
| 1236 |
+# that doxygen normally uses. |
|
| 1237 |
+# This tag requires that the tag GENERATE_HTML is set to YES. |
|
| 1238 |
+ |
|
| 1239 |
+HTML_FOOTER = |
|
| 1240 |
+ |
|
| 1241 |
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style |
|
| 1242 |
+# sheet that is used by each HTML page. It can be used to fine-tune the look of |
|
| 1243 |
+# the HTML output. If left blank doxygen will generate a default style sheet. |
|
| 1244 |
+# See also section "Doxygen usage" for information on how to generate the style |
|
| 1245 |
+# sheet that doxygen normally uses. |
|
| 1246 |
+# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as |
|
| 1247 |
+# it is more robust and this tag (HTML_STYLESHEET) will in the future become |
|
| 1248 |
+# obsolete. |
|
| 1249 |
+# This tag requires that the tag GENERATE_HTML is set to YES. |
|
| 1250 |
+ |
|
| 1251 |
+HTML_STYLESHEET = |
|
| 1252 |
+ |
|
| 1253 |
+# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined |
|
| 1254 |
+# cascading style sheets that are included after the standard style sheets |
|
| 1255 |
+# created by doxygen. Using this option one can overrule certain style aspects. |
|
| 1256 |
+# This is preferred over using HTML_STYLESHEET since it does not replace the |
|
| 1257 |
+# standard style sheet and is therefore more robust against future updates. |
|
| 1258 |
+# Doxygen will copy the style sheet files to the output directory. |
|
| 1259 |
+# Note: The order of the extra style sheet files is of importance (e.g. the last |
|
| 1260 |
+# style sheet in the list overrules the setting of the previous ones in the |
|
| 1261 |
+# list). For an example see the documentation. |
|
| 1262 |
+# This tag requires that the tag GENERATE_HTML is set to YES. |
|
| 1263 |
+ |
|
| 1264 |
+HTML_EXTRA_STYLESHEET = |
|
| 1265 |
+ |
|
| 1266 |
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or |
|
| 1267 |
+# other source files which should be copied to the HTML output directory. Note |
|
| 1268 |
+# that these files will be copied to the base HTML output directory. Use the |
|
| 1269 |
+# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these |
|
| 1270 |
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that the |
|
| 1271 |
+# files will be copied as-is; there are no commands or markers available. |
|
| 1272 |
+# This tag requires that the tag GENERATE_HTML is set to YES. |
|
| 1273 |
+ |
|
| 1274 |
+HTML_EXTRA_FILES = |
|
| 1275 |
+ |
|
| 1276 |
+# The HTML_COLORSTYLE tag can be used to specify if the generated HTML output |
|
| 1277 |
+# should be rendered with a dark or light theme. Default setting AUTO_LIGHT |
|
| 1278 |
+# enables light output unless the user preference is dark output. Other options |
|
| 1279 |
+# are DARK to always use dark mode, LIGHT to always use light mode, AUTO_DARK to |
|
| 1280 |
+# default to dark mode unless the user prefers light mode, and TOGGLE to let the |
|
| 1281 |
+# user toggle between dark and light mode via a button. |
|
| 1282 |
+# Possible values are: LIGHT Always generate light output., DARK Always generate |
|
| 1283 |
+# dark output., AUTO_LIGHT Automatically set the mode according to the user |
|
| 1284 |
+# preference, use light mode if no preference is set (the default)., AUTO_DARK |
|
| 1285 |
+# Automatically set the mode according to the user preference, use dark mode if |
|
| 1286 |
+# no preference is set. and TOGGLE Allow to user to switch between light and |
|
| 1287 |
+# dark mode via a button.. |
|
| 1288 |
+# The default value is: AUTO_LIGHT. |
|
| 1289 |
+# This tag requires that the tag GENERATE_HTML is set to YES. |
|
| 1290 |
+ |
|
| 1291 |
+HTML_COLORSTYLE = AUTO_LIGHT |
|
| 1292 |
+ |
|
| 1293 |
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen |
|
| 1294 |
+# will adjust the colors in the style sheet and background images according to |
|
| 1295 |
+# this color. Hue is specified as an angle on a color-wheel, see |
|
| 1296 |
+# https://en.wikipedia.org/wiki/Hue for more information. For instance the value |
|
| 1297 |
+# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 |
|
| 1298 |
+# purple, and 360 is red again. |
|
| 1299 |
+# Minimum value: 0, maximum value: 359, default value: 220. |
|
| 1300 |
+# This tag requires that the tag GENERATE_HTML is set to YES. |
|
| 1301 |
+ |
|
| 1302 |
+HTML_COLORSTYLE_HUE = 220 |
|
| 1303 |
+ |
|
| 1304 |
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors |
|
| 1305 |
+# in the HTML output. For a value of 0 the output will use gray-scales only. A |
|
| 1306 |
+# value of 255 will produce the most vivid colors. |
|
| 1307 |
+# Minimum value: 0, maximum value: 255, default value: 100. |
|
| 1308 |
+# This tag requires that the tag GENERATE_HTML is set to YES. |
|
| 1309 |
+ |
|
| 1310 |
+HTML_COLORSTYLE_SAT = 100 |
|
| 1311 |
+ |
|
| 1312 |
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the |
|
| 1313 |
+# luminance component of the colors in the HTML output. Values below 100 |
|
| 1314 |
+# gradually make the output lighter, whereas values above 100 make the output |
|
| 1315 |
+# darker. The value divided by 100 is the actual gamma applied, so 80 represents |
|
| 1316 |
+# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not |
|
| 1317 |
+# change the gamma. |
|
| 1318 |
+# Minimum value: 40, maximum value: 240, default value: 80. |
|
| 1319 |
+# This tag requires that the tag GENERATE_HTML is set to YES. |
|
| 1320 |
+ |
|
| 1321 |
+HTML_COLORSTYLE_GAMMA = 80 |
|
| 1322 |
+ |
|
| 1323 |
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML |
|
| 1324 |
+# page will contain the date and time when the page was generated. Setting this |
|
| 1325 |
+# to YES can help to show when doxygen was last run and thus if the |
|
| 1326 |
+# documentation is up to date. |
|
| 1327 |
+# The default value is: NO. |
|
| 1328 |
+# This tag requires that the tag GENERATE_HTML is set to YES. |
|
| 1329 |
+ |
|
| 1330 |
+HTML_TIMESTAMP = YES |
|
| 1331 |
+ |
|
| 1332 |
+# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML |
|
| 1333 |
+# documentation will contain a main index with vertical navigation menus that |
|
| 1334 |
+# are dynamically created via JavaScript. If disabled, the navigation index will |
|
| 1335 |
+# consists of multiple levels of tabs that are statically embedded in every HTML |
|
| 1336 |
+# page. Disable this option to support browsers that do not have JavaScript, |
|
| 1337 |
+# like the Qt help browser. |
|
| 1338 |
+# The default value is: YES. |
|
| 1339 |
+# This tag requires that the tag GENERATE_HTML is set to YES. |
|
| 1340 |
+ |
|
| 1341 |
+HTML_DYNAMIC_MENUS = NO |
|
| 1342 |
+ |
|
| 1343 |
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML |
|
| 1344 |
+# documentation will contain sections that can be hidden and shown after the |
|
| 1345 |
+# page has loaded. |
|
| 1346 |
+# The default value is: NO. |
|
| 1347 |
+# This tag requires that the tag GENERATE_HTML is set to YES. |
|
| 1348 |
+ |
|
| 1349 |
+HTML_DYNAMIC_SECTIONS = NO |
|
| 1350 |
+ |
|
| 1351 |
+# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries |
|
| 1352 |
+# shown in the various tree structured indices initially; the user can expand |
|
| 1353 |
+# and collapse entries dynamically later on. Doxygen will expand the tree to |
|
| 1354 |
+# such a level that at most the specified number of entries are visible (unless |
|
| 1355 |
+# a fully collapsed tree already exceeds this amount). So setting the number of |
|
| 1356 |
+# entries 1 will produce a full collapsed tree by default. 0 is a special value |
|
| 1357 |
+# representing an infinite number of entries and will result in a full expanded |
|
| 1358 |
+# tree by default. |
|
| 1359 |
+# Minimum value: 0, maximum value: 9999, default value: 100. |
|
| 1360 |
+# This tag requires that the tag GENERATE_HTML is set to YES. |
|
| 1361 |
+ |
|
| 1362 |
+HTML_INDEX_NUM_ENTRIES = 100 |
|
| 1363 |
+ |
|
| 1364 |
+# If the GENERATE_DOCSET tag is set to YES, additional index files will be |
|
| 1365 |
+# generated that can be used as input for Apple's Xcode 3 integrated development |
|
| 1366 |
+# environment (see: |
|
| 1367 |
+# https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To |
|
| 1368 |
+# create a documentation set, doxygen will generate a Makefile in the HTML |
|
| 1369 |
+# output directory. Running make will produce the docset in that directory and |
|
| 1370 |
+# running make install will install the docset in |
|
| 1371 |
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at |
|
| 1372 |
+# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy |
|
| 1373 |
+# genXcode/_index.html for more information. |
|
| 1374 |
+# The default value is: NO. |
|
| 1375 |
+# This tag requires that the tag GENERATE_HTML is set to YES. |
|
| 1376 |
+ |
|
| 1377 |
+GENERATE_DOCSET = NO |
|
| 1378 |
+ |
|
| 1379 |
+# This tag determines the name of the docset feed. A documentation feed provides |
|
| 1380 |
+# an umbrella under which multiple documentation sets from a single provider |
|
| 1381 |
+# (such as a company or product suite) can be grouped. |
|
| 1382 |
+# The default value is: Doxygen generated docs. |
|
| 1383 |
+# This tag requires that the tag GENERATE_DOCSET is set to YES. |
|
| 1384 |
+ |
|
| 1385 |
+DOCSET_FEEDNAME = "Doxygen docs" |
|
| 1386 |
+ |
|
| 1387 |
+# This tag determines the URL of the docset feed. A documentation feed provides |
|
| 1388 |
+# an umbrella under which multiple documentation sets from a single provider |
|
| 1389 |
+# (such as a company or product suite) can be grouped. |
|
| 1390 |
+# This tag requires that the tag GENERATE_DOCSET is set to YES. |
|
| 1391 |
+ |
|
| 1392 |
+DOCSET_FEEDURL = |
|
| 1393 |
+ |
|
| 1394 |
+# This tag specifies a string that should uniquely identify the documentation |
|
| 1395 |
+# set bundle. This should be a reverse domain-name style string, e.g. |
|
| 1396 |
+# com.mycompany.MyDocSet. Doxygen will append .docset to the name. |
|
| 1397 |
+# The default value is: org.doxygen.Project. |
|
| 1398 |
+# This tag requires that the tag GENERATE_DOCSET is set to YES. |
|
| 1399 |
+ |
|
| 1400 |
+DOCSET_BUNDLE_ID = org.doxygen.Doxygen |
|
| 1401 |
+ |
|
| 1402 |
+# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify |
|
| 1403 |
+# the documentation publisher. This should be a reverse domain-name style |
|
| 1404 |
+# string, e.g. com.mycompany.MyDocSet.documentation. |
|
| 1405 |
+# The default value is: org.doxygen.Publisher. |
|
| 1406 |
+# This tag requires that the tag GENERATE_DOCSET is set to YES. |
|
| 1407 |
+ |
|
| 1408 |
+DOCSET_PUBLISHER_ID = org.doxygen.Publisher |
|
| 1409 |
+ |
|
| 1410 |
+# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. |
|
| 1411 |
+# The default value is: Publisher. |
|
| 1412 |
+# This tag requires that the tag GENERATE_DOCSET is set to YES. |
|
| 1413 |
+ |
|
| 1414 |
+DOCSET_PUBLISHER_NAME = Publisher |
|
| 1415 |
+ |
|
| 1416 |
+# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three |
|
| 1417 |
+# additional HTML index files: index.hhp, index.hhc, and index.hhk. The |
|
| 1418 |
+# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop |
|
| 1419 |
+# on Windows. In the beginning of 2021 Microsoft took the original page, with |
|
| 1420 |
+# a.o. the download links, offline the HTML help workshop was already many years |
|
| 1421 |
+# in maintenance mode). You can download the HTML help workshop from the web |
|
| 1422 |
+# archives at Installation executable (see: |
|
| 1423 |
+# http://web.archive.org/web/20160201063255/http://download.microsoft.com/downlo |
|
| 1424 |
+# ad/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe). |
|
| 1425 |
+# |
|
| 1426 |
+# The HTML Help Workshop contains a compiler that can convert all HTML output |
|
| 1427 |
+# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML |
|
| 1428 |
+# files are now used as the Windows 98 help format, and will replace the old |
|
| 1429 |
+# Windows help format (.hlp) on all Windows platforms in the future. Compressed |
|
| 1430 |
+# HTML files also contain an index, a table of contents, and you can search for |
|
| 1431 |
+# words in the documentation. The HTML workshop also contains a viewer for |
|
| 1432 |
+# compressed HTML files. |
|
| 1433 |
+# The default value is: NO. |
|
| 1434 |
+# This tag requires that the tag GENERATE_HTML is set to YES. |
|
| 1435 |
+ |
|
| 1436 |
+GENERATE_HTMLHELP = NO |
|
| 1437 |
+ |
|
| 1438 |
+# The CHM_FILE tag can be used to specify the file name of the resulting .chm |
|
| 1439 |
+# file. You can add a path in front of the file if the result should not be |
|
| 1440 |
+# written to the html output directory. |
|
| 1441 |
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES. |
|
| 1442 |
+ |
|
| 1443 |
+CHM_FILE = |
|
| 1444 |
+ |
|
| 1445 |
+# The HHC_LOCATION tag can be used to specify the location (absolute path |
|
| 1446 |
+# including file name) of the HTML help compiler (hhc.exe). If non-empty, |
|
| 1447 |
+# doxygen will try to run the HTML help compiler on the generated index.hhp. |
|
| 1448 |
+# The file has to be specified with full path. |
|
| 1449 |
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES. |
|
| 1450 |
+ |
|
| 1451 |
+HHC_LOCATION = |
|
| 1452 |
+ |
|
| 1453 |
+# The GENERATE_CHI flag controls if a separate .chi index file is generated |
|
| 1454 |
+# (YES) or that it should be included in the main .chm file (NO). |
|
| 1455 |
+# The default value is: NO. |
|
| 1456 |
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES. |
|
| 1457 |
+ |
|
| 1458 |
+GENERATE_CHI = NO |
|
| 1459 |
+ |
|
| 1460 |
+# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) |
|
| 1461 |
+# and project file content. |
|
| 1462 |
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES. |
|
| 1463 |
+ |
|
| 1464 |
+CHM_INDEX_ENCODING = |
|
| 1465 |
+ |
|
| 1466 |
+# The BINARY_TOC flag controls whether a binary table of contents is generated |
|
| 1467 |
+# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it |
|
| 1468 |
+# enables the Previous and Next buttons. |
|
| 1469 |
+# The default value is: NO. |
|
| 1470 |
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES. |
|
| 1471 |
+ |
|
| 1472 |
+BINARY_TOC = NO |
|
| 1473 |
+ |
|
| 1474 |
+# The TOC_EXPAND flag can be set to YES to add extra items for group members to |
|
| 1475 |
+# the table of contents of the HTML help documentation and to the tree view. |
|
| 1476 |
+# The default value is: NO. |
|
| 1477 |
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES. |
|
| 1478 |
+ |
|
| 1479 |
+TOC_EXPAND = NO |
|
| 1480 |
+ |
|
| 1481 |
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and |
|
| 1482 |
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that |
|
| 1483 |
+# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help |
|
| 1484 |
+# (.qch) of the generated HTML documentation. |
|
| 1485 |
+# The default value is: NO. |
|
| 1486 |
+# This tag requires that the tag GENERATE_HTML is set to YES. |
|
| 1487 |
+ |
|
| 1488 |
+GENERATE_QHP = NO |
|
| 1489 |
+ |
|
| 1490 |
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify |
|
| 1491 |
+# the file name of the resulting .qch file. The path specified is relative to |
|
| 1492 |
+# the HTML output folder. |
|
| 1493 |
+# This tag requires that the tag GENERATE_QHP is set to YES. |
|
| 1494 |
+ |
|
| 1495 |
+QCH_FILE = |
|
| 1496 |
+ |
|
| 1497 |
+# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help |
|
| 1498 |
+# Project output. For more information please see Qt Help Project / Namespace |
|
| 1499 |
+# (see: |
|
| 1500 |
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). |
|
| 1501 |
+# The default value is: org.doxygen.Project. |
|
| 1502 |
+# This tag requires that the tag GENERATE_QHP is set to YES. |
|
| 1503 |
+ |
|
| 1504 |
+QHP_NAMESPACE = org.doxygen.Project |
|
| 1505 |
+ |
|
| 1506 |
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt |
|
| 1507 |
+# Help Project output. For more information please see Qt Help Project / Virtual |
|
| 1508 |
+# Folders (see: |
|
| 1509 |
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders). |
|
| 1510 |
+# The default value is: doc. |
|
| 1511 |
+# This tag requires that the tag GENERATE_QHP is set to YES. |
|
| 1512 |
+ |
|
| 1513 |
+QHP_VIRTUAL_FOLDER = doc |
|
| 1514 |
+ |
|
| 1515 |
+# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom |
|
| 1516 |
+# filter to add. For more information please see Qt Help Project / Custom |
|
| 1517 |
+# Filters (see: |
|
| 1518 |
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). |
|
| 1519 |
+# This tag requires that the tag GENERATE_QHP is set to YES. |
|
| 1520 |
+ |
|
| 1521 |
+QHP_CUST_FILTER_NAME = |
|
| 1522 |
+ |
|
| 1523 |
+# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the |
|
| 1524 |
+# custom filter to add. For more information please see Qt Help Project / Custom |
|
| 1525 |
+# Filters (see: |
|
| 1526 |
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). |
|
| 1527 |
+# This tag requires that the tag GENERATE_QHP is set to YES. |
|
| 1528 |
+ |
|
| 1529 |
+QHP_CUST_FILTER_ATTRS = |
|
| 1530 |
+ |
|
| 1531 |
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this |
|
| 1532 |
+# project's filter section matches. Qt Help Project / Filter Attributes (see: |
|
| 1533 |
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes). |
|
| 1534 |
+# This tag requires that the tag GENERATE_QHP is set to YES. |
|
| 1535 |
+ |
|
| 1536 |
+QHP_SECT_FILTER_ATTRS = |
|
| 1537 |
+ |
|
| 1538 |
+# The QHG_LOCATION tag can be used to specify the location (absolute path |
|
| 1539 |
+# including file name) of Qt's qhelpgenerator. If non-empty doxygen will try to |
|
| 1540 |
+# run qhelpgenerator on the generated .qhp file. |
|
| 1541 |
+# This tag requires that the tag GENERATE_QHP is set to YES. |
|
| 1542 |
+ |
|
| 1543 |
+QHG_LOCATION = |
|
| 1544 |
+ |
|
| 1545 |
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be |
|
| 1546 |
+# generated, together with the HTML files, they form an Eclipse help plugin. To |
|
| 1547 |
+# install this plugin and make it available under the help contents menu in |
|
| 1548 |
+# Eclipse, the contents of the directory containing the HTML and XML files needs |
|
| 1549 |
+# to be copied into the plugins directory of eclipse. The name of the directory |
|
| 1550 |
+# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. |
|
| 1551 |
+# After copying Eclipse needs to be restarted before the help appears. |
|
| 1552 |
+# The default value is: NO. |
|
| 1553 |
+# This tag requires that the tag GENERATE_HTML is set to YES. |
|
| 1554 |
+ |
|
| 1555 |
+GENERATE_ECLIPSEHELP = NO |
|
| 1556 |
+ |
|
| 1557 |
+# A unique identifier for the Eclipse help plugin. When installing the plugin |
|
| 1558 |
+# the directory name containing the HTML and XML files should also have this |
|
| 1559 |
+# name. Each documentation set should have its own identifier. |
|
| 1560 |
+# The default value is: org.doxygen.Project. |
|
| 1561 |
+# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. |
|
| 1562 |
+ |
|
| 1563 |
+ECLIPSE_DOC_ID = org.doxygen.Project |
|
| 1564 |
+ |
|
| 1565 |
+# If you want full control over the layout of the generated HTML pages it might |
|
| 1566 |
+# be necessary to disable the index and replace it with your own. The |
|
| 1567 |
+# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top |
|
| 1568 |
+# of each HTML page. A value of NO enables the index and the value YES disables |
|
| 1569 |
+# it. Since the tabs in the index contain the same information as the navigation |
|
| 1570 |
+# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. |
|
| 1571 |
+# The default value is: NO. |
|
| 1572 |
+# This tag requires that the tag GENERATE_HTML is set to YES. |
|
| 1573 |
+ |
|
| 1574 |
+DISABLE_INDEX = NO |
|
| 1575 |
+ |
|
| 1576 |
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index |
|
| 1577 |
+# structure should be generated to display hierarchical information. If the tag |
|
| 1578 |
+# value is set to YES, a side panel will be generated containing a tree-like |
|
| 1579 |
+# index structure (just like the one that is generated for HTML Help). For this |
|
| 1580 |
+# to work a browser that supports JavaScript, DHTML, CSS and frames is required |
|
| 1581 |
+# (i.e. any modern browser). Windows users are probably better off using the |
|
| 1582 |
+# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can |
|
| 1583 |
+# further fine tune the look of the index (see "Fine-tuning the output"). As an |
|
| 1584 |
+# example, the default style sheet generated by doxygen has an example that |
|
| 1585 |
+# shows how to put an image at the root of the tree instead of the PROJECT_NAME. |
|
| 1586 |
+# Since the tree basically has the same information as the tab index, you could |
|
| 1587 |
+# consider setting DISABLE_INDEX to YES when enabling this option. |
|
| 1588 |
+# The default value is: NO. |
|
| 1589 |
+# This tag requires that the tag GENERATE_HTML is set to YES. |
|
| 1590 |
+ |
|
| 1591 |
+GENERATE_TREEVIEW = YES |
|
| 1592 |
+ |
|
| 1593 |
+# When both GENERATE_TREEVIEW and DISABLE_INDEX are set to YES, then the |
|
| 1594 |
+# FULL_SIDEBAR option determines if the side bar is limited to only the treeview |
|
| 1595 |
+# area (value NO) or if it should extend to the full height of the window (value |
|
| 1596 |
+# YES). Setting this to YES gives a layout similar to |
|
| 1597 |
+# https://docs.readthedocs.io with more room for contents, but less room for the |
|
| 1598 |
+# project logo, title, and description. If either GENERATE_TREEVIEW or |
|
| 1599 |
+# DISABLE_INDEX is set to NO, this option has no effect. |
|
| 1600 |
+# The default value is: NO. |
|
| 1601 |
+# This tag requires that the tag GENERATE_HTML is set to YES. |
|
| 1602 |
+ |
|
| 1603 |
+FULL_SIDEBAR = NO |
|
| 1604 |
+ |
|
| 1605 |
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that |
|
| 1606 |
+# doxygen will group on one line in the generated HTML documentation. |
|
| 1607 |
+# |
|
| 1608 |
+# Note that a value of 0 will completely suppress the enum values from appearing |
|
| 1609 |
+# in the overview section. |
|
| 1610 |
+# Minimum value: 0, maximum value: 20, default value: 4. |
|
| 1611 |
+# This tag requires that the tag GENERATE_HTML is set to YES. |
|
| 1612 |
+ |
|
| 1613 |
+ENUM_VALUES_PER_LINE = 4 |
|
| 1614 |
+ |
|
| 1615 |
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used |
|
| 1616 |
+# to set the initial width (in pixels) of the frame in which the tree is shown. |
|
| 1617 |
+# Minimum value: 0, maximum value: 1500, default value: 250. |
|
| 1618 |
+# This tag requires that the tag GENERATE_HTML is set to YES. |
|
| 1619 |
+ |
|
| 1620 |
+TREEVIEW_WIDTH = 250 |
|
| 1621 |
+ |
|
| 1622 |
+# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to |
|
| 1623 |
+# external symbols imported via tag files in a separate window. |
|
| 1624 |
+# The default value is: NO. |
|
| 1625 |
+# This tag requires that the tag GENERATE_HTML is set to YES. |
|
| 1626 |
+ |
|
| 1627 |
+EXT_LINKS_IN_WINDOW = NO |
|
| 1628 |
+ |
|
| 1629 |
+# If the OBFUSCATE_EMAILS tag is set to YES, doxygen will obfuscate email |
|
| 1630 |
+# addresses. |
|
| 1631 |
+# The default value is: YES. |
|
| 1632 |
+# This tag requires that the tag GENERATE_HTML is set to YES. |
|
| 1633 |
+ |
|
| 1634 |
+OBFUSCATE_EMAILS = YES |
|
| 1635 |
+ |
|
| 1636 |
+# If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg |
|
| 1637 |
+# tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see |
|
| 1638 |
+# https://inkscape.org) to generate formulas as SVG images instead of PNGs for |
|
| 1639 |
+# the HTML output. These images will generally look nicer at scaled resolutions. |
|
| 1640 |
+# Possible values are: png (the default) and svg (looks nicer but requires the |
|
| 1641 |
+# pdf2svg or inkscape tool). |
|
| 1642 |
+# The default value is: png. |
|
| 1643 |
+# This tag requires that the tag GENERATE_HTML is set to YES. |
|
| 1644 |
+ |
|
| 1645 |
+HTML_FORMULA_FORMAT = png |
|
| 1646 |
+ |
|
| 1647 |
+# Use this tag to change the font size of LaTeX formulas included as images in |
|
| 1648 |
+# the HTML documentation. When you change the font size after a successful |
|
| 1649 |
+# doxygen run you need to manually remove any form_*.png images from the HTML |
|
| 1650 |
+# output directory to force them to be regenerated. |
|
| 1651 |
+# Minimum value: 8, maximum value: 50, default value: 10. |
|
| 1652 |
+# This tag requires that the tag GENERATE_HTML is set to YES. |
|
| 1653 |
+ |
|
| 1654 |
+FORMULA_FONTSIZE = 10 |
|
| 1655 |
+ |
|
| 1656 |
+# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands |
|
| 1657 |
+# to create new LaTeX commands to be used in formulas as building blocks. See |
|
| 1658 |
+# the section "Including formulas" for details. |
|
| 1659 |
+ |
|
| 1660 |
+FORMULA_MACROFILE = |
|
| 1661 |
+ |
|
| 1662 |
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see |
|
| 1663 |
+# https://www.mathjax.org) which uses client side JavaScript for the rendering |
|
| 1664 |
+# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX |
|
| 1665 |
+# installed or if you want to formulas look prettier in the HTML output. When |
|
| 1666 |
+# enabled you may also need to install MathJax separately and configure the path |
|
| 1667 |
+# to it using the MATHJAX_RELPATH option. |
|
| 1668 |
+# The default value is: NO. |
|
| 1669 |
+# This tag requires that the tag GENERATE_HTML is set to YES. |
|
| 1670 |
+ |
|
| 1671 |
+USE_MATHJAX = NO |
|
| 1672 |
+ |
|
| 1673 |
+# With MATHJAX_VERSION it is possible to specify the MathJax version to be used. |
|
| 1674 |
+# Note that the different versions of MathJax have different requirements with |
|
| 1675 |
+# regards to the different settings, so it is possible that also other MathJax |
|
| 1676 |
+# settings have to be changed when switching between the different MathJax |
|
| 1677 |
+# versions. |
|
| 1678 |
+# Possible values are: MathJax_2 and MathJax_3. |
|
| 1679 |
+# The default value is: MathJax_2. |
|
| 1680 |
+# This tag requires that the tag USE_MATHJAX is set to YES. |
|
| 1681 |
+ |
|
| 1682 |
+MATHJAX_VERSION = MathJax_2 |
|
| 1683 |
+ |
|
| 1684 |
+# When MathJax is enabled you can set the default output format to be used for |
|
| 1685 |
+# the MathJax output. For more details about the output format see MathJax |
|
| 1686 |
+# version 2 (see: |
|
| 1687 |
+# http://docs.mathjax.org/en/v2.7-latest/output.html) and MathJax version 3 |
|
| 1688 |
+# (see: |
|
| 1689 |
+# http://docs.mathjax.org/en/latest/web/components/output.html). |
|
| 1690 |
+# Possible values are: HTML-CSS (which is slower, but has the best |
|
| 1691 |
+# compatibility. This is the name for Mathjax version 2, for MathJax version 3 |
|
| 1692 |
+# this will be translated into chtml), NativeMML (i.e. MathML. Only supported |
|
| 1693 |
+# for NathJax 2. For MathJax version 3 chtml will be used instead.), chtml (This |
|
| 1694 |
+# is the name for Mathjax version 3, for MathJax version 2 this will be |
|
| 1695 |
+# translated into HTML-CSS) and SVG. |
|
| 1696 |
+# The default value is: HTML-CSS. |
|
| 1697 |
+# This tag requires that the tag USE_MATHJAX is set to YES. |
|
| 1698 |
+ |
|
| 1699 |
+MATHJAX_FORMAT = HTML-CSS |
|
| 1700 |
+ |
|
| 1701 |
+# When MathJax is enabled you need to specify the location relative to the HTML |
|
| 1702 |
+# output directory using the MATHJAX_RELPATH option. The destination directory |
|
| 1703 |
+# should contain the MathJax.js script. For instance, if the mathjax directory |
|
| 1704 |
+# is located at the same level as the HTML output directory, then |
|
| 1705 |
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax |
|
| 1706 |
+# Content Delivery Network so you can quickly see the result without installing |
|
| 1707 |
+# MathJax. However, it is strongly recommended to install a local copy of |
|
| 1708 |
+# MathJax from https://www.mathjax.org before deployment. The default value is: |
|
| 1709 |
+# - in case of MathJax version 2: https://cdn.jsdelivr.net/npm/mathjax@2 |
|
| 1710 |
+# - in case of MathJax version 3: https://cdn.jsdelivr.net/npm/mathjax@3 |
|
| 1711 |
+# This tag requires that the tag USE_MATHJAX is set to YES. |
|
| 1712 |
+ |
|
| 1713 |
+MATHJAX_RELPATH = |
|
| 1714 |
+ |
|
| 1715 |
+# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax |
|
| 1716 |
+# extension names that should be enabled during MathJax rendering. For example |
|
| 1717 |
+# for MathJax version 2 (see |
|
| 1718 |
+# https://docs.mathjax.org/en/v2.7-latest/tex.html#tex-and-latex-extensions): |
|
| 1719 |
+# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols |
|
| 1720 |
+# For example for MathJax version 3 (see |
|
| 1721 |
+# http://docs.mathjax.org/en/latest/input/tex/extensions/index.html): |
|
| 1722 |
+# MATHJAX_EXTENSIONS = ams |
|
| 1723 |
+# This tag requires that the tag USE_MATHJAX is set to YES. |
|
| 1724 |
+ |
|
| 1725 |
+MATHJAX_EXTENSIONS = |
|
| 1726 |
+ |
|
| 1727 |
+# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces |
|
| 1728 |
+# of code that will be used on startup of the MathJax code. See the MathJax site |
|
| 1729 |
+# (see: |
|
| 1730 |
+# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an |
|
| 1731 |
+# example see the documentation. |
|
| 1732 |
+# This tag requires that the tag USE_MATHJAX is set to YES. |
|
| 1733 |
+ |
|
| 1734 |
+MATHJAX_CODEFILE = |
|
| 1735 |
+ |
|
| 1736 |
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box for |
|
| 1737 |
+# the HTML output. The underlying search engine uses javascript and DHTML and |
|
| 1738 |
+# should work on any modern browser. Note that when using HTML help |
|
| 1739 |
+# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) |
|
| 1740 |
+# there is already a search function so this one should typically be disabled. |
|
| 1741 |
+# For large projects the javascript based search engine can be slow, then |
|
| 1742 |
+# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to |
|
| 1743 |
+# search using the keyboard; to jump to the search box use <access key> + S |
|
| 1744 |
+# (what the <access key> is depends on the OS and browser, but it is typically |
|
| 1745 |
+# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down |
|
| 1746 |
+# key> to jump into the search results window, the results can be navigated |
|
| 1747 |
+# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel |
|
| 1748 |
+# the search. The filter options can be selected when the cursor is inside the |
|
| 1749 |
+# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys> |
|
| 1750 |
+# to select a filter and <Enter> or <escape> to activate or cancel the filter |
|
| 1751 |
+# option. |
|
| 1752 |
+# The default value is: YES. |
|
| 1753 |
+# This tag requires that the tag GENERATE_HTML is set to YES. |
|
| 1754 |
+ |
|
| 1755 |
+SEARCHENGINE = NO |
|
| 1756 |
+ |
|
| 1757 |
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be |
|
| 1758 |
+# implemented using a web server instead of a web client using JavaScript. There |
|
| 1759 |
+# are two flavors of web server based searching depending on the EXTERNAL_SEARCH |
|
| 1760 |
+# setting. When disabled, doxygen will generate a PHP script for searching and |
|
| 1761 |
+# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing |
|
| 1762 |
+# and searching needs to be provided by external tools. See the section |
|
| 1763 |
+# "External Indexing and Searching" for details. |
|
| 1764 |
+# The default value is: NO. |
|
| 1765 |
+# This tag requires that the tag SEARCHENGINE is set to YES. |
|
| 1766 |
+ |
|
| 1767 |
+SERVER_BASED_SEARCH = NO |
|
| 1768 |
+ |
|
| 1769 |
+# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP |
|
| 1770 |
+# script for searching. Instead the search results are written to an XML file |
|
| 1771 |
+# which needs to be processed by an external indexer. Doxygen will invoke an |
|
| 1772 |
+# external search engine pointed to by the SEARCHENGINE_URL option to obtain the |
|
| 1773 |
+# search results. |
|
| 1774 |
+# |
|
| 1775 |
+# Doxygen ships with an example indexer (doxyindexer) and search engine |
|
| 1776 |
+# (doxysearch.cgi) which are based on the open source search engine library |
|
| 1777 |
+# Xapian (see: |
|
| 1778 |
+# https://xapian.org/). |
|
| 1779 |
+# |
|
| 1780 |
+# See the section "External Indexing and Searching" for details. |
|
| 1781 |
+# The default value is: NO. |
|
| 1782 |
+# This tag requires that the tag SEARCHENGINE is set to YES. |
|
| 1783 |
+ |
|
| 1784 |
+EXTERNAL_SEARCH = NO |
|
| 1785 |
+ |
|
| 1786 |
+# The SEARCHENGINE_URL should point to a search engine hosted by a web server |
|
| 1787 |
+# which will return the search results when EXTERNAL_SEARCH is enabled. |
|
| 1788 |
+# |
|
| 1789 |
+# Doxygen ships with an example indexer (doxyindexer) and search engine |
|
| 1790 |
+# (doxysearch.cgi) which are based on the open source search engine library |
|
| 1791 |
+# Xapian (see: |
|
| 1792 |
+# https://xapian.org/). See the section "External Indexing and Searching" for |
|
| 1793 |
+# details. |
|
| 1794 |
+# This tag requires that the tag SEARCHENGINE is set to YES. |
|
| 1795 |
+ |
|
| 1796 |
+SEARCHENGINE_URL = |
|
| 1797 |
+ |
|
| 1798 |
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed |
|
| 1799 |
+# search data is written to a file for indexing by an external tool. With the |
|
| 1800 |
+# SEARCHDATA_FILE tag the name of this file can be specified. |
|
| 1801 |
+# The default file is: searchdata.xml. |
|
| 1802 |
+# This tag requires that the tag SEARCHENGINE is set to YES. |
|
| 1803 |
+ |
|
| 1804 |
+SEARCHDATA_FILE = searchdata.xml |
|
| 1805 |
+ |
|
| 1806 |
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the |
|
| 1807 |
+# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is |
|
| 1808 |
+# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple |
|
| 1809 |
+# projects and redirect the results back to the right project. |
|
| 1810 |
+# This tag requires that the tag SEARCHENGINE is set to YES. |
|
| 1811 |
+ |
|
| 1812 |
+EXTERNAL_SEARCH_ID = |
|
| 1813 |
+ |
|
| 1814 |
+# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen |
|
| 1815 |
+# projects other than the one defined by this configuration file, but that are |
|
| 1816 |
+# all added to the same external search index. Each project needs to have a |
|
| 1817 |
+# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of |
|
| 1818 |
+# to a relative location where the documentation can be found. The format is: |
|
| 1819 |
+# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ... |
|
| 1820 |
+# This tag requires that the tag SEARCHENGINE is set to YES. |
|
| 1821 |
+ |
|
| 1822 |
+EXTRA_SEARCH_MAPPINGS = |
|
| 1823 |
+ |
|
| 1824 |
+#--------------------------------------------------------------------------- |
|
| 1825 |
+# Configuration options related to the LaTeX output |
|
| 1826 |
+#--------------------------------------------------------------------------- |
|
| 1827 |
+ |
|
| 1828 |
+# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output. |
|
| 1829 |
+# The default value is: YES. |
|
| 1830 |
+ |
|
| 1831 |
+GENERATE_LATEX = NO |
|
| 1832 |
+ |
|
| 1833 |
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a |
|
| 1834 |
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of |
|
| 1835 |
+# it. |
|
| 1836 |
+# The default directory is: latex. |
|
| 1837 |
+# This tag requires that the tag GENERATE_LATEX is set to YES. |
|
| 1838 |
+ |
|
| 1839 |
+LATEX_OUTPUT = latex |
|
| 1840 |
+ |
|
| 1841 |
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be |
|
| 1842 |
+# invoked. |
|
| 1843 |
+# |
|
| 1844 |
+# Note that when not enabling USE_PDFLATEX the default is latex when enabling |
|
| 1845 |
+# USE_PDFLATEX the default is pdflatex and when in the later case latex is |
|
| 1846 |
+# chosen this is overwritten by pdflatex. For specific output languages the |
|
| 1847 |
+# default can have been set differently, this depends on the implementation of |
|
| 1848 |
+# the output language. |
|
| 1849 |
+# This tag requires that the tag GENERATE_LATEX is set to YES. |
|
| 1850 |
+ |
|
| 1851 |
+LATEX_CMD_NAME = |
|
| 1852 |
+ |
|
| 1853 |
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate |
|
| 1854 |
+# index for LaTeX. |
|
| 1855 |
+# Note: This tag is used in the Makefile / make.bat. |
|
| 1856 |
+# See also: LATEX_MAKEINDEX_CMD for the part in the generated output file |
|
| 1857 |
+# (.tex). |
|
| 1858 |
+# The default file is: makeindex. |
|
| 1859 |
+# This tag requires that the tag GENERATE_LATEX is set to YES. |
|
| 1860 |
+ |
|
| 1861 |
+MAKEINDEX_CMD_NAME = makeindex |
|
| 1862 |
+ |
|
| 1863 |
+# The LATEX_MAKEINDEX_CMD tag can be used to specify the command name to |
|
| 1864 |
+# generate index for LaTeX. In case there is no backslash (\) as first character |
|
| 1865 |
+# it will be automatically added in the LaTeX code. |
|
| 1866 |
+# Note: This tag is used in the generated output file (.tex). |
|
| 1867 |
+# See also: MAKEINDEX_CMD_NAME for the part in the Makefile / make.bat. |
|
| 1868 |
+# The default value is: makeindex. |
|
| 1869 |
+# This tag requires that the tag GENERATE_LATEX is set to YES. |
|
| 1870 |
+ |
|
| 1871 |
+LATEX_MAKEINDEX_CMD = makeindex |
|
| 1872 |
+ |
|
| 1873 |
+# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX |
|
| 1874 |
+# documents. This may be useful for small projects and may help to save some |
|
| 1875 |
+# trees in general. |
|
| 1876 |
+# The default value is: NO. |
|
| 1877 |
+# This tag requires that the tag GENERATE_LATEX is set to YES. |
|
| 1878 |
+ |
|
| 1879 |
+COMPACT_LATEX = NO |
|
| 1880 |
+ |
|
| 1881 |
+# The PAPER_TYPE tag can be used to set the paper type that is used by the |
|
| 1882 |
+# printer. |
|
| 1883 |
+# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x |
|
| 1884 |
+# 14 inches) and executive (7.25 x 10.5 inches). |
|
| 1885 |
+# The default value is: a4. |
|
| 1886 |
+# This tag requires that the tag GENERATE_LATEX is set to YES. |
|
| 1887 |
+ |
|
| 1888 |
+PAPER_TYPE = a4 |
|
| 1889 |
+ |
|
| 1890 |
+# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names |
|
| 1891 |
+# that should be included in the LaTeX output. The package can be specified just |
|
| 1892 |
+# by its name or with the correct syntax as to be used with the LaTeX |
|
| 1893 |
+# \usepackage command. To get the times font for instance you can specify : |
|
| 1894 |
+# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times}
|
|
| 1895 |
+# To use the option intlimits with the amsmath package you can specify: |
|
| 1896 |
+# EXTRA_PACKAGES=[intlimits]{amsmath}
|
|
| 1897 |
+# If left blank no extra packages will be included. |
|
| 1898 |
+# This tag requires that the tag GENERATE_LATEX is set to YES. |
|
| 1899 |
+ |
|
| 1900 |
+EXTRA_PACKAGES = |
|
| 1901 |
+ |
|
| 1902 |
+# The LATEX_HEADER tag can be used to specify a user-defined LaTeX header for |
|
| 1903 |
+# the generated LaTeX document. The header should contain everything until the |
|
| 1904 |
+# first chapter. If it is left blank doxygen will generate a standard header. It |
|
| 1905 |
+# is highly recommended to start with a default header using |
|
| 1906 |
+# doxygen -w latex new_header.tex new_footer.tex new_stylesheet.sty |
|
| 1907 |
+# and then modify the file new_header.tex. See also section "Doxygen usage" for |
|
| 1908 |
+# information on how to generate the default header that doxygen normally uses. |
|
| 1909 |
+# |
|
| 1910 |
+# Note: Only use a user-defined header if you know what you are doing! |
|
| 1911 |
+# Note: The header is subject to change so you typically have to regenerate the |
|
| 1912 |
+# default header when upgrading to a newer version of doxygen. The following |
|
| 1913 |
+# commands have a special meaning inside the header (and footer): For a |
|
| 1914 |
+# description of the possible markers and block names see the documentation. |
|
| 1915 |
+# This tag requires that the tag GENERATE_LATEX is set to YES. |
|
| 1916 |
+ |
|
| 1917 |
+LATEX_HEADER = |
|
| 1918 |
+ |
|
| 1919 |
+# The LATEX_FOOTER tag can be used to specify a user-defined LaTeX footer for |
|
| 1920 |
+# the generated LaTeX document. The footer should contain everything after the |
|
| 1921 |
+# last chapter. If it is left blank doxygen will generate a standard footer. See |
|
| 1922 |
+# LATEX_HEADER for more information on how to generate a default footer and what |
|
| 1923 |
+# special commands can be used inside the footer. See also section "Doxygen |
|
| 1924 |
+# usage" for information on how to generate the default footer that doxygen |
|
| 1925 |
+# normally uses. Note: Only use a user-defined footer if you know what you are |
|
| 1926 |
+# doing! |
|
| 1927 |
+# This tag requires that the tag GENERATE_LATEX is set to YES. |
|
| 1928 |
+ |
|
| 1929 |
+LATEX_FOOTER = |
|
| 1930 |
+ |
|
| 1931 |
+# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined |
|
| 1932 |
+# LaTeX style sheets that are included after the standard style sheets created |
|
| 1933 |
+# by doxygen. Using this option one can overrule certain style aspects. Doxygen |
|
| 1934 |
+# will copy the style sheet files to the output directory. |
|
| 1935 |
+# Note: The order of the extra style sheet files is of importance (e.g. the last |
|
| 1936 |
+# style sheet in the list overrules the setting of the previous ones in the |
|
| 1937 |
+# list). |
|
| 1938 |
+# This tag requires that the tag GENERATE_LATEX is set to YES. |
|
| 1939 |
+ |
|
| 1940 |
+LATEX_EXTRA_STYLESHEET = |
|
| 1941 |
+ |
|
| 1942 |
+# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or |
|
| 1943 |
+# other source files which should be copied to the LATEX_OUTPUT output |
|
| 1944 |
+# directory. Note that the files will be copied as-is; there are no commands or |
|
| 1945 |
+# markers available. |
|
| 1946 |
+# This tag requires that the tag GENERATE_LATEX is set to YES. |
|
| 1947 |
+ |
|
| 1948 |
+LATEX_EXTRA_FILES = |
|
| 1949 |
+ |
|
| 1950 |
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is |
|
| 1951 |
+# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will |
|
| 1952 |
+# contain links (just like the HTML output) instead of page references. This |
|
| 1953 |
+# makes the output suitable for online browsing using a PDF viewer. |
|
| 1954 |
+# The default value is: YES. |
|
| 1955 |
+# This tag requires that the tag GENERATE_LATEX is set to YES. |
|
| 1956 |
+ |
|
| 1957 |
+PDF_HYPERLINKS = YES |
|
| 1958 |
+ |
|
| 1959 |
+# If the USE_PDFLATEX tag is set to YES, doxygen will use the engine as |
|
| 1960 |
+# specified with LATEX_CMD_NAME to generate the PDF file directly from the LaTeX |
|
| 1961 |
+# files. Set this option to YES, to get a higher quality PDF documentation. |
|
| 1962 |
+# |
|
| 1963 |
+# See also section LATEX_CMD_NAME for selecting the engine. |
|
| 1964 |
+# The default value is: YES. |
|
| 1965 |
+# This tag requires that the tag GENERATE_LATEX is set to YES. |
|
| 1966 |
+ |
|
| 1967 |
+USE_PDFLATEX = YES |
|
| 1968 |
+ |
|
| 1969 |
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode |
|
| 1970 |
+# command to the generated LaTeX files. This will instruct LaTeX to keep running |
|
| 1971 |
+# if errors occur, instead of asking the user for help. |
|
| 1972 |
+# The default value is: NO. |
|
| 1973 |
+# This tag requires that the tag GENERATE_LATEX is set to YES. |
|
| 1974 |
+ |
|
| 1975 |
+LATEX_BATCHMODE = NO |
|
| 1976 |
+ |
|
| 1977 |
+# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the |
|
| 1978 |
+# index chapters (such as File Index, Compound Index, etc.) in the output. |
|
| 1979 |
+# The default value is: NO. |
|
| 1980 |
+# This tag requires that the tag GENERATE_LATEX is set to YES. |
|
| 1981 |
+ |
|
| 1982 |
+LATEX_HIDE_INDICES = NO |
|
| 1983 |
+ |
|
| 1984 |
+# The LATEX_BIB_STYLE tag can be used to specify the style to use for the |
|
| 1985 |
+# bibliography, e.g. plainnat, or ieeetr. See |
|
| 1986 |
+# https://en.wikipedia.org/wiki/BibTeX and \cite for more info. |
|
| 1987 |
+# The default value is: plain. |
|
| 1988 |
+# This tag requires that the tag GENERATE_LATEX is set to YES. |
|
| 1989 |
+ |
|
| 1990 |
+LATEX_BIB_STYLE = plain |
|
| 1991 |
+ |
|
| 1992 |
+# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated |
|
| 1993 |
+# page will contain the date and time when the page was generated. Setting this |
|
| 1994 |
+# to NO can help when comparing the output of multiple runs. |
|
| 1995 |
+# The default value is: NO. |
|
| 1996 |
+# This tag requires that the tag GENERATE_LATEX is set to YES. |
|
| 1997 |
+ |
|
| 1998 |
+LATEX_TIMESTAMP = NO |
|
| 1999 |
+ |
|
| 2000 |
+# The LATEX_EMOJI_DIRECTORY tag is used to specify the (relative or absolute) |
|
| 2001 |
+# path from which the emoji images will be read. If a relative path is entered, |
|
| 2002 |
+# it will be relative to the LATEX_OUTPUT directory. If left blank the |
|
| 2003 |
+# LATEX_OUTPUT directory will be used. |
|
| 2004 |
+# This tag requires that the tag GENERATE_LATEX is set to YES. |
|
| 2005 |
+ |
|
| 2006 |
+LATEX_EMOJI_DIRECTORY = |
|
| 2007 |
+ |
|
| 2008 |
+#--------------------------------------------------------------------------- |
|
| 2009 |
+# Configuration options related to the RTF output |
|
| 2010 |
+#--------------------------------------------------------------------------- |
|
| 2011 |
+ |
|
| 2012 |
+# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The |
|
| 2013 |
+# RTF output is optimized for Word 97 and may not look too pretty with other RTF |
|
| 2014 |
+# readers/editors. |
|
| 2015 |
+# The default value is: NO. |
|
| 2016 |
+ |
|
| 2017 |
+GENERATE_RTF = NO |
|
| 2018 |
+ |
|
| 2019 |
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a |
|
| 2020 |
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of |
|
| 2021 |
+# it. |
|
| 2022 |
+# The default directory is: rtf. |
|
| 2023 |
+# This tag requires that the tag GENERATE_RTF is set to YES. |
|
| 2024 |
+ |
|
| 2025 |
+RTF_OUTPUT = |
|
| 2026 |
+ |
|
| 2027 |
+# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF |
|
| 2028 |
+# documents. This may be useful for small projects and may help to save some |
|
| 2029 |
+# trees in general. |
|
| 2030 |
+# The default value is: NO. |
|
| 2031 |
+# This tag requires that the tag GENERATE_RTF is set to YES. |
|
| 2032 |
+ |
|
| 2033 |
+COMPACT_RTF = NO |
|
| 2034 |
+ |
|
| 2035 |
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will |
|
| 2036 |
+# contain hyperlink fields. The RTF file will contain links (just like the HTML |
|
| 2037 |
+# output) instead of page references. This makes the output suitable for online |
|
| 2038 |
+# browsing using Word or some other Word compatible readers that support those |
|
| 2039 |
+# fields. |
|
| 2040 |
+# |
|
| 2041 |
+# Note: WordPad (write) and others do not support links. |
|
| 2042 |
+# The default value is: NO. |
|
| 2043 |
+# This tag requires that the tag GENERATE_RTF is set to YES. |
|
| 2044 |
+ |
|
| 2045 |
+RTF_HYPERLINKS = NO |
|
| 2046 |
+ |
|
| 2047 |
+# Load stylesheet definitions from file. Syntax is similar to doxygen's |
|
| 2048 |
+# configuration file, i.e. a series of assignments. You only have to provide |
|
| 2049 |
+# replacements, missing definitions are set to their default value. |
|
| 2050 |
+# |
|
| 2051 |
+# See also section "Doxygen usage" for information on how to generate the |
|
| 2052 |
+# default style sheet that doxygen normally uses. |
|
| 2053 |
+# This tag requires that the tag GENERATE_RTF is set to YES. |
|
| 2054 |
+ |
|
| 2055 |
+RTF_STYLESHEET_FILE = |
|
| 2056 |
+ |
|
| 2057 |
+# Set optional variables used in the generation of an RTF document. Syntax is |
|
| 2058 |
+# similar to doxygen's configuration file. A template extensions file can be |
|
| 2059 |
+# generated using doxygen -e rtf extensionFile. |
|
| 2060 |
+# This tag requires that the tag GENERATE_RTF is set to YES. |
|
| 2061 |
+ |
|
| 2062 |
+RTF_EXTENSIONS_FILE = |
|
| 2063 |
+ |
|
| 2064 |
+#--------------------------------------------------------------------------- |
|
| 2065 |
+# Configuration options related to the man page output |
|
| 2066 |
+#--------------------------------------------------------------------------- |
|
| 2067 |
+ |
|
| 2068 |
+# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for |
|
| 2069 |
+# classes and files. |
|
| 2070 |
+# The default value is: NO. |
|
| 2071 |
+ |
|
| 2072 |
+GENERATE_MAN = NO |
|
| 2073 |
+ |
|
| 2074 |
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a |
|
| 2075 |
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of |
|
| 2076 |
+# it. A directory man3 will be created inside the directory specified by |
|
| 2077 |
+# MAN_OUTPUT. |
|
| 2078 |
+# The default directory is: man. |
|
| 2079 |
+# This tag requires that the tag GENERATE_MAN is set to YES. |
|
| 2080 |
+ |
|
| 2081 |
+MAN_OUTPUT = |
|
| 2082 |
+ |
|
| 2083 |
+# The MAN_EXTENSION tag determines the extension that is added to the generated |
|
| 2084 |
+# man pages. In case the manual section does not start with a number, the number |
|
| 2085 |
+# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is |
|
| 2086 |
+# optional. |
|
| 2087 |
+# The default value is: .3. |
|
| 2088 |
+# This tag requires that the tag GENERATE_MAN is set to YES. |
|
| 2089 |
+ |
|
| 2090 |
+MAN_EXTENSION = .3 |
|
| 2091 |
+ |
|
| 2092 |
+# The MAN_SUBDIR tag determines the name of the directory created within |
|
| 2093 |
+# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by |
|
| 2094 |
+# MAN_EXTENSION with the initial . removed. |
|
| 2095 |
+# This tag requires that the tag GENERATE_MAN is set to YES. |
|
| 2096 |
+ |
|
| 2097 |
+MAN_SUBDIR = |
|
| 2098 |
+ |
|
| 2099 |
+# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it |
|
| 2100 |
+# will generate one additional man file for each entity documented in the real |
|
| 2101 |
+# man page(s). These additional files only source the real man page, but without |
|
| 2102 |
+# them the man command would be unable to find the correct page. |
|
| 2103 |
+# The default value is: NO. |
|
| 2104 |
+# This tag requires that the tag GENERATE_MAN is set to YES. |
|
| 2105 |
+ |
|
| 2106 |
+MAN_LINKS = NO |
|
| 2107 |
+ |
|
| 2108 |
+#--------------------------------------------------------------------------- |
|
| 2109 |
+# Configuration options related to the XML output |
|
| 2110 |
+#--------------------------------------------------------------------------- |
|
| 2111 |
+ |
|
| 2112 |
+# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that |
|
| 2113 |
+# captures the structure of the code including all documentation. |
|
| 2114 |
+# The default value is: NO. |
|
| 2115 |
+ |
|
| 2116 |
+GENERATE_XML = NO |
|
| 2117 |
+ |
|
| 2118 |
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a |
|
| 2119 |
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of |
|
| 2120 |
+# it. |
|
| 2121 |
+# The default directory is: xml. |
|
| 2122 |
+# This tag requires that the tag GENERATE_XML is set to YES. |
|
| 2123 |
+ |
|
| 2124 |
+XML_OUTPUT = xml |
|
| 2125 |
+ |
|
| 2126 |
+# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program |
|
| 2127 |
+# listings (including syntax highlighting and cross-referencing information) to |
|
| 2128 |
+# the XML output. Note that enabling this will significantly increase the size |
|
| 2129 |
+# of the XML output. |
|
| 2130 |
+# The default value is: YES. |
|
| 2131 |
+# This tag requires that the tag GENERATE_XML is set to YES. |
|
| 2132 |
+ |
|
| 2133 |
+XML_PROGRAMLISTING = YES |
|
| 2134 |
+ |
|
| 2135 |
+# If the XML_NS_MEMB_FILE_SCOPE tag is set to YES, doxygen will include |
|
| 2136 |
+# namespace members in file scope as well, matching the HTML output. |
|
| 2137 |
+# The default value is: NO. |
|
| 2138 |
+# This tag requires that the tag GENERATE_XML is set to YES. |
|
| 2139 |
+ |
|
| 2140 |
+XML_NS_MEMB_FILE_SCOPE = NO |
|
| 2141 |
+ |
|
| 2142 |
+#--------------------------------------------------------------------------- |
|
| 2143 |
+# Configuration options related to the DOCBOOK output |
|
| 2144 |
+#--------------------------------------------------------------------------- |
|
| 2145 |
+ |
|
| 2146 |
+# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files |
|
| 2147 |
+# that can be used to generate PDF. |
|
| 2148 |
+# The default value is: NO. |
|
| 2149 |
+ |
|
| 2150 |
+GENERATE_DOCBOOK = NO |
|
| 2151 |
+ |
|
| 2152 |
+# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put. |
|
| 2153 |
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in |
|
| 2154 |
+# front of it. |
|
| 2155 |
+# The default directory is: docbook. |
|
| 2156 |
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES. |
|
| 2157 |
+ |
|
| 2158 |
+DOCBOOK_OUTPUT = docbook |
|
| 2159 |
+ |
|
| 2160 |
+#--------------------------------------------------------------------------- |
|
| 2161 |
+# Configuration options for the AutoGen Definitions output |
|
| 2162 |
+#--------------------------------------------------------------------------- |
|
| 2163 |
+ |
|
| 2164 |
+# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an |
|
| 2165 |
+# AutoGen Definitions (see http://autogen.sourceforge.net/) file that captures |
|
| 2166 |
+# the structure of the code including all documentation. Note that this feature |
|
| 2167 |
+# is still experimental and incomplete at the moment. |
|
| 2168 |
+# The default value is: NO. |
|
| 2169 |
+ |
|
| 2170 |
+GENERATE_AUTOGEN_DEF = NO |
|
| 2171 |
+ |
|
| 2172 |
+#--------------------------------------------------------------------------- |
|
| 2173 |
+# Configuration options related to the Perl module output |
|
| 2174 |
+#--------------------------------------------------------------------------- |
|
| 2175 |
+ |
|
| 2176 |
+# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module |
|
| 2177 |
+# file that captures the structure of the code including all documentation. |
|
| 2178 |
+# |
|
| 2179 |
+# Note that this feature is still experimental and incomplete at the moment. |
|
| 2180 |
+# The default value is: NO. |
|
| 2181 |
+ |
|
| 2182 |
+GENERATE_PERLMOD = NO |
|
| 2183 |
+ |
|
| 2184 |
+# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary |
|
| 2185 |
+# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI |
|
| 2186 |
+# output from the Perl module output. |
|
| 2187 |
+# The default value is: NO. |
|
| 2188 |
+# This tag requires that the tag GENERATE_PERLMOD is set to YES. |
|
| 2189 |
+ |
|
| 2190 |
+PERLMOD_LATEX = NO |
|
| 2191 |
+ |
|
| 2192 |
+# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely |
|
| 2193 |
+# formatted so it can be parsed by a human reader. This is useful if you want to |
|
| 2194 |
+# understand what is going on. On the other hand, if this tag is set to NO, the |
|
| 2195 |
+# size of the Perl module output will be much smaller and Perl will parse it |
|
| 2196 |
+# just the same. |
|
| 2197 |
+# The default value is: YES. |
|
| 2198 |
+# This tag requires that the tag GENERATE_PERLMOD is set to YES. |
|
| 2199 |
+ |
|
| 2200 |
+PERLMOD_PRETTY = YES |
|
| 2201 |
+ |
|
| 2202 |
+# The names of the make variables in the generated doxyrules.make file are |
|
| 2203 |
+# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful |
|
| 2204 |
+# so different doxyrules.make files included by the same Makefile don't |
|
| 2205 |
+# overwrite each other's variables. |
|
| 2206 |
+# This tag requires that the tag GENERATE_PERLMOD is set to YES. |
|
| 2207 |
+ |
|
| 2208 |
+PERLMOD_MAKEVAR_PREFIX = |
|
| 2209 |
+ |
|
| 2210 |
+#--------------------------------------------------------------------------- |
|
| 2211 |
+# Configuration options related to the preprocessor |
|
| 2212 |
+#--------------------------------------------------------------------------- |
|
| 2213 |
+ |
|
| 2214 |
+# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all |
|
| 2215 |
+# C-preprocessor directives found in the sources and include files. |
|
| 2216 |
+# The default value is: YES. |
|
| 2217 |
+ |
|
| 2218 |
+ENABLE_PREPROCESSING = YES |
|
| 2219 |
+ |
|
| 2220 |
+# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names |
|
| 2221 |
+# in the source code. If set to NO, only conditional compilation will be |
|
| 2222 |
+# performed. Macro expansion can be done in a controlled way by setting |
|
| 2223 |
+# EXPAND_ONLY_PREDEF to YES. |
|
| 2224 |
+# The default value is: NO. |
|
| 2225 |
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. |
|
| 2226 |
+ |
|
| 2227 |
+MACRO_EXPANSION = YES |
|
| 2228 |
+ |
|
| 2229 |
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then |
|
| 2230 |
+# the macro expansion is limited to the macros specified with the PREDEFINED and |
|
| 2231 |
+# EXPAND_AS_DEFINED tags. |
|
| 2232 |
+# The default value is: NO. |
|
| 2233 |
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. |
|
| 2234 |
+ |
|
| 2235 |
+EXPAND_ONLY_PREDEF = YES |
|
| 2236 |
+ |
|
| 2237 |
+# If the SEARCH_INCLUDES tag is set to YES, the include files in the |
|
| 2238 |
+# INCLUDE_PATH will be searched if a #include is found. |
|
| 2239 |
+# The default value is: YES. |
|
| 2240 |
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. |
|
| 2241 |
+ |
|
| 2242 |
+SEARCH_INCLUDES = NO |
|
| 2243 |
+ |
|
| 2244 |
+# The INCLUDE_PATH tag can be used to specify one or more directories that |
|
| 2245 |
+# contain include files that are not input files but should be processed by the |
|
| 2246 |
+# preprocessor. Note that the INCLUDE_PATH is not recursive, so the setting of |
|
| 2247 |
+# RECURSIVE has no effect here. |
|
| 2248 |
+# This tag requires that the tag SEARCH_INCLUDES is set to YES. |
|
| 2249 |
+ |
|
| 2250 |
+INCLUDE_PATH = |
|
| 2251 |
+ |
|
| 2252 |
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard |
|
| 2253 |
+# patterns (like *.h and *.hpp) to filter out the header-files in the |
|
| 2254 |
+# directories. If left blank, the patterns specified with FILE_PATTERNS will be |
|
| 2255 |
+# used. |
|
| 2256 |
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. |
|
| 2257 |
+ |
|
| 2258 |
+INCLUDE_FILE_PATTERNS = |
|
| 2259 |
+ |
|
| 2260 |
+# The PREDEFINED tag can be used to specify one or more macro names that are |
|
| 2261 |
+# defined before the preprocessor is started (similar to the -D option of e.g. |
|
| 2262 |
+# gcc). The argument of the tag is a list of macros of the form: name or |
|
| 2263 |
+# name=definition (no spaces). If the definition and the "=" are omitted, "=1" |
|
| 2264 |
+# is assumed. To prevent a macro definition from being undefined via #undef or |
|
| 2265 |
+# recursively expanded use the := operator instead of the = operator. |
|
| 2266 |
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. |
|
| 2267 |
+ |
|
| 2268 |
+PREDEFINED = |
|
| 2269 |
+ |
|
| 2270 |
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this |
|
| 2271 |
+# tag can be used to specify a list of macro names that should be expanded. The |
|
| 2272 |
+# macro definition that is found in the sources will be used. Use the PREDEFINED |
|
| 2273 |
+# tag if you want to use a different macro definition that overrules the |
|
| 2274 |
+# definition found in the source code. |
|
| 2275 |
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. |
|
| 2276 |
+ |
|
| 2277 |
+EXPAND_AS_DEFINED = |
|
| 2278 |
+ |
|
| 2279 |
+# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will |
|
| 2280 |
+# remove all references to function-like macros that are alone on a line, have |
|
| 2281 |
+# an all uppercase name, and do not end with a semicolon. Such function macros |
|
| 2282 |
+# are typically used for boiler-plate code, and will confuse the parser if not |
|
| 2283 |
+# removed. |
|
| 2284 |
+# The default value is: YES. |
|
| 2285 |
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. |
|
| 2286 |
+ |
|
| 2287 |
+SKIP_FUNCTION_MACROS = YES |
|
| 2288 |
+ |
|
| 2289 |
+#--------------------------------------------------------------------------- |
|
| 2290 |
+# Configuration options related to external references |
|
| 2291 |
+#--------------------------------------------------------------------------- |
|
| 2292 |
+ |
|
| 2293 |
+# The TAGFILES tag can be used to specify one or more tag files. For each tag |
|
| 2294 |
+# file the location of the external documentation should be added. The format of |
|
| 2295 |
+# a tag file without this location is as follows: |
|
| 2296 |
+# TAGFILES = file1 file2 ... |
|
| 2297 |
+# Adding location for the tag files is done as follows: |
|
| 2298 |
+# TAGFILES = file1=loc1 "file2 = loc2" ... |
|
| 2299 |
+# where loc1 and loc2 can be relative or absolute paths or URLs. See the |
|
| 2300 |
+# section "Linking to external documentation" for more information about the use |
|
| 2301 |
+# of tag files. |
|
| 2302 |
+# Note: Each tag file must have a unique name (where the name does NOT include |
|
| 2303 |
+# the path). If a tag file is not located in the directory in which doxygen is |
|
| 2304 |
+# run, you must also specify the path to the tagfile here. |
|
| 2305 |
+ |
|
| 2306 |
+TAGFILES = |
|
| 2307 |
+ |
|
| 2308 |
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create a |
|
| 2309 |
+# tag file that is based on the input files it reads. See section "Linking to |
|
| 2310 |
+# external documentation" for more information about the usage of tag files. |
|
| 2311 |
+ |
|
| 2312 |
+GENERATE_TAGFILE = doxygen.tag |
|
| 2313 |
+ |
|
| 2314 |
+# If the ALLEXTERNALS tag is set to YES, all external class will be listed in |
|
| 2315 |
+# the class index. If set to NO, only the inherited external classes will be |
|
| 2316 |
+# listed. |
|
| 2317 |
+# The default value is: NO. |
|
| 2318 |
+ |
|
| 2319 |
+ALLEXTERNALS = NO |
|
| 2320 |
+ |
|
| 2321 |
+# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed |
|
| 2322 |
+# in the modules index. If set to NO, only the current project's groups will be |
|
| 2323 |
+# listed. |
|
| 2324 |
+# The default value is: YES. |
|
| 2325 |
+ |
|
| 2326 |
+EXTERNAL_GROUPS = YES |
|
| 2327 |
+ |
|
| 2328 |
+# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in |
|
| 2329 |
+# the related pages index. If set to NO, only the current project's pages will |
|
| 2330 |
+# be listed. |
|
| 2331 |
+# The default value is: YES. |
|
| 2332 |
+ |
|
| 2333 |
+EXTERNAL_PAGES = YES |
|
| 2334 |
+ |
|
| 2335 |
+#--------------------------------------------------------------------------- |
|
| 2336 |
+# Configuration options related to the dot tool |
|
| 2337 |
+#--------------------------------------------------------------------------- |
|
| 2338 |
+ |
|
| 2339 |
+# You can include diagrams made with dia in doxygen documentation. Doxygen will |
|
| 2340 |
+# then run dia to produce the diagram and insert it in the documentation. The |
|
| 2341 |
+# DIA_PATH tag allows you to specify the directory where the dia binary resides. |
|
| 2342 |
+# If left empty dia is assumed to be found in the default search path. |
|
| 2343 |
+ |
|
| 2344 |
+DIA_PATH = |
|
| 2345 |
+ |
|
| 2346 |
+# If set to YES the inheritance and collaboration graphs will hide inheritance |
|
| 2347 |
+# and usage relations if the target is undocumented or is not a class. |
|
| 2348 |
+# The default value is: YES. |
|
| 2349 |
+ |
|
| 2350 |
+HIDE_UNDOC_RELATIONS = NO |
|
| 2351 |
+ |
|
| 2352 |
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is |
|
| 2353 |
+# available from the path. This tool is part of Graphviz (see: |
|
| 2354 |
+# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent |
|
| 2355 |
+# Bell Labs. The other options in this section have no effect if this option is |
|
| 2356 |
+# set to NO |
|
| 2357 |
+# The default value is: NO. |
|
| 2358 |
+ |
|
| 2359 |
+HAVE_DOT = YES |
|
| 2360 |
+ |
|
| 2361 |
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed |
|
| 2362 |
+# to run in parallel. When set to 0 doxygen will base this on the number of |
|
| 2363 |
+# processors available in the system. You can set it explicitly to a value |
|
| 2364 |
+# larger than 0 to get control over the balance between CPU load and processing |
|
| 2365 |
+# speed. |
|
| 2366 |
+# Minimum value: 0, maximum value: 32, default value: 0. |
|
| 2367 |
+# This tag requires that the tag HAVE_DOT is set to YES. |
|
| 2368 |
+ |
|
| 2369 |
+DOT_NUM_THREADS = 1 |
|
| 2370 |
+ |
|
| 2371 |
+# DOT_COMMON_ATTR is common attributes for nodes, edges and labels of |
|
| 2372 |
+# subgraphs. When you want a differently looking font in the dot files that |
|
| 2373 |
+# doxygen generates you can specify fontname, fontcolor and fontsize attributes. |
|
| 2374 |
+# For details please see <a href=https://graphviz.org/doc/info/attrs.html>Node, |
|
| 2375 |
+# Edge and Graph Attributes specification</a> You need to make sure dot is able |
|
| 2376 |
+# to find the font, which can be done by putting it in a standard location or by |
|
| 2377 |
+# setting the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the |
|
| 2378 |
+# directory containing the font. Default graphviz fontsize is 14. |
|
| 2379 |
+# The default value is: fontname=Helvetica,fontsize=10. |
|
| 2380 |
+# This tag requires that the tag HAVE_DOT is set to YES. |
|
| 2381 |
+ |
|
| 2382 |
+DOT_COMMON_ATTR = "fontname=Helvetica,fontsize=10" |
|
| 2383 |
+ |
|
| 2384 |
+# DOT_EDGE_ATTR is concatenated with DOT_COMMON_ATTR. For elegant style you can |
|
| 2385 |
+# add 'arrowhead=open, arrowtail=open, arrowsize=0.5'. <a |
|
| 2386 |
+# href=https://graphviz.org/doc/info/arrows.html>Complete documentation about |
|
| 2387 |
+# arrows shapes.</a> |
|
| 2388 |
+# The default value is: labelfontname=Helvetica,labelfontsize=10. |
|
| 2389 |
+# This tag requires that the tag HAVE_DOT is set to YES. |
|
| 2390 |
+ |
|
| 2391 |
+DOT_EDGE_ATTR = "labelfontname=Helvetica,labelfontsize=10" |
|
| 2392 |
+ |
|
| 2393 |
+# DOT_NODE_ATTR is concatenated with DOT_COMMON_ATTR. For view without boxes |
|
| 2394 |
+# around nodes set 'shape=plain' or 'shape=plaintext' <a |
|
| 2395 |
+# href=https://www.graphviz.org/doc/info/shapes.html>Shapes specification</a> |
|
| 2396 |
+# The default value is: shape=box,height=0.2,width=0.4. |
|
| 2397 |
+# This tag requires that the tag HAVE_DOT is set to YES. |
|
| 2398 |
+ |
|
| 2399 |
+DOT_NODE_ATTR = "shape=box,height=0.2,width=0.4" |
|
| 2400 |
+ |
|
| 2401 |
+# You can set the path where dot can find font specified with fontname in |
|
| 2402 |
+# DOT_COMMON_ATTR and others dot attributes. |
|
| 2403 |
+# This tag requires that the tag HAVE_DOT is set to YES. |
|
| 2404 |
+ |
|
| 2405 |
+DOT_FONTPATH = |
|
| 2406 |
+ |
|
| 2407 |
+# If the CLASS_GRAPH tag is set to YES (or GRAPH) then doxygen will generate a |
|
| 2408 |
+# graph for each documented class showing the direct and indirect inheritance |
|
| 2409 |
+# relations. In case HAVE_DOT is set as well dot will be used to draw the graph, |
|
| 2410 |
+# otherwise the built-in generator will be used. If the CLASS_GRAPH tag is set |
|
| 2411 |
+# to TEXT the direct and indirect inheritance relations will be shown as texts / |
|
| 2412 |
+# links. |
|
| 2413 |
+# Possible values are: NO, YES, TEXT and GRAPH. |
|
| 2414 |
+# The default value is: YES. |
|
| 2415 |
+ |
|
| 2416 |
+CLASS_GRAPH = YES |
|
| 2417 |
+ |
|
| 2418 |
+# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a |
|
| 2419 |
+# graph for each documented class showing the direct and indirect implementation |
|
| 2420 |
+# dependencies (inheritance, containment, and class references variables) of the |
|
| 2421 |
+# class with other documented classes. |
|
| 2422 |
+# The default value is: YES. |
|
| 2423 |
+# This tag requires that the tag HAVE_DOT is set to YES. |
|
| 2424 |
+ |
|
| 2425 |
+COLLABORATION_GRAPH = YES |
|
| 2426 |
+ |
|
| 2427 |
+# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for |
|
| 2428 |
+# groups, showing the direct groups dependencies. See also the chapter Grouping |
|
| 2429 |
+# in the manual. |
|
| 2430 |
+# The default value is: YES. |
|
| 2431 |
+# This tag requires that the tag HAVE_DOT is set to YES. |
|
| 2432 |
+ |
|
| 2433 |
+GROUP_GRAPHS = YES |
|
| 2434 |
+ |
|
| 2435 |
+# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and |
|
| 2436 |
+# collaboration diagrams in a style similar to the OMG's Unified Modeling |
|
| 2437 |
+# Language. |
|
| 2438 |
+# The default value is: NO. |
|
| 2439 |
+# This tag requires that the tag HAVE_DOT is set to YES. |
|
| 2440 |
+ |
|
| 2441 |
+UML_LOOK = NO |
|
| 2442 |
+ |
|
| 2443 |
+# If the UML_LOOK tag is enabled, the fields and methods are shown inside the |
|
| 2444 |
+# class node. If there are many fields or methods and many nodes the graph may |
|
| 2445 |
+# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the |
|
| 2446 |
+# number of items for each type to make the size more manageable. Set this to 0 |
|
| 2447 |
+# for no limit. Note that the threshold may be exceeded by 50% before the limit |
|
| 2448 |
+# is enforced. So when you set the threshold to 10, up to 15 fields may appear, |
|
| 2449 |
+# but if the number exceeds 15, the total amount of fields shown is limited to |
|
| 2450 |
+# 10. |
|
| 2451 |
+# Minimum value: 0, maximum value: 100, default value: 10. |
|
| 2452 |
+# This tag requires that the tag UML_LOOK is set to YES. |
|
| 2453 |
+ |
|
| 2454 |
+UML_LIMIT_NUM_FIELDS = 10 |
|
| 2455 |
+ |
|
| 2456 |
+# If the DOT_UML_DETAILS tag is set to NO, doxygen will show attributes and |
|
| 2457 |
+# methods without types and arguments in the UML graphs. If the DOT_UML_DETAILS |
|
| 2458 |
+# tag is set to YES, doxygen will add type and arguments for attributes and |
|
| 2459 |
+# methods in the UML graphs. If the DOT_UML_DETAILS tag is set to NONE, doxygen |
|
| 2460 |
+# will not generate fields with class member information in the UML graphs. The |
|
| 2461 |
+# class diagrams will look similar to the default class diagrams but using UML |
|
| 2462 |
+# notation for the relationships. |
|
| 2463 |
+# Possible values are: NO, YES and NONE. |
|
| 2464 |
+# The default value is: NO. |
|
| 2465 |
+# This tag requires that the tag UML_LOOK is set to YES. |
|
| 2466 |
+ |
|
| 2467 |
+DOT_UML_DETAILS = NO |
|
| 2468 |
+ |
|
| 2469 |
+# The DOT_WRAP_THRESHOLD tag can be used to set the maximum number of characters |
|
| 2470 |
+# to display on a single line. If the actual line length exceeds this threshold |
|
| 2471 |
+# significantly it will wrapped across multiple lines. Some heuristics are apply |
|
| 2472 |
+# to avoid ugly line breaks. |
|
| 2473 |
+# Minimum value: 0, maximum value: 1000, default value: 17. |
|
| 2474 |
+# This tag requires that the tag HAVE_DOT is set to YES. |
|
| 2475 |
+ |
|
| 2476 |
+DOT_WRAP_THRESHOLD = 17 |
|
| 2477 |
+ |
|
| 2478 |
+# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and |
|
| 2479 |
+# collaboration graphs will show the relations between templates and their |
|
| 2480 |
+# instances. |
|
| 2481 |
+# The default value is: NO. |
|
| 2482 |
+# This tag requires that the tag HAVE_DOT is set to YES. |
|
| 2483 |
+ |
|
| 2484 |
+TEMPLATE_RELATIONS = YES |
|
| 2485 |
+ |
|
| 2486 |
+# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to |
|
| 2487 |
+# YES then doxygen will generate a graph for each documented file showing the |
|
| 2488 |
+# direct and indirect include dependencies of the file with other documented |
|
| 2489 |
+# files. |
|
| 2490 |
+# The default value is: YES. |
|
| 2491 |
+# This tag requires that the tag HAVE_DOT is set to YES. |
|
| 2492 |
+ |
|
| 2493 |
+INCLUDE_GRAPH = YES |
|
| 2494 |
+ |
|
| 2495 |
+# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are |
|
| 2496 |
+# set to YES then doxygen will generate a graph for each documented file showing |
|
| 2497 |
+# the direct and indirect include dependencies of the file with other documented |
|
| 2498 |
+# files. |
|
| 2499 |
+# The default value is: YES. |
|
| 2500 |
+# This tag requires that the tag HAVE_DOT is set to YES. |
|
| 2501 |
+ |
|
| 2502 |
+INCLUDED_BY_GRAPH = YES |
|
| 2503 |
+ |
|
| 2504 |
+# If the CALL_GRAPH tag is set to YES then doxygen will generate a call |
|
| 2505 |
+# dependency graph for every global function or class method. |
|
| 2506 |
+# |
|
| 2507 |
+# Note that enabling this option will significantly increase the time of a run. |
|
| 2508 |
+# So in most cases it will be better to enable call graphs for selected |
|
| 2509 |
+# functions only using the \callgraph command. Disabling a call graph can be |
|
| 2510 |
+# accomplished by means of the command \hidecallgraph. |
|
| 2511 |
+# The default value is: NO. |
|
| 2512 |
+# This tag requires that the tag HAVE_DOT is set to YES. |
|
| 2513 |
+ |
|
| 2514 |
+CALL_GRAPH = YES |
|
| 2515 |
+ |
|
| 2516 |
+# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller |
|
| 2517 |
+# dependency graph for every global function or class method. |
|
| 2518 |
+# |
|
| 2519 |
+# Note that enabling this option will significantly increase the time of a run. |
|
| 2520 |
+# So in most cases it will be better to enable caller graphs for selected |
|
| 2521 |
+# functions only using the \callergraph command. Disabling a caller graph can be |
|
| 2522 |
+# accomplished by means of the command \hidecallergraph. |
|
| 2523 |
+# The default value is: NO. |
|
| 2524 |
+# This tag requires that the tag HAVE_DOT is set to YES. |
|
| 2525 |
+ |
|
| 2526 |
+CALLER_GRAPH = YES |
|
| 2527 |
+ |
|
| 2528 |
+# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical |
|
| 2529 |
+# hierarchy of all classes instead of a textual one. |
|
| 2530 |
+# The default value is: YES. |
|
| 2531 |
+# This tag requires that the tag HAVE_DOT is set to YES. |
|
| 2532 |
+ |
|
| 2533 |
+GRAPHICAL_HIERARCHY = YES |
|
| 2534 |
+ |
|
| 2535 |
+# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the |
|
| 2536 |
+# dependencies a directory has on other directories in a graphical way. The |
|
| 2537 |
+# dependency relations are determined by the #include relations between the |
|
| 2538 |
+# files in the directories. |
|
| 2539 |
+# The default value is: YES. |
|
| 2540 |
+# This tag requires that the tag HAVE_DOT is set to YES. |
|
| 2541 |
+ |
|
| 2542 |
+DIRECTORY_GRAPH = YES |
|
| 2543 |
+ |
|
| 2544 |
+# The DIR_GRAPH_MAX_DEPTH tag can be used to limit the maximum number of levels |
|
| 2545 |
+# of child directories generated in directory dependency graphs by dot. |
|
| 2546 |
+# Minimum value: 1, maximum value: 25, default value: 1. |
|
| 2547 |
+# This tag requires that the tag DIRECTORY_GRAPH is set to YES. |
|
| 2548 |
+ |
|
| 2549 |
+DIR_GRAPH_MAX_DEPTH = 1 |
|
| 2550 |
+ |
|
| 2551 |
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images |
|
| 2552 |
+# generated by dot. For an explanation of the image formats see the section |
|
| 2553 |
+# output formats in the documentation of the dot tool (Graphviz (see: |
|
| 2554 |
+# http://www.graphviz.org/)). |
|
| 2555 |
+# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order |
|
| 2556 |
+# to make the SVG files visible in IE 9+ (other browsers do not have this |
|
| 2557 |
+# requirement). |
|
| 2558 |
+# Possible values are: png, jpg, gif, svg, png:gd, png:gd:gd, png:cairo, |
|
| 2559 |
+# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and |
|
| 2560 |
+# png:gdiplus:gdiplus. |
|
| 2561 |
+# The default value is: png. |
|
| 2562 |
+# This tag requires that the tag HAVE_DOT is set to YES. |
|
| 2563 |
+ |
|
| 2564 |
+DOT_IMAGE_FORMAT = svg |
|
| 2565 |
+ |
|
| 2566 |
+# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to |
|
| 2567 |
+# enable generation of interactive SVG images that allow zooming and panning. |
|
| 2568 |
+# |
|
| 2569 |
+# Note that this requires a modern browser other than Internet Explorer. Tested |
|
| 2570 |
+# and working are Firefox, Chrome, Safari, and Opera. |
|
| 2571 |
+# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make |
|
| 2572 |
+# the SVG files visible. Older versions of IE do not have SVG support. |
|
| 2573 |
+# The default value is: NO. |
|
| 2574 |
+# This tag requires that the tag HAVE_DOT is set to YES. |
|
| 2575 |
+ |
|
| 2576 |
+INTERACTIVE_SVG = YES |
|
| 2577 |
+ |
|
| 2578 |
+# The DOT_PATH tag can be used to specify the path where the dot tool can be |
|
| 2579 |
+# found. If left blank, it is assumed the dot tool can be found in the path. |
|
| 2580 |
+# This tag requires that the tag HAVE_DOT is set to YES. |
|
| 2581 |
+ |
|
| 2582 |
+DOT_PATH = |
|
| 2583 |
+ |
|
| 2584 |
+# The DOTFILE_DIRS tag can be used to specify one or more directories that |
|
| 2585 |
+# contain dot files that are included in the documentation (see the \dotfile |
|
| 2586 |
+# command). |
|
| 2587 |
+# This tag requires that the tag HAVE_DOT is set to YES. |
|
| 2588 |
+ |
|
| 2589 |
+DOTFILE_DIRS = |
|
| 2590 |
+ |
|
| 2591 |
+# The MSCFILE_DIRS tag can be used to specify one or more directories that |
|
| 2592 |
+# contain msc files that are included in the documentation (see the \mscfile |
|
| 2593 |
+# command). |
|
| 2594 |
+ |
|
| 2595 |
+MSCFILE_DIRS = |
|
| 2596 |
+ |
|
| 2597 |
+# The DIAFILE_DIRS tag can be used to specify one or more directories that |
|
| 2598 |
+# contain dia files that are included in the documentation (see the \diafile |
|
| 2599 |
+# command). |
|
| 2600 |
+ |
|
| 2601 |
+DIAFILE_DIRS = |
|
| 2602 |
+ |
|
| 2603 |
+# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the |
|
| 2604 |
+# path where java can find the plantuml.jar file or to the filename of jar file |
|
| 2605 |
+# to be used. If left blank, it is assumed PlantUML is not used or called during |
|
| 2606 |
+# a preprocessing step. Doxygen will generate a warning when it encounters a |
|
| 2607 |
+# \startuml command in this case and will not generate output for the diagram. |
|
| 2608 |
+ |
|
| 2609 |
+PLANTUML_JAR_PATH = |
|
| 2610 |
+ |
|
| 2611 |
+# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a |
|
| 2612 |
+# configuration file for plantuml. |
|
| 2613 |
+ |
|
| 2614 |
+PLANTUML_CFG_FILE = |
|
| 2615 |
+ |
|
| 2616 |
+# When using plantuml, the specified paths are searched for files specified by |
|
| 2617 |
+# the !include statement in a plantuml block. |
|
| 2618 |
+ |
|
| 2619 |
+PLANTUML_INCLUDE_PATH = |
|
| 2620 |
+ |
|
| 2621 |
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes |
|
| 2622 |
+# that will be shown in the graph. If the number of nodes in a graph becomes |
|
| 2623 |
+# larger than this value, doxygen will truncate the graph, which is visualized |
|
| 2624 |
+# by representing a node as a red box. Note that doxygen if the number of direct |
|
| 2625 |
+# children of the root node in a graph is already larger than |
|
| 2626 |
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that |
|
| 2627 |
+# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. |
|
| 2628 |
+# Minimum value: 0, maximum value: 10000, default value: 50. |
|
| 2629 |
+# This tag requires that the tag HAVE_DOT is set to YES. |
|
| 2630 |
+ |
|
| 2631 |
+DOT_GRAPH_MAX_NODES = 100 |
|
| 2632 |
+ |
|
| 2633 |
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs |
|
| 2634 |
+# generated by dot. A depth value of 3 means that only nodes reachable from the |
|
| 2635 |
+# root by following a path via at most 3 edges will be shown. Nodes that lay |
|
| 2636 |
+# further from the root node will be omitted. Note that setting this option to 1 |
|
| 2637 |
+# or 2 may greatly reduce the computation time needed for large code bases. Also |
|
| 2638 |
+# note that the size of a graph can be further restricted by |
|
| 2639 |
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. |
|
| 2640 |
+# Minimum value: 0, maximum value: 1000, default value: 0. |
|
| 2641 |
+# This tag requires that the tag HAVE_DOT is set to YES. |
|
| 2642 |
+ |
|
| 2643 |
+MAX_DOT_GRAPH_DEPTH = 0 |
|
| 2644 |
+ |
|
| 2645 |
+# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output |
|
| 2646 |
+# files in one run (i.e. multiple -o and -T options on the command line). This |
|
| 2647 |
+# makes dot run faster, but since only newer versions of dot (>1.8.10) support |
|
| 2648 |
+# this, this feature is disabled by default. |
|
| 2649 |
+# The default value is: NO. |
|
| 2650 |
+# This tag requires that the tag HAVE_DOT is set to YES. |
|
| 2651 |
+ |
|
| 2652 |
+DOT_MULTI_TARGETS = NO |
|
| 2653 |
+ |
|
| 2654 |
+# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page |
|
| 2655 |
+# explaining the meaning of the various boxes and arrows in the dot generated |
|
| 2656 |
+# graphs. |
|
| 2657 |
+# Note: This tag requires that UML_LOOK isn't set, i.e. the doxygen internal |
|
| 2658 |
+# graphical representation for inheritance and collaboration diagrams is used. |
|
| 2659 |
+# The default value is: YES. |
|
| 2660 |
+# This tag requires that the tag HAVE_DOT is set to YES. |
|
| 2661 |
+ |
|
| 2662 |
+GENERATE_LEGEND = YES |
|
| 2663 |
+ |
|
| 2664 |
+# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate |
|
| 2665 |
+# files that are used to generate the various graphs. |
|
| 2666 |
+# |
|
| 2667 |
+# Note: This setting is not only used for dot files but also for msc temporary |
|
| 2668 |
+# files. |
|
| 2669 |
+# The default value is: YES. |
|
| 2670 |
+ |
|
| 2671 |
+DOT_CLEANUP = NO |
| 0 | 2672 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,21 @@ |
| 1 |
+DOXYGEN = doxygen |
|
| 2 |
+ |
|
| 3 |
+DOC_DIR = html |
|
| 4 |
+DOC_TAG = doxygen.tag |
|
| 5 |
+DOC_LOG = warnings.log |
|
| 6 |
+ |
|
| 7 |
+SRC_FILES := $(wildcard ../src/*.c ../src/*.h) |
|
| 8 |
+ |
|
| 9 |
+.PHONY: all |
|
| 10 |
+all: html |
|
| 11 |
+ |
|
| 12 |
+html: $(SRC_FILES) |
|
| 13 |
+ rm -rf html |
|
| 14 |
+ $(DOXYGEN) Doxyfile |
|
| 15 |
+ |
|
| 16 |
+.PHONY: clean |
|
| 17 |
+clean: |
|
| 18 |
+ rm -rf $(DOC_DIR) |
|
| 19 |
+ rm -f $(DOC_TAG) |
|
| 20 |
+ rm -f $(DOC_LOG) |
|
| 21 |
+ |
| 0 | 22 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,269 @@ |
| 1 |
+;******************** (C) COPYRIGHT 2016 STMicroelectronics ******************** |
|
| 2 |
+;* File Name : startup_stm32f072xb.s |
|
| 3 |
+;* Author : MCD Application Team |
|
| 4 |
+;* Description : STM32F072x8/STM32F072xB devices vector table for MDK-ARM toolchain. |
|
| 5 |
+;* This module performs: |
|
| 6 |
+;* - Set the initial SP |
|
| 7 |
+;* - Set the initial PC == Reset_Handler |
|
| 8 |
+;* - Set the vector table entries with the exceptions ISR address |
|
| 9 |
+;* - Branches to __main in the C library (which eventually |
|
| 10 |
+;* calls main()). |
|
| 11 |
+;* After Reset the CortexM0 processor is in Thread mode, |
|
| 12 |
+;* priority is Privileged, and the Stack is set to Main. |
|
| 13 |
+;* <<< Use Configuration Wizard in Context Menu >>> |
|
| 14 |
+;******************************************************************************* |
|
| 15 |
+;* |
|
| 16 |
+;* Redistribution and use in source and binary forms, with or without modification, |
|
| 17 |
+;* are permitted provided that the following conditions are met: |
|
| 18 |
+;* 1. Redistributions of source code must retain the above copyright notice, |
|
| 19 |
+;* this list of conditions and the following disclaimer. |
|
| 20 |
+;* 2. Redistributions in binary form must reproduce the above copyright notice, |
|
| 21 |
+;* this list of conditions and the following disclaimer in the documentation |
|
| 22 |
+;* and/or other materials provided with the distribution. |
|
| 23 |
+;* 3. Neither the name of STMicroelectronics nor the names of its contributors |
|
| 24 |
+;* may be used to endorse or promote products derived from this software |
|
| 25 |
+;* without specific prior written permission. |
|
| 26 |
+;* |
|
| 27 |
+;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
|
| 28 |
+;* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
|
| 29 |
+;* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
|
| 30 |
+;* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
|
| 31 |
+;* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
|
| 32 |
+;* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
|
| 33 |
+;* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
|
| 34 |
+;* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
|
| 35 |
+;* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
|
| 36 |
+;* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
| 37 |
+; |
|
| 38 |
+;******************************************************************************* |
|
| 39 |
+ |
|
| 40 |
+; Amount of memory (in bytes) allocated for Stack |
|
| 41 |
+; Tailor this value to your application needs |
|
| 42 |
+; <h> Stack Configuration |
|
| 43 |
+; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> |
|
| 44 |
+; </h> |
|
| 45 |
+ |
|
| 46 |
+Stack_Size EQU 0x00000800 |
|
| 47 |
+ |
|
| 48 |
+ AREA STACK, NOINIT, READWRITE, ALIGN=3 |
|
| 49 |
+Stack_Mem SPACE Stack_Size |
|
| 50 |
+__initial_sp |
|
| 51 |
+ |
|
| 52 |
+ |
|
| 53 |
+; <h> Heap Configuration |
|
| 54 |
+; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> |
|
| 55 |
+; </h> |
|
| 56 |
+ |
|
| 57 |
+Heap_Size EQU 0x00000010 |
|
| 58 |
+ |
|
| 59 |
+ AREA HEAP, NOINIT, READWRITE, ALIGN=3 |
|
| 60 |
+__heap_base |
|
| 61 |
+Heap_Mem SPACE Heap_Size |
|
| 62 |
+__heap_limit |
|
| 63 |
+ |
|
| 64 |
+ PRESERVE8 |
|
| 65 |
+ THUMB |
|
| 66 |
+ |
|
| 67 |
+ |
|
| 68 |
+; Vector Table Mapped to Address 0 at Reset |
|
| 69 |
+ AREA RESET, DATA, READONLY |
|
| 70 |
+ EXPORT __Vectors |
|
| 71 |
+ EXPORT __Vectors_End |
|
| 72 |
+ EXPORT __Vectors_Size |
|
| 73 |
+ |
|
| 74 |
+__Vectors DCD __initial_sp ; Top of Stack |
|
| 75 |
+ DCD Reset_Handler ; Reset Handler |
|
| 76 |
+ DCD NMI_Handler ; NMI Handler |
|
| 77 |
+ DCD HardFault_Handler ; Hard Fault Handler |
|
| 78 |
+ DCD 0 ; Reserved |
|
| 79 |
+ DCD 0 ; Reserved |
|
| 80 |
+ DCD 0 ; Reserved |
|
| 81 |
+ DCD 0 ; Reserved |
|
| 82 |
+ DCD 0 ; Reserved |
|
| 83 |
+ DCD 0 ; Reserved |
|
| 84 |
+ DCD 0 ; Reserved |
|
| 85 |
+ DCD SVC_Handler ; SVCall Handler |
|
| 86 |
+ DCD 0 ; Reserved |
|
| 87 |
+ DCD 0 ; Reserved |
|
| 88 |
+ DCD PendSV_Handler ; PendSV Handler |
|
| 89 |
+ DCD SysTick_Handler ; SysTick Handler |
|
| 90 |
+ |
|
| 91 |
+ ; External Interrupts |
|
| 92 |
+ DCD WWDG_IRQHandler ; Window Watchdog |
|
| 93 |
+ DCD PVD_VDDIO2_IRQHandler ; PVD through EXTI Line detect |
|
| 94 |
+ DCD RTC_IRQHandler ; RTC through EXTI Line |
|
| 95 |
+ DCD FLASH_IRQHandler ; FLASH |
|
| 96 |
+ DCD RCC_CRS_IRQHandler ; RCC and CRS |
|
| 97 |
+ DCD EXTI0_1_IRQHandler ; EXTI Line 0 and 1 |
|
| 98 |
+ DCD EXTI2_3_IRQHandler ; EXTI Line 2 and 3 |
|
| 99 |
+ DCD EXTI4_15_IRQHandler ; EXTI Line 4 to 15 |
|
| 100 |
+ DCD TSC_IRQHandler ; TS |
|
| 101 |
+ DCD DMA1_Channel1_IRQHandler ; DMA1 Channel 1 |
|
| 102 |
+ DCD DMA1_Channel2_3_IRQHandler ; DMA1 Channel 2 and Channel 3 |
|
| 103 |
+ DCD DMA1_Channel4_5_6_7_IRQHandler ; DMA1 Channel 4, Channel 5, Channel 6 and Channel 7 |
|
| 104 |
+ DCD ADC1_COMP_IRQHandler ; ADC1, COMP1 and COMP2 |
|
| 105 |
+ DCD TIM1_BRK_UP_TRG_COM_IRQHandler ; TIM1 Break, Update, Trigger and Commutation |
|
| 106 |
+ DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare |
|
| 107 |
+ DCD TIM2_IRQHandler ; TIM2 |
|
| 108 |
+ DCD TIM3_IRQHandler ; TIM3 |
|
| 109 |
+ DCD TIM6_DAC_IRQHandler ; TIM6 and DAC |
|
| 110 |
+ DCD TIM7_IRQHandler ; TIM7 |
|
| 111 |
+ DCD TIM14_IRQHandler ; TIM14 |
|
| 112 |
+ DCD TIM15_IRQHandler ; TIM15 |
|
| 113 |
+ DCD TIM16_IRQHandler ; TIM16 |
|
| 114 |
+ DCD TIM17_IRQHandler ; TIM17 |
|
| 115 |
+ DCD I2C1_IRQHandler ; I2C1 |
|
| 116 |
+ DCD I2C2_IRQHandler ; I2C2 |
|
| 117 |
+ DCD SPI1_IRQHandler ; SPI1 |
|
| 118 |
+ DCD SPI2_IRQHandler ; SPI2 |
|
| 119 |
+ DCD USART1_IRQHandler ; USART1 |
|
| 120 |
+ DCD USART2_IRQHandler ; USART2 |
|
| 121 |
+ DCD USART3_4_IRQHandler ; USART3 & USART4 |
|
| 122 |
+ DCD CEC_CAN_IRQHandler ; CEC and CAN |
|
| 123 |
+ DCD USB_IRQHandler ; USB |
|
| 124 |
+ |
|
| 125 |
+__Vectors_End |
|
| 126 |
+ |
|
| 127 |
+__Vectors_Size EQU __Vectors_End - __Vectors |
|
| 128 |
+ |
|
| 129 |
+ AREA |.text|, CODE, READONLY |
|
| 130 |
+ |
|
| 131 |
+; Reset handler routine |
|
| 132 |
+Reset_Handler PROC |
|
| 133 |
+ EXPORT Reset_Handler [WEAK] |
|
| 134 |
+ IMPORT __main |
|
| 135 |
+ IMPORT SystemInit |
|
| 136 |
+ LDR R0, =SystemInit |
|
| 137 |
+ BLX R0 |
|
| 138 |
+ LDR R0, =__main |
|
| 139 |
+ BX R0 |
|
| 140 |
+ ENDP |
|
| 141 |
+ |
|
| 142 |
+; Dummy Exception Handlers (infinite loops which can be modified) |
|
| 143 |
+ |
|
| 144 |
+NMI_Handler PROC |
|
| 145 |
+ EXPORT NMI_Handler [WEAK] |
|
| 146 |
+ B . |
|
| 147 |
+ ENDP |
|
| 148 |
+HardFault_Handler\ |
|
| 149 |
+ PROC |
|
| 150 |
+ EXPORT HardFault_Handler [WEAK] |
|
| 151 |
+ B . |
|
| 152 |
+ ENDP |
|
| 153 |
+SVC_Handler PROC |
|
| 154 |
+ EXPORT SVC_Handler [WEAK] |
|
| 155 |
+ B . |
|
| 156 |
+ ENDP |
|
| 157 |
+PendSV_Handler PROC |
|
| 158 |
+ EXPORT PendSV_Handler [WEAK] |
|
| 159 |
+ B . |
|
| 160 |
+ ENDP |
|
| 161 |
+SysTick_Handler PROC |
|
| 162 |
+ EXPORT SysTick_Handler [WEAK] |
|
| 163 |
+ B . |
|
| 164 |
+ ENDP |
|
| 165 |
+ |
|
| 166 |
+Default_Handler PROC |
|
| 167 |
+ |
|
| 168 |
+ EXPORT WWDG_IRQHandler [WEAK] |
|
| 169 |
+ EXPORT PVD_VDDIO2_IRQHandler [WEAK] |
|
| 170 |
+ EXPORT RTC_IRQHandler [WEAK] |
|
| 171 |
+ EXPORT FLASH_IRQHandler [WEAK] |
|
| 172 |
+ EXPORT RCC_CRS_IRQHandler [WEAK] |
|
| 173 |
+ EXPORT EXTI0_1_IRQHandler [WEAK] |
|
| 174 |
+ EXPORT EXTI2_3_IRQHandler [WEAK] |
|
| 175 |
+ EXPORT EXTI4_15_IRQHandler [WEAK] |
|
| 176 |
+ EXPORT TSC_IRQHandler [WEAK] |
|
| 177 |
+ EXPORT DMA1_Channel1_IRQHandler [WEAK] |
|
| 178 |
+ EXPORT DMA1_Channel2_3_IRQHandler [WEAK] |
|
| 179 |
+ EXPORT DMA1_Channel4_5_6_7_IRQHandler [WEAK] |
|
| 180 |
+ EXPORT ADC1_COMP_IRQHandler [WEAK] |
|
| 181 |
+ EXPORT TIM1_BRK_UP_TRG_COM_IRQHandler [WEAK] |
|
| 182 |
+ EXPORT TIM1_CC_IRQHandler [WEAK] |
|
| 183 |
+ EXPORT TIM2_IRQHandler [WEAK] |
|
| 184 |
+ EXPORT TIM3_IRQHandler [WEAK] |
|
| 185 |
+ EXPORT TIM6_DAC_IRQHandler [WEAK] |
|
| 186 |
+ EXPORT TIM7_IRQHandler [WEAK] |
|
| 187 |
+ EXPORT TIM14_IRQHandler [WEAK] |
|
| 188 |
+ EXPORT TIM15_IRQHandler [WEAK] |
|
| 189 |
+ EXPORT TIM16_IRQHandler [WEAK] |
|
| 190 |
+ EXPORT TIM17_IRQHandler [WEAK] |
|
| 191 |
+ EXPORT I2C1_IRQHandler [WEAK] |
|
| 192 |
+ EXPORT I2C2_IRQHandler [WEAK] |
|
| 193 |
+ EXPORT SPI1_IRQHandler [WEAK] |
|
| 194 |
+ EXPORT SPI2_IRQHandler [WEAK] |
|
| 195 |
+ EXPORT USART1_IRQHandler [WEAK] |
|
| 196 |
+ EXPORT USART2_IRQHandler [WEAK] |
|
| 197 |
+ EXPORT USART3_4_IRQHandler [WEAK] |
|
| 198 |
+ EXPORT CEC_CAN_IRQHandler [WEAK] |
|
| 199 |
+ EXPORT USB_IRQHandler [WEAK] |
|
| 200 |
+ |
|
| 201 |
+ |
|
| 202 |
+WWDG_IRQHandler |
|
| 203 |
+PVD_VDDIO2_IRQHandler |
|
| 204 |
+RTC_IRQHandler |
|
| 205 |
+FLASH_IRQHandler |
|
| 206 |
+RCC_CRS_IRQHandler |
|
| 207 |
+EXTI0_1_IRQHandler |
|
| 208 |
+EXTI2_3_IRQHandler |
|
| 209 |
+EXTI4_15_IRQHandler |
|
| 210 |
+TSC_IRQHandler |
|
| 211 |
+DMA1_Channel1_IRQHandler |
|
| 212 |
+DMA1_Channel2_3_IRQHandler |
|
| 213 |
+DMA1_Channel4_5_6_7_IRQHandler |
|
| 214 |
+ADC1_COMP_IRQHandler |
|
| 215 |
+TIM1_BRK_UP_TRG_COM_IRQHandler |
|
| 216 |
+TIM1_CC_IRQHandler |
|
| 217 |
+TIM2_IRQHandler |
|
| 218 |
+TIM3_IRQHandler |
|
| 219 |
+TIM6_DAC_IRQHandler |
|
| 220 |
+TIM7_IRQHandler |
|
| 221 |
+TIM14_IRQHandler |
|
| 222 |
+TIM15_IRQHandler |
|
| 223 |
+TIM16_IRQHandler |
|
| 224 |
+TIM17_IRQHandler |
|
| 225 |
+I2C1_IRQHandler |
|
| 226 |
+I2C2_IRQHandler |
|
| 227 |
+SPI1_IRQHandler |
|
| 228 |
+SPI2_IRQHandler |
|
| 229 |
+USART1_IRQHandler |
|
| 230 |
+USART2_IRQHandler |
|
| 231 |
+USART3_4_IRQHandler |
|
| 232 |
+CEC_CAN_IRQHandler |
|
| 233 |
+USB_IRQHandler |
|
| 234 |
+ |
|
| 235 |
+ B . |
|
| 236 |
+ |
|
| 237 |
+ ENDP |
|
| 238 |
+ |
|
| 239 |
+ ALIGN |
|
| 240 |
+ |
|
| 241 |
+;******************************************************************************* |
|
| 242 |
+; User Stack and Heap initialization |
|
| 243 |
+;******************************************************************************* |
|
| 244 |
+ IF :DEF:__MICROLIB |
|
| 245 |
+ |
|
| 246 |
+ EXPORT __initial_sp |
|
| 247 |
+ EXPORT __heap_base |
|
| 248 |
+ EXPORT __heap_limit |
|
| 249 |
+ |
|
| 250 |
+ ELSE |
|
| 251 |
+ |
|
| 252 |
+ IMPORT __use_two_region_memory |
|
| 253 |
+ EXPORT __user_initial_stackheap |
|
| 254 |
+ |
|
| 255 |
+__user_initial_stackheap |
|
| 256 |
+ |
|
| 257 |
+ LDR R0, = Heap_Mem |
|
| 258 |
+ LDR R1, =(Stack_Mem + Stack_Size) |
|
| 259 |
+ LDR R2, = (Heap_Mem + Heap_Size) |
|
| 260 |
+ LDR R3, = Stack_Mem |
|
| 261 |
+ BX LR |
|
| 262 |
+ |
|
| 263 |
+ ALIGN |
|
| 264 |
+ |
|
| 265 |
+ ENDIF |
|
| 266 |
+ |
|
| 267 |
+ END |
|
| 268 |
+ |
|
| 269 |
+;************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE***** |
| 0 | 270 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,374 @@ |
| 1 |
+/** |
|
| 2 |
+ ****************************************************************************** |
|
| 3 |
+ * @file stm32f0xx_hal_conf.h |
|
| 4 |
+ * @author MCD Application Team |
|
| 5 |
+ * @brief HAL configuration file. |
|
| 6 |
+ * |
|
| 7 |
+ * @note modified by ARM |
|
| 8 |
+ * The modifications allow to use this file as User Code Template |
|
| 9 |
+ * within the Device Family Pack. |
|
| 10 |
+ ****************************************************************************** |
|
| 11 |
+ * @attention |
|
| 12 |
+ * |
|
| 13 |
+ * <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2> |
|
| 14 |
+ * |
|
| 15 |
+ * Redistribution and use in source and binary forms, with or without modification, |
|
| 16 |
+ * are permitted provided that the following conditions are met: |
|
| 17 |
+ * 1. Redistributions of source code must retain the above copyright notice, |
|
| 18 |
+ * this list of conditions and the following disclaimer. |
|
| 19 |
+ * 2. Redistributions in binary form must reproduce the above copyright notice, |
|
| 20 |
+ * this list of conditions and the following disclaimer in the documentation |
|
| 21 |
+ * and/or other materials provided with the distribution. |
|
| 22 |
+ * 3. Neither the name of STMicroelectronics nor the names of its contributors |
|
| 23 |
+ * may be used to endorse or promote products derived from this software |
|
| 24 |
+ * without specific prior written permission. |
|
| 25 |
+ * |
|
| 26 |
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
|
| 27 |
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
|
| 28 |
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
|
| 29 |
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
|
| 30 |
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
|
| 31 |
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
|
| 32 |
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
|
| 33 |
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
|
| 34 |
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
|
| 35 |
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
| 36 |
+ * |
|
| 37 |
+ ****************************************************************************** |
|
| 38 |
+ */ |
|
| 39 |
+ |
|
| 40 |
+/* Define to prevent recursive inclusion -------------------------------------*/ |
|
| 41 |
+#ifndef __STM32F0xx_HAL_CONF_H |
|
| 42 |
+#define __STM32F0xx_HAL_CONF_H |
|
| 43 |
+ |
|
| 44 |
+#ifdef _RTE_ |
|
| 45 |
+#include "RTE_Components.h" /* Component selection */ |
|
| 46 |
+#endif |
|
| 47 |
+ |
|
| 48 |
+#ifdef __cplusplus |
|
| 49 |
+ extern "C" {
|
|
| 50 |
+#endif |
|
| 51 |
+ |
|
| 52 |
+/* Exported types ------------------------------------------------------------*/ |
|
| 53 |
+/* Exported constants --------------------------------------------------------*/ |
|
| 54 |
+ |
|
| 55 |
+/* ########################## Module Selection ############################## */ |
|
| 56 |
+/** |
|
| 57 |
+ * @brief This is the list of modules to be used in the HAL driver |
|
| 58 |
+ */ |
|
| 59 |
+#ifdef RTE_DEVICE_HAL_COMMON |
|
| 60 |
+#define HAL_MODULE_ENABLED |
|
| 61 |
+#endif |
|
| 62 |
+#ifdef RTE_DEVICE_HAL_ADC |
|
| 63 |
+#define HAL_ADC_MODULE_ENABLED |
|
| 64 |
+#endif |
|
| 65 |
+#ifdef RTE_DEVICE_HAL_CAN |
|
| 66 |
+#define HAL_CAN_MODULE_ENABLED |
|
| 67 |
+#endif |
|
| 68 |
+#ifdef RTE_DEVICE_HAL_CEC |
|
| 69 |
+#define HAL_CEC_MODULE_ENABLED |
|
| 70 |
+#endif |
|
| 71 |
+#ifdef RTE_DEVICE_HAL_COMP |
|
| 72 |
+#define HAL_COMP_MODULE_ENABLED |
|
| 73 |
+#endif |
|
| 74 |
+#ifdef RTE_DEVICE_HAL_CORTEX |
|
| 75 |
+#define HAL_CORTEX_MODULE_ENABLED |
|
| 76 |
+#endif |
|
| 77 |
+#ifdef RTE_DEVICE_HAL_CRC |
|
| 78 |
+#define HAL_CRC_MODULE_ENABLED |
|
| 79 |
+#endif |
|
| 80 |
+#ifdef RTE_DEVICE_HAL_DAC |
|
| 81 |
+#define HAL_DAC_MODULE_ENABLED |
|
| 82 |
+#endif |
|
| 83 |
+#ifdef RTE_DEVICE_HAL_DMA |
|
| 84 |
+#define HAL_DMA_MODULE_ENABLED |
|
| 85 |
+#endif |
|
| 86 |
+#ifdef RTE_DEVICE_HAL_FLASH |
|
| 87 |
+#define HAL_FLASH_MODULE_ENABLED |
|
| 88 |
+#endif |
|
| 89 |
+#ifdef RTE_DEVICE_HAL_GPIO |
|
| 90 |
+#define HAL_GPIO_MODULE_ENABLED |
|
| 91 |
+#endif |
|
| 92 |
+#ifdef RTE_DEVICE_HAL_I2C |
|
| 93 |
+#define HAL_I2C_MODULE_ENABLED |
|
| 94 |
+#endif |
|
| 95 |
+#ifdef RTE_DEVICE_HAL_I2S |
|
| 96 |
+#define HAL_I2S_MODULE_ENABLED |
|
| 97 |
+#endif |
|
| 98 |
+#ifdef RTE_DEVICE_HAL_IRDA |
|
| 99 |
+#define HAL_IRDA_MODULE_ENABLED |
|
| 100 |
+#endif |
|
| 101 |
+#ifdef RTE_DEVICE_HAL_IWDG |
|
| 102 |
+#define HAL_IWDG_MODULE_ENABLED |
|
| 103 |
+#endif |
|
| 104 |
+#ifdef RTE_DEVICE_HAL_PCD |
|
| 105 |
+#define HAL_PCD_MODULE_ENABLED |
|
| 106 |
+#endif |
|
| 107 |
+#ifdef RTE_DEVICE_HAL_PWR |
|
| 108 |
+#define HAL_PWR_MODULE_ENABLED |
|
| 109 |
+#endif |
|
| 110 |
+#ifdef RTE_DEVICE_HAL_RCC |
|
| 111 |
+#define HAL_RCC_MODULE_ENABLED |
|
| 112 |
+#endif |
|
| 113 |
+#ifdef RTE_DEVICE_HAL_RTC |
|
| 114 |
+#define HAL_RTC_MODULE_ENABLED |
|
| 115 |
+#endif |
|
| 116 |
+#ifdef RTE_DEVICE_HAL_SMARTCARD |
|
| 117 |
+#define HAL_SMARTCARD_MODULE_ENABLED |
|
| 118 |
+#endif |
|
| 119 |
+#ifdef RTE_DEVICE_HAL_SMBUS |
|
| 120 |
+#define HAL_SMBUS_MODULE_ENABLED |
|
| 121 |
+#endif |
|
| 122 |
+#ifdef RTE_DEVICE_HAL_SPI |
|
| 123 |
+#define HAL_SPI_MODULE_ENABLED |
|
| 124 |
+#endif |
|
| 125 |
+#ifdef RTE_DEVICE_HAL_TIM |
|
| 126 |
+#define HAL_TIM_MODULE_ENABLED |
|
| 127 |
+#endif |
|
| 128 |
+#ifdef RTE_DEVICE_HAL_TSC |
|
| 129 |
+#define HAL_TSC_MODULE_ENABLED |
|
| 130 |
+#endif |
|
| 131 |
+#ifdef RTE_DEVICE_HAL_UART |
|
| 132 |
+#define HAL_UART_MODULE_ENABLED |
|
| 133 |
+#endif |
|
| 134 |
+#ifdef RTE_DEVICE_HAL_USART |
|
| 135 |
+#define HAL_USART_MODULE_ENABLED |
|
| 136 |
+#endif |
|
| 137 |
+#ifdef RTE_DEVICE_HAL_WWDG |
|
| 138 |
+#define HAL_WWDG_MODULE_ENABLED |
|
| 139 |
+#endif |
|
| 140 |
+ |
|
| 141 |
+/* ######################### Oscillator Values adaptation ################### */ |
|
| 142 |
+/** |
|
| 143 |
+ * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. |
|
| 144 |
+ * This value is used by the RCC HAL module to compute the system frequency |
|
| 145 |
+ * (when HSE is used as system clock source, directly or through the PLL). |
|
| 146 |
+ */ |
|
| 147 |
+#if !defined (HSE_VALUE) |
|
| 148 |
+ #define HSE_VALUE 8000000U /*!< Value of the External oscillator in Hz */ |
|
| 149 |
+#endif /* HSE_VALUE */ |
|
| 150 |
+ |
|
| 151 |
+/** |
|
| 152 |
+ * @brief In the following line adjust the External High Speed oscillator (HSE) Startup |
|
| 153 |
+ * Timeout value |
|
| 154 |
+ */ |
|
| 155 |
+#if !defined (HSE_STARTUP_TIMEOUT) |
|
| 156 |
+ #define HSE_STARTUP_TIMEOUT 100U /*!< Time out for HSE start up, in ms */ |
|
| 157 |
+#endif /* HSE_STARTUP_TIMEOUT */ |
|
| 158 |
+ |
|
| 159 |
+/** |
|
| 160 |
+ * @brief Internal High Speed oscillator (HSI) value. |
|
| 161 |
+ * This value is used by the RCC HAL module to compute the system frequency |
|
| 162 |
+ * (when HSI is used as system clock source, directly or through the PLL). |
|
| 163 |
+ */ |
|
| 164 |
+#if !defined (HSI_VALUE) |
|
| 165 |
+ #define HSI_VALUE 8000000U /*!< Value of the Internal oscillator in Hz*/ |
|
| 166 |
+#endif /* HSI_VALUE */ |
|
| 167 |
+ |
|
| 168 |
+/** |
|
| 169 |
+ * @brief In the following line adjust the Internal High Speed oscillator (HSI) Startup |
|
| 170 |
+ * Timeout value |
|
| 171 |
+ */ |
|
| 172 |
+#if !defined (HSI_STARTUP_TIMEOUT) |
|
| 173 |
+ #define HSI_STARTUP_TIMEOUT 5000U /*!< Time out for HSI start up */ |
|
| 174 |
+#endif /* HSI_STARTUP_TIMEOUT */ |
|
| 175 |
+ |
|
| 176 |
+/** |
|
| 177 |
+ * @brief Internal High Speed oscillator for ADC (HSI14) value. |
|
| 178 |
+ */ |
|
| 179 |
+#if !defined (HSI14_VALUE) |
|
| 180 |
+ #define HSI14_VALUE 14000000U /*!< Value of the Internal High Speed oscillator for ADC in Hz. |
|
| 181 |
+ The real value may vary depending on the variations |
|
| 182 |
+ in voltage and temperature. */ |
|
| 183 |
+#endif /* HSI14_VALUE */ |
|
| 184 |
+ |
|
| 185 |
+/** |
|
| 186 |
+ * @brief Internal High Speed oscillator for USB (HSI48) value. |
|
| 187 |
+ */ |
|
| 188 |
+#if !defined (HSI48_VALUE) |
|
| 189 |
+ #define HSI48_VALUE 48000000U /*!< Value of the Internal High Speed oscillator for USB in Hz. |
|
| 190 |
+ The real value may vary depending on the variations |
|
| 191 |
+ in voltage and temperature. */ |
|
| 192 |
+#endif /* HSI48_VALUE */ |
|
| 193 |
+ |
|
| 194 |
+/** |
|
| 195 |
+ * @brief Internal Low Speed oscillator (LSI) value. |
|
| 196 |
+ */ |
|
| 197 |
+#if !defined (LSI_VALUE) |
|
| 198 |
+ #define LSI_VALUE 40000U |
|
| 199 |
+#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz |
|
| 200 |
+ The real value may vary depending on the variations |
|
| 201 |
+ in voltage and temperature. */ |
|
| 202 |
+/** |
|
| 203 |
+ * @brief External Low Speed oscillator (LSE) value. |
|
| 204 |
+ */ |
|
| 205 |
+#if !defined (LSE_VALUE) |
|
| 206 |
+ #define LSE_VALUE 32768U /*!< Value of the External Low Speed oscillator in Hz */ |
|
| 207 |
+#endif /* LSE_VALUE */ |
|
| 208 |
+ |
|
| 209 |
+/** |
|
| 210 |
+ * @brief Time out for LSE start up value in ms. |
|
| 211 |
+ */ |
|
| 212 |
+#if !defined (LSE_STARTUP_TIMEOUT) |
|
| 213 |
+ #define LSE_STARTUP_TIMEOUT 5000U /*!< Time out for LSE start up, in ms */ |
|
| 214 |
+#endif /* LSE_STARTUP_TIMEOUT */ |
|
| 215 |
+ |
|
| 216 |
+ |
|
| 217 |
+/* Tip: To avoid modifying this file each time you need to use different HSE, |
|
| 218 |
+ === you can define the HSE value in your toolchain compiler preprocessor. */ |
|
| 219 |
+ |
|
| 220 |
+/* ########################### System Configuration ######################### */ |
|
| 221 |
+/** |
|
| 222 |
+ * @brief This is the HAL system configuration section |
|
| 223 |
+ */ |
|
| 224 |
+#define VDD_VALUE 3300U /*!< Value of VDD in mv */ |
|
| 225 |
+#define TICK_INT_PRIORITY ((uint32_t)(1U<<__NVIC_PRIO_BITS) - 1U) /*!< tick interrupt priority (lowest by default) */ |
|
| 226 |
+ /* Warning: Must be set to higher priority for HAL_Delay() */ |
|
| 227 |
+ /* and HAL_GetTick() usage under interrupt context */ |
|
| 228 |
+#define USE_RTOS 0U |
|
| 229 |
+#define PREFETCH_ENABLE 1U |
|
| 230 |
+#define INSTRUCTION_CACHE_ENABLE 0U |
|
| 231 |
+#define DATA_CACHE_ENABLE 0U |
|
| 232 |
+#define USE_SPI_CRC 1U |
|
| 233 |
+ |
|
| 234 |
+/* ########################## Assert Selection ############################## */ |
|
| 235 |
+/** |
|
| 236 |
+ * @brief Uncomment the line below to expanse the "assert_param" macro in the |
|
| 237 |
+ * HAL drivers code |
|
| 238 |
+ */ |
|
| 239 |
+/*#define USE_FULL_ASSERT 1*/ |
|
| 240 |
+ |
|
| 241 |
+/* Includes ------------------------------------------------------------------*/ |
|
| 242 |
+/** |
|
| 243 |
+ * @brief Include module's header file |
|
| 244 |
+ */ |
|
| 245 |
+ |
|
| 246 |
+#ifdef HAL_RCC_MODULE_ENABLED |
|
| 247 |
+ #include "stm32f0xx_hal_rcc.h" |
|
| 248 |
+#endif /* HAL_RCC_MODULE_ENABLED */ |
|
| 249 |
+ |
|
| 250 |
+#ifdef HAL_GPIO_MODULE_ENABLED |
|
| 251 |
+ #include "stm32f0xx_hal_gpio.h" |
|
| 252 |
+#endif /* HAL_GPIO_MODULE_ENABLED */ |
|
| 253 |
+ |
|
| 254 |
+#ifdef HAL_DMA_MODULE_ENABLED |
|
| 255 |
+ #include "stm32f0xx_hal_dma.h" |
|
| 256 |
+#endif /* HAL_DMA_MODULE_ENABLED */ |
|
| 257 |
+ |
|
| 258 |
+#ifdef HAL_CORTEX_MODULE_ENABLED |
|
| 259 |
+ #include "stm32f0xx_hal_cortex.h" |
|
| 260 |
+#endif /* HAL_CORTEX_MODULE_ENABLED */ |
|
| 261 |
+ |
|
| 262 |
+#ifdef HAL_ADC_MODULE_ENABLED |
|
| 263 |
+ #include "stm32f0xx_hal_adc.h" |
|
| 264 |
+#endif /* HAL_ADC_MODULE_ENABLED */ |
|
| 265 |
+ |
|
| 266 |
+#ifdef HAL_CAN_MODULE_ENABLED |
|
| 267 |
+ #include "stm32f0xx_hal_can.h" |
|
| 268 |
+#endif /* HAL_CAN_MODULE_ENABLED */ |
|
| 269 |
+ |
|
| 270 |
+#ifdef HAL_CEC_MODULE_ENABLED |
|
| 271 |
+ #include "stm32f0xx_hal_cec.h" |
|
| 272 |
+#endif /* HAL_CEC_MODULE_ENABLED */ |
|
| 273 |
+ |
|
| 274 |
+#ifdef HAL_COMP_MODULE_ENABLED |
|
| 275 |
+ #include "stm32f0xx_hal_comp.h" |
|
| 276 |
+#endif /* HAL_COMP_MODULE_ENABLED */ |
|
| 277 |
+ |
|
| 278 |
+#ifdef HAL_CRC_MODULE_ENABLED |
|
| 279 |
+ #include "stm32f0xx_hal_crc.h" |
|
| 280 |
+#endif /* HAL_CRC_MODULE_ENABLED */ |
|
| 281 |
+ |
|
| 282 |
+#ifdef HAL_DAC_MODULE_ENABLED |
|
| 283 |
+ #include "stm32f0xx_hal_dac.h" |
|
| 284 |
+#endif /* HAL_DAC_MODULE_ENABLED */ |
|
| 285 |
+ |
|
| 286 |
+#ifdef HAL_FLASH_MODULE_ENABLED |
|
| 287 |
+ #include "stm32f0xx_hal_flash.h" |
|
| 288 |
+#endif /* HAL_FLASH_MODULE_ENABLED */ |
|
| 289 |
+ |
|
| 290 |
+#ifdef HAL_I2C_MODULE_ENABLED |
|
| 291 |
+ #include "stm32f0xx_hal_i2c.h" |
|
| 292 |
+#endif /* HAL_I2C_MODULE_ENABLED */ |
|
| 293 |
+ |
|
| 294 |
+#ifdef HAL_I2S_MODULE_ENABLED |
|
| 295 |
+ #include "stm32f0xx_hal_i2s.h" |
|
| 296 |
+#endif /* HAL_I2S_MODULE_ENABLED */ |
|
| 297 |
+ |
|
| 298 |
+#ifdef HAL_IRDA_MODULE_ENABLED |
|
| 299 |
+ #include "stm32f0xx_hal_irda.h" |
|
| 300 |
+#endif /* HAL_IRDA_MODULE_ENABLED */ |
|
| 301 |
+ |
|
| 302 |
+#ifdef HAL_IWDG_MODULE_ENABLED |
|
| 303 |
+ #include "stm32f0xx_hal_iwdg.h" |
|
| 304 |
+#endif /* HAL_IWDG_MODULE_ENABLED */ |
|
| 305 |
+ |
|
| 306 |
+#ifdef HAL_PCD_MODULE_ENABLED |
|
| 307 |
+ #include "stm32f0xx_hal_pcd.h" |
|
| 308 |
+#endif /* HAL_PCD_MODULE_ENABLED */ |
|
| 309 |
+ |
|
| 310 |
+#ifdef HAL_PWR_MODULE_ENABLED |
|
| 311 |
+ #include "stm32f0xx_hal_pwr.h" |
|
| 312 |
+#endif /* HAL_PWR_MODULE_ENABLED */ |
|
| 313 |
+ |
|
| 314 |
+#ifdef HAL_RTC_MODULE_ENABLED |
|
| 315 |
+ #include "stm32f0xx_hal_rtc.h" |
|
| 316 |
+#endif /* HAL_RTC_MODULE_ENABLED */ |
|
| 317 |
+ |
|
| 318 |
+#ifdef HAL_SMARTCARD_MODULE_ENABLED |
|
| 319 |
+ #include "stm32f0xx_hal_smartcard.h" |
|
| 320 |
+#endif /* HAL_SMARTCARD_MODULE_ENABLED */ |
|
| 321 |
+ |
|
| 322 |
+#ifdef HAL_SMBUS_MODULE_ENABLED |
|
| 323 |
+ #include "stm32f0xx_hal_smbus.h" |
|
| 324 |
+#endif /* HAL_SMBUS_MODULE_ENABLED */ |
|
| 325 |
+ |
|
| 326 |
+#ifdef HAL_SPI_MODULE_ENABLED |
|
| 327 |
+ #include "stm32f0xx_hal_spi.h" |
|
| 328 |
+#endif /* HAL_SPI_MODULE_ENABLED */ |
|
| 329 |
+ |
|
| 330 |
+#ifdef HAL_TIM_MODULE_ENABLED |
|
| 331 |
+ #include "stm32f0xx_hal_tim.h" |
|
| 332 |
+#endif /* HAL_TIM_MODULE_ENABLED */ |
|
| 333 |
+ |
|
| 334 |
+#ifdef HAL_TSC_MODULE_ENABLED |
|
| 335 |
+ #include "stm32f0xx_hal_tsc.h" |
|
| 336 |
+#endif /* HAL_TSC_MODULE_ENABLED */ |
|
| 337 |
+ |
|
| 338 |
+#ifdef HAL_UART_MODULE_ENABLED |
|
| 339 |
+ #include "stm32f0xx_hal_uart.h" |
|
| 340 |
+#endif /* HAL_UART_MODULE_ENABLED */ |
|
| 341 |
+ |
|
| 342 |
+#ifdef HAL_USART_MODULE_ENABLED |
|
| 343 |
+ #include "stm32f0xx_hal_usart.h" |
|
| 344 |
+#endif /* HAL_USART_MODULE_ENABLED */ |
|
| 345 |
+ |
|
| 346 |
+#ifdef HAL_WWDG_MODULE_ENABLED |
|
| 347 |
+ #include "stm32f0xx_hal_wwdg.h" |
|
| 348 |
+#endif /* HAL_WWDG_MODULE_ENABLED */ |
|
| 349 |
+ |
|
| 350 |
+/* Exported macro ------------------------------------------------------------*/ |
|
| 351 |
+#ifdef USE_FULL_ASSERT |
|
| 352 |
+/** |
|
| 353 |
+ * @brief The assert_param macro is used for function's parameters check. |
|
| 354 |
+ * @param expr: If expr is false, it calls assert_failed function |
|
| 355 |
+ * which reports the name of the source file and the source |
|
| 356 |
+ * line number of the call that failed. |
|
| 357 |
+ * If expr is true, it returns no value. |
|
| 358 |
+ * @retval None |
|
| 359 |
+ */ |
|
| 360 |
+ #define assert_param(expr) ((expr) ? (void)0U : assert_failed((char *)__FILE__, __LINE__)) |
|
| 361 |
+/* Exported functions ------------------------------------------------------- */ |
|
| 362 |
+ void assert_failed(char* file, uint32_t line); |
|
| 363 |
+#else |
|
| 364 |
+ #define assert_param(expr) ((void)0U) |
|
| 365 |
+#endif /* USE_FULL_ASSERT */ |
|
| 366 |
+ |
|
| 367 |
+#ifdef __cplusplus |
|
| 368 |
+} |
|
| 369 |
+#endif |
|
| 370 |
+ |
|
| 371 |
+#endif /* __STM32F0xx_HAL_CONF_H */ |
|
| 372 |
+ |
|
| 373 |
+ |
|
| 374 |
+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |
| 0 | 375 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,333 @@ |
| 1 |
+/** |
|
| 2 |
+ ****************************************************************************** |
|
| 3 |
+ * @file system_stm32f0xx.c |
|
| 4 |
+ * @author MCD Application Team |
|
| 5 |
+ * @brief CMSIS Cortex-M0 Device Peripheral Access Layer System Source File. |
|
| 6 |
+ * |
|
| 7 |
+ * 1. This file provides two functions and one global variable to be called from |
|
| 8 |
+ * user application: |
|
| 9 |
+ * - SystemInit(): This function is called at startup just after reset and |
|
| 10 |
+ * before branch to main program. This call is made inside |
|
| 11 |
+ * the "startup_stm32f0xx.s" file. |
|
| 12 |
+ * |
|
| 13 |
+ * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used |
|
| 14 |
+ * by the user application to setup the SysTick |
|
| 15 |
+ * timer or configure other parameters. |
|
| 16 |
+ * |
|
| 17 |
+ * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must |
|
| 18 |
+ * be called whenever the core clock is changed |
|
| 19 |
+ * during program execution. |
|
| 20 |
+ * |
|
| 21 |
+ * 2. After each device reset the HSI (8 MHz) is used as system clock source. |
|
| 22 |
+ * Then SystemInit() function is called, in "startup_stm32f0xx.s" file, to |
|
| 23 |
+ * configure the system clock before to branch to main program. |
|
| 24 |
+ * |
|
| 25 |
+ * 3. This file configures the system clock as follows: |
|
| 26 |
+ *============================================================================= |
|
| 27 |
+ * Supported STM32F0xx device |
|
| 28 |
+ *----------------------------------------------------------------------------- |
|
| 29 |
+ * System Clock source | HSI |
|
| 30 |
+ *----------------------------------------------------------------------------- |
|
| 31 |
+ * SYSCLK(Hz) | 8000000 |
|
| 32 |
+ *----------------------------------------------------------------------------- |
|
| 33 |
+ * HCLK(Hz) | 8000000 |
|
| 34 |
+ *----------------------------------------------------------------------------- |
|
| 35 |
+ * AHB Prescaler | 1 |
|
| 36 |
+ *----------------------------------------------------------------------------- |
|
| 37 |
+ * APB1 Prescaler | 1 |
|
| 38 |
+ *----------------------------------------------------------------------------- |
|
| 39 |
+ *============================================================================= |
|
| 40 |
+ ****************************************************************************** |
|
| 41 |
+ * @attention |
|
| 42 |
+ * |
|
| 43 |
+ * <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2> |
|
| 44 |
+ * |
|
| 45 |
+ * Redistribution and use in source and binary forms, with or without modification, |
|
| 46 |
+ * are permitted provided that the following conditions are met: |
|
| 47 |
+ * 1. Redistributions of source code must retain the above copyright notice, |
|
| 48 |
+ * this list of conditions and the following disclaimer. |
|
| 49 |
+ * 2. Redistributions in binary form must reproduce the above copyright notice, |
|
| 50 |
+ * this list of conditions and the following disclaimer in the documentation |
|
| 51 |
+ * and/or other materials provided with the distribution. |
|
| 52 |
+ * 3. Neither the name of STMicroelectronics nor the names of its contributors |
|
| 53 |
+ * may be used to endorse or promote products derived from this software |
|
| 54 |
+ * without specific prior written permission. |
|
| 55 |
+ * |
|
| 56 |
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
|
| 57 |
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
|
| 58 |
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
|
| 59 |
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
|
| 60 |
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
|
| 61 |
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
|
| 62 |
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
|
| 63 |
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
|
| 64 |
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
|
| 65 |
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
| 66 |
+ * |
|
| 67 |
+ ****************************************************************************** |
|
| 68 |
+ */ |
|
| 69 |
+ |
|
| 70 |
+/** @addtogroup CMSIS |
|
| 71 |
+ * @{
|
|
| 72 |
+ */ |
|
| 73 |
+ |
|
| 74 |
+/** @addtogroup stm32f0xx_system |
|
| 75 |
+ * @{
|
|
| 76 |
+ */ |
|
| 77 |
+ |
|
| 78 |
+/** @addtogroup STM32F0xx_System_Private_Includes |
|
| 79 |
+ * @{
|
|
| 80 |
+ */ |
|
| 81 |
+ |
|
| 82 |
+#include "stm32f0xx.h" |
|
| 83 |
+ |
|
| 84 |
+/** |
|
| 85 |
+ * @} |
|
| 86 |
+ */ |
|
| 87 |
+ |
|
| 88 |
+/** @addtogroup STM32F0xx_System_Private_TypesDefinitions |
|
| 89 |
+ * @{
|
|
| 90 |
+ */ |
|
| 91 |
+ |
|
| 92 |
+/** |
|
| 93 |
+ * @} |
|
| 94 |
+ */ |
|
| 95 |
+ |
|
| 96 |
+/** @addtogroup STM32F0xx_System_Private_Defines |
|
| 97 |
+ * @{
|
|
| 98 |
+ */ |
|
| 99 |
+#if !defined (HSE_VALUE) |
|
| 100 |
+ #define HSE_VALUE ((uint32_t)8000000) /*!< Default value of the External oscillator in Hz. |
|
| 101 |
+ This value can be provided and adapted by the user application. */ |
|
| 102 |
+#endif /* HSE_VALUE */ |
|
| 103 |
+ |
|
| 104 |
+#if !defined (HSI_VALUE) |
|
| 105 |
+ #define HSI_VALUE ((uint32_t)8000000) /*!< Default value of the Internal oscillator in Hz. |
|
| 106 |
+ This value can be provided and adapted by the user application. */ |
|
| 107 |
+#endif /* HSI_VALUE */ |
|
| 108 |
+ |
|
| 109 |
+#if !defined (HSI48_VALUE) |
|
| 110 |
+#define HSI48_VALUE ((uint32_t)48000000) /*!< Default value of the HSI48 Internal oscillator in Hz. |
|
| 111 |
+ This value can be provided and adapted by the user application. */ |
|
| 112 |
+#endif /* HSI48_VALUE */ |
|
| 113 |
+/** |
|
| 114 |
+ * @} |
|
| 115 |
+ */ |
|
| 116 |
+ |
|
| 117 |
+/** @addtogroup STM32F0xx_System_Private_Macros |
|
| 118 |
+ * @{
|
|
| 119 |
+ */ |
|
| 120 |
+ |
|
| 121 |
+/** |
|
| 122 |
+ * @} |
|
| 123 |
+ */ |
|
| 124 |
+ |
|
| 125 |
+/** @addtogroup STM32F0xx_System_Private_Variables |
|
| 126 |
+ * @{
|
|
| 127 |
+ */ |
|
| 128 |
+ /* This variable is updated in three ways: |
|
| 129 |
+ 1) by calling CMSIS function SystemCoreClockUpdate() |
|
| 130 |
+ 2) by calling HAL API function HAL_RCC_GetHCLKFreq() |
|
| 131 |
+ 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency |
|
| 132 |
+ Note: If you use this function to configure the system clock there is no need to |
|
| 133 |
+ call the 2 first functions listed above, since SystemCoreClock variable is |
|
| 134 |
+ updated automatically. |
|
| 135 |
+ */ |
|
| 136 |
+uint32_t SystemCoreClock = 8000000; |
|
| 137 |
+ |
|
| 138 |
+const uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};
|
|
| 139 |
+const uint8_t APBPrescTable[8] = {0, 0, 0, 0, 1, 2, 3, 4};
|
|
| 140 |
+ |
|
| 141 |
+/** |
|
| 142 |
+ * @} |
|
| 143 |
+ */ |
|
| 144 |
+ |
|
| 145 |
+/** @addtogroup STM32F0xx_System_Private_FunctionPrototypes |
|
| 146 |
+ * @{
|
|
| 147 |
+ */ |
|
| 148 |
+ |
|
| 149 |
+/** |
|
| 150 |
+ * @} |
|
| 151 |
+ */ |
|
| 152 |
+ |
|
| 153 |
+/** @addtogroup STM32F0xx_System_Private_Functions |
|
| 154 |
+ * @{
|
|
| 155 |
+ */ |
|
| 156 |
+ |
|
| 157 |
+/** |
|
| 158 |
+ * @brief Setup the microcontroller system. |
|
| 159 |
+ * Initialize the default HSI clock source, vector table location and the PLL configuration is reset. |
|
| 160 |
+ * @param None |
|
| 161 |
+ * @retval None |
|
| 162 |
+ */ |
|
| 163 |
+void SystemInit(void) |
|
| 164 |
+{
|
|
| 165 |
+ /* Reset the RCC clock configuration to the default reset state ------------*/ |
|
| 166 |
+ /* Set HSION bit */ |
|
| 167 |
+ RCC->CR |= (uint32_t)0x00000001U; |
|
| 168 |
+ |
|
| 169 |
+#if defined (STM32F051x8) || defined (STM32F058x8) |
|
| 170 |
+ /* Reset SW[1:0], HPRE[3:0], PPRE[2:0], ADCPRE and MCOSEL[2:0] bits */ |
|
| 171 |
+ RCC->CFGR &= (uint32_t)0xF8FFB80CU; |
|
| 172 |
+#else |
|
| 173 |
+ /* Reset SW[1:0], HPRE[3:0], PPRE[2:0], ADCPRE, MCOSEL[2:0], MCOPRE[2:0] and PLLNODIV bits */ |
|
| 174 |
+ RCC->CFGR &= (uint32_t)0x08FFB80CU; |
|
| 175 |
+#endif /* STM32F051x8 or STM32F058x8 */ |
|
| 176 |
+ |
|
| 177 |
+ /* Reset HSEON, CSSON and PLLON bits */ |
|
| 178 |
+ RCC->CR &= (uint32_t)0xFEF6FFFFU; |
|
| 179 |
+ |
|
| 180 |
+ /* Reset HSEBYP bit */ |
|
| 181 |
+ RCC->CR &= (uint32_t)0xFFFBFFFFU; |
|
| 182 |
+ |
|
| 183 |
+ /* Reset PLLSRC, PLLXTPRE and PLLMUL[3:0] bits */ |
|
| 184 |
+ RCC->CFGR &= (uint32_t)0xFFC0FFFFU; |
|
| 185 |
+ |
|
| 186 |
+ /* Reset PREDIV[3:0] bits */ |
|
| 187 |
+ RCC->CFGR2 &= (uint32_t)0xFFFFFFF0U; |
|
| 188 |
+ |
|
| 189 |
+#if defined (STM32F072xB) || defined (STM32F078xx) |
|
| 190 |
+ /* Reset USART2SW[1:0], USART1SW[1:0], I2C1SW, CECSW, USBSW and ADCSW bits */ |
|
| 191 |
+ RCC->CFGR3 &= (uint32_t)0xFFFCFE2CU; |
|
| 192 |
+#elif defined (STM32F071xB) |
|
| 193 |
+ /* Reset USART2SW[1:0], USART1SW[1:0], I2C1SW, CECSW and ADCSW bits */ |
|
| 194 |
+ RCC->CFGR3 &= (uint32_t)0xFFFFCEACU; |
|
| 195 |
+#elif defined (STM32F091xC) || defined (STM32F098xx) |
|
| 196 |
+ /* Reset USART3SW[1:0], USART2SW[1:0], USART1SW[1:0], I2C1SW, CECSW and ADCSW bits */ |
|
| 197 |
+ RCC->CFGR3 &= (uint32_t)0xFFF0FEACU; |
|
| 198 |
+#elif defined (STM32F030x6) || defined (STM32F030x8) || defined (STM32F031x6) || defined (STM32F038xx) || defined (STM32F030xC) |
|
| 199 |
+ /* Reset USART1SW[1:0], I2C1SW and ADCSW bits */ |
|
| 200 |
+ RCC->CFGR3 &= (uint32_t)0xFFFFFEECU; |
|
| 201 |
+#elif defined (STM32F051x8) || defined (STM32F058xx) |
|
| 202 |
+ /* Reset USART1SW[1:0], I2C1SW, CECSW and ADCSW bits */ |
|
| 203 |
+ RCC->CFGR3 &= (uint32_t)0xFFFFFEACU; |
|
| 204 |
+#elif defined (STM32F042x6) || defined (STM32F048xx) |
|
| 205 |
+ /* Reset USART1SW[1:0], I2C1SW, CECSW, USBSW and ADCSW bits */ |
|
| 206 |
+ RCC->CFGR3 &= (uint32_t)0xFFFFFE2CU; |
|
| 207 |
+#elif defined (STM32F070x6) || defined (STM32F070xB) |
|
| 208 |
+ /* Reset USART1SW[1:0], I2C1SW, USBSW and ADCSW bits */ |
|
| 209 |
+ RCC->CFGR3 &= (uint32_t)0xFFFFFE6CU; |
|
| 210 |
+ /* Set default USB clock to PLLCLK, since there is no HSI48 */ |
|
| 211 |
+ RCC->CFGR3 |= (uint32_t)0x00000080U; |
|
| 212 |
+#else |
|
| 213 |
+ #warning "No target selected" |
|
| 214 |
+#endif |
|
| 215 |
+ |
|
| 216 |
+ /* Reset HSI14 bit */ |
|
| 217 |
+ RCC->CR2 &= (uint32_t)0xFFFFFFFEU; |
|
| 218 |
+ |
|
| 219 |
+ /* Disable all interrupts */ |
|
| 220 |
+ RCC->CIR = 0x00000000U; |
|
| 221 |
+ |
|
| 222 |
+} |
|
| 223 |
+ |
|
| 224 |
+/** |
|
| 225 |
+ * @brief Update SystemCoreClock variable according to Clock Register Values. |
|
| 226 |
+ * The SystemCoreClock variable contains the core clock (HCLK), it can |
|
| 227 |
+ * be used by the user application to setup the SysTick timer or configure |
|
| 228 |
+ * other parameters. |
|
| 229 |
+ * |
|
| 230 |
+ * @note Each time the core clock (HCLK) changes, this function must be called |
|
| 231 |
+ * to update SystemCoreClock variable value. Otherwise, any configuration |
|
| 232 |
+ * based on this variable will be incorrect. |
|
| 233 |
+ * |
|
| 234 |
+ * @note - The system frequency computed by this function is not the real |
|
| 235 |
+ * frequency in the chip. It is calculated based on the predefined |
|
| 236 |
+ * constant and the selected clock source: |
|
| 237 |
+ * |
|
| 238 |
+ * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*) |
|
| 239 |
+ * |
|
| 240 |
+ * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**) |
|
| 241 |
+ * |
|
| 242 |
+ * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**) |
|
| 243 |
+ * or HSI_VALUE(*) multiplied/divided by the PLL factors. |
|
| 244 |
+ * |
|
| 245 |
+ * (*) HSI_VALUE is a constant defined in stm32f0xx_hal.h file (default value |
|
| 246 |
+ * 8 MHz) but the real value may vary depending on the variations |
|
| 247 |
+ * in voltage and temperature. |
|
| 248 |
+ * |
|
| 249 |
+ * (**) HSE_VALUE is a constant defined in stm32f0xx_hal.h file (default value |
|
| 250 |
+ * 8 MHz), user has to ensure that HSE_VALUE is same as the real |
|
| 251 |
+ * frequency of the crystal used. Otherwise, this function may |
|
| 252 |
+ * have wrong result. |
|
| 253 |
+ * |
|
| 254 |
+ * - The result of this function could be not correct when using fractional |
|
| 255 |
+ * value for HSE crystal. |
|
| 256 |
+ * |
|
| 257 |
+ * @param None |
|
| 258 |
+ * @retval None |
|
| 259 |
+ */ |
|
| 260 |
+void SystemCoreClockUpdate (void) |
|
| 261 |
+{
|
|
| 262 |
+ uint32_t tmp = 0, pllmull = 0, pllsource = 0, predivfactor = 0; |
|
| 263 |
+ |
|
| 264 |
+ /* Get SYSCLK source -------------------------------------------------------*/ |
|
| 265 |
+ tmp = RCC->CFGR & RCC_CFGR_SWS; |
|
| 266 |
+ |
|
| 267 |
+ switch (tmp) |
|
| 268 |
+ {
|
|
| 269 |
+ case RCC_CFGR_SWS_HSI: /* HSI used as system clock */ |
|
| 270 |
+ SystemCoreClock = HSI_VALUE; |
|
| 271 |
+ break; |
|
| 272 |
+ case RCC_CFGR_SWS_HSE: /* HSE used as system clock */ |
|
| 273 |
+ SystemCoreClock = HSE_VALUE; |
|
| 274 |
+ break; |
|
| 275 |
+ case RCC_CFGR_SWS_PLL: /* PLL used as system clock */ |
|
| 276 |
+ /* Get PLL clock source and multiplication factor ----------------------*/ |
|
| 277 |
+ pllmull = RCC->CFGR & RCC_CFGR_PLLMUL; |
|
| 278 |
+ pllsource = RCC->CFGR & RCC_CFGR_PLLSRC; |
|
| 279 |
+ pllmull = ( pllmull >> 18) + 2; |
|
| 280 |
+ predivfactor = (RCC->CFGR2 & RCC_CFGR2_PREDIV) + 1; |
|
| 281 |
+ |
|
| 282 |
+ if (pllsource == RCC_CFGR_PLLSRC_HSE_PREDIV) |
|
| 283 |
+ {
|
|
| 284 |
+ /* HSE used as PLL clock source : SystemCoreClock = HSE/PREDIV * PLLMUL */ |
|
| 285 |
+ SystemCoreClock = (HSE_VALUE/predivfactor) * pllmull; |
|
| 286 |
+ } |
|
| 287 |
+#if defined(STM32F042x6) || defined(STM32F048xx) || defined(STM32F072xB) || defined(STM32F078xx) || defined(STM32F091xC) || defined(STM32F098xx) |
|
| 288 |
+ else if (pllsource == RCC_CFGR_PLLSRC_HSI48_PREDIV) |
|
| 289 |
+ {
|
|
| 290 |
+ /* HSI48 used as PLL clock source : SystemCoreClock = HSI48/PREDIV * PLLMUL */ |
|
| 291 |
+ SystemCoreClock = (HSI48_VALUE/predivfactor) * pllmull; |
|
| 292 |
+ } |
|
| 293 |
+#endif /* STM32F042x6 || STM32F048xx || STM32F072xB || STM32F078xx || STM32F091xC || STM32F098xx */ |
|
| 294 |
+ else |
|
| 295 |
+ {
|
|
| 296 |
+#if defined(STM32F042x6) || defined(STM32F048xx) || defined(STM32F070x6) \ |
|
| 297 |
+ || defined(STM32F078xx) || defined(STM32F071xB) || defined(STM32F072xB) \ |
|
| 298 |
+ || defined(STM32F070xB) || defined(STM32F091xC) || defined(STM32F098xx) || defined(STM32F030xC) |
|
| 299 |
+ /* HSI used as PLL clock source : SystemCoreClock = HSI/PREDIV * PLLMUL */ |
|
| 300 |
+ SystemCoreClock = (HSI_VALUE/predivfactor) * pllmull; |
|
| 301 |
+#else |
|
| 302 |
+ /* HSI used as PLL clock source : SystemCoreClock = HSI/2 * PLLMUL */ |
|
| 303 |
+ SystemCoreClock = (HSI_VALUE >> 1) * pllmull; |
|
| 304 |
+#endif /* STM32F042x6 || STM32F048xx || STM32F070x6 || |
|
| 305 |
+ STM32F071xB || STM32F072xB || STM32F078xx || STM32F070xB || |
|
| 306 |
+ STM32F091xC || STM32F098xx || STM32F030xC */ |
|
| 307 |
+ } |
|
| 308 |
+ break; |
|
| 309 |
+ default: /* HSI used as system clock */ |
|
| 310 |
+ SystemCoreClock = HSI_VALUE; |
|
| 311 |
+ break; |
|
| 312 |
+ } |
|
| 313 |
+ /* Compute HCLK clock frequency ----------------*/ |
|
| 314 |
+ /* Get HCLK prescaler */ |
|
| 315 |
+ tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)]; |
|
| 316 |
+ /* HCLK clock frequency */ |
|
| 317 |
+ SystemCoreClock >>= tmp; |
|
| 318 |
+} |
|
| 319 |
+ |
|
| 320 |
+/** |
|
| 321 |
+ * @} |
|
| 322 |
+ */ |
|
| 323 |
+ |
|
| 324 |
+/** |
|
| 325 |
+ * @} |
|
| 326 |
+ */ |
|
| 327 |
+ |
|
| 328 |
+/** |
|
| 329 |
+ * @} |
|
| 330 |
+ */ |
|
| 331 |
+ |
|
| 332 |
+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |
|
| 333 |
+ |
| 0 | 334 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,18 @@ |
| 1 |
+ |
|
| 2 |
+/* |
|
| 3 |
+ * Auto generated Run-Time-Environment Configuration File |
|
| 4 |
+ * *** Do not modify ! *** |
|
| 5 |
+ * |
|
| 6 |
+ * Project: 'io' |
|
| 7 |
+ * Target: 'IO' |
|
| 8 |
+ */ |
|
| 9 |
+ |
|
| 10 |
+#ifndef PRE_INCLUDE_GLOBAL_H |
|
| 11 |
+#define PRE_INCLUDE_GLOBAL_H |
|
| 12 |
+ |
|
| 13 |
+/* Keil.Standalone::Device:Startup:1.0.0 */ |
|
| 14 |
+#define USE_HAL_DRIVER |
|
| 15 |
+ #define USE_FULL_LL_DRIVER |
|
| 16 |
+ |
|
| 17 |
+ |
|
| 18 |
+#endif /* PRE_INCLUDE_GLOBAL_H */ |
| 0 | 19 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,51 @@ |
| 1 |
+ |
|
| 2 |
+/* |
|
| 3 |
+ * Auto generated Run-Time-Environment Configuration File |
|
| 4 |
+ * *** Do not modify ! *** |
|
| 5 |
+ * |
|
| 6 |
+ * Project: 'io' |
|
| 7 |
+ * Target: 'IO' |
|
| 8 |
+ */ |
|
| 9 |
+ |
|
| 10 |
+#ifndef RTE_COMPONENTS_H |
|
| 11 |
+#define RTE_COMPONENTS_H |
|
| 12 |
+ |
|
| 13 |
+ |
|
| 14 |
+/* |
|
| 15 |
+ * Define the Device Header File: |
|
| 16 |
+ */ |
|
| 17 |
+#define CMSIS_device_header "stm32f0xx.h" |
|
| 18 |
+ |
|
| 19 |
+/* Keil.Standalone::Device:STM32Cube HAL:ADC:1.11.3 */ |
|
| 20 |
+#define RTE_DEVICE_HAL_ADC |
|
| 21 |
+/* Keil.Standalone::Device:STM32Cube HAL:COMMON:1.11.3 */ |
|
| 22 |
+#define RTE_DEVICE_HAL_COMMON |
|
| 23 |
+/* Keil.Standalone::Device:STM32Cube HAL:CORTEX:1.11.3 */ |
|
| 24 |
+#define RTE_DEVICE_HAL_CORTEX |
|
| 25 |
+/* Keil.Standalone::Device:STM32Cube HAL:DAC:1.11.3 */ |
|
| 26 |
+#define RTE_DEVICE_HAL_DAC |
|
| 27 |
+/* Keil.Standalone::Device:STM32Cube HAL:DMA:1.11.3 */ |
|
| 28 |
+#define RTE_DEVICE_HAL_DMA |
|
| 29 |
+/* Keil.Standalone::Device:STM32Cube HAL:FLASH:1.11.3 */ |
|
| 30 |
+#define RTE_DEVICE_HAL_FLASH |
|
| 31 |
+/* Keil.Standalone::Device:STM32Cube HAL:GPIO:1.11.3 */ |
|
| 32 |
+#define RTE_DEVICE_HAL_GPIO |
|
| 33 |
+/* Keil.Standalone::Device:STM32Cube HAL:PCD:1.11.3 */ |
|
| 34 |
+#define RTE_DEVICE_HAL_PCD |
|
| 35 |
+/* Keil.Standalone::Device:STM32Cube HAL:RCC:1.11.3 */ |
|
| 36 |
+#define RTE_DEVICE_HAL_RCC |
|
| 37 |
+/* Keil.Standalone::Device:STM32Cube HAL:RTC:1.11.3 */ |
|
| 38 |
+#define RTE_DEVICE_HAL_RTC |
|
| 39 |
+/* Keil.Standalone::Device:STM32Cube HAL:SPI:1.11.3 */ |
|
| 40 |
+#define RTE_DEVICE_HAL_SPI |
|
| 41 |
+/* Keil.Standalone::Device:STM32Cube HAL:TIM:1.11.3 */ |
|
| 42 |
+#define RTE_DEVICE_HAL_TIM |
|
| 43 |
+/* Keil.Standalone::Device:STM32Cube HAL:UART:1.11.3 */ |
|
| 44 |
+#define RTE_DEVICE_HAL_UART |
|
| 45 |
+/* Keil.Standalone::Device:STM32Cube HAL:USART:1.11.3 */ |
|
| 46 |
+#define RTE_DEVICE_HAL_USART |
|
| 47 |
+/* Keil.Standalone::Device:Startup:1.0.0 */ |
|
| 48 |
+#define RTE_DEVICE_STARTUP_STM32F0XX /* Device Startup for STM32F0 */ |
|
| 49 |
+ |
|
| 50 |
+ |
|
| 51 |
+#endif /* RTE_COMPONENTS_H */ |
| 0 | 52 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,180 @@ |
| 1 |
+/*-----------------------------------------------------------------------*/ |
|
| 2 |
+/* Low level disk I/O module skeleton for FatFs (C)ChaN, 2014 */ |
|
| 3 |
+/* */ |
|
| 4 |
+/* Portions COPYRIGHT 2017 STMicroelectronics */ |
|
| 5 |
+/* Portions Copyright (C) 2014, ChaN, all right reserved */ |
|
| 6 |
+/*-----------------------------------------------------------------------*/ |
|
| 7 |
+/* If a working storage control module is available, it should be */ |
|
| 8 |
+/* attached to the FatFs via a glue function rather than modifying it. */ |
|
| 9 |
+/* This is an example of glue functions to attach various exsisting */ |
|
| 10 |
+/* storage control modules to the FatFs module with a defined API. */ |
|
| 11 |
+/*-----------------------------------------------------------------------*/ |
|
| 12 |
+ |
|
| 13 |
+/** |
|
| 14 |
+ ****************************************************************************** |
|
| 15 |
+ * @file diskio.c |
|
| 16 |
+ * @author MCD Application Team |
|
| 17 |
+ * @version V1.4.1 |
|
| 18 |
+ * @date 14-February-2017 |
|
| 19 |
+ * @brief FatFs low level disk I/O module. |
|
| 20 |
+ ****************************************************************************** |
|
| 21 |
+ * @attention |
|
| 22 |
+ * |
|
| 23 |
+ * |
|
| 24 |
+ * Redistribution and use in source and binary forms, with or without |
|
| 25 |
+ * modification, are permitted, provided that the following conditions are met: |
|
| 26 |
+ * |
|
| 27 |
+ * 1. Redistribution of source code must retain the above copyright notice, |
|
| 28 |
+ * this list of conditions and the following disclaimer. |
|
| 29 |
+ * 2. Redistributions in binary form must reproduce the above copyright notice, |
|
| 30 |
+ * this list of conditions and the following disclaimer in the documentation |
|
| 31 |
+ * and/or other materials provided with the distribution. |
|
| 32 |
+ * 3. Neither the name of STMicroelectronics nor the names of other |
|
| 33 |
+ * contributors to this software may be used to endorse or promote products |
|
| 34 |
+ * derived from this software without specific written permission. |
|
| 35 |
+ * 4. This software, including modifications and/or derivative works of this |
|
| 36 |
+ * software, must execute solely and exclusively on microcontroller or |
|
| 37 |
+ * microprocessor devices manufactured by or for STMicroelectronics. |
|
| 38 |
+ * 5. Redistribution and use of this software other than as permitted under |
|
| 39 |
+ * this license is void and will automatically terminate your rights under |
|
| 40 |
+ * this license. |
|
| 41 |
+ * |
|
| 42 |
+ * THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS" |
|
| 43 |
+ * AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT |
|
| 44 |
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A |
|
| 45 |
+ * PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY |
|
| 46 |
+ * RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT |
|
| 47 |
+ * SHALL STMICROELECTRONICS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
|
| 48 |
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
|
| 49 |
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, |
|
| 50 |
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
|
| 51 |
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
|
| 52 |
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
|
| 53 |
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
| 54 |
+ * |
|
| 55 |
+ ****************************************************************************** |
|
| 56 |
+ */ |
|
| 57 |
+ |
|
| 58 |
+/* Includes ------------------------------------------------------------------*/ |
|
| 59 |
+#include "diskio.h" |
|
| 60 |
+#include "ff_gen_drv.h" |
|
| 61 |
+ |
|
| 62 |
+/* Private typedef -----------------------------------------------------------*/ |
|
| 63 |
+/* Private define ------------------------------------------------------------*/ |
|
| 64 |
+/* Private variables ---------------------------------------------------------*/ |
|
| 65 |
+extern Disk_drvTypeDef disk; |
|
| 66 |
+ |
|
| 67 |
+/* Private function prototypes -----------------------------------------------*/ |
|
| 68 |
+/* Private functions ---------------------------------------------------------*/ |
|
| 69 |
+ |
|
| 70 |
+/** |
|
| 71 |
+ * @brief Gets Disk Status |
|
| 72 |
+ * @param pdrv: Physical drive number (0..) |
|
| 73 |
+ * @retval DSTATUS: Operation status |
|
| 74 |
+ */ |
|
| 75 |
+DSTATUS disk_status ( |
|
| 76 |
+ BYTE pdrv /* Physical drive nmuber to identify the drive */ |
|
| 77 |
+) |
|
| 78 |
+{
|
|
| 79 |
+ DSTATUS stat; |
|
| 80 |
+ |
|
| 81 |
+ stat = disk.drv[pdrv]->disk_status(disk.lun[pdrv]); |
|
| 82 |
+ return stat; |
|
| 83 |
+} |
|
| 84 |
+ |
|
| 85 |
+/** |
|
| 86 |
+ * @brief Initializes a Drive |
|
| 87 |
+ * @param pdrv: Physical drive number (0..) |
|
| 88 |
+ * @retval DSTATUS: Operation status |
|
| 89 |
+ */ |
|
| 90 |
+DSTATUS disk_initialize ( |
|
| 91 |
+ BYTE pdrv /* Physical drive nmuber to identify the drive */ |
|
| 92 |
+) |
|
| 93 |
+{
|
|
| 94 |
+ DSTATUS stat = RES_OK; |
|
| 95 |
+ |
|
| 96 |
+ if(disk.is_initialized[pdrv] == 0) |
|
| 97 |
+ {
|
|
| 98 |
+ disk.is_initialized[pdrv] = 1; |
|
| 99 |
+ stat = disk.drv[pdrv]->disk_initialize(disk.lun[pdrv]); |
|
| 100 |
+ } |
|
| 101 |
+ return stat; |
|
| 102 |
+} |
|
| 103 |
+ |
|
| 104 |
+/** |
|
| 105 |
+ * @brief Reads Sector(s) |
|
| 106 |
+ * @param pdrv: Physical drive number (0..) |
|
| 107 |
+ * @param *buff: Data buffer to store read data |
|
| 108 |
+ * @param sector: Sector address (LBA) |
|
| 109 |
+ * @param count: Number of sectors to read (1..128) |
|
| 110 |
+ * @retval DRESULT: Operation result |
|
| 111 |
+ */ |
|
| 112 |
+DRESULT disk_read ( |
|
| 113 |
+ BYTE pdrv, /* Physical drive nmuber to identify the drive */ |
|
| 114 |
+ BYTE *buff, /* Data buffer to store read data */ |
|
| 115 |
+ DWORD sector, /* Sector address in LBA */ |
|
| 116 |
+ UINT count /* Number of sectors to read */ |
|
| 117 |
+) |
|
| 118 |
+{
|
|
| 119 |
+ DRESULT res; |
|
| 120 |
+ |
|
| 121 |
+ res = disk.drv[pdrv]->disk_read(disk.lun[pdrv], buff, sector, count); |
|
| 122 |
+ return res; |
|
| 123 |
+} |
|
| 124 |
+ |
|
| 125 |
+/** |
|
| 126 |
+ * @brief Writes Sector(s) |
|
| 127 |
+ * @param pdrv: Physical drive number (0..) |
|
| 128 |
+ * @param *buff: Data to be written |
|
| 129 |
+ * @param sector: Sector address (LBA) |
|
| 130 |
+ * @param count: Number of sectors to write (1..128) |
|
| 131 |
+ * @retval DRESULT: Operation result |
|
| 132 |
+ */ |
|
| 133 |
+#if _USE_WRITE == 1 |
|
| 134 |
+DRESULT disk_write ( |
|
| 135 |
+ BYTE pdrv, /* Physical drive nmuber to identify the drive */ |
|
| 136 |
+ const BYTE *buff, /* Data to be written */ |
|
| 137 |
+ DWORD sector, /* Sector address in LBA */ |
|
| 138 |
+ UINT count /* Number of sectors to write */ |
|
| 139 |
+) |
|
| 140 |
+{
|
|
| 141 |
+ DRESULT res; |
|
| 142 |
+ |
|
| 143 |
+ res = disk.drv[pdrv]->disk_write(disk.lun[pdrv], buff, sector, count); |
|
| 144 |
+ return res; |
|
| 145 |
+} |
|
| 146 |
+#endif /* _USE_WRITE == 1 */ |
|
| 147 |
+ |
|
| 148 |
+/** |
|
| 149 |
+ * @brief I/O control operation |
|
| 150 |
+ * @param pdrv: Physical drive number (0..) |
|
| 151 |
+ * @param cmd: Control code |
|
| 152 |
+ * @param *buff: Buffer to send/receive control data |
|
| 153 |
+ * @retval DRESULT: Operation result |
|
| 154 |
+ */ |
|
| 155 |
+#if _USE_IOCTL == 1 |
|
| 156 |
+DRESULT disk_ioctl ( |
|
| 157 |
+ BYTE pdrv, /* Physical drive nmuber (0..) */ |
|
| 158 |
+ BYTE cmd, /* Control code */ |
|
| 159 |
+ void *buff /* Buffer to send/receive control data */ |
|
| 160 |
+) |
|
| 161 |
+{
|
|
| 162 |
+ DRESULT res; |
|
| 163 |
+ |
|
| 164 |
+ res = disk.drv[pdrv]->disk_ioctl(disk.lun[pdrv], cmd, buff); |
|
| 165 |
+ return res; |
|
| 166 |
+} |
|
| 167 |
+#endif /* _USE_IOCTL == 1 */ |
|
| 168 |
+ |
|
| 169 |
+/** |
|
| 170 |
+ * @brief Gets Time from RTC |
|
| 171 |
+ * @param None |
|
| 172 |
+ * @retval Time in DWORD |
|
| 173 |
+ */ |
|
| 174 |
+__weak DWORD get_fattime (void) |
|
| 175 |
+{
|
|
| 176 |
+ return 0; |
|
| 177 |
+} |
|
| 178 |
+ |
|
| 179 |
+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |
|
| 180 |
+ |
| 0 | 181 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,80 @@ |
| 1 |
+/*-----------------------------------------------------------------------/ |
|
| 2 |
+/ Low level disk interface modlue include file (C)ChaN, 2014 / |
|
| 3 |
+/-----------------------------------------------------------------------*/ |
|
| 4 |
+ |
|
| 5 |
+#ifndef _DISKIO_DEFINED |
|
| 6 |
+#define _DISKIO_DEFINED |
|
| 7 |
+ |
|
| 8 |
+#ifdef __cplusplus |
|
| 9 |
+extern "C" {
|
|
| 10 |
+#endif |
|
| 11 |
+ |
|
| 12 |
+#define _USE_WRITE 1 /* 1: Enable disk_write function */ |
|
| 13 |
+#define _USE_IOCTL 1 /* 1: Enable disk_ioctl fucntion */ |
|
| 14 |
+ |
|
| 15 |
+#include "integer.h" |
|
| 16 |
+ |
|
| 17 |
+ |
|
| 18 |
+/* Status of Disk Functions */ |
|
| 19 |
+typedef BYTE DSTATUS; |
|
| 20 |
+ |
|
| 21 |
+/* Results of Disk Functions */ |
|
| 22 |
+typedef enum {
|
|
| 23 |
+ RES_OK = 0, /* 0: Successful */ |
|
| 24 |
+ RES_ERROR, /* 1: R/W Error */ |
|
| 25 |
+ RES_WRPRT, /* 2: Write Protected */ |
|
| 26 |
+ RES_NOTRDY, /* 3: Not Ready */ |
|
| 27 |
+ RES_PARERR /* 4: Invalid Parameter */ |
|
| 28 |
+} DRESULT; |
|
| 29 |
+ |
|
| 30 |
+ |
|
| 31 |
+/*---------------------------------------*/ |
|
| 32 |
+/* Prototypes for disk control functions */ |
|
| 33 |
+ |
|
| 34 |
+ |
|
| 35 |
+DSTATUS disk_initialize (BYTE pdrv); |
|
| 36 |
+DSTATUS disk_status (BYTE pdrv); |
|
| 37 |
+DRESULT disk_read (BYTE pdrv, BYTE* buff, DWORD sector, UINT count); |
|
| 38 |
+DRESULT disk_write (BYTE pdrv, const BYTE* buff, DWORD sector, UINT count); |
|
| 39 |
+DRESULT disk_ioctl (BYTE pdrv, BYTE cmd, void* buff); |
|
| 40 |
+DWORD get_fattime (void); |
|
| 41 |
+ |
|
| 42 |
+/* Disk Status Bits (DSTATUS) */ |
|
| 43 |
+ |
|
| 44 |
+#define STA_NOINIT 0x01 /* Drive not initialized */ |
|
| 45 |
+#define STA_NODISK 0x02 /* No medium in the drive */ |
|
| 46 |
+#define STA_PROTECT 0x04 /* Write protected */ |
|
| 47 |
+ |
|
| 48 |
+ |
|
| 49 |
+/* Command code for disk_ioctrl fucntion */ |
|
| 50 |
+ |
|
| 51 |
+/* Generic command (Used by FatFs) */ |
|
| 52 |
+#define CTRL_SYNC 0 /* Complete pending write process (needed at _FS_READONLY == 0) */ |
|
| 53 |
+#define GET_SECTOR_COUNT 1 /* Get media size (needed at _USE_MKFS == 1) */ |
|
| 54 |
+#define GET_SECTOR_SIZE 2 /* Get sector size (needed at _MAX_SS != _MIN_SS) */ |
|
| 55 |
+#define GET_BLOCK_SIZE 3 /* Get erase block size (needed at _USE_MKFS == 1) */ |
|
| 56 |
+#define CTRL_TRIM 4 /* Inform device that the data on the block of sectors is no longer used (needed at _USE_TRIM == 1) */ |
|
| 57 |
+ |
|
| 58 |
+/* Generic command (Not used by FatFs) */ |
|
| 59 |
+#define CTRL_POWER 5 /* Get/Set power status */ |
|
| 60 |
+#define CTRL_LOCK 6 /* Lock/Unlock media removal */ |
|
| 61 |
+#define CTRL_EJECT 7 /* Eject media */ |
|
| 62 |
+#define CTRL_FORMAT 8 /* Create physical format on the media */ |
|
| 63 |
+ |
|
| 64 |
+/* MMC/SDC specific ioctl command */ |
|
| 65 |
+#define MMC_GET_TYPE 10 /* Get card type */ |
|
| 66 |
+#define MMC_GET_CSD 11 /* Get CSD */ |
|
| 67 |
+#define MMC_GET_CID 12 /* Get CID */ |
|
| 68 |
+#define MMC_GET_OCR 13 /* Get OCR */ |
|
| 69 |
+#define MMC_GET_SDSTAT 14 /* Get SD status */ |
|
| 70 |
+ |
|
| 71 |
+/* ATA/CF specific ioctl command */ |
|
| 72 |
+#define ATA_GET_REV 20 /* Get F/W revision */ |
|
| 73 |
+#define ATA_GET_MODEL 21 /* Get model name */ |
|
| 74 |
+#define ATA_GET_SN 22 /* Get serial number */ |
|
| 75 |
+ |
|
| 76 |
+#ifdef __cplusplus |
|
| 77 |
+} |
|
| 78 |
+#endif |
|
| 79 |
+ |
|
| 80 |
+#endif |
| 0 | 81 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,4752 @@ |
| 1 |
+/*----------------------------------------------------------------------------/ |
|
| 2 |
+/ FatFs - FAT file system module R0.11 (C)ChaN, 2015 |
|
| 3 |
+/-----------------------------------------------------------------------------/ |
|
| 4 |
+/ FatFs module is a free software that opened under license policy of |
|
| 5 |
+/ following conditions. |
|
| 6 |
+/ |
|
| 7 |
+/ Copyright (C) 2015, ChaN, all right reserved. |
|
| 8 |
+/ |
|
| 9 |
+/ 1. Redistributions of source code must retain the above copyright notice, |
|
| 10 |
+/ this condition and the following disclaimer. |
|
| 11 |
+/ |
|
| 12 |
+/ This software is provided by the copyright holder and contributors "AS IS" |
|
| 13 |
+/ and any warranties related to this software are DISCLAIMED. |
|
| 14 |
+/ The copyright owner or contributors be NOT LIABLE for any damages caused |
|
| 15 |
+/ by use of this software. |
|
| 16 |
+/-----------------------------------------------------------------------------/ |
|
| 17 |
+/ Feb 26,'06 R0.00 Prototype. |
|
| 18 |
+/ |
|
| 19 |
+/ Apr 29,'06 R0.01 First stable version. |
|
| 20 |
+/ |
|
| 21 |
+/ Jun 01,'06 R0.02 Added FAT12 support. |
|
| 22 |
+/ Removed unbuffered mode. |
|
| 23 |
+/ Fixed a problem on small (<32M) partition. |
|
| 24 |
+/ Jun 10,'06 R0.02a Added a configuration option (_FS_MINIMUM). |
|
| 25 |
+/ |
|
| 26 |
+/ Sep 22,'06 R0.03 Added f_rename(). |
|
| 27 |
+/ Changed option _FS_MINIMUM to _FS_MINIMIZE. |
|
| 28 |
+/ Dec 11,'06 R0.03a Improved cluster scan algorithm to write files fast. |
|
| 29 |
+/ Fixed f_mkdir() creates incorrect directory on FAT32. |
|
| 30 |
+/ |
|
| 31 |
+/ Feb 04,'07 R0.04 Supported multiple drive system. |
|
| 32 |
+/ Changed some interfaces for multiple drive system. |
|
| 33 |
+/ Changed f_mountdrv() to f_mount(). |
|
| 34 |
+/ Added f_mkfs(). |
|
| 35 |
+/ Apr 01,'07 R0.04a Supported multiple partitions on a physical drive. |
|
| 36 |
+/ Added a capability of extending file size to f_lseek(). |
|
| 37 |
+/ Added minimization level 3. |
|
| 38 |
+/ Fixed an endian sensitive code in f_mkfs(). |
|
| 39 |
+/ May 05,'07 R0.04b Added a configuration option _USE_NTFLAG. |
|
| 40 |
+/ Added FSINFO support. |
|
| 41 |
+/ Fixed DBCS name can result FR_INVALID_NAME. |
|
| 42 |
+/ Fixed short seek (<= csize) collapses the file object. |
|
| 43 |
+/ |
|
| 44 |
+/ Aug 25,'07 R0.05 Changed arguments of f_read(), f_write() and f_mkfs(). |
|
| 45 |
+/ Fixed f_mkfs() on FAT32 creates incorrect FSINFO. |
|
| 46 |
+/ Fixed f_mkdir() on FAT32 creates incorrect directory. |
|
| 47 |
+/ Feb 03,'08 R0.05a Added f_truncate() and f_utime(). |
|
| 48 |
+/ Fixed off by one error at FAT sub-type determination. |
|
| 49 |
+/ Fixed btr in f_read() can be mistruncated. |
|
| 50 |
+/ Fixed cached sector is not flushed when create and close without write. |
|
| 51 |
+/ |
|
| 52 |
+/ Apr 01,'08 R0.06 Added fputc(), fputs(), fprintf() and fgets(). |
|
| 53 |
+/ Improved performance of f_lseek() on moving to the same or following cluster. |
|
| 54 |
+/ |
|
| 55 |
+/ Apr 01,'09 R0.07 Merged Tiny-FatFs as a configuration option. (_FS_TINY) |
|
| 56 |
+/ Added long file name feature. |
|
| 57 |
+/ Added multiple code page feature. |
|
| 58 |
+/ Added re-entrancy for multitask operation. |
|
| 59 |
+/ Added auto cluster size selection to f_mkfs(). |
|
| 60 |
+/ Added rewind option to f_readdir(). |
|
| 61 |
+/ Changed result code of critical errors. |
|
| 62 |
+/ Renamed string functions to avoid name collision. |
|
| 63 |
+/ Apr 14,'09 R0.07a Separated out OS dependent code on reentrant cfg. |
|
| 64 |
+/ Added multiple sector size feature. |
|
| 65 |
+/ Jun 21,'09 R0.07c Fixed f_unlink() can return FR_OK on error. |
|
| 66 |
+/ Fixed wrong cache control in f_lseek(). |
|
| 67 |
+/ Added relative path feature. |
|
| 68 |
+/ Added f_chdir() and f_chdrive(). |
|
| 69 |
+/ Added proper case conversion to extended character. |
|
| 70 |
+/ Nov 03,'09 R0.07e Separated out configuration options from ff.h to ffconf.h. |
|
| 71 |
+/ Fixed f_unlink() fails to remove a sub-directory on _FS_RPATH. |
|
| 72 |
+/ Fixed name matching error on the 13 character boundary. |
|
| 73 |
+/ Added a configuration option, _LFN_UNICODE. |
|
| 74 |
+/ Changed f_readdir() to return the SFN with always upper case on non-LFN cfg. |
|
| 75 |
+/ |
|
| 76 |
+/ May 15,'10 R0.08 Added a memory configuration option. (_USE_LFN = 3) |
|
| 77 |
+/ Added file lock feature. (_FS_SHARE) |
|
| 78 |
+/ Added fast seek feature. (_USE_FASTSEEK) |
|
| 79 |
+/ Changed some types on the API, XCHAR->TCHAR. |
|
| 80 |
+/ Changed .fname in the FILINFO structure on Unicode cfg. |
|
| 81 |
+/ String functions support UTF-8 encoding files on Unicode cfg. |
|
| 82 |
+/ Aug 16,'10 R0.08a Added f_getcwd(). |
|
| 83 |
+/ Added sector erase feature. (_USE_ERASE) |
|
| 84 |
+/ Moved file lock semaphore table from fs object to the bss. |
|
| 85 |
+/ Fixed a wrong directory entry is created on non-LFN cfg when the given name contains ';'. |
|
| 86 |
+/ Fixed f_mkfs() creates wrong FAT32 volume. |
|
| 87 |
+/ Jan 15,'11 R0.08b Fast seek feature is also applied to f_read() and f_write(). |
|
| 88 |
+/ f_lseek() reports required table size on creating CLMP. |
|
| 89 |
+/ Extended format syntax of f_printf(). |
|
| 90 |
+/ Ignores duplicated directory separators in given path name. |
|
| 91 |
+/ |
|
| 92 |
+/ Sep 06,'11 R0.09 f_mkfs() supports multiple partition to complete the multiple partition feature. |
|
| 93 |
+/ Added f_fdisk(). |
|
| 94 |
+/ Aug 27,'12 R0.09a Changed f_open() and f_opendir() reject null object pointer to avoid crash. |
|
| 95 |
+/ Changed option name _FS_SHARE to _FS_LOCK. |
|
| 96 |
+/ Fixed assertion failure due to OS/2 EA on FAT12/16 volume. |
|
| 97 |
+/ Jan 24,'13 R0.09b Added f_setlabel() and f_getlabel(). |
|
| 98 |
+/ |
|
| 99 |
+/ Oct 02,'13 R0.10 Added selection of character encoding on the file. (_STRF_ENCODE) |
|
| 100 |
+/ Added f_closedir(). |
|
| 101 |
+/ Added forced full FAT scan for f_getfree(). (_FS_NOFSINFO) |
|
| 102 |
+/ Added forced mount feature with changes of f_mount(). |
|
| 103 |
+/ Improved behavior of volume auto detection. |
|
| 104 |
+/ Improved write throughput of f_puts() and f_printf(). |
|
| 105 |
+/ Changed argument of f_chdrive(), f_mkfs(), disk_read() and disk_write(). |
|
| 106 |
+/ Fixed f_write() can be truncated when the file size is close to 4GB. |
|
| 107 |
+/ Fixed f_open(), f_mkdir() and f_setlabel() can return incorrect error code. |
|
| 108 |
+/ Jan 15,'14 R0.10a Added arbitrary strings as drive number in the path name. (_STR_VOLUME_ID) |
|
| 109 |
+/ Added a configuration option of minimum sector size. (_MIN_SS) |
|
| 110 |
+/ 2nd argument of f_rename() can have a drive number and it will be ignored. |
|
| 111 |
+/ Fixed f_mount() with forced mount fails when drive number is >= 1. |
|
| 112 |
+/ Fixed f_close() invalidates the file object without volume lock. |
|
| 113 |
+/ Fixed f_closedir() returns but the volume lock is left acquired. |
|
| 114 |
+/ Fixed creation of an entry with LFN fails on too many SFN collisions. |
|
| 115 |
+/ May 19,'14 R0.10b Fixed a hard error in the disk I/O layer can collapse the directory entry. |
|
| 116 |
+/ Fixed LFN entry is not deleted on delete/rename an object with lossy converted SFN. |
|
| 117 |
+/ Nov 9,'14 R0.10c Added a configuration option for the platforms without RTC. (_FS_NORTC) |
|
| 118 |
+/ Fixed volume label created by Mac OS X cannot be retrieved with f_getlabel(). (appeared at R0.09b) |
|
| 119 |
+/ Fixed a potential problem of FAT access that can appear on disk error. |
|
| 120 |
+/ Fixed null pointer dereference on attempting to delete the root direcotry. (appeared at R0.08) |
|
| 121 |
+/ Feb 02,'15 R0.11 Added f_findfirst() and f_findnext(). (_USE_FIND) |
|
| 122 |
+/ Fixed f_unlink() does not remove cluster chain of the file. (appeared at R0.10c) |
|
| 123 |
+/ Fixed _FS_NORTC option does not work properly. (appeared at R0.10c) |
|
| 124 |
+/---------------------------------------------------------------------------*/ |
|
| 125 |
+ |
|
| 126 |
+#include "ff.h" /* Declarations of FatFs API */ |
|
| 127 |
+#include "diskio.h" /* Declarations of disk I/O functions */ |
|
| 128 |
+ |
|
| 129 |
+ |
|
| 130 |
+/*-------------------------------------------------------------------------- |
|
| 131 |
+ |
|
| 132 |
+ Module Private Definitions |
|
| 133 |
+ |
|
| 134 |
+---------------------------------------------------------------------------*/ |
|
| 135 |
+ |
|
| 136 |
+#if _FATFS != 32020 /* Revision ID */ |
|
| 137 |
+#error Wrong include file (ff.h). |
|
| 138 |
+#endif |
|
| 139 |
+ |
|
| 140 |
+ |
|
| 141 |
+/* Reentrancy related */ |
|
| 142 |
+#if _FS_REENTRANT |
|
| 143 |
+#if _USE_LFN == 1 |
|
| 144 |
+#error Static LFN work area cannot be used at thread-safe configuration |
|
| 145 |
+#endif |
|
| 146 |
+#define ENTER_FF(fs) { if (!lock_fs(fs)) return FR_TIMEOUT; }
|
|
| 147 |
+#define LEAVE_FF(fs, res) { unlock_fs(fs, res); return res; }
|
|
| 148 |
+#else |
|
| 149 |
+#define ENTER_FF(fs) |
|
| 150 |
+#define LEAVE_FF(fs, res) return res |
|
| 151 |
+#endif |
|
| 152 |
+ |
|
| 153 |
+#define ABORT(fs, res) { fp->err = (BYTE)(res); LEAVE_FF(fs, res); }
|
|
| 154 |
+ |
|
| 155 |
+ |
|
| 156 |
+/* Definitions of sector size */ |
|
| 157 |
+#if (_MAX_SS < _MIN_SS) || (_MAX_SS != 512 && _MAX_SS != 1024 && _MAX_SS != 2048 && _MAX_SS != 4096) || (_MIN_SS != 512 && _MIN_SS != 1024 && _MIN_SS != 2048 && _MIN_SS != 4096) |
|
| 158 |
+#error Wrong sector size configuration |
|
| 159 |
+#endif |
|
| 160 |
+#if _MAX_SS == _MIN_SS |
|
| 161 |
+#define SS(fs) ((UINT)_MAX_SS) /* Fixed sector size */ |
|
| 162 |
+#else |
|
| 163 |
+#define SS(fs) ((fs)->ssize) /* Variable sector size */ |
|
| 164 |
+#endif |
|
| 165 |
+ |
|
| 166 |
+ |
|
| 167 |
+/* Timestamp feature */ |
|
| 168 |
+#if _FS_NORTC == 1 |
|
| 169 |
+#if _NORTC_YEAR < 1980 || _NORTC_YEAR > 2107 || _NORTC_MON < 1 || _NORTC_MON > 12 || _NORTC_MDAY < 1 || _NORTC_MDAY > 31 |
|
| 170 |
+#error Invalid _FS_NORTC settings |
|
| 171 |
+#endif |
|
| 172 |
+#define GET_FATTIME() ((DWORD)(_NORTC_YEAR - 1980) << 25 | (DWORD)_NORTC_MON << 21 | (DWORD)_NORTC_MDAY << 16) |
|
| 173 |
+#else |
|
| 174 |
+#define GET_FATTIME() get_fattime() |
|
| 175 |
+#endif |
|
| 176 |
+ |
|
| 177 |
+ |
|
| 178 |
+/* File access control feature */ |
|
| 179 |
+#if _FS_LOCK |
|
| 180 |
+#if _FS_READONLY |
|
| 181 |
+#error _FS_LOCK must be 0 at read-only configuration |
|
| 182 |
+#endif |
|
| 183 |
+typedef struct {
|
|
| 184 |
+ FATFS *fs; /* Object ID 1, volume (NULL:blank entry) */ |
|
| 185 |
+ DWORD clu; /* Object ID 2, directory (0:root) */ |
|
| 186 |
+ WORD idx; /* Object ID 3, directory index */ |
|
| 187 |
+ WORD ctr; /* Object open counter, 0:none, 0x01..0xFF:read mode open count, 0x100:write mode */ |
|
| 188 |
+} FILESEM; |
|
| 189 |
+#endif |
|
| 190 |
+ |
|
| 191 |
+ |
|
| 192 |
+ |
|
| 193 |
+/* DBCS code ranges and SBCS extend character conversion table */ |
|
| 194 |
+ |
|
| 195 |
+#if _CODE_PAGE == 932 /* Japanese Shift-JIS */ |
|
| 196 |
+#define _DF1S 0x81 /* DBC 1st byte range 1 start */ |
|
| 197 |
+#define _DF1E 0x9F /* DBC 1st byte range 1 end */ |
|
| 198 |
+#define _DF2S 0xE0 /* DBC 1st byte range 2 start */ |
|
| 199 |
+#define _DF2E 0xFC /* DBC 1st byte range 2 end */ |
|
| 200 |
+#define _DS1S 0x40 /* DBC 2nd byte range 1 start */ |
|
| 201 |
+#define _DS1E 0x7E /* DBC 2nd byte range 1 end */ |
|
| 202 |
+#define _DS2S 0x80 /* DBC 2nd byte range 2 start */ |
|
| 203 |
+#define _DS2E 0xFC /* DBC 2nd byte range 2 end */ |
|
| 204 |
+ |
|
| 205 |
+#elif _CODE_PAGE == 936 /* Simplified Chinese GBK */ |
|
| 206 |
+#define _DF1S 0x81 |
|
| 207 |
+#define _DF1E 0xFE |
|
| 208 |
+#define _DS1S 0x40 |
|
| 209 |
+#define _DS1E 0x7E |
|
| 210 |
+#define _DS2S 0x80 |
|
| 211 |
+#define _DS2E 0xFE |
|
| 212 |
+ |
|
| 213 |
+#elif _CODE_PAGE == 949 /* Korean */ |
|
| 214 |
+#define _DF1S 0x81 |
|
| 215 |
+#define _DF1E 0xFE |
|
| 216 |
+#define _DS1S 0x41 |
|
| 217 |
+#define _DS1E 0x5A |
|
| 218 |
+#define _DS2S 0x61 |
|
| 219 |
+#define _DS2E 0x7A |
|
| 220 |
+#define _DS3S 0x81 |
|
| 221 |
+#define _DS3E 0xFE |
|
| 222 |
+ |
|
| 223 |
+#elif _CODE_PAGE == 950 /* Traditional Chinese Big5 */ |
|
| 224 |
+#define _DF1S 0x81 |
|
| 225 |
+#define _DF1E 0xFE |
|
| 226 |
+#define _DS1S 0x40 |
|
| 227 |
+#define _DS1E 0x7E |
|
| 228 |
+#define _DS2S 0xA1 |
|
| 229 |
+#define _DS2E 0xFE |
|
| 230 |
+ |
|
| 231 |
+#elif _CODE_PAGE == 437 /* U.S. (OEM) */ |
|
| 232 |
+#define _DF1S 0 |
|
| 233 |
+#define _EXCVT {0x80,0x9A,0x90,0x41,0x8E,0x41,0x8F,0x80,0x45,0x45,0x45,0x49,0x49,0x49,0x8E,0x8F,0x90,0x92,0x92,0x4F,0x99,0x4F,0x55,0x55,0x59,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \
|
|
| 234 |
+ 0x41,0x49,0x4F,0x55,0xA5,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0x21,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \ |
|
| 235 |
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
|
| 236 |
+ 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF} |
|
| 237 |
+ |
|
| 238 |
+#elif _CODE_PAGE == 720 /* Arabic (OEM) */ |
|
| 239 |
+#define _DF1S 0 |
|
| 240 |
+#define _EXCVT {0x80,0x81,0x45,0x41,0x84,0x41,0x86,0x43,0x45,0x45,0x45,0x49,0x49,0x8D,0x8E,0x8F,0x90,0x92,0x92,0x93,0x94,0x95,0x49,0x49,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \
|
|
| 241 |
+ 0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \ |
|
| 242 |
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
|
| 243 |
+ 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF} |
|
| 244 |
+ |
|
| 245 |
+#elif _CODE_PAGE == 737 /* Greek (OEM) */ |
|
| 246 |
+#define _DF1S 0 |
|
| 247 |
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x92,0x92,0x93,0x94,0x95,0x96,0x97,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87, \
|
|
| 248 |
+ 0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0xAA,0x92,0x93,0x94,0x95,0x96,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \ |
|
| 249 |
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
|
| 250 |
+ 0x97,0xEA,0xEB,0xEC,0xE4,0xED,0xEE,0xE7,0xE8,0xF1,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF} |
|
| 251 |
+ |
|
| 252 |
+#elif _CODE_PAGE == 775 /* Baltic (OEM) */ |
|
| 253 |
+#define _DF1S 0 |
|
| 254 |
+#define _EXCVT {0x80,0x9A,0x91,0xA0,0x8E,0x95,0x8F,0x80,0xAD,0xED,0x8A,0x8A,0xA1,0x8D,0x8E,0x8F,0x90,0x92,0x92,0xE2,0x99,0x95,0x96,0x97,0x97,0x99,0x9A,0x9D,0x9C,0x9D,0x9E,0x9F, \
|
|
| 255 |
+ 0xA0,0xA1,0xE0,0xA3,0xA3,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \ |
|
| 256 |
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xB5,0xB6,0xB7,0xB8,0xBD,0xBE,0xC6,0xC7,0xA5,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
|
| 257 |
+ 0xE0,0xE1,0xE2,0xE3,0xE5,0xE5,0xE6,0xE3,0xE8,0xE8,0xEA,0xEA,0xEE,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF} |
|
| 258 |
+ |
|
| 259 |
+#elif _CODE_PAGE == 850 /* Multilingual Latin 1 (OEM) */ |
|
| 260 |
+#define _DF1S 0 |
|
| 261 |
+#define _EXCVT {0x80,0x9A,0x90,0xB6,0x8E,0xB7,0x8F,0x80,0xD2,0xD3,0xD4,0xD8,0xD7,0xDE,0x8E,0x8F,0x90,0x92,0x92,0xE2,0x99,0xE3,0xEA,0xEB,0x59,0x99,0x9A,0x9D,0x9C,0x9D,0x9E,0x9F, \
|
|
| 262 |
+ 0xB5,0xD6,0xE0,0xE9,0xA5,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0x21,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \ |
|
| 263 |
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC7,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
|
| 264 |
+ 0xE0,0xE1,0xE2,0xE3,0xE5,0xE5,0xE6,0xE7,0xE7,0xE9,0xEA,0xEB,0xED,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF} |
|
| 265 |
+ |
|
| 266 |
+#elif _CODE_PAGE == 852 /* Latin 2 (OEM) */ |
|
| 267 |
+#define _DF1S 0 |
|
| 268 |
+#define _EXCVT {0x80,0x9A,0x90,0xB6,0x8E,0xDE,0x8F,0x80,0x9D,0xD3,0x8A,0x8A,0xD7,0x8D,0x8E,0x8F,0x90,0x91,0x91,0xE2,0x99,0x95,0x95,0x97,0x97,0x99,0x9A,0x9B,0x9B,0x9D,0x9E,0x9F, \
|
|
| 269 |
+ 0xB5,0xD6,0xE0,0xE9,0xA4,0xA4,0xA6,0xA6,0xA8,0xA8,0xAA,0x8D,0xAC,0xB8,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBD,0xBF, \ |
|
| 270 |
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC6,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD1,0xD1,0xD2,0xD3,0xD2,0xD5,0xD6,0xD7,0xB7,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
|
| 271 |
+ 0xE0,0xE1,0xE2,0xE3,0xE3,0xD5,0xE6,0xE6,0xE8,0xE9,0xE8,0xEB,0xED,0xED,0xDD,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xEB,0xFC,0xFC,0xFE,0xFF} |
|
| 272 |
+ |
|
| 273 |
+#elif _CODE_PAGE == 855 /* Cyrillic (OEM) */ |
|
| 274 |
+#define _DF1S 0 |
|
| 275 |
+#define _EXCVT {0x81,0x81,0x83,0x83,0x85,0x85,0x87,0x87,0x89,0x89,0x8B,0x8B,0x8D,0x8D,0x8F,0x8F,0x91,0x91,0x93,0x93,0x95,0x95,0x97,0x97,0x99,0x99,0x9B,0x9B,0x9D,0x9D,0x9F,0x9F, \
|
|
| 276 |
+ 0xA1,0xA1,0xA3,0xA3,0xA5,0xA5,0xA7,0xA7,0xA9,0xA9,0xAB,0xAB,0xAD,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB6,0xB6,0xB8,0xB8,0xB9,0xBA,0xBB,0xBC,0xBE,0xBE,0xBF, \ |
|
| 277 |
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC7,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD1,0xD1,0xD3,0xD3,0xD5,0xD5,0xD7,0xD7,0xDD,0xD9,0xDA,0xDB,0xDC,0xDD,0xE0,0xDF, \ |
|
| 278 |
+ 0xE0,0xE2,0xE2,0xE4,0xE4,0xE6,0xE6,0xE8,0xE8,0xEA,0xEA,0xEC,0xEC,0xEE,0xEE,0xEF,0xF0,0xF2,0xF2,0xF4,0xF4,0xF6,0xF6,0xF8,0xF8,0xFA,0xFA,0xFC,0xFC,0xFD,0xFE,0xFF} |
|
| 279 |
+ |
|
| 280 |
+#elif _CODE_PAGE == 857 /* Turkish (OEM) */ |
|
| 281 |
+#define _DF1S 0 |
|
| 282 |
+#define _EXCVT {0x80,0x9A,0x90,0xB6,0x8E,0xB7,0x8F,0x80,0xD2,0xD3,0xD4,0xD8,0xD7,0x98,0x8E,0x8F,0x90,0x92,0x92,0xE2,0x99,0xE3,0xEA,0xEB,0x98,0x99,0x9A,0x9D,0x9C,0x9D,0x9E,0x9E, \
|
|
| 283 |
+ 0xB5,0xD6,0xE0,0xE9,0xA5,0xA5,0xA6,0xA6,0xA8,0xA9,0xAA,0xAB,0xAC,0x21,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \ |
|
| 284 |
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC7,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
|
| 285 |
+ 0xE0,0xE1,0xE2,0xE3,0xE5,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xDE,0x59,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF} |
|
| 286 |
+ |
|
| 287 |
+#elif _CODE_PAGE == 858 /* Multilingual Latin 1 + Euro (OEM) */ |
|
| 288 |
+#define _DF1S 0 |
|
| 289 |
+#define _EXCVT {0x80,0x9A,0x90,0xB6,0x8E,0xB7,0x8F,0x80,0xD2,0xD3,0xD4,0xD8,0xD7,0xDE,0x8E,0x8F,0x90,0x92,0x92,0xE2,0x99,0xE3,0xEA,0xEB,0x59,0x99,0x9A,0x9D,0x9C,0x9D,0x9E,0x9F, \
|
|
| 290 |
+ 0xB5,0xD6,0xE0,0xE9,0xA5,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0x21,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \ |
|
| 291 |
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC7,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD1,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
|
| 292 |
+ 0xE0,0xE1,0xE2,0xE3,0xE5,0xE5,0xE6,0xE7,0xE7,0xE9,0xEA,0xEB,0xED,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF} |
|
| 293 |
+ |
|
| 294 |
+#elif _CODE_PAGE == 862 /* Hebrew (OEM) */ |
|
| 295 |
+#define _DF1S 0 |
|
| 296 |
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \
|
|
| 297 |
+ 0x41,0x49,0x4F,0x55,0xA5,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0x21,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \ |
|
| 298 |
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
|
| 299 |
+ 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF} |
|
| 300 |
+ |
|
| 301 |
+#elif _CODE_PAGE == 866 /* Russian (OEM) */ |
|
| 302 |
+#define _DF1S 0 |
|
| 303 |
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \
|
|
| 304 |
+ 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \ |
|
| 305 |
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
|
| 306 |
+ 0x90,0x91,0x92,0x93,0x9d,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xF0,0xF0,0xF2,0xF2,0xF4,0xF4,0xF6,0xF6,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF} |
|
| 307 |
+ |
|
| 308 |
+#elif _CODE_PAGE == 874 /* Thai (OEM, Windows) */ |
|
| 309 |
+#define _DF1S 0 |
|
| 310 |
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \
|
|
| 311 |
+ 0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \ |
|
| 312 |
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
|
| 313 |
+ 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF} |
|
| 314 |
+ |
|
| 315 |
+#elif _CODE_PAGE == 1250 /* Central Europe (Windows) */ |
|
| 316 |
+#define _DF1S 0 |
|
| 317 |
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x8A,0x9B,0x8C,0x8D,0x8E,0x8F, \
|
|
| 318 |
+ 0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xA3,0xB4,0xB5,0xB6,0xB7,0xB8,0xA5,0xAA,0xBB,0xBC,0xBD,0xBC,0xAF, \ |
|
| 319 |
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
|
| 320 |
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF} |
|
| 321 |
+ |
|
| 322 |
+#elif _CODE_PAGE == 1251 /* Cyrillic (Windows) */ |
|
| 323 |
+#define _DF1S 0 |
|
| 324 |
+#define _EXCVT {0x80,0x81,0x82,0x82,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x80,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x8A,0x9B,0x8C,0x8D,0x8E,0x8F, \
|
|
| 325 |
+ 0xA0,0xA2,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB2,0xA5,0xB5,0xB6,0xB7,0xA8,0xB9,0xAA,0xBB,0xA3,0xBD,0xBD,0xAF, \ |
|
| 326 |
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
|
| 327 |
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF} |
|
| 328 |
+ |
|
| 329 |
+#elif _CODE_PAGE == 1252 /* Latin 1 (Windows) */ |
|
| 330 |
+#define _DF1S 0 |
|
| 331 |
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0xAd,0x9B,0x8C,0x9D,0xAE,0x9F, \
|
|
| 332 |
+ 0xA0,0x21,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \ |
|
| 333 |
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
|
| 334 |
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0x9F} |
|
| 335 |
+ |
|
| 336 |
+#elif _CODE_PAGE == 1253 /* Greek (Windows) */ |
|
| 337 |
+#define _DF1S 0 |
|
| 338 |
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \
|
|
| 339 |
+ 0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \ |
|
| 340 |
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xA2,0xB8,0xB9,0xBA, \ |
|
| 341 |
+ 0xE0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xF2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xFB,0xBC,0xFD,0xBF,0xFF} |
|
| 342 |
+ |
|
| 343 |
+#elif _CODE_PAGE == 1254 /* Turkish (Windows) */ |
|
| 344 |
+#define _DF1S 0 |
|
| 345 |
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x8A,0x9B,0x8C,0x9D,0x9E,0x9F, \
|
|
| 346 |
+ 0xA0,0x21,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \ |
|
| 347 |
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
|
| 348 |
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0x9F} |
|
| 349 |
+ |
|
| 350 |
+#elif _CODE_PAGE == 1255 /* Hebrew (Windows) */ |
|
| 351 |
+#define _DF1S 0 |
|
| 352 |
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \
|
|
| 353 |
+ 0xA0,0x21,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \ |
|
| 354 |
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
|
| 355 |
+ 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF} |
|
| 356 |
+ |
|
| 357 |
+#elif _CODE_PAGE == 1256 /* Arabic (Windows) */ |
|
| 358 |
+#define _DF1S 0 |
|
| 359 |
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x8C,0x9D,0x9E,0x9F, \
|
|
| 360 |
+ 0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \ |
|
| 361 |
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
|
| 362 |
+ 0x41,0xE1,0x41,0xE3,0xE4,0xE5,0xE6,0x43,0x45,0x45,0x45,0x45,0xEC,0xED,0x49,0x49,0xF0,0xF1,0xF2,0xF3,0x4F,0xF5,0xF6,0xF7,0xF8,0x55,0xFA,0x55,0x55,0xFD,0xFE,0xFF} |
|
| 363 |
+ |
|
| 364 |
+#elif _CODE_PAGE == 1257 /* Baltic (Windows) */ |
|
| 365 |
+#define _DF1S 0 |
|
| 366 |
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \
|
|
| 367 |
+ 0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xA8,0xB9,0xAA,0xBB,0xBC,0xBD,0xBE,0xAF, \ |
|
| 368 |
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
|
| 369 |
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF} |
|
| 370 |
+ |
|
| 371 |
+#elif _CODE_PAGE == 1258 /* Vietnam (OEM, Windows) */ |
|
| 372 |
+#define _DF1S 0 |
|
| 373 |
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0xAC,0x9D,0x9E,0x9F, \
|
|
| 374 |
+ 0xA0,0x21,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \ |
|
| 375 |
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
|
| 376 |
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xEC,0xCD,0xCE,0xCF,0xD0,0xD1,0xF2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xFE,0x9F} |
|
| 377 |
+ |
|
| 378 |
+#elif _CODE_PAGE == 1 /* ASCII (for only non-LFN cfg) */ |
|
| 379 |
+#if _USE_LFN |
|
| 380 |
+#error Cannot use LFN feature without valid code page. |
|
| 381 |
+#endif |
|
| 382 |
+#define _DF1S 0 |
|
| 383 |
+ |
|
| 384 |
+#else |
|
| 385 |
+#error Unknown code page |
|
| 386 |
+ |
|
| 387 |
+#endif |
|
| 388 |
+ |
|
| 389 |
+ |
|
| 390 |
+/* Character code support macros */ |
|
| 391 |
+#define IsUpper(c) (((c)>='A')&&((c)<='Z')) |
|
| 392 |
+#define IsLower(c) (((c)>='a')&&((c)<='z')) |
|
| 393 |
+#define IsDigit(c) (((c)>='0')&&((c)<='9')) |
|
| 394 |
+ |
|
| 395 |
+#if _DF1S /* Code page is DBCS */ |
|
| 396 |
+ |
|
| 397 |
+#ifdef _DF2S /* Two 1st byte areas */ |
|
| 398 |
+#define IsDBCS1(c) (((BYTE)(c) >= _DF1S && (BYTE)(c) <= _DF1E) || ((BYTE)(c) >= _DF2S && (BYTE)(c) <= _DF2E)) |
|
| 399 |
+#else /* One 1st byte area */ |
|
| 400 |
+#define IsDBCS1(c) ((BYTE)(c) >= _DF1S && (BYTE)(c) <= _DF1E) |
|
| 401 |
+#endif |
|
| 402 |
+ |
|
| 403 |
+#ifdef _DS3S /* Three 2nd byte areas */ |
|
| 404 |
+#define IsDBCS2(c) (((BYTE)(c) >= _DS1S && (BYTE)(c) <= _DS1E) || ((BYTE)(c) >= _DS2S && (BYTE)(c) <= _DS2E) || ((BYTE)(c) >= _DS3S && (BYTE)(c) <= _DS3E)) |
|
| 405 |
+#else /* Two 2nd byte areas */ |
|
| 406 |
+#define IsDBCS2(c) (((BYTE)(c) >= _DS1S && (BYTE)(c) <= _DS1E) || ((BYTE)(c) >= _DS2S && (BYTE)(c) <= _DS2E)) |
|
| 407 |
+#endif |
|
| 408 |
+ |
|
| 409 |
+#else /* Code page is SBCS */ |
|
| 410 |
+ |
|
| 411 |
+#define IsDBCS1(c) 0 |
|
| 412 |
+#define IsDBCS2(c) 0 |
|
| 413 |
+ |
|
| 414 |
+#endif /* _DF1S */ |
|
| 415 |
+ |
|
| 416 |
+ |
|
| 417 |
+/* Name status flags */ |
|
| 418 |
+#define NSFLAG 11 /* Index of name status byte in fn[] */ |
|
| 419 |
+#define NS_LOSS 0x01 /* Out of 8.3 format */ |
|
| 420 |
+#define NS_LFN 0x02 /* Force to create LFN entry */ |
|
| 421 |
+#define NS_LAST 0x04 /* Last segment */ |
|
| 422 |
+#define NS_BODY 0x08 /* Lower case flag (body) */ |
|
| 423 |
+#define NS_EXT 0x10 /* Lower case flag (ext) */ |
|
| 424 |
+#define NS_DOT 0x20 /* Dot entry */ |
|
| 425 |
+ |
|
| 426 |
+ |
|
| 427 |
+/* FAT sub-type boundaries (Differ from specs but correct for real DOS/Windows) */ |
|
| 428 |
+#define MIN_FAT16 4086U /* Minimum number of clusters as FAT16 */ |
|
| 429 |
+#define MIN_FAT32 65526U /* Minimum number of clusters as FAT32 */ |
|
| 430 |
+ |
|
| 431 |
+ |
|
| 432 |
+/* FatFs refers the members in the FAT structures as byte array instead of |
|
| 433 |
+/ structure member because the structure is not binary compatible between |
|
| 434 |
+/ different platforms */ |
|
| 435 |
+ |
|
| 436 |
+#define BS_jmpBoot 0 /* x86 jump instruction (3) */ |
|
| 437 |
+#define BS_OEMName 3 /* OEM name (8) */ |
|
| 438 |
+#define BPB_BytsPerSec 11 /* Sector size [byte] (2) */ |
|
| 439 |
+#define BPB_SecPerClus 13 /* Cluster size [sector] (1) */ |
|
| 440 |
+#define BPB_RsvdSecCnt 14 /* Size of reserved area [sector] (2) */ |
|
| 441 |
+#define BPB_NumFATs 16 /* Number of FAT copies (1) */ |
|
| 442 |
+#define BPB_RootEntCnt 17 /* Number of root directory entries for FAT12/16 (2) */ |
|
| 443 |
+#define BPB_TotSec16 19 /* Volume size [sector] (2) */ |
|
| 444 |
+#define BPB_Media 21 /* Media descriptor (1) */ |
|
| 445 |
+#define BPB_FATSz16 22 /* FAT size [sector] (2) */ |
|
| 446 |
+#define BPB_SecPerTrk 24 /* Track size [sector] (2) */ |
|
| 447 |
+#define BPB_NumHeads 26 /* Number of heads (2) */ |
|
| 448 |
+#define BPB_HiddSec 28 /* Number of special hidden sectors (4) */ |
|
| 449 |
+#define BPB_TotSec32 32 /* Volume size [sector] (4) */ |
|
| 450 |
+#define BS_DrvNum 36 /* Physical drive number (2) */ |
|
| 451 |
+#define BS_BootSig 38 /* Extended boot signature (1) */ |
|
| 452 |
+#define BS_VolID 39 /* Volume serial number (4) */ |
|
| 453 |
+#define BS_VolLab 43 /* Volume label (8) */ |
|
| 454 |
+#define BS_FilSysType 54 /* File system type (1) */ |
|
| 455 |
+#define BPB_FATSz32 36 /* FAT size [sector] (4) */ |
|
| 456 |
+#define BPB_ExtFlags 40 /* Extended flags (2) */ |
|
| 457 |
+#define BPB_FSVer 42 /* File system version (2) */ |
|
| 458 |
+#define BPB_RootClus 44 /* Root directory first cluster (4) */ |
|
| 459 |
+#define BPB_FSInfo 48 /* Offset of FSINFO sector (2) */ |
|
| 460 |
+#define BPB_BkBootSec 50 /* Offset of backup boot sector (2) */ |
|
| 461 |
+#define BS_DrvNum32 64 /* Physical drive number (2) */ |
|
| 462 |
+#define BS_BootSig32 66 /* Extended boot signature (1) */ |
|
| 463 |
+#define BS_VolID32 67 /* Volume serial number (4) */ |
|
| 464 |
+#define BS_VolLab32 71 /* Volume label (8) */ |
|
| 465 |
+#define BS_FilSysType32 82 /* File system type (1) */ |
|
| 466 |
+#define FSI_LeadSig 0 /* FSI: Leading signature (4) */ |
|
| 467 |
+#define FSI_StrucSig 484 /* FSI: Structure signature (4) */ |
|
| 468 |
+#define FSI_Free_Count 488 /* FSI: Number of free clusters (4) */ |
|
| 469 |
+#define FSI_Nxt_Free 492 /* FSI: Last allocated cluster (4) */ |
|
| 470 |
+#define MBR_Table 446 /* MBR: Partition table offset (2) */ |
|
| 471 |
+#define SZ_PTE 16 /* MBR: Size of a partition table entry */ |
|
| 472 |
+#define BS_55AA 510 /* Signature word (2) */ |
|
| 473 |
+ |
|
| 474 |
+#define DIR_Name 0 /* Short file name (11) */ |
|
| 475 |
+#define DIR_Attr 11 /* Attribute (1) */ |
|
| 476 |
+#define DIR_NTres 12 /* Lower case flag (1) */ |
|
| 477 |
+#define DIR_CrtTimeTenth 13 /* Created time sub-second (1) */ |
|
| 478 |
+#define DIR_CrtTime 14 /* Created time (2) */ |
|
| 479 |
+#define DIR_CrtDate 16 /* Created date (2) */ |
|
| 480 |
+#define DIR_LstAccDate 18 /* Last accessed date (2) */ |
|
| 481 |
+#define DIR_FstClusHI 20 /* Higher 16-bit of first cluster (2) */ |
|
| 482 |
+#define DIR_WrtTime 22 /* Modified time (2) */ |
|
| 483 |
+#define DIR_WrtDate 24 /* Modified date (2) */ |
|
| 484 |
+#define DIR_FstClusLO 26 /* Lower 16-bit of first cluster (2) */ |
|
| 485 |
+#define DIR_FileSize 28 /* File size (4) */ |
|
| 486 |
+#define LDIR_Ord 0 /* LFN entry order and LLE flag (1) */ |
|
| 487 |
+#define LDIR_Attr 11 /* LFN attribute (1) */ |
|
| 488 |
+#define LDIR_Type 12 /* LFN type (1) */ |
|
| 489 |
+#define LDIR_Chksum 13 /* Sum of corresponding SFN entry */ |
|
| 490 |
+#define LDIR_FstClusLO 26 /* Must be zero (0) */ |
|
| 491 |
+#define SZ_DIRE 32 /* Size of a directory entry */ |
|
| 492 |
+#define LLEF 0x40 /* Last long entry flag in LDIR_Ord */ |
|
| 493 |
+#define DDEM 0xE5 /* Deleted directory entry mark at DIR_Name[0] */ |
|
| 494 |
+#define RDDEM 0x05 /* Replacement of the character collides with DDEM */ |
|
| 495 |
+ |
|
| 496 |
+ |
|
| 497 |
+ |
|
| 498 |
+ |
|
| 499 |
+/*------------------------------------------------------------*/ |
|
| 500 |
+/* Module private work area */ |
|
| 501 |
+/*------------------------------------------------------------*/ |
|
| 502 |
+/* Remark: Uninitialized variables with static duration are |
|
| 503 |
+/ guaranteed zero/null at start-up. If not, either the linker |
|
| 504 |
+/ or start-up routine being used is out of ANSI-C standard. |
|
| 505 |
+*/ |
|
| 506 |
+ |
|
| 507 |
+#if _VOLUMES < 1 || _VOLUMES > 9 |
|
| 508 |
+#error Wrong _VOLUMES setting |
|
| 509 |
+#endif |
|
| 510 |
+static FATFS *FatFs[_VOLUMES]; /* Pointer to the file system objects (logical drives) */ |
|
| 511 |
+static WORD Fsid; /* File system mount ID */ |
|
| 512 |
+ |
|
| 513 |
+#if _FS_RPATH && _VOLUMES >= 2 |
|
| 514 |
+static BYTE CurrVol; /* Current drive */ |
|
| 515 |
+#endif |
|
| 516 |
+ |
|
| 517 |
+#if _FS_LOCK |
|
| 518 |
+static FILESEM Files[_FS_LOCK]; /* Open object lock semaphores */ |
|
| 519 |
+#endif |
|
| 520 |
+ |
|
| 521 |
+#if _USE_LFN == 0 /* Non LFN feature */ |
|
| 522 |
+#define DEFINE_NAMEBUF BYTE sfn[12] |
|
| 523 |
+#define INIT_BUF(dobj) (dobj).fn = sfn |
|
| 524 |
+#define FREE_BUF() |
|
| 525 |
+#else |
|
| 526 |
+#if _MAX_LFN < 12 || _MAX_LFN > 255 |
|
| 527 |
+#error Wrong _MAX_LFN setting |
|
| 528 |
+#endif |
|
| 529 |
+#if _USE_LFN == 1 /* LFN feature with static working buffer */ |
|
| 530 |
+static WCHAR LfnBuf[_MAX_LFN + 1]; |
|
| 531 |
+#define DEFINE_NAMEBUF BYTE sfn[12] |
|
| 532 |
+#define INIT_BUF(dobj) { (dobj).fn = sfn; (dobj).lfn = LfnBuf; }
|
|
| 533 |
+#define FREE_BUF() |
|
| 534 |
+#elif _USE_LFN == 2 /* LFN feature with dynamic working buffer on the stack */ |
|
| 535 |
+#define DEFINE_NAMEBUF BYTE sfn[12]; WCHAR lbuf[_MAX_LFN + 1] |
|
| 536 |
+#define INIT_BUF(dobj) { (dobj).fn = sfn; (dobj).lfn = lbuf; }
|
|
| 537 |
+#define FREE_BUF() |
|
| 538 |
+#elif _USE_LFN == 3 /* LFN feature with dynamic working buffer on the heap */ |
|
| 539 |
+#define DEFINE_NAMEBUF BYTE sfn[12]; WCHAR *lfn |
|
| 540 |
+#define INIT_BUF(dobj) { lfn = ff_memalloc((_MAX_LFN + 1) * 2); if (!lfn) LEAVE_FF((dobj).fs, FR_NOT_ENOUGH_CORE); (dobj).lfn = lfn; (dobj).fn = sfn; }
|
|
| 541 |
+#define FREE_BUF() ff_memfree(lfn) |
|
| 542 |
+#else |
|
| 543 |
+#error Wrong _USE_LFN setting |
|
| 544 |
+#endif |
|
| 545 |
+#endif |
|
| 546 |
+ |
|
| 547 |
+#ifdef _EXCVT |
|
| 548 |
+static const BYTE ExCvt[] = _EXCVT; /* Upper conversion table for extended characters */ |
|
| 549 |
+#endif |
|
| 550 |
+ |
|
| 551 |
+ |
|
| 552 |
+ |
|
| 553 |
+ |
|
| 554 |
+ |
|
| 555 |
+ |
|
| 556 |
+/*-------------------------------------------------------------------------- |
|
| 557 |
+ |
|
| 558 |
+ Module Private Functions |
|
| 559 |
+ |
|
| 560 |
+---------------------------------------------------------------------------*/ |
|
| 561 |
+DWORD clust2sect (FATFS* fs, DWORD clst); |
|
| 562 |
+DWORD get_fat (FATFS* fs, DWORD clst); |
|
| 563 |
+ |
|
| 564 |
+#if !_FS_READONLY |
|
| 565 |
+FRESULT put_fat (FATFS* fs, DWORD clst, DWORD val); |
|
| 566 |
+#endif /* !_FS_READONLY */ |
|
| 567 |
+ |
|
| 568 |
+#if _USE_LFN |
|
| 569 |
+static void gen_numname (BYTE* dst, const BYTE* src, const WCHAR* lfn, UINT seq); |
|
| 570 |
+#endif /* !_USE_LFN */ |
|
| 571 |
+ |
|
| 572 |
+ |
|
| 573 |
+ |
|
| 574 |
+/*-----------------------------------------------------------------------*/ |
|
| 575 |
+/* String functions */ |
|
| 576 |
+/*-----------------------------------------------------------------------*/ |
|
| 577 |
+ |
|
| 578 |
+/* Copy memory to memory */ |
|
| 579 |
+static |
|
| 580 |
+void mem_cpy (void* dst, const void* src, UINT cnt) {
|
|
| 581 |
+ BYTE *d = (BYTE*)dst; |
|
| 582 |
+ const BYTE *s = (const BYTE*)src; |
|
| 583 |
+ |
|
| 584 |
+#if _WORD_ACCESS == 1 |
|
| 585 |
+ while (cnt >= sizeof (int)) {
|
|
| 586 |
+ *(int*)d = *(int*)s; |
|
| 587 |
+ d += sizeof (int); s += sizeof (int); |
|
| 588 |
+ cnt -= sizeof (int); |
|
| 589 |
+ } |
|
| 590 |
+#endif |
|
| 591 |
+ while (cnt--) |
|
| 592 |
+ *d++ = *s++; |
|
| 593 |
+} |
|
| 594 |
+ |
|
| 595 |
+/* Fill memory */ |
|
| 596 |
+static |
|
| 597 |
+void mem_set (void* dst, int val, UINT cnt) {
|
|
| 598 |
+ BYTE *d = (BYTE*)dst; |
|
| 599 |
+ |
|
| 600 |
+ while (cnt--) |
|
| 601 |
+ *d++ = (BYTE)val; |
|
| 602 |
+} |
|
| 603 |
+ |
|
| 604 |
+/* Compare memory to memory */ |
|
| 605 |
+static |
|
| 606 |
+int mem_cmp (const void* dst, const void* src, UINT cnt) {
|
|
| 607 |
+ const BYTE *d = (const BYTE *)dst, *s = (const BYTE *)src; |
|
| 608 |
+ int r = 0; |
|
| 609 |
+ |
|
| 610 |
+ while (cnt-- && (r = *d++ - *s++) == 0) ; |
|
| 611 |
+ return r; |
|
| 612 |
+} |
|
| 613 |
+ |
|
| 614 |
+/* Check if chr is contained in the string */ |
|
| 615 |
+static |
|
| 616 |
+int chk_chr (const char* str, int chr) {
|
|
| 617 |
+ while (*str && *str != chr) str++; |
|
| 618 |
+ return *str; |
|
| 619 |
+} |
|
| 620 |
+ |
|
| 621 |
+ |
|
| 622 |
+ |
|
| 623 |
+ |
|
| 624 |
+/*-----------------------------------------------------------------------*/ |
|
| 625 |
+/* Request/Release grant to access the volume */ |
|
| 626 |
+/*-----------------------------------------------------------------------*/ |
|
| 627 |
+#if _FS_REENTRANT |
|
| 628 |
+static |
|
| 629 |
+int lock_fs ( |
|
| 630 |
+ FATFS* fs /* File system object */ |
|
| 631 |
+) |
|
| 632 |
+{
|
|
| 633 |
+ return ff_req_grant(fs->sobj); |
|
| 634 |
+} |
|
| 635 |
+ |
|
| 636 |
+ |
|
| 637 |
+static |
|
| 638 |
+void unlock_fs ( |
|
| 639 |
+ FATFS* fs, /* File system object */ |
|
| 640 |
+ FRESULT res /* Result code to be returned */ |
|
| 641 |
+) |
|
| 642 |
+{
|
|
| 643 |
+ if (fs && |
|
| 644 |
+ res != FR_NOT_ENABLED && |
|
| 645 |
+ res != FR_INVALID_DRIVE && |
|
| 646 |
+ res != FR_INVALID_OBJECT && |
|
| 647 |
+ res != FR_TIMEOUT) {
|
|
| 648 |
+ ff_rel_grant(fs->sobj); |
|
| 649 |
+ } |
|
| 650 |
+} |
|
| 651 |
+#endif |
|
| 652 |
+ |
|
| 653 |
+ |
|
| 654 |
+ |
|
| 655 |
+ |
|
| 656 |
+/*-----------------------------------------------------------------------*/ |
|
| 657 |
+/* File lock control functions */ |
|
| 658 |
+/*-----------------------------------------------------------------------*/ |
|
| 659 |
+#if _FS_LOCK |
|
| 660 |
+ |
|
| 661 |
+static |
|
| 662 |
+FRESULT chk_lock ( /* Check if the file can be accessed */ |
|
| 663 |
+ DIR* dp, /* Directory object pointing the file to be checked */ |
|
| 664 |
+ int acc /* Desired access type (0:Read, 1:Write, 2:Delete/Rename) */ |
|
| 665 |
+) |
|
| 666 |
+{
|
|
| 667 |
+ UINT i, be; |
|
| 668 |
+ |
|
| 669 |
+ /* Search file semaphore table */ |
|
| 670 |
+ for (i = be = 0; i < _FS_LOCK; i++) {
|
|
| 671 |
+ if (Files[i].fs) { /* Existing entry */
|
|
| 672 |
+ if (Files[i].fs == dp->fs && /* Check if the object matched with an open object */ |
|
| 673 |
+ Files[i].clu == dp->sclust && |
|
| 674 |
+ Files[i].idx == dp->index) break; |
|
| 675 |
+ } else { /* Blank entry */
|
|
| 676 |
+ be = 1; |
|
| 677 |
+ } |
|
| 678 |
+ } |
|
| 679 |
+ if (i == _FS_LOCK) /* The object is not opened */ |
|
| 680 |
+ return (be || acc == 2) ? FR_OK : FR_TOO_MANY_OPEN_FILES; /* Is there a blank entry for new object? */ |
|
| 681 |
+ |
|
| 682 |
+ /* The object has been opened. Reject any open against writing file and all write mode open */ |
|
| 683 |
+ return (acc || Files[i].ctr == 0x100) ? FR_LOCKED : FR_OK; |
|
| 684 |
+} |
|
| 685 |
+ |
|
| 686 |
+ |
|
| 687 |
+static |
|
| 688 |
+int enq_lock (void) /* Check if an entry is available for a new object */ |
|
| 689 |
+{
|
|
| 690 |
+ UINT i; |
|
| 691 |
+ |
|
| 692 |
+ for (i = 0; i < _FS_LOCK && Files[i].fs; i++) ; |
|
| 693 |
+ return (i == _FS_LOCK) ? 0 : 1; |
|
| 694 |
+} |
|
| 695 |
+ |
|
| 696 |
+ |
|
| 697 |
+static |
|
| 698 |
+UINT inc_lock ( /* Increment object open counter and returns its index (0:Internal error) */ |
|
| 699 |
+ DIR* dp, /* Directory object pointing the file to register or increment */ |
|
| 700 |
+ int acc /* Desired access (0:Read, 1:Write, 2:Delete/Rename) */ |
|
| 701 |
+) |
|
| 702 |
+{
|
|
| 703 |
+ UINT i; |
|
| 704 |
+ |
|
| 705 |
+ |
|
| 706 |
+ for (i = 0; i < _FS_LOCK; i++) { /* Find the object */
|
|
| 707 |
+ if (Files[i].fs == dp->fs && |
|
| 708 |
+ Files[i].clu == dp->sclust && |
|
| 709 |
+ Files[i].idx == dp->index) break; |
|
| 710 |
+ } |
|
| 711 |
+ |
|
| 712 |
+ if (i == _FS_LOCK) { /* Not opened. Register it as new. */
|
|
| 713 |
+ for (i = 0; i < _FS_LOCK && Files[i].fs; i++) ; |
|
| 714 |
+ if (i == _FS_LOCK) return 0; /* No free entry to register (int err) */ |
|
| 715 |
+ Files[i].fs = dp->fs; |
|
| 716 |
+ Files[i].clu = dp->sclust; |
|
| 717 |
+ Files[i].idx = dp->index; |
|
| 718 |
+ Files[i].ctr = 0; |
|
| 719 |
+ } |
|
| 720 |
+ |
|
| 721 |
+ if (acc && Files[i].ctr) return 0; /* Access violation (int err) */ |
|
| 722 |
+ |
|
| 723 |
+ Files[i].ctr = acc ? 0x100 : Files[i].ctr + 1; /* Set semaphore value */ |
|
| 724 |
+ |
|
| 725 |
+ return i + 1; |
|
| 726 |
+} |
|
| 727 |
+ |
|
| 728 |
+ |
|
| 729 |
+static |
|
| 730 |
+FRESULT dec_lock ( /* Decrement object open counter */ |
|
| 731 |
+ UINT i /* Semaphore index (1..) */ |
|
| 732 |
+) |
|
| 733 |
+{
|
|
| 734 |
+ WORD n; |
|
| 735 |
+ FRESULT res; |
|
| 736 |
+ |
|
| 737 |
+ |
|
| 738 |
+ if (--i < _FS_LOCK) { /* Shift index number origin from 0 */
|
|
| 739 |
+ n = Files[i].ctr; |
|
| 740 |
+ if (n == 0x100) n = 0; /* If write mode open, delete the entry */ |
|
| 741 |
+ if (n) n--; /* Decrement read mode open count */ |
|
| 742 |
+ Files[i].ctr = n; |
|
| 743 |
+ if (!n) Files[i].fs = 0; /* Delete the entry if open count gets zero */ |
|
| 744 |
+ res = FR_OK; |
|
| 745 |
+ } else {
|
|
| 746 |
+ res = FR_INT_ERR; /* Invalid index nunber */ |
|
| 747 |
+ } |
|
| 748 |
+ return res; |
|
| 749 |
+} |
|
| 750 |
+ |
|
| 751 |
+ |
|
| 752 |
+static |
|
| 753 |
+void clear_lock ( /* Clear lock entries of the volume */ |
|
| 754 |
+ FATFS *fs |
|
| 755 |
+) |
|
| 756 |
+{
|
|
| 757 |
+ UINT i; |
|
| 758 |
+ |
|
| 759 |
+ for (i = 0; i < _FS_LOCK; i++) {
|
|
| 760 |
+ if (Files[i].fs == fs) Files[i].fs = 0; |
|
| 761 |
+ } |
|
| 762 |
+} |
|
| 763 |
+#endif |
|
| 764 |
+ |
|
| 765 |
+ |
|
| 766 |
+ |
|
| 767 |
+ |
|
| 768 |
+/*-----------------------------------------------------------------------*/ |
|
| 769 |
+/* Move/Flush disk access window in the file system object */ |
|
| 770 |
+/*-----------------------------------------------------------------------*/ |
|
| 771 |
+#if !_FS_READONLY |
|
| 772 |
+static |
|
| 773 |
+FRESULT sync_window ( |
|
| 774 |
+ FATFS* fs /* File system object */ |
|
| 775 |
+) |
|
| 776 |
+{
|
|
| 777 |
+ DWORD wsect; |
|
| 778 |
+ UINT nf; |
|
| 779 |
+ FRESULT res = FR_OK; |
|
| 780 |
+ |
|
| 781 |
+ |
|
| 782 |
+ if (fs->wflag) { /* Write back the sector if it is dirty */
|
|
| 783 |
+ wsect = fs->winsect; /* Current sector number */ |
|
| 784 |
+ if (disk_write(fs->drv, fs->win.d8, wsect, 1) != RES_OK) {
|
|
| 785 |
+ res = FR_DISK_ERR; |
|
| 786 |
+ } else {
|
|
| 787 |
+ fs->wflag = 0; |
|
| 788 |
+ if (wsect - fs->fatbase < fs->fsize) { /* Is it in the FAT area? */
|
|
| 789 |
+ for (nf = fs->n_fats; nf >= 2; nf--) { /* Reflect the change to all FAT copies */
|
|
| 790 |
+ wsect += fs->fsize; |
|
| 791 |
+ disk_write(fs->drv, fs->win.d8, wsect, 1); |
|
| 792 |
+ } |
|
| 793 |
+ } |
|
| 794 |
+ } |
|
| 795 |
+ } |
|
| 796 |
+ return res; |
|
| 797 |
+} |
|
| 798 |
+#endif |
|
| 799 |
+ |
|
| 800 |
+ |
|
| 801 |
+static |
|
| 802 |
+FRESULT move_window ( |
|
| 803 |
+ FATFS* fs, /* File system object */ |
|
| 804 |
+ DWORD sector /* Sector number to make appearance in the fs->win[].d8 */ |
|
| 805 |
+) |
|
| 806 |
+{
|
|
| 807 |
+ FRESULT res = FR_OK; |
|
| 808 |
+ |
|
| 809 |
+ |
|
| 810 |
+ if (sector != fs->winsect) { /* Window offset changed? */
|
|
| 811 |
+#if !_FS_READONLY |
|
| 812 |
+ res = sync_window(fs); /* Write-back changes */ |
|
| 813 |
+#endif |
|
| 814 |
+ if (res == FR_OK) { /* Fill sector window with new data */
|
|
| 815 |
+ if (disk_read(fs->drv, fs->win.d8, sector, 1) != RES_OK) {
|
|
| 816 |
+ sector = 0xFFFFFFFF; /* Invalidate window if data is not reliable */ |
|
| 817 |
+ res = FR_DISK_ERR; |
|
| 818 |
+ } |
|
| 819 |
+ fs->winsect = sector; |
|
| 820 |
+ } |
|
| 821 |
+ } |
|
| 822 |
+ return res; |
|
| 823 |
+} |
|
| 824 |
+ |
|
| 825 |
+ |
|
| 826 |
+ |
|
| 827 |
+ |
|
| 828 |
+/*-----------------------------------------------------------------------*/ |
|
| 829 |
+/* Synchronize file system and strage device */ |
|
| 830 |
+/*-----------------------------------------------------------------------*/ |
|
| 831 |
+#if !_FS_READONLY |
|
| 832 |
+static |
|
| 833 |
+FRESULT sync_fs ( /* FR_OK: successful, FR_DISK_ERR: failed */ |
|
| 834 |
+ FATFS* fs /* File system object */ |
|
| 835 |
+) |
|
| 836 |
+{
|
|
| 837 |
+ FRESULT res; |
|
| 838 |
+ |
|
| 839 |
+ |
|
| 840 |
+ res = sync_window(fs); |
|
| 841 |
+ if (res == FR_OK) {
|
|
| 842 |
+ /* Update FSINFO sector if needed */ |
|
| 843 |
+ if (fs->fs_type == FS_FAT32 && fs->fsi_flag == 1) {
|
|
| 844 |
+ /* Create FSINFO structure */ |
|
| 845 |
+ mem_set(fs->win.d8, 0, SS(fs)); |
|
| 846 |
+ ST_WORD(fs->win.d8 + BS_55AA, 0xAA55); |
|
| 847 |
+ ST_DWORD(fs->win.d8 + FSI_LeadSig, 0x41615252); |
|
| 848 |
+ ST_DWORD(fs->win.d8 + FSI_StrucSig, 0x61417272); |
|
| 849 |
+ ST_DWORD(fs->win.d8 + FSI_Free_Count, fs->free_clust); |
|
| 850 |
+ ST_DWORD(fs->win.d8 + FSI_Nxt_Free, fs->last_clust); |
|
| 851 |
+ /* Write it into the FSINFO sector */ |
|
| 852 |
+ fs->winsect = fs->volbase + 1; |
|
| 853 |
+ disk_write(fs->drv, fs->win.d8, fs->winsect, 1); |
|
| 854 |
+ fs->fsi_flag = 0; |
|
| 855 |
+ } |
|
| 856 |
+ /* Make sure that no pending write process in the physical drive */ |
|
| 857 |
+ if (disk_ioctl(fs->drv, CTRL_SYNC, 0) != RES_OK) |
|
| 858 |
+ res = FR_DISK_ERR; |
|
| 859 |
+ } |
|
| 860 |
+ |
|
| 861 |
+ return res; |
|
| 862 |
+} |
|
| 863 |
+#endif |
|
| 864 |
+ |
|
| 865 |
+ |
|
| 866 |
+ |
|
| 867 |
+ |
|
| 868 |
+/*-----------------------------------------------------------------------*/ |
|
| 869 |
+/* Get sector# from cluster# */ |
|
| 870 |
+/*-----------------------------------------------------------------------*/ |
|
| 871 |
+/* Hidden API for hacks and disk tools */ |
|
| 872 |
+ |
|
| 873 |
+DWORD clust2sect ( /* !=0: Sector number, 0: Failed - invalid cluster# */ |
|
| 874 |
+ FATFS* fs, /* File system object */ |
|
| 875 |
+ DWORD clst /* Cluster# to be converted */ |
|
| 876 |
+) |
|
| 877 |
+{
|
|
| 878 |
+ clst -= 2; |
|
| 879 |
+ if (clst >= fs->n_fatent - 2) return 0; /* Invalid cluster# */ |
|
| 880 |
+ return clst * fs->csize + fs->database; |
|
| 881 |
+} |
|
| 882 |
+ |
|
| 883 |
+ |
|
| 884 |
+ |
|
| 885 |
+ |
|
| 886 |
+/*-----------------------------------------------------------------------*/ |
|
| 887 |
+/* FAT access - Read value of a FAT entry */ |
|
| 888 |
+/*-----------------------------------------------------------------------*/ |
|
| 889 |
+/* Hidden API for hacks and disk tools */ |
|
| 890 |
+ |
|
| 891 |
+DWORD get_fat ( /* 0xFFFFFFFF:Disk error, 1:Internal error, 2..0x0FFFFFFF:Cluster status */ |
|
| 892 |
+ FATFS* fs, /* File system object */ |
|
| 893 |
+ DWORD clst /* FAT index number (cluster number) to get the value */ |
|
| 894 |
+) |
|
| 895 |
+{
|
|
| 896 |
+ UINT wc, bc; |
|
| 897 |
+ BYTE *p; |
|
| 898 |
+ DWORD val; |
|
| 899 |
+ |
|
| 900 |
+ |
|
| 901 |
+ if (clst < 2 || clst >= fs->n_fatent) { /* Check range */
|
|
| 902 |
+ val = 1; /* Internal error */ |
|
| 903 |
+ |
|
| 904 |
+ } else {
|
|
| 905 |
+ val = 0xFFFFFFFF; /* Default value falls on disk error */ |
|
| 906 |
+ |
|
| 907 |
+ switch (fs->fs_type) {
|
|
| 908 |
+ case FS_FAT12 : |
|
| 909 |
+ bc = (UINT)clst; bc += bc / 2; |
|
| 910 |
+ if (move_window(fs, fs->fatbase + (bc / SS(fs))) != FR_OK) break; |
|
| 911 |
+ wc = fs->win.d8[bc++ % SS(fs)]; |
|
| 912 |
+ if (move_window(fs, fs->fatbase + (bc / SS(fs))) != FR_OK) break; |
|
| 913 |
+ wc |= fs->win.d8[bc % SS(fs)] << 8; |
|
| 914 |
+ val = clst & 1 ? wc >> 4 : (wc & 0xFFF); |
|
| 915 |
+ break; |
|
| 916 |
+ |
|
| 917 |
+ case FS_FAT16 : |
|
| 918 |
+ if (move_window(fs, fs->fatbase + (clst / (SS(fs) / 2))) != FR_OK) break; |
|
| 919 |
+ p = &fs->win.d8[clst * 2 % SS(fs)]; |
|
| 920 |
+ val = LD_WORD(p); |
|
| 921 |
+ break; |
|
| 922 |
+ |
|
| 923 |
+ case FS_FAT32 : |
|
| 924 |
+ if (move_window(fs, fs->fatbase + (clst / (SS(fs) / 4))) != FR_OK) break; |
|
| 925 |
+ p = &fs->win.d8[clst * 4 % SS(fs)]; |
|
| 926 |
+ val = LD_DWORD(p) & 0x0FFFFFFF; |
|
| 927 |
+ break; |
|
| 928 |
+ |
|
| 929 |
+ default: |
|
| 930 |
+ val = 1; /* Internal error */ |
|
| 931 |
+ } |
|
| 932 |
+ } |
|
| 933 |
+ |
|
| 934 |
+ return val; |
|
| 935 |
+} |
|
| 936 |
+ |
|
| 937 |
+ |
|
| 938 |
+ |
|
| 939 |
+ |
|
| 940 |
+/*-----------------------------------------------------------------------*/ |
|
| 941 |
+/* FAT access - Change value of a FAT entry */ |
|
| 942 |
+/*-----------------------------------------------------------------------*/ |
|
| 943 |
+/* Hidden API for hacks and disk tools */ |
|
| 944 |
+ |
|
| 945 |
+#if !_FS_READONLY |
|
| 946 |
+FRESULT put_fat ( |
|
| 947 |
+ FATFS* fs, /* File system object */ |
|
| 948 |
+ DWORD clst, /* FAT index number (cluster number) to be changed */ |
|
| 949 |
+ DWORD val /* New value to be set to the entry */ |
|
| 950 |
+) |
|
| 951 |
+{
|
|
| 952 |
+ UINT bc; |
|
| 953 |
+ BYTE *p; |
|
| 954 |
+ FRESULT res; |
|
| 955 |
+ |
|
| 956 |
+ |
|
| 957 |
+ if (clst < 2 || clst >= fs->n_fatent) { /* Check range */
|
|
| 958 |
+ res = FR_INT_ERR; |
|
| 959 |
+ |
|
| 960 |
+ } else {
|
|
| 961 |
+ switch (fs->fs_type) {
|
|
| 962 |
+ case FS_FAT12 : |
|
| 963 |
+ bc = (UINT)clst; bc += bc / 2; |
|
| 964 |
+ res = move_window(fs, fs->fatbase + (bc / SS(fs))); |
|
| 965 |
+ if (res != FR_OK) break; |
|
| 966 |
+ p = &fs->win.d8[bc++ % SS(fs)]; |
|
| 967 |
+ *p = (clst & 1) ? ((*p & 0x0F) | ((BYTE)val << 4)) : (BYTE)val; |
|
| 968 |
+ fs->wflag = 1; |
|
| 969 |
+ res = move_window(fs, fs->fatbase + (bc / SS(fs))); |
|
| 970 |
+ if (res != FR_OK) break; |
|
| 971 |
+ p = &fs->win.d8[bc % SS(fs)]; |
|
| 972 |
+ *p = (clst & 1) ? (BYTE)(val >> 4) : ((*p & 0xF0) | ((BYTE)(val >> 8) & 0x0F)); |
|
| 973 |
+ fs->wflag = 1; |
|
| 974 |
+ break; |
|
| 975 |
+ |
|
| 976 |
+ case FS_FAT16 : |
|
| 977 |
+ res = move_window(fs, fs->fatbase + (clst / (SS(fs) / 2))); |
|
| 978 |
+ if (res != FR_OK) break; |
|
| 979 |
+ p = &fs->win.d8[clst * 2 % SS(fs)]; |
|
| 980 |
+ ST_WORD(p, (WORD)val); |
|
| 981 |
+ fs->wflag = 1; |
|
| 982 |
+ break; |
|
| 983 |
+ |
|
| 984 |
+ case FS_FAT32 : |
|
| 985 |
+ res = move_window(fs, fs->fatbase + (clst / (SS(fs) / 4))); |
|
| 986 |
+ if (res != FR_OK) break; |
|
| 987 |
+ p = &fs->win.d8[clst * 4 % SS(fs)]; |
|
| 988 |
+ val |= LD_DWORD(p) & 0xF0000000; |
|
| 989 |
+ ST_DWORD(p, val); |
|
| 990 |
+ fs->wflag = 1; |
|
| 991 |
+ break; |
|
| 992 |
+ |
|
| 993 |
+ default : |
|
| 994 |
+ res = FR_INT_ERR; |
|
| 995 |
+ } |
|
| 996 |
+ } |
|
| 997 |
+ |
|
| 998 |
+ return res; |
|
| 999 |
+} |
|
| 1000 |
+#endif /* !_FS_READONLY */ |
|
| 1001 |
+ |
|
| 1002 |
+ |
|
| 1003 |
+ |
|
| 1004 |
+ |
|
| 1005 |
+/*-----------------------------------------------------------------------*/ |
|
| 1006 |
+/* FAT handling - Remove a cluster chain */ |
|
| 1007 |
+/*-----------------------------------------------------------------------*/ |
|
| 1008 |
+#if !_FS_READONLY |
|
| 1009 |
+static |
|
| 1010 |
+FRESULT remove_chain ( |
|
| 1011 |
+ FATFS* fs, /* File system object */ |
|
| 1012 |
+ DWORD clst /* Cluster# to remove a chain from */ |
|
| 1013 |
+) |
|
| 1014 |
+{
|
|
| 1015 |
+ FRESULT res; |
|
| 1016 |
+ DWORD nxt; |
|
| 1017 |
+#if _USE_TRIM |
|
| 1018 |
+ DWORD scl = clst, ecl = clst, rt[2]; |
|
| 1019 |
+#endif |
|
| 1020 |
+ |
|
| 1021 |
+ if (clst < 2 || clst >= fs->n_fatent) { /* Check range */
|
|
| 1022 |
+ res = FR_INT_ERR; |
|
| 1023 |
+ |
|
| 1024 |
+ } else {
|
|
| 1025 |
+ res = FR_OK; |
|
| 1026 |
+ while (clst < fs->n_fatent) { /* Not a last link? */
|
|
| 1027 |
+ nxt = get_fat(fs, clst); /* Get cluster status */ |
|
| 1028 |
+ if (nxt == 0) break; /* Empty cluster? */ |
|
| 1029 |
+ if (nxt == 1) { res = FR_INT_ERR; break; } /* Internal error? */
|
|
| 1030 |
+ if (nxt == 0xFFFFFFFF) { res = FR_DISK_ERR; break; } /* Disk error? */
|
|
| 1031 |
+ res = put_fat(fs, clst, 0); /* Mark the cluster "empty" */ |
|
| 1032 |
+ if (res != FR_OK) break; |
|
| 1033 |
+ if (fs->free_clust != 0xFFFFFFFF) { /* Update FSINFO */
|
|
| 1034 |
+ fs->free_clust++; |
|
| 1035 |
+ fs->fsi_flag |= 1; |
|
| 1036 |
+ } |
|
| 1037 |
+#if _USE_TRIM |
|
| 1038 |
+ if (ecl + 1 == nxt) { /* Is next cluster contiguous? */
|
|
| 1039 |
+ ecl = nxt; |
|
| 1040 |
+ } else { /* End of contiguous clusters */
|
|
| 1041 |
+ rt[0] = clust2sect(fs, scl); /* Start sector */ |
|
| 1042 |
+ rt[1] = clust2sect(fs, ecl) + fs->csize - 1; /* End sector */ |
|
| 1043 |
+ disk_ioctl(fs->drv, CTRL_TRIM, rt); /* Erase the block */ |
|
| 1044 |
+ scl = ecl = nxt; |
|
| 1045 |
+ } |
|
| 1046 |
+#endif |
|
| 1047 |
+ clst = nxt; /* Next cluster */ |
|
| 1048 |
+ } |
|
| 1049 |
+ } |
|
| 1050 |
+ |
|
| 1051 |
+ return res; |
|
| 1052 |
+} |
|
| 1053 |
+#endif |
|
| 1054 |
+ |
|
| 1055 |
+ |
|
| 1056 |
+ |
|
| 1057 |
+ |
|
| 1058 |
+/*-----------------------------------------------------------------------*/ |
|
| 1059 |
+/* FAT handling - Stretch or Create a cluster chain */ |
|
| 1060 |
+/*-----------------------------------------------------------------------*/ |
|
| 1061 |
+#if !_FS_READONLY |
|
| 1062 |
+static |
|
| 1063 |
+DWORD create_chain ( /* 0:No free cluster, 1:Internal error, 0xFFFFFFFF:Disk error, >=2:New cluster# */ |
|
| 1064 |
+ FATFS* fs, /* File system object */ |
|
| 1065 |
+ DWORD clst /* Cluster# to stretch. 0 means create a new chain. */ |
|
| 1066 |
+) |
|
| 1067 |
+{
|
|
| 1068 |
+ DWORD cs, ncl, scl; |
|
| 1069 |
+ FRESULT res; |
|
| 1070 |
+ |
|
| 1071 |
+ |
|
| 1072 |
+ if (clst == 0) { /* Create a new chain */
|
|
| 1073 |
+ scl = fs->last_clust; /* Get suggested start point */ |
|
| 1074 |
+ if (!scl || scl >= fs->n_fatent) scl = 1; |
|
| 1075 |
+ } |
|
| 1076 |
+ else { /* Stretch the current chain */
|
|
| 1077 |
+ cs = get_fat(fs, clst); /* Check the cluster status */ |
|
| 1078 |
+ if (cs < 2) return 1; /* Invalid value */ |
|
| 1079 |
+ if (cs == 0xFFFFFFFF) return cs; /* A disk error occurred */ |
|
| 1080 |
+ if (cs < fs->n_fatent) return cs; /* It is already followed by next cluster */ |
|
| 1081 |
+ scl = clst; |
|
| 1082 |
+ } |
|
| 1083 |
+ |
|
| 1084 |
+ ncl = scl; /* Start cluster */ |
|
| 1085 |
+ for (;;) {
|
|
| 1086 |
+ ncl++; /* Next cluster */ |
|
| 1087 |
+ if (ncl >= fs->n_fatent) { /* Check wrap around */
|
|
| 1088 |
+ ncl = 2; |
|
| 1089 |
+ if (ncl > scl) return 0; /* No free cluster */ |
|
| 1090 |
+ } |
|
| 1091 |
+ cs = get_fat(fs, ncl); /* Get the cluster status */ |
|
| 1092 |
+ if (cs == 0) break; /* Found a free cluster */ |
|
| 1093 |
+ if (cs == 0xFFFFFFFF || cs == 1)/* An error occurred */ |
|
| 1094 |
+ return cs; |
|
| 1095 |
+ if (ncl == scl) return 0; /* No free cluster */ |
|
| 1096 |
+ } |
|
| 1097 |
+ |
|
| 1098 |
+ res = put_fat(fs, ncl, 0x0FFFFFFF); /* Mark the new cluster "last link" */ |
|
| 1099 |
+ if (res == FR_OK && clst != 0) {
|
|
| 1100 |
+ res = put_fat(fs, clst, ncl); /* Link it to the previous one if needed */ |
|
| 1101 |
+ } |
|
| 1102 |
+ if (res == FR_OK) {
|
|
| 1103 |
+ fs->last_clust = ncl; /* Update FSINFO */ |
|
| 1104 |
+ if (fs->free_clust != 0xFFFFFFFF) {
|
|
| 1105 |
+ fs->free_clust--; |
|
| 1106 |
+ fs->fsi_flag |= 1; |
|
| 1107 |
+ } |
|
| 1108 |
+ } else {
|
|
| 1109 |
+ ncl = (res == FR_DISK_ERR) ? 0xFFFFFFFF : 1; |
|
| 1110 |
+ } |
|
| 1111 |
+ |
|
| 1112 |
+ return ncl; /* Return new cluster number or error code */ |
|
| 1113 |
+} |
|
| 1114 |
+#endif /* !_FS_READONLY */ |
|
| 1115 |
+ |
|
| 1116 |
+ |
|
| 1117 |
+ |
|
| 1118 |
+ |
|
| 1119 |
+/*-----------------------------------------------------------------------*/ |
|
| 1120 |
+/* FAT handling - Convert offset into cluster with link map table */ |
|
| 1121 |
+/*-----------------------------------------------------------------------*/ |
|
| 1122 |
+ |
|
| 1123 |
+#if _USE_FASTSEEK |
|
| 1124 |
+static |
|
| 1125 |
+DWORD clmt_clust ( /* <2:Error, >=2:Cluster number */ |
|
| 1126 |
+ FIL* fp, /* Pointer to the file object */ |
|
| 1127 |
+ DWORD ofs /* File offset to be converted to cluster# */ |
|
| 1128 |
+) |
|
| 1129 |
+{
|
|
| 1130 |
+ DWORD cl, ncl, *tbl; |
|
| 1131 |
+ |
|
| 1132 |
+ |
|
| 1133 |
+ tbl = fp->cltbl + 1; /* Top of CLMT */ |
|
| 1134 |
+ cl = ofs / SS(fp->fs) / fp->fs->csize; /* Cluster order from top of the file */ |
|
| 1135 |
+ for (;;) {
|
|
| 1136 |
+ ncl = *tbl++; /* Number of cluters in the fragment */ |
|
| 1137 |
+ if (!ncl) return 0; /* End of table? (error) */ |
|
| 1138 |
+ if (cl < ncl) break; /* In this fragment? */ |
|
| 1139 |
+ cl -= ncl; tbl++; /* Next fragment */ |
|
| 1140 |
+ } |
|
| 1141 |
+ return cl + *tbl; /* Return the cluster number */ |
|
| 1142 |
+} |
|
| 1143 |
+#endif /* _USE_FASTSEEK */ |
|
| 1144 |
+ |
|
| 1145 |
+ |
|
| 1146 |
+ |
|
| 1147 |
+ |
|
| 1148 |
+/*-----------------------------------------------------------------------*/ |
|
| 1149 |
+/* Directory handling - Set directory index */ |
|
| 1150 |
+/*-----------------------------------------------------------------------*/ |
|
| 1151 |
+ |
|
| 1152 |
+static |
|
| 1153 |
+FRESULT dir_sdi ( |
|
| 1154 |
+ DIR* dp, /* Pointer to directory object */ |
|
| 1155 |
+ UINT idx /* Index of directory table */ |
|
| 1156 |
+) |
|
| 1157 |
+{
|
|
| 1158 |
+ DWORD clst, sect; |
|
| 1159 |
+ UINT ic; |
|
| 1160 |
+ |
|
| 1161 |
+ |
|
| 1162 |
+ dp->index = (WORD)idx; /* Current index */ |
|
| 1163 |
+ clst = dp->sclust; /* Table start cluster (0:root) */ |
|
| 1164 |
+ if (clst == 1 || clst >= dp->fs->n_fatent) /* Check start cluster range */ |
|
| 1165 |
+ return FR_INT_ERR; |
|
| 1166 |
+ if (!clst && dp->fs->fs_type == FS_FAT32) /* Replace cluster# 0 with root cluster# if in FAT32 */ |
|
| 1167 |
+ clst = dp->fs->dirbase; |
|
| 1168 |
+ |
|
| 1169 |
+ if (clst == 0) { /* Static table (root-directory in FAT12/16) */
|
|
| 1170 |
+ if (idx >= dp->fs->n_rootdir) /* Is index out of range? */ |
|
| 1171 |
+ return FR_INT_ERR; |
|
| 1172 |
+ sect = dp->fs->dirbase; |
|
| 1173 |
+ } |
|
| 1174 |
+ else { /* Dynamic table (root-directory in FAT32 or sub-directory) */
|
|
| 1175 |
+ ic = SS(dp->fs) / SZ_DIRE * dp->fs->csize; /* Entries per cluster */ |
|
| 1176 |
+ while (idx >= ic) { /* Follow cluster chain */
|
|
| 1177 |
+ clst = get_fat(dp->fs, clst); /* Get next cluster */ |
|
| 1178 |
+ if (clst == 0xFFFFFFFF) return FR_DISK_ERR; /* Disk error */ |
|
| 1179 |
+ if (clst < 2 || clst >= dp->fs->n_fatent) /* Reached to end of table or internal error */ |
|
| 1180 |
+ return FR_INT_ERR; |
|
| 1181 |
+ idx -= ic; |
|
| 1182 |
+ } |
|
| 1183 |
+ sect = clust2sect(dp->fs, clst); |
|
| 1184 |
+ } |
|
| 1185 |
+ dp->clust = clst; /* Current cluster# */ |
|
| 1186 |
+ if (!sect) return FR_INT_ERR; |
|
| 1187 |
+ dp->sect = sect + idx / (SS(dp->fs) / SZ_DIRE); /* Sector# of the directory entry */ |
|
| 1188 |
+ dp->dir = dp->fs->win.d8 + (idx % (SS(dp->fs) / SZ_DIRE)) * SZ_DIRE; /* Ptr to the entry in the sector */ |
|
| 1189 |
+ |
|
| 1190 |
+ return FR_OK; |
|
| 1191 |
+} |
|
| 1192 |
+ |
|
| 1193 |
+ |
|
| 1194 |
+ |
|
| 1195 |
+ |
|
| 1196 |
+/*-----------------------------------------------------------------------*/ |
|
| 1197 |
+/* Directory handling - Move directory table index next */ |
|
| 1198 |
+/*-----------------------------------------------------------------------*/ |
|
| 1199 |
+ |
|
| 1200 |
+static |
|
| 1201 |
+FRESULT dir_next ( /* FR_OK:Succeeded, FR_NO_FILE:End of table, FR_DENIED:Could not stretch */ |
|
| 1202 |
+ DIR* dp, /* Pointer to the directory object */ |
|
| 1203 |
+ int stretch /* 0: Do not stretch table, 1: Stretch table if needed */ |
|
| 1204 |
+) |
|
| 1205 |
+{
|
|
| 1206 |
+ DWORD clst; |
|
| 1207 |
+ UINT i; |
|
| 1208 |
+#if !_FS_READONLY |
|
| 1209 |
+ UINT c; |
|
| 1210 |
+#endif |
|
| 1211 |
+ |
|
| 1212 |
+ |
|
| 1213 |
+ i = dp->index + 1; |
|
| 1214 |
+ if (!(i & 0xFFFF) || !dp->sect) /* Report EOT when index has reached 65535 */ |
|
| 1215 |
+ return FR_NO_FILE; |
|
| 1216 |
+ |
|
| 1217 |
+ if (!(i % (SS(dp->fs) / SZ_DIRE))) { /* Sector changed? */
|
|
| 1218 |
+ dp->sect++; /* Next sector */ |
|
| 1219 |
+ |
|
| 1220 |
+ if (!dp->clust) { /* Static table */
|
|
| 1221 |
+ if (i >= dp->fs->n_rootdir) /* Report EOT if it reached end of static table */ |
|
| 1222 |
+ return FR_NO_FILE; |
|
| 1223 |
+ } |
|
| 1224 |
+ else { /* Dynamic table */
|
|
| 1225 |
+ if (((i / (SS(dp->fs) / SZ_DIRE)) & (dp->fs->csize - 1)) == 0) { /* Cluster changed? */
|
|
| 1226 |
+ clst = get_fat(dp->fs, dp->clust); /* Get next cluster */ |
|
| 1227 |
+ if (clst <= 1) return FR_INT_ERR; |
|
| 1228 |
+ if (clst == 0xFFFFFFFF) return FR_DISK_ERR; |
|
| 1229 |
+ if (clst >= dp->fs->n_fatent) { /* If it reached end of dynamic table, */
|
|
| 1230 |
+#if !_FS_READONLY |
|
| 1231 |
+ if (!stretch) return FR_NO_FILE; /* If do not stretch, report EOT */ |
|
| 1232 |
+ clst = create_chain(dp->fs, dp->clust); /* Stretch cluster chain */ |
|
| 1233 |
+ if (clst == 0) return FR_DENIED; /* No free cluster */ |
|
| 1234 |
+ if (clst == 1) return FR_INT_ERR; |
|
| 1235 |
+ if (clst == 0xFFFFFFFF) return FR_DISK_ERR; |
|
| 1236 |
+ /* Clean-up stretched table */ |
|
| 1237 |
+ if (sync_window(dp->fs)) return FR_DISK_ERR;/* Flush disk access window */ |
|
| 1238 |
+ mem_set(dp->fs->win.d8, 0, SS(dp->fs)); /* Clear window buffer */ |
|
| 1239 |
+ dp->fs->winsect = clust2sect(dp->fs, clst); /* Cluster start sector */ |
|
| 1240 |
+ for (c = 0; c < dp->fs->csize; c++) { /* Fill the new cluster with 0 */
|
|
| 1241 |
+ dp->fs->wflag = 1; |
|
| 1242 |
+ if (sync_window(dp->fs)) return FR_DISK_ERR; |
|
| 1243 |
+ dp->fs->winsect++; |
|
| 1244 |
+ } |
|
| 1245 |
+ dp->fs->winsect -= c; /* Rewind window offset */ |
|
| 1246 |
+#else |
|
| 1247 |
+ if (!stretch) return FR_NO_FILE; /* If do not stretch, report EOT (this is to suppress warning) */ |
|
| 1248 |
+ return FR_NO_FILE; /* Report EOT */ |
|
| 1249 |
+#endif |
|
| 1250 |
+ } |
|
| 1251 |
+ dp->clust = clst; /* Initialize data for new cluster */ |
|
| 1252 |
+ dp->sect = clust2sect(dp->fs, clst); |
|
| 1253 |
+ } |
|
| 1254 |
+ } |
|
| 1255 |
+ } |
|
| 1256 |
+ |
|
| 1257 |
+ dp->index = (WORD)i; /* Current index */ |
|
| 1258 |
+ dp->dir = dp->fs->win.d8 + (i % (SS(dp->fs) / SZ_DIRE)) * SZ_DIRE; /* Current entry in the window */ |
|
| 1259 |
+ |
|
| 1260 |
+ return FR_OK; |
|
| 1261 |
+} |
|
| 1262 |
+ |
|
| 1263 |
+ |
|
| 1264 |
+ |
|
| 1265 |
+ |
|
| 1266 |
+/*-----------------------------------------------------------------------*/ |
|
| 1267 |
+/* Directory handling - Reserve directory entry */ |
|
| 1268 |
+/*-----------------------------------------------------------------------*/ |
|
| 1269 |
+ |
|
| 1270 |
+#if !_FS_READONLY |
|
| 1271 |
+static |
|
| 1272 |
+FRESULT dir_alloc ( |
|
| 1273 |
+ DIR* dp, /* Pointer to the directory object */ |
|
| 1274 |
+ UINT nent /* Number of contiguous entries to allocate (1-21) */ |
|
| 1275 |
+) |
|
| 1276 |
+{
|
|
| 1277 |
+ FRESULT res; |
|
| 1278 |
+ UINT n; |
|
| 1279 |
+ |
|
| 1280 |
+ |
|
| 1281 |
+ res = dir_sdi(dp, 0); |
|
| 1282 |
+ if (res == FR_OK) {
|
|
| 1283 |
+ n = 0; |
|
| 1284 |
+ do {
|
|
| 1285 |
+ res = move_window(dp->fs, dp->sect); |
|
| 1286 |
+ if (res != FR_OK) break; |
|
| 1287 |
+ if (dp->dir[0] == DDEM || dp->dir[0] == 0) { /* Is it a free entry? */
|
|
| 1288 |
+ if (++n == nent) break; /* A block of contiguous free entries is found */ |
|
| 1289 |
+ } else {
|
|
| 1290 |
+ n = 0; /* Not a blank entry. Restart to search */ |
|
| 1291 |
+ } |
|
| 1292 |
+ res = dir_next(dp, 1); /* Next entry with table stretch enabled */ |
|
| 1293 |
+ } while (res == FR_OK); |
|
| 1294 |
+ } |
|
| 1295 |
+ if (res == FR_NO_FILE) res = FR_DENIED; /* No directory entry to allocate */ |
|
| 1296 |
+ return res; |
|
| 1297 |
+} |
|
| 1298 |
+#endif |
|
| 1299 |
+ |
|
| 1300 |
+ |
|
| 1301 |
+ |
|
| 1302 |
+ |
|
| 1303 |
+/*-----------------------------------------------------------------------*/ |
|
| 1304 |
+/* Directory handling - Load/Store start cluster number */ |
|
| 1305 |
+/*-----------------------------------------------------------------------*/ |
|
| 1306 |
+ |
|
| 1307 |
+static |
|
| 1308 |
+DWORD ld_clust ( |
|
| 1309 |
+ FATFS* fs, /* Pointer to the fs object */ |
|
| 1310 |
+ BYTE* dir /* Pointer to the directory entry */ |
|
| 1311 |
+) |
|
| 1312 |
+{
|
|
| 1313 |
+ DWORD cl; |
|
| 1314 |
+ |
|
| 1315 |
+ cl = LD_WORD(dir + DIR_FstClusLO); |
|
| 1316 |
+ if (fs->fs_type == FS_FAT32) |
|
| 1317 |
+ cl |= (DWORD)LD_WORD(dir + DIR_FstClusHI) << 16; |
|
| 1318 |
+ |
|
| 1319 |
+ return cl; |
|
| 1320 |
+} |
|
| 1321 |
+ |
|
| 1322 |
+ |
|
| 1323 |
+#if !_FS_READONLY |
|
| 1324 |
+static |
|
| 1325 |
+void st_clust ( |
|
| 1326 |
+ BYTE* dir, /* Pointer to the directory entry */ |
|
| 1327 |
+ DWORD cl /* Value to be set */ |
|
| 1328 |
+) |
|
| 1329 |
+{
|
|
| 1330 |
+ ST_WORD(dir + DIR_FstClusLO, cl); |
|
| 1331 |
+ ST_WORD(dir + DIR_FstClusHI, cl >> 16); |
|
| 1332 |
+} |
|
| 1333 |
+#endif |
|
| 1334 |
+ |
|
| 1335 |
+ |
|
| 1336 |
+ |
|
| 1337 |
+ |
|
| 1338 |
+/*-----------------------------------------------------------------------*/ |
|
| 1339 |
+/* LFN handling - Test/Pick/Fit an LFN segment from/to directory entry */ |
|
| 1340 |
+/*-----------------------------------------------------------------------*/ |
|
| 1341 |
+#if _USE_LFN |
|
| 1342 |
+static |
|
| 1343 |
+const BYTE LfnOfs[] = {1,3,5,7,9,14,16,18,20,22,24,28,30}; /* Offset of LFN characters in the directory entry */
|
|
| 1344 |
+ |
|
| 1345 |
+ |
|
| 1346 |
+static |
|
| 1347 |
+int cmp_lfn ( /* 1:Matched, 0:Not matched */ |
|
| 1348 |
+ WCHAR* lfnbuf, /* Pointer to the LFN to be compared */ |
|
| 1349 |
+ BYTE* dir /* Pointer to the directory entry containing a part of LFN */ |
|
| 1350 |
+) |
|
| 1351 |
+{
|
|
| 1352 |
+ UINT i, s; |
|
| 1353 |
+ WCHAR wc, uc; |
|
| 1354 |
+ |
|
| 1355 |
+ |
|
| 1356 |
+ i = ((dir[LDIR_Ord] & ~LLEF) - 1) * 13; /* Get offset in the LFN buffer */ |
|
| 1357 |
+ s = 0; wc = 1; |
|
| 1358 |
+ do {
|
|
| 1359 |
+ uc = LD_WORD(dir + LfnOfs[s]); /* Pick an LFN character from the entry */ |
|
| 1360 |
+ if (wc) { /* Last character has not been processed */
|
|
| 1361 |
+ wc = ff_wtoupper(uc); /* Convert it to upper case */ |
|
| 1362 |
+ if (i >= _MAX_LFN || wc != ff_wtoupper(lfnbuf[i++])) /* Compare it */ |
|
| 1363 |
+ return 0; /* Not matched */ |
|
| 1364 |
+ } else {
|
|
| 1365 |
+ if (uc != 0xFFFF) return 0; /* Check filler */ |
|
| 1366 |
+ } |
|
| 1367 |
+ } while (++s < 13); /* Repeat until all characters in the entry are checked */ |
|
| 1368 |
+ |
|
| 1369 |
+ if ((dir[LDIR_Ord] & LLEF) && wc && lfnbuf[i]) /* Last segment matched but different length */ |
|
| 1370 |
+ return 0; |
|
| 1371 |
+ |
|
| 1372 |
+ return 1; /* The part of LFN matched */ |
|
| 1373 |
+} |
|
| 1374 |
+ |
|
| 1375 |
+ |
|
| 1376 |
+ |
|
| 1377 |
+static |
|
| 1378 |
+int pick_lfn ( /* 1:Succeeded, 0:Buffer overflow */ |
|
| 1379 |
+ WCHAR* lfnbuf, /* Pointer to the Unicode-LFN buffer */ |
|
| 1380 |
+ BYTE* dir /* Pointer to the directory entry */ |
|
| 1381 |
+) |
|
| 1382 |
+{
|
|
| 1383 |
+ UINT i, s; |
|
| 1384 |
+ WCHAR wc, uc; |
|
| 1385 |
+ |
|
| 1386 |
+ |
|
| 1387 |
+ i = ((dir[LDIR_Ord] & 0x3F) - 1) * 13; /* Offset in the LFN buffer */ |
|
| 1388 |
+ |
|
| 1389 |
+ s = 0; wc = 1; |
|
| 1390 |
+ do {
|
|
| 1391 |
+ uc = LD_WORD(dir + LfnOfs[s]); /* Pick an LFN character from the entry */ |
|
| 1392 |
+ if (wc) { /* Last character has not been processed */
|
|
| 1393 |
+ if (i >= _MAX_LFN) return 0; /* Buffer overflow? */ |
|
| 1394 |
+ lfnbuf[i++] = wc = uc; /* Store it */ |
|
| 1395 |
+ } else {
|
|
| 1396 |
+ if (uc != 0xFFFF) return 0; /* Check filler */ |
|
| 1397 |
+ } |
|
| 1398 |
+ } while (++s < 13); /* Read all character in the entry */ |
|
| 1399 |
+ |
|
| 1400 |
+ if (dir[LDIR_Ord] & LLEF) { /* Put terminator if it is the last LFN part */
|
|
| 1401 |
+ if (i >= _MAX_LFN) return 0; /* Buffer overflow? */ |
|
| 1402 |
+ lfnbuf[i] = 0; |
|
| 1403 |
+ } |
|
| 1404 |
+ |
|
| 1405 |
+ return 1; |
|
| 1406 |
+} |
|
| 1407 |
+ |
|
| 1408 |
+ |
|
| 1409 |
+#if !_FS_READONLY |
|
| 1410 |
+static |
|
| 1411 |
+void fit_lfn ( |
|
| 1412 |
+ const WCHAR* lfnbuf, /* Pointer to the LFN buffer */ |
|
| 1413 |
+ BYTE* dir, /* Pointer to the directory entry */ |
|
| 1414 |
+ BYTE ord, /* LFN order (1-20) */ |
|
| 1415 |
+ BYTE sum /* SFN sum */ |
|
| 1416 |
+) |
|
| 1417 |
+{
|
|
| 1418 |
+ UINT i, s; |
|
| 1419 |
+ WCHAR wc; |
|
| 1420 |
+ |
|
| 1421 |
+ |
|
| 1422 |
+ dir[LDIR_Chksum] = sum; /* Set check sum */ |
|
| 1423 |
+ dir[LDIR_Attr] = AM_LFN; /* Set attribute. LFN entry */ |
|
| 1424 |
+ dir[LDIR_Type] = 0; |
|
| 1425 |
+ ST_WORD(dir + LDIR_FstClusLO, 0); |
|
| 1426 |
+ |
|
| 1427 |
+ i = (ord - 1) * 13; /* Get offset in the LFN buffer */ |
|
| 1428 |
+ s = wc = 0; |
|
| 1429 |
+ do {
|
|
| 1430 |
+ if (wc != 0xFFFF) wc = lfnbuf[i++]; /* Get an effective character */ |
|
| 1431 |
+ ST_WORD(dir+LfnOfs[s], wc); /* Put it */ |
|
| 1432 |
+ if (!wc) wc = 0xFFFF; /* Padding characters following last character */ |
|
| 1433 |
+ } while (++s < 13); |
|
| 1434 |
+ if (wc == 0xFFFF || !lfnbuf[i]) ord |= LLEF; /* Bottom LFN part is the start of LFN sequence */ |
|
| 1435 |
+ dir[LDIR_Ord] = ord; /* Set the LFN order */ |
|
| 1436 |
+} |
|
| 1437 |
+ |
|
| 1438 |
+#endif |
|
| 1439 |
+#endif |
|
| 1440 |
+ |
|
| 1441 |
+ |
|
| 1442 |
+ |
|
| 1443 |
+ |
|
| 1444 |
+/*-----------------------------------------------------------------------*/ |
|
| 1445 |
+/* Create numbered name */ |
|
| 1446 |
+/*-----------------------------------------------------------------------*/ |
|
| 1447 |
+#if _USE_LFN |
|
| 1448 |
+static |
|
| 1449 |
+void gen_numname ( |
|
| 1450 |
+ BYTE* dst, /* Pointer to the buffer to store numbered SFN */ |
|
| 1451 |
+ const BYTE* src, /* Pointer to SFN */ |
|
| 1452 |
+ const WCHAR* lfn, /* Pointer to LFN */ |
|
| 1453 |
+ UINT seq /* Sequence number */ |
|
| 1454 |
+) |
|
| 1455 |
+{
|
|
| 1456 |
+ BYTE ns[8], c; |
|
| 1457 |
+ UINT i, j; |
|
| 1458 |
+ WCHAR wc; |
|
| 1459 |
+ DWORD sr; |
|
| 1460 |
+ |
|
| 1461 |
+ |
|
| 1462 |
+ mem_cpy(dst, src, 11); |
|
| 1463 |
+ |
|
| 1464 |
+ if (seq > 5) { /* On many collisions, generate a hash number instead of sequential number */
|
|
| 1465 |
+ sr = seq; |
|
| 1466 |
+ while (*lfn) { /* Create a CRC */
|
|
| 1467 |
+ wc = *lfn++; |
|
| 1468 |
+ for (i = 0; i < 16; i++) {
|
|
| 1469 |
+ sr = (sr << 1) + (wc & 1); |
|
| 1470 |
+ wc >>= 1; |
|
| 1471 |
+ if (sr & 0x10000) sr ^= 0x11021; |
|
| 1472 |
+ } |
|
| 1473 |
+ } |
|
| 1474 |
+ seq = (UINT)sr; |
|
| 1475 |
+ } |
|
| 1476 |
+ |
|
| 1477 |
+ /* itoa (hexdecimal) */ |
|
| 1478 |
+ i = 7; |
|
| 1479 |
+ do {
|
|
| 1480 |
+ c = (seq % 16) + '0'; |
|
| 1481 |
+ if (c > '9') c += 7; |
|
| 1482 |
+ ns[i--] = c; |
|
| 1483 |
+ seq /= 16; |
|
| 1484 |
+ } while (seq); |
|
| 1485 |
+ ns[i] = '~'; |
|
| 1486 |
+ |
|
| 1487 |
+ /* Append the number */ |
|
| 1488 |
+ for (j = 0; j < i && dst[j] != ' '; j++) {
|
|
| 1489 |
+ if (IsDBCS1(dst[j])) {
|
|
| 1490 |
+ if (j == i - 1) break; |
|
| 1491 |
+ j++; |
|
| 1492 |
+ } |
|
| 1493 |
+ } |
|
| 1494 |
+ do {
|
|
| 1495 |
+ dst[j++] = (i < 8) ? ns[i++] : ' '; |
|
| 1496 |
+ } while (j < 8); |
|
| 1497 |
+} |
|
| 1498 |
+#endif |
|
| 1499 |
+ |
|
| 1500 |
+ |
|
| 1501 |
+ |
|
| 1502 |
+ |
|
| 1503 |
+/*-----------------------------------------------------------------------*/ |
|
| 1504 |
+/* Calculate sum of an SFN */ |
|
| 1505 |
+/*-----------------------------------------------------------------------*/ |
|
| 1506 |
+#if _USE_LFN |
|
| 1507 |
+static |
|
| 1508 |
+BYTE sum_sfn ( |
|
| 1509 |
+ const BYTE* dir /* Pointer to the SFN entry */ |
|
| 1510 |
+) |
|
| 1511 |
+{
|
|
| 1512 |
+ BYTE sum = 0; |
|
| 1513 |
+ UINT n = 11; |
|
| 1514 |
+ |
|
| 1515 |
+ do sum = (sum >> 1) + (sum << 7) + *dir++; while (--n); |
|
| 1516 |
+ return sum; |
|
| 1517 |
+} |
|
| 1518 |
+#endif |
|
| 1519 |
+ |
|
| 1520 |
+ |
|
| 1521 |
+ |
|
| 1522 |
+ |
|
| 1523 |
+/*-----------------------------------------------------------------------*/ |
|
| 1524 |
+/* Directory handling - Find an object in the directory */ |
|
| 1525 |
+/*-----------------------------------------------------------------------*/ |
|
| 1526 |
+ |
|
| 1527 |
+static |
|
| 1528 |
+FRESULT dir_find ( |
|
| 1529 |
+ DIR* dp /* Pointer to the directory object linked to the file name */ |
|
| 1530 |
+) |
|
| 1531 |
+{
|
|
| 1532 |
+ FRESULT res; |
|
| 1533 |
+ BYTE c, *dir; |
|
| 1534 |
+#if _USE_LFN |
|
| 1535 |
+ BYTE a, ord, sum; |
|
| 1536 |
+#endif |
|
| 1537 |
+ |
|
| 1538 |
+ res = dir_sdi(dp, 0); /* Rewind directory object */ |
|
| 1539 |
+ if (res != FR_OK) return res; |
|
| 1540 |
+ |
|
| 1541 |
+#if _USE_LFN |
|
| 1542 |
+ ord = sum = 0xFF; dp->lfn_idx = 0xFFFF; /* Reset LFN sequence */ |
|
| 1543 |
+#endif |
|
| 1544 |
+ do {
|
|
| 1545 |
+ res = move_window(dp->fs, dp->sect); |
|
| 1546 |
+ if (res != FR_OK) break; |
|
| 1547 |
+ dir = dp->dir; /* Ptr to the directory entry of current index */ |
|
| 1548 |
+ c = dir[DIR_Name]; |
|
| 1549 |
+ if (c == 0) { res = FR_NO_FILE; break; } /* Reached to end of table */
|
|
| 1550 |
+#if _USE_LFN /* LFN configuration */ |
|
| 1551 |
+ a = dir[DIR_Attr] & AM_MASK; |
|
| 1552 |
+ if (c == DDEM || ((a & AM_VOL) && a != AM_LFN)) { /* An entry without valid data */
|
|
| 1553 |
+ ord = 0xFF; dp->lfn_idx = 0xFFFF; /* Reset LFN sequence */ |
|
| 1554 |
+ } else {
|
|
| 1555 |
+ if (a == AM_LFN) { /* An LFN entry is found */
|
|
| 1556 |
+ if (dp->lfn) {
|
|
| 1557 |
+ if (c & LLEF) { /* Is it start of LFN sequence? */
|
|
| 1558 |
+ sum = dir[LDIR_Chksum]; |
|
| 1559 |
+ c &= ~LLEF; ord = c; /* LFN start order */ |
|
| 1560 |
+ dp->lfn_idx = dp->index; /* Start index of LFN */ |
|
| 1561 |
+ } |
|
| 1562 |
+ /* Check validity of the LFN entry and compare it with given name */ |
|
| 1563 |
+ ord = (c == ord && sum == dir[LDIR_Chksum] && cmp_lfn(dp->lfn, dir)) ? ord - 1 : 0xFF; |
|
| 1564 |
+ } |
|
| 1565 |
+ } else { /* An SFN entry is found */
|
|
| 1566 |
+ if (!ord && sum == sum_sfn(dir)) break; /* LFN matched? */ |
|
| 1567 |
+ if (!(dp->fn[NSFLAG] & NS_LOSS) && !mem_cmp(dir, dp->fn, 11)) break; /* SFN matched? */ |
|
| 1568 |
+ ord = 0xFF; dp->lfn_idx = 0xFFFF; /* Reset LFN sequence */ |
|
| 1569 |
+ } |
|
| 1570 |
+ } |
|
| 1571 |
+#else /* Non LFN configuration */ |
|
| 1572 |
+ if (!(dir[DIR_Attr] & AM_VOL) && !mem_cmp(dir, dp->fn, 11)) /* Is it a valid entry? */ |
|
| 1573 |
+ break; |
|
| 1574 |
+#endif |
|
| 1575 |
+ res = dir_next(dp, 0); /* Next entry */ |
|
| 1576 |
+ } while (res == FR_OK); |
|
| 1577 |
+ |
|
| 1578 |
+ return res; |
|
| 1579 |
+} |
|
| 1580 |
+ |
|
| 1581 |
+ |
|
| 1582 |
+ |
|
| 1583 |
+ |
|
| 1584 |
+/*-----------------------------------------------------------------------*/ |
|
| 1585 |
+/* Read an object from the directory */ |
|
| 1586 |
+/*-----------------------------------------------------------------------*/ |
|
| 1587 |
+#if _FS_MINIMIZE <= 1 || _USE_LABEL || _FS_RPATH >= 2 |
|
| 1588 |
+static |
|
| 1589 |
+FRESULT dir_read ( |
|
| 1590 |
+ DIR* dp, /* Pointer to the directory object */ |
|
| 1591 |
+ int vol /* Filtered by 0:file/directory or 1:volume label */ |
|
| 1592 |
+) |
|
| 1593 |
+{
|
|
| 1594 |
+ FRESULT res; |
|
| 1595 |
+ BYTE a, c, *dir; |
|
| 1596 |
+#if _USE_LFN |
|
| 1597 |
+ BYTE ord = 0xFF, sum = 0xFF; |
|
| 1598 |
+#endif |
|
| 1599 |
+ |
|
| 1600 |
+ res = FR_NO_FILE; |
|
| 1601 |
+ while (dp->sect) {
|
|
| 1602 |
+ res = move_window(dp->fs, dp->sect); |
|
| 1603 |
+ if (res != FR_OK) break; |
|
| 1604 |
+ dir = dp->dir; /* Ptr to the directory entry of current index */ |
|
| 1605 |
+ c = dir[DIR_Name]; |
|
| 1606 |
+ if (c == 0) { res = FR_NO_FILE; break; } /* Reached to end of table */
|
|
| 1607 |
+ a = dir[DIR_Attr] & AM_MASK; |
|
| 1608 |
+#if _USE_LFN /* LFN configuration */ |
|
| 1609 |
+ if (c == DDEM || (!_FS_RPATH && c == '.') || (int)((a & ~AM_ARC) == AM_VOL) != vol) { /* An entry without valid data */
|
|
| 1610 |
+ ord = 0xFF; |
|
| 1611 |
+ } else {
|
|
| 1612 |
+ if (a == AM_LFN) { /* An LFN entry is found */
|
|
| 1613 |
+ if (c & LLEF) { /* Is it start of LFN sequence? */
|
|
| 1614 |
+ sum = dir[LDIR_Chksum]; |
|
| 1615 |
+ c &= ~LLEF; ord = c; |
|
| 1616 |
+ dp->lfn_idx = dp->index; |
|
| 1617 |
+ } |
|
| 1618 |
+ /* Check LFN validity and capture it */ |
|
| 1619 |
+ ord = (c == ord && sum == dir[LDIR_Chksum] && pick_lfn(dp->lfn, dir)) ? ord - 1 : 0xFF; |
|
| 1620 |
+ } else { /* An SFN entry is found */
|
|
| 1621 |
+ if (ord || sum != sum_sfn(dir)) /* Is there a valid LFN? */ |
|
| 1622 |
+ dp->lfn_idx = 0xFFFF; /* It has no LFN. */ |
|
| 1623 |
+ break; |
|
| 1624 |
+ } |
|
| 1625 |
+ } |
|
| 1626 |
+#else /* Non LFN configuration */ |
|
| 1627 |
+ if (c != DDEM && (_FS_RPATH || c != '.') && a != AM_LFN && (int)((a & ~AM_ARC) == AM_VOL) == vol) /* Is it a valid entry? */ |
|
| 1628 |
+ break; |
|
| 1629 |
+#endif |
|
| 1630 |
+ res = dir_next(dp, 0); /* Next entry */ |
|
| 1631 |
+ if (res != FR_OK) break; |
|
| 1632 |
+ } |
|
| 1633 |
+ |
|
| 1634 |
+ if (res != FR_OK) dp->sect = 0; |
|
| 1635 |
+ |
|
| 1636 |
+ return res; |
|
| 1637 |
+} |
|
| 1638 |
+#endif /* _FS_MINIMIZE <= 1 || _USE_LABEL || _FS_RPATH >= 2 */ |
|
| 1639 |
+ |
|
| 1640 |
+ |
|
| 1641 |
+ |
|
| 1642 |
+ |
|
| 1643 |
+/*-----------------------------------------------------------------------*/ |
|
| 1644 |
+/* Register an object to the directory */ |
|
| 1645 |
+/*-----------------------------------------------------------------------*/ |
|
| 1646 |
+#if !_FS_READONLY |
|
| 1647 |
+static |
|
| 1648 |
+FRESULT dir_register ( /* FR_OK:Successful, FR_DENIED:No free entry or too many SFN collision, FR_DISK_ERR:Disk error */ |
|
| 1649 |
+ DIR* dp /* Target directory with object name to be created */ |
|
| 1650 |
+) |
|
| 1651 |
+{
|
|
| 1652 |
+ FRESULT res; |
|
| 1653 |
+#if _USE_LFN /* LFN configuration */ |
|
| 1654 |
+ UINT n, nent; |
|
| 1655 |
+ BYTE sn[12], *fn, sum; |
|
| 1656 |
+ WCHAR *lfn; |
|
| 1657 |
+ |
|
| 1658 |
+ |
|
| 1659 |
+ fn = dp->fn; lfn = dp->lfn; |
|
| 1660 |
+ mem_cpy(sn, fn, 12); |
|
| 1661 |
+ |
|
| 1662 |
+ if (_FS_RPATH && (sn[NSFLAG] & NS_DOT)) /* Cannot create dot entry */ |
|
| 1663 |
+ return FR_INVALID_NAME; |
|
| 1664 |
+ |
|
| 1665 |
+ if (sn[NSFLAG] & NS_LOSS) { /* When LFN is out of 8.3 format, generate a numbered name */
|
|
| 1666 |
+ fn[NSFLAG] = 0; dp->lfn = 0; /* Find only SFN */ |
|
| 1667 |
+ for (n = 1; n < 100; n++) {
|
|
| 1668 |
+ gen_numname(fn, sn, lfn, n); /* Generate a numbered name */ |
|
| 1669 |
+ res = dir_find(dp); /* Check if the name collides with existing SFN */ |
|
| 1670 |
+ if (res != FR_OK) break; |
|
| 1671 |
+ } |
|
| 1672 |
+ if (n == 100) return FR_DENIED; /* Abort if too many collisions */ |
|
| 1673 |
+ if (res != FR_NO_FILE) return res; /* Abort if the result is other than 'not collided' */ |
|
| 1674 |
+ fn[NSFLAG] = sn[NSFLAG]; dp->lfn = lfn; |
|
| 1675 |
+ } |
|
| 1676 |
+ |
|
| 1677 |
+ if (sn[NSFLAG] & NS_LFN) { /* When LFN is to be created, allocate entries for an SFN + LFNs. */
|
|
| 1678 |
+ for (n = 0; lfn[n]; n++) ; |
|
| 1679 |
+ nent = (n + 25) / 13; |
|
| 1680 |
+ } else { /* Otherwise allocate an entry for an SFN */
|
|
| 1681 |
+ nent = 1; |
|
| 1682 |
+ } |
|
| 1683 |
+ res = dir_alloc(dp, nent); /* Allocate entries */ |
|
| 1684 |
+ |
|
| 1685 |
+ if (res == FR_OK && --nent) { /* Set LFN entry if needed */
|
|
| 1686 |
+ res = dir_sdi(dp, dp->index - nent); |
|
| 1687 |
+ if (res == FR_OK) {
|
|
| 1688 |
+ sum = sum_sfn(dp->fn); /* Sum value of the SFN tied to the LFN */ |
|
| 1689 |
+ do { /* Store LFN entries in bottom first */
|
|
| 1690 |
+ res = move_window(dp->fs, dp->sect); |
|
| 1691 |
+ if (res != FR_OK) break; |
|
| 1692 |
+ fit_lfn(dp->lfn, dp->dir, (BYTE)nent, sum); |
|
| 1693 |
+ dp->fs->wflag = 1; |
|
| 1694 |
+ res = dir_next(dp, 0); /* Next entry */ |
|
| 1695 |
+ } while (res == FR_OK && --nent); |
|
| 1696 |
+ } |
|
| 1697 |
+ } |
|
| 1698 |
+#else /* Non LFN configuration */ |
|
| 1699 |
+ res = dir_alloc(dp, 1); /* Allocate an entry for SFN */ |
|
| 1700 |
+#endif |
|
| 1701 |
+ |
|
| 1702 |
+ if (res == FR_OK) { /* Set SFN entry */
|
|
| 1703 |
+ res = move_window(dp->fs, dp->sect); |
|
| 1704 |
+ if (res == FR_OK) {
|
|
| 1705 |
+ mem_set(dp->dir, 0, SZ_DIRE); /* Clean the entry */ |
|
| 1706 |
+ mem_cpy(dp->dir, dp->fn, 11); /* Put SFN */ |
|
| 1707 |
+#if _USE_LFN |
|
| 1708 |
+ dp->dir[DIR_NTres] = dp->fn[NSFLAG] & (NS_BODY | NS_EXT); /* Put NT flag */ |
|
| 1709 |
+#endif |
|
| 1710 |
+ dp->fs->wflag = 1; |
|
| 1711 |
+ } |
|
| 1712 |
+ } |
|
| 1713 |
+ |
|
| 1714 |
+ return res; |
|
| 1715 |
+} |
|
| 1716 |
+#endif /* !_FS_READONLY */ |
|
| 1717 |
+ |
|
| 1718 |
+ |
|
| 1719 |
+ |
|
| 1720 |
+ |
|
| 1721 |
+/*-----------------------------------------------------------------------*/ |
|
| 1722 |
+/* Remove an object from the directory */ |
|
| 1723 |
+/*-----------------------------------------------------------------------*/ |
|
| 1724 |
+#if !_FS_READONLY && !_FS_MINIMIZE |
|
| 1725 |
+static |
|
| 1726 |
+FRESULT dir_remove ( /* FR_OK: Successful, FR_DISK_ERR: A disk error */ |
|
| 1727 |
+ DIR* dp /* Directory object pointing the entry to be removed */ |
|
| 1728 |
+) |
|
| 1729 |
+{
|
|
| 1730 |
+ FRESULT res; |
|
| 1731 |
+#if _USE_LFN /* LFN configuration */ |
|
| 1732 |
+ UINT i; |
|
| 1733 |
+ |
|
| 1734 |
+ i = dp->index; /* SFN index */ |
|
| 1735 |
+ res = dir_sdi(dp, (dp->lfn_idx == 0xFFFF) ? i : dp->lfn_idx); /* Goto the SFN or top of the LFN entries */ |
|
| 1736 |
+ if (res == FR_OK) {
|
|
| 1737 |
+ do {
|
|
| 1738 |
+ res = move_window(dp->fs, dp->sect); |
|
| 1739 |
+ if (res != FR_OK) break; |
|
| 1740 |
+ mem_set(dp->dir, 0, SZ_DIRE); /* Clear and mark the entry "deleted" */ |
|
| 1741 |
+ *dp->dir = DDEM; |
|
| 1742 |
+ dp->fs->wflag = 1; |
|
| 1743 |
+ if (dp->index >= i) break; /* When reached SFN, all entries of the object has been deleted. */ |
|
| 1744 |
+ res = dir_next(dp, 0); /* Next entry */ |
|
| 1745 |
+ } while (res == FR_OK); |
|
| 1746 |
+ if (res == FR_NO_FILE) res = FR_INT_ERR; |
|
| 1747 |
+ } |
|
| 1748 |
+ |
|
| 1749 |
+#else /* Non LFN configuration */ |
|
| 1750 |
+ res = dir_sdi(dp, dp->index); |
|
| 1751 |
+ if (res == FR_OK) {
|
|
| 1752 |
+ res = move_window(dp->fs, dp->sect); |
|
| 1753 |
+ if (res == FR_OK) {
|
|
| 1754 |
+ mem_set(dp->dir, 0, SZ_DIRE); /* Clear and mark the entry "deleted" */ |
|
| 1755 |
+ *dp->dir = DDEM; |
|
| 1756 |
+ dp->fs->wflag = 1; |
|
| 1757 |
+ } |
|
| 1758 |
+ } |
|
| 1759 |
+#endif |
|
| 1760 |
+ |
|
| 1761 |
+ return res; |
|
| 1762 |
+} |
|
| 1763 |
+#endif /* !_FS_READONLY */ |
|
| 1764 |
+ |
|
| 1765 |
+ |
|
| 1766 |
+ |
|
| 1767 |
+ |
|
| 1768 |
+/*-----------------------------------------------------------------------*/ |
|
| 1769 |
+/* Get file information from directory entry */ |
|
| 1770 |
+/*-----------------------------------------------------------------------*/ |
|
| 1771 |
+#if _FS_MINIMIZE <= 1 || _FS_RPATH >= 2 |
|
| 1772 |
+static |
|
| 1773 |
+void get_fileinfo ( /* No return code */ |
|
| 1774 |
+ DIR* dp, /* Pointer to the directory object */ |
|
| 1775 |
+ FILINFO* fno /* Pointer to the file information to be filled */ |
|
| 1776 |
+) |
|
| 1777 |
+{
|
|
| 1778 |
+ UINT i; |
|
| 1779 |
+ TCHAR *p, c; |
|
| 1780 |
+ BYTE *dir; |
|
| 1781 |
+#if _USE_LFN |
|
| 1782 |
+ WCHAR w, *lfn; |
|
| 1783 |
+#endif |
|
| 1784 |
+ |
|
| 1785 |
+ p = fno->fname; |
|
| 1786 |
+ if (dp->sect) { /* Get SFN */
|
|
| 1787 |
+ dir = dp->dir; |
|
| 1788 |
+ i = 0; |
|
| 1789 |
+ while (i < 11) { /* Copy name body and extension */
|
|
| 1790 |
+ c = (TCHAR)dir[i++]; |
|
| 1791 |
+ if (c == ' ') continue; /* Skip padding spaces */ |
|
| 1792 |
+ if (c == RDDEM) c = (TCHAR)DDEM; /* Restore replaced DDEM character */ |
|
| 1793 |
+ if (i == 9) *p++ = '.'; /* Insert a . if extension is exist */ |
|
| 1794 |
+#if _USE_LFN |
|
| 1795 |
+ if (IsUpper(c) && (dir[DIR_NTres] & (i >= 9 ? NS_EXT : NS_BODY))) |
|
| 1796 |
+ c += 0x20; /* To lower */ |
|
| 1797 |
+#if _LFN_UNICODE |
|
| 1798 |
+ if (IsDBCS1(c) && i != 8 && i != 11 && IsDBCS2(dir[i])) |
|
| 1799 |
+ c = c << 8 | dir[i++]; |
|
| 1800 |
+ c = ff_convert(c, 1); /* OEM -> Unicode */ |
|
| 1801 |
+ if (!c) c = '?'; |
|
| 1802 |
+#endif |
|
| 1803 |
+#endif |
|
| 1804 |
+ *p++ = c; |
|
| 1805 |
+ } |
|
| 1806 |
+ fno->fattrib = dir[DIR_Attr]; /* Attribute */ |
|
| 1807 |
+ fno->fsize = LD_DWORD(dir + DIR_FileSize); /* Size */ |
|
| 1808 |
+ fno->fdate = LD_WORD(dir + DIR_WrtDate); /* Date */ |
|
| 1809 |
+ fno->ftime = LD_WORD(dir + DIR_WrtTime); /* Time */ |
|
| 1810 |
+ } |
|
| 1811 |
+ *p = 0; /* Terminate SFN string by a \0 */ |
|
| 1812 |
+ |
|
| 1813 |
+#if _USE_LFN |
|
| 1814 |
+ if (fno->lfname) {
|
|
| 1815 |
+ i = 0; p = fno->lfname; |
|
| 1816 |
+ if (dp->sect && fno->lfsize && dp->lfn_idx != 0xFFFF) { /* Get LFN if available */
|
|
| 1817 |
+ lfn = dp->lfn; |
|
| 1818 |
+ while ((w = *lfn++) != 0) { /* Get an LFN character */
|
|
| 1819 |
+#if !_LFN_UNICODE |
|
| 1820 |
+ w = ff_convert(w, 0); /* Unicode -> OEM */ |
|
| 1821 |
+ if (!w) { i = 0; break; } /* No LFN if it could not be converted */
|
|
| 1822 |
+ if (_DF1S && w >= 0x100) /* Put 1st byte if it is a DBC (always false on SBCS cfg) */ |
|
| 1823 |
+ p[i++] = (TCHAR)(w >> 8); |
|
| 1824 |
+#endif |
|
| 1825 |
+ if (i >= fno->lfsize - 1) { i = 0; break; } /* No LFN if buffer overflow */
|
|
| 1826 |
+ p[i++] = (TCHAR)w; |
|
| 1827 |
+ } |
|
| 1828 |
+ } |
|
| 1829 |
+ p[i] = 0; /* Terminate LFN string by a \0 */ |
|
| 1830 |
+ } |
|
| 1831 |
+#endif |
|
| 1832 |
+} |
|
| 1833 |
+#endif /* _FS_MINIMIZE <= 1 || _FS_RPATH >= 2 */ |
|
| 1834 |
+ |
|
| 1835 |
+ |
|
| 1836 |
+ |
|
| 1837 |
+ |
|
| 1838 |
+/*-----------------------------------------------------------------------*/ |
|
| 1839 |
+/* Pattern matching */ |
|
| 1840 |
+/*-----------------------------------------------------------------------*/ |
|
| 1841 |
+#if _USE_FIND && _FS_MINIMIZE <= 1 |
|
| 1842 |
+static |
|
| 1843 |
+WCHAR get_achar ( /* Get a character and advances ptr 1 or 2 */ |
|
| 1844 |
+ const TCHAR** ptr /* Pointer to pointer to the SBCS/DBCS/Unicode string */ |
|
| 1845 |
+) |
|
| 1846 |
+{
|
|
| 1847 |
+ WCHAR chr; |
|
| 1848 |
+ |
|
| 1849 |
+#if !_LFN_UNICODE |
|
| 1850 |
+ chr = (BYTE)*(*ptr)++; /* Get a byte */ |
|
| 1851 |
+ if (IsLower(chr)) chr -= 0x20; /* To upper ASCII char */ |
|
| 1852 |
+ if (IsDBCS1(chr) && IsDBCS2(**ptr)) /* Get DBC 2nd byte if needed */ |
|
| 1853 |
+ chr = chr << 8 | (BYTE)*(*ptr)++; |
|
| 1854 |
+#ifdef _EXCVT |
|
| 1855 |
+ if (chr >= 0x80) chr = ExCvt[chr - 0x80]; /* To upper SBCS extended char */ |
|
| 1856 |
+#endif |
|
| 1857 |
+#else |
|
| 1858 |
+ chr = ff_wtoupper(*(*ptr)++); /* Get a word and to upper */ |
|
| 1859 |
+#endif |
|
| 1860 |
+ return chr; |
|
| 1861 |
+} |
|
| 1862 |
+ |
|
| 1863 |
+ |
|
| 1864 |
+static |
|
| 1865 |
+int pattern_matching ( /* Return value: 0:mismatched, 1:matched */ |
|
| 1866 |
+ const TCHAR* pat, /* Matching pattern */ |
|
| 1867 |
+ const TCHAR* nam, /* String to be tested */ |
|
| 1868 |
+ int skip, /* Number of pre-skip chars (number of ?s) */ |
|
| 1869 |
+ int inf /* Infinite search (* specified) */ |
|
| 1870 |
+) |
|
| 1871 |
+{
|
|
| 1872 |
+ const TCHAR *pp, *np; |
|
| 1873 |
+ WCHAR pc, nc; |
|
| 1874 |
+ int nm, nx; |
|
| 1875 |
+ |
|
| 1876 |
+ |
|
| 1877 |
+ while (skip--) { /* Pre-skip name chars */
|
|
| 1878 |
+ if (!get_achar(&nam)) return 0; /* Branch mismatched if less name chars */ |
|
| 1879 |
+ } |
|
| 1880 |
+ if (!*pat && inf) return 1; /* (short circuit) */ |
|
| 1881 |
+ |
|
| 1882 |
+ do {
|
|
| 1883 |
+ pp = pat; np = nam; /* Top of pattern and name to match */ |
|
| 1884 |
+ for (;;) {
|
|
| 1885 |
+ if (*pp == '?' || *pp == '*') { /* Wildcard? */
|
|
| 1886 |
+ nm = nx = 0; |
|
| 1887 |
+ do { /* Analyze the wildcard chars */
|
|
| 1888 |
+ if (*pp++ == '?') nm++; else nx = 1; |
|
| 1889 |
+ } while (*pp == '?' || *pp == '*'); |
|
| 1890 |
+ if (pattern_matching(pp, np, nm, nx)) return 1; /* Test new branch (recurs upto number of wildcard blocks in the pattern) */ |
|
| 1891 |
+ nc = *np; break; /* Branch mismatched */ |
|
| 1892 |
+ } |
|
| 1893 |
+ pc = get_achar(&pp); /* Get a pattern char */ |
|
| 1894 |
+ nc = get_achar(&np); /* Get a name char */ |
|
| 1895 |
+ if (pc != nc) break; /* Branch mismatched? */ |
|
| 1896 |
+ if (!pc) return 1; /* Branch matched? (matched at end of both strings) */ |
|
| 1897 |
+ } |
|
| 1898 |
+ get_achar(&nam); /* nam++ */ |
|
| 1899 |
+ } while (inf && nc); /* Retry until end of name if infinite search is specified */ |
|
| 1900 |
+ |
|
| 1901 |
+ return 0; |
|
| 1902 |
+} |
|
| 1903 |
+#endif /* _USE_FIND && _FS_MINIMIZE <= 1 */ |
|
| 1904 |
+ |
|
| 1905 |
+ |
|
| 1906 |
+ |
|
| 1907 |
+ |
|
| 1908 |
+/*-----------------------------------------------------------------------*/ |
|
| 1909 |
+/* Pick a segment and create the object name in directory form */ |
|
| 1910 |
+/*-----------------------------------------------------------------------*/ |
|
| 1911 |
+ |
|
| 1912 |
+static |
|
| 1913 |
+FRESULT create_name ( |
|
| 1914 |
+ DIR* dp, /* Pointer to the directory object */ |
|
| 1915 |
+ const TCHAR** path /* Pointer to pointer to the segment in the path string */ |
|
| 1916 |
+) |
|
| 1917 |
+{
|
|
| 1918 |
+#if _USE_LFN /* LFN configuration */ |
|
| 1919 |
+ BYTE b, cf; |
|
| 1920 |
+ WCHAR w, *lfn; |
|
| 1921 |
+ UINT i, ni, si, di; |
|
| 1922 |
+ const TCHAR *p; |
|
| 1923 |
+ |
|
| 1924 |
+ /* Create LFN in Unicode */ |
|
| 1925 |
+ for (p = *path; *p == '/' || *p == '\\'; p++) ; /* Strip duplicated separator */ |
|
| 1926 |
+ lfn = dp->lfn; |
|
| 1927 |
+ si = di = 0; |
|
| 1928 |
+ for (;;) {
|
|
| 1929 |
+ w = p[si++]; /* Get a character */ |
|
| 1930 |
+ if (w < ' ' || w == '/' || w == '\\') break; /* Break on end of segment */ |
|
| 1931 |
+ if (di >= _MAX_LFN) /* Reject too long name */ |
|
| 1932 |
+ return FR_INVALID_NAME; |
|
| 1933 |
+#if !_LFN_UNICODE |
|
| 1934 |
+ w &= 0xFF; |
|
| 1935 |
+ if (IsDBCS1(w)) { /* Check if it is a DBC 1st byte (always false on SBCS cfg) */
|
|
| 1936 |
+#if _DF1S |
|
| 1937 |
+ b = (BYTE)p[si++]; /* Get 2nd byte */ |
|
| 1938 |
+ w = (w << 8) + b; /* Create a DBC */ |
|
| 1939 |
+ if (!IsDBCS2(b)) |
|
| 1940 |
+ return FR_INVALID_NAME; /* Reject invalid sequence */ |
|
| 1941 |
+#endif |
|
| 1942 |
+ } |
|
| 1943 |
+ w = ff_convert(w, 1); /* Convert ANSI/OEM to Unicode */ |
|
| 1944 |
+ if (!w) return FR_INVALID_NAME; /* Reject invalid code */ |
|
| 1945 |
+#endif |
|
| 1946 |
+ if (w < 0x80 && chk_chr("\"*:<>\?|\x7F", w)) /* Reject illegal characters for LFN */
|
|
| 1947 |
+ return FR_INVALID_NAME; |
|
| 1948 |
+ lfn[di++] = w; /* Store the Unicode character */ |
|
| 1949 |
+ } |
|
| 1950 |
+ *path = &p[si]; /* Return pointer to the next segment */ |
|
| 1951 |
+ cf = (w < ' ') ? NS_LAST : 0; /* Set last segment flag if end of path */ |
|
| 1952 |
+#if _FS_RPATH |
|
| 1953 |
+ if ((di == 1 && lfn[di - 1] == '.') || /* Is this a dot entry? */ |
|
| 1954 |
+ (di == 2 && lfn[di - 1] == '.' && lfn[di - 2] == '.')) {
|
|
| 1955 |
+ lfn[di] = 0; |
|
| 1956 |
+ for (i = 0; i < 11; i++) |
|
| 1957 |
+ dp->fn[i] = (i < di) ? '.' : ' '; |
|
| 1958 |
+ dp->fn[i] = cf | NS_DOT; /* This is a dot entry */ |
|
| 1959 |
+ return FR_OK; |
|
| 1960 |
+ } |
|
| 1961 |
+#endif |
|
| 1962 |
+ while (di) { /* Strip trailing spaces and dots */
|
|
| 1963 |
+ w = lfn[di - 1]; |
|
| 1964 |
+ if (w != ' ' && w != '.') break; |
|
| 1965 |
+ di--; |
|
| 1966 |
+ } |
|
| 1967 |
+ if (!di) return FR_INVALID_NAME; /* Reject nul string */ |
|
| 1968 |
+ |
|
| 1969 |
+ lfn[di] = 0; /* LFN is created */ |
|
| 1970 |
+ |
|
| 1971 |
+ /* Create SFN in directory form */ |
|
| 1972 |
+ mem_set(dp->fn, ' ', 11); |
|
| 1973 |
+ for (si = 0; lfn[si] == ' ' || lfn[si] == '.'; si++) ; /* Strip leading spaces and dots */ |
|
| 1974 |
+ if (si) cf |= NS_LOSS | NS_LFN; |
|
| 1975 |
+ while (di && lfn[di - 1] != '.') di--; /* Find extension (di<=si: no extension) */ |
|
| 1976 |
+ |
|
| 1977 |
+ b = i = 0; ni = 8; |
|
| 1978 |
+ for (;;) {
|
|
| 1979 |
+ w = lfn[si++]; /* Get an LFN character */ |
|
| 1980 |
+ if (!w) break; /* Break on end of the LFN */ |
|
| 1981 |
+ if (w == ' ' || (w == '.' && si != di)) { /* Remove spaces and dots */
|
|
| 1982 |
+ cf |= NS_LOSS | NS_LFN; continue; |
|
| 1983 |
+ } |
|
| 1984 |
+ |
|
| 1985 |
+ if (i >= ni || si == di) { /* Extension or end of SFN */
|
|
| 1986 |
+ if (ni == 11) { /* Long extension */
|
|
| 1987 |
+ cf |= NS_LOSS | NS_LFN; break; |
|
| 1988 |
+ } |
|
| 1989 |
+ if (si != di) cf |= NS_LOSS | NS_LFN; /* Out of 8.3 format */ |
|
| 1990 |
+ if (si > di) break; /* No extension */ |
|
| 1991 |
+ si = di; i = 8; ni = 11; /* Enter extension section */ |
|
| 1992 |
+ b <<= 2; continue; |
|
| 1993 |
+ } |
|
| 1994 |
+ |
|
| 1995 |
+ if (w >= 0x80) { /* Non ASCII character */
|
|
| 1996 |
+#ifdef _EXCVT |
|
| 1997 |
+ w = ff_convert(w, 0); /* Unicode -> OEM code */ |
|
| 1998 |
+ if (w) w = ExCvt[w - 0x80]; /* Convert extended character to upper (SBCS) */ |
|
| 1999 |
+#else |
|
| 2000 |
+ w = ff_convert(ff_wtoupper(w), 0); /* Upper converted Unicode -> OEM code */ |
|
| 2001 |
+#endif |
|
| 2002 |
+ cf |= NS_LFN; /* Force create LFN entry */ |
|
| 2003 |
+ } |
|
| 2004 |
+ |
|
| 2005 |
+ if (_DF1S && w >= 0x100) { /* DBC (always false at SBCS cfg) */
|
|
| 2006 |
+ if (i >= ni - 1) {
|
|
| 2007 |
+ cf |= NS_LOSS | NS_LFN; i = ni; continue; |
|
| 2008 |
+ } |
|
| 2009 |
+ dp->fn[i++] = (BYTE)(w >> 8); |
|
| 2010 |
+ } else { /* SBC */
|
|
| 2011 |
+ if (!w || chk_chr("+,;=[]", w)) { /* Replace illegal characters for SFN */
|
|
| 2012 |
+ w = '_'; cf |= NS_LOSS | NS_LFN;/* Lossy conversion */ |
|
| 2013 |
+ } else {
|
|
| 2014 |
+ if (IsUpper(w)) { /* ASCII large capital */
|
|
| 2015 |
+ b |= 2; |
|
| 2016 |
+ } else {
|
|
| 2017 |
+ if (IsLower(w)) { /* ASCII small capital */
|
|
| 2018 |
+ b |= 1; w -= 0x20; |
|
| 2019 |
+ } |
|
| 2020 |
+ } |
|
| 2021 |
+ } |
|
| 2022 |
+ } |
|
| 2023 |
+ dp->fn[i++] = (BYTE)w; |
|
| 2024 |
+ } |
|
| 2025 |
+ |
|
| 2026 |
+ if (dp->fn[0] == DDEM) dp->fn[0] = RDDEM; /* If the first character collides with deleted mark, replace it with RDDEM */ |
|
| 2027 |
+ |
|
| 2028 |
+ if (ni == 8) b <<= 2; |
|
| 2029 |
+ if ((b & 0x0C) == 0x0C || (b & 0x03) == 0x03) /* Create LFN entry when there are composite capitals */ |
|
| 2030 |
+ cf |= NS_LFN; |
|
| 2031 |
+ if (!(cf & NS_LFN)) { /* When LFN is in 8.3 format without extended character, NT flags are created */
|
|
| 2032 |
+ if ((b & 0x03) == 0x01) cf |= NS_EXT; /* NT flag (Extension has only small capital) */ |
|
| 2033 |
+ if ((b & 0x0C) == 0x04) cf |= NS_BODY; /* NT flag (Filename has only small capital) */ |
|
| 2034 |
+ } |
|
| 2035 |
+ |
|
| 2036 |
+ dp->fn[NSFLAG] = cf; /* SFN is created */ |
|
| 2037 |
+ |
|
| 2038 |
+ return FR_OK; |
|
| 2039 |
+ |
|
| 2040 |
+ |
|
| 2041 |
+#else /* Non-LFN configuration */ |
|
| 2042 |
+ BYTE b, c, d, *sfn; |
|
| 2043 |
+ UINT ni, si, i; |
|
| 2044 |
+ const char *p; |
|
| 2045 |
+ |
|
| 2046 |
+ /* Create file name in directory form */ |
|
| 2047 |
+ for (p = *path; *p == '/' || *p == '\\'; p++) ; /* Strip duplicated separator */ |
|
| 2048 |
+ sfn = dp->fn; |
|
| 2049 |
+ mem_set(sfn, ' ', 11); |
|
| 2050 |
+ si = i = b = 0; ni = 8; |
|
| 2051 |
+#if _FS_RPATH |
|
| 2052 |
+ if (p[si] == '.') { /* Is this a dot entry? */
|
|
| 2053 |
+ for (;;) {
|
|
| 2054 |
+ c = (BYTE)p[si++]; |
|
| 2055 |
+ if (c != '.' || si >= 3) break; |
|
| 2056 |
+ sfn[i++] = c; |
|
| 2057 |
+ } |
|
| 2058 |
+ if (c != '/' && c != '\\' && c > ' ') return FR_INVALID_NAME; |
|
| 2059 |
+ *path = &p[si]; /* Return pointer to the next segment */ |
|
| 2060 |
+ sfn[NSFLAG] = (c <= ' ') ? NS_LAST | NS_DOT : NS_DOT; /* Set last segment flag if end of path */ |
|
| 2061 |
+ return FR_OK; |
|
| 2062 |
+ } |
|
| 2063 |
+#endif |
|
| 2064 |
+ for (;;) {
|
|
| 2065 |
+ c = (BYTE)p[si++]; |
|
| 2066 |
+ if (c <= ' ' || c == '/' || c == '\\') break; /* Break on end of segment */ |
|
| 2067 |
+ if (c == '.' || i >= ni) {
|
|
| 2068 |
+ if (ni != 8 || c != '.') return FR_INVALID_NAME; |
|
| 2069 |
+ i = 8; ni = 11; |
|
| 2070 |
+ b <<= 2; continue; |
|
| 2071 |
+ } |
|
| 2072 |
+ if (c >= 0x80) { /* Extended character? */
|
|
| 2073 |
+ b |= 3; /* Eliminate NT flag */ |
|
| 2074 |
+#ifdef _EXCVT |
|
| 2075 |
+ c = ExCvt[c - 0x80]; /* To upper extended characters (SBCS cfg) */ |
|
| 2076 |
+#else |
|
| 2077 |
+#if !_DF1S |
|
| 2078 |
+ return FR_INVALID_NAME; /* Reject extended characters (ASCII cfg) */ |
|
| 2079 |
+#endif |
|
| 2080 |
+#endif |
|
| 2081 |
+ } |
|
| 2082 |
+ if (IsDBCS1(c)) { /* Check if it is a DBC 1st byte (always false on SBCS cfg) */
|
|
| 2083 |
+ d = (BYTE)p[si++]; /* Get 2nd byte */ |
|
| 2084 |
+ if (!IsDBCS2(d) || i >= ni - 1) /* Reject invalid DBC */ |
|
| 2085 |
+ return FR_INVALID_NAME; |
|
| 2086 |
+ sfn[i++] = c; |
|
| 2087 |
+ sfn[i++] = d; |
|
| 2088 |
+ } else { /* SBC */
|
|
| 2089 |
+ if (chk_chr("\"*+,:;<=>\?[]|\x7F", c)) /* Reject illegal chrs for SFN */
|
|
| 2090 |
+ return FR_INVALID_NAME; |
|
| 2091 |
+ if (IsUpper(c)) { /* ASCII large capital? */
|
|
| 2092 |
+ b |= 2; |
|
| 2093 |
+ } else {
|
|
| 2094 |
+ if (IsLower(c)) { /* ASCII small capital? */
|
|
| 2095 |
+ b |= 1; c -= 0x20; |
|
| 2096 |
+ } |
|
| 2097 |
+ } |
|
| 2098 |
+ sfn[i++] = c; |
|
| 2099 |
+ } |
|
| 2100 |
+ } |
|
| 2101 |
+ *path = &p[si]; /* Return pointer to the next segment */ |
|
| 2102 |
+ c = (c <= ' ') ? NS_LAST : 0; /* Set last segment flag if end of path */ |
|
| 2103 |
+ |
|
| 2104 |
+ if (!i) return FR_INVALID_NAME; /* Reject nul string */ |
|
| 2105 |
+ if (sfn[0] == DDEM) sfn[0] = RDDEM; /* When first character collides with DDEM, replace it with RDDEM */ |
|
| 2106 |
+ |
|
| 2107 |
+ if (ni == 8) b <<= 2; |
|
| 2108 |
+ if ((b & 0x03) == 0x01) c |= NS_EXT; /* NT flag (Name extension has only small capital) */ |
|
| 2109 |
+ if ((b & 0x0C) == 0x04) c |= NS_BODY; /* NT flag (Name body has only small capital) */ |
|
| 2110 |
+ |
|
| 2111 |
+ sfn[NSFLAG] = c; /* Store NT flag, File name is created */ |
|
| 2112 |
+ |
|
| 2113 |
+ return FR_OK; |
|
| 2114 |
+#endif |
|
| 2115 |
+} |
|
| 2116 |
+ |
|
| 2117 |
+ |
|
| 2118 |
+ |
|
| 2119 |
+ |
|
| 2120 |
+/*-----------------------------------------------------------------------*/ |
|
| 2121 |
+/* Follow a file path */ |
|
| 2122 |
+/*-----------------------------------------------------------------------*/ |
|
| 2123 |
+ |
|
| 2124 |
+static |
|
| 2125 |
+FRESULT follow_path ( /* FR_OK(0): successful, !=0: error code */ |
|
| 2126 |
+ DIR* dp, /* Directory object to return last directory and found object */ |
|
| 2127 |
+ const TCHAR* path /* Full-path string to find a file or directory */ |
|
| 2128 |
+) |
|
| 2129 |
+{
|
|
| 2130 |
+ FRESULT res; |
|
| 2131 |
+ BYTE *dir, ns; |
|
| 2132 |
+ |
|
| 2133 |
+ |
|
| 2134 |
+#if _FS_RPATH |
|
| 2135 |
+ if (*path == '/' || *path == '\\') { /* There is a heading separator */
|
|
| 2136 |
+ path++; dp->sclust = 0; /* Strip it and start from the root directory */ |
|
| 2137 |
+ } else { /* No heading separator */
|
|
| 2138 |
+ dp->sclust = dp->fs->cdir; /* Start from the current directory */ |
|
| 2139 |
+ } |
|
| 2140 |
+#else |
|
| 2141 |
+ if (*path == '/' || *path == '\\') /* Strip heading separator if exist */ |
|
| 2142 |
+ path++; |
|
| 2143 |
+ dp->sclust = 0; /* Always start from the root directory */ |
|
| 2144 |
+#endif |
|
| 2145 |
+ |
|
| 2146 |
+ if ((UINT)*path < ' ') { /* Null path name is the origin directory itself */
|
|
| 2147 |
+ res = dir_sdi(dp, 0); |
|
| 2148 |
+ dp->dir = 0; |
|
| 2149 |
+ } else { /* Follow path */
|
|
| 2150 |
+ for (;;) {
|
|
| 2151 |
+ res = create_name(dp, &path); /* Get a segment name of the path */ |
|
| 2152 |
+ if (res != FR_OK) break; |
|
| 2153 |
+ res = dir_find(dp); /* Find an object with the sagment name */ |
|
| 2154 |
+ ns = dp->fn[NSFLAG]; |
|
| 2155 |
+ if (res != FR_OK) { /* Failed to find the object */
|
|
| 2156 |
+ if (res == FR_NO_FILE) { /* Object is not found */
|
|
| 2157 |
+ if (_FS_RPATH && (ns & NS_DOT)) { /* If dot entry is not exist, */
|
|
| 2158 |
+ dp->sclust = 0; dp->dir = 0; /* it is the root directory and stay there */ |
|
| 2159 |
+ if (!(ns & NS_LAST)) continue; /* Continue to follow if not last segment */ |
|
| 2160 |
+ res = FR_OK; /* Ended at the root directroy. Function completed. */ |
|
| 2161 |
+ } else { /* Could not find the object */
|
|
| 2162 |
+ if (!(ns & NS_LAST)) res = FR_NO_PATH; /* Adjust error code if not last segment */ |
|
| 2163 |
+ } |
|
| 2164 |
+ } |
|
| 2165 |
+ break; |
|
| 2166 |
+ } |
|
| 2167 |
+ if (ns & NS_LAST) break; /* Last segment matched. Function completed. */ |
|
| 2168 |
+ dir = dp->dir; /* Follow the sub-directory */ |
|
| 2169 |
+ if (!(dir[DIR_Attr] & AM_DIR)) { /* It is not a sub-directory and cannot follow */
|
|
| 2170 |
+ res = FR_NO_PATH; break; |
|
| 2171 |
+ } |
|
| 2172 |
+ dp->sclust = ld_clust(dp->fs, dir); |
|
| 2173 |
+ } |
|
| 2174 |
+ } |
|
| 2175 |
+ |
|
| 2176 |
+ return res; |
|
| 2177 |
+} |
|
| 2178 |
+ |
|
| 2179 |
+ |
|
| 2180 |
+ |
|
| 2181 |
+ |
|
| 2182 |
+/*-----------------------------------------------------------------------*/ |
|
| 2183 |
+/* Get logical drive number from path name */ |
|
| 2184 |
+/*-----------------------------------------------------------------------*/ |
|
| 2185 |
+ |
|
| 2186 |
+static |
|
| 2187 |
+int get_ldnumber ( /* Returns logical drive number (-1:invalid drive) */ |
|
| 2188 |
+ const TCHAR** path /* Pointer to pointer to the path name */ |
|
| 2189 |
+) |
|
| 2190 |
+{
|
|
| 2191 |
+ const TCHAR *tp, *tt; |
|
| 2192 |
+ UINT i; |
|
| 2193 |
+ int vol = -1; |
|
| 2194 |
+#if _STR_VOLUME_ID /* Find string drive id */ |
|
| 2195 |
+ static const char* const str[] = {_VOLUME_STRS};
|
|
| 2196 |
+ const char *sp; |
|
| 2197 |
+ char c; |
|
| 2198 |
+ TCHAR tc; |
|
| 2199 |
+#endif |
|
| 2200 |
+ |
|
| 2201 |
+ |
|
| 2202 |
+ if (*path) { /* If the pointer is not a null */
|
|
| 2203 |
+ for (tt = *path; (UINT)*tt >= (_USE_LFN ? ' ' : '!') && *tt != ':'; tt++) ; /* Find ':' in the path */ |
|
| 2204 |
+ if (*tt == ':') { /* If a ':' is exist in the path name */
|
|
| 2205 |
+ tp = *path; |
|
| 2206 |
+ i = *tp++ - '0'; |
|
| 2207 |
+ if (i < 10 && tp == tt) { /* Is there a numeric drive id? */
|
|
| 2208 |
+ if (i < _VOLUMES) { /* If a drive id is found, get the value and strip it */
|
|
| 2209 |
+ vol = (int)i; |
|
| 2210 |
+ *path = ++tt; |
|
| 2211 |
+ } |
|
| 2212 |
+ } |
|
| 2213 |
+#if _STR_VOLUME_ID |
|
| 2214 |
+ else { /* No numeric drive number, find string drive id */
|
|
| 2215 |
+ i = 0; tt++; |
|
| 2216 |
+ do {
|
|
| 2217 |
+ sp = str[i]; tp = *path; |
|
| 2218 |
+ do { /* Compare a string drive id with path name */
|
|
| 2219 |
+ c = *sp++; tc = *tp++; |
|
| 2220 |
+ if (IsLower(tc)) tc -= 0x20; |
|
| 2221 |
+ } while (c && (TCHAR)c == tc); |
|
| 2222 |
+ } while ((c || tp != tt) && ++i < _VOLUMES); /* Repeat for each id until pattern match */ |
|
| 2223 |
+ if (i < _VOLUMES) { /* If a drive id is found, get the value and strip it */
|
|
| 2224 |
+ vol = (int)i; |
|
| 2225 |
+ *path = tt; |
|
| 2226 |
+ } |
|
| 2227 |
+ } |
|
| 2228 |
+#endif |
|
| 2229 |
+ return vol; |
|
| 2230 |
+ } |
|
| 2231 |
+#if _FS_RPATH && _VOLUMES >= 2 |
|
| 2232 |
+ vol = CurrVol; /* Current drive */ |
|
| 2233 |
+#else |
|
| 2234 |
+ vol = 0; /* Drive 0 */ |
|
| 2235 |
+#endif |
|
| 2236 |
+ } |
|
| 2237 |
+ return vol; |
|
| 2238 |
+} |
|
| 2239 |
+ |
|
| 2240 |
+ |
|
| 2241 |
+ |
|
| 2242 |
+ |
|
| 2243 |
+/*-----------------------------------------------------------------------*/ |
|
| 2244 |
+/* Load a sector and check if it is an FAT boot sector */ |
|
| 2245 |
+/*-----------------------------------------------------------------------*/ |
|
| 2246 |
+ |
|
| 2247 |
+static |
|
| 2248 |
+BYTE check_fs ( /* 0:FAT boor sector, 1:Valid boor sector but not FAT, 2:Not a boot sector, 3:Disk error */ |
|
| 2249 |
+ FATFS* fs, /* File system object */ |
|
| 2250 |
+ DWORD sect /* Sector# (lba) to check if it is an FAT boot record or not */ |
|
| 2251 |
+) |
|
| 2252 |
+{
|
|
| 2253 |
+ fs->wflag = 0; fs->winsect = 0xFFFFFFFF; /* Invaidate window */ |
|
| 2254 |
+ if (move_window(fs, sect) != FR_OK) /* Load boot record */ |
|
| 2255 |
+ return 3; |
|
| 2256 |
+ |
|
| 2257 |
+ if (LD_WORD(&fs->win.d8[BS_55AA]) != 0xAA55) /* Check boot record signature (always placed at offset 510 even if the sector size is >512) */ |
|
| 2258 |
+ return 2; |
|
| 2259 |
+ |
|
| 2260 |
+ if ((LD_DWORD(&fs->win.d8[BS_FilSysType]) & 0xFFFFFF) == 0x544146) /* Check "FAT" string */ |
|
| 2261 |
+ return 0; |
|
| 2262 |
+ if ((LD_DWORD(&fs->win.d8[BS_FilSysType32]) & 0xFFFFFF) == 0x544146) /* Check "FAT" string */ |
|
| 2263 |
+ return 0; |
|
| 2264 |
+ |
|
| 2265 |
+ return 1; |
|
| 2266 |
+} |
|
| 2267 |
+ |
|
| 2268 |
+ |
|
| 2269 |
+ |
|
| 2270 |
+ |
|
| 2271 |
+/*-----------------------------------------------------------------------*/ |
|
| 2272 |
+/* Find logical drive and check if the volume is mounted */ |
|
| 2273 |
+/*-----------------------------------------------------------------------*/ |
|
| 2274 |
+ |
|
| 2275 |
+static |
|
| 2276 |
+FRESULT find_volume ( /* FR_OK(0): successful, !=0: any error occurred */ |
|
| 2277 |
+ FATFS** rfs, /* Pointer to pointer to the found file system object */ |
|
| 2278 |
+ const TCHAR** path, /* Pointer to pointer to the path name (drive number) */ |
|
| 2279 |
+ BYTE wmode /* !=0: Check write protection for write access */ |
|
| 2280 |
+) |
|
| 2281 |
+{
|
|
| 2282 |
+ BYTE fmt, *pt; |
|
| 2283 |
+ int vol; |
|
| 2284 |
+ DSTATUS stat; |
|
| 2285 |
+ DWORD bsect, fasize, tsect, sysect, nclst, szbfat, br[4]; |
|
| 2286 |
+ WORD nrsv; |
|
| 2287 |
+ FATFS *fs; |
|
| 2288 |
+ UINT i; |
|
| 2289 |
+ |
|
| 2290 |
+ |
|
| 2291 |
+ /* Get logical drive number from the path name */ |
|
| 2292 |
+ *rfs = 0; |
|
| 2293 |
+ vol = get_ldnumber(path); |
|
| 2294 |
+ if (vol < 0) return FR_INVALID_DRIVE; |
|
| 2295 |
+ |
|
| 2296 |
+ /* Check if the file system object is valid or not */ |
|
| 2297 |
+ fs = FatFs[vol]; /* Get pointer to the file system object */ |
|
| 2298 |
+ if (!fs) return FR_NOT_ENABLED; /* Is the file system object available? */ |
|
| 2299 |
+ |
|
| 2300 |
+ ENTER_FF(fs); /* Lock the volume */ |
|
| 2301 |
+ *rfs = fs; /* Return pointer to the file system object */ |
|
| 2302 |
+ |
|
| 2303 |
+ if (fs->fs_type) { /* If the volume has been mounted */
|
|
| 2304 |
+ stat = disk_status(fs->drv); |
|
| 2305 |
+ if (!(stat & STA_NOINIT)) { /* and the physical drive is kept initialized */
|
|
| 2306 |
+ if (!_FS_READONLY && wmode && (stat & STA_PROTECT)) /* Check write protection if needed */ |
|
| 2307 |
+ return FR_WRITE_PROTECTED; |
|
| 2308 |
+ return FR_OK; /* The file system object is valid */ |
|
| 2309 |
+ } |
|
| 2310 |
+ } |
|
| 2311 |
+ |
|
| 2312 |
+ /* The file system object is not valid. */ |
|
| 2313 |
+ /* Following code attempts to mount the volume. (analyze BPB and initialize the fs object) */ |
|
| 2314 |
+ |
|
| 2315 |
+ fs->fs_type = 0; /* Clear the file system object */ |
|
| 2316 |
+ fs->drv = LD2PD(vol); /* Bind the logical drive and a physical drive */ |
|
| 2317 |
+ stat = disk_initialize(fs->drv); /* Initialize the physical drive */ |
|
| 2318 |
+ if (stat & STA_NOINIT) /* Check if the initialization succeeded */ |
|
| 2319 |
+ return FR_NOT_READY; /* Failed to initialize due to no medium or hard error */ |
|
| 2320 |
+ if (!_FS_READONLY && wmode && (stat & STA_PROTECT)) /* Check disk write protection if needed */ |
|
| 2321 |
+ return FR_WRITE_PROTECTED; |
|
| 2322 |
+#if _MAX_SS != _MIN_SS /* Get sector size (multiple sector size cfg only) */ |
|
| 2323 |
+ if (disk_ioctl(fs->drv, GET_SECTOR_SIZE, &SS(fs)) != RES_OK |
|
| 2324 |
+ || SS(fs) < _MIN_SS || SS(fs) > _MAX_SS) return FR_DISK_ERR; |
|
| 2325 |
+#endif |
|
| 2326 |
+ /* Find an FAT partition on the drive. Supports only generic partitioning, FDISK and SFD. */ |
|
| 2327 |
+ bsect = 0; |
|
| 2328 |
+ fmt = check_fs(fs, bsect); /* Load sector 0 and check if it is an FAT boot sector as SFD */ |
|
| 2329 |
+ if (fmt == 1 || (!fmt && (LD2PT(vol)))) { /* Not an FAT boot sector or forced partition number */
|
|
| 2330 |
+ for (i = 0; i < 4; i++) { /* Get partition offset */
|
|
| 2331 |
+ pt = fs->win.d8 + MBR_Table + i * SZ_PTE; |
|
| 2332 |
+ br[i] = pt[4] ? LD_DWORD(&pt[8]) : 0; |
|
| 2333 |
+ } |
|
| 2334 |
+ i = LD2PT(vol); /* Partition number: 0:auto, 1-4:forced */ |
|
| 2335 |
+ if (i) i--; |
|
| 2336 |
+ do { /* Find an FAT volume */
|
|
| 2337 |
+ bsect = br[i]; |
|
| 2338 |
+ fmt = bsect ? check_fs(fs, bsect) : 2; /* Check the partition */ |
|
| 2339 |
+ } while (!LD2PT(vol) && fmt && ++i < 4); |
|
| 2340 |
+ } |
|
| 2341 |
+ if (fmt == 3) return FR_DISK_ERR; /* An error occured in the disk I/O layer */ |
|
| 2342 |
+ if (fmt) return FR_NO_FILESYSTEM; /* No FAT volume is found */ |
|
| 2343 |
+ |
|
| 2344 |
+ /* An FAT volume is found. Following code initializes the file system object */ |
|
| 2345 |
+ |
|
| 2346 |
+ if (LD_WORD(fs->win.d8 + BPB_BytsPerSec) != SS(fs)) /* (BPB_BytsPerSec must be equal to the physical sector size) */ |
|
| 2347 |
+ return FR_NO_FILESYSTEM; |
|
| 2348 |
+ |
|
| 2349 |
+ fasize = LD_WORD(fs->win.d8 + BPB_FATSz16); /* Number of sectors per FAT */ |
|
| 2350 |
+ if (!fasize) fasize = LD_DWORD(fs->win.d8 + BPB_FATSz32); |
|
| 2351 |
+ fs->fsize = fasize; |
|
| 2352 |
+ |
|
| 2353 |
+ fs->n_fats = fs->win.d8[BPB_NumFATs]; /* Number of FAT copies */ |
|
| 2354 |
+ if (fs->n_fats != 1 && fs->n_fats != 2) /* (Must be 1 or 2) */ |
|
| 2355 |
+ return FR_NO_FILESYSTEM; |
|
| 2356 |
+ fasize *= fs->n_fats; /* Number of sectors for FAT area */ |
|
| 2357 |
+ |
|
| 2358 |
+ fs->csize = fs->win.d8[BPB_SecPerClus]; /* Number of sectors per cluster */ |
|
| 2359 |
+ if (!fs->csize || (fs->csize & (fs->csize - 1))) /* (Must be power of 2) */ |
|
| 2360 |
+ return FR_NO_FILESYSTEM; |
|
| 2361 |
+ |
|
| 2362 |
+ fs->n_rootdir = LD_WORD(fs->win.d8 + BPB_RootEntCnt); /* Number of root directory entries */ |
|
| 2363 |
+ if (fs->n_rootdir % (SS(fs) / SZ_DIRE)) /* (Must be sector aligned) */ |
|
| 2364 |
+ return FR_NO_FILESYSTEM; |
|
| 2365 |
+ |
|
| 2366 |
+ tsect = LD_WORD(fs->win.d8 + BPB_TotSec16); /* Number of sectors on the volume */ |
|
| 2367 |
+ if (!tsect) tsect = LD_DWORD(fs->win.d8 + BPB_TotSec32); |
|
| 2368 |
+ |
|
| 2369 |
+ nrsv = LD_WORD(fs->win.d8 + BPB_RsvdSecCnt); /* Number of reserved sectors */ |
|
| 2370 |
+ if (!nrsv) return FR_NO_FILESYSTEM; /* (Must not be 0) */ |
|
| 2371 |
+ |
|
| 2372 |
+ /* Determine the FAT sub type */ |
|
| 2373 |
+ sysect = nrsv + fasize + fs->n_rootdir / (SS(fs) / SZ_DIRE); /* RSV + FAT + DIR */ |
|
| 2374 |
+ if (tsect < sysect) return FR_NO_FILESYSTEM; /* (Invalid volume size) */ |
|
| 2375 |
+ nclst = (tsect - sysect) / fs->csize; /* Number of clusters */ |
|
| 2376 |
+ if (!nclst) return FR_NO_FILESYSTEM; /* (Invalid volume size) */ |
|
| 2377 |
+ fmt = FS_FAT12; |
|
| 2378 |
+ if (nclst >= MIN_FAT16) fmt = FS_FAT16; |
|
| 2379 |
+ if (nclst >= MIN_FAT32) fmt = FS_FAT32; |
|
| 2380 |
+ |
|
| 2381 |
+ /* Boundaries and Limits */ |
|
| 2382 |
+ fs->n_fatent = nclst + 2; /* Number of FAT entries */ |
|
| 2383 |
+ fs->volbase = bsect; /* Volume start sector */ |
|
| 2384 |
+ fs->fatbase = bsect + nrsv; /* FAT start sector */ |
|
| 2385 |
+ fs->database = bsect + sysect; /* Data start sector */ |
|
| 2386 |
+ if (fmt == FS_FAT32) {
|
|
| 2387 |
+ if (fs->n_rootdir) return FR_NO_FILESYSTEM; /* (BPB_RootEntCnt must be 0) */ |
|
| 2388 |
+ fs->dirbase = LD_DWORD(fs->win.d8 + BPB_RootClus); /* Root directory start cluster */ |
|
| 2389 |
+ szbfat = fs->n_fatent * 4; /* (Needed FAT size) */ |
|
| 2390 |
+ } else {
|
|
| 2391 |
+ if (!fs->n_rootdir) return FR_NO_FILESYSTEM; /* (BPB_RootEntCnt must not be 0) */ |
|
| 2392 |
+ fs->dirbase = fs->fatbase + fasize; /* Root directory start sector */ |
|
| 2393 |
+ szbfat = (fmt == FS_FAT16) ? /* (Needed FAT size) */ |
|
| 2394 |
+ fs->n_fatent * 2 : fs->n_fatent * 3 / 2 + (fs->n_fatent & 1); |
|
| 2395 |
+ } |
|
| 2396 |
+ if (fs->fsize < (szbfat + (SS(fs) - 1)) / SS(fs)) /* (BPB_FATSz must not be less than the size needed) */ |
|
| 2397 |
+ return FR_NO_FILESYSTEM; |
|
| 2398 |
+ |
|
| 2399 |
+#if !_FS_READONLY |
|
| 2400 |
+ /* Initialize cluster allocation information */ |
|
| 2401 |
+ fs->last_clust = fs->free_clust = 0xFFFFFFFF; |
|
| 2402 |
+ |
|
| 2403 |
+ /* Get fsinfo if available */ |
|
| 2404 |
+ fs->fsi_flag = 0x80; |
|
| 2405 |
+#if (_FS_NOFSINFO & 3) != 3 |
|
| 2406 |
+ if (fmt == FS_FAT32 /* Enable FSINFO only if FAT32 and BPB_FSInfo is 1 */ |
|
| 2407 |
+ && LD_WORD(fs->win.d8 + BPB_FSInfo) == 1 |
|
| 2408 |
+ && move_window(fs, bsect + 1) == FR_OK) |
|
| 2409 |
+ {
|
|
| 2410 |
+ fs->fsi_flag = 0; |
|
| 2411 |
+ if (LD_WORD(fs->win.d8 + BS_55AA) == 0xAA55 /* Load FSINFO data if available */ |
|
| 2412 |
+ && LD_DWORD(fs->win.d8 + FSI_LeadSig) == 0x41615252 |
|
| 2413 |
+ && LD_DWORD(fs->win.d8 + FSI_StrucSig) == 0x61417272) |
|
| 2414 |
+ {
|
|
| 2415 |
+#if (_FS_NOFSINFO & 1) == 0 |
|
| 2416 |
+ fs->free_clust = LD_DWORD(fs->win.d8 + FSI_Free_Count); |
|
| 2417 |
+#endif |
|
| 2418 |
+#if (_FS_NOFSINFO & 2) == 0 |
|
| 2419 |
+ fs->last_clust = LD_DWORD(fs->win.d8 + FSI_Nxt_Free); |
|
| 2420 |
+#endif |
|
| 2421 |
+ } |
|
| 2422 |
+ } |
|
| 2423 |
+#endif |
|
| 2424 |
+#endif |
|
| 2425 |
+ fs->fs_type = fmt; /* FAT sub-type */ |
|
| 2426 |
+ fs->id = ++Fsid; /* File system mount ID */ |
|
| 2427 |
+#if _FS_RPATH |
|
| 2428 |
+ fs->cdir = 0; /* Set current directory to root */ |
|
| 2429 |
+#endif |
|
| 2430 |
+#if _FS_LOCK /* Clear file lock semaphores */ |
|
| 2431 |
+ clear_lock(fs); |
|
| 2432 |
+#endif |
|
| 2433 |
+ |
|
| 2434 |
+ return FR_OK; |
|
| 2435 |
+} |
|
| 2436 |
+ |
|
| 2437 |
+ |
|
| 2438 |
+ |
|
| 2439 |
+ |
|
| 2440 |
+/*-----------------------------------------------------------------------*/ |
|
| 2441 |
+/* Check if the file/directory object is valid or not */ |
|
| 2442 |
+/*-----------------------------------------------------------------------*/ |
|
| 2443 |
+ |
|
| 2444 |
+static |
|
| 2445 |
+FRESULT validate ( /* FR_OK(0): The object is valid, !=0: Invalid */ |
|
| 2446 |
+ void* obj /* Pointer to the object FIL/DIR to check validity */ |
|
| 2447 |
+) |
|
| 2448 |
+{
|
|
| 2449 |
+ FIL *fil = (FIL*)obj; /* Assuming offset of .fs and .id in the FIL/DIR structure is identical */ |
|
| 2450 |
+ |
|
| 2451 |
+ |
|
| 2452 |
+ if (!fil || !fil->fs || !fil->fs->fs_type || fil->fs->id != fil->id || (disk_status(fil->fs->drv) & STA_NOINIT)) |
|
| 2453 |
+ return FR_INVALID_OBJECT; |
|
| 2454 |
+ |
|
| 2455 |
+ ENTER_FF(fil->fs); /* Lock file system */ |
|
| 2456 |
+ |
|
| 2457 |
+ return FR_OK; |
|
| 2458 |
+} |
|
| 2459 |
+ |
|
| 2460 |
+ |
|
| 2461 |
+ |
|
| 2462 |
+ |
|
| 2463 |
+/*-------------------------------------------------------------------------- |
|
| 2464 |
+ |
|
| 2465 |
+ Public Functions |
|
| 2466 |
+ |
|
| 2467 |
+--------------------------------------------------------------------------*/ |
|
| 2468 |
+ |
|
| 2469 |
+ |
|
| 2470 |
+ |
|
| 2471 |
+/*-----------------------------------------------------------------------*/ |
|
| 2472 |
+/* Mount/Unmount a Logical Drive */ |
|
| 2473 |
+/*-----------------------------------------------------------------------*/ |
|
| 2474 |
+ |
|
| 2475 |
+FRESULT f_mount ( |
|
| 2476 |
+ FATFS* fs, /* Pointer to the file system object (NULL:unmount)*/ |
|
| 2477 |
+ const TCHAR* path, /* Logical drive number to be mounted/unmounted */ |
|
| 2478 |
+ BYTE opt /* 0:Do not mount (delayed mount), 1:Mount immediately */ |
|
| 2479 |
+) |
|
| 2480 |
+{
|
|
| 2481 |
+ FATFS *cfs; |
|
| 2482 |
+ int vol; |
|
| 2483 |
+ FRESULT res; |
|
| 2484 |
+ const TCHAR *rp = path; |
|
| 2485 |
+ |
|
| 2486 |
+ |
|
| 2487 |
+ vol = get_ldnumber(&rp); |
|
| 2488 |
+ if (vol < 0) return FR_INVALID_DRIVE; |
|
| 2489 |
+ cfs = FatFs[vol]; /* Pointer to fs object */ |
|
| 2490 |
+ |
|
| 2491 |
+ if (cfs) {
|
|
| 2492 |
+#if _FS_LOCK |
|
| 2493 |
+ clear_lock(cfs); |
|
| 2494 |
+#endif |
|
| 2495 |
+#if _FS_REENTRANT /* Discard sync object of the current volume */ |
|
| 2496 |
+ if (!ff_del_syncobj(cfs->sobj)) return FR_INT_ERR; |
|
| 2497 |
+#endif |
|
| 2498 |
+ cfs->fs_type = 0; /* Clear old fs object */ |
|
| 2499 |
+ } |
|
| 2500 |
+ |
|
| 2501 |
+ if (fs) {
|
|
| 2502 |
+ fs->fs_type = 0; /* Clear new fs object */ |
|
| 2503 |
+#if _FS_REENTRANT /* Create sync object for the new volume */ |
|
| 2504 |
+ if (!ff_cre_syncobj((BYTE)vol, &fs->sobj)) return FR_INT_ERR; |
|
| 2505 |
+#endif |
|
| 2506 |
+ } |
|
| 2507 |
+ FatFs[vol] = fs; /* Register new fs object */ |
|
| 2508 |
+ |
|
| 2509 |
+ if (!fs || opt != 1) return FR_OK; /* Do not mount now, it will be mounted later */ |
|
| 2510 |
+ |
|
| 2511 |
+ res = find_volume(&fs, &path, 0); /* Force mounted the volume */ |
|
| 2512 |
+ LEAVE_FF(fs, res); |
|
| 2513 |
+} |
|
| 2514 |
+ |
|
| 2515 |
+ |
|
| 2516 |
+ |
|
| 2517 |
+ |
|
| 2518 |
+/*-----------------------------------------------------------------------*/ |
|
| 2519 |
+/* Open or Create a File */ |
|
| 2520 |
+/*-----------------------------------------------------------------------*/ |
|
| 2521 |
+ |
|
| 2522 |
+FRESULT f_open ( |
|
| 2523 |
+ FIL* fp, /* Pointer to the blank file object */ |
|
| 2524 |
+ const TCHAR* path, /* Pointer to the file name */ |
|
| 2525 |
+ BYTE mode /* Access mode and file open mode flags */ |
|
| 2526 |
+) |
|
| 2527 |
+{
|
|
| 2528 |
+ FRESULT res; |
|
| 2529 |
+ DIR dj; |
|
| 2530 |
+ BYTE *dir; |
|
| 2531 |
+ DEFINE_NAMEBUF; |
|
| 2532 |
+#if !_FS_READONLY |
|
| 2533 |
+ DWORD dw, cl; |
|
| 2534 |
+#endif |
|
| 2535 |
+ |
|
| 2536 |
+ |
|
| 2537 |
+ if (!fp) return FR_INVALID_OBJECT; |
|
| 2538 |
+ fp->fs = 0; /* Clear file object */ |
|
| 2539 |
+ |
|
| 2540 |
+ /* Get logical drive number */ |
|
| 2541 |
+#if !_FS_READONLY |
|
| 2542 |
+ mode &= FA_READ | FA_WRITE | FA_CREATE_ALWAYS | FA_OPEN_ALWAYS | FA_CREATE_NEW; |
|
| 2543 |
+ res = find_volume(&dj.fs, &path, (BYTE)(mode & ~FA_READ)); |
|
| 2544 |
+#else |
|
| 2545 |
+ mode &= FA_READ; |
|
| 2546 |
+ res = find_volume(&dj.fs, &path, 0); |
|
| 2547 |
+#endif |
|
| 2548 |
+ if (res == FR_OK) {
|
|
| 2549 |
+ INIT_BUF(dj); |
|
| 2550 |
+ res = follow_path(&dj, path); /* Follow the file path */ |
|
| 2551 |
+ dir = dj.dir; |
|
| 2552 |
+#if !_FS_READONLY /* R/W configuration */ |
|
| 2553 |
+ if (res == FR_OK) {
|
|
| 2554 |
+ if (!dir) /* Default directory itself */ |
|
| 2555 |
+ res = FR_INVALID_NAME; |
|
| 2556 |
+#if _FS_LOCK |
|
| 2557 |
+ else |
|
| 2558 |
+ res = chk_lock(&dj, (mode & ~FA_READ) ? 1 : 0); |
|
| 2559 |
+#endif |
|
| 2560 |
+ } |
|
| 2561 |
+ /* Create or Open a file */ |
|
| 2562 |
+ if (mode & (FA_CREATE_ALWAYS | FA_OPEN_ALWAYS | FA_CREATE_NEW)) {
|
|
| 2563 |
+ if (res != FR_OK) { /* No file, create new */
|
|
| 2564 |
+ if (res == FR_NO_FILE) /* There is no file to open, create a new entry */ |
|
| 2565 |
+#if _FS_LOCK |
|
| 2566 |
+ res = enq_lock() ? dir_register(&dj) : FR_TOO_MANY_OPEN_FILES; |
|
| 2567 |
+#else |
|
| 2568 |
+ res = dir_register(&dj); |
|
| 2569 |
+#endif |
|
| 2570 |
+ mode |= FA_CREATE_ALWAYS; /* File is created */ |
|
| 2571 |
+ dir = dj.dir; /* New entry */ |
|
| 2572 |
+ } |
|
| 2573 |
+ else { /* Any object is already existing */
|
|
| 2574 |
+ if (dir[DIR_Attr] & (AM_RDO | AM_DIR)) { /* Cannot overwrite it (R/O or DIR) */
|
|
| 2575 |
+ res = FR_DENIED; |
|
| 2576 |
+ } else {
|
|
| 2577 |
+ if (mode & FA_CREATE_NEW) /* Cannot create as new file */ |
|
| 2578 |
+ res = FR_EXIST; |
|
| 2579 |
+ } |
|
| 2580 |
+ } |
|
| 2581 |
+ if (res == FR_OK && (mode & FA_CREATE_ALWAYS)) { /* Truncate it if overwrite mode */
|
|
| 2582 |
+ dw = GET_FATTIME(); /* Created time */ |
|
| 2583 |
+ ST_DWORD(dir + DIR_CrtTime, dw); |
|
| 2584 |
+ dir[DIR_Attr] = 0; /* Reset attribute */ |
|
| 2585 |
+ ST_DWORD(dir + DIR_FileSize, 0);/* size = 0 */ |
|
| 2586 |
+ cl = ld_clust(dj.fs, dir); /* Get start cluster */ |
|
| 2587 |
+ st_clust(dir, 0); /* cluster = 0 */ |
|
| 2588 |
+ dj.fs->wflag = 1; |
|
| 2589 |
+ if (cl) { /* Remove the cluster chain if exist */
|
|
| 2590 |
+ dw = dj.fs->winsect; |
|
| 2591 |
+ res = remove_chain(dj.fs, cl); |
|
| 2592 |
+ if (res == FR_OK) {
|
|
| 2593 |
+ dj.fs->last_clust = cl - 1; /* Reuse the cluster hole */ |
|
| 2594 |
+ res = move_window(dj.fs, dw); |
|
| 2595 |
+ } |
|
| 2596 |
+ } |
|
| 2597 |
+ } |
|
| 2598 |
+ } |
|
| 2599 |
+ else { /* Open an existing file */
|
|
| 2600 |
+ if (res == FR_OK) { /* Follow succeeded */
|
|
| 2601 |
+ if (dir[DIR_Attr] & AM_DIR) { /* It is a directory */
|
|
| 2602 |
+ res = FR_NO_FILE; |
|
| 2603 |
+ } else {
|
|
| 2604 |
+ if ((mode & FA_WRITE) && (dir[DIR_Attr] & AM_RDO)) /* R/O violation */ |
|
| 2605 |
+ res = FR_DENIED; |
|
| 2606 |
+ } |
|
| 2607 |
+ } |
|
| 2608 |
+ } |
|
| 2609 |
+ if (res == FR_OK) {
|
|
| 2610 |
+ if (mode & FA_CREATE_ALWAYS) /* Set file change flag if created or overwritten */ |
|
| 2611 |
+ mode |= FA__WRITTEN; |
|
| 2612 |
+ fp->dir_sect = dj.fs->winsect; /* Pointer to the directory entry */ |
|
| 2613 |
+ fp->dir_ptr = dir; |
|
| 2614 |
+#if _FS_LOCK |
|
| 2615 |
+ fp->lockid = inc_lock(&dj, (mode & ~FA_READ) ? 1 : 0); |
|
| 2616 |
+ if (!fp->lockid) res = FR_INT_ERR; |
|
| 2617 |
+#endif |
|
| 2618 |
+ } |
|
| 2619 |
+ |
|
| 2620 |
+#else /* R/O configuration */ |
|
| 2621 |
+ if (res == FR_OK) { /* Follow succeeded */
|
|
| 2622 |
+ dir = dj.dir; |
|
| 2623 |
+ if (!dir) { /* Current directory itself */
|
|
| 2624 |
+ res = FR_INVALID_NAME; |
|
| 2625 |
+ } else {
|
|
| 2626 |
+ if (dir[DIR_Attr] & AM_DIR) /* It is a directory */ |
|
| 2627 |
+ res = FR_NO_FILE; |
|
| 2628 |
+ } |
|
| 2629 |
+ } |
|
| 2630 |
+#endif |
|
| 2631 |
+ FREE_BUF(); |
|
| 2632 |
+ |
|
| 2633 |
+ if (res == FR_OK) {
|
|
| 2634 |
+ fp->flag = mode; /* File access mode */ |
|
| 2635 |
+ fp->err = 0; /* Clear error flag */ |
|
| 2636 |
+ fp->sclust = ld_clust(dj.fs, dir); /* File start cluster */ |
|
| 2637 |
+ fp->fsize = LD_DWORD(dir + DIR_FileSize); /* File size */ |
|
| 2638 |
+ fp->fptr = 0; /* File pointer */ |
|
| 2639 |
+ fp->dsect = 0; |
|
| 2640 |
+#if _USE_FASTSEEK |
|
| 2641 |
+ fp->cltbl = 0; /* Normal seek mode */ |
|
| 2642 |
+#endif |
|
| 2643 |
+ fp->fs = dj.fs; /* Validate file object */ |
|
| 2644 |
+ fp->id = fp->fs->id; |
|
| 2645 |
+ } |
|
| 2646 |
+ } |
|
| 2647 |
+ |
|
| 2648 |
+ LEAVE_FF(dj.fs, res); |
|
| 2649 |
+} |
|
| 2650 |
+ |
|
| 2651 |
+ |
|
| 2652 |
+ |
|
| 2653 |
+ |
|
| 2654 |
+/*-----------------------------------------------------------------------*/ |
|
| 2655 |
+/* Read File */ |
|
| 2656 |
+/*-----------------------------------------------------------------------*/ |
|
| 2657 |
+ |
|
| 2658 |
+FRESULT f_read ( |
|
| 2659 |
+ FIL* fp, /* Pointer to the file object */ |
|
| 2660 |
+ void* buff, /* Pointer to data buffer */ |
|
| 2661 |
+ UINT btr, /* Number of bytes to read */ |
|
| 2662 |
+ UINT* br /* Pointer to number of bytes read */ |
|
| 2663 |
+) |
|
| 2664 |
+{
|
|
| 2665 |
+ FRESULT res; |
|
| 2666 |
+ DWORD clst, sect, remain; |
|
| 2667 |
+ UINT rcnt, cc; |
|
| 2668 |
+ BYTE csect, *rbuff = (BYTE*)buff; |
|
| 2669 |
+ |
|
| 2670 |
+ |
|
| 2671 |
+ *br = 0; /* Clear read byte counter */ |
|
| 2672 |
+ |
|
| 2673 |
+ res = validate(fp); /* Check validity */ |
|
| 2674 |
+ if (res != FR_OK) LEAVE_FF(fp->fs, res); |
|
| 2675 |
+ if (fp->err) /* Check error */ |
|
| 2676 |
+ LEAVE_FF(fp->fs, (FRESULT)fp->err); |
|
| 2677 |
+ if (!(fp->flag & FA_READ)) /* Check access mode */ |
|
| 2678 |
+ LEAVE_FF(fp->fs, FR_DENIED); |
|
| 2679 |
+ remain = fp->fsize - fp->fptr; |
|
| 2680 |
+ if (btr > remain) btr = (UINT)remain; /* Truncate btr by remaining bytes */ |
|
| 2681 |
+ |
|
| 2682 |
+ for ( ; btr; /* Repeat until all data read */ |
|
| 2683 |
+ rbuff += rcnt, fp->fptr += rcnt, *br += rcnt, btr -= rcnt) {
|
|
| 2684 |
+ if ((fp->fptr % SS(fp->fs)) == 0) { /* On the sector boundary? */
|
|
| 2685 |
+ csect = (BYTE)(fp->fptr / SS(fp->fs) & (fp->fs->csize - 1)); /* Sector offset in the cluster */ |
|
| 2686 |
+ if (!csect) { /* On the cluster boundary? */
|
|
| 2687 |
+ if (fp->fptr == 0) { /* On the top of the file? */
|
|
| 2688 |
+ clst = fp->sclust; /* Follow from the origin */ |
|
| 2689 |
+ } else { /* Middle or end of the file */
|
|
| 2690 |
+#if _USE_FASTSEEK |
|
| 2691 |
+ if (fp->cltbl) |
|
| 2692 |
+ clst = clmt_clust(fp, fp->fptr); /* Get cluster# from the CLMT */ |
|
| 2693 |
+ else |
|
| 2694 |
+#endif |
|
| 2695 |
+ clst = get_fat(fp->fs, fp->clust); /* Follow cluster chain on the FAT */ |
|
| 2696 |
+ } |
|
| 2697 |
+ if (clst < 2) ABORT(fp->fs, FR_INT_ERR); |
|
| 2698 |
+ if (clst == 0xFFFFFFFF) ABORT(fp->fs, FR_DISK_ERR); |
|
| 2699 |
+ fp->clust = clst; /* Update current cluster */ |
|
| 2700 |
+ } |
|
| 2701 |
+ sect = clust2sect(fp->fs, fp->clust); /* Get current sector */ |
|
| 2702 |
+ if (!sect) ABORT(fp->fs, FR_INT_ERR); |
|
| 2703 |
+ sect += csect; |
|
| 2704 |
+ cc = btr / SS(fp->fs); /* When remaining bytes >= sector size, */ |
|
| 2705 |
+ if (cc) { /* Read maximum contiguous sectors directly */
|
|
| 2706 |
+ if (csect + cc > fp->fs->csize) /* Clip at cluster boundary */ |
|
| 2707 |
+ cc = fp->fs->csize - csect; |
|
| 2708 |
+ if (disk_read(fp->fs->drv, rbuff, sect, cc) != RES_OK) |
|
| 2709 |
+ ABORT(fp->fs, FR_DISK_ERR); |
|
| 2710 |
+#if !_FS_READONLY && _FS_MINIMIZE <= 2 /* Replace one of the read sectors with cached data if it contains a dirty sector */ |
|
| 2711 |
+#if _FS_TINY |
|
| 2712 |
+ if (fp->fs->wflag && fp->fs->winsect - sect < cc) |
|
| 2713 |
+ mem_cpy(rbuff + ((fp->fs->winsect - sect) * SS(fp->fs)), fp->fs->win.d8, SS(fp->fs)); |
|
| 2714 |
+#else |
|
| 2715 |
+ if ((fp->flag & FA__DIRTY) && fp->dsect - sect < cc) |
|
| 2716 |
+ mem_cpy(rbuff + ((fp->dsect - sect) * SS(fp->fs)), fp->buf.d8, SS(fp->fs)); |
|
| 2717 |
+#endif |
|
| 2718 |
+#endif |
|
| 2719 |
+ rcnt = SS(fp->fs) * cc; /* Number of bytes transferred */ |
|
| 2720 |
+ continue; |
|
| 2721 |
+ } |
|
| 2722 |
+#if !_FS_TINY |
|
| 2723 |
+ if (fp->dsect != sect) { /* Load data sector if not in cache */
|
|
| 2724 |
+#if !_FS_READONLY |
|
| 2725 |
+ if (fp->flag & FA__DIRTY) { /* Write-back dirty sector cache */
|
|
| 2726 |
+ if (disk_write(fp->fs->drv, fp->buf.d8, fp->dsect, 1) != RES_OK) |
|
| 2727 |
+ ABORT(fp->fs, FR_DISK_ERR); |
|
| 2728 |
+ fp->flag &= ~FA__DIRTY; |
|
| 2729 |
+ } |
|
| 2730 |
+#endif |
|
| 2731 |
+ if (disk_read(fp->fs->drv, fp->buf.d8, sect, 1) != RES_OK) /* Fill sector cache */ |
|
| 2732 |
+ ABORT(fp->fs, FR_DISK_ERR); |
|
| 2733 |
+ } |
|
| 2734 |
+#endif |
|
| 2735 |
+ fp->dsect = sect; |
|
| 2736 |
+ } |
|
| 2737 |
+ rcnt = SS(fp->fs) - ((UINT)fp->fptr % SS(fp->fs)); /* Get partial sector data from sector buffer */ |
|
| 2738 |
+ if (rcnt > btr) rcnt = btr; |
|
| 2739 |
+#if _FS_TINY |
|
| 2740 |
+ if (move_window(fp->fs, fp->dsect) != FR_OK) /* Move sector window */ |
|
| 2741 |
+ ABORT(fp->fs, FR_DISK_ERR); |
|
| 2742 |
+ mem_cpy(rbuff, &fp->fs->win.d8[fp->fptr % SS(fp->fs)], rcnt); /* Pick partial sector */ |
|
| 2743 |
+#else |
|
| 2744 |
+ mem_cpy(rbuff, &fp->buf.d8[fp->fptr % SS(fp->fs)], rcnt); /* Pick partial sector */ |
|
| 2745 |
+#endif |
|
| 2746 |
+ } |
|
| 2747 |
+ |
|
| 2748 |
+ LEAVE_FF(fp->fs, FR_OK); |
|
| 2749 |
+} |
|
| 2750 |
+ |
|
| 2751 |
+ |
|
| 2752 |
+ |
|
| 2753 |
+ |
|
| 2754 |
+#if !_FS_READONLY |
|
| 2755 |
+/*-----------------------------------------------------------------------*/ |
|
| 2756 |
+/* Write File */ |
|
| 2757 |
+/*-----------------------------------------------------------------------*/ |
|
| 2758 |
+ |
|
| 2759 |
+FRESULT f_write ( |
|
| 2760 |
+ FIL* fp, /* Pointer to the file object */ |
|
| 2761 |
+ const void *buff, /* Pointer to the data to be written */ |
|
| 2762 |
+ UINT btw, /* Number of bytes to write */ |
|
| 2763 |
+ UINT* bw /* Pointer to number of bytes written */ |
|
| 2764 |
+) |
|
| 2765 |
+{
|
|
| 2766 |
+ FRESULT res; |
|
| 2767 |
+ DWORD clst, sect; |
|
| 2768 |
+ UINT wcnt, cc; |
|
| 2769 |
+ const BYTE *wbuff = (const BYTE*)buff; |
|
| 2770 |
+ BYTE csect; |
|
| 2771 |
+ |
|
| 2772 |
+ |
|
| 2773 |
+ *bw = 0; /* Clear write byte counter */ |
|
| 2774 |
+ |
|
| 2775 |
+ res = validate(fp); /* Check validity */ |
|
| 2776 |
+ if (res != FR_OK) LEAVE_FF(fp->fs, res); |
|
| 2777 |
+ if (fp->err) /* Check error */ |
|
| 2778 |
+ LEAVE_FF(fp->fs, (FRESULT)fp->err); |
|
| 2779 |
+ if (!(fp->flag & FA_WRITE)) /* Check access mode */ |
|
| 2780 |
+ LEAVE_FF(fp->fs, FR_DENIED); |
|
| 2781 |
+ if (fp->fptr + btw < fp->fptr) btw = 0; /* File size cannot reach 4GB */ |
|
| 2782 |
+ |
|
| 2783 |
+ for ( ; btw; /* Repeat until all data written */ |
|
| 2784 |
+ wbuff += wcnt, fp->fptr += wcnt, *bw += wcnt, btw -= wcnt) {
|
|
| 2785 |
+ if ((fp->fptr % SS(fp->fs)) == 0) { /* On the sector boundary? */
|
|
| 2786 |
+ csect = (BYTE)(fp->fptr / SS(fp->fs) & (fp->fs->csize - 1)); /* Sector offset in the cluster */ |
|
| 2787 |
+ if (!csect) { /* On the cluster boundary? */
|
|
| 2788 |
+ if (fp->fptr == 0) { /* On the top of the file? */
|
|
| 2789 |
+ clst = fp->sclust; /* Follow from the origin */ |
|
| 2790 |
+ if (clst == 0) /* When no cluster is allocated, */ |
|
| 2791 |
+ clst = create_chain(fp->fs, 0); /* Create a new cluster chain */ |
|
| 2792 |
+ } else { /* Middle or end of the file */
|
|
| 2793 |
+#if _USE_FASTSEEK |
|
| 2794 |
+ if (fp->cltbl) |
|
| 2795 |
+ clst = clmt_clust(fp, fp->fptr); /* Get cluster# from the CLMT */ |
|
| 2796 |
+ else |
|
| 2797 |
+#endif |
|
| 2798 |
+ clst = create_chain(fp->fs, fp->clust); /* Follow or stretch cluster chain on the FAT */ |
|
| 2799 |
+ } |
|
| 2800 |
+ if (clst == 0) break; /* Could not allocate a new cluster (disk full) */ |
|
| 2801 |
+ if (clst == 1) ABORT(fp->fs, FR_INT_ERR); |
|
| 2802 |
+ if (clst == 0xFFFFFFFF) ABORT(fp->fs, FR_DISK_ERR); |
|
| 2803 |
+ fp->clust = clst; /* Update current cluster */ |
|
| 2804 |
+ if (fp->sclust == 0) fp->sclust = clst; /* Set start cluster if the first write */ |
|
| 2805 |
+ } |
|
| 2806 |
+#if _FS_TINY |
|
| 2807 |
+ if (fp->fs->winsect == fp->dsect && sync_window(fp->fs)) /* Write-back sector cache */ |
|
| 2808 |
+ ABORT(fp->fs, FR_DISK_ERR); |
|
| 2809 |
+#else |
|
| 2810 |
+ if (fp->flag & FA__DIRTY) { /* Write-back sector cache */
|
|
| 2811 |
+ if (disk_write(fp->fs->drv, fp->buf.d8, fp->dsect, 1) != RES_OK) |
|
| 2812 |
+ ABORT(fp->fs, FR_DISK_ERR); |
|