No changes between revisions
/Designs/GPSRL02A/SW/ChangeLog
0,0 → 1,68
 
2007-12-13 sd-reader
* dual-license the major implementation modules under GPL and LGPL
 
2007-06-03 sd-reader
* Fix reading beyond cached block (by Benjamin Meier).
* Implement support for reading and writing file modification dates/times.
(Thanks to Torsten Seeboth for testing.)
 
2007-03-01 sd-reader
* Avoid LFN directory entries for the "." and ".." directory references.
This prevented Windows from deleting directories.
* Handle special case where the 8.3 filename begins with 0xe5.
* Fix return value of fat16_delete_file() when deleting empty files.
* Fix fat16_clear_cluster() which was zeroing only 16 of every 32 bytes.
 
2007-01-20 sd-reader
* fix directory creation
- correctly create "." and ".." directory entries (8.3 <-> lfn versions)
- correctly clear cluster containing the directory entries for new directory
 
2006-11-01 sd-reader
* Implement creation and deletion of directories.
* Clear the directory entries of new directory clusters.
* Prevent linkage against printf().
* Make the use of malloc()/free() optional.
 
2006-09-01 sd-reader
* Fix shortening files.
* Fix free disk space calculation.
 
2006-08-24 sd-reader
* Improve sleep handling.
* Display extended card information on boot and
when executing the "disk" shell command.
* Correctly determine FAT type by cluster count.
* Fix cluster allocation beyond card capacity.
 
2006-08-16 sd-reader
* Provide FAT16 capacity and usage information.
* Implement the backspace key in the mini shell.
* Enter idle mode when waiting for uart activity.
* Make the Card Select pin MCU dependent as well.
* Add mini shell commands to documentation.
 
2006-08-08 sd-reader
* Thanks go to Torsten Seeboth for his ongoing efforts
to test changes, fix regressions and give suggestions.
Many of the changes below were initiated by him.
* Much more reliable card initialization.
* Highly improved performance
- optional write buffering
- better cluster handling
- remove unneeded SPI access when reading from buffered block
- use highest spi frequency after card initialization
* Add superfloppy support.
* Better checks when opening a FAT16 filesystem.
* Provide SPI pin mappings for commonly used ATmegas.
* Fix resizing files, hangs could occur.
* Fix overflow when creating files with names longer than 31 characters.
* Fix numerous other small things.
 
2006-03-19 sd-reader
* Fix speed regressions.
 
2006-03-16 sd-reader
* Initial release.
 
/Designs/GPSRL02A/SW/Doxyfile
0,0 → 1,1311
# Doxyfile 1.5.3-20071008
 
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project
#
# All text after a hash (#) is considered a comment and will be ignored
# The format is:
# TAG = value [value, ...]
# For lists items can also be appended using:
# TAG += value [value, ...]
# Values that contain spaces should be placed between quotes (" ")
 
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
 
# This tag specifies the encoding used for all characters in the config file that
# follow. The default is UTF-8 which is also the encoding used for all text before
# the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into
# libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of
# possible encodings.
 
DOXYFILE_ENCODING = UTF-8
 
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
# by quotes) that should identify the project.
 
PROJECT_NAME = sd-reader
 
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
# This could be handy for archiving the generated documentation or
# if some version control system is used.
 
PROJECT_NUMBER =
 
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
# If a relative path is entered, it will be relative to the location
# where doxygen was started. If left blank the current directory will be used.
 
OUTPUT_DIRECTORY = doc
 
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
# 4096 sub-directories (in 2 levels) under the output directory of each output
# format and will distribute the generated files over these directories.
# Enabling this option can be useful when feeding doxygen a huge amount of
# source files, where putting all generated files in the same directory would
# otherwise cause performance problems for the file system.
 
CREATE_SUBDIRS = NO
 
# The OUTPUT_LANGUAGE tag is used to specify the language in which all
# documentation generated by doxygen is written. Doxygen will use this
# information to generate all constant output in the proper language.
# The default language is English, other supported languages are:
# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian,
# Italian, Japanese, Japanese-en (Japanese with English messages), Korean,
# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian,
# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
 
OUTPUT_LANGUAGE = English
 
# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
# include brief member descriptions after the members that are listed in
# the file and class documentation (similar to JavaDoc).
# Set to NO to disable this.
 
BRIEF_MEMBER_DESC = YES
 
# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
# the brief description of a member or function before the detailed description.
# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
# brief descriptions will be completely suppressed.
 
REPEAT_BRIEF = YES
 
# This tag implements a quasi-intelligent brief description abbreviator
# that is used to form the text in various listings. Each string
# in this list, if found as the leading text of the brief description, will be
# stripped from the text and the result after processing the whole list, is
# used as the annotated text. Otherwise, the brief description is used as-is.
# If left blank, the following values are used ("$name" is automatically
# replaced with the name of the entity): "The $name class" "The $name widget"
# "The $name file" "is" "provides" "specifies" "contains"
# "represents" "a" "an" "the"
 
ABBREVIATE_BRIEF = "The $name class " \
"The $name widget " \
"The $name file " \
is \
provides \
specifies \
contains \
represents \
a \
an \
the
 
# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
# Doxygen will generate a detailed section even if there is only a brief
# description.
 
ALWAYS_DETAILED_SEC = NO
 
# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
# inherited members of a class in the documentation of that class as if those
# members were ordinary class members. Constructors, destructors and assignment
# operators of the base classes will not be shown.
 
INLINE_INHERITED_MEMB = NO
 
# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
# path before files name in the file list and in the header files. If set
# to NO the shortest path that makes the file name unique will be used.
 
FULL_PATH_NAMES = NO
 
# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
# can be used to strip a user-defined part of the path. Stripping is
# only done if one of the specified strings matches the left-hand part of
# the path. The tag can be used to show relative paths in the file list.
# If left blank the directory from which doxygen is run is used as the
# path to strip.
 
STRIP_FROM_PATH =
 
# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
# the path mentioned in the documentation of a class, which tells
# the reader which header file to include in order to use a class.
# If left blank only the name of the header file containing the class
# definition is used. Otherwise one should specify the include paths that
# are normally passed to the compiler using the -I flag.
 
STRIP_FROM_INC_PATH =
 
# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
# (but less readable) file names. This can be useful is your file systems
# doesn't support long names like on DOS, Mac, or CD-ROM.
 
SHORT_NAMES = NO
 
# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
# will interpret the first line (until the first dot) of a JavaDoc-style
# comment as the brief description. If set to NO, the JavaDoc
# comments will behave just like regular Qt-style comments
# (thus requiring an explicit @brief command for a brief description.)
 
JAVADOC_AUTOBRIEF = YES
 
# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
# interpret the first line (until the first dot) of a Qt-style
# comment as the brief description. If set to NO, the comments
# will behave just like regular Qt-style comments (thus requiring
# an explicit \brief command for a brief description.)
 
QT_AUTOBRIEF = NO
 
# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
# treat a multi-line C++ special comment block (i.e. a block of //! or ///
# comments) as a brief description. This used to be the default behaviour.
# The new default is to treat a multi-line C++ comment block as a detailed
# description. Set this tag to YES if you prefer the old behaviour instead.
 
MULTILINE_CPP_IS_BRIEF = NO
 
# If the DETAILS_AT_TOP tag is set to YES then Doxygen
# will output the detailed description near the top, like JavaDoc.
# If set to NO, the detailed description appears after the member
# documentation.
 
DETAILS_AT_TOP = YES
 
# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
# member inherits the documentation from any documented member that it
# re-implements.
 
INHERIT_DOCS = YES
 
# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
# a new page for each member. If set to NO, the documentation of a member will
# be part of the file/class/namespace that contains it.
 
SEPARATE_MEMBER_PAGES = NO
 
# The TAB_SIZE tag can be used to set the number of spaces in a tab.
# Doxygen uses this value to replace tabs by spaces in code fragments.
 
TAB_SIZE = 4
 
# This tag can be used to specify a number of aliases that acts
# as commands in the documentation. An alias has the form "name=value".
# For example adding "sideeffect=\par Side Effects:\n" will allow you to
# put the command \sideeffect (or @sideeffect) in the documentation, which
# will result in a user-defined paragraph with heading "Side Effects:".
# You can put \n's in the value part of an alias to insert newlines.
 
ALIASES =
 
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
# sources only. Doxygen will then generate output that is more tailored for C.
# For instance, some of the names that are used will be different. The list
# of all members will be omitted, etc.
 
OPTIMIZE_OUTPUT_FOR_C = YES
 
# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
# sources only. Doxygen will then generate output that is more tailored for Java.
# For instance, namespaces will be presented as packages, qualified scopes
# will look different, etc.
 
OPTIMIZE_OUTPUT_JAVA = NO
 
# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to
# include (a tag file for) the STL sources as input, then you should
# set this tag to YES in order to let doxygen match functions declarations and
# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
# func(std::string) {}). This also make the inheritance and collaboration
# diagrams that involve STL classes more complete and accurate.
 
BUILTIN_STL_SUPPORT = NO
 
# If you use Microsoft's C++/CLI language, you should set this option to YES to
# enable parsing support.
 
CPP_CLI_SUPPORT = NO
 
# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
# Doxygen will parse them like normal C++ but will assume all classes use public
# instead of private inheritance when no explicit protection keyword is present.
 
SIP_SUPPORT = NO
 
# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
# tag is set to YES, then doxygen will reuse the documentation of the first
# member in the group (if any) for the other members of the group. By default
# all members of a group must be documented explicitly.
 
DISTRIBUTE_GROUP_DOC = NO
 
# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
# the same type (for instance a group of public functions) to be put as a
# subgroup of that type (e.g. under the Public Functions section). Set it to
# NO to prevent subgrouping. Alternatively, this can be done per class using
# the \nosubgrouping command.
 
SUBGROUPING = YES
 
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
 
# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
# documentation are documented, even if no documentation was available.
# Private class members and static file members will be hidden unless
# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
 
EXTRACT_ALL = NO
 
# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
# will be included in the documentation.
 
EXTRACT_PRIVATE = NO
 
# If the EXTRACT_STATIC tag is set to YES all static members of a file
# will be included in the documentation.
 
EXTRACT_STATIC = NO
 
# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
# defined locally in source files will be included in the documentation.
# If set to NO only classes defined in header files are included.
 
EXTRACT_LOCAL_CLASSES = YES
 
# This flag is only useful for Objective-C code. When set to YES local
# methods, which are defined in the implementation section but not in
# the interface are included in the documentation.
# If set to NO (the default) only methods in the interface are included.
 
EXTRACT_LOCAL_METHODS = NO
 
# If this flag is set to YES, the members of anonymous namespaces will be extracted
# and appear in the documentation as a namespace called 'anonymous_namespace{file}',
# where file will be replaced with the base name of the file that contains the anonymous
# namespace. By default anonymous namespace are hidden.
 
EXTRACT_ANON_NSPACES = NO
 
# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
# undocumented members of documented classes, files or namespaces.
# If set to NO (the default) these members will be included in the
# various overviews, but no documentation section is generated.
# This option has no effect if EXTRACT_ALL is enabled.
 
HIDE_UNDOC_MEMBERS = YES
 
# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
# undocumented classes that are normally visible in the class hierarchy.
# If set to NO (the default) these classes will be included in the various
# overviews. This option has no effect if EXTRACT_ALL is enabled.
 
HIDE_UNDOC_CLASSES = YES
 
# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
# friend (class|struct|union) declarations.
# If set to NO (the default) these declarations will be included in the
# documentation.
 
HIDE_FRIEND_COMPOUNDS = NO
 
# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
# documentation blocks found inside the body of a function.
# If set to NO (the default) these blocks will be appended to the
# function's detailed documentation block.
 
HIDE_IN_BODY_DOCS = NO
 
# The INTERNAL_DOCS tag determines if documentation
# that is typed after a \internal command is included. If the tag is set
# to NO (the default) then the documentation will be excluded.
# Set it to YES to include the internal documentation.
 
INTERNAL_DOCS = NO
 
# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
# file names in lower-case letters. If set to YES upper-case letters are also
# allowed. This is useful if you have classes or files whose names only differ
# in case and if your file system supports case sensitive file names. Windows
# and Mac users are advised to set this option to NO.
 
CASE_SENSE_NAMES = YES
 
# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
# will show members with their full class and namespace scopes in the
# documentation. If set to YES the scope will be hidden.
 
HIDE_SCOPE_NAMES = NO
 
# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
# will put a list of the files that are included by a file in the documentation
# of that file.
 
SHOW_INCLUDE_FILES = NO
 
# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
# is inserted in the documentation for inline members.
 
INLINE_INFO = YES
 
# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
# will sort the (detailed) documentation of file and class members
# alphabetically by member name. If set to NO the members will appear in
# declaration order.
 
SORT_MEMBER_DOCS = YES
 
# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
# brief documentation of file, namespace and class members alphabetically
# by member name. If set to NO (the default) the members will appear in
# declaration order.
 
SORT_BRIEF_DOCS = NO
 
# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
# sorted by fully-qualified names, including namespaces. If set to
# NO (the default), the class list will be sorted only by class name,
# not including the namespace part.
# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
# Note: This option applies only to the class list, not to the
# alphabetical list.
 
SORT_BY_SCOPE_NAME = NO
 
# The GENERATE_TODOLIST tag can be used to enable (YES) or
# disable (NO) the todo list. This list is created by putting \todo
# commands in the documentation.
 
GENERATE_TODOLIST = YES
 
# The GENERATE_TESTLIST tag can be used to enable (YES) or
# disable (NO) the test list. This list is created by putting \test
# commands in the documentation.
 
GENERATE_TESTLIST = YES
 
# The GENERATE_BUGLIST tag can be used to enable (YES) or
# disable (NO) the bug list. This list is created by putting \bug
# commands in the documentation.
 
GENERATE_BUGLIST = YES
 
# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
# disable (NO) the deprecated list. This list is created by putting
# \deprecated commands in the documentation.
 
GENERATE_DEPRECATEDLIST= YES
 
# The ENABLED_SECTIONS tag can be used to enable conditional
# documentation sections, marked by \if sectionname ... \endif.
 
ENABLED_SECTIONS =
 
# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
# the initial value of a variable or define consists of for it to appear in
# the documentation. If the initializer consists of more lines than specified
# here it will be hidden. Use a value of 0 to hide initializers completely.
# The appearance of the initializer of individual variables and defines in the
# documentation can be controlled using \showinitializer or \hideinitializer
# command in the documentation regardless of this setting.
 
MAX_INITIALIZER_LINES = 0
 
# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
# at the bottom of the documentation of classes and structs. If set to YES the
# list will mention the files that were used to generate the documentation.
 
SHOW_USED_FILES = NO
 
# If the sources in your project are distributed over multiple directories
# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
# in the documentation. The default is NO.
 
SHOW_DIRECTORIES = NO
 
# The FILE_VERSION_FILTER tag can be used to specify a program or script that
# doxygen should invoke to get the current version for each file (typically from the
# version control system). Doxygen will invoke the program by executing (via
# popen()) the command <command> <input-file>, where <command> is the value of
# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
# provided by doxygen. Whatever the program writes to standard output
# is used as the file version. See the manual for examples.
 
FILE_VERSION_FILTER =
 
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
 
# The QUIET tag can be used to turn on/off the messages that are generated
# by doxygen. Possible values are YES and NO. If left blank NO is used.
 
QUIET = NO
 
# The WARNINGS tag can be used to turn on/off the warning messages that are
# generated by doxygen. Possible values are YES and NO. If left blank
# NO is used.
 
WARNINGS = YES
 
# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
# automatically be disabled.
 
WARN_IF_UNDOCUMENTED = NO
 
# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
# potential errors in the documentation, such as not documenting some
# parameters in a documented function, or documenting parameters that
# don't exist or using markup commands wrongly.
 
WARN_IF_DOC_ERROR = YES
 
# This WARN_NO_PARAMDOC option can be abled to get warnings for
# functions that are documented, but have no documentation for their parameters
# or return value. If set to NO (the default) doxygen will only warn about
# wrong or incomplete parameter documentation, but not about the absence of
# documentation.
 
WARN_NO_PARAMDOC = NO
 
# The WARN_FORMAT tag determines the format of the warning messages that
# doxygen can produce. The string should contain the $file, $line, and $text
# tags, which will be replaced by the file and line number from which the
# warning originated and the warning text. Optionally the format may contain
# $version, which will be replaced by the version of the file (if it could
# be obtained via FILE_VERSION_FILTER)
 
WARN_FORMAT = "$file:$line: $text "
 
# The WARN_LOGFILE tag can be used to specify a file to which warning
# and error messages should be written. If left blank the output is written
# to stderr.
 
WARN_LOGFILE =
 
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
 
# The INPUT tag can be used to specify the files and/or directories that contain
# documented source files. You may enter file names like "myfile.cpp" or
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
 
INPUT = .
 
# This tag can be used to specify the character encoding of the source files that
# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default
# input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding.
# See http://www.gnu.org/software/libiconv for the list of possible encodings.
 
INPUT_ENCODING = UTF-8
 
# If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
# and *.h) to filter out the source-files in the directories. If left
# blank the following patterns are tested:
# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py
 
FILE_PATTERNS = *.c \
*.h
 
# The RECURSIVE tag can be used to turn specify whether or not subdirectories
# should be searched for input files as well. Possible values are YES and NO.
# If left blank NO is used.
 
RECURSIVE = NO
 
# The EXCLUDE tag can be used to specify files and/or directories that should
# excluded from the INPUT source files. This way you can easily exclude a
# subdirectory from a directory tree whose root is specified with the INPUT tag.
 
EXCLUDE =
 
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
# directories that are symbolic links (a Unix filesystem feature) are excluded
# from the input.
 
EXCLUDE_SYMLINKS = NO
 
# If the value of the INPUT tag contains directories, you can use the
# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
# certain files from those directories. Note that the wildcards are matched
# against the file with absolute path, so to exclude all test directories
# for example use the pattern */test/*
 
EXCLUDE_PATTERNS =
 
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
# (namespaces, classes, functions, etc.) that should be excluded from the output.
# The symbol name can be a fully qualified name, a word, or if the wildcard * is used,
# a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test
 
EXCLUDE_SYMBOLS =
 
# The EXAMPLE_PATH tag can be used to specify one or more files or
# directories that contain example code fragments that are included (see
# the \include command).
 
EXAMPLE_PATH =
 
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
# and *.h) to filter out the source-files in the directories. If left
# blank all files are included.
 
EXAMPLE_PATTERNS = *
 
# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
# searched for input files to be used with the \include or \dontinclude
# commands irrespective of the value of the RECURSIVE tag.
# Possible values are YES and NO. If left blank NO is used.
 
EXAMPLE_RECURSIVE = NO
 
# The IMAGE_PATH tag can be used to specify one or more files or
# directories that contain image that are included in the documentation (see
# the \image command).
 
IMAGE_PATH = doc
 
# The INPUT_FILTER tag can be used to specify a program that doxygen should
# invoke to filter for each input file. Doxygen will invoke the filter program
# by executing (via popen()) the command <filter> <input-file>, where <filter>
# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
# input file. Doxygen will then use the output that the filter program writes
# to standard output. If FILTER_PATTERNS is specified, this tag will be
# ignored.
 
INPUT_FILTER =
 
# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
# basis. Doxygen will compare the file name with each pattern and apply the
# filter if there is a match. The filters are a list of the form:
# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
# is applied to all files.
 
FILTER_PATTERNS =
 
# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
# INPUT_FILTER) will be used to filter the input files when producing source
# files to browse (i.e. when SOURCE_BROWSER is set to YES).
 
FILTER_SOURCE_FILES = NO
 
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
 
# If the SOURCE_BROWSER tag is set to YES then a list of source files will
# be generated. Documented entities will be cross-referenced with these sources.
# Note: To get rid of all source code in the generated output, make sure also
# VERBATIM_HEADERS is set to NO. If you have enabled CALL_GRAPH or CALLER_GRAPH
# then you must also enable this option. If you don't then doxygen will produce
# a warning and turn it on anyway
 
SOURCE_BROWSER = NO
 
# Setting the INLINE_SOURCES tag to YES will include the body
# of functions and classes directly in the documentation.
 
INLINE_SOURCES = NO
 
# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
# doxygen to hide any special comment blocks from generated source code
# fragments. Normal C and C++ comments will always remain visible.
 
STRIP_CODE_COMMENTS = YES
 
# If the REFERENCED_BY_RELATION tag is set to YES (the default)
# then for each documented function all documented
# functions referencing it will be listed.
 
REFERENCED_BY_RELATION = NO
 
# If the REFERENCES_RELATION tag is set to YES (the default)
# then for each documented function all documented entities
# called/used by that function will be listed.
 
REFERENCES_RELATION = NO
 
# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
# link to the source code. Otherwise they will link to the documentstion.
 
REFERENCES_LINK_SOURCE = YES
 
# If the USE_HTAGS tag is set to YES then the references to source code
# will point to the HTML generated by the htags(1) tool instead of doxygen
# built-in source browser. The htags tool is part of GNU's global source
# tagging system (see http://www.gnu.org/software/global/global.html). You
# will need version 4.8.6 or higher.
 
USE_HTAGS = NO
 
# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
# will generate a verbatim copy of the header file for each class for
# which an include is specified. Set to NO to disable this.
 
VERBATIM_HEADERS = NO
 
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
 
# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
# of all compounds will be generated. Enable this if the project
# contains a lot of classes, structs, unions or interfaces.
 
ALPHABETICAL_INDEX = NO
 
# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
# in which this list will be split (can be a number in the range [1..20])
 
COLS_IN_ALPHA_INDEX = 5
 
# In case all classes in a project start with a common prefix, all
# classes will be put under the same header in the alphabetical index.
# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
# should be ignored while generating the index headers.
 
IGNORE_PREFIX =
 
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
 
# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
# generate HTML output.
 
GENERATE_HTML = YES
 
# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `html' will be used as the default path.
 
HTML_OUTPUT = html
 
# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
# doxygen will generate files with .html extension.
 
HTML_FILE_EXTENSION = .html
 
# The HTML_HEADER tag can be used to specify a personal HTML header for
# each generated HTML page. If it is left blank doxygen will generate a
# standard header.
 
HTML_HEADER =
 
# The HTML_FOOTER tag can be used to specify a personal HTML footer for
# each generated HTML page. If it is left blank doxygen will generate a
# standard footer.
 
HTML_FOOTER =
 
# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
# style sheet that is used by each HTML page. It can be used to
# fine-tune the look of the HTML output. If the tag is left blank doxygen
# will generate a default style sheet. Note that doxygen will try to copy
# the style sheet file to the HTML output directory, so don't put your own
# stylesheet in the HTML output directory as well, or it will be erased!
 
HTML_STYLESHEET =
 
# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
# files or namespaces will be aligned in HTML using tables. If set to
# NO a bullet list will be used.
 
HTML_ALIGN_MEMBERS = YES
 
# If the GENERATE_HTMLHELP tag is set to YES, additional index files
# will be generated that can be used as input for tools like the
# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
# of the generated HTML documentation.
 
GENERATE_HTMLHELP = NO
 
# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
# documentation will contain sections that can be hidden and shown after the
# page has loaded. For this to work a browser that supports
# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
 
HTML_DYNAMIC_SECTIONS = NO
 
# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
# be used to specify the file name of the resulting .chm file. You
# can add a path in front of the file if the result should not be
# written to the html output directory.
 
CHM_FILE =
 
# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
# be used to specify the location (absolute path including file name) of
# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
# the HTML help compiler on the generated index.hhp.
 
HHC_LOCATION =
 
# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
# controls if a separate .chi index file is generated (YES) or that
# it should be included in the master .chm file (NO).
 
GENERATE_CHI = NO
 
# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
# controls whether a binary table of contents is generated (YES) or a
# normal table of contents (NO) in the .chm file.
 
BINARY_TOC = NO
 
# The TOC_EXPAND flag can be set to YES to add extra items for group members
# to the contents of the HTML help documentation and to the tree view.
 
TOC_EXPAND = NO
 
# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
# top of each HTML page. The value NO (the default) enables the index and
# the value YES disables it.
 
DISABLE_INDEX = NO
 
# This tag can be used to set the number of enum values (range [1..20])
# that doxygen will group on one line in the generated HTML documentation.
 
ENUM_VALUES_PER_LINE = 4
 
# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
# generated containing a tree-like index structure (just like the one that
# is generated for HTML Help). For this to work a browser that supports
# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
# probably better off using the HTML help feature.
 
GENERATE_TREEVIEW = NO
 
# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
# used to set the initial width (in pixels) of the frame in which the tree
# is shown.
 
TREEVIEW_WIDTH = 250
 
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
 
# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
# generate Latex output.
 
GENERATE_LATEX = NO
 
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `latex' will be used as the default path.
 
LATEX_OUTPUT = latex
 
# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
# invoked. If left blank `latex' will be used as the default command name.
 
LATEX_CMD_NAME = latex
 
# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
# generate index for LaTeX. If left blank `makeindex' will be used as the
# default command name.
 
MAKEINDEX_CMD_NAME = makeindex
 
# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
# LaTeX documents. This may be useful for small projects and may help to
# save some trees in general.
 
COMPACT_LATEX = NO
 
# The PAPER_TYPE tag can be used to set the paper type that is used
# by the printer. Possible values are: a4, a4wide, letter, legal and
# executive. If left blank a4wide will be used.
 
PAPER_TYPE = a4wide
 
# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
# packages that should be included in the LaTeX output.
 
EXTRA_PACKAGES =
 
# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
# the generated latex document. The header should contain everything until
# the first chapter. If it is left blank doxygen will generate a
# standard header. Notice: only use this tag if you know what you are doing!
 
LATEX_HEADER =
 
# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
# is prepared for conversion to pdf (using ps2pdf). The pdf file will
# contain links (just like the HTML output) instead of page references
# This makes the output suitable for online browsing using a pdf viewer.
 
PDF_HYPERLINKS = NO
 
# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
# plain latex in the generated Makefile. Set this option to YES to get a
# higher quality PDF documentation.
 
USE_PDFLATEX = NO
 
# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
# command to the generated LaTeX files. This will instruct LaTeX to keep
# running if errors occur, instead of asking the user for help.
# This option is also used when generating formulas in HTML.
 
LATEX_BATCHMODE = NO
 
# If LATEX_HIDE_INDICES is set to YES then doxygen will not
# include the index chapters (such as File Index, Compound Index, etc.)
# in the output.
 
LATEX_HIDE_INDICES = NO
 
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
 
# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
# The RTF output is optimized for Word 97 and may not look very pretty with
# other RTF readers or editors.
 
GENERATE_RTF = NO
 
# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `rtf' will be used as the default path.
 
RTF_OUTPUT = rtf
 
# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
# RTF documents. This may be useful for small projects and may help to
# save some trees in general.
 
COMPACT_RTF = NO
 
# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
# will contain hyperlink fields. The RTF file will
# contain links (just like the HTML output) instead of page references.
# This makes the output suitable for online browsing using WORD or other
# programs which support those fields.
# Note: wordpad (write) and others do not support links.
 
RTF_HYPERLINKS = NO
 
# Load stylesheet definitions from file. Syntax is similar to doxygen's
# config file, i.e. a series of assignments. You only have to provide
# replacements, missing definitions are set to their default value.
 
RTF_STYLESHEET_FILE =
 
# Set optional variables used in the generation of an rtf document.
# Syntax is similar to doxygen's config file.
 
RTF_EXTENSIONS_FILE =
 
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
 
# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
# generate man pages
 
GENERATE_MAN = NO
 
# The MAN_OUTPUT tag is used to specify where the man pages will be put.
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `man' will be used as the default path.
 
MAN_OUTPUT = man
 
# The MAN_EXTENSION tag determines the extension that is added to
# the generated man pages (default is the subroutine's section .3)
 
MAN_EXTENSION = .3
 
# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
# then it will generate one additional man file for each entity
# documented in the real man page(s). These additional files
# only source the real man page, but without them the man command
# would be unable to find the correct page. The default is NO.
 
MAN_LINKS = NO
 
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
 
# If the GENERATE_XML tag is set to YES Doxygen will
# generate an XML file that captures the structure of
# the code including all documentation.
 
GENERATE_XML = NO
 
# The XML_OUTPUT tag is used to specify where the XML pages will be put.
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `xml' will be used as the default path.
 
XML_OUTPUT = xml
 
# The XML_SCHEMA tag can be used to specify an XML schema,
# which can be used by a validating XML parser to check the
# syntax of the XML files.
 
XML_SCHEMA =
 
# The XML_DTD tag can be used to specify an XML DTD,
# which can be used by a validating XML parser to check the
# syntax of the XML files.
 
XML_DTD =
 
# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
# dump the program listings (including syntax highlighting
# and cross-referencing information) to the XML output. Note that
# enabling this will significantly increase the size of the XML output.
 
XML_PROGRAMLISTING = YES
 
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
 
# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
# generate an AutoGen Definitions (see autogen.sf.net) file
# that captures the structure of the code including all
# documentation. Note that this feature is still experimental
# and incomplete at the moment.
 
GENERATE_AUTOGEN_DEF = NO
 
#---------------------------------------------------------------------------
# configuration options related to the Perl module output
#---------------------------------------------------------------------------
 
# If the GENERATE_PERLMOD tag is set to YES Doxygen will
# generate a Perl module file that captures the structure of
# the code including all documentation. Note that this
# feature is still experimental and incomplete at the
# moment.
 
GENERATE_PERLMOD = NO
 
# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
# the necessary Makefile rules, Perl scripts and LaTeX code to be able
# to generate PDF and DVI output from the Perl module output.
 
PERLMOD_LATEX = NO
 
# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
# nicely formatted so it can be parsed by a human reader. This is useful
# if you want to understand what is going on. On the other hand, if this
# tag is set to NO the size of the Perl module output will be much smaller
# and Perl will parse it just the same.
 
PERLMOD_PRETTY = YES
 
# The names of the make variables in the generated doxyrules.make file
# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
# This is useful so different doxyrules.make files included by the same
# Makefile don't overwrite each other's variables.
 
PERLMOD_MAKEVAR_PREFIX =
 
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
 
# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
# evaluate all C-preprocessor directives found in the sources and include
# files.
 
ENABLE_PREPROCESSING = YES
 
# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
# names in the source code. If set to NO (the default) only conditional
# compilation will be performed. Macro expansion can be done in a controlled
# way by setting EXPAND_ONLY_PREDEF to YES.
 
MACRO_EXPANSION = NO
 
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
# then the macro expansion is limited to the macros specified with the
# PREDEFINED and EXPAND_AS_DEFINED tags.
 
EXPAND_ONLY_PREDEF = NO
 
# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
# in the INCLUDE_PATH (see below) will be search if a #include is found.
 
SEARCH_INCLUDES = YES
 
# The INCLUDE_PATH tag can be used to specify one or more directories that
# contain include files that are not input files but should be processed by
# the preprocessor.
 
INCLUDE_PATH =
 
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
# patterns (like *.h and *.hpp) to filter out the header-files in the
# directories. If left blank, the patterns specified with FILE_PATTERNS will
# be used.
 
INCLUDE_FILE_PATTERNS =
 
# The PREDEFINED tag can be used to specify one or more macro names that
# are defined before the preprocessor is started (similar to the -D option of
# gcc). The argument of the tag is a list of macros of the form: name
# or name=definition (no spaces). If the definition and the = are
# omitted =1 is assumed. To prevent a macro definition from being
# undefined via #undef or recursively expanded use the := operator
# instead of the = operator.
 
PREDEFINED = DOXYGEN=1
 
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
# this tag can be used to specify a list of macro names that should be expanded.
# The macro definition that is found in the sources will be used.
# Use the PREDEFINED tag if you want to use a different macro definition.
 
EXPAND_AS_DEFINED =
 
# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
# doxygen's preprocessor will remove all function-like macros that are alone
# on a line, have an all uppercase name, and do not end with a semicolon. Such
# function macros are typically used for boiler-plate code, and will confuse
# the parser if not removed.
 
SKIP_FUNCTION_MACROS = YES
 
#---------------------------------------------------------------------------
# Configuration::additions related to external references
#---------------------------------------------------------------------------
 
# The TAGFILES option can be used to specify one or more tagfiles.
# Optionally an initial location of the external documentation
# can be added for each tagfile. The format of a tag file without
# this location is as follows:
# TAGFILES = file1 file2 ...
# Adding location for the tag files is done as follows:
# TAGFILES = file1=loc1 "file2 = loc2" ...
# where "loc1" and "loc2" can be relative or absolute paths or
# URLs. If a location is present for each tag, the installdox tool
# does not have to be run to correct the links.
# Note that each tag file must have a unique name
# (where the name does NOT include the path)
# If a tag file is not located in the directory in which doxygen
# is run, you must also specify the path to the tagfile here.
 
TAGFILES =
 
# When a file name is specified after GENERATE_TAGFILE, doxygen will create
# a tag file that is based on the input files it reads.
 
GENERATE_TAGFILE =
 
# If the ALLEXTERNALS tag is set to YES all external classes will be listed
# in the class index. If set to NO only the inherited external classes
# will be listed.
 
ALLEXTERNALS = NO
 
# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
# in the modules index. If set to NO, only the current project's groups will
# be listed.
 
EXTERNAL_GROUPS = YES
 
# The PERL_PATH should be the absolute path and name of the perl script
# interpreter (i.e. the result of `which perl').
 
PERL_PATH = /usr/bin/perl
 
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
 
# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
# or super classes. Setting the tag to NO turns the diagrams off. Note that
# this option is superseded by the HAVE_DOT option below. This is only a
# fallback. It is recommended to install and use dot, since it yields more
# powerful graphs.
 
CLASS_DIAGRAMS = YES
 
# You can define message sequence charts within doxygen comments using the \msc
# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to
# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to
# specify the directory where the mscgen tool resides. If left empty the tool is assumed to
# be found in the default search path.
 
MSCGEN_PATH =
 
# If set to YES, the inheritance and collaboration graphs will hide
# inheritance and usage relations if the target is undocumented
# or is not a class.
 
HIDE_UNDOC_RELATIONS = YES
 
# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
# available from the path. This tool is part of Graphviz, a graph visualization
# toolkit from AT&T and Lucent Bell Labs. The other options in this section
# have no effect if this option is set to NO (the default)
 
HAVE_DOT = NO
 
# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
# will generate a graph for each documented class showing the direct and
# indirect inheritance relations. Setting this tag to YES will force the
# the CLASS_DIAGRAMS tag to NO.
 
CLASS_GRAPH = YES
 
# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
# will generate a graph for each documented class showing the direct and
# indirect implementation dependencies (inheritance, containment, and
# class references variables) of the class with other documented classes.
 
COLLABORATION_GRAPH = YES
 
# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
# will generate a graph for groups, showing the direct groups dependencies
 
GROUP_GRAPHS = YES
 
# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
# collaboration diagrams in a style similar to the OMG's Unified Modeling
# Language.
 
UML_LOOK = NO
 
# If set to YES, the inheritance and collaboration graphs will show the
# relations between templates and their instances.
 
TEMPLATE_RELATIONS = NO
 
# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
# tags are set to YES then doxygen will generate a graph for each documented
# file showing the direct and indirect include dependencies of the file with
# other documented files.
 
INCLUDE_GRAPH = YES
 
# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
# documented header file showing the documented files that directly or
# indirectly include this file.
 
INCLUDED_BY_GRAPH = YES
 
# If the CALL_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will
# generate a call dependency graph for every global function or class method.
# Note that enabling this option will significantly increase the time of a run.
# So in most cases it will be better to enable call graphs for selected
# functions only using the \callgraph command.
 
CALL_GRAPH = NO
 
# If the CALLER_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will
# generate a caller dependency graph for every global function or class method.
# Note that enabling this option will significantly increase the time of a run.
# So in most cases it will be better to enable caller graphs for selected
# functions only using the \callergraph command.
 
CALLER_GRAPH = NO
 
# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
# will graphical hierarchy of all classes instead of a textual one.
 
GRAPHICAL_HIERARCHY = YES
 
# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
# then doxygen will show the dependencies a directory has on other directories
# in a graphical way. The dependency relations are determined by the #include
# relations between the files in the directories.
 
DIRECTORY_GRAPH = YES
 
# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
# generated by dot. Possible values are png, jpg, or gif
# If left blank png will be used.
 
DOT_IMAGE_FORMAT = png
 
# The tag DOT_PATH can be used to specify the path where the dot tool can be
# found. If left blank, it is assumed the dot tool can be found in the path.
 
DOT_PATH =
 
# The DOTFILE_DIRS tag can be used to specify one or more directories that
# contain dot files that are included in the documentation (see the
# \dotfile command).
 
DOTFILE_DIRS =
 
# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
# nodes that will be shown in the graph. If the number of nodes in a graph
# becomes larger than this value, doxygen will truncate the graph, which is
# visualized by representing a node as a red box. Note that doxygen if the number
# of direct children of the root node in a graph is already larger than
# MAX_DOT_GRAPH_NOTES then the graph will not be shown at all. Also note
# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
 
DOT_GRAPH_MAX_NODES = 50
 
# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
# graphs generated by dot. A depth value of 3 means that only nodes reachable
# from the root by following a path via at most 3 edges will be shown. Nodes
# that lay further from the root node will be omitted. Note that setting this
# option to 1 or 2 may greatly reduce the computation time needed for large
# code bases. Also note that the size of a graph can be further restricted by
# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
 
MAX_DOT_GRAPH_DEPTH = 1000
 
# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
# background. This is disabled by default, which results in a white background.
# Warning: Depending on the platform used, enabling this option may lead to
# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
# read).
 
DOT_TRANSPARENT = NO
 
# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
# files in one run (i.e. multiple -o and -T options on the command line). This
# makes dot run faster, but since only newer versions of dot (>1.8.10)
# support this, this feature is disabled by default.
 
DOT_MULTI_TARGETS = NO
 
# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
# generate a legend page explaining the meaning of the various boxes and
# arrows in the dot generated graphs.
 
GENERATE_LEGEND = YES
 
# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
# remove the intermediate dot files that are used to generate
# the various graphs.
 
DOT_CLEANUP = YES
 
#---------------------------------------------------------------------------
# Configuration::additions related to the search engine
#---------------------------------------------------------------------------
 
# The SEARCHENGINE tag specifies whether or not a search engine should be
# used. If set to NO the values of all tags below this one will be ignored.
 
SEARCHENGINE = NO
/Designs/GPSRL02A/SW/Makefile
0,0 → 1,52
 
NAME := sd-reader
HEX := $(NAME).hex
OUT := $(NAME).out
MAP := $(NAME).map
SOURCES := $(wildcard *.c)
HEADERS := $(wildcard *.h)
OBJECTS := $(patsubst %.c,%.o,$(SOURCES))
 
MCU := atmega168
MCU_AVRDUDE := m168
MCU_FREQ := 16000000UL
 
CC := avr-gcc
OBJCOPY := avr-objcopy
SIZE := avr-size -A
DOXYGEN := doxygen
 
CFLAGS := -Wall -pedantic -mmcu=$(MCU) -std=c99 -g -Os -DF_CPU=$(MCU_FREQ)
 
all: $(HEX)
 
clean:
rm -f $(HEX) $(OUT) $(MAP) $(OBJECTS)
rm -rf doc/html
 
flash: $(HEX)
avrdude -y -p $(MCU_AVRDUDE) -U flash:w:$(HEX)
 
$(HEX): $(OUT)
$(OBJCOPY) -R .eeprom -O ihex $< $@
 
$(OUT): $(OBJECTS)
$(CC) $(CFLAGS) -o $@ -Wl,-Map,$(MAP) $^
@echo
@$(SIZE) $@
@echo
 
%.o: %.c $(HEADERS)
$(CC) $(CFLAGS) -c -o $@ $<
 
%.pp: %.c
$(CC) $(CFLAGS) -E -o $@ $<
 
%.ppo: %.c
$(CC) $(CFLAGS) -E $<
 
doc: $(HEADERS) $(SOURCES) Doxyfile
$(DOXYGEN) Doxyfile
 
.PHONY: all clean flash doc
 
/Designs/GPSRL02A/SW/doc/html/annotated.html
0,0 → 1,31
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>sd-reader: Data Structures</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3-20071008 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
</ul>
</div>
<h1>sd-reader Data Structures</h1>Here are the data structures with brief descriptions:<table>
<tr><td class="indexkey"><a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a></td><td class="indexvalue">Describes a directory entry </td></tr>
<tr><td class="indexkey"><a class="el" href="structpartition__struct.html">partition_struct</a></td><td class="indexvalue">Describes a partition </td></tr>
<tr><td class="indexkey"><a class="el" href="structsd__raw__info.html">sd_raw_info</a></td><td class="indexvalue">This struct is used by <a class="el" href="group__sd__raw.html#g97c54e82834f87bcdd38e79822fe5a79" title="Reads informational data from the card.">sd_raw_get_info()</a> to return manufacturing and status information of the card </td></tr>
</table>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Dec 13 19:38:48 2007 for sd-reader by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3-20071008 </small></address>
</body>
</html>
/Designs/GPSRL02A/SW/doc/html/doxygen.css
0,0 → 1,359
BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {
font-family: Geneva, Arial, Helvetica, sans-serif;
}
BODY,TD {
font-size: 90%;
}
H1 {
text-align: center;
font-size: 160%;
}
H2 {
font-size: 120%;
}
H3 {
font-size: 100%;
}
CAPTION { font-weight: bold }
DIV.qindex {
width: 100%;
background-color: #e8eef2;
border: 1px solid #84b0c7;
text-align: center;
margin: 2px;
padding: 2px;
line-height: 140%;
}
DIV.nav {
width: 100%;
background-color: #e8eef2;
border: 1px solid #84b0c7;
text-align: center;
margin: 2px;
padding: 2px;
line-height: 140%;
}
DIV.navtab {
background-color: #e8eef2;
border: 1px solid #84b0c7;
text-align: center;
margin: 2px;
margin-right: 15px;
padding: 2px;
}
TD.navtab {
font-size: 70%;
}
A.qindex {
text-decoration: none;
font-weight: bold;
color: #1A419D;
}
A.qindex:visited {
text-decoration: none;
font-weight: bold;
color: #1A419D
}
A.qindex:hover {
text-decoration: none;
background-color: #ddddff;
}
A.qindexHL {
text-decoration: none;
font-weight: bold;
background-color: #6666cc;
color: #ffffff;
border: 1px double #9295C2;
}
A.qindexHL:hover {
text-decoration: none;
background-color: #6666cc;
color: #ffffff;
}
A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff }
A.el { text-decoration: none; font-weight: bold }
A.elRef { font-weight: bold }
A.code:link { text-decoration: none; font-weight: normal; color: #0000FF}
A.code:visited { text-decoration: none; font-weight: normal; color: #0000FF}
A.codeRef:link { font-weight: normal; color: #0000FF}
A.codeRef:visited { font-weight: normal; color: #0000FF}
A:hover { text-decoration: none; background-color: #f2f2ff }
DL.el { margin-left: -1cm }
.fragment {
font-family: monospace, fixed;
font-size: 95%;
}
PRE.fragment {
border: 1px solid #CCCCCC;
background-color: #f5f5f5;
margin-top: 4px;
margin-bottom: 4px;
margin-left: 2px;
margin-right: 8px;
padding-left: 6px;
padding-right: 6px;
padding-top: 4px;
padding-bottom: 4px;
}
DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }
 
DIV.groupHeader {
margin-left: 16px;
margin-top: 12px;
margin-bottom: 6px;
font-weight: bold;
}
DIV.groupText { margin-left: 16px; font-style: italic; font-size: 90% }
BODY {
background: white;
color: black;
margin-right: 20px;
margin-left: 20px;
}
TD.indexkey {
background-color: #e8eef2;
font-weight: bold;
padding-right : 10px;
padding-top : 2px;
padding-left : 10px;
padding-bottom : 2px;
margin-left : 0px;
margin-right : 0px;
margin-top : 2px;
margin-bottom : 2px;
border: 1px solid #CCCCCC;
}
TD.indexvalue {
background-color: #e8eef2;
font-style: italic;
padding-right : 10px;
padding-top : 2px;
padding-left : 10px;
padding-bottom : 2px;
margin-left : 0px;
margin-right : 0px;
margin-top : 2px;
margin-bottom : 2px;
border: 1px solid #CCCCCC;
}
TR.memlist {
background-color: #f0f0f0;
}
P.formulaDsp { text-align: center; }
IMG.formulaDsp { }
IMG.formulaInl { vertical-align: middle; }
SPAN.keyword { color: #008000 }
SPAN.keywordtype { color: #604020 }
SPAN.keywordflow { color: #e08000 }
SPAN.comment { color: #800000 }
SPAN.preprocessor { color: #806020 }
SPAN.stringliteral { color: #002080 }
SPAN.charliteral { color: #008080 }
.mdescLeft {
padding: 0px 8px 4px 8px;
font-size: 80%;
font-style: italic;
background-color: #FAFAFA;
border-top: 1px none #E0E0E0;
border-right: 1px none #E0E0E0;
border-bottom: 1px none #E0E0E0;
border-left: 1px none #E0E0E0;
margin: 0px;
}
.mdescRight {
padding: 0px 8px 4px 8px;
font-size: 80%;
font-style: italic;
background-color: #FAFAFA;
border-top: 1px none #E0E0E0;
border-right: 1px none #E0E0E0;
border-bottom: 1px none #E0E0E0;
border-left: 1px none #E0E0E0;
margin: 0px;
}
.memItemLeft {
padding: 1px 0px 0px 8px;
margin: 4px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-color: #E0E0E0;
border-right-color: #E0E0E0;
border-bottom-color: #E0E0E0;
border-left-color: #E0E0E0;
border-top-style: solid;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
background-color: #FAFAFA;
font-size: 80%;
}
.memItemRight {
padding: 1px 8px 0px 8px;
margin: 4px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-color: #E0E0E0;
border-right-color: #E0E0E0;
border-bottom-color: #E0E0E0;
border-left-color: #E0E0E0;
border-top-style: solid;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
background-color: #FAFAFA;
font-size: 80%;
}
.memTemplItemLeft {
padding: 1px 0px 0px 8px;
margin: 4px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-color: #E0E0E0;
border-right-color: #E0E0E0;
border-bottom-color: #E0E0E0;
border-left-color: #E0E0E0;
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
background-color: #FAFAFA;
font-size: 80%;
}
.memTemplItemRight {
padding: 1px 8px 0px 8px;
margin: 4px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-color: #E0E0E0;
border-right-color: #E0E0E0;
border-bottom-color: #E0E0E0;
border-left-color: #E0E0E0;
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
background-color: #FAFAFA;
font-size: 80%;
}
.memTemplParams {
padding: 1px 0px 0px 8px;
margin: 4px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-color: #E0E0E0;
border-right-color: #E0E0E0;
border-bottom-color: #E0E0E0;
border-left-color: #E0E0E0;
border-top-style: solid;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
color: #606060;
background-color: #FAFAFA;
font-size: 80%;
}
.search { color: #003399;
font-weight: bold;
}
FORM.search {
margin-bottom: 0px;
margin-top: 0px;
}
INPUT.search { font-size: 75%;
color: #000080;
font-weight: normal;
background-color: #e8eef2;
}
TD.tiny { font-size: 75%;
}
a {
color: #1A41A8;
}
a:visited {
color: #2A3798;
}
.dirtab { padding: 4px;
border-collapse: collapse;
border: 1px solid #84b0c7;
}
TH.dirtab { background: #e8eef2;
font-weight: bold;
}
HR { height: 1px;
border: none;
border-top: 1px solid black;
}
 
/* Style for detailed member documentation */
.memtemplate {
font-size: 80%;
color: #606060;
font-weight: normal;
margin-left: 3px;
}
.memnav {
background-color: #e8eef2;
border: 1px solid #84b0c7;
text-align: center;
margin: 2px;
margin-right: 15px;
padding: 2px;
}
.memitem {
padding: 4px;
background-color: #eef3f5;
border-width: 1px;
border-style: solid;
border-color: #dedeee;
-moz-border-radius: 8px 8px 8px 8px;
}
.memname {
white-space: nowrap;
font-weight: bold;
}
.memdoc{
padding-left: 10px;
}
.memproto {
background-color: #d5e1e8;
width: 100%;
border-width: 1px;
border-style: solid;
border-color: #84b0c7;
font-weight: bold;
-moz-border-radius: 8px 8px 8px 8px;
}
.paramkey {
text-align: right;
}
.paramtype {
white-space: nowrap;
}
.paramname {
color: #602020;
font-style: italic;
white-space: nowrap;
}
/* End Styling for detailed member documentation */
 
/* for the tree view */
.ftvtree {
font-family: sans-serif;
margin:0.5em;
}
.directory { font-size: 9pt; font-weight: bold; }
.directory h3 { margin: 0px; margin-top: 1em; font-size: 11pt; }
.directory > h3 { margin-top: 0; }
.directory p { margin: 0px; white-space: nowrap; }
.directory div { display: none; margin: 0px; }
.directory img { vertical-align: -30%; }
/Designs/GPSRL02A/SW/doc/html/doxygen.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Designs/GPSRL02A/SW/doc/html/fat16_8c.html
0,0 → 1,93
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>sd-reader: fat16.c File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3-20071008 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>fat16.c File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
FAT16 implementation (license: GPLv2 or LGPLv2.1).
<p>
<dl class="author" compact><dt><b>Author:</b></dt><dd>Roland Riegel </dd></dl>
 
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct fat16_fs_struct *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__fs.html#gc176ec2f1bfa8c81972ea741a941e579">fat16_open</a> (struct <a class="el" href="structpartition__struct.html">partition_struct</a> *partition)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Opens a FAT16 filesystem. <a href="group__fat16__fs.html#gc176ec2f1bfa8c81972ea741a941e579"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__fs.html#g6588833571e6ef0f5d094b8ff56a5985">fat16_close</a> (struct fat16_fs_struct *fs)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Closes a FAT16 filesystem. <a href="group__fat16__fs.html#g6588833571e6ef0f5d094b8ff56a5985"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#g0045fe378de2f7c52b528f985e1891a6">fat16_get_dir_entry_of_path</a> (struct fat16_fs_struct *fs, const char *path, struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieves the directory entry of a path. <a href="group__fat16__file.html#g0045fe378de2f7c52b528f985e1891a6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct fat16_file_struct *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#g3a43c9943251749978645ad8e3f16757">fat16_open_file</a> (struct fat16_fs_struct *fs, const struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Opens a file on a FAT16 filesystem. <a href="group__fat16__file.html#g3a43c9943251749978645ad8e3f16757"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#g2b2812041f489bc7913bfa5cbcf0172b">fat16_close_file</a> (struct fat16_file_struct *fd)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Closes a file. <a href="group__fat16__file.html#g2b2812041f489bc7913bfa5cbcf0172b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int16_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#g0af2ef3d690626a5640a334cefbb27a6">fat16_read_file</a> (struct fat16_file_struct *fd, uint8_t *buffer, uint16_t buffer_len)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reads data from a file. <a href="group__fat16__file.html#g0af2ef3d690626a5640a334cefbb27a6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int16_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#g4f0c785a47b1cf070839b5edec2c6f65">fat16_write_file</a> (struct fat16_file_struct *fd, const uint8_t *buffer, uint16_t buffer_len)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Writes data to a file. <a href="group__fat16__file.html#g4f0c785a47b1cf070839b5edec2c6f65"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#gf1511fd1a5419d0828265566dc5d33e4">fat16_seek_file</a> (struct fat16_file_struct *fd, int32_t *offset, uint8_t whence)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Repositions the read/write file offset. <a href="group__fat16__file.html#gf1511fd1a5419d0828265566dc5d33e4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#g23740742fa60ca148ef098caac7085c0">fat16_resize_file</a> (struct fat16_file_struct *fd, uint32_t size)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Resizes a file to have a specific size. <a href="group__fat16__file.html#g23740742fa60ca148ef098caac7085c0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct fat16_dir_struct *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__dir.html#g9704120fef030632a76d91cfbbef78b0">fat16_open_dir</a> (struct fat16_fs_struct *fs, const struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Opens a directory. <a href="group__fat16__dir.html#g9704120fef030632a76d91cfbbef78b0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__dir.html#g95f491a5a0b6438781aefaedc250e926">fat16_close_dir</a> (struct fat16_dir_struct *dd)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Closes a directory descriptor. <a href="group__fat16__dir.html#g95f491a5a0b6438781aefaedc250e926"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__dir.html#g73c8f0598e8224736b09644c48cf2970">fat16_read_dir</a> (struct fat16_dir_struct *dd, struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reads the next directory entry contained within a parent directory. <a href="group__fat16__dir.html#g73c8f0598e8224736b09644c48cf2970"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__dir.html#gaed63addc9b9a3d5137f3b552abb42d8">fat16_reset_dir</a> (struct fat16_dir_struct *dd)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Resets a directory handle. <a href="group__fat16__dir.html#gaed63addc9b9a3d5137f3b552abb42d8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#gf8029e3ec633902d08e8204d13afc350">fat16_create_file</a> (struct fat16_dir_struct *parent, const char *file, struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a file. <a href="group__fat16__file.html#gf8029e3ec633902d08e8204d13afc350"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#ge060faccbbeca802afe86be2f4d5b485">fat16_delete_file</a> (struct fat16_fs_struct *fs, struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deletes a file or directory. <a href="group__fat16__file.html#ge060faccbbeca802afe86be2f4d5b485"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__dir.html#g973def42513263e311ffa8e21f42b287">fat16_create_dir</a> (struct fat16_dir_struct *parent, const char *dir, struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a directory. <a href="group__fat16__dir.html#g973def42513263e311ffa8e21f42b287"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__dir.html#gdf22d7b37d27047d41e6d5cbf93cdff4">fat16_delete_dir</a> (struct fat16_fs_struct *fs, struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deletes a directory. <a href="group__fat16__dir.html#gdf22d7b37d27047d41e6d5cbf93cdff4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#g82c7347c5b3cd8832633d5303552eb38">fat16_get_file_modification_date</a> (const struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry, uint16_t *year, uint8_t *month, uint8_t *day)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the modification date of a file. <a href="group__fat16__file.html#g82c7347c5b3cd8832633d5303552eb38"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#g5040fcab753ef55337292daf8c0d6784">fat16_get_file_modification_time</a> (const struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry, uint8_t *hour, uint8_t *min, uint8_t *sec)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the modification time of a file. <a href="group__fat16__file.html#g5040fcab753ef55337292daf8c0d6784"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__fs.html#g8af3c3535929e19b0039e07f1976cec7">fat16_get_fs_size</a> (const struct fat16_fs_struct *fs)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the amount of total storage capacity of the filesystem in bytes. <a href="group__fat16__fs.html#g8af3c3535929e19b0039e07f1976cec7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__fs.html#g2f8ff07cca44ecb6770b12a58b6cd8c7">fat16_get_fs_free</a> (const struct fat16_fs_struct *fs)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the amount of free storage capacity on the filesystem in bytes. <a href="group__fat16__fs.html#g2f8ff07cca44ecb6770b12a58b6cd8c7"></a><br></td></tr>
</table>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Dec 13 19:38:48 2007 for sd-reader by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3-20071008 </small></address>
</body>
</html>
/Designs/GPSRL02A/SW/doc/html/fat16_8h.html
0,0 → 1,122
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>sd-reader: fat16.h File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3-20071008 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>fat16.h File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
FAT16 header (license: GPLv2 or LGPLv2.1).
<p>
<dl class="author" compact><dt><b>Author:</b></dt><dd>Roland Riegel </dd></dl>
 
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Describes a directory entry. <a href="structfat16__dir__entry__struct.html#_details">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#g1c4ea0b6e1087b1a88d26b8942c5d923">FAT16_ATTRIB_READONLY</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The file is read-only. <a href="group__fat16__file.html#g1c4ea0b6e1087b1a88d26b8942c5d923"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#g229780f6a88ab775ea82264c9f1e0616">FAT16_ATTRIB_HIDDEN</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The file is hidden. <a href="group__fat16__file.html#g229780f6a88ab775ea82264c9f1e0616"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#ga0badbbc92da7601b4a51d99ba7e8f8f">FAT16_ATTRIB_SYSTEM</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The file is a system file. <a href="group__fat16__file.html#ga0badbbc92da7601b4a51d99ba7e8f8f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#gc1341eb7b40d2f48cacf9b9d8aedbb6c">FAT16_ATTRIB_VOLUME</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The file is empty and has the volume label as its name. <a href="group__fat16__file.html#gc1341eb7b40d2f48cacf9b9d8aedbb6c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#gafdb0e859960ff33b11b6c55b3188274">FAT16_ATTRIB_DIR</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The file is a directory. <a href="group__fat16__file.html#gafdb0e859960ff33b11b6c55b3188274"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#g8e472239ee6baede688a01eaa45551a9">FAT16_ATTRIB_ARCHIVE</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The file has to be archived. <a href="group__fat16__file.html#g8e472239ee6baede688a01eaa45551a9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#gb90aeb34840c0ea33c8ae9d7577def65">FAT16_SEEK_SET</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The given offset is relative to the beginning of the file. <a href="group__fat16__file.html#gb90aeb34840c0ea33c8ae9d7577def65"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#g432820c6f8c90e11a92efc931c3b8a3a">FAT16_SEEK_CUR</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The given offset is relative to the current read/write position. <a href="group__fat16__file.html#g432820c6f8c90e11a92efc931c3b8a3a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#g3793e580ccfcd5e68b95a0740c000e39">FAT16_SEEK_END</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The given offset is relative to the end of the file. <a href="group__fat16__file.html#g3793e580ccfcd5e68b95a0740c000e39"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct fat16_fs_struct *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#gc176ec2f1bfa8c81972ea741a941e579">fat16_open</a> (struct <a class="el" href="structpartition__struct.html">partition_struct</a> *partition)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Opens a FAT16 filesystem. <a href="group__fat16.html#gc176ec2f1bfa8c81972ea741a941e579"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g6588833571e6ef0f5d094b8ff56a5985">fat16_close</a> (struct fat16_fs_struct *fs)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Closes a FAT16 filesystem. <a href="group__fat16.html#g6588833571e6ef0f5d094b8ff56a5985"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct fat16_file_struct *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g3a43c9943251749978645ad8e3f16757">fat16_open_file</a> (struct fat16_fs_struct *fs, const struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Opens a file on a FAT16 filesystem. <a href="group__fat16.html#g3a43c9943251749978645ad8e3f16757"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g2b2812041f489bc7913bfa5cbcf0172b">fat16_close_file</a> (struct fat16_file_struct *fd)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Closes a file. <a href="group__fat16.html#g2b2812041f489bc7913bfa5cbcf0172b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int16_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g0af2ef3d690626a5640a334cefbb27a6">fat16_read_file</a> (struct fat16_file_struct *fd, uint8_t *buffer, uint16_t buffer_len)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reads data from a file. <a href="group__fat16.html#g0af2ef3d690626a5640a334cefbb27a6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int16_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g4f0c785a47b1cf070839b5edec2c6f65">fat16_write_file</a> (struct fat16_file_struct *fd, const uint8_t *buffer, uint16_t buffer_len)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Writes data to a file. <a href="group__fat16.html#g4f0c785a47b1cf070839b5edec2c6f65"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#gf1511fd1a5419d0828265566dc5d33e4">fat16_seek_file</a> (struct fat16_file_struct *fd, int32_t *offset, uint8_t whence)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Repositions the read/write file offset. <a href="group__fat16.html#gf1511fd1a5419d0828265566dc5d33e4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g23740742fa60ca148ef098caac7085c0">fat16_resize_file</a> (struct fat16_file_struct *fd, uint32_t size)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Resizes a file to have a specific size. <a href="group__fat16.html#g23740742fa60ca148ef098caac7085c0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct fat16_dir_struct *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g9704120fef030632a76d91cfbbef78b0">fat16_open_dir</a> (struct fat16_fs_struct *fs, const struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Opens a directory. <a href="group__fat16.html#g9704120fef030632a76d91cfbbef78b0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g95f491a5a0b6438781aefaedc250e926">fat16_close_dir</a> (struct fat16_dir_struct *dd)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Closes a directory descriptor. <a href="group__fat16.html#g95f491a5a0b6438781aefaedc250e926"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g73c8f0598e8224736b09644c48cf2970">fat16_read_dir</a> (struct fat16_dir_struct *dd, struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reads the next directory entry contained within a parent directory. <a href="group__fat16.html#g73c8f0598e8224736b09644c48cf2970"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#gaed63addc9b9a3d5137f3b552abb42d8">fat16_reset_dir</a> (struct fat16_dir_struct *dd)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Resets a directory handle. <a href="group__fat16.html#gaed63addc9b9a3d5137f3b552abb42d8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#gf8029e3ec633902d08e8204d13afc350">fat16_create_file</a> (struct fat16_dir_struct *parent, const char *file, struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a file. <a href="group__fat16.html#gf8029e3ec633902d08e8204d13afc350"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#ge060faccbbeca802afe86be2f4d5b485">fat16_delete_file</a> (struct fat16_fs_struct *fs, struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deletes a file or directory. <a href="group__fat16.html#ge060faccbbeca802afe86be2f4d5b485"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g973def42513263e311ffa8e21f42b287">fat16_create_dir</a> (struct fat16_dir_struct *parent, const char *dir, struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a directory. <a href="group__fat16.html#g973def42513263e311ffa8e21f42b287"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g82c7347c5b3cd8832633d5303552eb38">fat16_get_file_modification_date</a> (const struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry, uint16_t *year, uint8_t *month, uint8_t *day)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the modification date of a file. <a href="group__fat16.html#g82c7347c5b3cd8832633d5303552eb38"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g5040fcab753ef55337292daf8c0d6784">fat16_get_file_modification_time</a> (const struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry, uint8_t *hour, uint8_t *min, uint8_t *sec)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the modification time of a file. <a href="group__fat16.html#g5040fcab753ef55337292daf8c0d6784"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g0045fe378de2f7c52b528f985e1891a6">fat16_get_dir_entry_of_path</a> (struct fat16_fs_struct *fs, const char *path, struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieves the directory entry of a path. <a href="group__fat16.html#g0045fe378de2f7c52b528f985e1891a6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g8af3c3535929e19b0039e07f1976cec7">fat16_get_fs_size</a> (const struct fat16_fs_struct *fs)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the amount of total storage capacity of the filesystem in bytes. <a href="group__fat16.html#g8af3c3535929e19b0039e07f1976cec7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g2f8ff07cca44ecb6770b12a58b6cd8c7">fat16_get_fs_free</a> (const struct fat16_fs_struct *fs)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the amount of free storage capacity on the filesystem in bytes. <a href="group__fat16.html#g2f8ff07cca44ecb6770b12a58b6cd8c7"></a><br></td></tr>
</table>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Dec 13 19:38:48 2007 for sd-reader by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3-20071008 </small></address>
</body>
</html>
/Designs/GPSRL02A/SW/doc/html/fat16__config_8h.html
0,0 → 1,50
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>sd-reader: fat16_config.h File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3-20071008 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>fat16_config.h File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
FAT16 configuration (license: GPLv2 or LGPLv2.1).
<p>
 
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__config.html#g2115fb17b7fabf2e24432f05c6763be0">FAT16_WRITE_SUPPORT</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Controls FAT16 write support. <a href="group__fat16__config.html#g2115fb17b7fabf2e24432f05c6763be0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__config.html#gffbde05a4ec649e5d2c69aea08fdafa0">FAT16_DATETIME_SUPPORT</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Controls FAT16 date and time support. <a href="group__fat16__config.html#gffbde05a4ec649e5d2c69aea08fdafa0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__config.html#g533b388bd0b3a2ab62e42122dd886419">fat16_get_datetime</a>(year, month, day, hour, min, sec)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Determines the function used for retrieving current date and time. <a href="group__fat16__config.html#g533b388bd0b3a2ab62e42122dd886419"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g4d805cbe04478a022ae0ea424ef95087"></a><!-- doxytag: member="fat16_config.h::FAT16_FS_COUNT" ref="g4d805cbe04478a022ae0ea424ef95087" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__config.html#g4d805cbe04478a022ae0ea424ef95087">FAT16_FS_COUNT</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Maximum number of filesystem handles. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g7f30592730b029696d314d0bb2f7803f"></a><!-- doxytag: member="fat16_config.h::FAT16_FILE_COUNT" ref="g7f30592730b029696d314d0bb2f7803f" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__config.html#g7f30592730b029696d314d0bb2f7803f">FAT16_FILE_COUNT</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Maximum number of file handles. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gae69ee783adf9002b0c746d8d2c59972"></a><!-- doxytag: member="fat16_config.h::FAT16_DIR_COUNT" ref="gae69ee783adf9002b0c746d8d2c59972" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__config.html#gae69ee783adf9002b0c746d8d2c59972">FAT16_DIR_COUNT</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Maximum number of directory handles. <br></td></tr>
</table>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Dec 13 19:38:48 2007 for sd-reader by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3-20071008 </small></address>
</body>
</html>
/Designs/GPSRL02A/SW/doc/html/files.html
0,0 → 1,38
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>sd-reader: File Index</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3-20071008 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li class="current"><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>Globals</span></a></li>
</ul>
</div>
<h1>sd-reader File List</h1>Here is a list of all documented files with brief descriptions:<table>
<tr><td class="indexkey"><a class="el" href="fat16_8c.html">fat16.c</a></td><td class="indexvalue">FAT16 implementation (license: GPLv2 or LGPLv2.1) </td></tr>
<tr><td class="indexkey"><a class="el" href="fat16_8h.html">fat16.h</a></td><td class="indexvalue">FAT16 header (license: GPLv2 or LGPLv2.1) </td></tr>
<tr><td class="indexkey"><a class="el" href="fat16__config_8h.html">fat16_config.h</a></td><td class="indexvalue">FAT16 configuration (license: GPLv2 or LGPLv2.1) </td></tr>
<tr><td class="indexkey"><a class="el" href="partition_8c.html">partition.c</a></td><td class="indexvalue">Partition table implementation (license: GPLv2 or LGPLv2.1) </td></tr>
<tr><td class="indexkey"><a class="el" href="partition_8h.html">partition.h</a></td><td class="indexvalue">Partition table header (license: GPLv2 or LGPLv2.1) </td></tr>
<tr><td class="indexkey"><a class="el" href="partition__config_8h.html">partition_config.h</a></td><td class="indexvalue">Partition configuration (license: GPLv2 or LGPLv2.1) </td></tr>
<tr><td class="indexkey"><a class="el" href="sd-reader__config_8h.html">sd-reader_config.h</a></td><td class="indexvalue">Common sd-reader configuration used by all modules (license: GPLv2 or LGPLv2.1) </td></tr>
<tr><td class="indexkey"><a class="el" href="sd__raw_8c.html">sd_raw.c</a></td><td class="indexvalue">MMC/SD raw access implementation (license: GPLv2 or LGPLv2.1) </td></tr>
<tr><td class="indexkey"><a class="el" href="sd__raw_8h.html">sd_raw.h</a></td><td class="indexvalue">MMC/SD raw access header (license: GPLv2 or LGPLv2.1) </td></tr>
<tr><td class="indexkey"><a class="el" href="sd__raw__config_8h.html">sd_raw_config.h</a></td><td class="indexvalue">MMC/SD support configuration (license: GPLv2 or LGPLv2.1) </td></tr>
</table>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Dec 13 19:38:48 2007 for sd-reader by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3-20071008 </small></address>
</body>
</html>
/Designs/GPSRL02A/SW/doc/html/functions.html
0,0 → 1,84
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>sd-reader: Data Fields</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3-20071008 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li class="current"><a href="functions.html"><span>All</span></a></li>
<li><a href="functions_vars.html"><span>Variables</span></a></li>
</ul>
</div>
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:
<p>
<ul>
<li>attributes
: <a class="el" href="structfat16__dir__entry__struct.html#4e4c6084a1f0cf1e687ac68853dbd61e">fat16_dir_entry_struct</a>
<li>capacity
: <a class="el" href="structsd__raw__info.html#4f97f4a040f570d55d738023822dd2cf">sd_raw_info</a>
<li>cluster
: <a class="el" href="structfat16__dir__entry__struct.html#8bbd1a1339bd035f916ffe91420cc8ad">fat16_dir_entry_struct</a>
<li>device_read
: <a class="el" href="structpartition__struct.html#9d82319d1b4f052c165a806069f49afa">partition_struct</a>
<li>device_read_interval
: <a class="el" href="structpartition__struct.html#23ef90827c177f8f3385582416ff3ea3">partition_struct</a>
<li>device_write
: <a class="el" href="structpartition__struct.html#c16e2eedf75a5e472ed93a92c30e0dad">partition_struct</a>
<li>device_write_interval
: <a class="el" href="structpartition__struct.html#91923c55ba1c3a2dad435124964d91aa">partition_struct</a>
<li>entry_offset
: <a class="el" href="structfat16__dir__entry__struct.html#8af0bfe59cef4c7940d2e53da87a0c28">fat16_dir_entry_struct</a>
<li>file_size
: <a class="el" href="structfat16__dir__entry__struct.html#20dc3151ca3727aef4ad79a7735131ff">fat16_dir_entry_struct</a>
<li>flag_copy
: <a class="el" href="structsd__raw__info.html#f23fccda0fa6740558d71c530576961b">sd_raw_info</a>
<li>flag_write_protect
: <a class="el" href="structsd__raw__info.html#55f4daed5bef3289878fc0521ca191b1">sd_raw_info</a>
<li>flag_write_protect_temp
: <a class="el" href="structsd__raw__info.html#f3815572d323acafa8e3eabf19b154d5">sd_raw_info</a>
<li>format
: <a class="el" href="structsd__raw__info.html#10d485029641a4fc1aadccad5e9eaa03">sd_raw_info</a>
<li>length
: <a class="el" href="structpartition__struct.html#416da0cd540916a03a536c4fc5970635">partition_struct</a>
<li>long_name
: <a class="el" href="structfat16__dir__entry__struct.html#9f625c7e8ac92bd268c62089f71480d0">fat16_dir_entry_struct</a>
<li>manufacturer
: <a class="el" href="structsd__raw__info.html#d543253184afa50a8e4cb51b6dd5bf67">sd_raw_info</a>
<li>manufacturing_month
: <a class="el" href="structsd__raw__info.html#80b3393a84f9c7f0a648cb8a9fd9c8b7">sd_raw_info</a>
<li>manufacturing_year
: <a class="el" href="structsd__raw__info.html#e8a5dd6ae2039058100800f6bb85997a">sd_raw_info</a>
<li>oem
: <a class="el" href="structsd__raw__info.html#8ec2f9a6cdc4ac26cd695321bd9b3057">sd_raw_info</a>
<li>offset
: <a class="el" href="structpartition__struct.html#d9d6f2b7a40168d2960e28a151ef1808">partition_struct</a>
<li>product
: <a class="el" href="structsd__raw__info.html#8d781e7a0ec7e752b340a72ba87fc40f">sd_raw_info</a>
<li>revision
: <a class="el" href="structsd__raw__info.html#0eb79353f9b63b1e719f8babad77c87e">sd_raw_info</a>
<li>serial
: <a class="el" href="structsd__raw__info.html#22771967744cca36595278b52686a69f">sd_raw_info</a>
<li>type
: <a class="el" href="structpartition__struct.html#6923f9a2463495b35df8b73750e5d959">partition_struct</a>
</ul>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Dec 13 19:38:48 2007 for sd-reader by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3-20071008 </small></address>
</body>
</html>
/Designs/GPSRL02A/SW/doc/html/functions_vars.html
0,0 → 1,84
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>sd-reader: Data Fields - Variables</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3-20071008 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="functions.html"><span>All</span></a></li>
<li class="current"><a href="functions_vars.html"><span>Variables</span></a></li>
</ul>
</div>
&nbsp;
<p>
<ul>
<li>attributes
: <a class="el" href="structfat16__dir__entry__struct.html#4e4c6084a1f0cf1e687ac68853dbd61e">fat16_dir_entry_struct</a>
<li>capacity
: <a class="el" href="structsd__raw__info.html#4f97f4a040f570d55d738023822dd2cf">sd_raw_info</a>
<li>cluster
: <a class="el" href="structfat16__dir__entry__struct.html#8bbd1a1339bd035f916ffe91420cc8ad">fat16_dir_entry_struct</a>
<li>device_read
: <a class="el" href="structpartition__struct.html#9d82319d1b4f052c165a806069f49afa">partition_struct</a>
<li>device_read_interval
: <a class="el" href="structpartition__struct.html#23ef90827c177f8f3385582416ff3ea3">partition_struct</a>
<li>device_write
: <a class="el" href="structpartition__struct.html#c16e2eedf75a5e472ed93a92c30e0dad">partition_struct</a>
<li>device_write_interval
: <a class="el" href="structpartition__struct.html#91923c55ba1c3a2dad435124964d91aa">partition_struct</a>
<li>entry_offset
: <a class="el" href="structfat16__dir__entry__struct.html#8af0bfe59cef4c7940d2e53da87a0c28">fat16_dir_entry_struct</a>
<li>file_size
: <a class="el" href="structfat16__dir__entry__struct.html#20dc3151ca3727aef4ad79a7735131ff">fat16_dir_entry_struct</a>
<li>flag_copy
: <a class="el" href="structsd__raw__info.html#f23fccda0fa6740558d71c530576961b">sd_raw_info</a>
<li>flag_write_protect
: <a class="el" href="structsd__raw__info.html#55f4daed5bef3289878fc0521ca191b1">sd_raw_info</a>
<li>flag_write_protect_temp
: <a class="el" href="structsd__raw__info.html#f3815572d323acafa8e3eabf19b154d5">sd_raw_info</a>
<li>format
: <a class="el" href="structsd__raw__info.html#10d485029641a4fc1aadccad5e9eaa03">sd_raw_info</a>
<li>length
: <a class="el" href="structpartition__struct.html#416da0cd540916a03a536c4fc5970635">partition_struct</a>
<li>long_name
: <a class="el" href="structfat16__dir__entry__struct.html#9f625c7e8ac92bd268c62089f71480d0">fat16_dir_entry_struct</a>
<li>manufacturer
: <a class="el" href="structsd__raw__info.html#d543253184afa50a8e4cb51b6dd5bf67">sd_raw_info</a>
<li>manufacturing_month
: <a class="el" href="structsd__raw__info.html#80b3393a84f9c7f0a648cb8a9fd9c8b7">sd_raw_info</a>
<li>manufacturing_year
: <a class="el" href="structsd__raw__info.html#e8a5dd6ae2039058100800f6bb85997a">sd_raw_info</a>
<li>oem
: <a class="el" href="structsd__raw__info.html#8ec2f9a6cdc4ac26cd695321bd9b3057">sd_raw_info</a>
<li>offset
: <a class="el" href="structpartition__struct.html#d9d6f2b7a40168d2960e28a151ef1808">partition_struct</a>
<li>product
: <a class="el" href="structsd__raw__info.html#8d781e7a0ec7e752b340a72ba87fc40f">sd_raw_info</a>
<li>revision
: <a class="el" href="structsd__raw__info.html#0eb79353f9b63b1e719f8babad77c87e">sd_raw_info</a>
<li>serial
: <a class="el" href="structsd__raw__info.html#22771967744cca36595278b52686a69f">sd_raw_info</a>
<li>type
: <a class="el" href="structpartition__struct.html#6923f9a2463495b35df8b73750e5d959">partition_struct</a>
</ul>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Dec 13 19:38:48 2007 for sd-reader by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3-20071008 </small></address>
</body>
</html>
/Designs/GPSRL02A/SW/doc/html/globals.html
0,0 → 1,221
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>sd-reader: Data Fields</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3-20071008 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li class="current"><a href="globals.html"><span>Globals</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li class="current"><a href="globals.html"><span>All</span></a></li>
<li><a href="globals_func.html"><span>Functions</span></a></li>
<li><a href="globals_type.html"><span>Typedefs</span></a></li>
<li><a href="globals_defs.html"><span>Defines</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="#index_d"><span>d</span></a></li>
<li><a href="#index_f"><span>f</span></a></li>
<li><a href="#index_p"><span>p</span></a></li>
<li><a href="#index_s"><span>s</span></a></li>
<li><a href="#index_u"><span>u</span></a></li>
</ul>
</div>
 
<p>
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:
<p>
<h3><a class="anchor" name="index_d">- d -</a></h3><ul>
<li>device_read_callback_t
: <a class="el" href="group__partition.html#g0c94a44bb3d9090d3ad662a4ea772f9b">partition.h</a>
<li>device_read_interval_t
: <a class="el" href="group__partition.html#gebc277053a3361aaf4b67a486e24fa24">partition.h</a>
<li>device_read_t
: <a class="el" href="group__partition.html#g6a2b9c5359ec033470fc25b2626e56fc">partition.h</a>
<li>device_write_callback_t
: <a class="el" href="group__partition.html#g089849983ec009841429eb6a1d3cb4cc">partition.h</a>
<li>device_write_interval_t
: <a class="el" href="group__partition.html#g975ce8905536b4c1020eb18b5b640158">partition.h</a>
<li>device_write_t
: <a class="el" href="group__partition.html#gc6ca9cbb79b5099d610e976365ee2e8e">partition.h</a>
</ul>
<h3><a class="anchor" name="index_f">- f -</a></h3><ul>
<li>FAT16_ATTRIB_ARCHIVE
: <a class="el" href="group__fat16__file.html#g8e472239ee6baede688a01eaa45551a9">fat16.h</a>
<li>FAT16_ATTRIB_DIR
: <a class="el" href="group__fat16__file.html#gafdb0e859960ff33b11b6c55b3188274">fat16.h</a>
<li>FAT16_ATTRIB_HIDDEN
: <a class="el" href="group__fat16__file.html#g229780f6a88ab775ea82264c9f1e0616">fat16.h</a>
<li>FAT16_ATTRIB_READONLY
: <a class="el" href="group__fat16__file.html#g1c4ea0b6e1087b1a88d26b8942c5d923">fat16.h</a>
<li>FAT16_ATTRIB_SYSTEM
: <a class="el" href="group__fat16__file.html#ga0badbbc92da7601b4a51d99ba7e8f8f">fat16.h</a>
<li>FAT16_ATTRIB_VOLUME
: <a class="el" href="group__fat16__file.html#gc1341eb7b40d2f48cacf9b9d8aedbb6c">fat16.h</a>
<li>fat16_close()
: <a class="el" href="group__fat16.html#g6588833571e6ef0f5d094b8ff56a5985">fat16.h</a>
, <a class="el" href="group__fat16__fs.html#g6588833571e6ef0f5d094b8ff56a5985">fat16.c</a>
<li>fat16_close_dir()
: <a class="el" href="group__fat16__dir.html#g95f491a5a0b6438781aefaedc250e926">fat16.c</a>
, <a class="el" href="group__fat16.html#g95f491a5a0b6438781aefaedc250e926">fat16.h</a>
<li>fat16_close_file()
: <a class="el" href="group__fat16__file.html#g2b2812041f489bc7913bfa5cbcf0172b">fat16.c</a>
, <a class="el" href="group__fat16.html#g2b2812041f489bc7913bfa5cbcf0172b">fat16.h</a>
<li>fat16_create_dir()
: <a class="el" href="group__fat16__dir.html#g973def42513263e311ffa8e21f42b287">fat16.c</a>
, <a class="el" href="group__fat16.html#g973def42513263e311ffa8e21f42b287">fat16.h</a>
<li>fat16_create_file()
: <a class="el" href="group__fat16.html#gf8029e3ec633902d08e8204d13afc350">fat16.h</a>
, <a class="el" href="group__fat16__file.html#gf8029e3ec633902d08e8204d13afc350">fat16.c</a>
<li>FAT16_DATETIME_SUPPORT
: <a class="el" href="group__fat16__config.html#gffbde05a4ec649e5d2c69aea08fdafa0">fat16_config.h</a>
<li>fat16_delete_dir()
: <a class="el" href="group__fat16__dir.html#gdf22d7b37d27047d41e6d5cbf93cdff4">fat16.c</a>
<li>fat16_delete_file()
: <a class="el" href="group__fat16__file.html#ge060faccbbeca802afe86be2f4d5b485">fat16.c</a>
, <a class="el" href="group__fat16.html#ge060faccbbeca802afe86be2f4d5b485">fat16.h</a>
<li>FAT16_DIR_COUNT
: <a class="el" href="group__fat16__config.html#gae69ee783adf9002b0c746d8d2c59972">fat16_config.h</a>
<li>FAT16_FILE_COUNT
: <a class="el" href="group__fat16__config.html#g7f30592730b029696d314d0bb2f7803f">fat16_config.h</a>
<li>FAT16_FS_COUNT
: <a class="el" href="group__fat16__config.html#g4d805cbe04478a022ae0ea424ef95087">fat16_config.h</a>
<li>fat16_get_datetime
: <a class="el" href="group__fat16__config.html#g533b388bd0b3a2ab62e42122dd886419">fat16_config.h</a>
<li>fat16_get_dir_entry_of_path()
: <a class="el" href="group__fat16__file.html#g0045fe378de2f7c52b528f985e1891a6">fat16.c</a>
, <a class="el" href="group__fat16.html#g0045fe378de2f7c52b528f985e1891a6">fat16.h</a>
<li>fat16_get_file_modification_date()
: <a class="el" href="group__fat16__file.html#g82c7347c5b3cd8832633d5303552eb38">fat16.c</a>
, <a class="el" href="group__fat16.html#g82c7347c5b3cd8832633d5303552eb38">fat16.h</a>
<li>fat16_get_file_modification_time()
: <a class="el" href="group__fat16__file.html#g5040fcab753ef55337292daf8c0d6784">fat16.c</a>
, <a class="el" href="group__fat16.html#g5040fcab753ef55337292daf8c0d6784">fat16.h</a>
<li>fat16_get_fs_free()
: <a class="el" href="group__fat16.html#g2f8ff07cca44ecb6770b12a58b6cd8c7">fat16.h</a>
, <a class="el" href="group__fat16__fs.html#g2f8ff07cca44ecb6770b12a58b6cd8c7">fat16.c</a>
<li>fat16_get_fs_size()
: <a class="el" href="group__fat16__fs.html#g8af3c3535929e19b0039e07f1976cec7">fat16.c</a>
, <a class="el" href="group__fat16.html#g8af3c3535929e19b0039e07f1976cec7">fat16.h</a>
<li>fat16_open()
: <a class="el" href="group__fat16__fs.html#gc176ec2f1bfa8c81972ea741a941e579">fat16.c</a>
, <a class="el" href="group__fat16.html#gc176ec2f1bfa8c81972ea741a941e579">fat16.h</a>
<li>fat16_open_dir()
: <a class="el" href="group__fat16__dir.html#g9704120fef030632a76d91cfbbef78b0">fat16.c</a>
, <a class="el" href="group__fat16.html#g9704120fef030632a76d91cfbbef78b0">fat16.h</a>
<li>fat16_open_file()
: <a class="el" href="group__fat16__file.html#g3a43c9943251749978645ad8e3f16757">fat16.c</a>
, <a class="el" href="group__fat16.html#g3a43c9943251749978645ad8e3f16757">fat16.h</a>
<li>fat16_read_dir()
: <a class="el" href="group__fat16.html#g73c8f0598e8224736b09644c48cf2970">fat16.h</a>
, <a class="el" href="group__fat16__dir.html#g73c8f0598e8224736b09644c48cf2970">fat16.c</a>
<li>fat16_read_file()
: <a class="el" href="group__fat16.html#g0af2ef3d690626a5640a334cefbb27a6">fat16.h</a>
, <a class="el" href="group__fat16__file.html#g0af2ef3d690626a5640a334cefbb27a6">fat16.c</a>
<li>fat16_reset_dir()
: <a class="el" href="group__fat16.html#gaed63addc9b9a3d5137f3b552abb42d8">fat16.h</a>
, <a class="el" href="group__fat16__dir.html#gaed63addc9b9a3d5137f3b552abb42d8">fat16.c</a>
<li>fat16_resize_file()
: <a class="el" href="group__fat16__file.html#g23740742fa60ca148ef098caac7085c0">fat16.c</a>
, <a class="el" href="group__fat16.html#g23740742fa60ca148ef098caac7085c0">fat16.h</a>
<li>FAT16_SEEK_CUR
: <a class="el" href="group__fat16__file.html#g432820c6f8c90e11a92efc931c3b8a3a">fat16.h</a>
<li>FAT16_SEEK_END
: <a class="el" href="group__fat16__file.html#g3793e580ccfcd5e68b95a0740c000e39">fat16.h</a>
<li>fat16_seek_file()
: <a class="el" href="group__fat16__file.html#gf1511fd1a5419d0828265566dc5d33e4">fat16.c</a>
, <a class="el" href="group__fat16.html#gf1511fd1a5419d0828265566dc5d33e4">fat16.h</a>
<li>FAT16_SEEK_SET
: <a class="el" href="group__fat16__file.html#gb90aeb34840c0ea33c8ae9d7577def65">fat16.h</a>
<li>fat16_write_file()
: <a class="el" href="group__fat16.html#g4f0c785a47b1cf070839b5edec2c6f65">fat16.h</a>
, <a class="el" href="group__fat16__file.html#g4f0c785a47b1cf070839b5edec2c6f65">fat16.c</a>
<li>FAT16_WRITE_SUPPORT
: <a class="el" href="group__fat16__config.html#g2115fb17b7fabf2e24432f05c6763be0">fat16_config.h</a>
</ul>
<h3><a class="anchor" name="index_p">- p -</a></h3><ul>
<li>partition_close()
: <a class="el" href="group__partition.html#g128f4363de35c81a9ff8026d4db289d2">partition.c</a>
<li>PARTITION_COUNT
: <a class="el" href="group__partition__config.html#gd3d3ffd91206adf249d3318930f024af">partition_config.h</a>
<li>partition_open()
: <a class="el" href="group__partition.html#g3125023db4e9d50adb8489c71fa1be68">partition.c</a>
<li>PARTITION_TYPE_EXTENDED
: <a class="el" href="group__partition.html#gceaa1bf17d4e8961726834e53ed79732">partition.h</a>
<li>PARTITION_TYPE_EXTENDED_LBA
: <a class="el" href="group__partition.html#g1c9a00e3b09b488ce7f3b2ef2904400b">partition.h</a>
<li>PARTITION_TYPE_FAT12
: <a class="el" href="group__partition.html#ga92b6c552d2411e093204cd3ed4cffa3">partition.h</a>
<li>PARTITION_TYPE_FAT16
: <a class="el" href="group__partition.html#gda7e1b4d950c7a3f42f559ab99f5fe43">partition.h</a>
<li>PARTITION_TYPE_FAT16_32MB
: <a class="el" href="group__partition.html#gf7296b4a29c1f7e5c39e28372648b2cd">partition.h</a>
<li>PARTITION_TYPE_FAT16_LBA
: <a class="el" href="group__partition.html#g52b69fda008ca19d75304a2385cc4900">partition.h</a>
<li>PARTITION_TYPE_FAT32
: <a class="el" href="group__partition.html#g2f6a6c30cc239ae13ea287ff901c95f4">partition.h</a>
<li>PARTITION_TYPE_FAT32_LBA
: <a class="el" href="group__partition.html#ga2e0c8e8b4ec10f7b342c0d554b5f6d8">partition.h</a>
<li>PARTITION_TYPE_FREE
: <a class="el" href="group__partition.html#gab5ffe2ef6119a6815c505e3103a2714">partition.h</a>
<li>PARTITION_TYPE_UNKNOWN
: <a class="el" href="group__partition.html#gcdc50585fe8130f0a4faee13caade86f">partition.h</a>
</ul>
<h3><a class="anchor" name="index_s">- s -</a></h3><ul>
<li>sd_raw_available()
: <a class="el" href="group__sd__raw.html#g5e227f25ad4a18466e7cdd9ecdfce8ab">sd_raw.c</a>
<li>SD_RAW_FORMAT_HARDDISK
: <a class="el" href="group__sd__raw.html#g2507a78d61385c9dbc1d06b8a03ef58a">sd_raw.h</a>
<li>SD_RAW_FORMAT_SUPERFLOPPY
: <a class="el" href="group__sd__raw.html#g4caede5500f4d1035ceb9951a831c224">sd_raw.h</a>
<li>SD_RAW_FORMAT_UNIVERSAL
: <a class="el" href="group__sd__raw.html#gd070d05f762410f57870549a0fcd5f43">sd_raw.h</a>
<li>SD_RAW_FORMAT_UNKNOWN
: <a class="el" href="group__sd__raw.html#g7e87231437f32335a25930ec1b85a9c9">sd_raw.h</a>
<li>sd_raw_get_info()
: <a class="el" href="group__sd__raw.html#g97c54e82834f87bcdd38e79822fe5a79">sd_raw.c</a>
<li>sd_raw_init()
: <a class="el" href="group__sd__raw.html#g82e8599b2679451e491484fb0b19bfd5">sd_raw.c</a>
<li>sd_raw_locked()
: <a class="el" href="group__sd__raw.html#g55f311428473cd5b85cf8f24ffba121b">sd_raw.c</a>
<li>sd_raw_read()
: <a class="el" href="group__sd__raw.html#g5f69513fd8228ea269a61f1dff737129">sd_raw.c</a>
<li>sd_raw_read_interval()
: <a class="el" href="group__sd__raw.html#gffd7c377b887bb05f7756ca827d3863e">sd_raw.c</a>
<li>SD_RAW_SAVE_RAM
: <a class="el" href="group__sd__raw__config.html#g4b98be138e87b8ab807d3f266a0c5bb9">sd_raw_config.h</a>
<li>sd_raw_sync()
: <a class="el" href="group__sd__raw.html#gd4d9ff40a7ea50c65cfa47927b35b735">sd_raw.c</a>
<li>sd_raw_write()
: <a class="el" href="group__sd__raw.html#g51fc917873e34e96cb981fbbb47a69c5">sd_raw.c</a>
<li>SD_RAW_WRITE_BUFFERING
: <a class="el" href="group__sd__raw__config.html#ga749d88c077a812f5c518e3172c96f9e">sd_raw_config.h</a>
<li>sd_raw_write_interval()
: <a class="el" href="group__sd__raw.html#gc004a1ffd2d552f8bc34ad1ced6181c4">sd_raw.c</a>
<li>SD_RAW_WRITE_SUPPORT
: <a class="el" href="group__sd__raw__config.html#g5f2253a3c408671f91f9aebefeef7472">sd_raw_config.h</a>
</ul>
<h3><a class="anchor" name="index_u">- u -</a></h3><ul>
<li>USE_DYNAMIC_MEMORY
: <a class="el" href="group__config.html#g59a630bfc97e8a00e2ad0a0ad4b2f8a7">sd-reader_config.h</a>
</ul>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Dec 13 19:38:48 2007 for sd-reader by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3-20071008 </small></address>
</body>
</html>
/Designs/GPSRL02A/SW/doc/html/globals_defs.html
0,0 → 1,122
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>sd-reader: Data Fields</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3-20071008 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li class="current"><a href="globals.html"><span>Globals</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="globals.html"><span>All</span></a></li>
<li><a href="globals_func.html"><span>Functions</span></a></li>
<li><a href="globals_type.html"><span>Typedefs</span></a></li>
<li class="current"><a href="globals_defs.html"><span>Defines</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="#index_f"><span>f</span></a></li>
<li><a href="#index_p"><span>p</span></a></li>
<li><a href="#index_s"><span>s</span></a></li>
<li><a href="#index_u"><span>u</span></a></li>
</ul>
</div>
 
<p>
&nbsp;
<p>
<h3><a class="anchor" name="index_f">- f -</a></h3><ul>
<li>FAT16_ATTRIB_ARCHIVE
: <a class="el" href="group__fat16__file.html#g8e472239ee6baede688a01eaa45551a9">fat16.h</a>
<li>FAT16_ATTRIB_DIR
: <a class="el" href="group__fat16__file.html#gafdb0e859960ff33b11b6c55b3188274">fat16.h</a>
<li>FAT16_ATTRIB_HIDDEN
: <a class="el" href="group__fat16__file.html#g229780f6a88ab775ea82264c9f1e0616">fat16.h</a>
<li>FAT16_ATTRIB_READONLY
: <a class="el" href="group__fat16__file.html#g1c4ea0b6e1087b1a88d26b8942c5d923">fat16.h</a>
<li>FAT16_ATTRIB_SYSTEM
: <a class="el" href="group__fat16__file.html#ga0badbbc92da7601b4a51d99ba7e8f8f">fat16.h</a>
<li>FAT16_ATTRIB_VOLUME
: <a class="el" href="group__fat16__file.html#gc1341eb7b40d2f48cacf9b9d8aedbb6c">fat16.h</a>
<li>FAT16_DATETIME_SUPPORT
: <a class="el" href="group__fat16__config.html#gffbde05a4ec649e5d2c69aea08fdafa0">fat16_config.h</a>
<li>FAT16_DIR_COUNT
: <a class="el" href="group__fat16__config.html#gae69ee783adf9002b0c746d8d2c59972">fat16_config.h</a>
<li>FAT16_FILE_COUNT
: <a class="el" href="group__fat16__config.html#g7f30592730b029696d314d0bb2f7803f">fat16_config.h</a>
<li>FAT16_FS_COUNT
: <a class="el" href="group__fat16__config.html#g4d805cbe04478a022ae0ea424ef95087">fat16_config.h</a>
<li>fat16_get_datetime
: <a class="el" href="group__fat16__config.html#g533b388bd0b3a2ab62e42122dd886419">fat16_config.h</a>
<li>FAT16_SEEK_CUR
: <a class="el" href="group__fat16__file.html#g432820c6f8c90e11a92efc931c3b8a3a">fat16.h</a>
<li>FAT16_SEEK_END
: <a class="el" href="group__fat16__file.html#g3793e580ccfcd5e68b95a0740c000e39">fat16.h</a>
<li>FAT16_SEEK_SET
: <a class="el" href="group__fat16__file.html#gb90aeb34840c0ea33c8ae9d7577def65">fat16.h</a>
<li>FAT16_WRITE_SUPPORT
: <a class="el" href="group__fat16__config.html#g2115fb17b7fabf2e24432f05c6763be0">fat16_config.h</a>
</ul>
<h3><a class="anchor" name="index_p">- p -</a></h3><ul>
<li>PARTITION_COUNT
: <a class="el" href="group__partition__config.html#gd3d3ffd91206adf249d3318930f024af">partition_config.h</a>
<li>PARTITION_TYPE_EXTENDED
: <a class="el" href="group__partition.html#gceaa1bf17d4e8961726834e53ed79732">partition.h</a>
<li>PARTITION_TYPE_EXTENDED_LBA
: <a class="el" href="group__partition.html#g1c9a00e3b09b488ce7f3b2ef2904400b">partition.h</a>
<li>PARTITION_TYPE_FAT12
: <a class="el" href="group__partition.html#ga92b6c552d2411e093204cd3ed4cffa3">partition.h</a>
<li>PARTITION_TYPE_FAT16
: <a class="el" href="group__partition.html#gda7e1b4d950c7a3f42f559ab99f5fe43">partition.h</a>
<li>PARTITION_TYPE_FAT16_32MB
: <a class="el" href="group__partition.html#gf7296b4a29c1f7e5c39e28372648b2cd">partition.h</a>
<li>PARTITION_TYPE_FAT16_LBA
: <a class="el" href="group__partition.html#g52b69fda008ca19d75304a2385cc4900">partition.h</a>
<li>PARTITION_TYPE_FAT32
: <a class="el" href="group__partition.html#g2f6a6c30cc239ae13ea287ff901c95f4">partition.h</a>
<li>PARTITION_TYPE_FAT32_LBA
: <a class="el" href="group__partition.html#ga2e0c8e8b4ec10f7b342c0d554b5f6d8">partition.h</a>
<li>PARTITION_TYPE_FREE
: <a class="el" href="group__partition.html#gab5ffe2ef6119a6815c505e3103a2714">partition.h</a>
<li>PARTITION_TYPE_UNKNOWN
: <a class="el" href="group__partition.html#gcdc50585fe8130f0a4faee13caade86f">partition.h</a>
</ul>
<h3><a class="anchor" name="index_s">- s -</a></h3><ul>
<li>SD_RAW_FORMAT_HARDDISK
: <a class="el" href="group__sd__raw.html#g2507a78d61385c9dbc1d06b8a03ef58a">sd_raw.h</a>
<li>SD_RAW_FORMAT_SUPERFLOPPY
: <a class="el" href="group__sd__raw.html#g4caede5500f4d1035ceb9951a831c224">sd_raw.h</a>
<li>SD_RAW_FORMAT_UNIVERSAL
: <a class="el" href="group__sd__raw.html#gd070d05f762410f57870549a0fcd5f43">sd_raw.h</a>
<li>SD_RAW_FORMAT_UNKNOWN
: <a class="el" href="group__sd__raw.html#g7e87231437f32335a25930ec1b85a9c9">sd_raw.h</a>
<li>SD_RAW_SAVE_RAM
: <a class="el" href="group__sd__raw__config.html#g4b98be138e87b8ab807d3f266a0c5bb9">sd_raw_config.h</a>
<li>SD_RAW_WRITE_BUFFERING
: <a class="el" href="group__sd__raw__config.html#ga749d88c077a812f5c518e3172c96f9e">sd_raw_config.h</a>
<li>SD_RAW_WRITE_SUPPORT
: <a class="el" href="group__sd__raw__config.html#g5f2253a3c408671f91f9aebefeef7472">sd_raw_config.h</a>
</ul>
<h3><a class="anchor" name="index_u">- u -</a></h3><ul>
<li>USE_DYNAMIC_MEMORY
: <a class="el" href="group__config.html#g59a630bfc97e8a00e2ad0a0ad4b2f8a7">sd-reader_config.h</a>
</ul>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Dec 13 19:38:48 2007 for sd-reader by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3-20071008 </small></address>
</body>
</html>
/Designs/GPSRL02A/SW/doc/html/globals_func.html
0,0 → 1,135
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>sd-reader: Data Fields</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3-20071008 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li class="current"><a href="globals.html"><span>Globals</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="globals.html"><span>All</span></a></li>
<li class="current"><a href="globals_func.html"><span>Functions</span></a></li>
<li><a href="globals_type.html"><span>Typedefs</span></a></li>
<li><a href="globals_defs.html"><span>Defines</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="#index_f"><span>f</span></a></li>
<li><a href="#index_p"><span>p</span></a></li>
<li><a href="#index_s"><span>s</span></a></li>
</ul>
</div>
 
<p>
&nbsp;
<p>
<h3><a class="anchor" name="index_f">- f -</a></h3><ul>
<li>fat16_close()
: <a class="el" href="group__fat16__fs.html#g6588833571e6ef0f5d094b8ff56a5985">fat16.c</a>
, <a class="el" href="group__fat16.html#g6588833571e6ef0f5d094b8ff56a5985">fat16.h</a>
<li>fat16_close_dir()
: <a class="el" href="group__fat16.html#g95f491a5a0b6438781aefaedc250e926">fat16.h</a>
, <a class="el" href="group__fat16__dir.html#g95f491a5a0b6438781aefaedc250e926">fat16.c</a>
<li>fat16_close_file()
: <a class="el" href="group__fat16__file.html#g2b2812041f489bc7913bfa5cbcf0172b">fat16.c</a>
, <a class="el" href="group__fat16.html#g2b2812041f489bc7913bfa5cbcf0172b">fat16.h</a>
<li>fat16_create_dir()
: <a class="el" href="group__fat16.html#g973def42513263e311ffa8e21f42b287">fat16.h</a>
, <a class="el" href="group__fat16__dir.html#g973def42513263e311ffa8e21f42b287">fat16.c</a>
<li>fat16_create_file()
: <a class="el" href="group__fat16__file.html#gf8029e3ec633902d08e8204d13afc350">fat16.c</a>
, <a class="el" href="group__fat16.html#gf8029e3ec633902d08e8204d13afc350">fat16.h</a>
<li>fat16_delete_dir()
: <a class="el" href="group__fat16__dir.html#gdf22d7b37d27047d41e6d5cbf93cdff4">fat16.c</a>
<li>fat16_delete_file()
: <a class="el" href="group__fat16__file.html#ge060faccbbeca802afe86be2f4d5b485">fat16.c</a>
, <a class="el" href="group__fat16.html#ge060faccbbeca802afe86be2f4d5b485">fat16.h</a>
<li>fat16_get_dir_entry_of_path()
: <a class="el" href="group__fat16__file.html#g0045fe378de2f7c52b528f985e1891a6">fat16.c</a>
, <a class="el" href="group__fat16.html#g0045fe378de2f7c52b528f985e1891a6">fat16.h</a>
<li>fat16_get_file_modification_date()
: <a class="el" href="group__fat16__file.html#g82c7347c5b3cd8832633d5303552eb38">fat16.c</a>
, <a class="el" href="group__fat16.html#g82c7347c5b3cd8832633d5303552eb38">fat16.h</a>
<li>fat16_get_file_modification_time()
: <a class="el" href="group__fat16__file.html#g5040fcab753ef55337292daf8c0d6784">fat16.c</a>
, <a class="el" href="group__fat16.html#g5040fcab753ef55337292daf8c0d6784">fat16.h</a>
<li>fat16_get_fs_free()
: <a class="el" href="group__fat16__fs.html#g2f8ff07cca44ecb6770b12a58b6cd8c7">fat16.c</a>
, <a class="el" href="group__fat16.html#g2f8ff07cca44ecb6770b12a58b6cd8c7">fat16.h</a>
<li>fat16_get_fs_size()
: <a class="el" href="group__fat16.html#g8af3c3535929e19b0039e07f1976cec7">fat16.h</a>
, <a class="el" href="group__fat16__fs.html#g8af3c3535929e19b0039e07f1976cec7">fat16.c</a>
<li>fat16_open()
: <a class="el" href="group__fat16__fs.html#gc176ec2f1bfa8c81972ea741a941e579">fat16.c</a>
, <a class="el" href="group__fat16.html#gc176ec2f1bfa8c81972ea741a941e579">fat16.h</a>
<li>fat16_open_dir()
: <a class="el" href="group__fat16.html#g9704120fef030632a76d91cfbbef78b0">fat16.h</a>
, <a class="el" href="group__fat16__dir.html#g9704120fef030632a76d91cfbbef78b0">fat16.c</a>
<li>fat16_open_file()
: <a class="el" href="group__fat16.html#g3a43c9943251749978645ad8e3f16757">fat16.h</a>
, <a class="el" href="group__fat16__file.html#g3a43c9943251749978645ad8e3f16757">fat16.c</a>
<li>fat16_read_dir()
: <a class="el" href="group__fat16.html#g73c8f0598e8224736b09644c48cf2970">fat16.h</a>
, <a class="el" href="group__fat16__dir.html#g73c8f0598e8224736b09644c48cf2970">fat16.c</a>
<li>fat16_read_file()
: <a class="el" href="group__fat16__file.html#g0af2ef3d690626a5640a334cefbb27a6">fat16.c</a>
, <a class="el" href="group__fat16.html#g0af2ef3d690626a5640a334cefbb27a6">fat16.h</a>
<li>fat16_reset_dir()
: <a class="el" href="group__fat16__dir.html#gaed63addc9b9a3d5137f3b552abb42d8">fat16.c</a>
, <a class="el" href="group__fat16.html#gaed63addc9b9a3d5137f3b552abb42d8">fat16.h</a>
<li>fat16_resize_file()
: <a class="el" href="group__fat16.html#g23740742fa60ca148ef098caac7085c0">fat16.h</a>
, <a class="el" href="group__fat16__file.html#g23740742fa60ca148ef098caac7085c0">fat16.c</a>
<li>fat16_seek_file()
: <a class="el" href="group__fat16__file.html#gf1511fd1a5419d0828265566dc5d33e4">fat16.c</a>
, <a class="el" href="group__fat16.html#gf1511fd1a5419d0828265566dc5d33e4">fat16.h</a>
<li>fat16_write_file()
: <a class="el" href="group__fat16.html#g4f0c785a47b1cf070839b5edec2c6f65">fat16.h</a>
, <a class="el" href="group__fat16__file.html#g4f0c785a47b1cf070839b5edec2c6f65">fat16.c</a>
</ul>
<h3><a class="anchor" name="index_p">- p -</a></h3><ul>
<li>partition_close()
: <a class="el" href="group__partition.html#g128f4363de35c81a9ff8026d4db289d2">partition.c</a>
<li>partition_open()
: <a class="el" href="group__partition.html#g3125023db4e9d50adb8489c71fa1be68">partition.c</a>
</ul>
<h3><a class="anchor" name="index_s">- s -</a></h3><ul>
<li>sd_raw_available()
: <a class="el" href="group__sd__raw.html#g5e227f25ad4a18466e7cdd9ecdfce8ab">sd_raw.c</a>
<li>sd_raw_get_info()
: <a class="el" href="group__sd__raw.html#g97c54e82834f87bcdd38e79822fe5a79">sd_raw.c</a>
<li>sd_raw_init()
: <a class="el" href="group__sd__raw.html#g82e8599b2679451e491484fb0b19bfd5">sd_raw.c</a>
<li>sd_raw_locked()
: <a class="el" href="group__sd__raw.html#g55f311428473cd5b85cf8f24ffba121b">sd_raw.c</a>
<li>sd_raw_read()
: <a class="el" href="group__sd__raw.html#g5f69513fd8228ea269a61f1dff737129">sd_raw.c</a>
<li>sd_raw_read_interval()
: <a class="el" href="group__sd__raw.html#gffd7c377b887bb05f7756ca827d3863e">sd_raw.c</a>
<li>sd_raw_sync()
: <a class="el" href="group__sd__raw.html#gd4d9ff40a7ea50c65cfa47927b35b735">sd_raw.c</a>
<li>sd_raw_write()
: <a class="el" href="group__sd__raw.html#g51fc917873e34e96cb981fbbb47a69c5">sd_raw.c</a>
<li>sd_raw_write_interval()
: <a class="el" href="group__sd__raw.html#gc004a1ffd2d552f8bc34ad1ced6181c4">sd_raw.c</a>
</ul>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Dec 13 19:38:48 2007 for sd-reader by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3-20071008 </small></address>
</body>
</html>
/Designs/GPSRL02A/SW/doc/html/globals_type.html
0,0 → 1,50
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>sd-reader: Data Fields</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3-20071008 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li class="current"><a href="globals.html"><span>Globals</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="globals.html"><span>All</span></a></li>
<li><a href="globals_func.html"><span>Functions</span></a></li>
<li class="current"><a href="globals_type.html"><span>Typedefs</span></a></li>
<li><a href="globals_defs.html"><span>Defines</span></a></li>
</ul>
</div>
&nbsp;
<p>
<ul>
<li>device_read_callback_t
: <a class="el" href="group__partition.html#g0c94a44bb3d9090d3ad662a4ea772f9b">partition.h</a>
<li>device_read_interval_t
: <a class="el" href="group__partition.html#gebc277053a3361aaf4b67a486e24fa24">partition.h</a>
<li>device_read_t
: <a class="el" href="group__partition.html#g6a2b9c5359ec033470fc25b2626e56fc">partition.h</a>
<li>device_write_callback_t
: <a class="el" href="group__partition.html#g089849983ec009841429eb6a1d3cb4cc">partition.h</a>
<li>device_write_interval_t
: <a class="el" href="group__partition.html#g975ce8905536b4c1020eb18b5b640158">partition.h</a>
<li>device_write_t
: <a class="el" href="group__partition.html#gc6ca9cbb79b5099d610e976365ee2e8e">partition.h</a>
</ul>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Dec 13 19:38:48 2007 for sd-reader by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3-20071008 </small></address>
</body>
</html>
/Designs/GPSRL02A/SW/doc/html/group__config.html
0,0 → 1,53
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>sd-reader: Sd-reader configuration</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3-20071008 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>Sd-reader configuration</h1>
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Files</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">file &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="sd-reader__config_8h.html">sd-reader_config.h</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Common sd-reader configuration used by all modules (license: GPLv2 or LGPLv2.1). <br></td></tr>
 
<p>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__config.html#g59a630bfc97e8a00e2ad0a0ad4b2f8a7">USE_DYNAMIC_MEMORY</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Controls allocation of memory. <a href="#g59a630bfc97e8a00e2ad0a0ad4b2f8a7"></a><br></td></tr>
</table>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="g59a630bfc97e8a00e2ad0a0ad4b2f8a7"></a><!-- doxytag: member="sd-reader_config.h::USE_DYNAMIC_MEMORY" ref="g59a630bfc97e8a00e2ad0a0ad4b2f8a7" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define USE_DYNAMIC_MEMORY </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Controls allocation of memory.
<p>
Set to 1 to use malloc()/free() for allocation of structures like file and directory handles, set to 0 to use pre-allocated fixed-size handle arrays.
</div>
</div><p>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Dec 13 19:38:48 2007 for sd-reader by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3-20071008 </small></address>
</body>
</html>
/Designs/GPSRL02A/SW/doc/html/group__fat16.html
0,0 → 1,924
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>sd-reader: FAT16 support</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3-20071008 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>FAT16 support</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
This module implements FAT16 read and write access.
<p>
The following features are supported:<ul>
<li>File names up to 31 characters long.</li><li>Unlimited depth of subdirectories.</li><li>Short 8.3 and long filenames.</li><li>Creating and deleting files.</li><li>Reading and writing from and to files.</li><li>File resizing.</li><li>File sizes of up to 4 gigabytes. </li></ul>
 
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Files</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">file &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="fat16_8c.html">fat16.c</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">FAT16 implementation (license: GPLv2 or LGPLv2.1). <br></td></tr>
 
<p>
<tr><td class="memItemLeft" nowrap align="right" valign="top">file &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="fat16_8h.html">fat16.h</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">FAT16 header (license: GPLv2 or LGPLv2.1). <br></td></tr>
 
<p>
<tr><td class="memItemLeft" nowrap align="right" valign="top">file &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="fat16__config_8h.html">fat16_config.h</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">FAT16 configuration (license: GPLv2 or LGPLv2.1). <br></td></tr>
 
<p>
<tr><td colspan="2"><br><h2>Modules</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__config.html">FAT16 configuration</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Preprocessor defines to configure the FAT16 implementation. <br></td></tr>
 
<p>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__fs.html">FAT16 access</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Basic functions for handling a FAT16 filesystem. <br></td></tr>
 
<p>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html">FAT16 file functions</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Functions for managing files. <br></td></tr>
 
<p>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__dir.html">FAT16 directory functions</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Functions for managing directories. <br></td></tr>
 
<p>
<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Describes a directory entry. <a href="structfat16__dir__entry__struct.html#_details">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct fat16_fs_struct *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#gc176ec2f1bfa8c81972ea741a941e579">fat16_open</a> (struct <a class="el" href="structpartition__struct.html">partition_struct</a> *partition)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Opens a FAT16 filesystem. <a href="#gc176ec2f1bfa8c81972ea741a941e579"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g6588833571e6ef0f5d094b8ff56a5985">fat16_close</a> (struct fat16_fs_struct *fs)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Closes a FAT16 filesystem. <a href="#g6588833571e6ef0f5d094b8ff56a5985"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct fat16_file_struct *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g3a43c9943251749978645ad8e3f16757">fat16_open_file</a> (struct fat16_fs_struct *fs, const struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Opens a file on a FAT16 filesystem. <a href="#g3a43c9943251749978645ad8e3f16757"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g2b2812041f489bc7913bfa5cbcf0172b">fat16_close_file</a> (struct fat16_file_struct *fd)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Closes a file. <a href="#g2b2812041f489bc7913bfa5cbcf0172b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int16_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g0af2ef3d690626a5640a334cefbb27a6">fat16_read_file</a> (struct fat16_file_struct *fd, uint8_t *buffer, uint16_t buffer_len)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reads data from a file. <a href="#g0af2ef3d690626a5640a334cefbb27a6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int16_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g4f0c785a47b1cf070839b5edec2c6f65">fat16_write_file</a> (struct fat16_file_struct *fd, const uint8_t *buffer, uint16_t buffer_len)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Writes data to a file. <a href="#g4f0c785a47b1cf070839b5edec2c6f65"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#gf1511fd1a5419d0828265566dc5d33e4">fat16_seek_file</a> (struct fat16_file_struct *fd, int32_t *offset, uint8_t whence)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Repositions the read/write file offset. <a href="#gf1511fd1a5419d0828265566dc5d33e4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g23740742fa60ca148ef098caac7085c0">fat16_resize_file</a> (struct fat16_file_struct *fd, uint32_t size)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Resizes a file to have a specific size. <a href="#g23740742fa60ca148ef098caac7085c0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct fat16_dir_struct *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g9704120fef030632a76d91cfbbef78b0">fat16_open_dir</a> (struct fat16_fs_struct *fs, const struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Opens a directory. <a href="#g9704120fef030632a76d91cfbbef78b0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g95f491a5a0b6438781aefaedc250e926">fat16_close_dir</a> (struct fat16_dir_struct *dd)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Closes a directory descriptor. <a href="#g95f491a5a0b6438781aefaedc250e926"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g73c8f0598e8224736b09644c48cf2970">fat16_read_dir</a> (struct fat16_dir_struct *dd, struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reads the next directory entry contained within a parent directory. <a href="#g73c8f0598e8224736b09644c48cf2970"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#gaed63addc9b9a3d5137f3b552abb42d8">fat16_reset_dir</a> (struct fat16_dir_struct *dd)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Resets a directory handle. <a href="#gaed63addc9b9a3d5137f3b552abb42d8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#gf8029e3ec633902d08e8204d13afc350">fat16_create_file</a> (struct fat16_dir_struct *parent, const char *file, struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a file. <a href="#gf8029e3ec633902d08e8204d13afc350"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#ge060faccbbeca802afe86be2f4d5b485">fat16_delete_file</a> (struct fat16_fs_struct *fs, struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deletes a file or directory. <a href="#ge060faccbbeca802afe86be2f4d5b485"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g973def42513263e311ffa8e21f42b287">fat16_create_dir</a> (struct fat16_dir_struct *parent, const char *dir, struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a directory. <a href="#g973def42513263e311ffa8e21f42b287"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g82c7347c5b3cd8832633d5303552eb38">fat16_get_file_modification_date</a> (const struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry, uint16_t *year, uint8_t *month, uint8_t *day)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the modification date of a file. <a href="#g82c7347c5b3cd8832633d5303552eb38"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g5040fcab753ef55337292daf8c0d6784">fat16_get_file_modification_time</a> (const struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry, uint8_t *hour, uint8_t *min, uint8_t *sec)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the modification time of a file. <a href="#g5040fcab753ef55337292daf8c0d6784"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g0045fe378de2f7c52b528f985e1891a6">fat16_get_dir_entry_of_path</a> (struct fat16_fs_struct *fs, const char *path, struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieves the directory entry of a path. <a href="#g0045fe378de2f7c52b528f985e1891a6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g8af3c3535929e19b0039e07f1976cec7">fat16_get_fs_size</a> (const struct fat16_fs_struct *fs)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the amount of total storage capacity of the filesystem in bytes. <a href="#g8af3c3535929e19b0039e07f1976cec7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16.html#g2f8ff07cca44ecb6770b12a58b6cd8c7">fat16_get_fs_free</a> (const struct fat16_fs_struct *fs)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the amount of free storage capacity on the filesystem in bytes. <a href="#g2f8ff07cca44ecb6770b12a58b6cd8c7"></a><br></td></tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="g6588833571e6ef0f5d094b8ff56a5985"></a><!-- doxytag: member="fat16.h::fat16_close" ref="g6588833571e6ef0f5d094b8ff56a5985" args="(struct fat16_fs_struct *fs)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fat16_close </td>
<td>(</td>
<td class="paramtype">struct fat16_fs_struct *&nbsp;</td>
<td class="paramname"> <em>fs</em> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Closes a FAT16 filesystem.
<p>
When this function returns, the given filesystem descriptor will be invalid.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fs</em>&nbsp;</td><td>The filesystem to close. </td></tr>
</table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat16.html#gc176ec2f1bfa8c81972ea741a941e579" title="Opens a FAT16 filesystem.">fat16_open</a> </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="g95f491a5a0b6438781aefaedc250e926"></a><!-- doxytag: member="fat16.h::fat16_close_dir" ref="g95f491a5a0b6438781aefaedc250e926" args="(struct fat16_dir_struct *dd)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fat16_close_dir </td>
<td>(</td>
<td class="paramtype">struct fat16_dir_struct *&nbsp;</td>
<td class="paramname"> <em>dd</em> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Closes a directory descriptor.
<p>
This function destroys a directory descriptor which was previously obtained by calling <a class="el" href="group__fat16__dir.html#g9704120fef030632a76d91cfbbef78b0" title="Opens a directory.">fat16_open_dir()</a>. When this function returns, the given descriptor will be invalid.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>dd</em>&nbsp;</td><td>The directory descriptor to close. </td></tr>
</table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat16.html#g9704120fef030632a76d91cfbbef78b0" title="Opens a directory.">fat16_open_dir</a> </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="g2b2812041f489bc7913bfa5cbcf0172b"></a><!-- doxytag: member="fat16.h::fat16_close_file" ref="g2b2812041f489bc7913bfa5cbcf0172b" args="(struct fat16_file_struct *fd)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fat16_close_file </td>
<td>(</td>
<td class="paramtype">struct fat16_file_struct *&nbsp;</td>
<td class="paramname"> <em>fd</em> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Closes a file.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fd</em>&nbsp;</td><td>The file handle of the file to close. </td></tr>
</table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat16.html#g3a43c9943251749978645ad8e3f16757" title="Opens a file on a FAT16 filesystem.">fat16_open_file</a> </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="g973def42513263e311ffa8e21f42b287"></a><!-- doxytag: member="fat16.h::fat16_create_dir" ref="g973def42513263e311ffa8e21f42b287" args="(struct fat16_dir_struct *parent, const char *dir, struct fat16_dir_entry_struct *dir_entry)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t fat16_create_dir </td>
<td>(</td>
<td class="paramtype">struct fat16_dir_struct *&nbsp;</td>
<td class="paramname"> <em>parent</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&nbsp;</td>
<td class="paramname"> <em>dir</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *&nbsp;</td>
<td class="paramname"> <em>dir_entry</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Creates a directory.
<p>
Creates a directory and obtains its directory entry. If the directory to create already exists, its directory entry will be returned within the dir_entry parameter.<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>The notes which apply to fat16_create_file also apply to this function.</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>parent</em>&nbsp;</td><td>The handle of the parent directory of the new directory. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>dir</em>&nbsp;</td><td>The name of the directory to create. </td></tr>
<tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>dir_entry</em>&nbsp;</td><td>The directory entry to fill for the new directory. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure, 1 on success. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat16__dir.html#gdf22d7b37d27047d41e6d5cbf93cdff4" title="Deletes a directory.">fat16_delete_dir</a> </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="gf8029e3ec633902d08e8204d13afc350"></a><!-- doxytag: member="fat16.h::fat16_create_file" ref="gf8029e3ec633902d08e8204d13afc350" args="(struct fat16_dir_struct *parent, const char *file, struct fat16_dir_entry_struct *dir_entry)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t fat16_create_file </td>
<td>(</td>
<td class="paramtype">struct fat16_dir_struct *&nbsp;</td>
<td class="paramname"> <em>parent</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&nbsp;</td>
<td class="paramname"> <em>file</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *&nbsp;</td>
<td class="paramname"> <em>dir_entry</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Creates a file.
<p>
Creates a file and obtains the directory entry of the new file. If the file to create already exists, the directory entry of the existing file will be returned within the dir_entry parameter.<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>The file name is not checked for invalid characters.<p>
The generation of the short 8.3 file name is quite simple. The first eight characters are used for the filename. The extension, if any, is made up of the first three characters following the last dot within the long filename. If the filename (without the extension) is longer than eight characters, the lower byte of the cluster number replaces the last two characters to avoid name clashes. In any other case, it is your responsibility to avoid name clashes.</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>parent</em>&nbsp;</td><td>The handle of the directory in which to create the file. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>file</em>&nbsp;</td><td>The name of the file to create. </td></tr>
<tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>dir_entry</em>&nbsp;</td><td>The directory entry to fill for the new file. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure, 1 on success. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat16.html#ge060faccbbeca802afe86be2f4d5b485" title="Deletes a file or directory.">fat16_delete_file</a> </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="ge060faccbbeca802afe86be2f4d5b485"></a><!-- doxytag: member="fat16.h::fat16_delete_file" ref="ge060faccbbeca802afe86be2f4d5b485" args="(struct fat16_fs_struct *fs, struct fat16_dir_entry_struct *dir_entry)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t fat16_delete_file </td>
<td>(</td>
<td class="paramtype">struct fat16_fs_struct *&nbsp;</td>
<td class="paramname"> <em>fs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *&nbsp;</td>
<td class="paramname"> <em>dir_entry</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Deletes a file or directory.
<p>
If a directory is deleted without first deleting its subdirectories and files, disk space occupied by these files will get wasted as there is no chance to release it and mark it as free.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fs</em>&nbsp;</td><td>The filesystem on which to operate. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>dir_entry</em>&nbsp;</td><td>The directory entry of the file to delete. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure, 1 on success. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat16.html#gf8029e3ec633902d08e8204d13afc350" title="Creates a file.">fat16_create_file</a> </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="g0045fe378de2f7c52b528f985e1891a6"></a><!-- doxytag: member="fat16.h::fat16_get_dir_entry_of_path" ref="g0045fe378de2f7c52b528f985e1891a6" args="(struct fat16_fs_struct *fs, const char *path, struct fat16_dir_entry_struct *dir_entry)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t fat16_get_dir_entry_of_path </td>
<td>(</td>
<td class="paramtype">struct fat16_fs_struct *&nbsp;</td>
<td class="paramname"> <em>fs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&nbsp;</td>
<td class="paramname"> <em>path</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *&nbsp;</td>
<td class="paramname"> <em>dir_entry</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Retrieves the directory entry of a path.
<p>
The given path may both describe a file or a directory.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fs</em>&nbsp;</td><td>The FAT16 filesystem on which to search. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>path</em>&nbsp;</td><td>The path of which to read the directory entry. </td></tr>
<tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>dir_entry</em>&nbsp;</td><td>The directory entry to fill. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure, 1 on success. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat16.html#g73c8f0598e8224736b09644c48cf2970" title="Reads the next directory entry contained within a parent directory.">fat16_read_dir</a> </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="g82c7347c5b3cd8832633d5303552eb38"></a><!-- doxytag: member="fat16.h::fat16_get_file_modification_date" ref="g82c7347c5b3cd8832633d5303552eb38" args="(const struct fat16_dir_entry_struct *dir_entry, uint16_t *year, uint8_t *month, uint8_t *day)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fat16_get_file_modification_date </td>
<td>(</td>
<td class="paramtype">const struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *&nbsp;</td>
<td class="paramname"> <em>dir_entry</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint16_t *&nbsp;</td>
<td class="paramname"> <em>year</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t *&nbsp;</td>
<td class="paramname"> <em>month</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t *&nbsp;</td>
<td class="paramname"> <em>day</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Returns the modification date of a file.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>dir_entry</em>&nbsp;</td><td>The directory entry of which to return the modification date. </td></tr>
<tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>year</em>&nbsp;</td><td>The year the file was last modified. </td></tr>
<tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>month</em>&nbsp;</td><td>The month the file was last modified. </td></tr>
<tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>day</em>&nbsp;</td><td>The day the file was last modified. </td></tr>
</table>
</dl>
 
</div>
</div><p>
<a class="anchor" name="g5040fcab753ef55337292daf8c0d6784"></a><!-- doxytag: member="fat16.h::fat16_get_file_modification_time" ref="g5040fcab753ef55337292daf8c0d6784" args="(const struct fat16_dir_entry_struct *dir_entry, uint8_t *hour, uint8_t *min, uint8_t *sec)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fat16_get_file_modification_time </td>
<td>(</td>
<td class="paramtype">const struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *&nbsp;</td>
<td class="paramname"> <em>dir_entry</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t *&nbsp;</td>
<td class="paramname"> <em>hour</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t *&nbsp;</td>
<td class="paramname"> <em>min</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t *&nbsp;</td>
<td class="paramname"> <em>sec</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Returns the modification time of a file.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>dir_entry</em>&nbsp;</td><td>The directory entry of which to return the modification time. </td></tr>
<tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>hour</em>&nbsp;</td><td>The hour the file was last modified. </td></tr>
<tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>min</em>&nbsp;</td><td>The min the file was last modified. </td></tr>
<tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>sec</em>&nbsp;</td><td>The sec the file was last modified. </td></tr>
</table>
</dl>
 
</div>
</div><p>
<a class="anchor" name="g2f8ff07cca44ecb6770b12a58b6cd8c7"></a><!-- doxytag: member="fat16.h::fat16_get_fs_free" ref="g2f8ff07cca44ecb6770b12a58b6cd8c7" args="(const struct fat16_fs_struct *fs)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t fat16_get_fs_free </td>
<td>(</td>
<td class="paramtype">const struct fat16_fs_struct *&nbsp;</td>
<td class="paramname"> <em>fs</em> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Returns the amount of free storage capacity on the filesystem in bytes.
<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>As the FAT16 filesystem is cluster based, this function does not return continuous values but multiples of the cluster size.</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fs</em>&nbsp;</td><td>The filesystem on which to operate. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure, the free filesystem space in bytes otherwise. </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="g8af3c3535929e19b0039e07f1976cec7"></a><!-- doxytag: member="fat16.h::fat16_get_fs_size" ref="g8af3c3535929e19b0039e07f1976cec7" args="(const struct fat16_fs_struct *fs)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t fat16_get_fs_size </td>
<td>(</td>
<td class="paramtype">const struct fat16_fs_struct *&nbsp;</td>
<td class="paramname"> <em>fs</em> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Returns the amount of total storage capacity of the filesystem in bytes.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fs</em>&nbsp;</td><td>The filesystem on which to operate. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure, the filesystem size in bytes otherwise. </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="gc176ec2f1bfa8c81972ea741a941e579"></a><!-- doxytag: member="fat16.h::fat16_open" ref="gc176ec2f1bfa8c81972ea741a941e579" args="(struct partition_struct *partition)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct fat16_fs_struct* fat16_open </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="structpartition__struct.html">partition_struct</a> *&nbsp;</td>
<td class="paramname"> <em>partition</em> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"><code> [read]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Opens a FAT16 filesystem.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>partition</em>&nbsp;</td><td>Discriptor of partition on which the filesystem resides. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on error, a FAT16 filesystem descriptor on success. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat16.html#gc176ec2f1bfa8c81972ea741a941e579" title="Opens a FAT16 filesystem.">fat16_open</a> </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="g9704120fef030632a76d91cfbbef78b0"></a><!-- doxytag: member="fat16.h::fat16_open_dir" ref="g9704120fef030632a76d91cfbbef78b0" args="(struct fat16_fs_struct *fs, const struct fat16_dir_entry_struct *dir_entry)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct fat16_dir_struct* fat16_open_dir </td>
<td>(</td>
<td class="paramtype">struct fat16_fs_struct *&nbsp;</td>
<td class="paramname"> <em>fs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *&nbsp;</td>
<td class="paramname"> <em>dir_entry</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"><code> [read]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Opens a directory.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fs</em>&nbsp;</td><td>The filesystem on which the directory to open resides. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>dir_entry</em>&nbsp;</td><td>The directory entry which stands for the directory to open. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>An opaque directory descriptor on success, 0 on failure. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat16.html#g95f491a5a0b6438781aefaedc250e926" title="Closes a directory descriptor.">fat16_close_dir</a> </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="g3a43c9943251749978645ad8e3f16757"></a><!-- doxytag: member="fat16.h::fat16_open_file" ref="g3a43c9943251749978645ad8e3f16757" args="(struct fat16_fs_struct *fs, const struct fat16_dir_entry_struct *dir_entry)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct fat16_file_struct* fat16_open_file </td>
<td>(</td>
<td class="paramtype">struct fat16_fs_struct *&nbsp;</td>
<td class="paramname"> <em>fs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *&nbsp;</td>
<td class="paramname"> <em>dir_entry</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"><code> [read]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Opens a file on a FAT16 filesystem.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fs</em>&nbsp;</td><td>The filesystem on which the file to open lies. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>dir_entry</em>&nbsp;</td><td>The directory entry of the file to open. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The file handle, or 0 on failure. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat16.html#g2b2812041f489bc7913bfa5cbcf0172b" title="Closes a file.">fat16_close_file</a> </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="g73c8f0598e8224736b09644c48cf2970"></a><!-- doxytag: member="fat16.h::fat16_read_dir" ref="g73c8f0598e8224736b09644c48cf2970" args="(struct fat16_dir_struct *dd, struct fat16_dir_entry_struct *dir_entry)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t fat16_read_dir </td>
<td>(</td>
<td class="paramtype">struct fat16_dir_struct *&nbsp;</td>
<td class="paramname"> <em>dd</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *&nbsp;</td>
<td class="paramname"> <em>dir_entry</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Reads the next directory entry contained within a parent directory.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>dd</em>&nbsp;</td><td>The descriptor of the parent directory from which to read the entry. </td></tr>
<tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>dir_entry</em>&nbsp;</td><td>Pointer to a buffer into which to write the directory entry information. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure, 1 on success. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat16.html#gaed63addc9b9a3d5137f3b552abb42d8" title="Resets a directory handle.">fat16_reset_dir</a> </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="g0af2ef3d690626a5640a334cefbb27a6"></a><!-- doxytag: member="fat16.h::fat16_read_file" ref="g0af2ef3d690626a5640a334cefbb27a6" args="(struct fat16_file_struct *fd, uint8_t *buffer, uint16_t buffer_len)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int16_t fat16_read_file </td>
<td>(</td>
<td class="paramtype">struct fat16_file_struct *&nbsp;</td>
<td class="paramname"> <em>fd</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t *&nbsp;</td>
<td class="paramname"> <em>buffer</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint16_t&nbsp;</td>
<td class="paramname"> <em>buffer_len</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Reads data from a file.
<p>
The data requested is read from the current file location.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fd</em>&nbsp;</td><td>The file handle of the file from which to read. </td></tr>
<tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>buffer</em>&nbsp;</td><td>The buffer into which to write. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>buffer_len</em>&nbsp;</td><td>The amount of data to read. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The number of bytes read, 0 on end of file, or -1 on failure. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat16.html#g4f0c785a47b1cf070839b5edec2c6f65" title="Writes data to a file.">fat16_write_file</a> </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="gaed63addc9b9a3d5137f3b552abb42d8"></a><!-- doxytag: member="fat16.h::fat16_reset_dir" ref="gaed63addc9b9a3d5137f3b552abb42d8" args="(struct fat16_dir_struct *dd)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t fat16_reset_dir </td>
<td>(</td>
<td class="paramtype">struct fat16_dir_struct *&nbsp;</td>
<td class="paramname"> <em>dd</em> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Resets a directory handle.
<p>
Resets the directory handle such that reading restarts with the first directory entry.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>dd</em>&nbsp;</td><td>The directory handle to reset. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure, 1 on success. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat16.html#g73c8f0598e8224736b09644c48cf2970" title="Reads the next directory entry contained within a parent directory.">fat16_read_dir</a> </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="g23740742fa60ca148ef098caac7085c0"></a><!-- doxytag: member="fat16.h::fat16_resize_file" ref="g23740742fa60ca148ef098caac7085c0" args="(struct fat16_file_struct *fd, uint32_t size)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t fat16_resize_file </td>
<td>(</td>
<td class="paramtype">struct fat16_file_struct *&nbsp;</td>
<td class="paramname"> <em>fd</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&nbsp;</td>
<td class="paramname"> <em>size</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Resizes a file to have a specific size.
<p>
Enlarges or shrinks the file pointed to by the file descriptor to have exactly the specified size.<p>
If the file is truncated, all bytes having an equal or larger offset than the given size are lost. If the file is expanded, the additional bytes are allocated.<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>Please be aware that this function just allocates or deallocates disk space, it does not explicitely clear it. To avoid data leakage, this must be done manually.</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fd</em>&nbsp;</td><td>The file decriptor of the file which to resize. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>size</em>&nbsp;</td><td>The new size of the file. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure, 1 on success. </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="gf1511fd1a5419d0828265566dc5d33e4"></a><!-- doxytag: member="fat16.h::fat16_seek_file" ref="gf1511fd1a5419d0828265566dc5d33e4" args="(struct fat16_file_struct *fd, int32_t *offset, uint8_t whence)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t fat16_seek_file </td>
<td>(</td>
<td class="paramtype">struct fat16_file_struct *&nbsp;</td>
<td class="paramname"> <em>fd</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int32_t *&nbsp;</td>
<td class="paramname"> <em>offset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&nbsp;</td>
<td class="paramname"> <em>whence</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Repositions the read/write file offset.
<p>
Changes the file offset where the next call to <a class="el" href="group__fat16__file.html#g0af2ef3d690626a5640a334cefbb27a6" title="Reads data from a file.">fat16_read_file()</a> or <a class="el" href="group__fat16__file.html#g4f0c785a47b1cf070839b5edec2c6f65" title="Writes data to a file.">fat16_write_file()</a> starts reading/writing.<p>
If the new offset is beyond the end of the file, <a class="el" href="group__fat16__file.html#g23740742fa60ca148ef098caac7085c0" title="Resizes a file to have a specific size.">fat16_resize_file()</a> is implicitly called, i.e. the file is expanded.<p>
The new offset can be given in different ways determined by the <code>whence</code> parameter:<ul>
<li><b>FAT16_SEEK_SET:</b> <code>*offset</code> is relative to the beginning of the file.</li><li><b>FAT16_SEEK_CUR:</b> <code>*offset</code> is relative to the current file position.</li><li><b>FAT16_SEEK_END:</b> <code>*offset</code> is relative to the end of the file.</li></ul>
<p>
The resulting absolute offset is written to the location the <code>offset</code> parameter points to.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fd</em>&nbsp;</td><td>The file decriptor of the file on which to seek. </td></tr>
<tr><td valign="top"><tt>[in,out]</tt>&nbsp;</td><td valign="top"><em>offset</em>&nbsp;</td><td>A pointer to the new offset, as affected by the <code>whence</code> parameter. The function writes the new absolute offset to this location before it returns. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>whence</em>&nbsp;</td><td>Affects the way <code>offset</code> is interpreted, see above. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure, 1 on success. </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="g4f0c785a47b1cf070839b5edec2c6f65"></a><!-- doxytag: member="fat16.h::fat16_write_file" ref="g4f0c785a47b1cf070839b5edec2c6f65" args="(struct fat16_file_struct *fd, const uint8_t *buffer, uint16_t buffer_len)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int16_t fat16_write_file </td>
<td>(</td>
<td class="paramtype">struct fat16_file_struct *&nbsp;</td>
<td class="paramname"> <em>fd</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint8_t *&nbsp;</td>
<td class="paramname"> <em>buffer</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint16_t&nbsp;</td>
<td class="paramname"> <em>buffer_len</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Writes data to a file.
<p>
The data is written to the current file location.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fd</em>&nbsp;</td><td>The file handle of the file to which to write. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>buffer</em>&nbsp;</td><td>The buffer from which to read the data to be written. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>buffer_len</em>&nbsp;</td><td>The amount of data to write. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The number of bytes written, 0 on disk full, or -1 on failure. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat16.html#g0af2ef3d690626a5640a334cefbb27a6" title="Reads data from a file.">fat16_read_file</a> </dd></dl>
 
</div>
</div><p>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Dec 13 19:38:48 2007 for sd-reader by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3-20071008 </small></address>
</body>
</html>
/Designs/GPSRL02A/SW/doc/html/group__fat16__config.html
0,0 → 1,137
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>sd-reader: FAT16 configuration</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3-20071008 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>FAT16 configuration<br>
<small>
[<a class="el" href="group__fat16.html">FAT16 support</a>]</small>
</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
Preprocessor defines to configure the FAT16 implementation.
<p>
 
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__config.html#g2115fb17b7fabf2e24432f05c6763be0">FAT16_WRITE_SUPPORT</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Controls FAT16 write support. <a href="#g2115fb17b7fabf2e24432f05c6763be0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__config.html#gffbde05a4ec649e5d2c69aea08fdafa0">FAT16_DATETIME_SUPPORT</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Controls FAT16 date and time support. <a href="#gffbde05a4ec649e5d2c69aea08fdafa0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__config.html#g533b388bd0b3a2ab62e42122dd886419">fat16_get_datetime</a>(year, month, day, hour, min, sec)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Determines the function used for retrieving current date and time. <a href="#g533b388bd0b3a2ab62e42122dd886419"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g4d805cbe04478a022ae0ea424ef95087"></a><!-- doxytag: member="fat16_config::FAT16_FS_COUNT" ref="g4d805cbe04478a022ae0ea424ef95087" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__config.html#g4d805cbe04478a022ae0ea424ef95087">FAT16_FS_COUNT</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Maximum number of filesystem handles. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g7f30592730b029696d314d0bb2f7803f"></a><!-- doxytag: member="fat16_config::FAT16_FILE_COUNT" ref="g7f30592730b029696d314d0bb2f7803f" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__config.html#g7f30592730b029696d314d0bb2f7803f">FAT16_FILE_COUNT</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Maximum number of file handles. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gae69ee783adf9002b0c746d8d2c59972"></a><!-- doxytag: member="fat16_config::FAT16_DIR_COUNT" ref="gae69ee783adf9002b0c746d8d2c59972" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__config.html#gae69ee783adf9002b0c746d8d2c59972">FAT16_DIR_COUNT</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Maximum number of directory handles. <br></td></tr>
</table>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="gffbde05a4ec649e5d2c69aea08fdafa0"></a><!-- doxytag: member="fat16_config.h::FAT16_DATETIME_SUPPORT" ref="gffbde05a4ec649e5d2c69aea08fdafa0" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define FAT16_DATETIME_SUPPORT </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Controls FAT16 date and time support.
<p>
Set to 1 to enable FAT16 date and time stamping support.
</div>
</div><p>
<a class="anchor" name="g533b388bd0b3a2ab62e42122dd886419"></a><!-- doxytag: member="fat16_config.h::fat16_get_datetime" ref="g533b388bd0b3a2ab62e42122dd886419" args="(year, month, day, hour, min, sec)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define fat16_get_datetime </td>
<td>(</td>
<td class="paramtype">year, <tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">month, <tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">day, <tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">hour, <tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">min, <tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">sec&nbsp;</td>
<td class="paramname"> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Determines the function used for retrieving current date and time.
<p>
Define this to the function call which shall be used to retrieve current date and time.<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>Used only when FAT16_DATETIME_SUPPORT is 1.</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>year</em>&nbsp;</td><td>Pointer to a <code>uint16_t</code> which receives the current year. </td></tr>
<tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>month</em>&nbsp;</td><td>Pointer to a <code>uint8_t</code> which receives the current month. </td></tr>
<tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>day</em>&nbsp;</td><td>Pointer to a <code>uint8_t</code> which receives the current day. </td></tr>
<tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>hour</em>&nbsp;</td><td>Pointer to a <code>uint8_t</code> which receives the current hour. </td></tr>
<tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>min</em>&nbsp;</td><td>Pointer to a <code>uint8_t</code> which receives the current minute. </td></tr>
<tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>sec</em>&nbsp;</td><td>Pointer to a <code>uint8_t</code> which receives the current sec. </td></tr>
</table>
</dl>
 
</div>
</div><p>
<a class="anchor" name="g2115fb17b7fabf2e24432f05c6763be0"></a><!-- doxytag: member="fat16_config.h::FAT16_WRITE_SUPPORT" ref="g2115fb17b7fabf2e24432f05c6763be0" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define FAT16_WRITE_SUPPORT </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Controls FAT16 write support.
<p>
Set to 1 to enable FAT16 write support, set to 0 to disable it.
</div>
</div><p>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Dec 13 19:38:48 2007 for sd-reader by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3-20071008 </small></address>
</body>
</html>
/Designs/GPSRL02A/SW/doc/html/group__fat16__dir.html
0,0 → 1,276
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>sd-reader: FAT16 directory functions</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3-20071008 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>FAT16 directory functions<br>
<small>
[<a class="el" href="group__fat16.html">FAT16 support</a>]</small>
</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
Functions for managing directories.
<p>
 
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct fat16_dir_struct *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__dir.html#g9704120fef030632a76d91cfbbef78b0">fat16_open_dir</a> (struct fat16_fs_struct *fs, const struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Opens a directory. <a href="#g9704120fef030632a76d91cfbbef78b0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__dir.html#g95f491a5a0b6438781aefaedc250e926">fat16_close_dir</a> (struct fat16_dir_struct *dd)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Closes a directory descriptor. <a href="#g95f491a5a0b6438781aefaedc250e926"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__dir.html#g73c8f0598e8224736b09644c48cf2970">fat16_read_dir</a> (struct fat16_dir_struct *dd, struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reads the next directory entry contained within a parent directory. <a href="#g73c8f0598e8224736b09644c48cf2970"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__dir.html#gaed63addc9b9a3d5137f3b552abb42d8">fat16_reset_dir</a> (struct fat16_dir_struct *dd)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Resets a directory handle. <a href="#gaed63addc9b9a3d5137f3b552abb42d8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__dir.html#g973def42513263e311ffa8e21f42b287">fat16_create_dir</a> (struct fat16_dir_struct *parent, const char *dir, struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a directory. <a href="#g973def42513263e311ffa8e21f42b287"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__dir.html#gdf22d7b37d27047d41e6d5cbf93cdff4">fat16_delete_dir</a> (struct fat16_fs_struct *fs, struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deletes a directory. <a href="#gdf22d7b37d27047d41e6d5cbf93cdff4"></a><br></td></tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="g95f491a5a0b6438781aefaedc250e926"></a><!-- doxytag: member="fat16.c::fat16_close_dir" ref="g95f491a5a0b6438781aefaedc250e926" args="(struct fat16_dir_struct *dd)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fat16_close_dir </td>
<td>(</td>
<td class="paramtype">struct fat16_dir_struct *&nbsp;</td>
<td class="paramname"> <em>dd</em> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Closes a directory descriptor.
<p>
This function destroys a directory descriptor which was previously obtained by calling <a class="el" href="group__fat16__dir.html#g9704120fef030632a76d91cfbbef78b0" title="Opens a directory.">fat16_open_dir()</a>. When this function returns, the given descriptor will be invalid.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>dd</em>&nbsp;</td><td>The directory descriptor to close. </td></tr>
</table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat16.html#g9704120fef030632a76d91cfbbef78b0" title="Opens a directory.">fat16_open_dir</a> </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="g973def42513263e311ffa8e21f42b287"></a><!-- doxytag: member="fat16.c::fat16_create_dir" ref="g973def42513263e311ffa8e21f42b287" args="(struct fat16_dir_struct *parent, const char *dir, struct fat16_dir_entry_struct *dir_entry)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t fat16_create_dir </td>
<td>(</td>
<td class="paramtype">struct fat16_dir_struct *&nbsp;</td>
<td class="paramname"> <em>parent</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&nbsp;</td>
<td class="paramname"> <em>dir</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *&nbsp;</td>
<td class="paramname"> <em>dir_entry</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Creates a directory.
<p>
Creates a directory and obtains its directory entry. If the directory to create already exists, its directory entry will be returned within the dir_entry parameter.<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>The notes which apply to fat16_create_file also apply to this function.</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>parent</em>&nbsp;</td><td>The handle of the parent directory of the new directory. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>dir</em>&nbsp;</td><td>The name of the directory to create. </td></tr>
<tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>dir_entry</em>&nbsp;</td><td>The directory entry to fill for the new directory. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure, 1 on success. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat16__dir.html#gdf22d7b37d27047d41e6d5cbf93cdff4" title="Deletes a directory.">fat16_delete_dir</a> </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="gdf22d7b37d27047d41e6d5cbf93cdff4"></a><!-- doxytag: member="fat16.c::fat16_delete_dir" ref="gdf22d7b37d27047d41e6d5cbf93cdff4" args="(struct fat16_fs_struct *fs, struct fat16_dir_entry_struct *dir_entry)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t fat16_delete_dir </td>
<td>(</td>
<td class="paramtype">struct fat16_fs_struct *&nbsp;</td>
<td class="paramname"> <em>fs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *&nbsp;</td>
<td class="paramname"> <em>dir_entry</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Deletes a directory.
<p>
This is just a synonym for <a class="el" href="group__fat16__file.html#ge060faccbbeca802afe86be2f4d5b485" title="Deletes a file or directory.">fat16_delete_file()</a>. If a directory is deleted without first deleting its subdirectories and files, disk space occupied by these files will get wasted as there is no chance to release it and mark it as free.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fs</em>&nbsp;</td><td>The filesystem on which to operate. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>dir_entry</em>&nbsp;</td><td>The directory entry of the directory to delete. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure, 1 on success. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat16.html#g973def42513263e311ffa8e21f42b287" title="Creates a directory.">fat16_create_dir</a> </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="g9704120fef030632a76d91cfbbef78b0"></a><!-- doxytag: member="fat16.c::fat16_open_dir" ref="g9704120fef030632a76d91cfbbef78b0" args="(struct fat16_fs_struct *fs, const struct fat16_dir_entry_struct *dir_entry)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct fat16_dir_struct* fat16_open_dir </td>
<td>(</td>
<td class="paramtype">struct fat16_fs_struct *&nbsp;</td>
<td class="paramname"> <em>fs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *&nbsp;</td>
<td class="paramname"> <em>dir_entry</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"><code> [read]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Opens a directory.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fs</em>&nbsp;</td><td>The filesystem on which the directory to open resides. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>dir_entry</em>&nbsp;</td><td>The directory entry which stands for the directory to open. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>An opaque directory descriptor on success, 0 on failure. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat16.html#g95f491a5a0b6438781aefaedc250e926" title="Closes a directory descriptor.">fat16_close_dir</a> </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="g73c8f0598e8224736b09644c48cf2970"></a><!-- doxytag: member="fat16.c::fat16_read_dir" ref="g73c8f0598e8224736b09644c48cf2970" args="(struct fat16_dir_struct *dd, struct fat16_dir_entry_struct *dir_entry)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t fat16_read_dir </td>
<td>(</td>
<td class="paramtype">struct fat16_dir_struct *&nbsp;</td>
<td class="paramname"> <em>dd</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *&nbsp;</td>
<td class="paramname"> <em>dir_entry</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Reads the next directory entry contained within a parent directory.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>dd</em>&nbsp;</td><td>The descriptor of the parent directory from which to read the entry. </td></tr>
<tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>dir_entry</em>&nbsp;</td><td>Pointer to a buffer into which to write the directory entry information. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure, 1 on success. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat16.html#gaed63addc9b9a3d5137f3b552abb42d8" title="Resets a directory handle.">fat16_reset_dir</a> </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="gaed63addc9b9a3d5137f3b552abb42d8"></a><!-- doxytag: member="fat16.c::fat16_reset_dir" ref="gaed63addc9b9a3d5137f3b552abb42d8" args="(struct fat16_dir_struct *dd)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t fat16_reset_dir </td>
<td>(</td>
<td class="paramtype">struct fat16_dir_struct *&nbsp;</td>
<td class="paramname"> <em>dd</em> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Resets a directory handle.
<p>
Resets the directory handle such that reading restarts with the first directory entry.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>dd</em>&nbsp;</td><td>The directory handle to reset. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure, 1 on success. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat16.html#g73c8f0598e8224736b09644c48cf2970" title="Reads the next directory entry contained within a parent directory.">fat16_read_dir</a> </dd></dl>
 
</div>
</div><p>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Dec 13 19:38:48 2007 for sd-reader by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3-20071008 </small></address>
</body>
</html>
/Designs/GPSRL02A/SW/doc/html/group__fat16__file.html
0,0 → 1,743
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>sd-reader: FAT16 file functions</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3-20071008 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>FAT16 file functions<br>
<small>
[<a class="el" href="group__fat16.html">FAT16 support</a>]</small>
</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
Functions for managing files.
<p>
 
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Describes a directory entry. <a href="structfat16__dir__entry__struct.html#_details">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#g1c4ea0b6e1087b1a88d26b8942c5d923">FAT16_ATTRIB_READONLY</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The file is read-only. <a href="#g1c4ea0b6e1087b1a88d26b8942c5d923"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#g229780f6a88ab775ea82264c9f1e0616">FAT16_ATTRIB_HIDDEN</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The file is hidden. <a href="#g229780f6a88ab775ea82264c9f1e0616"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#ga0badbbc92da7601b4a51d99ba7e8f8f">FAT16_ATTRIB_SYSTEM</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The file is a system file. <a href="#ga0badbbc92da7601b4a51d99ba7e8f8f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#gc1341eb7b40d2f48cacf9b9d8aedbb6c">FAT16_ATTRIB_VOLUME</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The file is empty and has the volume label as its name. <a href="#gc1341eb7b40d2f48cacf9b9d8aedbb6c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#gafdb0e859960ff33b11b6c55b3188274">FAT16_ATTRIB_DIR</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The file is a directory. <a href="#gafdb0e859960ff33b11b6c55b3188274"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#g8e472239ee6baede688a01eaa45551a9">FAT16_ATTRIB_ARCHIVE</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The file has to be archived. <a href="#g8e472239ee6baede688a01eaa45551a9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#gb90aeb34840c0ea33c8ae9d7577def65">FAT16_SEEK_SET</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The given offset is relative to the beginning of the file. <a href="#gb90aeb34840c0ea33c8ae9d7577def65"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#g432820c6f8c90e11a92efc931c3b8a3a">FAT16_SEEK_CUR</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The given offset is relative to the current read/write position. <a href="#g432820c6f8c90e11a92efc931c3b8a3a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#g3793e580ccfcd5e68b95a0740c000e39">FAT16_SEEK_END</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The given offset is relative to the end of the file. <a href="#g3793e580ccfcd5e68b95a0740c000e39"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#g0045fe378de2f7c52b528f985e1891a6">fat16_get_dir_entry_of_path</a> (struct fat16_fs_struct *fs, const char *path, struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieves the directory entry of a path. <a href="#g0045fe378de2f7c52b528f985e1891a6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct fat16_file_struct *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#g3a43c9943251749978645ad8e3f16757">fat16_open_file</a> (struct fat16_fs_struct *fs, const struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Opens a file on a FAT16 filesystem. <a href="#g3a43c9943251749978645ad8e3f16757"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#g2b2812041f489bc7913bfa5cbcf0172b">fat16_close_file</a> (struct fat16_file_struct *fd)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Closes a file. <a href="#g2b2812041f489bc7913bfa5cbcf0172b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int16_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#g0af2ef3d690626a5640a334cefbb27a6">fat16_read_file</a> (struct fat16_file_struct *fd, uint8_t *buffer, uint16_t buffer_len)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reads data from a file. <a href="#g0af2ef3d690626a5640a334cefbb27a6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int16_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#g4f0c785a47b1cf070839b5edec2c6f65">fat16_write_file</a> (struct fat16_file_struct *fd, const uint8_t *buffer, uint16_t buffer_len)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Writes data to a file. <a href="#g4f0c785a47b1cf070839b5edec2c6f65"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#gf1511fd1a5419d0828265566dc5d33e4">fat16_seek_file</a> (struct fat16_file_struct *fd, int32_t *offset, uint8_t whence)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Repositions the read/write file offset. <a href="#gf1511fd1a5419d0828265566dc5d33e4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#g23740742fa60ca148ef098caac7085c0">fat16_resize_file</a> (struct fat16_file_struct *fd, uint32_t size)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Resizes a file to have a specific size. <a href="#g23740742fa60ca148ef098caac7085c0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#gf8029e3ec633902d08e8204d13afc350">fat16_create_file</a> (struct fat16_dir_struct *parent, const char *file, struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a file. <a href="#gf8029e3ec633902d08e8204d13afc350"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#ge060faccbbeca802afe86be2f4d5b485">fat16_delete_file</a> (struct fat16_fs_struct *fs, struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deletes a file or directory. <a href="#ge060faccbbeca802afe86be2f4d5b485"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#g82c7347c5b3cd8832633d5303552eb38">fat16_get_file_modification_date</a> (const struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry, uint16_t *year, uint8_t *month, uint8_t *day)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the modification date of a file. <a href="#g82c7347c5b3cd8832633d5303552eb38"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__file.html#g5040fcab753ef55337292daf8c0d6784">fat16_get_file_modification_time</a> (const struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *dir_entry, uint8_t *hour, uint8_t *min, uint8_t *sec)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the modification time of a file. <a href="#g5040fcab753ef55337292daf8c0d6784"></a><br></td></tr>
</table>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="g8e472239ee6baede688a01eaa45551a9"></a><!-- doxytag: member="fat16.h::FAT16_ATTRIB_ARCHIVE" ref="g8e472239ee6baede688a01eaa45551a9" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define FAT16_ATTRIB_ARCHIVE </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
The file has to be archived.
<p>
 
</div>
</div><p>
<a class="anchor" name="gafdb0e859960ff33b11b6c55b3188274"></a><!-- doxytag: member="fat16.h::FAT16_ATTRIB_DIR" ref="gafdb0e859960ff33b11b6c55b3188274" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define FAT16_ATTRIB_DIR </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
The file is a directory.
<p>
 
</div>
</div><p>
<a class="anchor" name="g229780f6a88ab775ea82264c9f1e0616"></a><!-- doxytag: member="fat16.h::FAT16_ATTRIB_HIDDEN" ref="g229780f6a88ab775ea82264c9f1e0616" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define FAT16_ATTRIB_HIDDEN </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
The file is hidden.
<p>
 
</div>
</div><p>
<a class="anchor" name="g1c4ea0b6e1087b1a88d26b8942c5d923"></a><!-- doxytag: member="fat16.h::FAT16_ATTRIB_READONLY" ref="g1c4ea0b6e1087b1a88d26b8942c5d923" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define FAT16_ATTRIB_READONLY </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
The file is read-only.
<p>
 
</div>
</div><p>
<a class="anchor" name="ga0badbbc92da7601b4a51d99ba7e8f8f"></a><!-- doxytag: member="fat16.h::FAT16_ATTRIB_SYSTEM" ref="ga0badbbc92da7601b4a51d99ba7e8f8f" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define FAT16_ATTRIB_SYSTEM </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
The file is a system file.
<p>
 
</div>
</div><p>
<a class="anchor" name="gc1341eb7b40d2f48cacf9b9d8aedbb6c"></a><!-- doxytag: member="fat16.h::FAT16_ATTRIB_VOLUME" ref="gc1341eb7b40d2f48cacf9b9d8aedbb6c" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define FAT16_ATTRIB_VOLUME </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
The file is empty and has the volume label as its name.
<p>
 
</div>
</div><p>
<a class="anchor" name="g432820c6f8c90e11a92efc931c3b8a3a"></a><!-- doxytag: member="fat16.h::FAT16_SEEK_CUR" ref="g432820c6f8c90e11a92efc931c3b8a3a" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define FAT16_SEEK_CUR </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
The given offset is relative to the current read/write position.
<p>
 
</div>
</div><p>
<a class="anchor" name="g3793e580ccfcd5e68b95a0740c000e39"></a><!-- doxytag: member="fat16.h::FAT16_SEEK_END" ref="g3793e580ccfcd5e68b95a0740c000e39" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define FAT16_SEEK_END </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
The given offset is relative to the end of the file.
<p>
 
</div>
</div><p>
<a class="anchor" name="gb90aeb34840c0ea33c8ae9d7577def65"></a><!-- doxytag: member="fat16.h::FAT16_SEEK_SET" ref="gb90aeb34840c0ea33c8ae9d7577def65" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define FAT16_SEEK_SET </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
The given offset is relative to the beginning of the file.
<p>
 
</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="g2b2812041f489bc7913bfa5cbcf0172b"></a><!-- doxytag: member="fat16.c::fat16_close_file" ref="g2b2812041f489bc7913bfa5cbcf0172b" args="(struct fat16_file_struct *fd)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fat16_close_file </td>
<td>(</td>
<td class="paramtype">struct fat16_file_struct *&nbsp;</td>
<td class="paramname"> <em>fd</em> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Closes a file.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fd</em>&nbsp;</td><td>The file handle of the file to close. </td></tr>
</table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat16.html#g3a43c9943251749978645ad8e3f16757" title="Opens a file on a FAT16 filesystem.">fat16_open_file</a> </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="gf8029e3ec633902d08e8204d13afc350"></a><!-- doxytag: member="fat16.c::fat16_create_file" ref="gf8029e3ec633902d08e8204d13afc350" args="(struct fat16_dir_struct *parent, const char *file, struct fat16_dir_entry_struct *dir_entry)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t fat16_create_file </td>
<td>(</td>
<td class="paramtype">struct fat16_dir_struct *&nbsp;</td>
<td class="paramname"> <em>parent</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&nbsp;</td>
<td class="paramname"> <em>file</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *&nbsp;</td>
<td class="paramname"> <em>dir_entry</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Creates a file.
<p>
Creates a file and obtains the directory entry of the new file. If the file to create already exists, the directory entry of the existing file will be returned within the dir_entry parameter.<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>The file name is not checked for invalid characters.<p>
The generation of the short 8.3 file name is quite simple. The first eight characters are used for the filename. The extension, if any, is made up of the first three characters following the last dot within the long filename. If the filename (without the extension) is longer than eight characters, the lower byte of the cluster number replaces the last two characters to avoid name clashes. In any other case, it is your responsibility to avoid name clashes.</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>parent</em>&nbsp;</td><td>The handle of the directory in which to create the file. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>file</em>&nbsp;</td><td>The name of the file to create. </td></tr>
<tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>dir_entry</em>&nbsp;</td><td>The directory entry to fill for the new file. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure, 1 on success. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat16.html#ge060faccbbeca802afe86be2f4d5b485" title="Deletes a file or directory.">fat16_delete_file</a> </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="ge060faccbbeca802afe86be2f4d5b485"></a><!-- doxytag: member="fat16.c::fat16_delete_file" ref="ge060faccbbeca802afe86be2f4d5b485" args="(struct fat16_fs_struct *fs, struct fat16_dir_entry_struct *dir_entry)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t fat16_delete_file </td>
<td>(</td>
<td class="paramtype">struct fat16_fs_struct *&nbsp;</td>
<td class="paramname"> <em>fs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *&nbsp;</td>
<td class="paramname"> <em>dir_entry</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Deletes a file or directory.
<p>
If a directory is deleted without first deleting its subdirectories and files, disk space occupied by these files will get wasted as there is no chance to release it and mark it as free.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fs</em>&nbsp;</td><td>The filesystem on which to operate. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>dir_entry</em>&nbsp;</td><td>The directory entry of the file to delete. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure, 1 on success. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat16.html#gf8029e3ec633902d08e8204d13afc350" title="Creates a file.">fat16_create_file</a> </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="g0045fe378de2f7c52b528f985e1891a6"></a><!-- doxytag: member="fat16.c::fat16_get_dir_entry_of_path" ref="g0045fe378de2f7c52b528f985e1891a6" args="(struct fat16_fs_struct *fs, const char *path, struct fat16_dir_entry_struct *dir_entry)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t fat16_get_dir_entry_of_path </td>
<td>(</td>
<td class="paramtype">struct fat16_fs_struct *&nbsp;</td>
<td class="paramname"> <em>fs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&nbsp;</td>
<td class="paramname"> <em>path</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *&nbsp;</td>
<td class="paramname"> <em>dir_entry</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Retrieves the directory entry of a path.
<p>
The given path may both describe a file or a directory.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fs</em>&nbsp;</td><td>The FAT16 filesystem on which to search. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>path</em>&nbsp;</td><td>The path of which to read the directory entry. </td></tr>
<tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>dir_entry</em>&nbsp;</td><td>The directory entry to fill. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure, 1 on success. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat16.html#g73c8f0598e8224736b09644c48cf2970" title="Reads the next directory entry contained within a parent directory.">fat16_read_dir</a> </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="g82c7347c5b3cd8832633d5303552eb38"></a><!-- doxytag: member="fat16.c::fat16_get_file_modification_date" ref="g82c7347c5b3cd8832633d5303552eb38" args="(const struct fat16_dir_entry_struct *dir_entry, uint16_t *year, uint8_t *month, uint8_t *day)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fat16_get_file_modification_date </td>
<td>(</td>
<td class="paramtype">const struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *&nbsp;</td>
<td class="paramname"> <em>dir_entry</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint16_t *&nbsp;</td>
<td class="paramname"> <em>year</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t *&nbsp;</td>
<td class="paramname"> <em>month</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t *&nbsp;</td>
<td class="paramname"> <em>day</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Returns the modification date of a file.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>dir_entry</em>&nbsp;</td><td>The directory entry of which to return the modification date. </td></tr>
<tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>year</em>&nbsp;</td><td>The year the file was last modified. </td></tr>
<tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>month</em>&nbsp;</td><td>The month the file was last modified. </td></tr>
<tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>day</em>&nbsp;</td><td>The day the file was last modified. </td></tr>
</table>
</dl>
 
</div>
</div><p>
<a class="anchor" name="g5040fcab753ef55337292daf8c0d6784"></a><!-- doxytag: member="fat16.c::fat16_get_file_modification_time" ref="g5040fcab753ef55337292daf8c0d6784" args="(const struct fat16_dir_entry_struct *dir_entry, uint8_t *hour, uint8_t *min, uint8_t *sec)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fat16_get_file_modification_time </td>
<td>(</td>
<td class="paramtype">const struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *&nbsp;</td>
<td class="paramname"> <em>dir_entry</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t *&nbsp;</td>
<td class="paramname"> <em>hour</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t *&nbsp;</td>
<td class="paramname"> <em>min</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t *&nbsp;</td>
<td class="paramname"> <em>sec</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Returns the modification time of a file.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>dir_entry</em>&nbsp;</td><td>The directory entry of which to return the modification time. </td></tr>
<tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>hour</em>&nbsp;</td><td>The hour the file was last modified. </td></tr>
<tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>min</em>&nbsp;</td><td>The min the file was last modified. </td></tr>
<tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>sec</em>&nbsp;</td><td>The sec the file was last modified. </td></tr>
</table>
</dl>
 
</div>
</div><p>
<a class="anchor" name="g3a43c9943251749978645ad8e3f16757"></a><!-- doxytag: member="fat16.c::fat16_open_file" ref="g3a43c9943251749978645ad8e3f16757" args="(struct fat16_fs_struct *fs, const struct fat16_dir_entry_struct *dir_entry)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct fat16_file_struct* fat16_open_file </td>
<td>(</td>
<td class="paramtype">struct fat16_fs_struct *&nbsp;</td>
<td class="paramname"> <em>fs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const struct <a class="el" href="structfat16__dir__entry__struct.html">fat16_dir_entry_struct</a> *&nbsp;</td>
<td class="paramname"> <em>dir_entry</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"><code> [read]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Opens a file on a FAT16 filesystem.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fs</em>&nbsp;</td><td>The filesystem on which the file to open lies. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>dir_entry</em>&nbsp;</td><td>The directory entry of the file to open. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The file handle, or 0 on failure. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat16.html#g2b2812041f489bc7913bfa5cbcf0172b" title="Closes a file.">fat16_close_file</a> </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="g0af2ef3d690626a5640a334cefbb27a6"></a><!-- doxytag: member="fat16.c::fat16_read_file" ref="g0af2ef3d690626a5640a334cefbb27a6" args="(struct fat16_file_struct *fd, uint8_t *buffer, uint16_t buffer_len)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int16_t fat16_read_file </td>
<td>(</td>
<td class="paramtype">struct fat16_file_struct *&nbsp;</td>
<td class="paramname"> <em>fd</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t *&nbsp;</td>
<td class="paramname"> <em>buffer</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint16_t&nbsp;</td>
<td class="paramname"> <em>buffer_len</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Reads data from a file.
<p>
The data requested is read from the current file location.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fd</em>&nbsp;</td><td>The file handle of the file from which to read. </td></tr>
<tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>buffer</em>&nbsp;</td><td>The buffer into which to write. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>buffer_len</em>&nbsp;</td><td>The amount of data to read. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The number of bytes read, 0 on end of file, or -1 on failure. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat16.html#g4f0c785a47b1cf070839b5edec2c6f65" title="Writes data to a file.">fat16_write_file</a> </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="g23740742fa60ca148ef098caac7085c0"></a><!-- doxytag: member="fat16.c::fat16_resize_file" ref="g23740742fa60ca148ef098caac7085c0" args="(struct fat16_file_struct *fd, uint32_t size)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t fat16_resize_file </td>
<td>(</td>
<td class="paramtype">struct fat16_file_struct *&nbsp;</td>
<td class="paramname"> <em>fd</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&nbsp;</td>
<td class="paramname"> <em>size</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Resizes a file to have a specific size.
<p>
Enlarges or shrinks the file pointed to by the file descriptor to have exactly the specified size.<p>
If the file is truncated, all bytes having an equal or larger offset than the given size are lost. If the file is expanded, the additional bytes are allocated.<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>Please be aware that this function just allocates or deallocates disk space, it does not explicitely clear it. To avoid data leakage, this must be done manually.</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fd</em>&nbsp;</td><td>The file decriptor of the file which to resize. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>size</em>&nbsp;</td><td>The new size of the file. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure, 1 on success. </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="gf1511fd1a5419d0828265566dc5d33e4"></a><!-- doxytag: member="fat16.c::fat16_seek_file" ref="gf1511fd1a5419d0828265566dc5d33e4" args="(struct fat16_file_struct *fd, int32_t *offset, uint8_t whence)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t fat16_seek_file </td>
<td>(</td>
<td class="paramtype">struct fat16_file_struct *&nbsp;</td>
<td class="paramname"> <em>fd</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int32_t *&nbsp;</td>
<td class="paramname"> <em>offset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&nbsp;</td>
<td class="paramname"> <em>whence</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Repositions the read/write file offset.
<p>
Changes the file offset where the next call to <a class="el" href="group__fat16__file.html#g0af2ef3d690626a5640a334cefbb27a6" title="Reads data from a file.">fat16_read_file()</a> or <a class="el" href="group__fat16__file.html#g4f0c785a47b1cf070839b5edec2c6f65" title="Writes data to a file.">fat16_write_file()</a> starts reading/writing.<p>
If the new offset is beyond the end of the file, <a class="el" href="group__fat16__file.html#g23740742fa60ca148ef098caac7085c0" title="Resizes a file to have a specific size.">fat16_resize_file()</a> is implicitly called, i.e. the file is expanded.<p>
The new offset can be given in different ways determined by the <code>whence</code> parameter:<ul>
<li><b>FAT16_SEEK_SET:</b> <code>*offset</code> is relative to the beginning of the file.</li><li><b>FAT16_SEEK_CUR:</b> <code>*offset</code> is relative to the current file position.</li><li><b>FAT16_SEEK_END:</b> <code>*offset</code> is relative to the end of the file.</li></ul>
<p>
The resulting absolute offset is written to the location the <code>offset</code> parameter points to.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fd</em>&nbsp;</td><td>The file decriptor of the file on which to seek. </td></tr>
<tr><td valign="top"><tt>[in,out]</tt>&nbsp;</td><td valign="top"><em>offset</em>&nbsp;</td><td>A pointer to the new offset, as affected by the <code>whence</code> parameter. The function writes the new absolute offset to this location before it returns. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>whence</em>&nbsp;</td><td>Affects the way <code>offset</code> is interpreted, see above. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure, 1 on success. </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="g4f0c785a47b1cf070839b5edec2c6f65"></a><!-- doxytag: member="fat16.c::fat16_write_file" ref="g4f0c785a47b1cf070839b5edec2c6f65" args="(struct fat16_file_struct *fd, const uint8_t *buffer, uint16_t buffer_len)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int16_t fat16_write_file </td>
<td>(</td>
<td class="paramtype">struct fat16_file_struct *&nbsp;</td>
<td class="paramname"> <em>fd</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint8_t *&nbsp;</td>
<td class="paramname"> <em>buffer</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint16_t&nbsp;</td>
<td class="paramname"> <em>buffer_len</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Writes data to a file.
<p>
The data is written to the current file location.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fd</em>&nbsp;</td><td>The file handle of the file to which to write. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>buffer</em>&nbsp;</td><td>The buffer from which to read the data to be written. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>buffer_len</em>&nbsp;</td><td>The amount of data to write. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The number of bytes written, 0 on disk full, or -1 on failure. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat16.html#g0af2ef3d690626a5640a334cefbb27a6" title="Reads data from a file.">fat16_read_file</a> </dd></dl>
 
</div>
</div><p>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Dec 13 19:38:48 2007 for sd-reader by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3-20071008 </small></address>
</body>
</html>
/Designs/GPSRL02A/SW/doc/html/group__fat16__fs.html
0,0 → 1,160
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>sd-reader: FAT16 access</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3-20071008 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>FAT16 access<br>
<small>
[<a class="el" href="group__fat16.html">FAT16 support</a>]</small>
</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
Basic functions for handling a FAT16 filesystem.
<p>
 
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct fat16_fs_struct *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__fs.html#gc176ec2f1bfa8c81972ea741a941e579">fat16_open</a> (struct <a class="el" href="structpartition__struct.html">partition_struct</a> *partition)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Opens a FAT16 filesystem. <a href="#gc176ec2f1bfa8c81972ea741a941e579"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__fs.html#g6588833571e6ef0f5d094b8ff56a5985">fat16_close</a> (struct fat16_fs_struct *fs)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Closes a FAT16 filesystem. <a href="#g6588833571e6ef0f5d094b8ff56a5985"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__fs.html#g8af3c3535929e19b0039e07f1976cec7">fat16_get_fs_size</a> (const struct fat16_fs_struct *fs)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the amount of total storage capacity of the filesystem in bytes. <a href="#g8af3c3535929e19b0039e07f1976cec7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__fat16__fs.html#g2f8ff07cca44ecb6770b12a58b6cd8c7">fat16_get_fs_free</a> (const struct fat16_fs_struct *fs)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the amount of free storage capacity on the filesystem in bytes. <a href="#g2f8ff07cca44ecb6770b12a58b6cd8c7"></a><br></td></tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="g6588833571e6ef0f5d094b8ff56a5985"></a><!-- doxytag: member="fat16.c::fat16_close" ref="g6588833571e6ef0f5d094b8ff56a5985" args="(struct fat16_fs_struct *fs)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fat16_close </td>
<td>(</td>
<td class="paramtype">struct fat16_fs_struct *&nbsp;</td>
<td class="paramname"> <em>fs</em> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Closes a FAT16 filesystem.
<p>
When this function returns, the given filesystem descriptor will be invalid.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fs</em>&nbsp;</td><td>The filesystem to close. </td></tr>
</table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat16.html#gc176ec2f1bfa8c81972ea741a941e579" title="Opens a FAT16 filesystem.">fat16_open</a> </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="g2f8ff07cca44ecb6770b12a58b6cd8c7"></a><!-- doxytag: member="fat16.c::fat16_get_fs_free" ref="g2f8ff07cca44ecb6770b12a58b6cd8c7" args="(const struct fat16_fs_struct *fs)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t fat16_get_fs_free </td>
<td>(</td>
<td class="paramtype">const struct fat16_fs_struct *&nbsp;</td>
<td class="paramname"> <em>fs</em> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Returns the amount of free storage capacity on the filesystem in bytes.
<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>As the FAT16 filesystem is cluster based, this function does not return continuous values but multiples of the cluster size.</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fs</em>&nbsp;</td><td>The filesystem on which to operate. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure, the free filesystem space in bytes otherwise. </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="g8af3c3535929e19b0039e07f1976cec7"></a><!-- doxytag: member="fat16.c::fat16_get_fs_size" ref="g8af3c3535929e19b0039e07f1976cec7" args="(const struct fat16_fs_struct *fs)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t fat16_get_fs_size </td>
<td>(</td>
<td class="paramtype">const struct fat16_fs_struct *&nbsp;</td>
<td class="paramname"> <em>fs</em> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Returns the amount of total storage capacity of the filesystem in bytes.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fs</em>&nbsp;</td><td>The filesystem on which to operate. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure, the filesystem size in bytes otherwise. </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="gc176ec2f1bfa8c81972ea741a941e579"></a><!-- doxytag: member="fat16.c::fat16_open" ref="gc176ec2f1bfa8c81972ea741a941e579" args="(struct partition_struct *partition)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct fat16_fs_struct* fat16_open </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="structpartition__struct.html">partition_struct</a> *&nbsp;</td>
<td class="paramname"> <em>partition</em> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"><code> [read]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Opens a FAT16 filesystem.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>partition</em>&nbsp;</td><td>Discriptor of partition on which the filesystem resides. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on error, a FAT16 filesystem descriptor on success. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fat16.html#gc176ec2f1bfa8c81972ea741a941e579" title="Opens a FAT16 filesystem.">fat16_open</a> </dd></dl>
 
</div>
</div><p>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Dec 13 19:38:48 2007 for sd-reader by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3-20071008 </small></address>
</body>
</html>
/Designs/GPSRL02A/SW/doc/html/group__partition.html
0,0 → 1,375
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>sd-reader: Partition table support</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3-20071008 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>Partition table support</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
Support for reading partition tables and access to partitions.
<p>
 
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Files</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">file &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="partition_8c.html">partition.c</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Partition table implementation (license: GPLv2 or LGPLv2.1). <br></td></tr>
 
<p>
<tr><td class="memItemLeft" nowrap align="right" valign="top">file &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="partition_8h.html">partition.h</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Partition table header (license: GPLv2 or LGPLv2.1). <br></td></tr>
 
<p>
<tr><td class="memItemLeft" nowrap align="right" valign="top">file &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="partition__config_8h.html">partition_config.h</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Partition configuration (license: GPLv2 or LGPLv2.1). <br></td></tr>
 
<p>
<tr><td colspan="2"><br><h2>Modules</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition__config.html">Configuration of partition table support</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Preprocessor defines to configure the partition support. <br></td></tr>
 
<p>
<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpartition__struct.html">partition_struct</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Describes a partition. <a href="structpartition__struct.html#_details">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gab5ffe2ef6119a6815c505e3103a2714"></a><!-- doxytag: member="partition::PARTITION_TYPE_FREE" ref="gab5ffe2ef6119a6815c505e3103a2714" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#gab5ffe2ef6119a6815c505e3103a2714">PARTITION_TYPE_FREE</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The partition table entry is not used. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga92b6c552d2411e093204cd3ed4cffa3"></a><!-- doxytag: member="partition::PARTITION_TYPE_FAT12" ref="ga92b6c552d2411e093204cd3ed4cffa3" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#ga92b6c552d2411e093204cd3ed4cffa3">PARTITION_TYPE_FAT12</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The partition contains a FAT12 filesystem. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gf7296b4a29c1f7e5c39e28372648b2cd"></a><!-- doxytag: member="partition::PARTITION_TYPE_FAT16_32MB" ref="gf7296b4a29c1f7e5c39e28372648b2cd" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#gf7296b4a29c1f7e5c39e28372648b2cd">PARTITION_TYPE_FAT16_32MB</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The partition contains a FAT16 filesystem with 32MB maximum. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gceaa1bf17d4e8961726834e53ed79732"></a><!-- doxytag: member="partition::PARTITION_TYPE_EXTENDED" ref="gceaa1bf17d4e8961726834e53ed79732" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#gceaa1bf17d4e8961726834e53ed79732">PARTITION_TYPE_EXTENDED</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The partition is an extended partition with its own partition table. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gda7e1b4d950c7a3f42f559ab99f5fe43"></a><!-- doxytag: member="partition::PARTITION_TYPE_FAT16" ref="gda7e1b4d950c7a3f42f559ab99f5fe43" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#gda7e1b4d950c7a3f42f559ab99f5fe43">PARTITION_TYPE_FAT16</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The partition contains a FAT16 filesystem. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g2f6a6c30cc239ae13ea287ff901c95f4"></a><!-- doxytag: member="partition::PARTITION_TYPE_FAT32" ref="g2f6a6c30cc239ae13ea287ff901c95f4" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#g2f6a6c30cc239ae13ea287ff901c95f4">PARTITION_TYPE_FAT32</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The partition contains a FAT32 filesystem. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga2e0c8e8b4ec10f7b342c0d554b5f6d8"></a><!-- doxytag: member="partition::PARTITION_TYPE_FAT32_LBA" ref="ga2e0c8e8b4ec10f7b342c0d554b5f6d8" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#ga2e0c8e8b4ec10f7b342c0d554b5f6d8">PARTITION_TYPE_FAT32_LBA</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The partition contains a FAT32 filesystem with LBA. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g52b69fda008ca19d75304a2385cc4900"></a><!-- doxytag: member="partition::PARTITION_TYPE_FAT16_LBA" ref="g52b69fda008ca19d75304a2385cc4900" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#g52b69fda008ca19d75304a2385cc4900">PARTITION_TYPE_FAT16_LBA</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The partition contains a FAT16 filesystem with LBA. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g1c9a00e3b09b488ce7f3b2ef2904400b"></a><!-- doxytag: member="partition::PARTITION_TYPE_EXTENDED_LBA" ref="g1c9a00e3b09b488ce7f3b2ef2904400b" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#g1c9a00e3b09b488ce7f3b2ef2904400b">PARTITION_TYPE_EXTENDED_LBA</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The partition is an extended partition with LBA. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gcdc50585fe8130f0a4faee13caade86f"></a><!-- doxytag: member="partition::PARTITION_TYPE_UNKNOWN" ref="gcdc50585fe8130f0a4faee13caade86f" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#gcdc50585fe8130f0a4faee13caade86f">PARTITION_TYPE_UNKNOWN</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The partition has an unknown type. <br></td></tr>
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef uint8_t(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#g6a2b9c5359ec033470fc25b2626e56fc">device_read_t</a> )(uint32_t offset, uint8_t *buffer, uint16_t length)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A function pointer used to read from the partition. <a href="#g6a2b9c5359ec033470fc25b2626e56fc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef uint8_t(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#g0c94a44bb3d9090d3ad662a4ea772f9b">device_read_callback_t</a> )(uint8_t *buffer, uint32_t offset, void *p)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A function pointer passed to a <code>device_read_interval_t</code>. <a href="#g0c94a44bb3d9090d3ad662a4ea772f9b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef uint8_t(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#gebc277053a3361aaf4b67a486e24fa24">device_read_interval_t</a> )(uint32_t offset, uint8_t *buffer, uint16_t interval, uint16_t length, <a class="el" href="group__partition.html#g0c94a44bb3d9090d3ad662a4ea772f9b">device_read_callback_t</a> callback, void *p)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A function pointer used to continuously read units of <code>interval</code> bytes and call a callback function. <a href="#gebc277053a3361aaf4b67a486e24fa24"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef uint8_t(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#gc6ca9cbb79b5099d610e976365ee2e8e">device_write_t</a> )(uint32_t offset, const uint8_t *buffer, uint16_t length)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A function pointer used to write to the partition. <a href="#gc6ca9cbb79b5099d610e976365ee2e8e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef uint16_t(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#g089849983ec009841429eb6a1d3cb4cc">device_write_callback_t</a> )(uint8_t *buffer, uint32_t offset, void *p)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A function pointer passed to a <code>device_write_interval_t</code>. <a href="#g089849983ec009841429eb6a1d3cb4cc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef uint8_t(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#g975ce8905536b4c1020eb18b5b640158">device_write_interval_t</a> )(uint32_t offset, uint8_t *buffer, uint16_t length, <a class="el" href="group__partition.html#g089849983ec009841429eb6a1d3cb4cc">device_write_callback_t</a> callback, void *p)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A function pointer used to continuously write a data stream obtained from a callback function. <a href="#g975ce8905536b4c1020eb18b5b640158"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct <a class="el" href="structpartition__struct.html">partition_struct</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#g3125023db4e9d50adb8489c71fa1be68">partition_open</a> (<a class="el" href="group__partition.html#g6a2b9c5359ec033470fc25b2626e56fc">device_read_t</a> device_read, <a class="el" href="group__partition.html#gebc277053a3361aaf4b67a486e24fa24">device_read_interval_t</a> device_read_interval, <a class="el" href="group__partition.html#gc6ca9cbb79b5099d610e976365ee2e8e">device_write_t</a> device_write, <a class="el" href="group__partition.html#g975ce8905536b4c1020eb18b5b640158">device_write_interval_t</a> device_write_interval, int8_t index)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Opens a partition. <a href="#g3125023db4e9d50adb8489c71fa1be68"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#g128f4363de35c81a9ff8026d4db289d2">partition_close</a> (struct <a class="el" href="structpartition__struct.html">partition_struct</a> *partition)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Closes a partition. <a href="#g128f4363de35c81a9ff8026d4db289d2"></a><br></td></tr>
</table>
<hr><h2>Typedef Documentation</h2>
<a class="anchor" name="g0c94a44bb3d9090d3ad662a4ea772f9b"></a><!-- doxytag: member="partition.h::device_read_callback_t" ref="g0c94a44bb3d9090d3ad662a4ea772f9b" args=")(uint8_t *buffer, uint32_t offset, void *p)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef uint8_t(* <a class="el" href="group__partition.html#g0c94a44bb3d9090d3ad662a4ea772f9b">device_read_callback_t</a>)(uint8_t *buffer, uint32_t offset, void *p) </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
A function pointer passed to a <code>device_read_interval_t</code>.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>buffer</em>&nbsp;</td><td>The buffer which contains the data just read. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>offset</em>&nbsp;</td><td>The offset from which the data in <code>buffer</code> was read. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>p</em>&nbsp;</td><td>An opaque pointer. </td></tr>
</table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__partition.html#gebc277053a3361aaf4b67a486e24fa24" title="A function pointer used to continuously read units of interval bytes and call a callback...">device_read_interval_t</a> </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="gebc277053a3361aaf4b67a486e24fa24"></a><!-- doxytag: member="partition.h::device_read_interval_t" ref="gebc277053a3361aaf4b67a486e24fa24" args=")(uint32_t offset, uint8_t *buffer, uint16_t interval, uint16_t length, device_read_callback_t callback, void *p)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef uint8_t(* <a class="el" href="group__partition.html#gebc277053a3361aaf4b67a486e24fa24">device_read_interval_t</a>)(uint32_t offset, uint8_t *buffer, uint16_t interval, uint16_t length, <a class="el" href="group__partition.html#g0c94a44bb3d9090d3ad662a4ea772f9b">device_read_callback_t</a> callback, void *p) </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
A function pointer used to continuously read units of <code>interval</code> bytes and call a callback function.
<p>
This function starts reading at the specified offset. Every <code>interval</code> bytes, it calls the callback function with the associated data buffer.<p>
By returning zero, the callback may stop reading.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>offset</em>&nbsp;</td><td>Offset from which to start reading. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>buffer</em>&nbsp;</td><td>Pointer to a buffer which is at least interval bytes in size. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>interval</em>&nbsp;</td><td>Number of bytes to read before calling the callback function. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>length</em>&nbsp;</td><td>Number of bytes to read altogether. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>callback</em>&nbsp;</td><td>The function to call every interval bytes. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>p</em>&nbsp;</td><td>An opaque pointer directly passed to the callback function. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure, 1 on success </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__partition.html#g6a2b9c5359ec033470fc25b2626e56fc" title="A function pointer used to read from the partition.">device_read_t</a> </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="g6a2b9c5359ec033470fc25b2626e56fc"></a><!-- doxytag: member="partition.h::device_read_t" ref="g6a2b9c5359ec033470fc25b2626e56fc" args=")(uint32_t offset, uint8_t *buffer, uint16_t length)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef uint8_t(* <a class="el" href="group__partition.html#g6a2b9c5359ec033470fc25b2626e56fc">device_read_t</a>)(uint32_t offset, uint8_t *buffer, uint16_t length) </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
A function pointer used to read from the partition.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>offset</em>&nbsp;</td><td>The offset on the device where to start reading. </td></tr>
<tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>buffer</em>&nbsp;</td><td>The buffer into which to place the data. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>length</em>&nbsp;</td><td>The count of bytes to read. </td></tr>
</table>
</dl>
 
</div>
</div><p>
<a class="anchor" name="g089849983ec009841429eb6a1d3cb4cc"></a><!-- doxytag: member="partition.h::device_write_callback_t" ref="g089849983ec009841429eb6a1d3cb4cc" args=")(uint8_t *buffer, uint32_t offset, void *p)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef uint16_t(* <a class="el" href="group__partition.html#g089849983ec009841429eb6a1d3cb4cc">device_write_callback_t</a>)(uint8_t *buffer, uint32_t offset, void *p) </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
A function pointer passed to a <code>device_write_interval_t</code>.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>buffer</em>&nbsp;</td><td>The buffer which receives the data to write. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>offset</em>&nbsp;</td><td>The offset to which the data in <code>buffer</code> will be written. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>p</em>&nbsp;</td><td>An opaque pointer. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The number of bytes put into <code>buffer</code> </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__partition.html#g975ce8905536b4c1020eb18b5b640158" title="A function pointer used to continuously write a data stream obtained from a callback...">device_write_interval_t</a> </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="g975ce8905536b4c1020eb18b5b640158"></a><!-- doxytag: member="partition.h::device_write_interval_t" ref="g975ce8905536b4c1020eb18b5b640158" args=")(uint32_t offset, uint8_t *buffer, uint16_t length, device_write_callback_t callback, void *p)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef uint8_t(* <a class="el" href="group__partition.html#g975ce8905536b4c1020eb18b5b640158">device_write_interval_t</a>)(uint32_t offset, uint8_t *buffer, uint16_t length, <a class="el" href="group__partition.html#g089849983ec009841429eb6a1d3cb4cc">device_write_callback_t</a> callback, void *p) </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
A function pointer used to continuously write a data stream obtained from a callback function.
<p>
This function starts writing at the specified offset. To obtain the next bytes to write, it calls the callback function. The callback fills the provided data buffer and returns the number of bytes it has put into the buffer.<p>
By returning zero, the callback may stop writing.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>offset</em>&nbsp;</td><td>Offset where to start writing. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>buffer</em>&nbsp;</td><td>Pointer to a buffer which is used for the callback function. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>length</em>&nbsp;</td><td>Number of bytes to write in total. May be zero for endless writes. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>callback</em>&nbsp;</td><td>The function used to obtain the bytes to write. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>p</em>&nbsp;</td><td>An opaque pointer directly passed to the callback function. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure, 1 on success </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__partition.html#gc6ca9cbb79b5099d610e976365ee2e8e" title="A function pointer used to write to the partition.">device_write_t</a> </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="gc6ca9cbb79b5099d610e976365ee2e8e"></a><!-- doxytag: member="partition.h::device_write_t" ref="gc6ca9cbb79b5099d610e976365ee2e8e" args=")(uint32_t offset, const uint8_t *buffer, uint16_t length)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef uint8_t(* <a class="el" href="group__partition.html#gc6ca9cbb79b5099d610e976365ee2e8e">device_write_t</a>)(uint32_t offset, const uint8_t *buffer, uint16_t length) </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
A function pointer used to write to the partition.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>offset</em>&nbsp;</td><td>The offset on the device where to start writing. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>buffer</em>&nbsp;</td><td>The buffer which to write. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>length</em>&nbsp;</td><td>The count of bytes to write. </td></tr>
</table>
</dl>
 
</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="g128f4363de35c81a9ff8026d4db289d2"></a><!-- doxytag: member="partition.c::partition_close" ref="g128f4363de35c81a9ff8026d4db289d2" args="(struct partition_struct *partition)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t partition_close </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="structpartition__struct.html">partition_struct</a> *&nbsp;</td>
<td class="paramname"> <em>partition</em> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Closes a partition.
<p>
This function destroys a partition descriptor which was previously obtained from a call to <a class="el" href="group__partition.html#g3125023db4e9d50adb8489c71fa1be68" title="Opens a partition.">partition_open()</a>. When this function returns, the given descriptor will be invalid.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>partition</em>&nbsp;</td><td>The partition descriptor to destroy. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure, 1 on success. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__partition.html#g3125023db4e9d50adb8489c71fa1be68" title="Opens a partition.">partition_open</a> </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="g3125023db4e9d50adb8489c71fa1be68"></a><!-- doxytag: member="partition.c::partition_open" ref="g3125023db4e9d50adb8489c71fa1be68" args="(device_read_t device_read, device_read_interval_t device_read_interval, device_write_t device_write, device_write_interval_t device_write_interval, int8_t index)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="structpartition__struct.html">partition_struct</a> * partition_open </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__partition.html#g6a2b9c5359ec033470fc25b2626e56fc">device_read_t</a>&nbsp;</td>
<td class="paramname"> <em>device_read</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__partition.html#gebc277053a3361aaf4b67a486e24fa24">device_read_interval_t</a>&nbsp;</td>
<td class="paramname"> <em>device_read_interval</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__partition.html#gc6ca9cbb79b5099d610e976365ee2e8e">device_write_t</a>&nbsp;</td>
<td class="paramname"> <em>device_write</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__partition.html#g975ce8905536b4c1020eb18b5b640158">device_write_interval_t</a>&nbsp;</td>
<td class="paramname"> <em>device_write_interval</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int8_t&nbsp;</td>
<td class="paramname"> <em>index</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"><code> [read]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Opens a partition.
<p>
Opens a partition by its index number and returns a partition handle which describes the opened partition.<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>This function does not support extended partitions.</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>device_read</em>&nbsp;</td><td>A function pointer which is used to read from the disk. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>device_read_interval</em>&nbsp;</td><td>A function pointer which is used to read in constant intervals from the disk. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>device_write</em>&nbsp;</td><td>A function pointer which is used to write to the disk. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>device_write_interval</em>&nbsp;</td><td>A function pointer which is used to write a data stream to disk. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>index</em>&nbsp;</td><td>The index of the partition which should be opened, range 0 to 3. A negative value is allowed as well. In this case, the partition opened is not checked for existance, begins at offset zero, has a length of zero and is of an unknown type. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure, a partition descriptor on success. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__partition.html#g128f4363de35c81a9ff8026d4db289d2" title="Closes a partition.">partition_close</a> </dd></dl>
 
</div>
</div><p>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Dec 13 19:38:48 2007 for sd-reader by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3-20071008 </small></address>
</body>
</html>
/Designs/GPSRL02A/SW/doc/html/group__partition__config.html
0,0 → 1,36
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>sd-reader: Configuration of partition table support</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3-20071008 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>Configuration of partition table support<br>
<small>
[<a class="el" href="group__partition.html">Partition table support</a>]</small>
</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
Preprocessor defines to configure the partition support.
<p>
 
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gd3d3ffd91206adf249d3318930f024af"></a><!-- doxytag: member="partition_config::PARTITION_COUNT" ref="gd3d3ffd91206adf249d3318930f024af" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition__config.html#gd3d3ffd91206adf249d3318930f024af">PARTITION_COUNT</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Maximum number of partition handles. <br></td></tr>
</table>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Dec 13 19:38:48 2007 for sd-reader by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3-20071008 </small></address>
</body>
</html>
/Designs/GPSRL02A/SW/doc/html/group__sd__raw.html
0,0 → 1,448
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>sd-reader: MMC/SD card raw access</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3-20071008 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>MMC/SD card raw access</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
This module implements read and write access to MMC and SD cards.
<p>
It serves as a low-level driver for the higher level modules such as partition and file system access.
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Files</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">file &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="sd__raw_8c.html">sd_raw.c</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">MMC/SD raw access implementation (license: GPLv2 or LGPLv2.1). <br></td></tr>
 
<p>
<tr><td class="memItemLeft" nowrap align="right" valign="top">file &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="sd__raw_8h.html">sd_raw.h</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">MMC/SD raw access header (license: GPLv2 or LGPLv2.1). <br></td></tr>
 
<p>
<tr><td class="memItemLeft" nowrap align="right" valign="top">file &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="sd__raw__config_8h.html">sd_raw_config.h</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">MMC/SD support configuration (license: GPLv2 or LGPLv2.1). <br></td></tr>
 
<p>
<tr><td colspan="2"><br><h2>Modules</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw__config.html">MMC/SD configuration</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Preprocessor defines to configure the MMC/SD support. <br></td></tr>
 
<p>
<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsd__raw__info.html">sd_raw_info</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This struct is used by <a class="el" href="group__sd__raw.html#g97c54e82834f87bcdd38e79822fe5a79" title="Reads informational data from the card.">sd_raw_get_info()</a> to return manufacturing and status information of the card. <a href="structsd__raw__info.html#_details">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g2507a78d61385c9dbc1d06b8a03ef58a"></a><!-- doxytag: member="sd_raw::SD_RAW_FORMAT_HARDDISK" ref="g2507a78d61385c9dbc1d06b8a03ef58a" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw.html#g2507a78d61385c9dbc1d06b8a03ef58a">SD_RAW_FORMAT_HARDDISK</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The card's layout is harddisk-like, which means it contains a master boot record with a partition table. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g4caede5500f4d1035ceb9951a831c224"></a><!-- doxytag: member="sd_raw::SD_RAW_FORMAT_SUPERFLOPPY" ref="g4caede5500f4d1035ceb9951a831c224" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw.html#g4caede5500f4d1035ceb9951a831c224">SD_RAW_FORMAT_SUPERFLOPPY</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The card contains a single filesystem and no partition table. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gd070d05f762410f57870549a0fcd5f43"></a><!-- doxytag: member="sd_raw::SD_RAW_FORMAT_UNIVERSAL" ref="gd070d05f762410f57870549a0fcd5f43" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw.html#gd070d05f762410f57870549a0fcd5f43">SD_RAW_FORMAT_UNIVERSAL</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The card's layout follows the Universal File Format. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g7e87231437f32335a25930ec1b85a9c9"></a><!-- doxytag: member="sd_raw::SD_RAW_FORMAT_UNKNOWN" ref="g7e87231437f32335a25930ec1b85a9c9" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw.html#g7e87231437f32335a25930ec1b85a9c9">SD_RAW_FORMAT_UNKNOWN</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The card's layout is unknown. <br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw.html#g82e8599b2679451e491484fb0b19bfd5">sd_raw_init</a> ()</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initializes memory card communication. <a href="#g82e8599b2679451e491484fb0b19bfd5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw.html#g5e227f25ad4a18466e7cdd9ecdfce8ab">sd_raw_available</a> ()</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Checks wether a memory card is located in the slot. <a href="#g5e227f25ad4a18466e7cdd9ecdfce8ab"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw.html#g55f311428473cd5b85cf8f24ffba121b">sd_raw_locked</a> ()</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Checks wether the memory card is locked for write access. <a href="#g55f311428473cd5b85cf8f24ffba121b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw.html#g5f69513fd8228ea269a61f1dff737129">sd_raw_read</a> (uint32_t offset, uint8_t *buffer, uint16_t length)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reads raw data from the card. <a href="#g5f69513fd8228ea269a61f1dff737129"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw.html#gffd7c377b887bb05f7756ca827d3863e">sd_raw_read_interval</a> (uint32_t offset, uint8_t *buffer, uint16_t interval, uint16_t length, sd_raw_read_interval_handler_t callback, void *p)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Continuously reads units of <code>interval</code> bytes and calls a callback function. <a href="#gffd7c377b887bb05f7756ca827d3863e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw.html#g51fc917873e34e96cb981fbbb47a69c5">sd_raw_write</a> (uint32_t offset, const uint8_t *buffer, uint16_t length)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Writes raw data to the card. <a href="#g51fc917873e34e96cb981fbbb47a69c5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw.html#gc004a1ffd2d552f8bc34ad1ced6181c4">sd_raw_write_interval</a> (uint32_t offset, uint8_t *buffer, uint16_t length, sd_raw_write_interval_handler_t callback, void *p)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Writes a continuous data stream obtained from a callback function. <a href="#gc004a1ffd2d552f8bc34ad1ced6181c4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw.html#gd4d9ff40a7ea50c65cfa47927b35b735">sd_raw_sync</a> ()</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Writes the write buffer's content to the card. <a href="#gd4d9ff40a7ea50c65cfa47927b35b735"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw.html#g97c54e82834f87bcdd38e79822fe5a79">sd_raw_get_info</a> (struct <a class="el" href="structsd__raw__info.html">sd_raw_info</a> *info)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reads informational data from the card. <a href="#g97c54e82834f87bcdd38e79822fe5a79"></a><br></td></tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="g5e227f25ad4a18466e7cdd9ecdfce8ab"></a><!-- doxytag: member="sd_raw.c::sd_raw_available" ref="g5e227f25ad4a18466e7cdd9ecdfce8ab" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t sd_raw_available </td>
<td>(</td>
<td class="paramname"> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Checks wether a memory card is located in the slot.
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>1 if the card is available, 0 if it is not. </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="g97c54e82834f87bcdd38e79822fe5a79"></a><!-- doxytag: member="sd_raw.c::sd_raw_get_info" ref="g97c54e82834f87bcdd38e79822fe5a79" args="(struct sd_raw_info *info)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t sd_raw_get_info </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="structsd__raw__info.html">sd_raw_info</a> *&nbsp;</td>
<td class="paramname"> <em>info</em> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Reads informational data from the card.
<p>
This function reads and returns the card's registers containing manufacturing and status information.<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>: The information retrieved by this function is not required in any way to operate on the card, but it might be nice to display some of the data to the user.</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>info</em>&nbsp;</td><td>A pointer to the structure into which to save the information. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure, 1 on success. </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="g82e8599b2679451e491484fb0b19bfd5"></a><!-- doxytag: member="sd_raw.c::sd_raw_init" ref="g82e8599b2679451e491484fb0b19bfd5" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t sd_raw_init </td>
<td>(</td>
<td class="paramname"> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Initializes memory card communication.
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure, 1 on success. </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="g55f311428473cd5b85cf8f24ffba121b"></a><!-- doxytag: member="sd_raw.c::sd_raw_locked" ref="g55f311428473cd5b85cf8f24ffba121b" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t sd_raw_locked </td>
<td>(</td>
<td class="paramname"> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Checks wether the memory card is locked for write access.
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>1 if the card is locked, 0 if it is not. </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="g5f69513fd8228ea269a61f1dff737129"></a><!-- doxytag: member="sd_raw.c::sd_raw_read" ref="g5f69513fd8228ea269a61f1dff737129" args="(uint32_t offset, uint8_t *buffer, uint16_t length)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t sd_raw_read </td>
<td>(</td>
<td class="paramtype">uint32_t&nbsp;</td>
<td class="paramname"> <em>offset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t *&nbsp;</td>
<td class="paramname"> <em>buffer</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint16_t&nbsp;</td>
<td class="paramname"> <em>length</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Reads raw data from the card.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>offset</em>&nbsp;</td><td>The offset from which to read. </td></tr>
<tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>buffer</em>&nbsp;</td><td>The buffer into which to write the data. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>length</em>&nbsp;</td><td>The number of bytes to read. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure, 1 on success. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__sd__raw.html#gffd7c377b887bb05f7756ca827d3863e" title="Continuously reads units of interval bytes and calls a callback function.">sd_raw_read_interval</a>, <a class="el" href="group__sd__raw.html#g51fc917873e34e96cb981fbbb47a69c5" title="Writes raw data to the card.">sd_raw_write</a>, <a class="el" href="group__sd__raw.html#gc004a1ffd2d552f8bc34ad1ced6181c4" title="Writes a continuous data stream obtained from a callback function.">sd_raw_write_interval</a> </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="gffd7c377b887bb05f7756ca827d3863e"></a><!-- doxytag: member="sd_raw.c::sd_raw_read_interval" ref="gffd7c377b887bb05f7756ca827d3863e" args="(uint32_t offset, uint8_t *buffer, uint16_t interval, uint16_t length, sd_raw_read_interval_handler_t callback, void *p)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t sd_raw_read_interval </td>
<td>(</td>
<td class="paramtype">uint32_t&nbsp;</td>
<td class="paramname"> <em>offset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t *&nbsp;</td>
<td class="paramname"> <em>buffer</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint16_t&nbsp;</td>
<td class="paramname"> <em>interval</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint16_t&nbsp;</td>
<td class="paramname"> <em>length</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">sd_raw_read_interval_handler_t&nbsp;</td>
<td class="paramname"> <em>callback</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void *&nbsp;</td>
<td class="paramname"> <em>p</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Continuously reads units of <code>interval</code> bytes and calls a callback function.
<p>
This function starts reading at the specified offset. Every <code>interval</code> bytes, it calls the callback function with the associated data buffer.<p>
By returning zero, the callback may stop reading.<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>Within the callback function, you can not start another read or write operation. <p>
This function only works if the following conditions are met:<ul>
<li>(offset - (offset % 512)) % interval == 0</li><li>length % interval == 0</li></ul>
</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>offset</em>&nbsp;</td><td>Offset from which to start reading. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>buffer</em>&nbsp;</td><td>Pointer to a buffer which is at least interval bytes in size. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>interval</em>&nbsp;</td><td>Number of bytes to read before calling the callback function. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>length</em>&nbsp;</td><td>Number of bytes to read altogether. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>callback</em>&nbsp;</td><td>The function to call every interval bytes. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>p</em>&nbsp;</td><td>An opaque pointer directly passed to the callback function. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure, 1 on success </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__sd__raw.html#gc004a1ffd2d552f8bc34ad1ced6181c4" title="Writes a continuous data stream obtained from a callback function.">sd_raw_write_interval</a>, <a class="el" href="group__sd__raw.html#g5f69513fd8228ea269a61f1dff737129" title="Reads raw data from the card.">sd_raw_read</a>, <a class="el" href="group__sd__raw.html#g51fc917873e34e96cb981fbbb47a69c5" title="Writes raw data to the card.">sd_raw_write</a> </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="gd4d9ff40a7ea50c65cfa47927b35b735"></a><!-- doxytag: member="sd_raw.c::sd_raw_sync" ref="gd4d9ff40a7ea50c65cfa47927b35b735" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t sd_raw_sync </td>
<td>(</td>
<td class="paramname"> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Writes the write buffer's content to the card.
<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>When write buffering is enabled, you should call this function before disconnecting the card to ensure all remaining data has been written.</dd></dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure, 1 on success. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__sd__raw.html#g51fc917873e34e96cb981fbbb47a69c5" title="Writes raw data to the card.">sd_raw_write</a> </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="g51fc917873e34e96cb981fbbb47a69c5"></a><!-- doxytag: member="sd_raw.c::sd_raw_write" ref="g51fc917873e34e96cb981fbbb47a69c5" args="(uint32_t offset, const uint8_t *buffer, uint16_t length)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t sd_raw_write </td>
<td>(</td>
<td class="paramtype">uint32_t&nbsp;</td>
<td class="paramname"> <em>offset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint8_t *&nbsp;</td>
<td class="paramname"> <em>buffer</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint16_t&nbsp;</td>
<td class="paramname"> <em>length</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Writes raw data to the card.
<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>If write buffering is enabled, you might have to call <a class="el" href="group__sd__raw.html#gd4d9ff40a7ea50c65cfa47927b35b735" title="Writes the write buffer&#39;s content to the card.">sd_raw_sync()</a> before disconnecting the card to ensure all remaining data has been written.</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>offset</em>&nbsp;</td><td>The offset where to start writing. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>buffer</em>&nbsp;</td><td>The buffer containing the data to be written. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>length</em>&nbsp;</td><td>The number of bytes to write. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure, 1 on success. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__sd__raw.html#gc004a1ffd2d552f8bc34ad1ced6181c4" title="Writes a continuous data stream obtained from a callback function.">sd_raw_write_interval</a>, <a class="el" href="group__sd__raw.html#g5f69513fd8228ea269a61f1dff737129" title="Reads raw data from the card.">sd_raw_read</a>, <a class="el" href="group__sd__raw.html#gffd7c377b887bb05f7756ca827d3863e" title="Continuously reads units of interval bytes and calls a callback function.">sd_raw_read_interval</a> </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="gc004a1ffd2d552f8bc34ad1ced6181c4"></a><!-- doxytag: member="sd_raw.c::sd_raw_write_interval" ref="gc004a1ffd2d552f8bc34ad1ced6181c4" args="(uint32_t offset, uint8_t *buffer, uint16_t length, sd_raw_write_interval_handler_t callback, void *p)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t sd_raw_write_interval </td>
<td>(</td>
<td class="paramtype">uint32_t&nbsp;</td>
<td class="paramname"> <em>offset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t *&nbsp;</td>
<td class="paramname"> <em>buffer</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint16_t&nbsp;</td>
<td class="paramname"> <em>length</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">sd_raw_write_interval_handler_t&nbsp;</td>
<td class="paramname"> <em>callback</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void *&nbsp;</td>
<td class="paramname"> <em>p</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Writes a continuous data stream obtained from a callback function.
<p>
This function starts writing at the specified offset. To obtain the next bytes to write, it calls the callback function. The callback fills the provided data buffer and returns the number of bytes it has put into the buffer.<p>
By returning zero, the callback may stop writing.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>offset</em>&nbsp;</td><td>Offset where to start writing. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>buffer</em>&nbsp;</td><td>Pointer to a buffer which is used for the callback function. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>length</em>&nbsp;</td><td>Number of bytes to write in total. May be zero for endless writes. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>callback</em>&nbsp;</td><td>The function used to obtain the bytes to write. </td></tr>
<tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>p</em>&nbsp;</td><td>An opaque pointer directly passed to the callback function. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure, 1 on success </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__sd__raw.html#gffd7c377b887bb05f7756ca827d3863e" title="Continuously reads units of interval bytes and calls a callback function.">sd_raw_read_interval</a>, <a class="el" href="group__sd__raw.html#g51fc917873e34e96cb981fbbb47a69c5" title="Writes raw data to the card.">sd_raw_write</a>, <a class="el" href="group__sd__raw.html#g5f69513fd8228ea269a61f1dff737129" title="Reads raw data from the card.">sd_raw_read</a> </dd></dl>
 
</div>
</div><p>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Dec 13 19:38:48 2007 for sd-reader by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3-20071008 </small></address>
</body>
</html>
/Designs/GPSRL02A/SW/doc/html/group__sd__raw__config.html
0,0 → 1,119
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>sd-reader: MMC/SD configuration</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3-20071008 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>MMC/SD configuration<br>
<small>
[<a class="el" href="group__sd__raw.html">MMC/SD card raw access</a>]</small>
</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
Preprocessor defines to configure the MMC/SD support.
<p>
 
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw__config.html#g5f2253a3c408671f91f9aebefeef7472">SD_RAW_WRITE_SUPPORT</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Controls MMC/SD write support. <a href="#g5f2253a3c408671f91f9aebefeef7472"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw__config.html#ga749d88c077a812f5c518e3172c96f9e">SD_RAW_WRITE_BUFFERING</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Controls MMC/SD write buffering. <a href="#ga749d88c077a812f5c518e3172c96f9e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw__config.html#g4b98be138e87b8ab807d3f266a0c5bb9">SD_RAW_SAVE_RAM</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Controls MMC/SD access buffering. <a href="#g4b98be138e87b8ab807d3f266a0c5bb9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw__config.html#g4b98be138e87b8ab807d3f266a0c5bb9">SD_RAW_SAVE_RAM</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Controls MMC/SD access buffering. <a href="#g4b98be138e87b8ab807d3f266a0c5bb9"></a><br></td></tr>
</table>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="g4b98be138e87b8ab807d3f266a0c5bb9"></a><!-- doxytag: member="sd_raw_config.h::SD_RAW_SAVE_RAM" ref="g4b98be138e87b8ab807d3f266a0c5bb9" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define SD_RAW_SAVE_RAM </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Controls MMC/SD access buffering.
<p>
Set to 1 to save static RAM, but be aware that you will lose performance.<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>When SD_RAW_WRITE_SUPPORT is 1, SD_RAW_SAVE_RAM will be reset to 0. </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="g4b98be138e87b8ab807d3f266a0c5bb9"></a><!-- doxytag: member="sd_raw_config.h::SD_RAW_SAVE_RAM" ref="g4b98be138e87b8ab807d3f266a0c5bb9" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define SD_RAW_SAVE_RAM </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Controls MMC/SD access buffering.
<p>
Set to 1 to save static RAM, but be aware that you will lose performance.<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>When SD_RAW_WRITE_SUPPORT is 1, SD_RAW_SAVE_RAM will be reset to 0. </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="ga749d88c077a812f5c518e3172c96f9e"></a><!-- doxytag: member="sd_raw_config.h::SD_RAW_WRITE_BUFFERING" ref="ga749d88c077a812f5c518e3172c96f9e" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define SD_RAW_WRITE_BUFFERING </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Controls MMC/SD write buffering.
<p>
Set to 1 to buffer write accesses, set to 0 to disable it.<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>This option has no effect when SD_RAW_WRITE_SUPPORT is 0. </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="g5f2253a3c408671f91f9aebefeef7472"></a><!-- doxytag: member="sd_raw_config.h::SD_RAW_WRITE_SUPPORT" ref="g5f2253a3c408671f91f9aebefeef7472" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define SD_RAW_WRITE_SUPPORT </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Controls MMC/SD write support.
<p>
Set to 1 to enable MMC/SD write support, set to 0 to disable it.
</div>
</div><p>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Dec 13 19:38:48 2007 for sd-reader by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3-20071008 </small></address>
</body>
</html>
/Designs/GPSRL02A/SW/doc/html/index.html
0,0 → 1,140
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>sd-reader: MMC/SD card example application</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3-20071008 -->
<div class="tabs">
<ul>
<li class="current"><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>MMC/SD card example application</h1>
<p>
This project is a small test application which implements read and write support for MMC and SD cards. It includes<ul>
<li>low-level <a class="el" href="group__sd__raw.html">MMC read/write routines </a></li><li><a class="el" href="group__partition.html">partition table support </a></li><li>a simple <a class="el" href="group__fat16.html">FAT16 read/write implementation </a></li></ul>
<h2><a class="anchor" name="circuit">
The circuit</a></h2>
The curcuit board is a self-made and self-soldered board consisting of a single copper layer and standard DIL components, except of the MMC/SD card connector.<p>
The connector is soldered to the bottom side of the board. It has a simple eject button which, when a card is inserted, needs some space beyond the connector itself. As an additional feature the connector has two electrical switches to detect wether a card is inserted and wether this card is write-protected.<p>
I used two microcontrollers during development, the Atmel ATmega8 with 8kBytes of flash, and its pin-compatible alternative, the ATmega168 with 16kBytes flash. The first one is the one I started with, but when I implemented FAT16 write support, I ran out of flash space and switched to the ATmega168.<h2><a class="anchor" name="pictures">
Pictures</a></h2>
<div align="center">
<img src="pic01.jpg" alt="pic01.jpg">
<p><strong>The circuit board used to implement and test this application.</strong></p></div>
<div align="center">
<img src="pic02.jpg" alt="pic02.jpg">
<p><strong>The MMC/SD card connector on the soldering side of the circuit board.</strong></p></div>
<h2><a class="anchor" name="software">
The software</a></h2>
The software is written in pure standard ANSI-C. Sure, it might not be the smallest or the fastest one, but I think it is quite flexible.<p>
I implemented a simple command prompt which is accessible via the UART at 9600 Baud. With commands similiar to the Unix shell you can browse different directories, read and write files, create new ones and delete them again. Not all commands are available in all software configurations.<ul>
<li><code>cat &lt;file&gt;</code><br>
Writes a hexdump of &lt;file&gt; to the terminal.</li><li><code>cd &lt;directory&gt;</code><br>
Changes current working directory to &lt;directory&gt;.</li><li><code>disk</code><br>
Shows card manufacturer, status, filesystem capacity and free storage space.</li><li><code>ls</code><br>
Shows the content of the current directory.</li><li><code>mkdir &lt;directory&gt;</code><br>
Creates a directory called &lt;directory&gt;.</li><li><code>rm &lt;file&gt;</code><br>
Deletes &lt;file&gt;.</li><li><code>sync</code><br>
Ensures all buffered data is written to the card.</li><li><code>touch &lt;file&gt;</code><br>
Creates &lt;file&gt;.</li><li><code>write &lt;file&gt; &lt;offset&gt;</code><br>
Writes text to &lt;file&gt;, starting from &lt;offset&gt;. The text is read from the UART, line by line. Finish with an empty line.</li></ul>
<p>
<p>
The following table shows some typical code sizes in bytes, using the 20061101 release with malloc()/free():
</p>
 
<table border="1" cellpadding="2">
<tr>
<th>layer</th>
<th>code size</th>
<th>static RAM usage</th>
</tr>
<tr>
<td>MMC/SD (read-only)</td>
<td align="right">1576</td>
<td align="right">0</td>
</tr>
<tr>
<td>MMC/SD (read-write)</td>
<td align="right">2202</td>
<td align="right">517</td>
</tr>
<tr>
<td>Partition</td>
<td align="right">418</td>
<td align="right">0</td>
</tr>
<tr>
<td>FAT16 (read-only)</td>
<td align="right">3834</td>
<td align="right">0</td>
</tr>
<tr>
<td>FAT16 (read-write)</td>
<td align="right">7932</td>
<td align="right">0</td>
</tr>
</table>
 
<p>
The static RAM in the read-write case is used for buffering memory card
access. Without this buffer, implementation would have been much more complicated.
</p>
<p>
Please note that the numbers above do not include the C library functions
used, e.g. malloc()/free() and some string functions. These will raise the
numbers somewhat if they are not already used in other program parts.
</p>
<p>
When opening a partition, filesystem, file or directory, a little amount
of dynamic RAM is used, as listed in the following table. Alternatively,
the same amount of static RAM can be used.
</p>
 
<table border="1" cellpadding="2">
<tr>
<th>descriptor</th>
<th>dynamic/static RAM</th>
</tr>
<tr>
<td>partition</td>
<td align="right">17</td>
</tr>
<tr>
<td>filesystem</td>
<td align="right">26</td>
</tr>
<tr>
<td>file</td>
<td align="right">51</td>
</tr>
<tr>
<td>directory</td>
<td align="right">47</td>
</tr>
</table>
<h2><a class="anchor" name="adaptation">
Adapting the software to your needs</a></h2>
The only hardware dependent part is the communication layer talking to the memory card. The other parts like partition table and FAT16 support are completely independent, you could use them even for managing Compact Flash cards or standard ATAPI hard disks.<p>
By changing the MCU* variables in the Makefile, you can use other Atmel microcontrollers or different clock speeds. You might also want to change the configuration defines in the files <a class="el" href="fat16__config_8h.html" title="FAT16 configuration (license: GPLv2 or LGPLv2.1).">fat16_config.h</a>, <a class="el" href="partition__config_8h.html" title="Partition configuration (license: GPLv2 or LGPLv2.1).">partition_config.h</a>, <a class="el" href="sd__raw__config_8h.html" title="MMC/SD support configuration (license: GPLv2 or LGPLv2.1).">sd_raw_config.h</a> and <a class="el" href="sd-reader__config_8h.html" title="Common sd-reader configuration used by all modules (license: GPLv2 or LGPLv2.1).">sd-reader_config.h</a>. For example, you could disable write support completely if you only need read support.<h2><a class="anchor" name="bugs">
Bugs or comments?</a></h2>
If you have comments or found a bug in the software - there might be some of them - you may contact me per mail at <a href="mailto:feedback@roland-riegel.de">feedback@roland-riegel.de</a>.<h2><a class="anchor" name="acknowledgements">
Acknowledgements</a></h2>
Thanks go to Ulrich Radig, who explained on his homepage how to interface MMC cards to the Atmel microcontroller (<a href="http://www.ulrichradig.de/">http://www.ulrichradig.de/</a>). I adapted his work for my circuit. Although this is a very simple solution, I had no problems using it.<h2><a class="anchor" name="copyright">
Copyright 2006-2007 by Roland Riegel</a></h2>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation (<a href="http://www.gnu.org/copyleft/gpl.html">http://www.gnu.org/copyleft/gpl.html</a>). At your option, you can alternatively redistribute and/or modify the following files under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation (<a href="http://www.gnu.org/copyleft/lgpl.html">http://www.gnu.org/copyleft/lgpl.html</a>):<ul>
<li><a class="el" href="fat16_8c.html" title="FAT16 implementation (license: GPLv2 or LGPLv2.1).">fat16.c</a></li><li><a class="el" href="fat16_8h.html" title="FAT16 header (license: GPLv2 or LGPLv2.1).">fat16.h</a></li><li><a class="el" href="fat16__config_8h.html" title="FAT16 configuration (license: GPLv2 or LGPLv2.1).">fat16_config.h</a></li><li><a class="el" href="partition_8c.html" title="Partition table implementation (license: GPLv2 or LGPLv2.1).">partition.c</a></li><li><a class="el" href="partition_8h.html" title="Partition table header (license: GPLv2 or LGPLv2.1).">partition.h</a></li><li><a class="el" href="partition__config_8h.html" title="Partition configuration (license: GPLv2 or LGPLv2.1).">partition_config.h</a></li><li><a class="el" href="sd__raw_8c.html" title="MMC/SD raw access implementation (license: GPLv2 or LGPLv2.1).">sd_raw.c</a></li><li><a class="el" href="sd__raw_8h.html" title="MMC/SD raw access header (license: GPLv2 or LGPLv2.1).">sd_raw.h</a></li><li><a class="el" href="sd__raw__config_8h.html" title="MMC/SD support configuration (license: GPLv2 or LGPLv2.1).">sd_raw_config.h</a></li><li><a class="el" href="sd-reader__config_8h.html" title="Common sd-reader configuration used by all modules (license: GPLv2 or LGPLv2.1).">sd-reader_config.h</a> </li></ul>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Dec 13 19:38:48 2007 for sd-reader by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3-20071008 </small></address>
</body>
</html>
/Designs/GPSRL02A/SW/doc/html/modules.html
0,0 → 1,38
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>sd-reader: Module Index</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3-20071008 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li class="current"><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>sd-reader Modules</h1>Here is a list of all modules:<ul>
<li><a class="el" href="group__fat16.html">FAT16 support</a>
<ul>
<li><a class="el" href="group__fat16__config.html">FAT16 configuration</a>
<li><a class="el" href="group__fat16__fs.html">FAT16 access</a>
<li><a class="el" href="group__fat16__file.html">FAT16 file functions</a>
<li><a class="el" href="group__fat16__dir.html">FAT16 directory functions</a>
</ul>
<li><a class="el" href="group__partition.html">Partition table support</a>
<ul>
<li><a class="el" href="group__partition__config.html">Configuration of partition table support</a>
</ul>
<li><a class="el" href="group__config.html">Sd-reader configuration</a>
<li><a class="el" href="group__sd__raw.html">MMC/SD card raw access</a>
<ul>
<li><a class="el" href="group__sd__raw__config.html">MMC/SD configuration</a>
</ul>
</ul>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Dec 13 19:38:48 2007 for sd-reader by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3-20071008 </small></address>
</body>
</html>
/Designs/GPSRL02A/SW/doc/html/partition_8c.html
0,0 → 1,36
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>sd-reader: partition.c File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3-20071008 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>partition.c File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
Partition table implementation (license: GPLv2 or LGPLv2.1).
<p>
<dl class="author" compact><dt><b>Author:</b></dt><dd>Roland Riegel </dd></dl>
 
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct <a class="el" href="structpartition__struct.html">partition_struct</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#g3125023db4e9d50adb8489c71fa1be68">partition_open</a> (<a class="el" href="group__partition.html#g6a2b9c5359ec033470fc25b2626e56fc">device_read_t</a> device_read, <a class="el" href="group__partition.html#gebc277053a3361aaf4b67a486e24fa24">device_read_interval_t</a> device_read_interval, <a class="el" href="group__partition.html#gc6ca9cbb79b5099d610e976365ee2e8e">device_write_t</a> device_write, <a class="el" href="group__partition.html#g975ce8905536b4c1020eb18b5b640158">device_write_interval_t</a> device_write_interval, int8_t index)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Opens a partition. <a href="group__partition.html#g3125023db4e9d50adb8489c71fa1be68"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#g128f4363de35c81a9ff8026d4db289d2">partition_close</a> (struct <a class="el" href="structpartition__struct.html">partition_struct</a> *partition)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Closes a partition. <a href="group__partition.html#g128f4363de35c81a9ff8026d4db289d2"></a><br></td></tr>
</table>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Dec 13 19:38:48 2007 for sd-reader by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3-20071008 </small></address>
</body>
</html>
/Designs/GPSRL02A/SW/doc/html/partition_8h.html
0,0 → 1,100
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>sd-reader: partition.h File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3-20071008 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>partition.h File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
Partition table header (license: GPLv2 or LGPLv2.1).
<p>
<dl class="author" compact><dt><b>Author:</b></dt><dd>Roland Riegel </dd></dl>
 
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpartition__struct.html">partition_struct</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Describes a partition. <a href="structpartition__struct.html#_details">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gab5ffe2ef6119a6815c505e3103a2714"></a><!-- doxytag: member="partition.h::PARTITION_TYPE_FREE" ref="gab5ffe2ef6119a6815c505e3103a2714" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#gab5ffe2ef6119a6815c505e3103a2714">PARTITION_TYPE_FREE</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The partition table entry is not used. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga92b6c552d2411e093204cd3ed4cffa3"></a><!-- doxytag: member="partition.h::PARTITION_TYPE_FAT12" ref="ga92b6c552d2411e093204cd3ed4cffa3" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#ga92b6c552d2411e093204cd3ed4cffa3">PARTITION_TYPE_FAT12</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The partition contains a FAT12 filesystem. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gf7296b4a29c1f7e5c39e28372648b2cd"></a><!-- doxytag: member="partition.h::PARTITION_TYPE_FAT16_32MB" ref="gf7296b4a29c1f7e5c39e28372648b2cd" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#gf7296b4a29c1f7e5c39e28372648b2cd">PARTITION_TYPE_FAT16_32MB</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The partition contains a FAT16 filesystem with 32MB maximum. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gceaa1bf17d4e8961726834e53ed79732"></a><!-- doxytag: member="partition.h::PARTITION_TYPE_EXTENDED" ref="gceaa1bf17d4e8961726834e53ed79732" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#gceaa1bf17d4e8961726834e53ed79732">PARTITION_TYPE_EXTENDED</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The partition is an extended partition with its own partition table. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gda7e1b4d950c7a3f42f559ab99f5fe43"></a><!-- doxytag: member="partition.h::PARTITION_TYPE_FAT16" ref="gda7e1b4d950c7a3f42f559ab99f5fe43" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#gda7e1b4d950c7a3f42f559ab99f5fe43">PARTITION_TYPE_FAT16</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The partition contains a FAT16 filesystem. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g2f6a6c30cc239ae13ea287ff901c95f4"></a><!-- doxytag: member="partition.h::PARTITION_TYPE_FAT32" ref="g2f6a6c30cc239ae13ea287ff901c95f4" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#g2f6a6c30cc239ae13ea287ff901c95f4">PARTITION_TYPE_FAT32</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The partition contains a FAT32 filesystem. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga2e0c8e8b4ec10f7b342c0d554b5f6d8"></a><!-- doxytag: member="partition.h::PARTITION_TYPE_FAT32_LBA" ref="ga2e0c8e8b4ec10f7b342c0d554b5f6d8" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#ga2e0c8e8b4ec10f7b342c0d554b5f6d8">PARTITION_TYPE_FAT32_LBA</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The partition contains a FAT32 filesystem with LBA. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g52b69fda008ca19d75304a2385cc4900"></a><!-- doxytag: member="partition.h::PARTITION_TYPE_FAT16_LBA" ref="g52b69fda008ca19d75304a2385cc4900" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#g52b69fda008ca19d75304a2385cc4900">PARTITION_TYPE_FAT16_LBA</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The partition contains a FAT16 filesystem with LBA. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g1c9a00e3b09b488ce7f3b2ef2904400b"></a><!-- doxytag: member="partition.h::PARTITION_TYPE_EXTENDED_LBA" ref="g1c9a00e3b09b488ce7f3b2ef2904400b" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#g1c9a00e3b09b488ce7f3b2ef2904400b">PARTITION_TYPE_EXTENDED_LBA</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The partition is an extended partition with LBA. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gcdc50585fe8130f0a4faee13caade86f"></a><!-- doxytag: member="partition.h::PARTITION_TYPE_UNKNOWN" ref="gcdc50585fe8130f0a4faee13caade86f" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#gcdc50585fe8130f0a4faee13caade86f">PARTITION_TYPE_UNKNOWN</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The partition has an unknown type. <br></td></tr>
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef uint8_t(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#g6a2b9c5359ec033470fc25b2626e56fc">device_read_t</a> )(uint32_t offset, uint8_t *buffer, uint16_t length)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A function pointer used to read from the partition. <a href="group__partition.html#g6a2b9c5359ec033470fc25b2626e56fc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef uint8_t(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#g0c94a44bb3d9090d3ad662a4ea772f9b">device_read_callback_t</a> )(uint8_t *buffer, uint32_t offset, void *p)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A function pointer passed to a <code>device_read_interval_t</code>. <a href="group__partition.html#g0c94a44bb3d9090d3ad662a4ea772f9b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef uint8_t(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#gebc277053a3361aaf4b67a486e24fa24">device_read_interval_t</a> )(uint32_t offset, uint8_t *buffer, uint16_t interval, uint16_t length, <a class="el" href="group__partition.html#g0c94a44bb3d9090d3ad662a4ea772f9b">device_read_callback_t</a> callback, void *p)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A function pointer used to continuously read units of <code>interval</code> bytes and call a callback function. <a href="group__partition.html#gebc277053a3361aaf4b67a486e24fa24"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef uint8_t(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#gc6ca9cbb79b5099d610e976365ee2e8e">device_write_t</a> )(uint32_t offset, const uint8_t *buffer, uint16_t length)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A function pointer used to write to the partition. <a href="group__partition.html#gc6ca9cbb79b5099d610e976365ee2e8e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef uint16_t(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#g089849983ec009841429eb6a1d3cb4cc">device_write_callback_t</a> )(uint8_t *buffer, uint32_t offset, void *p)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A function pointer passed to a <code>device_write_interval_t</code>. <a href="group__partition.html#g089849983ec009841429eb6a1d3cb4cc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef uint8_t(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#g975ce8905536b4c1020eb18b5b640158">device_write_interval_t</a> )(uint32_t offset, uint8_t *buffer, uint16_t length, <a class="el" href="group__partition.html#g089849983ec009841429eb6a1d3cb4cc">device_write_callback_t</a> callback, void *p)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A function pointer used to continuously write a data stream obtained from a callback function. <a href="group__partition.html#g975ce8905536b4c1020eb18b5b640158"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct <a class="el" href="structpartition__struct.html">partition_struct</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#g3125023db4e9d50adb8489c71fa1be68">partition_open</a> (<a class="el" href="group__partition.html#g6a2b9c5359ec033470fc25b2626e56fc">device_read_t</a> device_read, <a class="el" href="group__partition.html#gebc277053a3361aaf4b67a486e24fa24">device_read_interval_t</a> device_read_interval, <a class="el" href="group__partition.html#gc6ca9cbb79b5099d610e976365ee2e8e">device_write_t</a> device_write, <a class="el" href="group__partition.html#g975ce8905536b4c1020eb18b5b640158">device_write_interval_t</a> device_write_interval, int8_t index)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Opens a partition. <a href="group__partition.html#g3125023db4e9d50adb8489c71fa1be68"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition.html#g128f4363de35c81a9ff8026d4db289d2">partition_close</a> (struct <a class="el" href="structpartition__struct.html">partition_struct</a> *partition)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Closes a partition. <a href="group__partition.html#g128f4363de35c81a9ff8026d4db289d2"></a><br></td></tr>
</table>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Dec 13 19:38:48 2007 for sd-reader by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3-20071008 </small></address>
</body>
</html>
/Designs/GPSRL02A/SW/doc/html/partition__config_8h.html
0,0 → 1,33
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>sd-reader: partition_config.h File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3-20071008 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>partition_config.h File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
Partition configuration (license: GPLv2 or LGPLv2.1).
<p>
 
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gd3d3ffd91206adf249d3318930f024af"></a><!-- doxytag: member="partition_config.h::PARTITION_COUNT" ref="gd3d3ffd91206adf249d3318930f024af" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__partition__config.html#gd3d3ffd91206adf249d3318930f024af">PARTITION_COUNT</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Maximum number of partition handles. <br></td></tr>
</table>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Dec 13 19:38:48 2007 for sd-reader by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3-20071008 </small></address>
</body>
</html>
/Designs/GPSRL02A/SW/doc/html/pic01.jpg
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Designs/GPSRL02A/SW/doc/html/pic02.jpg
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Designs/GPSRL02A/SW/doc/html/sd-reader__config_8h.html
0,0 → 1,33
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>sd-reader: sd-reader_config.h File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3-20071008 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>sd-reader_config.h File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
Common sd-reader configuration used by all modules (license: GPLv2 or LGPLv2.1).
<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>This file contains only configuration items relevant to all sd-reader implementation files. For module specific configuration options, please see the files <a class="el" href="fat16__config_8h.html" title="FAT16 configuration (license: GPLv2 or LGPLv2.1).">fat16_config.h</a>, <a class="el" href="partition__config_8h.html" title="Partition configuration (license: GPLv2 or LGPLv2.1).">partition_config.h</a> and <a class="el" href="sd__raw__config_8h.html" title="MMC/SD support configuration (license: GPLv2 or LGPLv2.1).">sd_raw_config.h</a>. </dd></dl>
 
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__config.html#g59a630bfc97e8a00e2ad0a0ad4b2f8a7">USE_DYNAMIC_MEMORY</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Controls allocation of memory. <a href="group__config.html#g59a630bfc97e8a00e2ad0a0ad4b2f8a7"></a><br></td></tr>
</table>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Dec 13 19:38:48 2007 for sd-reader by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3-20071008 </small></address>
</body>
</html>
/Designs/GPSRL02A/SW/doc/html/sd__raw_8c.html
0,0 → 1,57
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>sd-reader: sd_raw.c File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3-20071008 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>sd_raw.c File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
MMC/SD raw access implementation (license: GPLv2 or LGPLv2.1).
<p>
<dl class="author" compact><dt><b>Author:</b></dt><dd>Roland Riegel </dd></dl>
 
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw.html#g82e8599b2679451e491484fb0b19bfd5">sd_raw_init</a> ()</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initializes memory card communication. <a href="group__sd__raw.html#g82e8599b2679451e491484fb0b19bfd5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw.html#g5e227f25ad4a18466e7cdd9ecdfce8ab">sd_raw_available</a> ()</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Checks wether a memory card is located in the slot. <a href="group__sd__raw.html#g5e227f25ad4a18466e7cdd9ecdfce8ab"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw.html#g55f311428473cd5b85cf8f24ffba121b">sd_raw_locked</a> ()</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Checks wether the memory card is locked for write access. <a href="group__sd__raw.html#g55f311428473cd5b85cf8f24ffba121b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw.html#g5f69513fd8228ea269a61f1dff737129">sd_raw_read</a> (uint32_t offset, uint8_t *buffer, uint16_t length)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reads raw data from the card. <a href="group__sd__raw.html#g5f69513fd8228ea269a61f1dff737129"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw.html#gffd7c377b887bb05f7756ca827d3863e">sd_raw_read_interval</a> (uint32_t offset, uint8_t *buffer, uint16_t interval, uint16_t length, sd_raw_read_interval_handler_t callback, void *p)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Continuously reads units of <code>interval</code> bytes and calls a callback function. <a href="group__sd__raw.html#gffd7c377b887bb05f7756ca827d3863e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw.html#g51fc917873e34e96cb981fbbb47a69c5">sd_raw_write</a> (uint32_t offset, const uint8_t *buffer, uint16_t length)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Writes raw data to the card. <a href="group__sd__raw.html#g51fc917873e34e96cb981fbbb47a69c5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw.html#gc004a1ffd2d552f8bc34ad1ced6181c4">sd_raw_write_interval</a> (uint32_t offset, uint8_t *buffer, uint16_t length, sd_raw_write_interval_handler_t callback, void *p)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Writes a continuous data stream obtained from a callback function. <a href="group__sd__raw.html#gc004a1ffd2d552f8bc34ad1ced6181c4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw.html#gd4d9ff40a7ea50c65cfa47927b35b735">sd_raw_sync</a> ()</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Writes the write buffer's content to the card. <a href="group__sd__raw.html#gd4d9ff40a7ea50c65cfa47927b35b735"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw.html#g97c54e82834f87bcdd38e79822fe5a79">sd_raw_get_info</a> (struct <a class="el" href="structsd__raw__info.html">sd_raw_info</a> *info)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reads informational data from the card. <a href="group__sd__raw.html#g97c54e82834f87bcdd38e79822fe5a79"></a><br></td></tr>
</table>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Dec 13 19:38:48 2007 for sd-reader by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3-20071008 </small></address>
</body>
</html>
/Designs/GPSRL02A/SW/doc/html/sd__raw_8h.html
0,0 → 1,78
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>sd-reader: sd_raw.h File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3-20071008 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>sd_raw.h File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
MMC/SD raw access header (license: GPLv2 or LGPLv2.1).
<p>
<dl class="author" compact><dt><b>Author:</b></dt><dd>Roland Riegel </dd></dl>
 
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsd__raw__info.html">sd_raw_info</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This struct is used by <a class="el" href="group__sd__raw.html#g97c54e82834f87bcdd38e79822fe5a79" title="Reads informational data from the card.">sd_raw_get_info()</a> to return manufacturing and status information of the card. <a href="structsd__raw__info.html#_details">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g2507a78d61385c9dbc1d06b8a03ef58a"></a><!-- doxytag: member="sd_raw.h::SD_RAW_FORMAT_HARDDISK" ref="g2507a78d61385c9dbc1d06b8a03ef58a" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw.html#g2507a78d61385c9dbc1d06b8a03ef58a">SD_RAW_FORMAT_HARDDISK</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The card's layout is harddisk-like, which means it contains a master boot record with a partition table. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g4caede5500f4d1035ceb9951a831c224"></a><!-- doxytag: member="sd_raw.h::SD_RAW_FORMAT_SUPERFLOPPY" ref="g4caede5500f4d1035ceb9951a831c224" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw.html#g4caede5500f4d1035ceb9951a831c224">SD_RAW_FORMAT_SUPERFLOPPY</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The card contains a single filesystem and no partition table. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gd070d05f762410f57870549a0fcd5f43"></a><!-- doxytag: member="sd_raw.h::SD_RAW_FORMAT_UNIVERSAL" ref="gd070d05f762410f57870549a0fcd5f43" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw.html#gd070d05f762410f57870549a0fcd5f43">SD_RAW_FORMAT_UNIVERSAL</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The card's layout follows the Universal File Format. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g7e87231437f32335a25930ec1b85a9c9"></a><!-- doxytag: member="sd_raw.h::SD_RAW_FORMAT_UNKNOWN" ref="g7e87231437f32335a25930ec1b85a9c9" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw.html#g7e87231437f32335a25930ec1b85a9c9">SD_RAW_FORMAT_UNKNOWN</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The card's layout is unknown. <br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw.html#g82e8599b2679451e491484fb0b19bfd5">sd_raw_init</a> ()</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initializes memory card communication. <a href="group__sd__raw.html#g82e8599b2679451e491484fb0b19bfd5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw.html#g5e227f25ad4a18466e7cdd9ecdfce8ab">sd_raw_available</a> ()</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Checks wether a memory card is located in the slot. <a href="group__sd__raw.html#g5e227f25ad4a18466e7cdd9ecdfce8ab"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw.html#g55f311428473cd5b85cf8f24ffba121b">sd_raw_locked</a> ()</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Checks wether the memory card is locked for write access. <a href="group__sd__raw.html#g55f311428473cd5b85cf8f24ffba121b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw.html#g5f69513fd8228ea269a61f1dff737129">sd_raw_read</a> (uint32_t offset, uint8_t *buffer, uint16_t length)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reads raw data from the card. <a href="group__sd__raw.html#g5f69513fd8228ea269a61f1dff737129"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw.html#gffd7c377b887bb05f7756ca827d3863e">sd_raw_read_interval</a> (uint32_t offset, uint8_t *buffer, uint16_t interval, uint16_t length, sd_raw_read_interval_handler_t callback, void *p)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Continuously reads units of <code>interval</code> bytes and calls a callback function. <a href="group__sd__raw.html#gffd7c377b887bb05f7756ca827d3863e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw.html#g51fc917873e34e96cb981fbbb47a69c5">sd_raw_write</a> (uint32_t offset, const uint8_t *buffer, uint16_t length)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Writes raw data to the card. <a href="group__sd__raw.html#g51fc917873e34e96cb981fbbb47a69c5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw.html#gc004a1ffd2d552f8bc34ad1ced6181c4">sd_raw_write_interval</a> (uint32_t offset, uint8_t *buffer, uint16_t length, sd_raw_write_interval_handler_t callback, void *p)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Writes a continuous data stream obtained from a callback function. <a href="group__sd__raw.html#gc004a1ffd2d552f8bc34ad1ced6181c4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw.html#gd4d9ff40a7ea50c65cfa47927b35b735">sd_raw_sync</a> ()</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Writes the write buffer's content to the card. <a href="group__sd__raw.html#gd4d9ff40a7ea50c65cfa47927b35b735"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw.html#g97c54e82834f87bcdd38e79822fe5a79">sd_raw_get_info</a> (struct <a class="el" href="structsd__raw__info.html">sd_raw_info</a> *info)</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reads informational data from the card. <a href="group__sd__raw.html#g97c54e82834f87bcdd38e79822fe5a79"></a><br></td></tr>
</table>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Dec 13 19:38:48 2007 for sd-reader by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3-20071008 </small></address>
</body>
</html>
/Designs/GPSRL02A/SW/doc/html/sd__raw__config_8h.html
0,0 → 1,41
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>sd-reader: sd_raw_config.h File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3-20071008 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>sd_raw_config.h File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
MMC/SD support configuration (license: GPLv2 or LGPLv2.1).
<p>
 
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw__config.html#g5f2253a3c408671f91f9aebefeef7472">SD_RAW_WRITE_SUPPORT</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Controls MMC/SD write support. <a href="group__sd__raw__config.html#g5f2253a3c408671f91f9aebefeef7472"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw__config.html#ga749d88c077a812f5c518e3172c96f9e">SD_RAW_WRITE_BUFFERING</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Controls MMC/SD write buffering. <a href="group__sd__raw__config.html#ga749d88c077a812f5c518e3172c96f9e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw__config.html#g4b98be138e87b8ab807d3f266a0c5bb9">SD_RAW_SAVE_RAM</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Controls MMC/SD access buffering. <a href="group__sd__raw__config.html#g4b98be138e87b8ab807d3f266a0c5bb9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sd__raw__config.html#g4b98be138e87b8ab807d3f266a0c5bb9">SD_RAW_SAVE_RAM</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Controls MMC/SD access buffering. <a href="group__sd__raw__config.html#g4b98be138e87b8ab807d3f266a0c5bb9"></a><br></td></tr>
</table>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Dec 13 19:38:48 2007 for sd-reader by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3-20071008 </small></address>
</body>
</html>
/Designs/GPSRL02A/SW/doc/html/structfat16__dir__entry__struct.html
0,0 → 1,135
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>sd-reader: fat16_dir_entry_struct Struct Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3-20071008 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
</ul>
</div>
<h1>fat16_dir_entry_struct Struct Reference<br>
<small>
[<a class="el" href="group__fat16.html">FAT16 support</a>,&nbsp;<a class="el" href="group__fat16__file.html">FAT16 file functions</a>]</small>
</h1><!-- doxytag: class="fat16_dir_entry_struct" --><hr><a name="_details"></a><h2>Detailed Description</h2>
Describes a directory entry. <table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Data Fields</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">char&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfat16__dir__entry__struct.html#9f625c7e8ac92bd268c62089f71480d0">long_name</a> [32]</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The file's name, truncated to 31 characters. <a href="#9f625c7e8ac92bd268c62089f71480d0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfat16__dir__entry__struct.html#4e4c6084a1f0cf1e687ac68853dbd61e">attributes</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The file's attributes. <a href="#4e4c6084a1f0cf1e687ac68853dbd61e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint16_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfat16__dir__entry__struct.html#8bbd1a1339bd035f916ffe91420cc8ad">cluster</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The cluster in which the file's first byte resides. <a href="#8bbd1a1339bd035f916ffe91420cc8ad"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfat16__dir__entry__struct.html#20dc3151ca3727aef4ad79a7735131ff">file_size</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The file's size. <a href="#20dc3151ca3727aef4ad79a7735131ff"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfat16__dir__entry__struct.html#8af0bfe59cef4c7940d2e53da87a0c28">entry_offset</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The total disk offset of this directory entry. <a href="#8af0bfe59cef4c7940d2e53da87a0c28"></a><br></td></tr>
</table>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="9f625c7e8ac92bd268c62089f71480d0"></a><!-- doxytag: member="fat16_dir_entry_struct::long_name" ref="9f625c7e8ac92bd268c62089f71480d0" args="[32]" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char <a class="el" href="structfat16__dir__entry__struct.html#9f625c7e8ac92bd268c62089f71480d0">fat16_dir_entry_struct::long_name</a>[32] </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
The file's name, truncated to 31 characters.
<p>
 
</div>
</div><p>
<a class="anchor" name="4e4c6084a1f0cf1e687ac68853dbd61e"></a><!-- doxytag: member="fat16_dir_entry_struct::attributes" ref="4e4c6084a1f0cf1e687ac68853dbd61e" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t <a class="el" href="structfat16__dir__entry__struct.html#4e4c6084a1f0cf1e687ac68853dbd61e">fat16_dir_entry_struct::attributes</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
The file's attributes.
<p>
Mask of the FAT16_ATTRIB_* constants.
</div>
</div><p>
<a class="anchor" name="8bbd1a1339bd035f916ffe91420cc8ad"></a><!-- doxytag: member="fat16_dir_entry_struct::cluster" ref="8bbd1a1339bd035f916ffe91420cc8ad" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint16_t <a class="el" href="structfat16__dir__entry__struct.html#8bbd1a1339bd035f916ffe91420cc8ad">fat16_dir_entry_struct::cluster</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
The cluster in which the file's first byte resides.
<p>
 
</div>
</div><p>
<a class="anchor" name="20dc3151ca3727aef4ad79a7735131ff"></a><!-- doxytag: member="fat16_dir_entry_struct::file_size" ref="20dc3151ca3727aef4ad79a7735131ff" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t <a class="el" href="structfat16__dir__entry__struct.html#20dc3151ca3727aef4ad79a7735131ff">fat16_dir_entry_struct::file_size</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
The file's size.
<p>
 
</div>
</div><p>
<a class="anchor" name="8af0bfe59cef4c7940d2e53da87a0c28"></a><!-- doxytag: member="fat16_dir_entry_struct::entry_offset" ref="8af0bfe59cef4c7940d2e53da87a0c28" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t <a class="el" href="structfat16__dir__entry__struct.html#8af0bfe59cef4c7940d2e53da87a0c28">fat16_dir_entry_struct::entry_offset</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
The total disk offset of this directory entry.
<p>
 
</div>
</div><p>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Dec 13 19:38:48 2007 for sd-reader by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3-20071008 </small></address>
</body>
</html>
/Designs/GPSRL02A/SW/doc/html/structpartition__struct.html
0,0 → 1,147
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>sd-reader: partition_struct Struct Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3-20071008 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
</ul>
</div>
<h1>partition_struct Struct Reference<br>
<small>
[<a class="el" href="group__partition.html">Partition table support</a>]</small>
</h1><!-- doxytag: class="partition_struct" --><hr><a name="_details"></a><h2>Detailed Description</h2>
Describes a partition. <table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Data Fields</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__partition.html#g6a2b9c5359ec033470fc25b2626e56fc">device_read_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpartition__struct.html#9d82319d1b4f052c165a806069f49afa">device_read</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The function which reads data from the partition. <a href="#9d82319d1b4f052c165a806069f49afa"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__partition.html#gebc277053a3361aaf4b67a486e24fa24">device_read_interval_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpartition__struct.html#23ef90827c177f8f3385582416ff3ea3">device_read_interval</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The function which repeatedly reads a constant amount of data from the partition. <a href="#23ef90827c177f8f3385582416ff3ea3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__partition.html#gc6ca9cbb79b5099d610e976365ee2e8e">device_write_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpartition__struct.html#c16e2eedf75a5e472ed93a92c30e0dad">device_write</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The function which writes data to the partition. <a href="#c16e2eedf75a5e472ed93a92c30e0dad"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__partition.html#g975ce8905536b4c1020eb18b5b640158">device_write_interval_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpartition__struct.html#91923c55ba1c3a2dad435124964d91aa">device_write_interval</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The function which repeatedly writes data to the partition. <a href="#91923c55ba1c3a2dad435124964d91aa"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpartition__struct.html#6923f9a2463495b35df8b73750e5d959">type</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The type of the partition. <a href="#6923f9a2463495b35df8b73750e5d959"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d9d6f2b7a40168d2960e28a151ef1808"></a><!-- doxytag: member="partition_struct::offset" ref="d9d6f2b7a40168d2960e28a151ef1808" args="" -->
uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpartition__struct.html#d9d6f2b7a40168d2960e28a151ef1808">offset</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The offset in bytes on the disk where this partition starts. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="416da0cd540916a03a536c4fc5970635"></a><!-- doxytag: member="partition_struct::length" ref="416da0cd540916a03a536c4fc5970635" args="" -->
uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpartition__struct.html#416da0cd540916a03a536c4fc5970635">length</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The length in bytes of this partition. <br></td></tr>
</table>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="9d82319d1b4f052c165a806069f49afa"></a><!-- doxytag: member="partition_struct::device_read" ref="9d82319d1b4f052c165a806069f49afa" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__partition.html#g6a2b9c5359ec033470fc25b2626e56fc">device_read_t</a> <a class="el" href="structpartition__struct.html#9d82319d1b4f052c165a806069f49afa">partition_struct::device_read</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
The function which reads data from the partition.
<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>The offset given to this function is relative to the whole disk, not to the start of the partition. </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="23ef90827c177f8f3385582416ff3ea3"></a><!-- doxytag: member="partition_struct::device_read_interval" ref="23ef90827c177f8f3385582416ff3ea3" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__partition.html#gebc277053a3361aaf4b67a486e24fa24">device_read_interval_t</a> <a class="el" href="structpartition__struct.html#23ef90827c177f8f3385582416ff3ea3">partition_struct::device_read_interval</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
The function which repeatedly reads a constant amount of data from the partition.
<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>The offset given to this function is relative to the whole disk, not to the start of the partition. </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="c16e2eedf75a5e472ed93a92c30e0dad"></a><!-- doxytag: member="partition_struct::device_write" ref="c16e2eedf75a5e472ed93a92c30e0dad" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__partition.html#gc6ca9cbb79b5099d610e976365ee2e8e">device_write_t</a> <a class="el" href="structpartition__struct.html#c16e2eedf75a5e472ed93a92c30e0dad">partition_struct::device_write</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
The function which writes data to the partition.
<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>The offset given to this function is relative to the whole disk, not to the start of the partition. </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="91923c55ba1c3a2dad435124964d91aa"></a><!-- doxytag: member="partition_struct::device_write_interval" ref="91923c55ba1c3a2dad435124964d91aa" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__partition.html#g975ce8905536b4c1020eb18b5b640158">device_write_interval_t</a> <a class="el" href="structpartition__struct.html#91923c55ba1c3a2dad435124964d91aa">partition_struct::device_write_interval</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
The function which repeatedly writes data to the partition.
<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>The offset given to this function is relative to the whole disk, not to the start of the partition. </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="6923f9a2463495b35df8b73750e5d959"></a><!-- doxytag: member="partition_struct::type" ref="6923f9a2463495b35df8b73750e5d959" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t <a class="el" href="structpartition__struct.html#6923f9a2463495b35df8b73750e5d959">partition_struct::type</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
The type of the partition.
<p>
Compare this value to the PARTITION_TYPE_* constants.
</div>
</div><p>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Dec 13 19:38:48 2007 for sd-reader by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3-20071008 </small></address>
</body>
</html>
/Designs/GPSRL02A/SW/doc/html/structsd__raw__info.html
0,0 → 1,183
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>sd-reader: sd_raw_info Struct Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3-20071008 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
</ul>
</div>
<h1>sd_raw_info Struct Reference<br>
<small>
[<a class="el" href="group__sd__raw.html">MMC/SD card raw access</a>]</small>
</h1><!-- doxytag: class="sd_raw_info" --><hr><a name="_details"></a><h2>Detailed Description</h2>
This struct is used by <a class="el" href="group__sd__raw.html#g97c54e82834f87bcdd38e79822fe5a79" title="Reads informational data from the card.">sd_raw_get_info()</a> to return manufacturing and status information of the card. <table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Data Fields</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d543253184afa50a8e4cb51b6dd5bf67"></a><!-- doxytag: member="sd_raw_info::manufacturer" ref="d543253184afa50a8e4cb51b6dd5bf67" args="" -->
uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsd__raw__info.html#d543253184afa50a8e4cb51b6dd5bf67">manufacturer</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A manufacturer code globally assigned by the SD card organization. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8ec2f9a6cdc4ac26cd695321bd9b3057"></a><!-- doxytag: member="sd_raw_info::oem" ref="8ec2f9a6cdc4ac26cd695321bd9b3057" args="[3]" -->
uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsd__raw__info.html#8ec2f9a6cdc4ac26cd695321bd9b3057">oem</a> [3]</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A string describing the card's OEM or content, globally assigned by the SD card organization. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8d781e7a0ec7e752b340a72ba87fc40f"></a><!-- doxytag: member="sd_raw_info::product" ref="8d781e7a0ec7e752b340a72ba87fc40f" args="[6]" -->
uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsd__raw__info.html#8d781e7a0ec7e752b340a72ba87fc40f">product</a> [6]</td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A product name. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsd__raw__info.html#0eb79353f9b63b1e719f8babad77c87e">revision</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The card's revision, coded in packed BCD. <a href="#0eb79353f9b63b1e719f8babad77c87e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="22771967744cca36595278b52686a69f"></a><!-- doxytag: member="sd_raw_info::serial" ref="22771967744cca36595278b52686a69f" args="" -->
uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsd__raw__info.html#22771967744cca36595278b52686a69f">serial</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A serial number assigned by the manufacturer. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsd__raw__info.html#e8a5dd6ae2039058100800f6bb85997a">manufacturing_year</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The year of manufacturing. <a href="#e8a5dd6ae2039058100800f6bb85997a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="80b3393a84f9c7f0a648cb8a9fd9c8b7"></a><!-- doxytag: member="sd_raw_info::manufacturing_month" ref="80b3393a84f9c7f0a648cb8a9fd9c8b7" args="" -->
uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsd__raw__info.html#80b3393a84f9c7f0a648cb8a9fd9c8b7">manufacturing_month</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The month of manufacturing. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4f97f4a040f570d55d738023822dd2cf"></a><!-- doxytag: member="sd_raw_info::capacity" ref="4f97f4a040f570d55d738023822dd2cf" args="" -->
uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsd__raw__info.html#4f97f4a040f570d55d738023822dd2cf">capacity</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The card's total capacity in bytes. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsd__raw__info.html#f23fccda0fa6740558d71c530576961b">flag_copy</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Defines wether the card's content is original or copied. <a href="#f23fccda0fa6740558d71c530576961b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsd__raw__info.html#55f4daed5bef3289878fc0521ca191b1">flag_write_protect</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Defines wether the card's content is write-protected. <a href="#55f4daed5bef3289878fc0521ca191b1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsd__raw__info.html#f3815572d323acafa8e3eabf19b154d5">flag_write_protect_temp</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Defines wether the card's content is temporarily write-protected. <a href="#f3815572d323acafa8e3eabf19b154d5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsd__raw__info.html#10d485029641a4fc1aadccad5e9eaa03">format</a></td></tr>
 
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The card's data layout. <a href="#10d485029641a4fc1aadccad5e9eaa03"></a><br></td></tr>
</table>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="0eb79353f9b63b1e719f8babad77c87e"></a><!-- doxytag: member="sd_raw_info::revision" ref="0eb79353f9b63b1e719f8babad77c87e" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t <a class="el" href="structsd__raw__info.html#0eb79353f9b63b1e719f8babad77c87e">sd_raw_info::revision</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
The card's revision, coded in packed BCD.
<p>
For example, the revision value <code>0x32</code> means "3.2".
</div>
</div><p>
<a class="anchor" name="e8a5dd6ae2039058100800f6bb85997a"></a><!-- doxytag: member="sd_raw_info::manufacturing_year" ref="e8a5dd6ae2039058100800f6bb85997a" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t <a class="el" href="structsd__raw__info.html#e8a5dd6ae2039058100800f6bb85997a">sd_raw_info::manufacturing_year</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
The year of manufacturing.
<p>
A value of zero means year 2000.
</div>
</div><p>
<a class="anchor" name="f23fccda0fa6740558d71c530576961b"></a><!-- doxytag: member="sd_raw_info::flag_copy" ref="f23fccda0fa6740558d71c530576961b" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t <a class="el" href="structsd__raw__info.html#f23fccda0fa6740558d71c530576961b">sd_raw_info::flag_copy</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Defines wether the card's content is original or copied.
<p>
A value of <code>0</code> means original, <code>1</code> means copied.
</div>
</div><p>
<a class="anchor" name="55f4daed5bef3289878fc0521ca191b1"></a><!-- doxytag: member="sd_raw_info::flag_write_protect" ref="55f4daed5bef3289878fc0521ca191b1" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t <a class="el" href="structsd__raw__info.html#55f4daed5bef3289878fc0521ca191b1">sd_raw_info::flag_write_protect</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Defines wether the card's content is write-protected.
<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>This is an internal flag and does not represent the state of the card's mechanical write-protect switch. </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="f3815572d323acafa8e3eabf19b154d5"></a><!-- doxytag: member="sd_raw_info::flag_write_protect_temp" ref="f3815572d323acafa8e3eabf19b154d5" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t <a class="el" href="structsd__raw__info.html#f3815572d323acafa8e3eabf19b154d5">sd_raw_info::flag_write_protect_temp</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
Defines wether the card's content is temporarily write-protected.
<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>This is an internal flag and does not represent the state of the card's mechanical write-protect switch. </dd></dl>
 
</div>
</div><p>
<a class="anchor" name="10d485029641a4fc1aadccad5e9eaa03"></a><!-- doxytag: member="sd_raw_info::format" ref="10d485029641a4fc1aadccad5e9eaa03" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t <a class="el" href="structsd__raw__info.html#10d485029641a4fc1aadccad5e9eaa03">sd_raw_info::format</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
 
<p>
The card's data layout.
<p>
See the <code>SD_RAW_FORMAT_*</code> constants for details.<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>This value is not guaranteed to match reality. </dd></dl>
 
</div>
</div><p>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Dec 13 19:38:48 2007 for sd-reader by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3-20071008 </small></address>
</body>
</html>
/Designs/GPSRL02A/SW/doc/html/tab_b.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Designs/GPSRL02A/SW/doc/html/tab_l.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Designs/GPSRL02A/SW/doc/html/tab_r.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Designs/GPSRL02A/SW/doc/html/tabs.css
0,0 → 1,102
/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */
 
DIV.tabs
{
float : left;
width : 100%;
background : url("tab_b.gif") repeat-x bottom;
margin-bottom : 4px;
}
 
DIV.tabs UL
{
margin : 0px;
padding-left : 10px;
list-style : none;
}
 
DIV.tabs LI, DIV.tabs FORM
{
display : inline;
margin : 0px;
padding : 0px;
}
 
DIV.tabs FORM
{
float : right;
}
 
DIV.tabs A
{
float : left;
background : url("tab_r.gif") no-repeat right top;
border-bottom : 1px solid #84B0C7;
font-size : x-small;
font-weight : bold;
text-decoration : none;
}
 
DIV.tabs A:hover
{
background-position: 100% -150px;
}
 
DIV.tabs A:link, DIV.tabs A:visited,
DIV.tabs A:active, DIV.tabs A:hover
{
color: #1A419D;
}
 
DIV.tabs SPAN
{
float : left;
display : block;
background : url("tab_l.gif") no-repeat left top;
padding : 5px 9px;
white-space : nowrap;
}
 
DIV.tabs INPUT
{
float : right;
display : inline;
font-size : 1em;
}
 
DIV.tabs TD
{
font-size : x-small;
font-weight : bold;
text-decoration : none;
}
 
 
 
/* Commented Backslash Hack hides rule from IE5-Mac \*/
DIV.tabs SPAN {float : none;}
/* End IE5-Mac hack */
 
DIV.tabs A:hover SPAN
{
background-position: 0% -150px;
}
 
DIV.tabs LI.current A
{
background-position: 100% -150px;
border-width : 0px;
}
 
DIV.tabs LI.current SPAN
{
background-position: 0% -150px;
padding-bottom : 6px;
}
 
DIV.nav
{
background : none;
border : none;
border-bottom : 1px solid #84B0C7;
}
/Designs/GPSRL02A/SW/doc/pic01.jpg
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Designs/GPSRL02A/SW/doc/pic02.jpg
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Designs/GPSRL02A/SW/fat16.c
0,0 → 1,2233
 
/*
* Copyright (c) 2006-2007 by Roland Riegel <feedback@roland-riegel.de>
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of either the GNU General Public License version 2
* or the GNU Lesser General Public License version 2.1, both as
* published by the Free Software Foundation.
*/
 
#include "partition.h"
#include "fat16.h"
#include "fat16_config.h"
#include "sd-reader_config.h"
 
#include <string.h>
 
#if USE_DYNAMIC_MEMORY
#include <stdlib.h>
#endif
 
/**
* \addtogroup fat16 FAT16 support
*
* This module implements FAT16 read and write access.
*
* The following features are supported:
* - File names up to 31 characters long.
* - Unlimited depth of subdirectories.
* - Short 8.3 and long filenames.
* - Creating and deleting files.
* - Reading and writing from and to files.
* - File resizing.
* - File sizes of up to 4 gigabytes.
*
* @{
*/
/**
* \file
* FAT16 implementation (license: GPLv2 or LGPLv2.1)
*
* \author Roland Riegel
*/
 
/**
* \addtogroup fat16_config FAT16 configuration
* Preprocessor defines to configure the FAT16 implementation.
*/
 
/**
* \addtogroup fat16_fs FAT16 access
* Basic functions for handling a FAT16 filesystem.
*/
 
/**
* \addtogroup fat16_file FAT16 file functions
* Functions for managing files.
*/
 
/**
* \addtogroup fat16_dir FAT16 directory functions
* Functions for managing directories.
*/
 
/**
* @}
*/
 
#define FAT16_CLUSTER_FREE 0x0000
#define FAT16_CLUSTER_RESERVED_MIN 0xfff0
#define FAT16_CLUSTER_RESERVED_MAX 0xfff6
#define FAT16_CLUSTER_BAD 0xfff7
#define FAT16_CLUSTER_LAST_MIN 0xfff8
#define FAT16_CLUSTER_LAST_MAX 0xffff
 
#define FAT16_DIRENTRY_DELETED 0xe5
#define FAT16_DIRENTRY_LFNLAST (1 << 6)
#define FAT16_DIRENTRY_LFNSEQMASK ((1 << 6) - 1)
 
/* Each entry within the directory table has a size of 32 bytes
* and either contains a 8.3 DOS-style file name or a part of a
* long file name, which may consist of several directory table
* entries at once.
*
* multi-byte integer values are stored little-endian!
*
* 8.3 file name entry:
* ====================
* offset length description
* 0 8 name (space padded)
* 8 3 extension (space padded)
* 11 1 attributes (FAT16_ATTRIB_*)
*
* long file name (lfn) entry ordering for a single file name:
* ===========================================================
* LFN entry n
* ...
* LFN entry 2
* LFN entry 1
* 8.3 entry (see above)
*
* lfn entry:
* ==========
* offset length description
* 0 1 ordinal field
* 1 2 unicode character 1
* 3 3 unicode character 2
* 5 3 unicode character 3
* 7 3 unicode character 4
* 9 3 unicode character 5
* 11 1 attribute (always 0x0f)
* 12 1 type (reserved, always 0)
* 13 1 checksum
* 14 2 unicode character 6
* 16 2 unicode character 7
* 18 2 unicode character 8
* 20 2 unicode character 9
* 22 2 unicode character 10
* 24 2 unicode character 11
* 26 2 cluster (unused, always 0)
* 28 2 unicode character 12
* 30 2 unicode character 13
*
* The ordinal field contains a descending number, from n to 1.
* For the n'th lfn entry the ordinal field is or'ed with 0x40.
* For deleted lfn entries, the ordinal field is set to 0xe5.
*/
 
struct fat16_header_struct
{
uint32_t size;
 
uint32_t fat_offset;
uint32_t fat_size;
 
uint16_t sector_size;
uint16_t cluster_size;
 
uint32_t root_dir_offset;
 
uint32_t cluster_zero_offset;
};
 
struct fat16_fs_struct
{
struct partition_struct* partition;
struct fat16_header_struct header;
};
 
struct fat16_file_struct
{
struct fat16_fs_struct* fs;
struct fat16_dir_entry_struct dir_entry;
uint32_t pos;
uint16_t pos_cluster;
};
 
struct fat16_dir_struct
{
struct fat16_fs_struct* fs;
struct fat16_dir_entry_struct dir_entry;
uint16_t entry_next;
};
 
struct fat16_read_callback_arg
{
uint16_t entry_cur;
uint16_t entry_num;
uint32_t entry_offset;
uint8_t byte_count;
};
 
struct fat16_usage_count_callback_arg
{
uint16_t cluster_count;
uint8_t buffer_size;
};
 
#if !USE_DYNAMIC_MEMORY
static struct fat16_fs_struct fat16_fs_handlers[FAT16_FS_COUNT];
static struct fat16_file_struct fat16_file_handlers[FAT16_FILE_COUNT];
static struct fat16_dir_struct fat16_dir_handlers[FAT16_DIR_COUNT];
#endif
 
static uint8_t fat16_read_header(struct fat16_fs_struct* fs);
static uint8_t fat16_read_root_dir_entry(const struct fat16_fs_struct* fs, uint16_t entry_num, struct fat16_dir_entry_struct* dir_entry);
static uint8_t fat16_read_sub_dir_entry(const struct fat16_fs_struct* fs, uint16_t entry_num, const struct fat16_dir_entry_struct* parent, struct fat16_dir_entry_struct* dir_entry);
static uint8_t fat16_dir_entry_seek_callback(uint8_t* buffer, uint32_t offset, void* p);
static uint8_t fat16_dir_entry_read_callback(uint8_t* buffer, uint32_t offset, void* p);
static uint8_t fat16_interpret_dir_entry(struct fat16_dir_entry_struct* dir_entry, const uint8_t* raw_entry);
static uint16_t fat16_get_next_cluster(const struct fat16_fs_struct* fs, uint16_t cluster_num);
static uint16_t fat16_append_clusters(const struct fat16_fs_struct* fs, uint16_t cluster_num, uint16_t count);
static uint8_t fat16_free_clusters(const struct fat16_fs_struct* fs, uint16_t cluster_num);
static uint8_t fat16_terminate_clusters(const struct fat16_fs_struct* fs, uint16_t cluster_num);
static uint8_t fat16_clear_cluster(const struct fat16_fs_struct* fs, uint16_t cluster_num);
static uint16_t fat16_clear_cluster_callback(uint8_t* buffer, uint32_t offset, void* p);
static uint32_t fat16_find_offset_for_dir_entry(const struct fat16_fs_struct* fs, const struct fat16_dir_struct* parent, const struct fat16_dir_entry_struct* dir_entry);
static uint8_t fat16_write_dir_entry(const struct fat16_fs_struct* fs, struct fat16_dir_entry_struct* dir_entry);
 
static uint8_t fat16_get_fs_free_callback(uint8_t* buffer, uint32_t offset, void* p);
 
static void fat16_set_file_modification_date(struct fat16_dir_entry_struct* dir_entry, uint16_t year, uint8_t month, uint8_t day);
static void fat16_set_file_modification_time(struct fat16_dir_entry_struct* dir_entry, uint8_t hour, uint8_t min, uint8_t sec);
 
/**
* \ingroup fat16_fs
* Opens a FAT16 filesystem.
*
* \param[in] partition Discriptor of partition on which the filesystem resides.
* \returns 0 on error, a FAT16 filesystem descriptor on success.
* \see fat16_open
*/
struct fat16_fs_struct* fat16_open(struct partition_struct* partition)
{
if(!partition ||
#if FAT16_WRITE_SUPPORT
!partition->device_write ||
!partition->device_write_interval
#else
0
#endif
)
return 0;
 
#if USE_DYNAMIC_MEMORY
struct fat16_fs_struct* fs = malloc(sizeof(*fs));
if(!fs)
return 0;
#else
struct fat16_fs_struct* fs = fat16_fs_handlers;
uint8_t i;
for(i = 0; i < FAT16_FS_COUNT; ++i)
{
if(!fs->partition)
break;
 
++fs;
}
if(i >= FAT16_FS_COUNT)
return 0;
#endif
 
memset(fs, 0, sizeof(*fs));
 
fs->partition = partition;
if(!fat16_read_header(fs))
{
#if USE_DYNAMIC_MEMORY
free(fs);
#else
fs->partition = 0;
#endif
return 0;
}
return fs;
}
 
/**
* \ingroup fat16_fs
* Closes a FAT16 filesystem.
*
* When this function returns, the given filesystem descriptor
* will be invalid.
*
* \param[in] fs The filesystem to close.
* \see fat16_open
*/
void fat16_close(struct fat16_fs_struct* fs)
{
if(!fs)
return;
 
#if USE_DYNAMIC_MEMORY
free(fs);
#else
fs->partition = 0;
#endif
}
 
/**
* \ingroup fat16_fs
* Reads and parses the header of a FAT16 filesystem.
*
* \param[inout] fs The filesystem for which to parse the header.
* \returns 0 on failure, 1 on success.
*/
uint8_t fat16_read_header(struct fat16_fs_struct* fs)
{
if(!fs)
return 0;
 
struct partition_struct* partition = fs->partition;
if(!partition)
return 0;
 
/* read fat parameters */
uint8_t buffer[25];
uint32_t partition_offset = partition->offset * 512;
if(!partition->device_read(partition_offset + 0x0b, buffer, sizeof(buffer)))
return 0;
 
uint16_t bytes_per_sector = ((uint16_t) buffer[0x00]) |
((uint16_t) buffer[0x01] << 8);
uint8_t sectors_per_cluster = buffer[0x02];
uint16_t reserved_sectors = ((uint16_t) buffer[0x03]) |
((uint16_t) buffer[0x04] << 8);
uint8_t fat_copies = buffer[0x05];
uint16_t max_root_entries = ((uint16_t) buffer[0x06]) |
((uint16_t) buffer[0x07] << 8);
uint16_t sector_count_16 = ((uint16_t) buffer[0x08]) |
((uint16_t) buffer[0x09] << 8);
uint16_t sectors_per_fat = ((uint16_t) buffer[0x0b]) |
((uint16_t) buffer[0x0c] << 8);
uint32_t sector_count = ((uint32_t) buffer[0x15]) |
((uint32_t) buffer[0x16] << 8) |
((uint32_t) buffer[0x17] << 16) |
((uint32_t) buffer[0x18] << 24);
if(sectors_per_fat == 0)
/* this is not a FAT16 */
return 0;
 
if(sector_count == 0)
{
if(sector_count_16 == 0)
/* illegal volume size */
return 0;
else
sector_count = sector_count_16;
}
 
/* ensure we really have a FAT16 fs here */
uint32_t data_sector_count = sector_count
- reserved_sectors
- (uint32_t) sectors_per_fat * fat_copies
- ((max_root_entries * 32 + bytes_per_sector - 1) / bytes_per_sector);
uint32_t data_cluster_count = data_sector_count / sectors_per_cluster;
if(data_cluster_count < 4085 || data_cluster_count >= 65525)
/* this is not a FAT16 */
return 0;
 
partition->type = PARTITION_TYPE_FAT16;
 
/* fill header information */
struct fat16_header_struct* header = &fs->header;
memset(header, 0, sizeof(*header));
header->size = sector_count * bytes_per_sector;
 
header->fat_offset = /* jump to partition */
partition_offset +
/* jump to fat */
(uint32_t) reserved_sectors * bytes_per_sector;
header->fat_size = (data_cluster_count + 2) * 2;
 
header->sector_size = bytes_per_sector;
header->cluster_size = (uint32_t) bytes_per_sector * sectors_per_cluster;
 
header->root_dir_offset = /* jump to fats */
header->fat_offset +
/* jump to root directory entries */
(uint32_t) fat_copies * sectors_per_fat * bytes_per_sector;
 
header->cluster_zero_offset = /* jump to root directory entries */
header->root_dir_offset +
/* skip root directory entries */
(uint32_t) max_root_entries * 32;
 
return 1;
}
 
/**
* \ingroup fat16_fs
* Reads a directory entry of the root directory.
*
* \param[in] fs Descriptor of file system to use.
* \param[in] entry_num The index of the directory entry to read.
* \param[out] dir_entry Directory entry descriptor which will get filled.
* \returns 0 on failure, 1 on success
* \see fat16_read_sub_dir_entry, fat16_read_dir_entry_by_path
*/
uint8_t fat16_read_root_dir_entry(const struct fat16_fs_struct* fs, uint16_t entry_num, struct fat16_dir_entry_struct* dir_entry)
{
if(!fs || !dir_entry)
return 0;
 
/* we read from the root directory entry */
const struct fat16_header_struct* header = &fs->header;
device_read_interval_t device_read_interval = fs->partition->device_read_interval;
uint8_t buffer[32];
 
/* seek to the n-th entry */
struct fat16_read_callback_arg arg;
memset(&arg, 0, sizeof(arg));
arg.entry_num = entry_num;
if(!device_read_interval(header->root_dir_offset,
buffer,
sizeof(buffer),
header->cluster_zero_offset - header->root_dir_offset,
fat16_dir_entry_seek_callback,
&arg) ||
arg.entry_offset == 0
)
return 0;
 
/* read entry */
memset(dir_entry, 0, sizeof(*dir_entry));
if(!device_read_interval(arg.entry_offset,
buffer,
sizeof(buffer),
arg.byte_count,
fat16_dir_entry_read_callback,
dir_entry))
return 0;
 
return dir_entry->long_name[0] != '\0' ? 1 : 0;
}
 
/**
* \ingroup fat16_fs
* Reads a directory entry of a given parent directory.
*
* \param[in] fs Descriptor of file system to use.
* \param[in] entry_num The index of the directory entry to read.
* \param[in] parent Directory entry descriptor in which to read directory entry.
* \param[out] dir_entry Directory entry descriptor which will get filled.
* \returns 0 on failure, 1 on success
* \see fat16_read_root_dir_entry, fat16_read_dir_entry_by_path
*/
uint8_t fat16_read_sub_dir_entry(const struct fat16_fs_struct* fs, uint16_t entry_num, const struct fat16_dir_entry_struct* parent, struct fat16_dir_entry_struct* dir_entry)
{
if(!fs || !parent || !dir_entry)
return 0;
 
/* we are in a parent directory and want to search within its directory entry table */
if(!(parent->attributes & FAT16_ATTRIB_DIR))
return 0;
 
/* loop through all clusters of the directory */
uint8_t buffer[32];
uint32_t cluster_offset;
uint16_t cluster_size = fs->header.cluster_size;
uint16_t cluster_num = parent->cluster;
struct fat16_read_callback_arg arg;
 
while(1)
{
/* calculate new cluster offset */
cluster_offset = fs->header.cluster_zero_offset + (uint32_t) (cluster_num - 2) * cluster_size;
 
/* seek to the n-th entry */
memset(&arg, 0, sizeof(arg));
arg.entry_num = entry_num;
if(!fs->partition->device_read_interval(cluster_offset,
buffer,
sizeof(buffer),
cluster_size,
fat16_dir_entry_seek_callback,
&arg)
)
return 0;
 
/* check if we found the entry */
if(arg.entry_offset)
break;
 
/* get number of next cluster */
if(!(cluster_num = fat16_get_next_cluster(fs, cluster_num)))
return 0; /* directory entry not found */
}
 
memset(dir_entry, 0, sizeof(*dir_entry));
 
/* read entry */
if(!fs->partition->device_read_interval(arg.entry_offset,
buffer,
sizeof(buffer),
arg.byte_count,
fat16_dir_entry_read_callback,
dir_entry))
return 0;
 
return dir_entry->long_name[0] != '\0' ? 1 : 0;
}
 
/**
* \ingroup fat16_fs
* Callback function for seeking through subdirectory entries.
*/
uint8_t fat16_dir_entry_seek_callback(uint8_t* buffer, uint32_t offset, void* p)
{
struct fat16_read_callback_arg* arg = p;
 
/* skip deleted or empty entries */
if(buffer[0] == FAT16_DIRENTRY_DELETED || !buffer[0])
return 1;
 
if(arg->entry_cur == arg->entry_num)
{
arg->entry_offset = offset;
arg->byte_count = buffer[11] == 0x0f ?
((buffer[0] & FAT16_DIRENTRY_LFNSEQMASK) + 1) * 32 :
32;
return 0;
}
 
/* if we read a 8.3 entry, we reached a new directory entry */
if(buffer[11] != 0x0f)
++arg->entry_cur;
 
return 1;
}
 
/**
* \ingroup fat16_fs
* Callback function for reading a directory entry.
*/
uint8_t fat16_dir_entry_read_callback(uint8_t* buffer, uint32_t offset, void* p)
{
struct fat16_dir_entry_struct* dir_entry = p;
 
/* there should not be any deleted or empty entries */
if(buffer[0] == FAT16_DIRENTRY_DELETED || !buffer[0])
return 0;
 
if(!dir_entry->entry_offset)
dir_entry->entry_offset = offset;
switch(fat16_interpret_dir_entry(dir_entry, buffer))
{
case 0: /* failure */
return 0;
case 1: /* buffer successfully parsed, continue */
return 1;
case 2: /* directory entry complete, finish */
return 0;
}
 
return 0;
}
 
/**
* \ingroup fat16_fs
* Interprets a raw directory entry and puts the contained
* information into the directory entry.
*
* For a single file there may exist multiple directory
* entries. All except the last one are lfn entries, which
* contain parts of the long filename. The last directory
* entry is a traditional 8.3 style one. It contains all
* other information like size, cluster, date and time.
*
* \param[in,out] dir_entry The directory entry to fill.
* \param[in] raw_entry A pointer to 32 bytes of raw data.
* \returns 0 on failure, 1 on success and 2 if the
* directory entry is complete.
*/
uint8_t fat16_interpret_dir_entry(struct fat16_dir_entry_struct* dir_entry, const uint8_t* raw_entry)
{
if(!dir_entry || !raw_entry || !raw_entry[0])
return 0;
 
char* long_name = dir_entry->long_name;
if(raw_entry[11] == 0x0f)
{
uint16_t char_offset = ((raw_entry[0] & 0x3f) - 1) * 13;
 
if(char_offset + 12 < sizeof(dir_entry->long_name))
{
/* Lfn supports unicode, but we do not, for now.
* So we assume pure ascii and read only every
* second byte.
*/
long_name[char_offset + 0] = raw_entry[1];
long_name[char_offset + 1] = raw_entry[3];
long_name[char_offset + 2] = raw_entry[5];
long_name[char_offset + 3] = raw_entry[7];
long_name[char_offset + 4] = raw_entry[9];
long_name[char_offset + 5] = raw_entry[14];
long_name[char_offset + 6] = raw_entry[16];
long_name[char_offset + 7] = raw_entry[18];
long_name[char_offset + 8] = raw_entry[20];
long_name[char_offset + 9] = raw_entry[22];
long_name[char_offset + 10] = raw_entry[24];
long_name[char_offset + 11] = raw_entry[28];
long_name[char_offset + 12] = raw_entry[30];
}
 
return 1;
}
else
{
/* if we do not have a long name, take the short one */
if(long_name[0] == '\0')
{
uint8_t i;
for(i = 0; i < 8; ++i)
{
if(raw_entry[i] == ' ')
break;
long_name[i] = raw_entry[i];
}
if(long_name[0] == 0x05)
long_name[0] = (char) FAT16_DIRENTRY_DELETED;
 
if(raw_entry[8] != ' ')
{
long_name[i++] = '.';
 
uint8_t j = 8;
for(; j < 11; ++j)
{
if(raw_entry[j] != ' ')
{
long_name[i++] = raw_entry[j];
}
else
{
break;
}
}
}
 
long_name[i] = '\0';
}
/* extract properties of file and store them within the structure */
dir_entry->attributes = raw_entry[11];
dir_entry->cluster = ((uint16_t) raw_entry[26]) |
((uint16_t) raw_entry[27] << 8);
dir_entry->file_size = ((uint32_t) raw_entry[28]) |
((uint32_t) raw_entry[29] << 8) |
((uint32_t) raw_entry[30] << 16) |
((uint32_t) raw_entry[31] << 24);
 
#if FAT16_DATETIME_SUPPORT
dir_entry->modification_time = ((uint16_t) raw_entry[22]) |
((uint16_t) raw_entry[23] << 8);
dir_entry->modification_date = ((uint16_t) raw_entry[24]) |
((uint16_t) raw_entry[25] << 8);
#endif
 
return 2;
}
}
 
/**
* \ingroup fat16_file
* Retrieves the directory entry of a path.
*
* The given path may both describe a file or a directory.
*
* \param[in] fs The FAT16 filesystem on which to search.
* \param[in] path The path of which to read the directory entry.
* \param[out] dir_entry The directory entry to fill.
* \returns 0 on failure, 1 on success.
* \see fat16_read_dir
*/
uint8_t fat16_get_dir_entry_of_path(struct fat16_fs_struct* fs, const char* path, struct fat16_dir_entry_struct* dir_entry)
{
if(!fs || !path || path[0] == '\0' || !dir_entry)
return 0;
 
if(path[0] == '/')
++path;
 
/* begin with the root directory */
memset(dir_entry, 0, sizeof(*dir_entry));
dir_entry->attributes = FAT16_ATTRIB_DIR;
 
if(path[0] == '\0')
return 1;
 
while(1)
{
struct fat16_dir_struct* dd = fat16_open_dir(fs, dir_entry);
if(!dd)
break;
 
/* extract the next hierarchy we will search for */
const char* sep_pos = strchr(path, '/');
if(!sep_pos)
sep_pos = path + strlen(path);
uint8_t length_to_sep = sep_pos - path;
/* read directory entries */
while(fat16_read_dir(dd, dir_entry))
{
/* check if we have found the next hierarchy */
if((strlen(dir_entry->long_name) != length_to_sep ||
strncmp(path, dir_entry->long_name, length_to_sep) != 0))
continue;
 
fat16_close_dir(dd);
dd = 0;
 
if(path[length_to_sep] == '\0')
/* we iterated through the whole path and have found the file */
return 1;
 
if(dir_entry->attributes & FAT16_ATTRIB_DIR)
{
/* we found a parent directory of the file we are searching for */
path = sep_pos + 1;
break;
}
 
/* a parent of the file exists, but not the file itself */
return 0;
}
 
fat16_close_dir(dd);
}
return 0;
}
 
/**
* \ingroup fat16_fs
* Retrieves the next following cluster of a given cluster.
*
* Using the filesystem file allocation table, this function returns
* the number of the cluster containing the data directly following
* the data within the cluster with the given number.
*
* \param[in] fs The filesystem for which to determine the next cluster.
* \param[in] cluster_num The number of the cluster for which to determine its successor.
* \returns The wanted cluster number, or 0 on error.
*/
uint16_t fat16_get_next_cluster(const struct fat16_fs_struct* fs, uint16_t cluster_num)
{
if(!fs || cluster_num < 2)
return 0;
 
/* read appropriate fat entry */
uint8_t fat_entry[2];
if(!fs->partition->device_read(fs->header.fat_offset + 2 * cluster_num, fat_entry, 2))
return 0;
 
/* determine next cluster from fat */
cluster_num = ((uint16_t) fat_entry[0]) |
((uint16_t) fat_entry[1] << 8);
if(cluster_num == FAT16_CLUSTER_FREE ||
cluster_num == FAT16_CLUSTER_BAD ||
(cluster_num >= FAT16_CLUSTER_RESERVED_MIN && cluster_num <= FAT16_CLUSTER_RESERVED_MAX) ||
(cluster_num >= FAT16_CLUSTER_LAST_MIN && cluster_num <= FAT16_CLUSTER_LAST_MAX))
return 0;
return cluster_num;
}
 
/**
* \ingroup fat16_fs
* Appends a new cluster chain to an existing one.
*
* Set cluster_num to zero to create a completely new one.
*
* \param[in] fs The file system on which to operate.
* \param[in] cluster_num The cluster to which to append the new chain.
* \param[in] count The number of clusters to allocate.
* \returns 0 on failure, the number of the first new cluster on success.
*/
uint16_t fat16_append_clusters(const struct fat16_fs_struct* fs, uint16_t cluster_num, uint16_t count)
{
#if FAT16_WRITE_SUPPORT
if(!fs)
return 0;
 
device_read_t device_read = fs->partition->device_read;
device_write_t device_write = fs->partition->device_write;
uint32_t fat_offset = fs->header.fat_offset;
uint16_t cluster_max = fs->header.fat_size / 2;
uint16_t cluster_next = 0;
uint16_t count_left = count;
uint8_t buffer[2];
 
for(uint16_t cluster_new = 0; cluster_new < cluster_max; ++cluster_new)
{
if(!device_read(fat_offset + 2 * cluster_new, buffer, sizeof(buffer)))
return 0;
 
/* check if this is a free cluster */
if(buffer[0] == (FAT16_CLUSTER_FREE & 0xff) &&
buffer[1] == ((FAT16_CLUSTER_FREE >> 8) & 0xff))
{
/* allocate cluster */
if(count_left == count)
{
buffer[0] = FAT16_CLUSTER_LAST_MAX & 0xff;
buffer[1] = (FAT16_CLUSTER_LAST_MAX >> 8) & 0xff;
}
else
{
buffer[0] = cluster_next & 0xff;
buffer[1] = (cluster_next >> 8) & 0xff;
}
 
if(!device_write(fat_offset + 2 * cluster_new, buffer, sizeof(buffer)))
break;
 
cluster_next = cluster_new;
if(--count_left == 0)
break;
}
}
 
do
{
if(count_left > 0)
break;
 
/* We allocated a new cluster chain. Now join
* it with the existing one.
*/
if(cluster_num >= 2)
{
buffer[0] = cluster_next & 0xff;
buffer[1] = (cluster_next >> 8) & 0xff;
if(!device_write(fat_offset + 2 * cluster_num, buffer, sizeof(buffer)))
break;
}
 
return cluster_next;
 
} while(0);
 
/* No space left on device or writing error.
* Free up all clusters already allocated.
*/
fat16_free_clusters(fs, cluster_next);
 
return 0;
#else
return 0;
#endif
}
 
/**
* \ingroup fat16_fs
* Frees a cluster chain, or a part thereof.
*
* Marks the specified cluster and all clusters which are sequentially
* referenced by it as free. They may then be used again for future
* file allocations.
*
* \note If this function is used for freeing just a part of a cluster
* chain, the new end of the chain is not correctly terminated
* within the FAT. Use fat16_terminate_clusters() instead.
*
* \param[in] fs The filesystem on which to operate.
* \param[in] cluster_num The starting cluster of the chain which to free.
* \returns 0 on failure, 1 on success.
* \see fat16_terminate_clusters
*/
uint8_t fat16_free_clusters(const struct fat16_fs_struct* fs, uint16_t cluster_num)
{
#if FAT16_WRITE_SUPPORT
if(!fs || cluster_num < 2)
return 0;
 
uint32_t fat_offset = fs->header.fat_offset;
uint8_t buffer[2];
while(cluster_num)
{
if(!fs->partition->device_read(fat_offset + 2 * cluster_num, buffer, 2))
return 0;
 
/* get next cluster of current cluster before freeing current cluster */
uint16_t cluster_num_next = ((uint16_t) buffer[0]) |
((uint16_t) buffer[1] << 8);
 
if(cluster_num_next == FAT16_CLUSTER_FREE)
return 1;
if(cluster_num_next == FAT16_CLUSTER_BAD ||
(cluster_num_next >= FAT16_CLUSTER_RESERVED_MIN &&
cluster_num_next <= FAT16_CLUSTER_RESERVED_MAX
)
)
return 0;
if(cluster_num_next >= FAT16_CLUSTER_LAST_MIN && cluster_num_next <= FAT16_CLUSTER_LAST_MAX)
cluster_num_next = 0;
 
/* free cluster */
buffer[0] = FAT16_CLUSTER_FREE & 0xff;
buffer[1] = (FAT16_CLUSTER_FREE >> 8) & 0xff;
fs->partition->device_write(fat_offset + 2 * cluster_num, buffer, 2);
 
/* We continue in any case here, even if freeing the cluster failed.
* The cluster is lost, but maybe we can still free up some later ones.
*/
 
cluster_num = cluster_num_next;
}
 
return 1;
#else
return 0;
#endif
}
 
/**
* \ingroup fat16_fs
* Frees a part of a cluster chain and correctly terminates the rest.
*
* Marks the specified cluster as the new end of a cluster chain and
* frees all following clusters.
*
* \param[in] fs The filesystem on which to operate.
* \param[in] cluster_num The new end of the cluster chain.
* \returns 0 on failure, 1 on success.
* \see fat16_free_clusters
*/
uint8_t fat16_terminate_clusters(const struct fat16_fs_struct* fs, uint16_t cluster_num)
{
#if FAT16_WRITE_SUPPORT
if(!fs || cluster_num < 2)
return 0;
 
/* fetch next cluster before overwriting the cluster entry */
uint16_t cluster_num_next = fat16_get_next_cluster(fs, cluster_num);
 
/* mark cluster as the last one */
uint8_t buffer[2];
buffer[0] = FAT16_CLUSTER_LAST_MAX & 0xff;
buffer[1] = (FAT16_CLUSTER_LAST_MAX >> 8) & 0xff;
if(!fs->partition->device_write(fs->header.fat_offset + 2 * cluster_num, buffer, 2))
return 0;
 
/* free remaining clusters */
if(cluster_num_next)
return fat16_free_clusters(fs, cluster_num_next);
else
return 1;
#else
return 0;
#endif
}
 
/**
* \ingroup fat16_fs
* Clears a single cluster.
*
* The complete cluster is filled with zeros.
*
* \param[in] fs The filesystem on which to operate.
* \param[in] cluster_num The cluster to clear.
* \returns 0 on failure, 1 on success.
*/
uint8_t fat16_clear_cluster(const struct fat16_fs_struct* fs, uint16_t cluster_num)
{
#if FAT16_WRITE_SUPPORT
if(cluster_num < 2)
return 0;
 
uint32_t cluster_offset = fs->header.cluster_zero_offset +
(uint32_t) (cluster_num - 2) * fs->header.cluster_size;
uint8_t zero[16];
return fs->partition->device_write_interval(cluster_offset,
zero,
fs->header.cluster_size,
fat16_clear_cluster_callback,
0
);
#else
return 0;
#endif
}
 
/**
* \ingroup fat16_fs
* Callback function for clearing a cluster.
*/
uint16_t fat16_clear_cluster_callback(uint8_t* buffer, uint32_t offset, void* p)
{
#if FAT16_WRITE_SUPPORT
memset(buffer, 0, 16);
return 16;
#else
return 0;
#endif
}
 
/**
* \ingroup fat16_file
* Opens a file on a FAT16 filesystem.
*
* \param[in] fs The filesystem on which the file to open lies.
* \param[in] dir_entry The directory entry of the file to open.
* \returns The file handle, or 0 on failure.
* \see fat16_close_file
*/
struct fat16_file_struct* fat16_open_file(struct fat16_fs_struct* fs, const struct fat16_dir_entry_struct* dir_entry)
{
if(!fs || !dir_entry || (dir_entry->attributes & FAT16_ATTRIB_DIR))
return 0;
 
#if USE_DYNAMIC_MEMORY
struct fat16_file_struct* fd = malloc(sizeof(*fd));
if(!fd)
return 0;
#else
struct fat16_file_struct* fd = fat16_file_handlers;
uint8_t i;
for(i = 0; i < FAT16_FILE_COUNT; ++i)
{
if(!fd->fs)
break;
 
++fd;
}
if(i >= FAT16_FILE_COUNT)
return 0;
#endif
memcpy(&fd->dir_entry, dir_entry, sizeof(*dir_entry));
fd->fs = fs;
fd->pos = 0;
fd->pos_cluster = dir_entry->cluster;
 
return fd;
}
 
/**
* \ingroup fat16_file
* Closes a file.
*
* \param[in] fd The file handle of the file to close.
* \see fat16_open_file
*/
void fat16_close_file(struct fat16_file_struct* fd)
{
if(fd)
#if USE_DYNAMIC_MEMORY
free(fd);
#else
fd->fs = 0;
#endif
}
 
/**
* \ingroup fat16_file
* Reads data from a file.
*
* The data requested is read from the current file location.
*
* \param[in] fd The file handle of the file from which to read.
* \param[out] buffer The buffer into which to write.
* \param[in] buffer_len The amount of data to read.
* \returns The number of bytes read, 0 on end of file, or -1 on failure.
* \see fat16_write_file
*/
int16_t fat16_read_file(struct fat16_file_struct* fd, uint8_t* buffer, uint16_t buffer_len)
{
/* check arguments */
if(!fd || !buffer || buffer_len < 1)
return -1;
 
/* determine number of bytes to read */
if(fd->pos + buffer_len > fd->dir_entry.file_size)
buffer_len = fd->dir_entry.file_size - fd->pos;
if(buffer_len == 0)
return 0;
uint16_t cluster_size = fd->fs->header.cluster_size;
uint16_t cluster_num = fd->pos_cluster;
uint16_t buffer_left = buffer_len;
uint16_t first_cluster_offset = fd->pos % cluster_size;
 
/* find cluster in which to start reading */
if(!cluster_num)
{
cluster_num = fd->dir_entry.cluster;
if(!cluster_num)
{
if(!fd->pos)
return 0;
else
return -1;
}
 
if(fd->pos)
{
uint32_t pos = fd->pos;
while(pos >= cluster_size)
{
pos -= cluster_size;
cluster_num = fat16_get_next_cluster(fd->fs, cluster_num);
if(!cluster_num)
return -1;
}
}
}
/* read data */
do
{
/* calculate data size to copy from cluster */
uint32_t cluster_offset = fd->fs->header.cluster_zero_offset +
(uint32_t) (cluster_num - 2) * cluster_size + first_cluster_offset;
uint16_t copy_length = cluster_size - first_cluster_offset;
if(copy_length > buffer_left)
copy_length = buffer_left;
 
/* read data */
if(!fd->fs->partition->device_read(cluster_offset, buffer, copy_length))
return buffer_len - buffer_left;
 
/* calculate new file position */
buffer += copy_length;
buffer_left -= copy_length;
fd->pos += copy_length;
 
if(first_cluster_offset + copy_length >= cluster_size)
{
/* we are on a cluster boundary, so get the next cluster */
if((cluster_num = fat16_get_next_cluster(fd->fs, cluster_num)))
{
first_cluster_offset = 0;
}
else
{
fd->pos_cluster = 0;
return buffer_len - buffer_left;
}
}
 
fd->pos_cluster = cluster_num;
 
} while(buffer_left > 0); /* check if we are done */
 
return buffer_len;
}
 
/**
* \ingroup fat16_file
* Writes data to a file.
*
* The data is written to the current file location.
*
* \param[in] fd The file handle of the file to which to write.
* \param[in] buffer The buffer from which to read the data to be written.
* \param[in] buffer_len The amount of data to write.
* \returns The number of bytes written, 0 on disk full, or -1 on failure.
* \see fat16_read_file
*/
int16_t fat16_write_file(struct fat16_file_struct* fd, const uint8_t* buffer, uint16_t buffer_len)
{
#if FAT16_WRITE_SUPPORT
/* check arguments */
if(!fd || !buffer || buffer_len < 1)
return -1;
if(fd->pos > fd->dir_entry.file_size)
return -1;
 
uint16_t cluster_size = fd->fs->header.cluster_size;
uint16_t cluster_num = fd->pos_cluster;
uint16_t buffer_left = buffer_len;
uint16_t first_cluster_offset = fd->pos % cluster_size;
 
/* find cluster in which to start writing */
if(!cluster_num)
{
cluster_num = fd->dir_entry.cluster;
if(!cluster_num)
{
if(!fd->pos)
{
/* empty file */
fd->dir_entry.cluster = cluster_num = fat16_append_clusters(fd->fs, 0, 1);
if(!cluster_num)
return -1;
}
else
{
return -1;
}
}
 
if(fd->pos)
{
uint32_t pos = fd->pos;
uint16_t cluster_num_next;
while(pos >= cluster_size)
{
pos -= cluster_size;
cluster_num_next = fat16_get_next_cluster(fd->fs, cluster_num);
if(!cluster_num_next && pos == 0)
/* the file exactly ends on a cluster boundary, and we append to it */
cluster_num_next = fat16_append_clusters(fd->fs, cluster_num, 1);
if(!cluster_num_next)
return -1;
 
cluster_num = cluster_num_next;
}
}
}
/* write data */
do
{
/* calculate data size to write to cluster */
uint32_t cluster_offset = fd->fs->header.cluster_zero_offset +
(uint32_t) (cluster_num - 2) * cluster_size + first_cluster_offset;
uint16_t write_length = cluster_size - first_cluster_offset;
if(write_length > buffer_left)
write_length = buffer_left;
 
/* write data which fits into the current cluster */
if(!fd->fs->partition->device_write(cluster_offset, buffer, write_length))
break;
 
/* calculate new file position */
buffer += write_length;
buffer_left -= write_length;
fd->pos += write_length;
 
if(first_cluster_offset + write_length >= cluster_size)
{
/* we are on a cluster boundary, so get the next cluster */
uint16_t cluster_num_next = fat16_get_next_cluster(fd->fs, cluster_num);
if(!cluster_num_next && buffer_left > 0)
/* we reached the last cluster, append a new one */
cluster_num_next = fat16_append_clusters(fd->fs, cluster_num, 1);
if(!cluster_num_next)
{
fd->pos_cluster = 0;
break;
}
 
cluster_num = cluster_num_next;
first_cluster_offset = 0;
}
 
fd->pos_cluster = cluster_num;
 
} while(buffer_left > 0); /* check if we are done */
 
/* update directory entry */
if(fd->pos > fd->dir_entry.file_size)
{
uint32_t size_old = fd->dir_entry.file_size;
 
/* update file size */
fd->dir_entry.file_size = fd->pos;
/* write directory entry */
if(!fat16_write_dir_entry(fd->fs, &fd->dir_entry))
{
/* We do not return an error here since we actually wrote
* some data to disk. So we calculate the amount of data
* we wrote to disk and which lies within the old file size.
*/
buffer_left = fd->pos - size_old;
fd->pos = size_old;
}
}
 
return buffer_len - buffer_left;
 
#else
return -1;
#endif
}
 
/**
* \ingroup fat16_file
* Repositions the read/write file offset.
*
* Changes the file offset where the next call to fat16_read_file()
* or fat16_write_file() starts reading/writing.
*
* If the new offset is beyond the end of the file, fat16_resize_file()
* is implicitly called, i.e. the file is expanded.
*
* The new offset can be given in different ways determined by
* the \c whence parameter:
* - \b FAT16_SEEK_SET: \c *offset is relative to the beginning of the file.
* - \b FAT16_SEEK_CUR: \c *offset is relative to the current file position.
* - \b FAT16_SEEK_END: \c *offset is relative to the end of the file.
*
* The resulting absolute offset is written to the location the \c offset
* parameter points to.
*
* \param[in] fd The file decriptor of the file on which to seek.
* \param[in,out] offset A pointer to the new offset, as affected by the \c whence
* parameter. The function writes the new absolute offset
* to this location before it returns.
* \param[in] whence Affects the way \c offset is interpreted, see above.
* \returns 0 on failure, 1 on success.
*/
uint8_t fat16_seek_file(struct fat16_file_struct* fd, int32_t* offset, uint8_t whence)
{
if(!fd || !offset)
return 0;
 
uint32_t new_pos = fd->pos;
switch(whence)
{
case FAT16_SEEK_SET:
new_pos = *offset;
break;
case FAT16_SEEK_CUR:
new_pos += *offset;
break;
case FAT16_SEEK_END:
new_pos = fd->dir_entry.file_size + *offset;
break;
default:
return 0;
}
 
if(new_pos > fd->dir_entry.file_size && !fat16_resize_file(fd, new_pos))
return 0;
 
fd->pos = new_pos;
fd->pos_cluster = 0;
 
*offset = new_pos;
return 1;
}
 
/**
* \ingroup fat16_file
* Resizes a file to have a specific size.
*
* Enlarges or shrinks the file pointed to by the file descriptor to have
* exactly the specified size.
*
* If the file is truncated, all bytes having an equal or larger offset
* than the given size are lost. If the file is expanded, the additional
* bytes are allocated.
*
* \note Please be aware that this function just allocates or deallocates disk
* space, it does not explicitely clear it. To avoid data leakage, this
* must be done manually.
*
* \param[in] fd The file decriptor of the file which to resize.
* \param[in] size The new size of the file.
* \returns 0 on failure, 1 on success.
*/
uint8_t fat16_resize_file(struct fat16_file_struct* fd, uint32_t size)
{
#if FAT16_WRITE_SUPPORT
if(!fd)
return 0;
 
uint16_t cluster_num = fd->dir_entry.cluster;
uint16_t cluster_size = fd->fs->header.cluster_size;
uint32_t size_new = size;
 
do
{
if(cluster_num == 0 && size_new == 0)
/* the file stays empty */
break;
 
/* seek to the next cluster as long as we need the space */
while(size_new > cluster_size)
{
/* get next cluster of file */
uint16_t cluster_num_next = fat16_get_next_cluster(fd->fs, cluster_num);
if(cluster_num_next)
{
cluster_num = cluster_num_next;
size_new -= cluster_size;
}
else
{
break;
}
}
 
if(size_new > cluster_size || cluster_num == 0)
{
/* Allocate new cluster chain and append
* it to the existing one, if available.
*/
uint16_t cluster_count = size_new / cluster_size;
if((uint32_t) cluster_count * cluster_size < size_new)
++cluster_count;
uint16_t cluster_new_chain = fat16_append_clusters(fd->fs, cluster_num, cluster_count);
if(!cluster_new_chain)
return 0;
 
if(!cluster_num)
{
cluster_num = cluster_new_chain;
fd->dir_entry.cluster = cluster_num;
}
}
 
/* write new directory entry */
fd->dir_entry.file_size = size;
if(size == 0)
fd->dir_entry.cluster = 0;
if(!fat16_write_dir_entry(fd->fs, &fd->dir_entry))
return 0;
 
if(size == 0)
{
/* free all clusters of file */
fat16_free_clusters(fd->fs, cluster_num);
}
else if(size_new <= cluster_size)
{
/* free all clusters no longer needed */
fat16_terminate_clusters(fd->fs, cluster_num);
}
 
} while(0);
 
/* correct file position */
if(size < fd->pos)
{
fd->pos = size;
fd->pos_cluster = 0;
}
 
return 1;
#else
return 0;
#endif
}
 
/**
* \ingroup fat16_dir
* Opens a directory.
*
* \param[in] fs The filesystem on which the directory to open resides.
* \param[in] dir_entry The directory entry which stands for the directory to open.
* \returns An opaque directory descriptor on success, 0 on failure.
* \see fat16_close_dir
*/
struct fat16_dir_struct* fat16_open_dir(struct fat16_fs_struct* fs, const struct fat16_dir_entry_struct* dir_entry)
{
if(!fs || !dir_entry || !(dir_entry->attributes & FAT16_ATTRIB_DIR))
return 0;
 
#if USE_DYNAMIC_MEMORY
struct fat16_dir_struct* dd = malloc(sizeof(*dd));
if(!dd)
return 0;
#else
struct fat16_dir_struct* dd = fat16_dir_handlers;
uint8_t i;
for(i = 0; i < FAT16_DIR_COUNT; ++i)
{
if(!dd->fs)
break;
 
++dd;
}
if(i >= FAT16_DIR_COUNT)
return 0;
#endif
memcpy(&dd->dir_entry, dir_entry, sizeof(*dir_entry));
dd->fs = fs;
dd->entry_next = 0;
 
return dd;
}
 
/**
* \ingroup fat16_dir
* Closes a directory descriptor.
*
* This function destroys a directory descriptor which was
* previously obtained by calling fat16_open_dir(). When this
* function returns, the given descriptor will be invalid.
*
* \param[in] dd The directory descriptor to close.
* \see fat16_open_dir
*/
void fat16_close_dir(struct fat16_dir_struct* dd)
{
if(dd)
#if USE_DYNAMIC_MEMORY
free(dd);
#else
dd->fs = 0;
#endif
}
 
/**
* \ingroup fat16_dir
* Reads the next directory entry contained within a parent directory.
*
* \param[in] dd The descriptor of the parent directory from which to read the entry.
* \param[out] dir_entry Pointer to a buffer into which to write the directory entry information.
* \returns 0 on failure, 1 on success.
* \see fat16_reset_dir
*/
uint8_t fat16_read_dir(struct fat16_dir_struct* dd, struct fat16_dir_entry_struct* dir_entry)
{
if(!dd || !dir_entry)
return 0;
 
if(dd->dir_entry.cluster == 0)
{
/* read entry from root directory */
if(fat16_read_root_dir_entry(dd->fs, dd->entry_next, dir_entry))
{
++dd->entry_next;
return 1;
}
}
else
{
/* read entry from a subdirectory */
if(fat16_read_sub_dir_entry(dd->fs, dd->entry_next, &dd->dir_entry, dir_entry))
{
++dd->entry_next;
return 1;
}
}
 
/* restart reading */
dd->entry_next = 0;
 
return 0;
}
 
/**
* \ingroup fat16_dir
* Resets a directory handle.
*
* Resets the directory handle such that reading restarts
* with the first directory entry.
*
* \param[in] dd The directory handle to reset.
* \returns 0 on failure, 1 on success.
* \see fat16_read_dir
*/
uint8_t fat16_reset_dir(struct fat16_dir_struct* dd)
{
if(!dd)
return 0;
 
dd->entry_next = 0;
return 1;
}
 
/**
* \ingroup fat16_fs
* Searches for space where to store a directory entry.
*
* \param[in] fs The filesystem on which to operate.
* \param[in] dir_entry The directory entry for which to search space.
* \returns 0 on failure, a device offset on success.
*/
uint32_t fat16_find_offset_for_dir_entry(const struct fat16_fs_struct* fs, const struct fat16_dir_struct* parent, const struct fat16_dir_entry_struct* dir_entry)
{
#if FAT16_WRITE_SUPPORT
if(!fs || !dir_entry)
return 0;
 
/* search for a place where to write the directory entry to disk */
uint8_t free_dir_entries_needed = (strlen(dir_entry->long_name) + 12) / 13 + 1;
uint8_t free_dir_entries_found = 0;
uint16_t cluster_num = parent->dir_entry.cluster;
uint32_t dir_entry_offset = 0;
uint32_t offset = 0;
uint32_t offset_to = 0;
 
if(cluster_num == 0)
{
/* we read/write from the root directory entry */
offset = fs->header.root_dir_offset;
offset_to = fs->header.cluster_zero_offset;
dir_entry_offset = offset;
}
while(1)
{
if(offset == offset_to)
{
if(cluster_num == 0)
/* We iterated through the whole root directory entry
* and could not find enough space for the directory entry.
*/
return 0;
 
if(offset)
{
/* We reached a cluster boundary and have to
* switch to the next cluster.
*/
 
uint16_t cluster_next = fat16_get_next_cluster(fs, cluster_num);
if(!cluster_next)
{
cluster_next = fat16_append_clusters(fs, cluster_num, 1);
if(!cluster_next)
return 0;
 
/* we appended a new cluster and know it is free */
dir_entry_offset = fs->header.cluster_zero_offset +
(uint32_t) (cluster_next - 2) * fs->header.cluster_size;
 
/* clear cluster to avoid garbage directory entries */
fat16_clear_cluster(fs, cluster_next);
 
break;
}
cluster_num = cluster_next;
}
 
offset = fs->header.cluster_zero_offset +
(uint32_t) (cluster_num - 2) * fs->header.cluster_size;
offset_to = offset + fs->header.cluster_size;
dir_entry_offset = offset;
free_dir_entries_found = 0;
}
/* read next lfn or 8.3 entry */
uint8_t first_char;
if(!fs->partition->device_read(offset, &first_char, sizeof(first_char)))
return 0;
 
/* check if we found a free directory entry */
if(first_char == FAT16_DIRENTRY_DELETED || !first_char)
{
/* check if we have the needed number of available entries */
++free_dir_entries_found;
if(free_dir_entries_found >= free_dir_entries_needed)
break;
 
offset += 32;
}
else
{
offset += 32;
dir_entry_offset = offset;
free_dir_entries_found = 0;
}
}
 
return dir_entry_offset;
 
#else
return 0;
#endif
}
 
/**
* \ingroup fat16_fs
* Writes a directory entry to disk.
*
* \note The file name is not checked for invalid characters.
*
* \note The generation of the short 8.3 file name is quite
* simple. The first eight characters are used for the filename.
* The extension, if any, is made up of the first three characters
* following the last dot within the long filename. If the
* filename (without the extension) is longer than eight characters,
* the lower byte of the cluster number replaces the last two
* characters to avoid name clashes. In any other case, it is your
* responsibility to avoid name clashes.
*
* \param[in] fs The filesystem on which to operate.
* \param[in] dir_entry The directory entry to write.
* \returns 0 on failure, 1 on success.
*/
uint8_t fat16_write_dir_entry(const struct fat16_fs_struct* fs, struct fat16_dir_entry_struct* dir_entry)
{
#if FAT16_WRITE_SUPPORT
if(!fs || !dir_entry)
return 0;
#if FAT16_DATETIME_SUPPORT
{
uint16_t year;
uint8_t month;
uint8_t day;
uint8_t hour;
uint8_t min;
uint8_t sec;
 
fat16_get_datetime(&year, &month, &day, &hour, &min, &sec);
fat16_set_file_modification_date(dir_entry, year, month, day);
fat16_set_file_modification_time(dir_entry, hour, min, sec);
}
#endif
 
device_write_t device_write = fs->partition->device_write;
uint32_t offset = dir_entry->entry_offset;
const char* name = dir_entry->long_name;
uint8_t name_len = strlen(name);
uint8_t lfn_entry_count = (name_len + 12) / 13;
uint8_t buffer[32];
 
/* write 8.3 entry */
 
/* generate 8.3 file name */
memset(&buffer[0], ' ', 11);
char* name_ext = strrchr(name, '.');
if(name_ext && *++name_ext)
{
uint8_t name_ext_len = strlen(name_ext);
name_len -= name_ext_len + 1;
 
if(name_ext_len > 3)
name_ext_len = 3;
memcpy(&buffer[8], name_ext, name_ext_len);
}
if(name_len <= 8)
{
memcpy(buffer, name, name_len);
 
/* For now, we create lfn entries for all files,
* except the "." and ".." directory references.
* This is to avoid difficulties with capitalization,
* as 8.3 filenames allow uppercase letters only.
*
* Theoretically it would be possible to leave
* the 8.3 entry alone if the basename and the
* extension have no mixed capitalization.
*/
if(name[0] == '.' &&
((name[1] == '.' && name[2] == '\0') ||
name[1] == '\0')
)
lfn_entry_count = 0;
}
else
{
memcpy(buffer, name, 8);
 
/* Minimize 8.3 name clashes by appending
* the lower byte of the cluster number.
*/
uint8_t num = dir_entry->cluster & 0xff;
 
buffer[6] = (num < 0xa0) ? ('0' + (num >> 4)) : ('a' + (num >> 4));
num &= 0x0f;
buffer[7] = (num < 0x0a) ? ('0' + num) : ('a' + num);
}
if(buffer[0] == FAT16_DIRENTRY_DELETED)
buffer[0] = 0x05;
 
/* fill directory entry buffer */
memset(&buffer[11], 0, sizeof(buffer) - 11);
buffer[0x0b] = dir_entry->attributes;
#if FAT16_DATETIME_SUPPORT
buffer[0x16] = (dir_entry->modification_time >> 0) & 0xff;
buffer[0x17] = (dir_entry->modification_time >> 8) & 0xff;
buffer[0x18] = (dir_entry->modification_date >> 0) & 0xff;
buffer[0x19] = (dir_entry->modification_date >> 8) & 0xff;
#endif
buffer[0x1a] = (dir_entry->cluster >> 0) & 0xff;
buffer[0x1b] = (dir_entry->cluster >> 8) & 0xff;
buffer[0x1c] = (dir_entry->file_size >> 0) & 0xff;
buffer[0x1d] = (dir_entry->file_size >> 8) & 0xff;
buffer[0x1e] = (dir_entry->file_size >> 16) & 0xff;
buffer[0x1f] = (dir_entry->file_size >> 24) & 0xff;
 
/* write to disk */
if(!device_write(offset + (uint32_t) lfn_entry_count * 32, buffer, sizeof(buffer)))
return 0;
/* calculate checksum of 8.3 name */
uint8_t checksum = buffer[0];
for(uint8_t i = 1; i < 11; ++i)
checksum = ((checksum >> 1) | (checksum << 7)) + buffer[i];
/* write lfn entries */
for(uint8_t lfn_entry = lfn_entry_count; lfn_entry > 0; --lfn_entry)
{
memset(buffer, 0xff, sizeof(buffer));
/* set file name */
const char* long_name_curr = name + (lfn_entry - 1) * 13;
uint8_t i = 1;
while(i < 0x1f)
{
buffer[i++] = *long_name_curr;
buffer[i++] = 0;
 
switch(i)
{
case 0x0b:
i = 0x0e;
break;
case 0x1a:
i = 0x1c;
break;
}
 
if(!*long_name_curr++)
break;
}
/* set index of lfn entry */
buffer[0x00] = lfn_entry;
if(lfn_entry == lfn_entry_count)
buffer[0x00] |= FAT16_DIRENTRY_LFNLAST;
 
/* mark as lfn entry */
buffer[0x0b] = 0x0f;
 
/* set 8.3 checksum */
buffer[0x0d] = checksum;
 
/* clear reserved bytes */
buffer[0x0c] = 0;
buffer[0x1a] = 0;
buffer[0x1b] = 0;
 
/* write entry */
device_write(offset, buffer, sizeof(buffer));
offset += sizeof(buffer);
}
return 1;
 
#else
return 0;
#endif
}
 
/**
* \ingroup fat16_file
* Creates a file.
*
* Creates a file and obtains the directory entry of the
* new file. If the file to create already exists, the
* directory entry of the existing file will be returned
* within the dir_entry parameter.
*
* \note The file name is not checked for invalid characters.
*
* \note The generation of the short 8.3 file name is quite
* simple. The first eight characters are used for the filename.
* The extension, if any, is made up of the first three characters
* following the last dot within the long filename. If the
* filename (without the extension) is longer than eight characters,
* the lower byte of the cluster number replaces the last two
* characters to avoid name clashes. In any other case, it is your
* responsibility to avoid name clashes.
*
* \param[in] parent The handle of the directory in which to create the file.
* \param[in] file The name of the file to create.
* \param[out] dir_entry The directory entry to fill for the new file.
* \returns 0 on failure, 1 on success.
* \see fat16_delete_file
*/
uint8_t fat16_create_file(struct fat16_dir_struct* parent, const char* file, struct fat16_dir_entry_struct* dir_entry)
{
#if FAT16_WRITE_SUPPORT
if(!parent || !file || !file[0] || !dir_entry)
return 0;
 
/* check if the file already exists */
while(1)
{
if(!fat16_read_dir(parent, dir_entry))
break;
 
if(strcmp(file, dir_entry->long_name) == 0)
{
fat16_reset_dir(parent);
return 0;
}
}
 
struct fat16_fs_struct* fs = parent->fs;
 
/* prepare directory entry with values already known */
memset(dir_entry, 0, sizeof(*dir_entry));
strncpy(dir_entry->long_name, file, sizeof(dir_entry->long_name) - 1);
 
/* find place where to store directory entry */
if(!(dir_entry->entry_offset = fat16_find_offset_for_dir_entry(fs, parent, dir_entry)))
return 0;
/* write directory entry to disk */
if(!fat16_write_dir_entry(fs, dir_entry))
return 0;
return 1;
#else
return 0;
#endif
}
 
/**
* \ingroup fat16_file
* Deletes a file or directory.
*
* If a directory is deleted without first deleting its
* subdirectories and files, disk space occupied by these
* files will get wasted as there is no chance to release
* it and mark it as free.
*
* \param[in] fs The filesystem on which to operate.
* \param[in] dir_entry The directory entry of the file to delete.
* \returns 0 on failure, 1 on success.
* \see fat16_create_file
*/
uint8_t fat16_delete_file(struct fat16_fs_struct* fs, struct fat16_dir_entry_struct* dir_entry)
{
#if FAT16_WRITE_SUPPORT
if(!fs || !dir_entry)
return 0;
 
/* get offset of the file's directory entry */
uint32_t dir_entry_offset = dir_entry->entry_offset;
if(!dir_entry_offset)
return 0;
 
uint8_t buffer[12];
while(1)
{
/* read directory entry */
if(!fs->partition->device_read(dir_entry_offset, buffer, sizeof(buffer)))
return 0;
/* mark the directory entry as deleted */
buffer[0] = FAT16_DIRENTRY_DELETED;
/* write back entry */
if(!fs->partition->device_write(dir_entry_offset, buffer, sizeof(buffer)))
return 0;
 
/* check if we deleted the whole entry */
if(buffer[11] != 0x0f)
break;
 
dir_entry_offset += 32;
}
 
/* We deleted the directory entry. The next thing to do is
* marking all occupied clusters as free.
*/
return (dir_entry->cluster == 0 || fat16_free_clusters(fs, dir_entry->cluster));
#else
return 0;
#endif
}
 
/**
* \ingroup fat16_dir
* Creates a directory.
*
* Creates a directory and obtains its directory entry.
* If the directory to create already exists, its
* directory entry will be returned within the dir_entry
* parameter.
*
* \note The notes which apply to fat16_create_file also
* apply to this function.
*
* \param[in] parent The handle of the parent directory of the new directory.
* \param[in] dir The name of the directory to create.
* \param[out] dir_entry The directory entry to fill for the new directory.
* \returns 0 on failure, 1 on success.
* \see fat16_delete_dir
*/
uint8_t fat16_create_dir(struct fat16_dir_struct* parent, const char* dir, struct fat16_dir_entry_struct* dir_entry)
{
#if FAT16_WRITE_SUPPORT
if(!parent || !dir || !dir[0] || !dir_entry)
return 0;
 
/* check if the file or directory already exists */
while(1)
{
if(!fat16_read_dir(parent, dir_entry))
break;
 
if(strcmp(dir, dir_entry->long_name) == 0)
{
fat16_reset_dir(parent);
return 0;
}
}
 
struct fat16_fs_struct* fs = parent->fs;
 
/* allocate cluster which will hold directory entries */
uint16_t dir_cluster = fat16_append_clusters(fs, 0, 1);
if(!dir_cluster)
return 0;
 
/* clear cluster to prevent bogus directory entries */
fat16_clear_cluster(fs, dir_cluster);
memset(dir_entry, 0, sizeof(*dir_entry));
dir_entry->attributes = FAT16_ATTRIB_DIR;
 
/* create "." directory self reference */
dir_entry->entry_offset = fs->header.cluster_zero_offset +
(uint32_t) (dir_cluster - 2) * fs->header.cluster_size;
dir_entry->long_name[0] = '.';
dir_entry->cluster = dir_cluster;
if(!fat16_write_dir_entry(fs, dir_entry))
{
fat16_free_clusters(fs, dir_cluster);
return 0;
}
 
/* create ".." parent directory reference */
dir_entry->entry_offset += 32;
dir_entry->long_name[1] = '.';
dir_entry->cluster = parent->dir_entry.cluster;
if(!fat16_write_dir_entry(fs, dir_entry))
{
fat16_free_clusters(fs, dir_cluster);
return 0;
}
 
/* fill directory entry */
strncpy(dir_entry->long_name, dir, sizeof(dir_entry->long_name) - 1);
dir_entry->cluster = dir_cluster;
 
/* find place where to store directory entry */
if(!(dir_entry->entry_offset = fat16_find_offset_for_dir_entry(fs, parent, dir_entry)))
{
fat16_free_clusters(fs, dir_cluster);
return 0;
}
 
/* write directory to disk */
if(!fat16_write_dir_entry(fs, dir_entry))
{
fat16_free_clusters(fs, dir_cluster);
return 0;
}
 
return 1;
#else
return 0;
#endif
}
 
/**
* \ingroup fat16_dir
* Deletes a directory.
*
* This is just a synonym for fat16_delete_file().
* If a directory is deleted without first deleting its
* subdirectories and files, disk space occupied by these
* files will get wasted as there is no chance to release
* it and mark it as free.
*
* \param[in] fs The filesystem on which to operate.
* \param[in] dir_entry The directory entry of the directory to delete.
* \returns 0 on failure, 1 on success.
* \see fat16_create_dir
*/
#ifdef DOXYGEN
uint8_t fat16_delete_dir(struct fat16_fs_struct* fs, struct fat16_dir_entry_struct* dir_entry);
#endif
 
/**
* \ingroup fat16_file
* Returns the modification date of a file.
*
* \param[in] dir_entry The directory entry of which to return the modification date.
* \param[out] year The year the file was last modified.
* \param[out] month The month the file was last modified.
* \param[out] day The day the file was last modified.
*/
void fat16_get_file_modification_date(const struct fat16_dir_entry_struct* dir_entry, uint16_t* year, uint8_t* month, uint8_t* day)
{
#if FAT16_DATETIME_SUPPORT
if(!dir_entry)
return;
 
*year = 1980 + ((dir_entry->modification_date >> 9) & 0x7f);
*month = (dir_entry->modification_date >> 5) & 0x0f;
*day = (dir_entry->modification_date >> 0) & 0x1f;
#endif
}
 
/**
* \ingroup fat16_file
* Returns the modification time of a file.
*
* \param[in] dir_entry The directory entry of which to return the modification time.
* \param[out] hour The hour the file was last modified.
* \param[out] min The min the file was last modified.
* \param[out] sec The sec the file was last modified.
*/
void fat16_get_file_modification_time(const struct fat16_dir_entry_struct* dir_entry, uint8_t* hour, uint8_t* min, uint8_t* sec)
{
#if FAT16_DATETIME_SUPPORT
if(!dir_entry)
return;
 
*hour = (dir_entry->modification_time >> 11) & 0x1f;
*min = (dir_entry->modification_time >> 5) & 0x3f;
*sec = ((dir_entry->modification_time >> 0) & 0x1f) * 2;
#endif
}
 
/**
* \ingroup fat16_file
* Sets the modification time of a date.
*
* \param[in] dir_entry The directory entry for which to set the modification date.
* \param[in] year The year the file was last modified.
* \param[in] month The month the file was last modified.
* \param[in] day The day the file was last modified.
*/
void fat16_set_file_modification_date(struct fat16_dir_entry_struct* dir_entry, uint16_t year, uint8_t month, uint8_t day)
{
#if FAT16_WRITE_SUPPORT
#if FAT16_DATETIME_SUPPORT
if(!dir_entry)
return;
 
dir_entry->modification_date =
((year - 1980) << 9) |
((uint16_t) month << 5) |
((uint16_t) day << 0);
#endif
#endif
}
 
/**
* \ingroup fat16_file
* Sets the modification time of a file.
*
* \param[in] dir_entry The directory entry for which to set the modification time.
* \param[in] hour The year the file was last modified.
* \param[in] min The month the file was last modified.
* \param[in] sec The day the file was last modified.
*/
void fat16_set_file_modification_time(struct fat16_dir_entry_struct* dir_entry, uint8_t hour, uint8_t min, uint8_t sec)
{
#if FAT16_WRITE_SUPPORT
#if FAT16_DATETIME_SUPPORT
if(!dir_entry)
return;
 
dir_entry->modification_time =
((uint16_t) hour << 11) |
((uint16_t) min << 5) |
((uint16_t) sec >> 1) ;
#endif
#endif
}
 
/**
* \ingroup fat16_fs
* Returns the amount of total storage capacity of the filesystem in bytes.
*
* \param[in] fs The filesystem on which to operate.
* \returns 0 on failure, the filesystem size in bytes otherwise.
*/
uint32_t fat16_get_fs_size(const struct fat16_fs_struct* fs)
{
if(!fs)
return 0;
 
return (fs->header.fat_size / 2 - 2) * fs->header.cluster_size;
}
 
/**
* \ingroup fat16_fs
* Returns the amount of free storage capacity on the filesystem in bytes.
*
* \note As the FAT16 filesystem is cluster based, this function does not
* return continuous values but multiples of the cluster size.
*
* \param[in] fs The filesystem on which to operate.
* \returns 0 on failure, the free filesystem space in bytes otherwise.
*/
uint32_t fat16_get_fs_free(const struct fat16_fs_struct* fs)
{
if(!fs)
return 0;
 
uint8_t fat[32];
struct fat16_usage_count_callback_arg count_arg;
count_arg.cluster_count = 0;
count_arg.buffer_size = sizeof(fat);
 
uint32_t fat_offset = fs->header.fat_offset;
uint32_t fat_size = fs->header.fat_size;
while(fat_size > 0)
{
uint16_t length = UINT16_MAX - 1;
if(fat_size < length)
length = fat_size;
 
if(!fs->partition->device_read_interval(fat_offset,
fat,
sizeof(fat),
length,
fat16_get_fs_free_callback,
&count_arg
)
)
return 0;
 
fat_offset += length;
fat_size -= length;
}
 
return (uint32_t) count_arg.cluster_count * fs->header.cluster_size;
}
 
/**
* \ingroup fat16_fs
* Callback function used for counting free clusters.
*/
uint8_t fat16_get_fs_free_callback(uint8_t* buffer, uint32_t offset, void* p)
{
struct fat16_usage_count_callback_arg* count_arg = (struct fat16_usage_count_callback_arg*) p;
uint8_t buffer_size = count_arg->buffer_size;
 
for(uint8_t i = 0; i < buffer_size; i += 2)
{
if((((uint16_t) buffer[1] << 8) | ((uint16_t) buffer[0] << 0)) == FAT16_CLUSTER_FREE)
++(count_arg->cluster_count);
 
buffer += 2;
}
 
return 1;
}
 
/Designs/GPSRL02A/SW/fat16.h
0,0 → 1,121
 
/*
* Copyright (c) 2006-2007 by Roland Riegel <feedback@roland-riegel.de>
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of either the GNU General Public License version 2
* or the GNU Lesser General Public License version 2.1, both as
* published by the Free Software Foundation.
*/
 
#ifndef FAT16_H
#define FAT16_H
 
#include "fat16_config.h"
 
#include <stdint.h>
 
/**
* \addtogroup fat16
*
* @{
*/
/**
* \file
* FAT16 header (license: GPLv2 or LGPLv2.1)
*
* \author Roland Riegel
*/
 
/**
* \addtogroup fat16_file
* @{
*/
 
/** The file is read-only. */
#define FAT16_ATTRIB_READONLY (1 << 0)
/** The file is hidden. */
#define FAT16_ATTRIB_HIDDEN (1 << 1)
/** The file is a system file. */
#define FAT16_ATTRIB_SYSTEM (1 << 2)
/** The file is empty and has the volume label as its name. */
#define FAT16_ATTRIB_VOLUME (1 << 3)
/** The file is a directory. */
#define FAT16_ATTRIB_DIR (1 << 4)
/** The file has to be archived. */
#define FAT16_ATTRIB_ARCHIVE (1 << 5)
 
/** The given offset is relative to the beginning of the file. */
#define FAT16_SEEK_SET 0
/** The given offset is relative to the current read/write position. */
#define FAT16_SEEK_CUR 1
/** The given offset is relative to the end of the file. */
#define FAT16_SEEK_END 2
 
/**
* @}
*/
 
struct partition_struct;
struct fat16_fs_struct;
struct fat16_file_struct;
struct fat16_dir_struct;
 
/**
* \ingroup fat16_file
* Describes a directory entry.
*/
struct fat16_dir_entry_struct
{
/** The file's name, truncated to 31 characters. */
char long_name[32];
/** The file's attributes. Mask of the FAT16_ATTRIB_* constants. */
uint8_t attributes;
#if FAT16_DATETIME_SUPPORT
/** Compressed representation of modification time. */
uint16_t modification_time;
/** Compressed representation of modification date. */
uint16_t modification_date;
#endif
/** The cluster in which the file's first byte resides. */
uint16_t cluster;
/** The file's size. */
uint32_t file_size;
/** The total disk offset of this directory entry. */
uint32_t entry_offset;
};
 
struct fat16_fs_struct* fat16_open(struct partition_struct* partition);
void fat16_close(struct fat16_fs_struct* fs);
 
struct fat16_file_struct* fat16_open_file(struct fat16_fs_struct* fs, const struct fat16_dir_entry_struct* dir_entry);
void fat16_close_file(struct fat16_file_struct* fd);
int16_t fat16_read_file(struct fat16_file_struct* fd, uint8_t* buffer, uint16_t buffer_len);
int16_t fat16_write_file(struct fat16_file_struct* fd, const uint8_t* buffer, uint16_t buffer_len);
uint8_t fat16_seek_file(struct fat16_file_struct* fd, int32_t* offset, uint8_t whence);
uint8_t fat16_resize_file(struct fat16_file_struct* fd, uint32_t size);
 
struct fat16_dir_struct* fat16_open_dir(struct fat16_fs_struct* fs, const struct fat16_dir_entry_struct* dir_entry);
void fat16_close_dir(struct fat16_dir_struct* dd);
uint8_t fat16_read_dir(struct fat16_dir_struct* dd, struct fat16_dir_entry_struct* dir_entry);
uint8_t fat16_reset_dir(struct fat16_dir_struct* dd);
 
uint8_t fat16_create_file(struct fat16_dir_struct* parent, const char* file, struct fat16_dir_entry_struct* dir_entry);
uint8_t fat16_delete_file(struct fat16_fs_struct* fs, struct fat16_dir_entry_struct* dir_entry);
uint8_t fat16_create_dir(struct fat16_dir_struct* parent, const char* dir, struct fat16_dir_entry_struct* dir_entry);
#define fat16_delete_dir fat16_delete_file
 
void fat16_get_file_modification_date(const struct fat16_dir_entry_struct* dir_entry, uint16_t* year, uint8_t* month, uint8_t* day);
void fat16_get_file_modification_time(const struct fat16_dir_entry_struct* dir_entry, uint8_t* hour, uint8_t* min, uint8_t* sec);
 
uint8_t fat16_get_dir_entry_of_path(struct fat16_fs_struct* fs, const char* path, struct fat16_dir_entry_struct* dir_entry);
 
uint32_t fat16_get_fs_size(const struct fat16_fs_struct* fs);
uint32_t fat16_get_fs_free(const struct fat16_fs_struct* fs);
 
/**
* @}
*/
 
#endif
 
/Designs/GPSRL02A/SW/fat16_config.h
0,0 → 1,84
 
/*
* Copyright (c) 2006-2007 by Roland Riegel <feedback@roland-riegel.de>
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of either the GNU General Public License version 2
* or the GNU Lesser General Public License version 2.1, both as
* published by the Free Software Foundation.
*/
 
#ifndef FAT16_CONFIG_H
#define FAT16_CONFIG_G
 
/**
* \addtogroup fat16
*
* @{
*/
/**
* \file
* FAT16 configuration (license: GPLv2 or LGPLv2.1)
*/
 
/**
* \ingroup fat16_config
* Controls FAT16 write support.
*
* Set to 1 to enable FAT16 write support, set to 0 to disable it.
*/
#define FAT16_WRITE_SUPPORT 1
 
/**
* \ingroup fat16_config
* Controls FAT16 date and time support.
*
* Set to 1 to enable FAT16 date and time stamping support.
*/
#define FAT16_DATETIME_SUPPORT 0
 
/**
* \ingroup fat16_config
* Determines the function used for retrieving current date and time.
*
* Define this to the function call which shall be used to retrieve
* current date and time.
*
* \note Used only when FAT16_DATETIME_SUPPORT is 1.
*
* \param[out] year Pointer to a \c uint16_t which receives the current year.
* \param[out] month Pointer to a \c uint8_t which receives the current month.
* \param[out] day Pointer to a \c uint8_t which receives the current day.
* \param[out] hour Pointer to a \c uint8_t which receives the current hour.
* \param[out] min Pointer to a \c uint8_t which receives the current minute.
* \param[out] sec Pointer to a \c uint8_t which receives the current sec.
*/
#define fat16_get_datetime(year, month, day, hour, min, sec) \
get_datetime(year, month, day, hour, min, sec)
/* forward declaration for the above */
void get_datetime(uint16_t* year, uint8_t* month, uint8_t* day, uint8_t* hour, uint8_t* min, uint8_t* sec);
 
/**
* \ingroup fat16_config
* Maximum number of filesystem handles.
*/
#define FAT16_FS_COUNT 1
 
/**
* \ingroup fat16_config
* Maximum number of file handles.
*/
#define FAT16_FILE_COUNT 1
 
/**
* \ingroup fat16_config
* Maximum number of directory handles.
*/
#define FAT16_DIR_COUNT 2
 
/**
* @}
*/
 
#endif
 
/Designs/GPSRL02A/SW/main.c
0,0 → 1,609
 
/*
* Copyright (c) 2006-2007 by Roland Riegel <feedback@roland-riegel.de>
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
 
#include <string.h>
#include <avr/pgmspace.h>
#include <avr/sleep.h>
#include "fat16.h"
#include "fat16_config.h"
#include "partition.h"
#include "sd_raw.h"
#include "sd_raw_config.h"
#include "uart.h"
 
#define DEBUG 1
 
/**
* \mainpage MMC/SD card example application
*
* This project is a small test application which implements read and write
* support for MMC and SD cards.
*
* It includes
* - low-level \link sd_raw MMC read/write routines \endlink
* - \link partition partition table support \endlink
* - a simple \link fat16 FAT16 read/write implementation \endlink
*
* \section circuit The circuit
* The curcuit board is a self-made and self-soldered board consisting of a single
* copper layer and standard DIL components, except of the MMC/SD card connector.
*
* The connector is soldered to the bottom side of the board. It has a simple
* eject button which, when a card is inserted, needs some space beyond the connector
* itself. As an additional feature the connector has two electrical switches
* to detect wether a card is inserted and wether this card is write-protected.
*
* I used two microcontrollers during development, the Atmel ATmega8 with 8kBytes
* of flash, and its pin-compatible alternative, the ATmega168 with 16kBytes flash.
* The first one is the one I started with, but when I implemented FAT16 write
* support, I ran out of flash space and switched to the ATmega168.
*
* \section pictures Pictures
* \image html pic01.jpg "The circuit board used to implement and test this application."
* \image html pic02.jpg "The MMC/SD card connector on the soldering side of the circuit board."
*
* \section software The software
* The software is written in pure standard ANSI-C. Sure, it might not be the
* smallest or the fastest one, but I think it is quite flexible.
*
* I implemented a simple command prompt which is accessible via the UART at 9600 Baud. With
* commands similiar to the Unix shell you can browse different directories, read and write
* files, create new ones and delete them again. Not all commands are available in all
* software configurations.
* - <tt>cat \<file\></tt>\n
* Writes a hexdump of \<file\> to the terminal.
* - <tt>cd \<directory\></tt>\n
* Changes current working directory to \<directory\>.
* - <tt>disk</tt>\n
* Shows card manufacturer, status, filesystem capacity and free storage space.
* - <tt>ls</tt>\n
* Shows the content of the current directory.
* - <tt>mkdir \<directory\></tt>\n
* Creates a directory called \<directory\>.
* - <tt>rm \<file\></tt>\n
* Deletes \<file\>.
* - <tt>sync</tt>\n
* Ensures all buffered data is written to the card.
* - <tt>touch \<file\></tt>\n
* Creates \<file\>.
* - <tt>write \<file\> \<offset\></tt>\n
* Writes text to \<file\>, starting from \<offset\>. The text is read
* from the UART, line by line. Finish with an empty line.
*
* \htmlonly
* <p>
* The following table shows some typical code sizes in bytes, using the 20061101 release with malloc()/free():
* </p>
*
* <table border="1" cellpadding="2">
* <tr>
* <th>layer</th>
* <th>code size</th>
* <th>static RAM usage</th>
* </tr>
* <tr>
* <td>MMC/SD (read-only)</td>
* <td align="right">1576</td>
* <td align="right">0</td>
* </tr>
* <tr>
* <td>MMC/SD (read-write)</td>
* <td align="right">2202</td>
* <td align="right">517</td>
* </tr>
* <tr>
* <td>Partition</td>
* <td align="right">418</td>
* <td align="right">0</td>
* </tr>
* <tr>
* <td>FAT16 (read-only)</td>
* <td align="right">3834</td>
* <td align="right">0</td>
* </tr>
* <tr>
* <td>FAT16 (read-write)</td>
* <td align="right">7932</td>
* <td align="right">0</td>
* </tr>
* </table>
*
* <p>
* The static RAM in the read-write case is used for buffering memory card
* access. Without this buffer, implementation would have been much more complicated.
* </p>
*
* <p>
* Please note that the numbers above do not include the C library functions
* used, e.g. malloc()/free() and some string functions. These will raise the
* numbers somewhat if they are not already used in other program parts.
* </p>
*
* <p>
* When opening a partition, filesystem, file or directory, a little amount
* of dynamic RAM is used, as listed in the following table. Alternatively,
* the same amount of static RAM can be used.
* </p>
*
* <table border="1" cellpadding="2">
* <tr>
* <th>descriptor</th>
* <th>dynamic/static RAM</th>
* </tr>
* <tr>
* <td>partition</td>
* <td align="right">17</td>
* </tr>
* <tr>
* <td>filesystem</td>
* <td align="right">26</td>
* </tr>
* <tr>
* <td>file</td>
* <td align="right">51</td>
* </tr>
* <tr>
* <td>directory</td>
* <td align="right">47</td>
* </tr>
* </table>
*
* \endhtmlonly
*
* \section adaptation Adapting the software to your needs
* The only hardware dependent part is the communication
* layer talking to the memory card. The other parts like partition table and FAT16
* support are completely independent, you could use them even for managing
* Compact Flash cards or standard ATAPI hard disks.
*
* By changing the MCU* variables in the Makefile, you can use other Atmel
* microcontrollers or different clock speeds. You might also want to change
* the configuration defines in the files fat16_config.h, partition_config.h,
* sd_raw_config.h and sd-reader_config.h. For example, you could disable
* write support completely if you only need read support.
*
* \section bugs Bugs or comments?
* If you have comments or found a bug in the software - there might be some
* of them - you may contact me per mail at feedback@roland-riegel.de.
*
* \section acknowledgements Acknowledgements
* Thanks go to Ulrich Radig, who explained on his homepage how to interface
* MMC cards to the Atmel microcontroller (http://www.ulrichradig.de/).
* I adapted his work for my circuit. Although this is a very simple
* solution, I had no problems using it.
*
* \section copyright Copyright 2006-2007 by Roland Riegel
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 2 as published by
* the Free Software Foundation (http://www.gnu.org/copyleft/gpl.html).
* At your option, you can alternatively redistribute and/or modify the following
* files under the terms of the GNU Lesser General Public License version 2.1
* as published by the Free Software Foundation (http://www.gnu.org/copyleft/lgpl.html):
* - fat16.c
* - fat16.h
* - fat16_config.h
* - partition.c
* - partition.h
* - partition_config.h
* - sd_raw.c
* - sd_raw.h
* - sd_raw_config.h
* - sd-reader_config.h
*/
 
static uint8_t read_line(char* buffer, uint8_t buffer_length);
static uint32_t strtolong(const char* str);
static uint8_t find_file_in_dir(struct fat16_fs_struct* fs, struct fat16_dir_struct* dd, const char* name, struct fat16_dir_entry_struct* dir_entry);
static struct fat16_file_struct* open_file_in_dir(struct fat16_fs_struct* fs, struct fat16_dir_struct* dd, const char* name);
static uint8_t print_disk_info(const struct fat16_fs_struct* fs);
 
int main()
{
/* we will just use ordinary idle mode */
set_sleep_mode(SLEEP_MODE_IDLE);
 
/* setup uart */
uart_init();
 
/* setup sd card slot */
if(!sd_raw_init())
{
#if DEBUG
uart_puts_p(PSTR("MMC/SD initialization failed\n"));
#endif
return 1;
}
 
/* open first partition */
struct partition_struct* partition = partition_open(sd_raw_read,
sd_raw_read_interval,
sd_raw_write,
sd_raw_write_interval,
0
);
 
if(!partition)
{
/* If the partition did not open, assume the storage device
* is a "superfloppy", i.e. has no MBR.
*/
partition = partition_open(sd_raw_read,
sd_raw_read_interval,
sd_raw_write,
sd_raw_write_interval,
-1
);
if(!partition)
{
#if DEBUG
uart_puts_p(PSTR("opening partition failed\n"));
#endif
return 1;
}
}
 
/* open file system */
struct fat16_fs_struct* fs = fat16_open(partition);
if(!fs)
{
#if DEBUG
uart_puts_p(PSTR("opening filesystem failed\n"));
#endif
return 1;
}
 
/* open root directory */
struct fat16_dir_entry_struct directory;
fat16_get_dir_entry_of_path(fs, "/", &directory);
 
struct fat16_dir_struct* dd = fat16_open_dir(fs, &directory);
if(!dd)
{
#if DEBUG
uart_puts_p(PSTR("opening root directory failed\n"));
#endif
return 1;
}
/* print some card information as a boot message */
print_disk_info(fs);
 
/* provide a simple shell */
char buffer[24];
while(1)
{
/* print prompt */
uart_putc('>');
uart_putc(' ');
 
/* read command */
char* command = buffer;
if(read_line(command, sizeof(buffer)) < 1)
continue;
 
/* execute command */
if(strncmp_P(command, PSTR("cd "), 3) == 0)
{
command += 3;
if(command[0] == '\0')
continue;
 
/* change directory */
struct fat16_dir_entry_struct subdir_entry;
if(find_file_in_dir(fs, dd, command, &subdir_entry))
{
struct fat16_dir_struct* dd_new = fat16_open_dir(fs, &subdir_entry);
if(dd_new)
{
fat16_close_dir(dd);
dd = dd_new;
continue;
}
}
 
uart_puts_p(PSTR("directory not found: "));
uart_puts(command);
uart_putc('\n');
}
else if(strcmp_P(command, PSTR("ls")) == 0)
{
/* print directory listing */
struct fat16_dir_entry_struct dir_entry;
while(fat16_read_dir(dd, &dir_entry))
{
uint8_t spaces = sizeof(dir_entry.long_name) - strlen(dir_entry.long_name) + 4;
 
uart_puts(dir_entry.long_name);
uart_putc(dir_entry.attributes & FAT16_ATTRIB_DIR ? '/' : ' ');
while(spaces--)
uart_putc(' ');
uart_putdw_dec(dir_entry.file_size);
uart_putc('\n');
}
}
else if(strncmp_P(command, PSTR("cat "), 4) == 0)
{
command += 4;
if(command[0] == '\0')
continue;
/* search file in current directory and open it */
struct fat16_file_struct* fd = open_file_in_dir(fs, dd, command);
if(!fd)
{
uart_puts_p(PSTR("error opening "));
uart_puts(command);
uart_putc('\n');
continue;
}
 
/* print file contents */
uint8_t buffer[8];
uint32_t offset = 0;
while(fat16_read_file(fd, buffer, sizeof(buffer)) > 0)
{
uart_putdw_hex(offset);
uart_putc(':');
for(uint8_t i = 0; i < 8; ++i)
{
uart_putc(' ');
uart_putc_hex(buffer[i]);
}
uart_putc('\n');
offset += 8;
}
 
fat16_close_file(fd);
}
else if(strcmp_P(command, PSTR("disk")) == 0)
{
if(!print_disk_info(fs))
uart_puts_p(PSTR("error reading disk info\n"));
}
#if FAT16_WRITE_SUPPORT
else if(strncmp_P(command, PSTR("rm "), 3) == 0)
{
command += 3;
if(command[0] == '\0')
continue;
struct fat16_dir_entry_struct file_entry;
if(find_file_in_dir(fs, dd, command, &file_entry))
{
if(fat16_delete_file(fs, &file_entry))
continue;
}
 
uart_puts_p(PSTR("error deleting file: "));
uart_puts(command);
uart_putc('\n');
}
else if(strncmp_P(command, PSTR("touch "), 6) == 0)
{
command += 6;
if(command[0] == '\0')
continue;
 
struct fat16_dir_entry_struct file_entry;
if(!fat16_create_file(dd, command, &file_entry))
{
uart_puts_p(PSTR("error creating file: "));
uart_puts(command);
uart_putc('\n');
}
}
else if(strncmp_P(command, PSTR("write "), 6) == 0)
{
command += 6;
if(command[0] == '\0')
continue;
 
char* offset_value = command;
while(*offset_value != ' ' && *offset_value != '\0')
++offset_value;
 
if(*offset_value == ' ')
*offset_value++ = '\0';
else
continue;
 
/* search file in current directory and open it */
struct fat16_file_struct* fd = open_file_in_dir(fs, dd, command);
if(!fd)
{
uart_puts_p(PSTR("error opening "));
uart_puts(command);
uart_putc('\n');
continue;
}
 
int32_t offset = strtolong(offset_value);
if(!fat16_seek_file(fd, &offset, FAT16_SEEK_SET))
{
uart_puts_p(PSTR("error seeking on "));
uart_puts(command);
uart_putc('\n');
 
fat16_close_file(fd);
continue;
}
 
/* read text from the shell and write it to the file */
uint8_t data_len;
while(1)
{
/* give a different prompt */
uart_putc('<');
uart_putc(' ');
 
/* read one line of text */
data_len = read_line(buffer, sizeof(buffer));
if(!data_len)
break;
 
/* write text to file */
if(fat16_write_file(fd, (uint8_t*) buffer, data_len) != data_len)
{
uart_puts_p(PSTR("error writing to file\n"));
break;
}
}
 
fat16_close_file(fd);
}
else if(strncmp_P(command, PSTR("mkdir "), 6) == 0)
{
command += 6;
if(command[0] == '\0')
continue;
 
struct fat16_dir_entry_struct dir_entry;
if(!fat16_create_dir(dd, command, &dir_entry))
{
uart_puts_p(PSTR("error creating directory: "));
uart_puts(command);
uart_putc('\n');
}
}
#endif
#if SD_RAW_WRITE_BUFFERING
else if(strcmp_P(command, PSTR("sync")) == 0)
{
if(!sd_raw_sync())
uart_puts_p(PSTR("error syncing disk\n"));
}
#endif
else
{
uart_puts_p(PSTR("unknown command: "));
uart_puts(command);
uart_putc('\n');
}
}
 
/* close file system */
fat16_close(fs);
 
/* close partition */
partition_close(partition);
return 0;
}
 
uint8_t read_line(char* buffer, uint8_t buffer_length)
{
memset(buffer, 0, buffer_length);
 
uint8_t read_length = 0;
while(read_length < buffer_length - 1)
{
uint8_t c = uart_getc();
 
if(c == 0x08 || c == 0x7f)
{
if(read_length < 1)
continue;
 
--read_length;
buffer[read_length] = '\0';
 
uart_putc(0x08);
uart_putc(' ');
uart_putc(0x08);
 
continue;
}
 
uart_putc(c);
 
if(c == '\n')
{
buffer[read_length] = '\0';
break;
}
else
{
buffer[read_length] = c;
++read_length;
}
}
 
return read_length;
}
 
uint32_t strtolong(const char* str)
{
uint32_t l = 0;
while(*str >= '0' && *str <= '9')
l = l * 10 + (*str++ - '0');
 
return l;
}
 
uint8_t find_file_in_dir(struct fat16_fs_struct* fs, struct fat16_dir_struct* dd, const char* name, struct fat16_dir_entry_struct* dir_entry)
{
while(fat16_read_dir(dd, dir_entry))
{
if(strcmp(dir_entry->long_name, name) == 0)
{
fat16_reset_dir(dd);
return 1;
}
}
 
return 0;
}
 
struct fat16_file_struct* open_file_in_dir(struct fat16_fs_struct* fs, struct fat16_dir_struct* dd, const char* name)
{
struct fat16_dir_entry_struct file_entry;
if(!find_file_in_dir(fs, dd, name, &file_entry))
return 0;
 
return fat16_open_file(fs, &file_entry);
}
 
uint8_t print_disk_info(const struct fat16_fs_struct* fs)
{
if(!fs)
return 0;
 
struct sd_raw_info disk_info;
if(!sd_raw_get_info(&disk_info))
return 0;
 
uart_puts_p(PSTR("manuf: 0x")); uart_putc_hex(disk_info.manufacturer); uart_putc('\n');
uart_puts_p(PSTR("oem: ")); uart_puts((char*) disk_info.oem); uart_putc('\n');
uart_puts_p(PSTR("prod: ")); uart_puts((char*) disk_info.product); uart_putc('\n');
uart_puts_p(PSTR("rev: ")); uart_putc_hex(disk_info.revision); uart_putc('\n');
uart_puts_p(PSTR("serial: 0x")); uart_putdw_hex(disk_info.serial); uart_putc('\n');
uart_puts_p(PSTR("date: ")); uart_putw_dec(disk_info.manufacturing_month); uart_putc('/');
uart_putw_dec(disk_info.manufacturing_year); uart_putc('\n');
uart_puts_p(PSTR("size: ")); uart_putdw_dec(disk_info.capacity); uart_putc('\n');
uart_puts_p(PSTR("copy: ")); uart_putw_dec(disk_info.flag_copy); uart_putc('\n');
uart_puts_p(PSTR("wr.pr.: ")); uart_putw_dec(disk_info.flag_write_protect_temp); uart_putc('/');
uart_putw_dec(disk_info.flag_write_protect); uart_putc('\n');
uart_puts_p(PSTR("format: ")); uart_putw_dec(disk_info.format); uart_putc('\n');
uart_puts_p(PSTR("free: ")); uart_putdw_dec(fat16_get_fs_free(fs)); uart_putc('/');
uart_putdw_dec(fat16_get_fs_size(fs)); uart_putc('\n');
 
return 1;
}
 
void get_datetime(uint16_t* year, uint8_t* month, uint8_t* day, uint8_t* hour, uint8_t* min, uint8_t* sec)
{
*year = 2007;
*month = 1;
*day = 1;
*hour = 0;
*min = 0;
*sec = 0;
}
 
 
/Designs/GPSRL02A/SW/partition.c
0,0 → 1,159
 
/*
* Copyright (c) 2006-2007 by Roland Riegel <feedback@roland-riegel.de>
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of either the GNU General Public License version 2
* or the GNU Lesser General Public License version 2.1, both as
* published by the Free Software Foundation.
*/
 
#include "partition.h"
#include "partition_config.h"
#include "sd-reader_config.h"
 
#include <string.h>
 
#if USE_DYNAMIC_MEMORY
#include <stdlib.h>
#endif
 
/**
* \addtogroup partition Partition table support
*
* Support for reading partition tables and access to partitions.
*
* @{
*/
/**
* \file
* Partition table implementation (license: GPLv2 or LGPLv2.1)
*
* \author Roland Riegel
*/
 
/**
* \addtogroup partition_config Configuration of partition table support
* Preprocessor defines to configure the partition support.
*/
 
#if !USE_DYNAMIC_MEMORY
static struct partition_struct partition_handles[PARTITION_COUNT];
#endif
 
/**
* Opens a partition.
*
* Opens a partition by its index number and returns a partition
* handle which describes the opened partition.
*
* \note This function does not support extended partitions.
*
* \param[in] device_read A function pointer which is used to read from the disk.
* \param[in] device_read_interval A function pointer which is used to read in constant intervals from the disk.
* \param[in] device_write A function pointer which is used to write to the disk.
* \param[in] device_write_interval A function pointer which is used to write a data stream to disk.
* \param[in] index The index of the partition which should be opened, range 0 to 3.
* A negative value is allowed as well. In this case, the partition opened is
* not checked for existance, begins at offset zero, has a length of zero
* and is of an unknown type.
* \returns 0 on failure, a partition descriptor on success.
* \see partition_close
*/
struct partition_struct* partition_open(device_read_t device_read, device_read_interval_t device_read_interval, device_write_t device_write, device_write_interval_t device_write_interval, int8_t index)
{
struct partition_struct* new_partition = 0;
uint8_t buffer[0x10];
 
if(!device_read || !device_read_interval || index >= 4)
return 0;
 
if(index >= 0)
{
/* read specified partition table index */
if(!device_read(0x01be + index * 0x10, buffer, sizeof(buffer)))
return 0;
 
/* abort on empty partition entry */
if(buffer[4] == 0x00)
return 0;
}
 
/* allocate partition descriptor */
#if USE_DYNAMIC_MEMORY
new_partition = malloc(sizeof(*new_partition));
if(!new_partition)
return 0;
#else
new_partition = partition_handles;
uint8_t i;
for(i = 0; i < PARTITION_COUNT; ++i)
{
if(new_partition->type == PARTITION_TYPE_FREE)
break;
 
++new_partition;
}
if(i >= PARTITION_COUNT)
return 0;
#endif
 
memset(new_partition, 0, sizeof(*new_partition));
 
/* fill partition descriptor */
new_partition->device_read = device_read;
new_partition->device_read_interval = device_read_interval;
new_partition->device_write = device_write;
new_partition->device_write_interval = device_write_interval;
 
if(index >= 0)
{
new_partition->type = buffer[4];
new_partition->offset = ((uint32_t) buffer[8]) |
((uint32_t) buffer[9] << 8) |
((uint32_t) buffer[10] << 16) |
((uint32_t) buffer[11] << 24);
new_partition->length = ((uint32_t) buffer[12]) |
((uint32_t) buffer[13] << 8) |
((uint32_t) buffer[14] << 16) |
((uint32_t) buffer[15] << 24);
}
else
{
new_partition->type = 0xff;
}
 
return new_partition;
}
 
/**
* Closes a partition.
*
* This function destroys a partition descriptor which was
* previously obtained from a call to partition_open().
* When this function returns, the given descriptor will be
* invalid.
*
* \param[in] partition The partition descriptor to destroy.
* \returns 0 on failure, 1 on success.
* \see partition_open
*/
uint8_t partition_close(struct partition_struct* partition)
{
if(!partition)
return 0;
 
/* destroy partition descriptor */
#if USE_DYNAMIC_MEMORY
free(partition);
#else
partition->type = PARTITION_TYPE_FREE;
#endif
 
return 1;
}
 
/**
* @}
*/
 
/Designs/GPSRL02A/SW/partition.h
0,0 → 1,201
 
/*
* Copyright (c) 2006-2007 by Roland Riegel <feedback@roland-riegel.de>
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of either the GNU General Public License version 2
* or the GNU Lesser General Public License version 2.1, both as
* published by the Free Software Foundation.
*/
 
#ifndef PARTITION_H
#define PARTITION_H
 
#include <stdint.h>
 
/**
* \addtogroup partition
*
* @{
*/
/**
* \file
* Partition table header (license: GPLv2 or LGPLv2.1)
*
* \author Roland Riegel
*/
 
/**
* The partition table entry is not used.
*/
#define PARTITION_TYPE_FREE 0x00
/**
* The partition contains a FAT12 filesystem.
*/
#define PARTITION_TYPE_FAT12 0x01
/**
* The partition contains a FAT16 filesystem with 32MB maximum.
*/
#define PARTITION_TYPE_FAT16_32MB 0x04
/**
* The partition is an extended partition with its own partition table.
*/
#define PARTITION_TYPE_EXTENDED 0x05
/**
* The partition contains a FAT16 filesystem.
*/
#define PARTITION_TYPE_FAT16 0x06
/**
* The partition contains a FAT32 filesystem.
*/
#define PARTITION_TYPE_FAT32 0x0b
/**
* The partition contains a FAT32 filesystem with LBA.
*/
#define PARTITION_TYPE_FAT32_LBA 0x0c
/**
* The partition contains a FAT16 filesystem with LBA.
*/
#define PARTITION_TYPE_FAT16_LBA 0x0e
/**
* The partition is an extended partition with LBA.
*/
#define PARTITION_TYPE_EXTENDED_LBA 0x0f
/**
* The partition has an unknown type.
*/
#define PARTITION_TYPE_UNKNOWN 0xff
 
/**
* A function pointer used to read from the partition.
*
* \param[in] offset The offset on the device where to start reading.
* \param[out] buffer The buffer into which to place the data.
* \param[in] length The count of bytes to read.
*/
typedef uint8_t (*device_read_t)(uint32_t offset, uint8_t* buffer, uint16_t length);
/**
* A function pointer passed to a \c device_read_interval_t.
*
* \param[in] buffer The buffer which contains the data just read.
* \param[in] offset The offset from which the data in \c buffer was read.
* \param[in] p An opaque pointer.
* \see device_read_interval_t
*/
typedef uint8_t (*device_read_callback_t)(uint8_t* buffer, uint32_t offset, void* p);
/**
* A function pointer used to continuously read units of \c interval bytes
* and call a callback function.
*
* This function starts reading at the specified offset. Every \c interval bytes,
* it calls the callback function with the associated data buffer.
*
* By returning zero, the callback may stop reading.
*
* \param[in] offset Offset from which to start reading.
* \param[in] buffer Pointer to a buffer which is at least interval bytes in size.
* \param[in] interval Number of bytes to read before calling the callback function.
* \param[in] length Number of bytes to read altogether.
* \param[in] callback The function to call every interval bytes.
* \param[in] p An opaque pointer directly passed to the callback function.
* \returns 0 on failure, 1 on success
* \see device_read_t
*/
typedef uint8_t (*device_read_interval_t)(uint32_t offset, uint8_t* buffer, uint16_t interval, uint16_t length, device_read_callback_t callback, void* p);
/**
* A function pointer used to write to the partition.
*
* \param[in] offset The offset on the device where to start writing.
* \param[in] buffer The buffer which to write.
* \param[in] length The count of bytes to write.
*/
typedef uint8_t (*device_write_t)(uint32_t offset, const uint8_t* buffer, uint16_t length);
/**
* A function pointer passed to a \c device_write_interval_t.
*
* \param[in] buffer The buffer which receives the data to write.
* \param[in] offset The offset to which the data in \c buffer will be written.
* \param[in] p An opaque pointer.
* \returns The number of bytes put into \c buffer
* \see device_write_interval_t
*/
typedef uint16_t (*device_write_callback_t)(uint8_t* buffer, uint32_t offset, void* p);
/**
* A function pointer used to continuously write a data stream obtained from
* a callback function.
*
* This function starts writing at the specified offset. To obtain the
* next bytes to write, it calls the callback function. The callback fills the
* provided data buffer and returns the number of bytes it has put into the buffer.
*
* By returning zero, the callback may stop writing.
*
* \param[in] offset Offset where to start writing.
* \param[in] buffer Pointer to a buffer which is used for the callback function.
* \param[in] length Number of bytes to write in total. May be zero for endless writes.
* \param[in] callback The function used to obtain the bytes to write.
* \param[in] p An opaque pointer directly passed to the callback function.
* \returns 0 on failure, 1 on success
* \see device_write_t
*/
typedef uint8_t (*device_write_interval_t)(uint32_t offset, uint8_t* buffer, uint16_t length, device_write_callback_t callback, void* p);
 
/**
* Describes a partition.
*/
struct partition_struct
{
/**
* The function which reads data from the partition.
*
* \note The offset given to this function is relative to the whole disk,
* not to the start of the partition.
*/
device_read_t device_read;
/**
* The function which repeatedly reads a constant amount of data from the partition.
*
* \note The offset given to this function is relative to the whole disk,
* not to the start of the partition.
*/
device_read_interval_t device_read_interval;
/**
* The function which writes data to the partition.
*
* \note The offset given to this function is relative to the whole disk,
* not to the start of the partition.
*/
device_write_t device_write;
/**
* The function which repeatedly writes data to the partition.
*
* \note The offset given to this function is relative to the whole disk,
* not to the start of the partition.
*/
device_write_interval_t device_write_interval;
 
/**
* The type of the partition.
*
* Compare this value to the PARTITION_TYPE_* constants.
*/
uint8_t type;
/**
* The offset in bytes on the disk where this partition starts.
*/
uint32_t offset;
/**
* The length in bytes of this partition.
*/
uint32_t length;
};
 
struct partition_struct* partition_open(device_read_t device_read, device_read_interval_t device_read_interval, device_write_t device_write, device_write_interval_t device_write_interval, int8_t index);
uint8_t partition_close(struct partition_struct* partition);
 
/**
* @}
*/
 
#endif
 
/Designs/GPSRL02A/SW/partition_config.h
0,0 → 1,35
 
/*
* Copyright (c) 2006-2007 by Roland Riegel <feedback@roland-riegel.de>
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of either the GNU General Public License version 2
* or the GNU Lesser General Public License version 2.1, both as
* published by the Free Software Foundation.
*/
 
#ifndef PARTITION_CONFIG_H
#define PARTITION_CONFIG_G
 
/**
* \addtogroup partition
*
* @{
*/
/**
* \file
* Partition configuration (license: GPLv2 or LGPLv2.1)
*/
 
/**
* \ingroup partition_config
* Maximum number of partition handles.
*/
#define PARTITION_COUNT 1
 
/**
* @}
*/
 
#endif
 
/Designs/GPSRL02A/SW/sd-reader.hex
0,0 → 1,909
:100000000C942A010C9445010C9445010C94450173
:100010000C9445010C9445010C9445010C94450148
:100020000C9445010C9445010C9445010C94450138
:100030000C9445010C9445010C9445010C94450128
:100040000C9445010C9445010C94851B0C944501BE
:100050000C9445010C9445010C9445010C94450108
:100060000C9445010C944501756E6B6E6F776E2094
:10007000636F6D6D616E643A20006572726F7220FD
:1000800073796E63696E67206469736B0A007379B4
:100090006E63006572726F72206372656174696E5F
:1000A00067206469726563746F72793A20006D6BC2
:1000B00064697220006572726F7220777269746968
:1000C0006E6720746F2066696C650A006572726FD6
:1000D00072207365656B696E67206F6E20006572B4
:1000E000726F72206F70656E696E6720007772693B
:1000F000746520006572726F722063726561746945
:100100006E672066696C653A2000746F75636820BD
:10011000006572726F722064656C6574696E672029
:1001200066696C653A2000726D20006572726F72AC
:100130002072656164696E67206469736B20696E03
:10014000666F0A006469736B006572726F72206F6C
:1001500070656E696E67200063617420006C7300C7
:100160006469726563746F7279206E6F7420666F54
:10017000756E643A2000636420006F70656E696E6E
:100180006720726F6F74206469726563746F72792F
:10019000206661696C65640A006F70656E696E67E0
:1001A0002066696C6573797374656D206661696C2E
:1001B00065640A006F70656E696E672070617274A5
:1001C0006974696F6E206661696C65640A004D4DE3
:1001D000432F534420696E697469616C697A617454
:1001E000696F6E206661696C65640A006672656598
:1001F0003A20202000666F726D61743A2000777299
:100200002E70722E3A2000636F70793A2020200001
:1002100073697A653A20202000646174653A202071
:10022000200073657269616C3A20307800726576DF
:100230003A202020200070726F643A202020006F46
:10024000656D3A20202020006D616E75663A202091
:100250003078000011241FBECFEFD4E0DEBFCDBF49
:1002600011E0A0E0B1E0EAEAF8E302C005900D92E7
:10027000A230B107D9F713E0A2E0B1E001C01D92AE
:10028000A33CB107E1F70C94C0120C940000FC01F0
:10029000892B11F0118210820895CF93DF93FC0116
:1002A000D9018081853E29F1882319F12D913C9156
:1002B0001197ED018A819B812817390799F44C83A6
:1002C0005D836E837F8383858F3011F080E205C06C
:1002D00080818295880F807E805EFD01808780E02E
:1002E00090E009C083858F3021F02F5F3F4F2D9321
:1002F0003C9381E090E0DF91CF910895EF92FF92DF
:100300000F931F93CF93DF93EC017A018B01B90117
:100310008881853E09F4CCC0882309F4C9C0F9015D
:1003200087A190A5A1A5B2A50097A105B10521F4CB
:10033000E7A2F0A601A712A76115710509F4B8C0DC
:10034000209709F4B5C09881992309F4B1C0AE0192
:10035000455F5F4F8B858F3099F5892F99278F7374
:1003600090702DE030E0AC01429FC001439F900DA2
:10037000529F900D11249C012D5030400197809781
:1003800008F093C0FB01E20FF31F898180838B810A
:1003900081838D8182838F818383898584838E8508
:1003A0008583888986838A8987838C8980878E89DB
:1003B0008187888D82878C8D83878E8D848775C099
:1003C000FB0180818823B9F580E090E0382FFE01A1
:1003D000E80FF91F2081203249F0FB01E80FF91FD7
:1003E00020833F5F01968830910581F7FB01808172
:1003F000853011F485EE80838885803211F4832F57
:1004000016C0FB01E30FF11D8EE28083832F8F5F07
:10041000DE01232F2C5FFD019085903241F0FB011E
:10042000E80FF11D90838F5F11968217A1F7FB01F2
:10043000E80FF11D1082FA018081FB0180A38B8DF2
:100440009927982F88272A8D3327822B932B92A3C5
:1004500081A32D8D332744275527542F432F322F27
:1004600022278E8D9927AA27BB27DC019927882769
:10047000282B392B4A2B5B2B8C8D9927AA27BB273E
:10048000282B392B4A2B5B2B8F8D9927AA27BB272B
:10049000B82FAA2799278827282B392B4A2B5B2B83
:1004A00023A334A345A356A303C081E090E002C078
:1004B00080E090E0DF91CF911F910F91FF90EF903E
:1004C00008950F931F93CF93DF93CDB7DEB7229795
:1004D0000FB6F894DEBF0FBECDBFDC01892BA9F1AA
:1004E0006230710590F10D911C911197660F771F85
:1004F00088279927FD012681378140855185620F24
:10050000731F841F951FD801ED91FC9122E030E00C
:10051000AE014F5F5F4F09958823B9F08A81992713
:10052000382F222789819927282B392B211531052E
:1005300071F0BFEF273F3B0741F0C9014096079795
:1005400020F0EFEF283F3E0710F020E030E0C90137
:1005500022960FB6F894DEBF0FBECDBFDF91CF91CC
:100560001F910F9108954F925F926F927F928F9299
:100570009F92AF92BF92CF92DF92EF92FF920F9332
:100580001F93CF93DF93CDB7DEB722970FB6F894C2
:10059000DEBF0FBECDBF5C01009709F44BC06230D7
:1005A000710508F447C0FC016680778080849184DF
:1005B0002E010894411C511C660F771F6B01EE241D
:1005C000FF24C60CD71CE81CF91CD501ED91FC9149
:1005D0000190F081E02D22E030E0A201C701B601D8
:1005E0000995882339F18A819927182F0027898155
:1005F0009927082B192B01151105F9F0C801409610
:100600000897C0F0BFEF083F1B0710F000E010E0B4
:1006100019821A82D501ED91FC910480F581E02DBB
:1006200022E030E0A201C701B6010995B801012B13
:1006300021F0C2CF80E090E002C081E090E02296FD
:100640000FB6F894DEBF0FBECDBFDF91CF911F91E3
:100650000F91FF90EF90DF90CF90BF90AF909F9061
:100660008F907F906F905F904F9008952F923F9260
:100670004F925F926F927F928F929F92AF92BF92B2
:10068000CF92DF92EF92FF920F931F93CF93DF935E
:10069000CDB7DEB72C970FB6F894DEBF0FBECDBF37
:1006A0003C012B011A01009709F495C0DC01ED9182
:1006B000FC91208131813C872B870480F581E02DDE
:1006C000FA87E987FC0186819781A085B1858D83B2
:1006D0009E83AF83B88782859385A485B585B695BB
:1006E000A795979587959C838B836A01AA24BB2441
:1006F0008824992444C0C401880F991F7C010027D5
:1007000011272D813E814F815885E20EF31E041F73
:10071000151F22E030E0AE014F5F5F4FC801B70107
:10072000AB85BC85FD010995882309F454C08981F6
:10073000882311F58A818823F9F4C214D30419F4AB
:100740008FEF898303C0A9828B2D99278A8322E0AA
:1007500030E0AE014F5F5F4FC801B701E985FA8510
:100760000995882391F00894C108D108C114D104D7
:1007700011F454010CC054010894811C911C2B816C
:100780003C818216930609F0B6CFCD2801F532E000
:100790004316510410F1A9828B2D99278A83440CAA
:1007A000551CB201882799272D813E814F8158859C
:1007B000620F731F841F951F22E030E0AE014F5F70
:1007C0005F4FA985BA85FD010995882331F4B501EC
:1007D000C3010E94B302AA24BB24C5012C960FB604
:1007E000F894DEBF0FBECDBFDF91CF911F910F9167
:1007F000FF90EF90DF90CF90BF90AF909F908F9041
:100800007F906F905F904F903F902F900895CF9280
:10081000DF92EF92FF920F931F93CF93DF93CDB7A9
:10082000DEB760970FB6F894DEBF0FBECDBF7C0178
:100830006230710518F480E090E027C0FC01C088A8
:10084000D1880081118162507040882799279601D4
:10085000442755270E94EC1B9B01AC01F7016689D8
:100860007789808D918D620F731F841F951FF8010A
:10087000A681B781EE24FF2405EF16E09601AE01B4
:100880004F5F5F4FFD010995992760960FB6F89469
:10089000DEBF0FBECDBFDF91CF911F910F91FF90B3
:1008A000EF90DF90CF900895FC01892B11F0118219
:1008B000108208952F923F924F925F926F927F9293
:1008C0008F929F92AF92BF92CF92DF92EF92FF9260
:1008D0000F931F93CF93DF93CDB7DEB72C970FB64F
:1008E000F894DEBF0FBECDBF3C0178876F835A8777
:1008F0004987009709F4FCC0672B09F4F9C0452B20
:1009000009F4F6C0FC01A5A4B6A4C7A4D0A825A1EB
:1009100036A147A150A569857A85CB01AA27BB27B7
:100920008A0D9B1DAC1DBD1D281739074A075B07A3
:1009300038F42A193B093A872987232B09F4DBC0AD
:10094000D3018D919C91FC01808991899A8389833F
:10095000F30101A8F2A9E02DFC87EB87BC018827F1
:1009600099276B837C838D839E83EF2BE1F5F301C5
:1009700003A0F4A1E02DFC87EB87EF2B39F4A11441
:10098000B104C104D10409F4B6C0B2C0A114B104C9
:10099000C104D10441F1860175012B803C804D805A
:1009A0005E805094409430942094211C311C411C52
:1009B000511C10C06B857C85D3018D919C910E9448
:1009C00061029C878B87892B09F492C0E20CF31C8F
:1009D000041D151D6B817C818D819E81E616F706B5
:1009E0000807190738F7C601B5012B813C814D81F5
:1009F0005E810E94321C2B0189849A84D3018D91DF
:100A00009C91A980BA80A418B5088A149B0408F4A4
:100A10005401FC01C080D180720100271127868912
:100A20009789A08DB18DE80EF91E0A1F1B1F2B851B
:100A30003C8522503040B901882799272E5F3F4FCF
:100A40003C872B872B813C814D815E810E94EC1B72
:100A5000E60EF71E081F191FD601CD90DC909501F8
:100A60004F815885C801B701F6010995882339F1EE
:100A70008A189B08C501AA27BB27F30125A536A51F
:100A800047A550A9280F391F4A1F5B1F25A736A766
:100A900047A750ABC501840D951D29813A81821766
:100AA0009307A0F06B857C85808191810E94610213
:100AB0009C878B87892B41F4F30112AA11AA4985DF
:100AC0005A854819590919C0442455242B853C8559
:100AD000F30132AB21AB8114910439F06F81788539
:100AE0006A0D7B1D78876F8389CF49855A8505C03C
:100AF0004FEF5FEF02C040E050E0CA012C960FB606
:100B0000F894DEBF0FBECDBFDF91CF911F910F9143
:100B1000FF90EF90DF90CF90BF90AF909F908F901D
:100B20007F906F905F904F903F902F900895FC01C1
:100B3000892B11F0118210820895FC01892B19F480
:100B400080E090E0089516A615A681E090E0089553
:100B50008F929F92AF92BF92CF92DF92EF92FF92CD
:100B60000F931F93CF93DF93CDB7DEB72C970FB6BC
:100B7000F894DEBF0FBECDBF6C015B01892B09F479
:100B800052C06115710509F44EC0FB01E7A0F0A445
:100B900001A512A5E114F1040105110509F443C0F2
:100BA0004E010894811C911CD601ED91FC9101909D
:100BB000F081E02D2CE030E0A401C801B7010995D7
:100BC000882389F185EE8983D601ED91FC9104801B
:100BD000F581E02D2CE030E0A401C801B7010995B2
:100BE000882309F18C858F3049F480E290E0A0E001
:100BF000B0E0E80EF91E0A1F1B1FD6CFF50161A158
:100C000072A16115710519F481E090E00AC0C60176
:100C10000E94B30220E030E0882311F021E030E0B0
:100C2000C901992702C080E090E02C960FB6F89495
:100C3000DEBF0FBECDBFDF91CF911F910F91FF900F
:100C4000EF90DF90CF90BF90AF909F908F900895DE
:100C500008950895FC01892B29F460E070E080E09C
:100C600090E008956285738584859585969587952E
:100C70007795679562507040804090402089318917
:100C8000442755270E94EC1B08952F923F924F92C4
:100C90005F926F927F928F929F92AF92BF92CF920C
:100CA000DF92EF92FF920F931F93CF93DF93CDB715
:100CB000DEB7A5970FB6F894DEBF0FBECDBF1C01FF
:100CC000892B09F456C01A82198280E28B83F101C4
:100CD000468057806084718482849384A484B58420
:100CE00037C0FEEF8F16FFEF9F06F0E0AF06F0E093
:100CF000BF0628F02EEF3FEF3DA32CA302C09DA21C
:100D00008CA2D101ED91FC910280F381E02D6E0166
:100D10000894C11CD11CB6EDEB2EB6E0FB2E0CA145
:100D20001DA120E230E0AE014C5F5F4FC301B20174
:100D300009958823F1F00CA11DA1C801AA27BB27A2
:100D4000480E591E6A1E7B1E881A990AAA0ABB0AF7
:100D500081149104A104B10421F6F1016089718923
:100D60008827992729813A81442755270E94EC1B1F
:100D700004C060E070E080E090E0A5960FB6F894C3
:100D8000DEBF0FBECDBFDF91CF911F910F91FF90BE
:100D9000EF90DF90CF90BF90AF909F908F907F901B
:100DA0006F905F904F903F902F900895AC01D901C4
:100DB000F9016281FC0112C081819927982F88274F
:100DC00020813327822B932B892B39F48D919C9191
:100DD0001197019611969C938E9332968E2F841BB9
:100DE000861750F381E090E0089520E1FC01119214
:100DF0002A95E9F780E190E008952F923F924F9273
:100E00005F926F927F928F929F92AF92BF92CF929A
:100E1000DF92EF92FF920F931F93CF93DF93CDB7A3
:100E2000DEB7E5970FB6F894DEBF0FBECDBF1C014D
:100E30007DA76CA7009709F4F7C0672B09F4F4C0ED
:100E4000FC0163A074A025A536A53FA72EA740806E
:100E500051806114710409F050C04114510409F427
:100E6000E0C0D201ED91FC91A280B3809E012F5F82
:100E70003F4F89E0F90111928A95E9F78EA59FA568
:100E80009C838B83F20162897389848995890689A1
:100E90001789061B170BFAE08F2E912C8C0E9D1EC6
:100EA0006901EDE4EE2EE1E0FE2E20E230E0A40147
:100EB000F5010995882309F4B4C04D805E806F80E8
:100EC0007884411451046104710409F4AAC08BE2CE
:100ED000ACA5BDA51D928A95E9F709851127CCA47B
:100EE000DDA47EE7E72E71E0F72E20E230E0A401DA
:100EF000C301B201F501099584C04114510409F4FC
:100F000090C0FC0182A184FF8CC0F2010088F189AD
:100F1000E02DFBA7EAA7CF01AA27BB2788AB99AB97
:100F2000AAABBBABDE011196BDABACABEEEFFFEFF6
:100F30006E0E7F1EB3018827992722E030E0620EF3
:100F4000731E28A939A94AA95BA90E94EC1BF201CA
:100F500086889788A08CB18C860E971EA81EB91E15
:100F600089E0ACA9BDA91D928A95E9F7EEA5FFA578
:100F7000FC83EB83D201ED91FC91AE01465F5F4FA4
:100F80000280F381E02D6E010894C11CD11C6DE438
:100F9000E62E61E0F62E0AA51BA520E230E0C50191
:100FA000B40109958823E9F18D809E80AF80B884D3
:100FB00081149104A104B10441F4B301C2010E945F
:100FC00061023C01892B69F1B1CF8BE2ECA5FDA553
:100FD00011928A95E9F7D201ED91FC9109851127CB
:100FE0000280F381E02DCCA4DDA43EE7E32E31E0C6
:100FF000F32E20E230E0AE01465F5F4FC501B40141
:101000000995882371F0ECA5FDA58081882349F01E
:10101000F10185A596A5019696A785A781E090E0A8
:1010200005C0F10116A615A680E090E0E5960FB682
:10103000F894DEBF0FBECDBFDF91CF911F910F910E
:10104000FF90EF90DF90CF90BF90AF909F908F90E8
:101050007F906F905F904F903F902F9008952F92C8
:101060003F924F925F926F927F928F929F92AF9238
:10107000BF92CF92DF92EF92FF920F931F93CF9385
:10108000DF93CDB7DEB7AC970FB6F894DEBF0FBED7
:10109000CDBF6C01009709F4A2C1FC018481958148
:1010A000892B09F49CC186819781892B09F497C10A
:1010B00002E011E01CA70BA78091020190910301AF
:1010C000892B09F08CC18AE1D8011D928A95E9F734
:1010D000D0920301C09202010185128523853485D7
:1010E00089E0000F111F221F331F8A95D1F70AA331
:1010F0001BA32CA33DA3C901B801655F7F4F8F4F90
:101100009F4F0190F081E02D29E130E0AE014F5F6B
:101110005F4F0995882309F45EC129813A80FB81DC
:10112000F8A74C813D815E812F8048845984AA8430
:101130008D859927F82FEE278C859927E82BF92B99
:10114000EE888F89688D798D309709F444C199278D
:10115000AA27BB276624782E892E9A2E862F9927B8
:10116000AA27BB27DC0199278827682A792A8A2A97
:101170009B2A8E2D9927AA27BB27682A792A8A2A93
:101180009B2A872F9927AA27BB27B82FAA279927F9
:101190008827682A792A8A2A9B2A61147104810483
:1011A000910479F48A2D9927782F6627852D992720
:1011B000682B792B6115710509F40DC13B01882459
:1011C0009924832D9927982F88279FA38EA3822F58
:1011D00099270EA11FA1082B192B1FA30EA3842D45
:1011E0009927982F88279AA789A7822D992769A5DB
:1011F0007AA5682B792B7AA769A7832F9927982F2F
:101200008827242F3327822B932B8C0122273327E7
:101210000A8F1B8F2C8F3D8FBF0188279927252F81
:101220003327442755270E94EC1B6E8F7F8F88A39E
:1012300099A3840173012A8D3B8D4C8D5D8DE21A3B
:10124000F30A040B150BE61AF70A080B190B8EA10B
:101250009FA1019729A53AA545E0220F331F4A9582
:10126000E1F7820F931F6EA17FA10E940B1C8827BC
:101270009927E61AF70A080B190B68A5262F3327BA
:1012800044275527C801B7010E94321C19012A01C1
:10129000DA01C901855F9F40A040B0408050904F67
:1012A000A040B04008F097C086E0F60180870BA50B
:1012B0001CA50E5F1F4F88E1D8011D928A95E9F7A2
:1012C000025010401CA70BA7EEA1FFA15F01CC2488
:1012D000DD24C401B301A60195010E94EC1B6093BB
:1012E0000401709305018093060190930701C601E4
:1012F000B5012A8D3B8D4C8D5D8D0E94EC1B7B01D1
:101300008C012AA13BA14CA15DA1E20EF31E041F9A
:10131000151FE0920801F092090100930A01109351
:101320000B01220C331C441C551C44E050E060E0CF
:1013300070E0240E351E461E571E20920C0130927E
:101340000D0140920E0150920F016EA17FA170938A
:1013500011016093100178A5872F9927AEA1BFA135
:10136000FC01AE9FC001AF9F900DBE9F900D112458
:1013700090931301809312016E8D7F8D88A199A1A6
:10138000A60195010E94EC1B6E0D7F1D801F911F11
:1013900060931401709315018093160190931701C7
:1013A00009A51AA5980144275527A5E0220F331F48
:1013B000441F551FAA95D1F7620F731F841F951FF5
:1013C000609318017093190180931A0190931B0187
:1013D0008BA59CA506C0109203011092020180E02B
:1013E00090E0AC960FB6F894DEBF0FBECDBFDF9194
:1013F000CF911F910F91FF90EF90DF90CF90BF9012
:10140000AF909F908F907F906F905F904F903F90A4
:101410002F9008952F923F924F925F926F927F92FA
:101420008F929F92AF92BF92CF92DF92EF92FF92F4
:101430000F931F93CF93DF93CDB7DEB723970FB6EC
:10144000F894DEBF0FBECDBF1C019B01892B09F4B0
:10145000C2C04115510509F4BEC0FA010190002037
:10146000E9F7E41BF50BCF010B966DE070E00E94ED
:101470000B1C6F5F6B83F90143A054A0411451040E
:1014800051F0662477244301AA24BB246501EE248D
:10149000FF2487010BC0F101A288B388C488D588D6
:1014A000E688F788008D118D350146011A82AE1449
:1014B000BF04C006D10609F05EC04114510409F40E
:1014C0008AC0A114B104C104D10479F1B201C101EF
:1014D0000E946102009741F541E050E0B201C10174
:1014E0000E9436038C01892B09F475C0025010400C
:1014F000B801882799270E5F1F4FF1012089318994
:10150000442755270E94EC1B3B014C01F1018689C1
:101510009789A08DB18D680E791E8A1E9B1EB80119
:10152000C1010E9407045AC02C01F101E088F18832
:10153000002711272EEF3FEF420E531EB2018827DE
:101540009927A2E0B0E04A0E5B1EA80197010E9415
:10155000EC1B5B016C01F10186899789A08DB18D2F
:10156000A80EB91ECA1EDB1EEA0CFB1C0C1D1D1D9D
:10157000350146011A82D101ED91FC910190F08173
:10158000E02D21E030E0AE014F5F5F4FC601B501B5
:101590000995882301F18981853E11F0882379F42A
:1015A000BA81BF5FBA83EB81BE17C0F480E290E0DE
:1015B000A0E0B0E0A80EB91ECA1EDB1E78CF90E2F4
:1015C000692E712C812C912C6A0C7B1C8C1C9D1C0F
:1015D000640153016BCF662477244301C401B30136
:1015E00023960FB6F894DEBF0FBECDBFDF91CF912B
:1015F0001F910F91FF90EF90DF90CF90BF90AF9031
:101600009F908F907F906F905F904F903F902F9022
:1016100008954F925F927F928F929F92AF92BF9266
:10162000CF92DF92EF92FF920F931F93CF93DF93AE
:10163000CDB7DEB7A0970FB6F894DEBF0FBECDBF13
:10164000FC018B01892B09F41AC16115710509F49C
:1016500016C10190F081E02D44805580FB01A7A0C8
:10166000B0A4C1A4D2A401900020E9F73197FE2EC6
:10167000F61A8F2D99270C966DE070E00E941F1CC2
:10168000762E4BE050E060E270E0CE0101960E94C1
:10169000A71B6EE270E0C8010E94E11BFC010097ED
:1016A000C1F0DC0111968181882399F0FD01019040
:1016B0000020E9F73197EA1BFB0BFE1AFA944E2F34
:1016C000E43008F043E05527BD01CE0109960E94A1
:1016D0009E1BCE010196F8E0FF1588F04F2D55278F
:1016E000B8010E949E1BD8018C918E3219F5F80129
:1016F00081818E3209F482818823D9F01BC0DC01FC
:10170000F80188E001900D928150E1F7F80181A184
:10171000982F92959F70803A10F4905D01C09F5968
:101720008F708A3010F4805D01C08F599F83888745
:1017300001C077248981853E11F485E089837CE0AE
:10174000872E912C8C0E9D1E85E1D4011D928A95C9
:10175000E9F7F80180A18C8781A192A18B8F892F55
:1017600099278C8F83A194A1A5A1B6A18D8F292F34
:101770003A2F4B2F55272E8F9D01442755272F8F0A
:101780008B2F9927AA27BB2788A3672D7727882720
:10179000992725E0660F771F881F991F2A95D1F793
:1017A0006A0D7B1D8C1D9D1D20E230E0AE014F5F58
:1017B0005F4FF2010995882309F461C0E980FE01B9
:1017C000329694018E2D8695E794EE24E794E82ACC
:1017D0008191E80EE217F307A9F7F72C4E01089460
:1017E000811C911C0D50104044C040E250E06FEF4E
:1017F00070E0C4010E94A71B8DE0F89ED001112467
:10180000A00FB11F91E0F401E90FF11D8C918083CD
:10181000892F8F5FF401E80FF11D10829E5F9B30CE
:1018200021F09A3119F49CE101C09EE08C9188234B
:1018300021F09F3110F41196E6CFF982F71419F4D4
:101840008F2D806489838FE08C87EE861D861B8EAA
:101850001C8E20E230E0A401C601B501F201099519
:1018600080E290E0A0E0B0E0A80EB91ECA1EDB1E28
:10187000FA94FF2009F0B9CF81E090E002C080E047
:1018800090E0A0960FB6F894DEBF0FBECDBFDF91FB
:10189000CF911F910F91FF90EF90DF90CF90BF906D
:1018A000AF909F908F907F905F904F9008952F9270
:1018B0003F924F925F926F927F928F929F92AF92E0
:1018C000BF92CF92DF92EF92FF920F931F93CF932D
:1018D000DF93CDB7DEB72E970FB6F894DEBF0FBEFD
:1018E000CDBF6C011A012B01009709F4E2C0FC0185
:1018F000E3A0F4A00190F081E02D80899189E114AA
:10190000F10431F4411551056105710509F4BDC0BB
:10191000420131019C01442755272F83388749878D
:101920005A8750954095309521953F4F4F4F5F4FC7
:101930002B873C874D875E8711C0B701D6018D91FB
:101940009C910E9461020097B9F02B853C854D85E2
:101950005E85620E731E841E951E7C018F819885A4
:10196000A985BA858B839C83AD83BE838615970535
:10197000A805B90510F3A0C05701C401B3012B811C
:101980003C814D815E810E94321C8901B90188270A
:1019900099272B813C814D815E810E94EC1B66154D
:1019A00077058805990510F40F5F1F4FA801B7014F
:1019B000D6018D919C910E943603009709F479C05D
:1019C000EF2821F4F60194A383A35C01F60125A27C
:1019D00036A247A250A6211431044104510411F447
:1019E00014A213A2B6016E5F7F4FD6018D919C9118
:1019F0000E94090B882309F45CC0211431044104BE
:101A0000510429F4B501F601808191813CC02B81FC
:101A10003C814D815E812615370548055905A8F1A1
:101A2000D6010D911C910115110579F1B2E0AB16AB
:101A3000B10458F1B501C8010E9461027C018FEF29
:101A400089838A83F80180809180AA0CBB1CB50130
:101A5000882799272681378140855185620F731F1A
:101A6000841F951FF401A481B58122E030E0AE010E
:101A70004F5F5F4FFD010995882339F0E114F104B0
:101A800021F0B701C8010E94B302F60185A596A511
:101A9000A7A5B0A9281639064A065B0638F4F60150
:101AA00025A636A647A650AA12AA11AA81E090E060
:101AB00009C080E090E006C05701E114F10409F488
:101AC0005CCF84CF2E960FB6F894DEBF0FBECDBF8D
:101AD000DF91CF911F910F91FF90EF90DF90CF900A
:101AE000BF90AF909F908F907F906F905F904F903E
:101AF0003F902F900895CF92DF92EF92FF920F9335
:101B00001F93CF93DF93EC016B01892B09F446C03F
:101B10006115710509F442C08DA59EA5AFA5B8A9B0
:101B2000413059F0413018F04230C1F50CC0FB0192
:101B3000E080F1800281138113C0FB01E080F1801D
:101B40000281138109C0FB01E080F18002811381D1
:101B50008DA19EA1AFA1B8A5E80EF91E0A1F1B1FFB
:101B60008DA19EA1AFA1B8A58E159F05A007B107B5
:101B700038F4B801A701CE010E94570C882371F0F8
:101B8000EDA6FEA60FA718AB1AAA19AAF601E082C5
:101B9000F1820283138381E090E002C080E090E054
:101BA000DF91CF911F910F91FF90EF90DF90CF9039
:101BB00008952F923F924F925F926F927F928F92F1
:101BC0009F92AF92BF92CF92DF92EF92FF920F93CC
:101BD0001F93CF93DF93CDB7DEB72A970FB6F89454
:101BE000DEBF0FBECDBF5C011B0158874F8300973E
:101BF00009F43BC1672B09F438C1452B09F435C101
:101C0000FC0165A476A487A490A885A196A1A7A1AC
:101C1000B0A586159705A805B90508F426C1208149
:101C20003181F9010088F189E02DFA83E983F5011A
:101C300001A8F2A9E02DFA87E98789819A81AA276C
:101C4000BB278B839C83AD83BE83EF2B09F059C0E8
:101C5000F50103A0F4A1E02DFA87E987EF2BA9F4A1
:101C6000611471048104910409F0FFC041E050E067
:101C700060E070E0C9010E9436039A878987F50108
:101C800094A383A3892B09F4F0C0F501E5A4F6A47D
:101C900007A510A9E114F1040105110549F531C0AA
:101CA0008B819C81AD81BE81E81AF90A0A0B1B0B5E
:101CB00069857A85D5018D919C910E94610200977A
:101CC00019F09A87898714C0E114F1040105110500
:101CD00009F0CBC041E050E069857A85F50180814B
:101CE00091810E943603009709F4BFC09A878987C3
:101CF0008B819C81AD81BE81E816F9060A071B071E
:101D000078F6C401B3012B813C814D815E810E9434
:101D1000321C2B016F807884D5018D919C91898034
:101D20009A80841895086814790408F44301FC012A
:101D3000C080D18072010027112786899789A08DE4
:101D4000B18DE80EF91E0A1F1B1F29853A85225006
:101D50003040B901882799272E5F3F4F3A8729875E
:101D60002B813C814D815E810E94EC1BE60EF71EAB
:101D7000081F191FF601A481B5819401A101C801B2
:101D8000B701FD010995882309F446C06818790850
:101D9000C401AA27BB27F50125A536A547A550A94B
:101DA000280F391F4A1F5B1F25A736A747A750AB2F
:101DB000C401840D951D29813A818217930708F18A
:101DC00069857A85808191810E946102009719F06E
:101DD0009A87898714C06114710459F041E050E07A
:101DE00069857A85D5018D919C910E943603009773
:101DF00021F4F50112AA11AA0FC09A8789874424F9
:101E0000552429853A85F50132AB21AB6114710463
:101E100019F0280C391C80CFF50185A596A5A7A53A
:101E2000B0A9E5A0F6A007A110A5E816F9060A07D3
:101E30001B07B0F485A396A3A7A3B0A7B5016E5F57
:101E40007F4F808191810E94090B882349F4F5011D
:101E500065A476A46E187F08E5A6F6A607A710ABC2
:101E60008F8198858619970902C08FEF9FEF2A9678
:101E70000FB6F894DEBF0FBECDBFDF91CF911F919B
:101E80000F91FF90EF90DF90CF90BF90AF909F9019
:101E90008F907F906F905F904F903F902F9008951C
:101EA000CF93DF939C01FB01892B21F1672B11F16B
:101EB00080A184FF1FC080914F0190915001892B18
:101EC00019F4AFE4B1E008C080917E0190917F01E8
:101ED000892B81F4AEE7B1E0ED0122968BE201900F
:101EE00009928150E1F711963C932E93FD0116A6BD
:101EF00015A602C0A0E0B0E0CD01DF91CF9108951A
:101F0000CF93DF939C01FB01892B49F1611571058A
:101F100031F180A184FD23C080911C0190911D01AD
:101F2000892BE9F4CEE1D1E0DB018BE20D9009923F
:101F30008150E1F730931D0120931C01109249015B
:101F400010924A0110924B0110924C0181A192A172
:101F500090934E0180934D018CE191E002C080E0AE
:101F600090E0DF91CF910895CF92DF92EF92FF92B0
:101F70000F931F93CF93DF937C018B01EA01892B91
:101F800009F443C06115710509F43FC0FB0180816C
:101F90008823D9F1452BC9F1BE01C7010E94FD0676
:101FA000882351F0BE01C8010E94BA1B892BA1F7FA
:101FB000F70116A615A629C0F701C080D1808BE2D3
:101FC000FE0111928A95E9F74FE150E0B801CE0188
:101FD0000E94D21BAE01B701C6010E940A0A6FA37C
:101FE00078A789A79AA7611571058105910569F000
:101FF000BE01C6010E94090B90E0882309F491E01C
:1020000081E09827892F992702C080E090E0DF9136
:10201000CF911F910F91FF90EF90DF90CF90089597
:102020006F927F928F929F92AF92BF92CF92DF92E8
:10203000EF92FF920F931F93CF93DF933C018B019D
:102040007A01892B09F461C06115710509F45DC03D
:10205000FB018081882309F458C0452B09F455C041
:102060008F3211F40F5F1F4F8BE2F70111928A95A7
:10207000E9F780E1F70180A3F8018081882309F462
:1020800047C0B701C3010E94500F5C01892BE9F1E1
:102090006FE270E0C8010E94AE1B6C01892B41F415
:1020A000F80101900020E9F76F010894C108D108F8
:1020B0008C2D801B882E992421C0E70109900020D7
:1020C000E9F72197CE19DF09C815D905B9F4AE0192
:1020D000B701C8010E94C41B892B81F4F50111824C
:1020E0001082C00FD11F8881882391F0F70180A151
:1020F00084FF0BC086010F5F1F4FC3CFB701C5011F
:102100000E94FD068823C9F606C080E090E007C063
:1021100081E090E004C0F50111821082B2CFDF911E
:10212000CF911F910F91FF90EF90DF90CF90BF90D4
:10213000AF909F908F907F906F9008959F92AF92F5
:10214000BF92CF92DF92EF92FF920F931F93CF93A4
:10215000DF936C015B01EA01892B09F495C06115DD
:10216000710509F491C0FB018081882309F48CC0BA
:10217000452B09F489C0BE01C6010E94FD068823D3
:1021800051F0BE01C5010E94BA1B892BA1F7F601CF
:1021900016A615A679C0F601E080F18041E050E076
:1021A00060E070E0C7010E9436038C01009709F4DB
:1021B0006BC0BC01C7010E9407048BE2FE011192B3
:1021C0008A95E9F780E188A302501040B80188277A
:1021D00099270E5F1F4FF701208931894427552722
:1021E0000E94EC1BF70126893789408D518D260FFF
:1021F000371F481F591F2FA338A749A75AA7BEE268
:102200009B2E98821AA309A3BE01C7010E94090B45
:102210008823B1F18FA198A5A9A5BAA58096A11D83
:10222000B11D8FA398A7A9A7BAA79982F60183A188
:1022300094A19AA389A3BE01C7010E94090B882318
:10224000F9F04FE150E0B501CE010E94D21B1AA374
:1022500009A3AE01B601C7010E940A0A6FA378A7BD
:1022600089A79AA7611571058105910549F0BE01FD
:10227000C7010E94090B882319F081E090E006C095
:10228000B801C7010E94B30280E090E0DF91CF91D6
:102290001F910F91FF90EF90DF90CF90BF90AF9084
:1022A0009F900895EF92FF920F931F93FC01DB0123
:1022B000B80187ED97E09183808381E08C93FA01E8
:1022C0008083F9011082FB011082F70110821F91B7
:1022D0000F91FF90EF9008950F931F93CF93DF938B
:1022E000CDB7DEB769970FB6F894DEBF0FBECDBF8E
:1022F0008C01892B09F49CC0CE0101960E945419CF
:10230000882309F495C088E492E00E94611B8981CA
:102310000E94771A8AE00E94681A8FE392E00E9476
:10232000611BCE0102960E94541B8AE00E94681A2B
:1023300086E392E00E94611BCE0105960E94541B29
:102340008AE00E94681A8DE292E00E94611B8B85F0
:102350000E94771A8AE00E94681A82E292E00E9444
:10236000611B6C857D858E859F850E94A01A8AE001
:102370000E94681A89E192E00E94611B898999276D
:102380000E94B31A8FE20E94681A888999270E94D6
:10239000B31A8AE00E94681A80E192E00E94611BF1
:1023A0006A897B898C899D890E94F31A8AE00E9440
:1023B000681A87E092E00E94611B8E8999270E942B
:1023C000B31A8AE00E94681A8EEF91E00E94611BA6
:1023D000888D99270E94B31A8FE20E94681A8F890C
:1023E00099270E94B31A8AE00E94681A85EF91E04B
:1023F0000E94611B898D99270E94B31A8AE00E946E
:10240000681A8CEE91E00E94611BC8010E9445068B
:102410000E94F31A8FE20E94681AC8010E942A06DD
:102420000E94F31A8AE00E94681A81E090E002C0DC
:1024300080E090E069960FB6F894DEBF0FBECDBF86
:10244000DF91CF911F910F910895EF92FF920F931B
:102450001F93CF93DF938B017A01E9010CC0B70181
:10246000CE010E94BA1B892B31F4C8010E949D0540
:1024700081E090E008C0BE01C8010E94FD068823EB
:1024800071F780E090E0DF91CF911F910F91FF9065
:10249000EF900895EF92FF920F931F93CF93DF93E6
:1024A000CDB7DEB7AB970FB6F894DEBF0FBECDBF8A
:1024B0008C017E010894E11CF11C97010E942512F9
:1024C000882319F480E090E004C0B701C8010E949D
:1024D000800FAB960FB6F894DEBF0FBECDBFDF9175
:1024E000CF911F910F91FF90EF900895AF92BF92FF
:1024F000DF92EF92FF920F931F93CF93DF937C01B4
:10250000062F1127A80160E070E00E94A71BDD24C0
:1025100058010894A108B10823C00E946F1B182F0E
:10252000883011F08F3789F4DD20D1F0DA94F7018B
:10253000ED0DF11D108288E00E94681A80E20E9471
:10254000681A88E00E94681A0BC00E94681AF70196
:10255000EC0FFD1F1A3011F4108207C01083D394C2
:10256000CD2DDD27CA15DB05C4F2CE01DF91CF9159
:102570001F910F91FF90EF90DF90BF90AF90089563
:10258000C3E8D4E0DEBFCDBF83B7817F83BF0E94A5
:102590005C1A0E94DF18882319F48EEC91E026C2A1
:1025A00000E02FE038E14DE057E169E678E18CE3A7
:1025B00096E10E940615009781F40FEF2FE038E1B5
:1025C0004DE057E169E678E18CE396E10E9406155B
:1025D000009719F484EB91E009C20E942F084C0186
:1025E000009719F489E991E001C28E010B5D1F4F3C
:1025F000A80160E071E00E941010B801C4010E94BF
:10260000500F3C01892B19F48AE791E0EFC1C40116
:102610000E946C112DE0222E312C2C0E3D1ECE017D
:10262000805B9F4FED969FAF8EAFED978EE30E943C
:10263000681A80E20E94681A68E1C1010E9476125D
:102640008823A1F343E050E066E771E0C1010E94F6
:10265000901B892B01F58889882341F39E01205B1B
:102660003F4FAE01405F5F4FB301C4010E9425128E
:10267000882371F0BE01605B7F4FC4010E94500F40
:102680008C01892B29F0C3010E9497053801CECF18
:1026900080E691E0C9C06DE571E0C1010E94861B32
:1026A000892BE9F533C0ED96AEADBFADED970D903A
:1026B0000020E9F78D0101501040ED96EEADFFAD21
:1026C000ED970E1B1F0BCE01805B9F4F0E94541B8A
:1026D000E1968FADE19784FF02C08FE201C080E2F6
:1026E00094E2F92EF01A01C080E20E94681AFA946E
:1026F000FFEFFF16C9F7E7966CAD7DAD8EAD9FADD0
:10270000E7970E94F31A8AE00E94681ABE01605B94
:102710007F4FC3010E94FD06882329F687CF44E03E
:1027200050E068E571E0C1010E94901B892B09F01F
:1027300047C08989882309F479CFAE014F5E5F4F86
:10274000B301C4010E944A125C01892B49F0CC24D8
:10275000DD24760185E0482E512C4C0E5D1E25C0EF
:1027600089E491E00E94611BCE01419639C1C70105
:10277000B6010E94A01A8AE30E94681A820180E2D0
:102780000E94681AD8018D918D010E94771A021556
:102790001305A9F78AE00E94681A88E090E0A0E09B
:1027A000B0E0C80ED91EEA1EFB1E48E050E0B201A0
:1027B000C5010E945A0418161906CCF2C501BCC006
:1027C00064E471E0C1010E94861B892B49F4C401B5
:1027D0000E946C11882309F029CF8BE291E0F8C0A8
:1027E00043E050E067E271E0C1010E94901B892B39
:1027F00001F58889882309F419CF9E01205B3F4F9A
:10280000AE01405F5F4FB301C4010E9425128823CF
:1028100049F0BE01605B7F4FC4010E94A805882378
:1028200009F004CF81E191E00E94611BCE01409646
:10283000D7C046E050E06AE071E0C1010E94901B01
:10284000892B99F48B89882309F4F0CEAE01405B83
:102850005F4FBE016D5E7F4FC3010E94B40F88239E
:1028600009F0E4CE84EF90E0A0C046E050E06DEEC9
:1028700070E0C1010E94901B892B09F07BC08B89FD
:10288000882309F4D3CE8E010D5E1F4F02C00F5F67
:102890001F4FD8018C91803219F08823C1F7C6CE22
:1028A000F8011082AE014D5E5F4FB301C4010E947A
:1028B0004A127C01892B19F48EED90E076C020E05D
:1028C00030E040E050E017C0CA01B9012AE030E032
:1028D00040E050E00E94EC1B9B01AC018D2D99273C
:1028E00087FD9095C097AA2797FDA095BA2F280F2E
:1028F000391F4A1F5B1FF801D1800F5F1F4F8D2DBD
:1029000080538A3008F329833A834B835C8340E009
:10291000BE016F5F7F4FC7010E947B0D882379F452
:102920008CEC90E00E94611BCE0143960E94541BE8
:102930008AE00E94681AC7010E94540477CE8CE393
:102940000E94681A80E20E94681A68E1C1010E9430
:102950007612882381F3082F1127A801B101C7013E
:102960000E94D90D8017910751F385EB90E00E94EA
:10297000611BE1CF46E050E06EEA70E0C1010E94C9
:10298000901B892BB9F48B89882309F44FCEAE01B3
:10299000405B5F4FBE016D5E7F4FC3010E949E1082
:1029A000882309F043CE83E990E00E94611BCE01A9
:1029B000439616C06EE870E0C1010E94861B892B09
:1029C00051F40E94F117882309F030CE8AE790E095
:1029D0000E94611B2BCE88E690E00E94611BC10122
:1029E0000E94541B8AE00E94681A20CE0E94611B3C
:1029F00081E090E00C94541CFC01892B19F480E0D8
:102A000090E00895108681E090E008958F929F9263
:102A1000AF92BF92CF92DF92EF92FF920F93CF933C
:102A2000DF93CDB7DEB760970FB6F894DEBF0FBE69
:102A3000CDBF7C016B015A014901892B09F4AAC061
:102A4000672B09F4A7C004300CF0A4C007FD1DC01B
:102A5000602F772767FD7095E4E0660F771FEA9592
:102A6000E1F762547E4F882777FD8095982F20E10B
:102A700030E0AE014F5F5F4FF7010995882309F4FD
:102A800089C08D81882309F485C08091B501882390
:102A900009F080C0EDEAF1E081E1DF011D928A9545
:102AA000E9F7F092AE01E092AD01D092B001C09290
:102AB000AF01B092B201A092B1019092B4018092A4
:102AC000B30107FD62C08D818093B5012A8533274C
:102AD00044275527542F432F322F22278B859927A0
:102AE000AA27BB27DC0199278827282B392B4A2BBB
:102AF0005B2B89859927AA27BB27282B392B4A2BA3
:102B00005B2B8C859927AA27BB27B82FAA27992743
:102B10008827282B392B4A2B5B2B2093B601309327
:102B2000B7014093B8015093B9012E85332744274C
:102B30005527542F432F322F22278F859927AA27D5
:102B4000BB27DC0199278827282B392B4A2B5B2BA5
:102B50008D859927AA27BB27282B392B4A2B5B2B3E
:102B600088899927AA27BB27B82FAA2799278827BA
:102B7000282B392B4A2B5B2B2093BA013093BB01B6
:102B80004093BC015093BD0103C08FEF8093B5010A
:102B9000CF0102C080E090E060960FB6F894DEBFEF
:102BA0000FBECDBFDF91CF910F91FF90EF90DF90DF
:102BB000CF90BF90AF909F908F90089586B18295EF
:102BC0008F7099278095909581709070089586B147
:102BD00082958695877099278095909581709070E1
:102BE00008958EBD0DB407FEFDCF8DB58F778DBDD9
:102BF00008958FEF8EBD0DB407FEFDCF8DB58F7795
:102C00008DBD8EB599270895DF92EF92FF920F93B5
:102C10001F93D82E7A018B010E94F9158D2D8064A7
:102C20000E94F115812F9927AA27BB270E94F11531
:102C3000C801AA27BB270E94F115BB27A12F902FFF
:102C40008F2D0E94F1158E2D0E94F115DD2011F4BB
:102C500085E901C08FEF0E94F11510E00E94F9157F
:102C60008F3F19F41F5F1A30C9F799271F910F91F1
:102C7000FF90EF90DF9008952F923F924F925F92D6
:102C80006F927F928F929F92AF92BF92CF92DF927C
:102C9000EF92FF920F931F93CF93DF93CDB7DEB7E1
:102CA00024970FB6F894DEBF0FBECDBF2B013C01B9
:102CB0005A8349833C832B8390C0812C5EEF952EF1
:102CC0005FEFA52E5FEFB52E84209520A620B720BC
:102CD0004FEFC42E41E0D42EC420D520212C32E069
:102CE000332E2C183D088B819C818215930508F4A6
:102CF0001C01E090BE03F090BF030091C00310914F
:102D0000C1038E149F04A006B10609F449C0809146
:102D1000C203882351F420E032E04EEB51E0C801B9
:102D2000B7010E940D17882349F02A98B501A40124
:102D300081E10E940416882321F02A9A80E090E025
:102D400053C00E94F9158E3FE1F70EEB11E00E948F
:102D5000F915F80181938F01F3E00E3B1F07B9F7D6
:102D60008092BE039092BF03A092C003B092C103B1
:102D70008EEB91E0C80ED91EA101B60189819A811E
:102D80000E949E1BE981FA81E20DF31DFA83E9831B
:102D90000E94F9150E94F9152A9A0E94F91510C08F
:102DA0008EEB91E0C80ED91EA101B60189819A81EE
:102DB0000E949E1BE981FA81E20DF31DFA83E983EB
:102DC0008B819C81821993099C838B83C101AA27E3
:102DD000BB27480E591E6A1E7B1EEB81FC81EF2B20
:102DE00009F06BCF81E090E024960FB6F894DEBF37
:102DF0000FBECDBFDF91CF911F910F91FF90EF904C
:102E0000DF90CF90BF90AF909F908F907F906F900A
:102E10005F904F903F902F9008952F923F924F9246
:102E20005F926F927F928F929F92AF92BF92CF925A
:102E3000DF92EF92FF920F931F93CF93DF93CDB763
:102E4000DEB724970FB6F894DEBF0FBECDBF2B01BF
:102E50003C015A834983190186B182958695877012
:102E600080FF9CC0A0C0A12C7EEFB72E7FEFC72EA5
:102E70007FEFD72EA420B520C620D720C2019170A5
:102E80009C838B83812C62E0962E881A990A2814E1
:102E9000390408F44101E090BE03F090BF030091B3
:102EA000C0031091C103AE14BF04C006D10659F18E
:102EB0008091C203882359F420E032E04EEB51E0C8
:102EC000C801B7010E940D17882309F46CC0EB817B
:102ED000FC81EF2B29F4F0E08F16F2E09F0658F406
:102EE00020E032E04EEB51E0C601B5010E943C16F5
:102EF000882309F458C0A092BE03B092BF03C092C9
:102F0000C003D092C10389819A81E1E08E3B9E0784
:102F100071F0A401BC018B819C8182549E4F0E9460
:102F20009E1B1092C2032814390409F43FC02A984A
:102F3000B601A50188E10E940416882311F02A9A9F
:102F400032C08EEF0E94F1150EEB11E0F801819175
:102F50008F010E94F115F3E00E3B1F07B9F78FEFC9
:102F60000E94F1158FEF0E94F1150E94F9158F3F15
:102F7000E1F789819A81880D991D9A8389830E943E
:102F8000F9152A9A28183908C401AA27BB27480E20
:102F9000591E6A1E7B1E81E08093C20321143104F6
:102FA00009F061CF03C080E090E002C081E090E0D2
:102FB00024960FB6F894DEBF0FBECDBFDF91CF9140
:102FC0001F910F91FF90EF90DF90CF90BF90AF9047
:102FD0009F908F907F906F905F904F903F902F9039
:102FE00008958091C203882319F081E090E008954C
:102FF0006091BE037091BF038091C0039091C103A3
:1030000020E032E04EEB51E00E940D1790E0882363
:1030100009F491E081E09827892F992708954F922C
:103020005F926F927F928F929F92AF92BF92CF9258
:10303000DF92EF92FF920F931F93CF93DF935B0189
:103040006C014A01E90138012701452B61F1012B8F
:1030500051F1FF24232B11F5FF24F3941FC092019B
:10306000B601A501C401F30109958C010097F1F0A7
:10307000FF2019F4C817D907B0F09801A401C601C0
:10308000B5010E940D17882371F0C801AA27BB273C
:10309000A80EB91ECA1EDB1EC01BD10BFF20F9F6FD
:1030A0002097E9F603C080E090E002C081E090E064
:1030B000DF91CF911F910F91FF90EF90DF90CF9014
:1030C000BF90AF909F908F907F906F905F904F9048
:1030D00008952F923F924F925F926F927F928F92BC
:1030E0009F92AF92BF92CF92DF92EF92FF920F9397
:1030F0001F93CF93DF93CDB7DEB724970FB6F89425
:10310000DEBF0FBECDBF4B015C013A013C832B8378
:103110002701DA82C982452BA1F12115310589F1F8
:103120000217130770F1EF2861F11901309421940F
:1031300031083394021B130B6901EE24FF242B8109
:103140003C81A301C501B4010E943C168823C9F04B
:1031500029813A81B501A401C301F20109958823AF
:1031600099F0020D131D8B819C81800F911F2B8183
:103170003C818217930740F08C0C9D1CAE1CBF1C39
:10318000DECF80E090E002C081E090E024960FB6B0
:10319000F894DEBF0FBECDBFDF91CF911F910F918D
:1031A000FF90EF90DF90CF90BF90AF909F908F9067
:1031B0007F906F905F904F903F902F9008951F9356
:1031C000CF93DF933C983D98239A259A229A24988E
:1031D0002A9A83E58CBD8DB58E7F8DBD86B1829593
:1031E0008F7080FD17C010E00E94F9151F5F1A3024
:1031F000D9F72A98C0E0D0E040E050E060E070E00D
:1032000080E00E940416813051F081E0CF3FD80762
:1032100021F42A9A80E090E043C02196EDCFC0E0EF
:10322000D0E040E050E060E070E081E00E940416F1
:1032300080FF06C08FE7CF3FD80759F32196F1CF23
:1032400040E052E060E070E080E10E9404168823D4
:1032500001F72A9A8CB58C7F8CBD8DB581608DBDB0
:103260008FEF9FEFAFEFBFEF8093BE039093BF034D
:10327000A093C003B093C10311E01093C20320E0F8
:1032800032E04EEB51E060E070E080E090E00E94C0
:103290003C1690E0882309F491E09127892F992723
:1032A000DF91CF911F910895CF92DF92EF92FF921D
:1032B0000F931F93CF93DF93EC01892B09F4F1C097
:1032C00086B182958F7080FDECC089E1FE0111927C
:1032D0008A95E9F72A9840E050E060E070E08AE0E3
:1032E0000E940416882309F061C00E94F9158E3FE0
:1032F000E1F78E0120E6E22EF12C0E94F915282F2D
:10330000802F8C1B883028F4833090F4882359F068
:103310000CC08D3018F4893080F40DC08D3029F147
:103320008E3079F526C028832CC0F801208329C06F
:10333000F801218326C02A8724C033274427552734
:103340000E2C04C0220F331F441F551F0A94D2F7BE
:103350008B859C85AD85BE85822B932BA42BB52BAD
:103360008B879C87AD87BE870CC02295207F2F87D7
:1033700008C0922F92959F708F85892B8F872F7011
:10338000288B0F5F1F4F88EF9FEFE80EF91E90ED1F
:10339000E9169FEFF90609F0B0CF40E050E060E099
:1033A00070E089E00E940416882311F02A9A79C0FF
:1033B0000E94F9158E3FE1F7CC24DD24EE24FF2492
:1033C00000E010E00E94F915083021F1093040F4C6
:1033D000063091F00730B0F4053009F058C008C04D
:1033E0000A3041F10A3008F10E3009F050C03AC0FD
:1033F0009FE0C92EC8224BC0992783709070F82E89
:10340000EE2445C09927E82AF92AEE0CFF1CEE0CA1
:10341000FF1C3DC082958695869583709927E82A82
:10342000F92A0894E11CF11C32C0F3E0DF2ED82207
:10343000DD0C2DC0881F8827881FD82A97014427B4
:1034400055278C2D992702968D0D911D04C0220FB2
:10345000331F441F551F8A95D2F7298B3A8B4B8B0C
:103460005C8B15C0282F332726FF02C081E08D8B8F
:1034700025FF02C081E08E8B24FF02C081E08F8B8C
:103480002C7030703595279535952795288F0F5FCF
:103490001F4F0231110509F095CF2A9A81E090E083
:1034A00002C080E090E0DF91CF911F910F91FF90DB
:1034B000EF90DF90CF9008951092C50087E680933B
:1034C000C40086E08093C20088E98093C10008951B
:1034D0001F93182F8A3019F48DE00E94681A80918A
:1034E000C00085FFFCCF1093C6001F9108951F9365
:1034F000182F82958F708A3010F4805D01C0895A30
:103500000E94681A812F99278F709070212F2F7039
:103510000A971CF4822F805D02C0822F895A0E9474
:10352000681A1F9108950F931F938C01812F99277B
:103530000E94771A802F0E94771A1F910F91089589
:10354000EF92FF920F931F937B018C01C801AA2772
:10355000BB270E94931AC7010E94931A1F910F91D3
:10356000FF90EF900895DF92EF92FF920F931F93D9
:10357000CF93DF93EC0100E117E220E0EE24FF247B
:10358000CE01B8010E940B1CD62E662329F42223FB
:1035900019F40130110529F48D2D805D0E94681AFF
:1035A00021E0C8016AE070E00E940B1C0894E11C55
:1035B000F11C45E0E416F10471F08D2D9927AC0162
:1035C000409FC001419F900D509F900D1124C81B3A
:1035D000D90B8B01D5CFDF91CF911F910F91FF9028
:1035E000EF90DF9008954F925F926F927F928F924B
:1035F0009F92AF92BF92CF92DF92EF92FF920F9382
:103600001F93CF93DF937B018C01A12C2AECB22E68
:103610002AE9C22E2BE3D22E4424C0E0D0E0C80118
:10362000B701A60195010E94321C522E222341F4BB
:10363000442031F481E0A816B104C104D10431F46E
:10364000852D805D0E94681A44244394C601B5010B
:103650002AE030E040E050E00E94321C39014A018B
:103660002196CA30D10579F0652D772788279927CB
:10367000A60195010E94EC1BE61AF70A080B190B2C
:1036800064015301CCCFDF91CF911F910F91FF9037
:10369000EF90DF90CF90BF90AF909F908F907F90F2
:1036A0006F905F904F900895CF93DF93EC0103C02C
:1036B00021960E94681A88818823D1F7DF91CF91E3
:1036C0000895CF93DF93EC01FE0121968491882326
:1036D00019F00E94681AF8CFDF91CF9108959FB733
:1036E000789407C083B7816083BF889583B78E7F46
:1036F00083BF8091C00087FFF5CF9FBF8091C60038
:103700008D3009F48AE0992708951895FB01DC01B2
:103710008D910590801911F40020D1F7990B08952F
:10372000FB01DC014150504030F08D910590801933
:1037300019F40020B9F7881B990B0895FB01DC01EF
:1037400002C001900D9241505040D8F70895DC011D
:1037500001C06D9341505040E0F70895FC01019085
:10376000061629F00020D9F7882799270895319760
:10377000CF010895FB01DC018D910190801911F4B6
:103780000020D1F7990B0895FB01DC014150504016
:1037900030F08D910190801919F40020B9F7881B41
:1037A000990B0895FB01DC014150504048F0019015
:1037B0000D920020C9F701C01D9241505040E0F722
:1037C0000895FC0181E090E00190061609F4CF0114
:1037D0000020D1F701970895629FD001739FF001F7
:1037E000829FE00DF11D649FE00DF11D929FF00D91
:1037F000839FF00D749FF00D659FF00D9927729FC8
:10380000B00DE11DF91F639FB00DE11DF91FBD0152
:10381000CF0111240895AA1BBB1B51E107C0AA1FA9
:10382000BB1FA617B70710F0A61BB70B881F991F61
:103830005A95A9F780959095BC01CD01089597FB05
:10384000092E07260AD077FD04D0E5DF06D0002038
:103850001AF4709561957F4F0895F6F790958195CC
:103860009F4F0895A1E21A2EAA1BBB1BFD010DC09C
:10387000AA1FBB1FEE1FFF1FA217B307E407F50720
:1038800020F0A21BB30BE40BF50B661F771F881FFC
:10389000991F1A9469F760957095809590959B0192
:0A38A000AC01BD01CF010895FFCF78
:0238AA002F00ED
:00000001FF
/Designs/GPSRL02A/SW/sd-reader.map
0,0 → 1,523
Archive member included because of file (symbol)
 
/usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_mulsi3.o)
fat16.o (__mulsi3)
/usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_udivmodhi4.o)
fat16.o (__udivmodhi4)
/usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_divmodhi4.o)
fat16.o (__divmodhi4)
/usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_udivmodsi4.o)
fat16.o (__udivmodsi4)
/usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_exit.o)
main.o (exit)
/usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_copy_data.o)
fat16.o (__do_copy_data)
/usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_clear_bss.o)
fat16.o (__do_clear_bss)
/usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strcmp_P.o)
main.o (strcmp_P)
/usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strncmp_P.o)
main.o (strncmp_P)
/usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(memcpy.o)
fat16.o (memcpy)
/usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(memset.o)
fat16.o (memset)
/usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strchr.o)
fat16.o (strchr)
/usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strcmp.o)
fat16.o (strcmp)
/usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strncmp.o)
fat16.o (strncmp)
/usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strncpy.o)
fat16.o (strncpy)
/usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strrchr.o)
fat16.o (strrchr)
 
Discarded input sections
 
.stabstr 0x00000000 0x0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/crtm168.o
.stabstr 0x00000000 0x0 fat16.o
.stabstr 0x00000000 0x0 main.o
.stabstr 0x00000000 0x0 partition.o
.stabstr 0x00000000 0x0 sd_raw.o
.stabstr 0x00000000 0x0 uart.o
.stabstr 0x00000000 0x0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strcmp_P.o)
.stabstr 0x00000000 0x0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strncmp_P.o)
.stabstr 0x00000000 0x0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(memcpy.o)
.stabstr 0x00000000 0x0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(memset.o)
.stabstr 0x00000000 0x0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strchr.o)
.stabstr 0x00000000 0x0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strcmp.o)
.stabstr 0x00000000 0x0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strncmp.o)
.stabstr 0x00000000 0x0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strncpy.o)
.stabstr 0x00000000 0x0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strrchr.o)
 
Memory Configuration
 
Name Origin Length Attributes
text 0x00000000 0x00020000 xr
data 0x00800060 0x0000ffa0 rw !x
eeprom 0x00810000 0x00010000 rw !x
*default* 0x00000000 0xffffffff
 
Linker script and memory map
 
Address of section .data set to 0x800100
LOAD /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/crtm168.o
LOAD fat16.o
LOAD main.o
LOAD partition.o
LOAD sd_raw.o
LOAD uart.o
LOAD /usr/lib/gcc/avr/4.2.1/avr5/libgcc.a
LOAD /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a
LOAD /usr/lib/gcc/avr/4.2.1/avr5/libgcc.a
 
.hash
*(.hash)
 
.dynsym
*(.dynsym)
 
.dynstr
*(.dynstr)
 
.gnu.version
*(.gnu.version)
 
.gnu.version_d
*(.gnu.version_d)
 
.gnu.version_r
*(.gnu.version_r)
 
.rel.init
*(.rel.init)
 
.rela.init
*(.rela.init)
 
.rel.text
*(.rel.text)
*(.rel.text.*)
*(.rel.gnu.linkonce.t*)
 
.rela.text
*(.rela.text)
*(.rela.text.*)
*(.rela.gnu.linkonce.t*)
 
.rel.fini
*(.rel.fini)
 
.rela.fini
*(.rela.fini)
 
.rel.rodata
*(.rel.rodata)
*(.rel.rodata.*)
*(.rel.gnu.linkonce.r*)
 
.rela.rodata
*(.rela.rodata)
*(.rela.rodata.*)
*(.rela.gnu.linkonce.r*)
 
.rel.data
*(.rel.data)
*(.rel.data.*)
*(.rel.gnu.linkonce.d*)
 
.rela.data
*(.rela.data)
*(.rela.data.*)
*(.rela.gnu.linkonce.d*)
 
.rel.ctors
*(.rel.ctors)
 
.rela.ctors
*(.rela.ctors)
 
.rel.dtors
*(.rel.dtors)
 
.rela.dtors
*(.rela.dtors)
 
.rel.got
*(.rel.got)
 
.rela.got
*(.rela.got)
 
.rel.bss
*(.rel.bss)
 
.rela.bss
*(.rela.bss)
 
.rel.plt
*(.rel.plt)
 
.rela.plt
*(.rela.plt)
 
.text 0x00000000 0x38aa
*(.vectors)
.vectors 0x00000000 0x68 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/crtm168.o
0x00000000 __vectors
0x00000000 __vector_default
*(.vectors)
0x00000068 __ctors_start = .
*(.ctors)
0x00000068 __ctors_end = .
0x00000068 __dtors_start = .
*(.dtors)
0x00000068 __dtors_end = .
SORT(*)(.ctors)
SORT(*)(.dtors)
*(.progmem.gcc*)
*(.progmem*)
.progmem.data 0x00000068 0x1eb main.o
0x00000254 . = ALIGN (0x2)
*fill* 0x00000253 0x1 00
*(.jumptables)
*(.jumptables*)
*(.lowtext)
*(.lowtext*)
*(.init0)
.init0 0x00000254 0x0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/crtm168.o
0x00000254 __init
*(.init0)
*(.init1)
*(.init1)
*(.init2)
.init2 0x00000254 0xc /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/crtm168.o
*(.init2)
*(.init3)
*(.init3)
*(.init4)
.init4 0x00000260 0x16 /usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_copy_data.o)
0x00000260 __do_copy_data
.init4 0x00000276 0x10 /usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_clear_bss.o)
0x00000276 __do_clear_bss
*(.init4)
*(.init5)
*(.init5)
*(.init6)
*(.init6)
*(.init7)
*(.init7)
*(.init8)
*(.init8)
*(.init9)
.init9 0x00000286 0x4 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/crtm168.o
*(.init9)
*(.text)
.text 0x0000028a 0x4 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/crtm168.o
0x0000028a __vector_22
0x0000028a __vector_1
0x0000028a __vector_24
0x0000028a __vector_12
0x0000028a __bad_interrupt
0x0000028a __vector_6
0x0000028a __vector_3
0x0000028a __vector_23
0x0000028a __vector_25
0x0000028a __vector_11
0x0000028a __vector_13
0x0000028a __vector_17
0x0000028a __vector_19
0x0000028a __vector_7
0x0000028a __vector_5
0x0000028a __vector_4
0x0000028a __vector_9
0x0000028a __vector_2
0x0000028a __vector_21
0x0000028a __vector_15
0x0000028a __vector_8
0x0000028a __vector_14
0x0000028a __vector_10
0x0000028a __vector_16
0x0000028a __vector_20
.text 0x0000028e 0x2016 fat16.o
0x000018ae fat16_resize_file
0x0000028e fat16_close
0x00000b3a fat16_reset_dir
0x00000b50 fat16_delete_file
0x00000c8a fat16_get_fs_free
0x00000c50 fat16_get_file_modification_date
0x00000dfa fat16_read_dir
0x00000c52 fat16_get_file_modification_time
0x00001af6 fat16_seek_file
0x00000c54 fat16_get_fs_size
0x000008a8 fat16_close_file
0x00001f00 fat16_open_file
0x000008b4 fat16_read_file
0x0000105e fat16_open
0x00001f68 fat16_create_file
0x0000213c fat16_create_dir
0x00002020 fat16_get_dir_entry_of_path
0x00001bb2 fat16_write_file
0x00001ea0 fat16_open_dir
0x00000b2e fat16_close_dir
.text 0x000022a4 0x754 main.o
0x000022a4 get_datetime
0x00002580 main
.text 0x000029f8 0x1c4 partition.o
0x000029f8 partition_close
0x00002a0c partition_open
.text 0x00002bbc 0x8fc sd_raw.o
0x00002bbc sd_raw_available
0x0000301e sd_raw_write_interval
0x00002c78 sd_raw_read
0x000031be sd_raw_init
0x000030d2 sd_raw_read_interval
0x000032a8 sd_raw_get_info
0x00002fe2 sd_raw_sync
0x00002bce sd_raw_locked
0x00002e1a sd_raw_write
.text 0x000034b8 0x254 uart.o
0x000035e6 uart_putdw_dec
0x000034ee uart_putc_hex
0x000036a8 uart_puts
0x000036c2 uart_puts_p
0x000034b8 uart_init
0x00003566 uart_putw_dec
0x000036de uart_getc
0x00003540 uart_putdw_hex
0x000034d0 uart_putc
0x0000370a __vector_18
0x00003526 uart_putw_hex
.text 0x0000370c 0x0 /usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_mulsi3.o)
.text 0x0000370c 0x0 /usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_udivmodhi4.o)
.text 0x0000370c 0x0 /usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_divmodhi4.o)
.text 0x0000370c 0x0 /usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_udivmodsi4.o)
.text 0x0000370c 0x0 /usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_exit.o)
.text 0x0000370c 0x0 /usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_copy_data.o)
.text 0x0000370c 0x0 /usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_clear_bss.o)
.text 0x0000370c 0x14 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strcmp_P.o)
0x0000370c strcmp_P
.text 0x00003720 0x1c /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strncmp_P.o)
0x00003720 strncmp_P
.text 0x0000373c 0x12 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(memcpy.o)
0x0000373c memcpy
.text 0x0000374e 0xe /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(memset.o)
0x0000374e memset
.text 0x0000375c 0x18 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strchr.o)
0x0000375c strchr
.text 0x00003774 0x14 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strcmp.o)
0x00003774 strcmp
.text 0x00003788 0x1c /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strncmp.o)
0x00003788 strncmp
.text 0x000037a4 0x1e /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strncpy.o)
0x000037a4 strncpy
.text 0x000037c2 0x16 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strrchr.o)
0x000037c2 strrchr
0x000037d8 . = ALIGN (0x2)
*(.text.*)
.text.libgcc 0x000037d8 0x3e /usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_mulsi3.o)
0x000037d8 __mulsi3
.text.libgcc 0x00003816 0x28 /usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_udivmodhi4.o)
0x00003816 __udivmodhi4
.text.libgcc 0x0000383e 0x26 /usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_divmodhi4.o)
0x0000383e __divmodhi4
0x0000383e _div
.text.libgcc 0x00003864 0x44 /usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_udivmodsi4.o)
0x00003864 __udivmodsi4
.text.libgcc 0x000038a8 0x0 /usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_exit.o)
.text.libgcc 0x000038a8 0x0 /usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_copy_data.o)
.text.libgcc 0x000038a8 0x0 /usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_clear_bss.o)
0x000038a8 . = ALIGN (0x2)
*(.fini9)
.fini9 0x000038a8 0x0 /usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_exit.o)
0x000038a8 exit
0x000038a8 _exit
*(.fini9)
*(.fini8)
*(.fini8)
*(.fini7)
*(.fini7)
*(.fini6)
*(.fini6)
*(.fini5)
*(.fini5)
*(.fini4)
*(.fini4)
*(.fini3)
*(.fini3)
*(.fini2)
*(.fini2)
*(.fini1)
*(.fini1)
*(.fini0)
.fini0 0x000038a8 0x2 /usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_exit.o)
*(.fini0)
0x000038aa _etext = .
 
.data 0x00800100 0x2 load address 0x000038aa
0x00800100 PROVIDE (__data_start, .)
*(.data)
.data 0x00800100 0x0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/crtm168.o
.data 0x00800100 0x0 fat16.o
.data 0x00800100 0x2 main.o
.data 0x00800102 0x0 partition.o
.data 0x00800102 0x0 sd_raw.o
.data 0x00800102 0x0 uart.o
.data 0x00800102 0x0 /usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_mulsi3.o)
.data 0x00800102 0x0 /usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_udivmodhi4.o)
.data 0x00800102 0x0 /usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_divmodhi4.o)
.data 0x00800102 0x0 /usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_udivmodsi4.o)
.data 0x00800102 0x0 /usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_exit.o)
.data 0x00800102 0x0 /usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_copy_data.o)
.data 0x00800102 0x0 /usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_clear_bss.o)
.data 0x00800102 0x0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strcmp_P.o)
.data 0x00800102 0x0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strncmp_P.o)
.data 0x00800102 0x0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(memcpy.o)
.data 0x00800102 0x0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(memset.o)
.data 0x00800102 0x0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strchr.o)
.data 0x00800102 0x0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strcmp.o)
.data 0x00800102 0x0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strncmp.o)
.data 0x00800102 0x0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strncpy.o)
.data 0x00800102 0x0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strrchr.o)
*(.data*)
*(.rodata)
*(.rodata*)
*(.gnu.linkonce.d*)
0x00800102 . = ALIGN (0x2)
0x00800102 _edata = .
0x00800102 PROVIDE (__data_end, .)
 
.bss 0x00800102 0x2c1
0x00800102 PROVIDE (__bss_start, .)
*(.bss)
.bss 0x00800102 0x0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/crtm168.o
.bss 0x00800102 0xab fat16.o
.bss 0x008001ad 0x0 main.o
.bss 0x008001ad 0x11 partition.o
.bss 0x008001be 0x205 sd_raw.o
.bss 0x008003c3 0x0 uart.o
.bss 0x008003c3 0x0 /usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_mulsi3.o)
.bss 0x008003c3 0x0 /usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_udivmodhi4.o)
.bss 0x008003c3 0x0 /usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_divmodhi4.o)
.bss 0x008003c3 0x0 /usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_udivmodsi4.o)
.bss 0x008003c3 0x0 /usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_exit.o)
.bss 0x008003c3 0x0 /usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_copy_data.o)
.bss 0x008003c3 0x0 /usr/lib/gcc/avr/4.2.1/avr5/libgcc.a(_clear_bss.o)
.bss 0x008003c3 0x0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strcmp_P.o)
.bss 0x008003c3 0x0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strncmp_P.o)
.bss 0x008003c3 0x0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(memcpy.o)
.bss 0x008003c3 0x0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(memset.o)
.bss 0x008003c3 0x0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strchr.o)
.bss 0x008003c3 0x0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strcmp.o)
.bss 0x008003c3 0x0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strncmp.o)
.bss 0x008003c3 0x0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strncpy.o)
.bss 0x008003c3 0x0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strrchr.o)
*(.bss*)
*(COMMON)
0x008003c3 PROVIDE (__bss_end, .)
0x000038aa __data_load_start = LOADADDR (.data)
0x000038ac __data_load_end = (__data_load_start + SIZEOF (.data))
 
.noinit 0x008003c3 0x0
0x008003c3 PROVIDE (__noinit_start, .)
*(.noinit*)
0x008003c3 PROVIDE (__noinit_end, .)
0x008003c3 _end = .
0x008003c3 PROVIDE (__heap_start, .)
 
.eeprom 0x00810000 0x0
*(.eeprom*)
0x00810000 __eeprom_end = .
 
.stab 0x00000000 0x612c
*(.stab)
.stab 0x00000000 0x36c /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/crtm168.o
.stab 0x0000036c 0x2e14 fat16.o
0x2e20 (size before relaxing)
.stab 0x00003180 0xfb4 main.o
0x11b8 (size before relaxing)
.stab 0x00004134 0x300 partition.o
0x4ec (size before relaxing)
.stab 0x00004434 0xfb4 sd_raw.o
0x1164 (size before relaxing)
.stab 0x000053e8 0x7a4 uart.o
0x9d8 (size before relaxing)
.stab 0x00005b8c 0x90 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strcmp_P.o)
0x9c (size before relaxing)
.stab 0x00005c1c 0xc0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strncmp_P.o)
0xcc (size before relaxing)
.stab 0x00005cdc 0x84 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(memcpy.o)
0x90 (size before relaxing)
.stab 0x00005d60 0x6c /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(memset.o)
0x78 (size before relaxing)
.stab 0x00005dcc 0xa8 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strchr.o)
0xb4 (size before relaxing)
.stab 0x00005e74 0x90 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strcmp.o)
0x9c (size before relaxing)
.stab 0x00005f04 0xc0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strncmp.o)
0xcc (size before relaxing)
.stab 0x00005fc4 0xcc /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strncpy.o)
0xd8 (size before relaxing)
.stab 0x00006090 0x9c /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/libc.a(strrchr.o)
0xa8 (size before relaxing)
 
.stabstr 0x00000000 0x2e0e
*(.stabstr)
.stabstr 0x00000000 0x2e0e /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr5/crtm168.o
 
.stab.excl
*(.stab.excl)
 
.stab.exclstr
*(.stab.exclstr)
 
.stab.index
*(.stab.index)
 
.stab.indexstr
*(.stab.indexstr)
 
.comment
*(.comment)
 
.debug
*(.debug)
 
.line
*(.line)
 
.debug_srcinfo
*(.debug_srcinfo)
 
.debug_sfnames
*(.debug_sfnames)
 
.debug_aranges
*(.debug_aranges)
 
.debug_pubnames
*(.debug_pubnames)
 
.debug_info
*(.debug_info)
*(.gnu.linkonce.wi.*)
 
.debug_abbrev
*(.debug_abbrev)
 
.debug_line
*(.debug_line)
 
.debug_frame
*(.debug_frame)
 
.debug_str
*(.debug_str)
 
.debug_loc
*(.debug_loc)
 
.debug_macinfo
*(.debug_macinfo)
OUTPUT(sd-reader.out elf32-avr)
/Designs/GPSRL02A/SW/sd-reader.out
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+*
\ No newline at end of property
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Designs/GPSRL02A/SW/sd-reader_config.h
0,0 → 1,44
 
/*
* Copyright (c) 2006-2007 by Roland Riegel <feedback@roland-riegel.de>
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of either the GNU General Public License version 2
* or the GNU Lesser General Public License version 2.1, both as
* published by the Free Software Foundation.
*/
 
#ifndef SD_READER_CONFIG_H
#define SD_READER_CONFIG_H
 
/**
* \addtogroup config Sd-reader configuration
*
* @{
*/
 
/**
* \file
* Common sd-reader configuration used by all modules (license: GPLv2 or LGPLv2.1)
*
* \note This file contains only configuration items relevant to
* all sd-reader implementation files. For module specific configuration
* options, please see the files fat16_config.h, partition_config.h
* and sd_raw_config.h.
*/
 
/**
* Controls allocation of memory.
*
* Set to 1 to use malloc()/free() for allocation of structures
* like file and directory handles, set to 0 to use pre-allocated
* fixed-size handle arrays.
*/
#define USE_DYNAMIC_MEMORY 0
 
/**
* @}
*/
 
#endif
 
/Designs/GPSRL02A/SW/sd_raw.c
0,0 → 1,912
 
/*
* Copyright (c) 2006-2007 by Roland Riegel <feedback@roland-riegel.de>
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of either the GNU General Public License version 2
* or the GNU Lesser General Public License version 2.1, both as
* published by the Free Software Foundation.
*/
 
#include <string.h>
#include <avr/io.h>
#include "sd_raw.h"
 
/**
* \addtogroup sd_raw MMC/SD card raw access
*
* This module implements read and write access to MMC and
* SD cards. It serves as a low-level driver for the higher
* level modules such as partition and file system access.
*
* @{
*/
/**
* \file
* MMC/SD raw access implementation (license: GPLv2 or LGPLv2.1)
*
* \author Roland Riegel
*/
 
/**
* \addtogroup sd_raw_config MMC/SD configuration
* Preprocessor defines to configure the MMC/SD support.
*/
 
/**
* @}
*/
 
/* commands available in SPI mode */
 
/* CMD0: response R1 */
#define CMD_GO_IDLE_STATE 0x00
/* CMD1: response R1 */
#define CMD_SEND_OP_COND 0x01
/* CMD9: response R1 */
#define CMD_SEND_CSD 0x09
/* CMD10: response R1 */
#define CMD_SEND_CID 0x0a
/* CMD12: response R1 */
#define CMD_STOP_TRANSMISSION 0x0c
/* CMD13: response R2 */
#define CMD_SEND_STATUS 0x0d
/* CMD16: arg0[31:0]: block length, response R1 */
#define CMD_SET_BLOCKLEN 0x10
/* CMD17: arg0[31:0]: data address, response R1 */
#define CMD_READ_SINGLE_BLOCK 0x11
/* CMD18: arg0[31:0]: data address, response R1 */
#define CMD_READ_MULTIPLE_BLOCK 0x12
/* CMD24: arg0[31:0]: data address, response R1 */
#define CMD_WRITE_SINGLE_BLOCK 0x18
/* CMD25: arg0[31:0]: data address, response R1 */
#define CMD_WRITE_MULTIPLE_BLOCK 0x19
/* CMD27: response R1 */
#define CMD_PROGRAM_CSD 0x1b
/* CMD28: arg0[31:0]: data address, response R1b */
#define CMD_SET_WRITE_PROT 0x1c
/* CMD29: arg0[31:0]: data address, response R1b */
#define CMD_CLR_WRITE_PROT 0x1d
/* CMD30: arg0[31:0]: write protect data address, response R1 */
#define CMD_SEND_WRITE_PROT 0x1e
/* CMD32: arg0[31:0]: data address, response R1 */
#define CMD_TAG_SECTOR_START 0x20
/* CMD33: arg0[31:0]: data address, response R1 */
#define CMD_TAG_SECTOR_END 0x21
/* CMD34: arg0[31:0]: data address, response R1 */
#define CMD_UNTAG_SECTOR 0x22
/* CMD35: arg0[31:0]: data address, response R1 */
#define CMD_TAG_ERASE_GROUP_START 0x23
/* CMD36: arg0[31:0]: data address, response R1 */
#define CMD_TAG_ERASE_GROUP_END 0x24
/* CMD37: arg0[31:0]: data address, response R1 */
#define CMD_UNTAG_ERASE_GROUP 0x25
/* CMD38: arg0[31:0]: stuff bits, response R1b */
#define CMD_ERASE 0x26
/* CMD42: arg0[31:0]: stuff bits, response R1b */
#define CMD_LOCK_UNLOCK 0x2a
/* CMD58: response R3 */
#define CMD_READ_OCR 0x3a
/* CMD59: arg0[31:1]: stuff bits, arg0[0:0]: crc option, response R1 */
#define CMD_CRC_ON_OFF 0x3b
 
/* command responses */
/* R1: size 1 byte */
#define R1_IDLE_STATE 0
#define R1_ERASE_RESET 1
#define R1_ILL_COMMAND 2
#define R1_COM_CRC_ERR 3
#define R1_ERASE_SEQ_ERR 4
#define R1_ADDR_ERR 5
#define R1_PARAM_ERR 6
/* R1b: equals R1, additional busy bytes */
/* R2: size 2 bytes */
#define R2_CARD_LOCKED 0
#define R2_WP_ERASE_SKIP 1
#define R2_ERR 2
#define R2_CARD_ERR 3
#define R2_CARD_ECC_FAIL 4
#define R2_WP_VIOLATION 5
#define R2_INVAL_ERASE 6
#define R2_OUT_OF_RANGE 7
#define R2_CSD_OVERWRITE 7
#define R2_IDLE_STATE (R1_IDLE_STATE + 8)
#define R2_ERASE_RESET (R1_ERASE_RESET + 8)
#define R2_ILL_COMMAND (R1_ILL_COMMAND + 8)
#define R2_COM_CRC_ERR (R1_COM_CRC_ERR + 8)
#define R2_ERASE_SEQ_ERR (R1_ERASE_SEQ_ERR + 8)
#define R2_ADDR_ERR (R1_ADDR_ERR + 8)
#define R2_PARAM_ERR (R1_PARAM_ERR + 8)
/* R3: size 5 bytes */
#define R3_OCR_MASK (0xffffffffUL)
#define R3_IDLE_STATE (R1_IDLE_STATE + 32)
#define R3_ERASE_RESET (R1_ERASE_RESET + 32)
#define R3_ILL_COMMAND (R1_ILL_COMMAND + 32)
#define R3_COM_CRC_ERR (R1_COM_CRC_ERR + 32)
#define R3_ERASE_SEQ_ERR (R1_ERASE_SEQ_ERR + 32)
#define R3_ADDR_ERR (R1_ADDR_ERR + 32)
#define R3_PARAM_ERR (R1_PARAM_ERR + 32)
/* Data Response: size 1 byte */
#define DR_STATUS_MASK 0x0e
#define DR_STATUS_ACCEPTED 0x05
#define DR_STATUS_CRC_ERR 0x0a
#define DR_STATUS_WRITE_ERR 0x0c
 
#if !SD_RAW_SAVE_RAM
 
/* static data buffer for acceleration */
static uint8_t raw_block[512];
/* offset where the data within raw_block lies on the card */
static uint32_t raw_block_address;
#if SD_RAW_WRITE_BUFFERING
/* flag to remember if raw_block was written to the card */
static uint8_t raw_block_written;
#endif
 
#endif
 
/* private helper functions */
static void sd_raw_send_byte(uint8_t b);
static uint8_t sd_raw_rec_byte();
static uint8_t sd_raw_send_command_r1(uint8_t command, uint32_t arg);
static uint16_t sd_raw_send_command_r2(uint8_t command, uint32_t arg);
 
/**
* \ingroup sd_raw
* Initializes memory card communication.
*
* \returns 0 on failure, 1 on success.
*/
uint8_t sd_raw_init()
{
/* enable inputs for reading card status */
configure_pin_available();
configure_pin_locked();
 
/* enable outputs for MOSI, SCK, SS, input for MISO */
configure_pin_mosi();
configure_pin_sck();
configure_pin_ss();
configure_pin_miso();
 
unselect_card();
 
/* initialize SPI with lowest frequency; max. 400kHz during identification mode of card */
SPCR = (0 << SPIE) | /* SPI Interrupt Enable */
(1 << SPE) | /* SPI Enable */
(0 << DORD) | /* Data Order: MSB first */
(1 << MSTR) | /* Master mode */
(0 << CPOL) | /* Clock Polarity: SCK low when idle */
(0 << CPHA) | /* Clock Phase: sample on rising SCK edge */
(1 << SPR1) | /* Clock Frequency: f_OSC / 128 */
(1 << SPR0);
SPSR &= ~(1 << SPI2X); /* No doubled clock frequency */
 
/* initialization procedure */
if(!sd_raw_available())
return 0;
 
/* card needs 74 cycles minimum to start up */
for(uint8_t i = 0; i < 10; ++i)
{
/* wait 8 clock cycles */
sd_raw_rec_byte();
}
 
/* address card */
select_card();
 
/* reset card */
uint8_t response;
for(uint16_t i = 0; ; ++i)
{
response = sd_raw_send_command_r1(CMD_GO_IDLE_STATE, 0);
if(response == (1 << R1_IDLE_STATE))
break;
 
if(i == 0x1ff)
{
unselect_card();
return 0;
}
}
/* wait for card to get ready */
for(uint16_t i = 0; ; ++i)
{
response = sd_raw_send_command_r1(CMD_SEND_OP_COND, 0);
if(!(response & (1 << R1_IDLE_STATE)))
break;
 
if(i == 0x7fff)
{
unselect_card();
return 0;
}
}
 
/* set block size to 512 bytes */
if(sd_raw_send_command_r1(CMD_SET_BLOCKLEN, 512))
{
unselect_card();
return 0;
}
 
/* deaddress card */
unselect_card();
 
/* switch to highest SPI frequency possible */
SPCR &= ~((1 << SPR1) | (1 << SPR0)); /* Clock Frequency: f_OSC / 4 */
SPSR |= (1 << SPI2X); /* Doubled Clock Frequency: f_OSC / 2 */
 
#if !SD_RAW_SAVE_RAM
/* the first block is likely to be accessed first, so precache it here */
raw_block_address = 0xffffffff;
#if SD_RAW_WRITE_BUFFERING
raw_block_written = 1;
#endif
if(!sd_raw_read(0, raw_block, sizeof(raw_block)))
return 0;
#endif
 
return 1;
}
 
/**
* \ingroup sd_raw
* Checks wether a memory card is located in the slot.
*
* \returns 1 if the card is available, 0 if it is not.
*/
uint8_t sd_raw_available()
{
return get_pin_available() == 0x00;
}
 
/**
* \ingroup sd_raw
* Checks wether the memory card is locked for write access.
*
* \returns 1 if the card is locked, 0 if it is not.
*/
uint8_t sd_raw_locked()
{
return get_pin_locked() == 0x00;
}
 
/**
* \ingroup sd_raw
* Sends a raw byte to the memory card.
*
* \param[in] b The byte to sent.
* \see sd_raw_rec_byte
*/
void sd_raw_send_byte(uint8_t b)
{
SPDR = b;
/* wait for byte to be shifted out */
while(!(SPSR & (1 << SPIF)));
SPSR &= ~(1 << SPIF);
}
 
/**
* \ingroup sd_raw
* Receives a raw byte from the memory card.
*
* \returns The byte which should be read.
* \see sd_raw_send_byte
*/
uint8_t sd_raw_rec_byte()
{
/* send dummy data for receiving some */
SPDR = 0xff;
while(!(SPSR & (1 << SPIF)));
SPSR &= ~(1 << SPIF);
 
return SPDR;
}
 
/**
* \ingroup sd_raw
* Send a command to the memory card which responses with a R1 response.
*
* \param[in] command The command to send.
* \param[in] arg The argument for command.
* \returns The command answer.
*/
uint8_t sd_raw_send_command_r1(uint8_t command, uint32_t arg)
{
uint8_t response;
 
/* wait some clock cycles */
sd_raw_rec_byte();
 
/* send command via SPI */
sd_raw_send_byte(0x40 | command);
sd_raw_send_byte((arg >> 24) & 0xff);
sd_raw_send_byte((arg >> 16) & 0xff);
sd_raw_send_byte((arg >> 8) & 0xff);
sd_raw_send_byte((arg >> 0) & 0xff);
sd_raw_send_byte(command == CMD_GO_IDLE_STATE ? 0x95 : 0xff);
/* receive response */
for(uint8_t i = 0; i < 10; ++i)
{
response = sd_raw_rec_byte();
if(response != 0xff)
break;
}
 
return response;
}
 
/**
* \ingroup sd_raw
* Send a command to the memory card which responses with a R2 response.
*
* \param[in] command The command to send.
* \param[in] arg The argument for command.
* \returns The command answer.
*/
uint16_t sd_raw_send_command_r2(uint8_t command, uint32_t arg)
{
uint16_t response;
/* wait some clock cycles */
sd_raw_rec_byte();
 
/* send command via SPI */
sd_raw_send_byte(0x40 | command);
sd_raw_send_byte((arg >> 24) & 0xff);
sd_raw_send_byte((arg >> 16) & 0xff);
sd_raw_send_byte((arg >> 8) & 0xff);
sd_raw_send_byte((arg >> 0) & 0xff);
sd_raw_send_byte(command == CMD_GO_IDLE_STATE ? 0x95 : 0xff);
/* receive response */
for(uint8_t i = 0; i < 10; ++i)
{
response = sd_raw_rec_byte();
if(response != 0xff)
break;
}
response <<= 8;
response |= sd_raw_rec_byte();
 
return response;
}
 
/**
* \ingroup sd_raw
* Reads raw data from the card.
*
* \param[in] offset The offset from which to read.
* \param[out] buffer The buffer into which to write the data.
* \param[in] length The number of bytes to read.
* \returns 0 on failure, 1 on success.
* \see sd_raw_read_interval, sd_raw_write, sd_raw_write_interval
*/
uint8_t sd_raw_read(uint32_t offset, uint8_t* buffer, uint16_t length)
{
uint32_t block_address;
uint16_t block_offset;
uint16_t read_length;
while(length > 0)
{
/* determine byte count to read at once */
block_address = offset & 0xfffffe00;
block_offset = offset & 0x01ff;
read_length = 512 - block_offset; /* read up to block border */
if(read_length > length)
read_length = length;
#if !SD_RAW_SAVE_RAM
/* check if the requested data is cached */
if(block_address != raw_block_address)
#endif
{
#if SD_RAW_WRITE_BUFFERING
if(!raw_block_written)
{
if(!sd_raw_write(raw_block_address, raw_block, sizeof(raw_block)))
return 0;
}
#endif
 
/* address card */
select_card();
 
/* send single block request */
if(sd_raw_send_command_r1(CMD_READ_SINGLE_BLOCK, block_address))
{
unselect_card();
return 0;
}
 
/* wait for data block (start byte 0xfe) */
while(sd_raw_rec_byte() != 0xfe);
 
#if SD_RAW_SAVE_RAM
/* read byte block */
uint16_t read_to = block_offset + read_length;
for(uint16_t i = 0; i < 512; ++i)
{
uint8_t b = sd_raw_rec_byte();
if(i >= block_offset && i < read_to)
*buffer++ = b;
}
#else
/* read byte block */
uint8_t* cache = raw_block;
for(uint16_t i = 0; i < 512; ++i)
*cache++ = sd_raw_rec_byte();
raw_block_address = block_address;
 
memcpy(buffer, raw_block + block_offset, read_length);
buffer += read_length;
#endif
/* read crc16 */
sd_raw_rec_byte();
sd_raw_rec_byte();
/* deaddress card */
unselect_card();
 
/* let card some time to finish */
sd_raw_rec_byte();
}
#if !SD_RAW_SAVE_RAM
else
{
/* use cached data */
memcpy(buffer, raw_block + block_offset, read_length);
buffer += read_length;
}
#endif
 
length -= read_length;
offset += read_length;
}
 
return 1;
}
 
/**
* \ingroup sd_raw
* Continuously reads units of \c interval bytes and calls a callback function.
*
* This function starts reading at the specified offset. Every \c interval bytes,
* it calls the callback function with the associated data buffer.
*
* By returning zero, the callback may stop reading.
*
* \note Within the callback function, you can not start another read or
* write operation.
* \note This function only works if the following conditions are met:
* - (offset - (offset % 512)) % interval == 0
* - length % interval == 0
*
* \param[in] offset Offset from which to start reading.
* \param[in] buffer Pointer to a buffer which is at least interval bytes in size.
* \param[in] interval Number of bytes to read before calling the callback function.
* \param[in] length Number of bytes to read altogether.
* \param[in] callback The function to call every interval bytes.
* \param[in] p An opaque pointer directly passed to the callback function.
* \returns 0 on failure, 1 on success
* \see sd_raw_write_interval, sd_raw_read, sd_raw_write
*/
uint8_t sd_raw_read_interval(uint32_t offset, uint8_t* buffer, uint16_t interval, uint16_t length, sd_raw_read_interval_handler_t callback, void* p)
{
if(!buffer || interval == 0 || length < interval || !callback)
return 0;
 
#if !SD_RAW_SAVE_RAM
while(length >= interval)
{
/* as reading is now buffered, we directly
* hand over the request to sd_raw_read()
*/
if(!sd_raw_read(offset, buffer, interval))
return 0;
if(!callback(buffer, offset, p))
break;
offset += interval;
length -= interval;
}
 
return 1;
#else
/* address card */
select_card();
 
uint16_t block_offset;
uint16_t read_length;
uint8_t* buffer_cur;
uint8_t finished = 0;
do
{
/* determine byte count to read at once */
block_offset = offset & 0x01ff;
read_length = 512 - block_offset;
/* send single block request */
if(sd_raw_send_command_r1(CMD_READ_SINGLE_BLOCK, offset & 0xfffffe00))
{
unselect_card();
return 0;
}
 
/* wait for data block (start byte 0xfe) */
while(sd_raw_rec_byte() != 0xfe);
 
/* read up to the data of interest */
for(uint16_t i = 0; i < block_offset; ++i)
sd_raw_rec_byte();
 
/* read interval bytes of data and execute the callback */
do
{
if(read_length < interval || length < interval)
break;
 
buffer_cur = buffer;
for(uint16_t i = 0; i < interval; ++i)
*buffer_cur++ = sd_raw_rec_byte();
 
if(!callback(buffer, offset + (512 - read_length), p))
{
finished = 1;
break;
}
 
read_length -= interval;
length -= interval;
 
} while(read_length > 0 && length > 0);
/* read rest of data block */
while(read_length-- > 0)
sd_raw_rec_byte();
/* read crc16 */
sd_raw_rec_byte();
sd_raw_rec_byte();
 
if(length < interval)
break;
 
offset = (offset & 0xfffffe00) + 512;
 
} while(!finished);
/* deaddress card */
unselect_card();
 
/* let card some time to finish */
sd_raw_rec_byte();
 
return 1;
#endif
}
 
/**
* \ingroup sd_raw
* Writes raw data to the card.
*
* \note If write buffering is enabled, you might have to
* call sd_raw_sync() before disconnecting the card
* to ensure all remaining data has been written.
*
* \param[in] offset The offset where to start writing.
* \param[in] buffer The buffer containing the data to be written.
* \param[in] length The number of bytes to write.
* \returns 0 on failure, 1 on success.
* \see sd_raw_write_interval, sd_raw_read, sd_raw_read_interval
*/
uint8_t sd_raw_write(uint32_t offset, const uint8_t* buffer, uint16_t length)
{
#if SD_RAW_WRITE_SUPPORT
 
if(get_pin_locked())
return 0;
 
uint32_t block_address;
uint16_t block_offset;
uint16_t write_length;
while(length > 0)
{
/* determine byte count to write at once */
block_address = offset & 0xfffffe00;
block_offset = offset & 0x01ff;
write_length = 512 - block_offset; /* write up to block border */
if(write_length > length)
write_length = length;
/* Merge the data to write with the content of the block.
* Use the cached block if available.
*/
if(block_address != raw_block_address)
{
#if SD_RAW_WRITE_BUFFERING
if(!raw_block_written)
{
if(!sd_raw_write(raw_block_address, raw_block, sizeof(raw_block)))
return 0;
}
#endif
 
if(block_offset || write_length < 512)
{
if(!sd_raw_read(block_address, raw_block, sizeof(raw_block)))
return 0;
}
raw_block_address = block_address;
}
 
if(buffer != raw_block)
{
memcpy(raw_block + block_offset, buffer, write_length);
 
#if SD_RAW_WRITE_BUFFERING
raw_block_written = 0;
 
if(length == write_length)
return 1;
#endif
}
 
buffer += write_length;
 
/* address card */
select_card();
 
/* send single block request */
if(sd_raw_send_command_r1(CMD_WRITE_SINGLE_BLOCK, block_address))
{
unselect_card();
return 0;
}
 
/* send start byte */
sd_raw_send_byte(0xfe);
 
/* write byte block */
uint8_t* cache = raw_block;
for(uint16_t i = 0; i < 512; ++i)
sd_raw_send_byte(*cache++);
 
/* write dummy crc16 */
sd_raw_send_byte(0xff);
sd_raw_send_byte(0xff);
 
/* wait while card is busy */
while(sd_raw_rec_byte() != 0xff);
sd_raw_rec_byte();
 
/* deaddress card */
unselect_card();
 
length -= write_length;
offset += write_length;
 
#if SD_RAW_WRITE_BUFFERING
raw_block_written = 1;
#endif
}
return 1;
#else
return 0;
#endif
}
 
/**
* \ingroup sd_raw
* Writes a continuous data stream obtained from a callback function.
*
* This function starts writing at the specified offset. To obtain the
* next bytes to write, it calls the callback function. The callback fills the
* provided data buffer and returns the number of bytes it has put into the buffer.
*
* By returning zero, the callback may stop writing.
*
* \param[in] offset Offset where to start writing.
* \param[in] buffer Pointer to a buffer which is used for the callback function.
* \param[in] length Number of bytes to write in total. May be zero for endless writes.
* \param[in] callback The function used to obtain the bytes to write.
* \param[in] p An opaque pointer directly passed to the callback function.
* \returns 0 on failure, 1 on success
* \see sd_raw_read_interval, sd_raw_write, sd_raw_read
*/
uint8_t sd_raw_write_interval(uint32_t offset, uint8_t* buffer, uint16_t length, sd_raw_write_interval_handler_t callback, void* p)
{
#if SD_RAW_WRITE_SUPPORT
 
#if SD_RAW_SAVE_RAM
#error "SD_RAW_WRITE_SUPPORT is not supported together with SD_RAW_SAVE_RAM"
#endif
 
if(!buffer || !callback)
return 0;
 
uint8_t endless = (length == 0);
while(endless || length > 0)
{
uint16_t bytes_to_write = callback(buffer, offset, p);
if(!bytes_to_write)
break;
if(!endless && bytes_to_write > length)
return 0;
 
/* as writing is always buffered, we directly
* hand over the request to sd_raw_write()
*/
if(!sd_raw_write(offset, buffer, bytes_to_write))
return 0;
 
offset += bytes_to_write;
length -= bytes_to_write;
}
 
return 1;
 
#else
return 0;
#endif
}
 
/**
* \ingroup sd_raw
* Writes the write buffer's content to the card.
*
* \note When write buffering is enabled, you should
* call this function before disconnecting the
* card to ensure all remaining data has been
* written.
*
* \returns 0 on failure, 1 on success.
* \see sd_raw_write
*/
uint8_t sd_raw_sync()
{
#if SD_RAW_WRITE_SUPPORT
#if SD_RAW_WRITE_BUFFERING
if(raw_block_written)
return 1;
if(!sd_raw_write(raw_block_address, raw_block, sizeof(raw_block)))
return 0;
#endif
return 1;
#else
return 0;
#endif
}
 
/**
* \ingroup sd_raw
* Reads informational data from the card.
*
* This function reads and returns the card's registers
* containing manufacturing and status information.
*
* \note: The information retrieved by this function is
* not required in any way to operate on the card,
* but it might be nice to display some of the data
* to the user.
*
* \param[in] info A pointer to the structure into which to save the information.
* \returns 0 on failure, 1 on success.
*/
uint8_t sd_raw_get_info(struct sd_raw_info* info)
{
if(!info || !sd_raw_available())
return 0;
 
memset(info, 0, sizeof(*info));
 
select_card();
 
/* read cid register */
if(sd_raw_send_command_r1(CMD_SEND_CID, 0))
{
unselect_card();
return 0;
}
while(sd_raw_rec_byte() != 0xfe);
for(uint8_t i = 0; i < 18; ++i)
{
uint8_t b = sd_raw_rec_byte();
 
switch(i)
{
case 0:
info->manufacturer = b;
break;
case 1:
case 2:
info->oem[i - 1] = b;
break;
case 3:
case 4:
case 5:
case 6:
case 7:
info->product[i - 3] = b;
break;
case 8:
info->revision = b;
break;
case 9:
case 10:
case 11:
case 12:
info->serial |= (uint32_t) b << ((12 - i) * 8);
break;
case 13:
info->manufacturing_year = b << 4;
break;
case 14:
info->manufacturing_year |= b >> 4;
info->manufacturing_month = b & 0x0f;
break;
}
}
 
/* read csd register */
uint8_t csd_read_bl_len = 0;
uint8_t csd_c_size_mult = 0;
uint16_t csd_c_size = 0;
if(sd_raw_send_command_r1(CMD_SEND_CSD, 0))
{
unselect_card();
return 0;
}
while(sd_raw_rec_byte() != 0xfe);
for(uint8_t i = 0; i < 18; ++i)
{
uint8_t b = sd_raw_rec_byte();
 
switch(i)
{
case 5:
csd_read_bl_len = b & 0x0f;
break;
case 6:
csd_c_size = (uint16_t) (b & 0x03) << 8;
break;
case 7:
csd_c_size |= b;
csd_c_size <<= 2;
break;
case 8:
csd_c_size |= b >> 6;
++csd_c_size;
break;
case 9:
csd_c_size_mult = (b & 0x03) << 1;
break;
case 10:
csd_c_size_mult |= b >> 7;
 
info->capacity = (uint32_t) csd_c_size << (csd_c_size_mult + csd_read_bl_len + 2);
 
break;
case 14:
if(b & 0x40)
info->flag_copy = 1;
if(b & 0x20)
info->flag_write_protect = 1;
if(b & 0x10)
info->flag_write_protect_temp = 1;
info->format = (b & 0x0c) >> 2;
break;
}
}
 
unselect_card();
 
return 1;
}
 
/Designs/GPSRL02A/SW/sd_raw.h
0,0 → 1,139
 
/*
* Copyright (c) 2006-2007 by Roland Riegel <feedback@roland-riegel.de>
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of either the GNU General Public License version 2
* or the GNU Lesser General Public License version 2.1, both as
* published by the Free Software Foundation.
*/
 
#ifndef SD_RAW_H
#define SD_RAW_H
 
#include <stdint.h>
#include "sd_raw_config.h"
 
/**
* \addtogroup sd_raw
*
* @{
*/
/**
* \file
* MMC/SD raw access header (license: GPLv2 or LGPLv2.1)
*
* \author Roland Riegel
*/
 
/**
* The card's layout is harddisk-like, which means it contains
* a master boot record with a partition table.
*/
#define SD_RAW_FORMAT_HARDDISK 0
/**
* The card contains a single filesystem and no partition table.
*/
#define SD_RAW_FORMAT_SUPERFLOPPY 1
/**
* The card's layout follows the Universal File Format.
*/
#define SD_RAW_FORMAT_UNIVERSAL 2
/**
* The card's layout is unknown.
*/
#define SD_RAW_FORMAT_UNKNOWN 3
 
/**
* This struct is used by sd_raw_get_info() to return
* manufacturing and status information of the card.
*/
struct sd_raw_info
{
/**
* A manufacturer code globally assigned by the SD card organization.
*/
uint8_t manufacturer;
/**
* A string describing the card's OEM or content, globally assigned by the SD card organization.
*/
uint8_t oem[3];
/**
* A product name.
*/
uint8_t product[6];
/**
* The card's revision, coded in packed BCD.
*
* For example, the revision value \c 0x32 means "3.2".
*/
uint8_t revision;
/**
* A serial number assigned by the manufacturer.
*/
uint32_t serial;
/**
* The year of manufacturing.
*
* A value of zero means year 2000.
*/
uint8_t manufacturing_year;
/**
* The month of manufacturing.
*/
uint8_t manufacturing_month;
/**
* The card's total capacity in bytes.
*/
uint32_t capacity;
/**
* Defines wether the card's content is original or copied.
*
* A value of \c 0 means original, \c 1 means copied.
*/
uint8_t flag_copy;
/**
* Defines wether the card's content is write-protected.
*
* \note This is an internal flag and does not represent the
* state of the card's mechanical write-protect switch.
*/
uint8_t flag_write_protect;
/**
* Defines wether the card's content is temporarily write-protected.
*
* \note This is an internal flag and does not represent the
* state of the card's mechanical write-protect switch.
*/
uint8_t flag_write_protect_temp;
/**
* The card's data layout.
*
* See the \c SD_RAW_FORMAT_* constants for details.
*
* \note This value is not guaranteed to match reality.
*/
uint8_t format;
};
 
typedef uint8_t (*sd_raw_read_interval_handler_t)(uint8_t* buffer, uint32_t offset, void* p);
typedef uint16_t (*sd_raw_write_interval_handler_t)(uint8_t* buffer, uint32_t offset, void* p);
 
uint8_t sd_raw_init();
uint8_t sd_raw_available();
uint8_t sd_raw_locked();
 
uint8_t sd_raw_read(uint32_t offset, uint8_t* buffer, uint16_t length);
uint8_t sd_raw_read_interval(uint32_t offset, uint8_t* buffer, uint16_t interval, uint16_t length, sd_raw_read_interval_handler_t callback, void* p);
uint8_t sd_raw_write(uint32_t offset, const uint8_t* buffer, uint16_t length);
uint8_t sd_raw_write_interval(uint32_t offset, uint8_t* buffer, uint16_t length, sd_raw_write_interval_handler_t callback, void* p);
uint8_t sd_raw_sync();
 
uint8_t sd_raw_get_info(struct sd_raw_info* info);
 
/**
* @}
*/
 
#endif
 
/Designs/GPSRL02A/SW/sd_raw_config.h
0,0 → 1,109
 
/*
* Copyright (c) 2006-2007 by Roland Riegel <feedback@roland-riegel.de>
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of either the GNU General Public License version 2
* or the GNU Lesser General Public License version 2.1, both as
* published by the Free Software Foundation.
*/
 
#ifndef SD_RAW_CONFIG_H
#define SD_RAW_CONFIG_H
 
/**
* \addtogroup sd_raw
*
* @{
*/
/**
* \file
* MMC/SD support configuration (license: GPLv2 or LGPLv2.1)
*/
 
/**
* \ingroup sd_raw_config
* Controls MMC/SD write support.
*
* Set to 1 to enable MMC/SD write support, set to 0 to disable it.
*/
#define SD_RAW_WRITE_SUPPORT 1
 
/**
* \ingroup sd_raw_config
* Controls MMC/SD write buffering.
*
* Set to 1 to buffer write accesses, set to 0 to disable it.
*
* \note This option has no effect when SD_RAW_WRITE_SUPPORT is 0.
*/
#define SD_RAW_WRITE_BUFFERING 1
 
/**
* \ingroup sd_raw_config
* Controls MMC/SD access buffering.
*
* Set to 1 to save static RAM, but be aware that you will
* lose performance.
*
* \note When SD_RAW_WRITE_SUPPORT is 1, SD_RAW_SAVE_RAM will
* be reset to 0.
*/
#define SD_RAW_SAVE_RAM 1
 
/* defines for customisation of sd/mmc port access */
#if defined(__AVR_ATmega8__) || \
defined(__AVR_ATmega48__) || \
defined(__AVR_ATmega88__) || \
defined(__AVR_ATmega168__)
#define configure_pin_mosi() DDRB |= (1 << DDB3)
#define configure_pin_sck() DDRB |= (1 << DDB5)
#define configure_pin_ss() DDRB |= (1 << DDB2)
#define configure_pin_miso() DDRB &= ~(1 << DDB4)
 
#define select_card() PORTB &= ~(1 << PB2)
#define unselect_card() PORTB |= (1 << PB2)
#elif defined(__AVR_ATmega16__) || \
defined(__AVR_ATmega32__)
#define configure_pin_mosi() DDRB |= (1 << DDB5)
#define configure_pin_sck() DDRB |= (1 << DDB7)
#define configure_pin_ss() DDRB |= (1 << DDB4)
#define configure_pin_miso() DDRB &= ~(1 << DDB6)
 
#define select_card() PORTB &= ~(1 << PB4)
#define unselect_card() PORTB |= (1 << PB4)
#elif defined(__AVR_ATmega64__) || \
defined(__AVR_ATmega128__) || \
defined(__AVR_ATmega169__)
#define configure_pin_mosi() DDRB |= (1 << DDB2)
#define configure_pin_sck() DDRB |= (1 << DDB1)
#define configure_pin_ss() DDRB |= (1 << DDB0)
#define configure_pin_miso() DDRB &= ~(1 << DDB3)
 
#define select_card() PORTB &= ~(1 << PB0)
#define unselect_card() PORTB |= (1 << PB0)
#else
#error "no sd/mmc pin mapping available!"
#endif
 
#define configure_pin_available() DDRC &= ~(1 << DDC4)
#define configure_pin_locked() DDRC &= ~(1 << DDC5)
 
#define get_pin_available() ((PINC >> PC4) & 0x01)
#define get_pin_locked() ((PINC >> PC5) & 0x01)
 
/**
* @}
*/
 
/* configuration checks */
#if SD_RAW_WRITE_SUPPORT
#undef SD_RAW_SAVE_RAM
#define SD_RAW_SAVE_RAM 0
#else
#undef SD_RAW_WRITE_BUFFERING
#define SD_RAW_WRITE_BUFFERING 0
#endif
 
#endif
 
/Designs/GPSRL02A/SW/uart.c
0,0 → 1,198
 
/*
* Copyright (c) 2006-2007 by Roland Riegel <feedback@roland-riegel.de>
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
 
#include <stdio.h>
#include <avr/interrupt.h>
#include <avr/io.h>
#include <avr/pgmspace.h>
#include <avr/sfr_defs.h>
#include <avr/sleep.h>
 
#include "uart.h"
 
/* some mcus have multiple uarts */
#ifdef UDR0
#define UBRRH UBRR0H
#define UBRRL UBRR0L
#define UDR UDR0
 
#define UCSRA UCSR0A
#define UDRE UDRE0
#define RXC RXC0
 
#define UCSRB UCSR0B
#define RXEN RXEN0
#define TXEN TXEN0
#define RXCIE RXCIE0
 
#define UCSRC UCSR0C
#define URSEL
#define UCSZ0 UCSZ00
#define UCSZ1 UCSZ01
#define UCSRC_SELECT 0
#else
#define UCSRC_SELECT (1 << URSEL)
#endif
 
#ifndef USART_RXC_vect
#if defined(UART0_RX_vect)
#define USART_RXC_vect UART0_RX_vect
#elif defined(UART_RX_vect)
#define USART_RXC_vect UART_RX_vect
#elif defined(USART0_RX_vect)
#define USART_RXC_vect USART0_RX_vect
#elif defined(USART_RX_vect)
#define USART_RXC_vect USART_RX_vect
#elif defined(USART0_RXC_vect)
#define USART_RXC_vect USART0_RXC_vect
#elif defined(USART_RXC_vect)
#define USART_RXC_vect USART_RXC_vect
#else
#error "Uart receive complete interrupt not defined!"
#endif
#endif
 
#define BAUD 9600UL
#define UBRRVAL (F_CPU/(BAUD*16)-1)
#define USE_SLEEP 1
 
void uart_init()
{
/* set baud rate */
UBRRH = UBRRVAL >> 8;
UBRRL = UBRRVAL & 0xff;
/* set frame format: 8 bit, no parity, 1 bit */
UCSRC = UCSRC_SELECT | (1 << UCSZ1) | (1 << UCSZ0);
/* enable serial receiver and transmitter */
#if !USE_SLEEP
UCSRB = (1 << RXEN) | (1 << TXEN);
#else
UCSRB = (1 << RXEN) | (1 << TXEN) | (1 << RXCIE);
#endif
}
 
void uart_putc(uint8_t c)
{
if(c == '\n')
uart_putc('\r');
 
/* wait until transmit buffer is empty */
while(!(UCSRA & (1 << UDRE)));
 
/* send next byte */
UDR = c;
}
 
void uart_putc_hex(uint8_t b)
{
/* upper nibble */
if((b >> 4) < 0x0a)
uart_putc((b >> 4) + '0');
else
uart_putc((b >> 4) - 0x0a + 'a');
 
/* lower nibble */
if((b & 0x0f) < 0x0a)
uart_putc((b & 0x0f) + '0');
else
uart_putc((b & 0x0f) - 0x0a + 'a');
}
 
void uart_putw_hex(uint16_t w)
{
uart_putc_hex((uint8_t) (w >> 8));
uart_putc_hex((uint8_t) (w & 0xff));
}
 
void uart_putdw_hex(uint32_t dw)
{
uart_putw_hex((uint16_t) (dw >> 16));
uart_putw_hex((uint16_t) (dw & 0xffff));
}
 
void uart_putw_dec(uint16_t w)
{
uint16_t num = 10000;
uint8_t started = 0;
 
while(num > 0)
{
uint8_t b = w / num;
if(b > 0 || started || num == 1)
{
uart_putc('0' + b);
started = 1;
}
w -= b * num;
 
num /= 10;
}
}
 
void uart_putdw_dec(uint32_t dw)
{
uint32_t num = 1000000000;
uint8_t started = 0;
 
while(num > 0)
{
uint8_t b = dw / num;
if(b > 0 || started || num == 1)
{
uart_putc('0' + b);
started = 1;
}
dw -= b * num;
 
num /= 10;
}
}
 
void uart_puts(const char* str)
{
while(*str)
uart_putc(*str++);
}
 
void uart_puts_p(PGM_P str)
{
while(1)
{
uint8_t b = pgm_read_byte_near(str++);
if(!b)
break;
 
uart_putc(b);
}
}
 
uint8_t uart_getc()
{
/* wait until receive buffer is full */
#if USE_SLEEP
uint8_t sreg = SREG;
sei();
 
while(!(UCSRA & (1 << RXC)))
sleep_mode();
 
SREG = sreg;
#else
while(!(UCSRA & (1 << RXC)));
#endif
 
uint8_t b = UDR;
if(b == '\r')
b = '\n';
 
return b;
}
 
EMPTY_INTERRUPT(USART_RXC_vect)
 
/Designs/GPSRL02A/SW/uart.h
0,0 → 1,33
 
/*
* Copyright (c) 2006-2007 by Roland Riegel <feedback@roland-riegel.de>
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
 
#ifndef UART_H
#define UART_H
 
#include <stdint.h>
#include <avr/pgmspace.h>
 
void uart_init();
 
void uart_putc(uint8_t c);
 
void uart_putc_hex(uint8_t b);
void uart_putw_hex(uint16_t w);
void uart_putdw_hex(uint32_t dw);
 
void uart_putw_dec(uint16_t w);
void uart_putdw_dec(uint32_t dw);
 
void uart_puts(const char* str);
void uart_puts_p(PGM_P str);
 
uint8_t uart_getc();
 
#endif