<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.16">
  <compounddef id="fat__misc_8c" kind="file" language="C++">
    <compoundname>fat_misc.c</compoundname>
    <includes refid="string_8h" local="no">string.h</includes>
    <includes refid="fat__misc_8h" local="yes">fat_misc.h</includes>
    <incdepgraph>
      <node id="10">
        <label>strings.h</label>
        <link refid="strings_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="5">
        <label>sys/select.h</label>
        <link refid="select_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="4" relation="include">
        </childnode>
        <childnode refid="7" relation="include">
        </childnode>
        <childnode refid="8" relation="include">
        </childnode>
        <childnode refid="9" relation="include">
        </childnode>
      </node>
      <node id="13">
        <label>fat/fat.h</label>
        <link refid="fat_8h"/>
      </node>
      <node id="9">
        <label>sys/_sigset.h</label>
        <link refid="__sigset_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="16">
        <label>fat_types.h</label>
        <link refid="fat__types_8h"/>
      </node>
      <node id="2">
        <label>string.h</label>
        <link refid="string_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="10" relation="include">
        </childnode>
      </node>
      <node id="12">
        <label>fat_defs.h</label>
        <link refid="fat__defs_8h"/>
        <childnode refid="13" relation="include">
        </childnode>
        <childnode refid="14" relation="include">
        </childnode>
        <childnode refid="16" relation="include">
        </childnode>
      </node>
      <node id="3">
        <label>sys/types.h</label>
        <link refid="include_2sys_2types_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
        <childnode refid="5" relation="include">
        </childnode>
      </node>
      <node id="6">
        <label>sys/cdefs.h</label>
        <link refid="cdefs_8h"/>
      </node>
      <node id="4">
        <label>sys/_types.h</label>
        <link refid="__types_8h"/>
      </node>
      <node id="7">
        <label>sys/_timespec.h</label>
        <link refid="__timespec_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="15">
        <label>stdio.h</label>
      </node>
      <node id="8">
        <label>sys/_timeval.h</label>
        <link refid="__timeval_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="1">
        <label>C:/Dev/git/UbixOS/sys/fs/fat/fat_misc.c</label>
        <link refid="fat__misc_8c"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="11" relation="include">
        </childnode>
      </node>
      <node id="11">
        <label>fat_misc.h</label>
        <link refid="fat__misc_8h"/>
        <childnode refid="12" relation="include">
        </childnode>
        <childnode refid="14" relation="include">
        </childnode>
      </node>
      <node id="14">
        <label>fat_opts.h</label>
        <link refid="fat__opts_8h"/>
        <childnode refid="15" relation="include">
        </childnode>
      </node>
    </incdepgraph>
      <sectiondef kind="func">
      <memberdef kind="function" id="fat__misc_8c_1adca70c7e5b6a384a99baf9e1ecb9d1a8" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int fatfs_entry_is_dir</definition>
        <argsstring>(struct fat_dir_entry *entry)</argsstring>
        <name>fatfs_entry_is_dir</name>
        <param>
          <type>struct <ref refid="structfat__dir__entry" kindref="compound">fat_dir_entry</ref> *</type>
          <declname>entry</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/fat/fat_misc.c" line="152" column="5" bodyfile="C:/Dev/git/UbixOS/sys/fs/fat/fat_misc.c" bodystart="152" bodyend="157"/>
        <references refid="structfat__dir__entry_1aa73be99077695ab87ddd8c329e12e779" compoundref="fat__defs_8h" startline="115">fat_dir_entry::Attr</references>
        <references refid="fat__defs_8h_1a57d8f1ade52476af4ab3c03f7387b973" compoundref="fat__defs_8h" startline="84">FILE_TYPE_DIR</references>
        <referencedby refid="fat__access_8h_1a256495a47634d609602fc487830aba5c" compoundref="fat__access_8c" startline="719" endline="846">fatfs_list_directory_next</referencedby>
      </memberdef>
      <memberdef kind="function" id="fat__misc_8c_1a11542caa285662d2b04f9d504f8f9e87" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int fatfs_entry_is_file</definition>
        <argsstring>(struct fat_dir_entry *entry)</argsstring>
        <name>fatfs_entry_is_file</name>
        <param>
          <type>struct <ref refid="structfat__dir__entry" kindref="compound">fat_dir_entry</ref> *</type>
          <declname>entry</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/fat/fat_misc.c" line="161" column="5" bodyfile="C:/Dev/git/UbixOS/sys/fs/fat/fat_misc.c" bodystart="161" bodyend="167"/>
        <references refid="structfat__dir__entry_1aa73be99077695ab87ddd8c329e12e779" compoundref="fat__defs_8h" startline="115">fat_dir_entry::Attr</references>
        <references refid="fat__defs_8h_1abace2d6eb53e065d5a32ab4c4758813b" compoundref="fat__defs_8h" startline="85">FILE_TYPE_FILE</references>
      </memberdef>
      <memberdef kind="function" id="fat__misc_8c_1a27351ac7857382bf893d7e5a74cf5710" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int fatfs_entry_lfn_exists</definition>
        <argsstring>(struct lfn_cache *lfn, struct fat_dir_entry *entry)</argsstring>
        <name>fatfs_entry_lfn_exists</name>
        <param>
          <type>struct <ref refid="structlfn__cache" kindref="compound">lfn_cache</ref> *</type>
          <declname>lfn</declname>
        </param>
        <param>
          <type>struct <ref refid="structfat__dir__entry" kindref="compound">fat_dir_entry</ref> *</type>
          <declname>entry</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/fat/fat_misc.c" line="132" column="5" bodyfile="C:/Dev/git/UbixOS/sys/fs/fat/fat_misc.c" bodystart="132" bodyend="137"/>
        <references refid="structfat__dir__entry_1aa73be99077695ab87ddd8c329e12e779" compoundref="fat__defs_8h" startline="115">fat_dir_entry::Attr</references>
        <references refid="fat__defs_8h_1aeb0ab47a26edbbf113af1128a44304ee" compoundref="fat__defs_8h" startline="81">FILE_ATTR_LFN_TEXT</references>
        <references refid="fat__defs_8h_1a9c6349054e802adf1045219e99714bed" compoundref="fat__defs_8h" startline="77">FILE_ATTR_SYSHID</references>
        <references refid="fat__defs_8h_1a491017a8d29ca6102617583588eceb0e" compoundref="fat__defs_8h" startline="78">FILE_ATTR_VOLUME_ID</references>
        <references refid="fat__defs_8h_1a7e2aeee00ea979682b81bea8f046af71" compoundref="fat__defs_8h" startline="82">FILE_HEADER_BLANK</references>
        <references refid="fat__defs_8h_1acc2882877e3f516e53feb76ee87013d3" compoundref="fat__defs_8h" startline="83">FILE_HEADER_DELETED</references>
        <references refid="structfat__dir__entry_1a3b690c897cb2883c0fd9b651128fbc69" compoundref="fat__defs_8h" startline="114">fat_dir_entry::Name</references>
        <references refid="structlfn__cache_1ad3c6533b79bd11d2218af143778e570d" compoundref="fat__misc_8h" startline="37">lfn_cache::no_of_strings</references>
        <referencedby refid="fat__access_8h_1a8a18a3afa5804c2c3143f671d462687d" compoundref="fat__access_8c" startline="380" endline="472">fatfs_get_file_entry</referencedby>
        <referencedby refid="fat__access_8h_1a256495a47634d609602fc487830aba5c" compoundref="fat__access_8c" startline="719" endline="846">fatfs_list_directory_next</referencedby>
      </memberdef>
      <memberdef kind="function" id="fat__misc_8c_1a4ed58a36d5257fed8f10aaca95433cdf" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int fatfs_entry_lfn_invalid</definition>
        <argsstring>(struct fat_dir_entry *entry)</argsstring>
        <name>fatfs_entry_lfn_invalid</name>
        <param>
          <type>struct <ref refid="structfat__dir__entry" kindref="compound">fat_dir_entry</ref> *</type>
          <declname>entry</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/fat/fat_misc.c" line="121" column="5" bodyfile="C:/Dev/git/UbixOS/sys/fs/fat/fat_misc.c" bodystart="121" bodyend="126"/>
        <references refid="structfat__dir__entry_1aa73be99077695ab87ddd8c329e12e779" compoundref="fat__defs_8h" startline="115">fat_dir_entry::Attr</references>
        <references refid="fat__defs_8h_1a9c6349054e802adf1045219e99714bed" compoundref="fat__defs_8h" startline="77">FILE_ATTR_SYSHID</references>
        <references refid="fat__defs_8h_1a491017a8d29ca6102617583588eceb0e" compoundref="fat__defs_8h" startline="78">FILE_ATTR_VOLUME_ID</references>
        <references refid="fat__defs_8h_1a7e2aeee00ea979682b81bea8f046af71" compoundref="fat__defs_8h" startline="82">FILE_HEADER_BLANK</references>
        <references refid="fat__defs_8h_1acc2882877e3f516e53feb76ee87013d3" compoundref="fat__defs_8h" startline="83">FILE_HEADER_DELETED</references>
        <references refid="structfat__dir__entry_1a3b690c897cb2883c0fd9b651128fbc69" compoundref="fat__defs_8h" startline="114">fat_dir_entry::Name</references>
        <referencedby refid="fat__access_8h_1a8a18a3afa5804c2c3143f671d462687d" compoundref="fat__access_8c" startline="380" endline="472">fatfs_get_file_entry</referencedby>
        <referencedby refid="fat__access_8h_1a256495a47634d609602fc487830aba5c" compoundref="fat__access_8c" startline="719" endline="846">fatfs_list_directory_next</referencedby>
        <referencedby refid="fat__access_8h_1a7333a9802b496ce05ca6df36c2fc6009" compoundref="fat__access_8c" startline="643" endline="702">fatfs_mark_file_deleted</referencedby>
        <referencedby refid="fat__access_8h_1a8bdad35bc1dd908eda5d02f47a8d73d4" compoundref="fat__access_8c" startline="478" endline="519">fatfs_sfn_exists</referencedby>
        <referencedby refid="fat__access_8h_1af94f715b4cdb59cf7854b564de855a65" compoundref="fat__access_8c" startline="578" endline="636">fatfs_update_file_length</referencedby>
      </memberdef>
      <memberdef kind="function" id="fat__misc_8c_1a7dac9a0d5348d1d6e9df6479c29d03c4" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int fatfs_entry_lfn_text</definition>
        <argsstring>(struct fat_dir_entry *entry)</argsstring>
        <name>fatfs_entry_lfn_text</name>
        <param>
          <type>struct <ref refid="structfat__dir__entry" kindref="compound">fat_dir_entry</ref> *</type>
          <declname>entry</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/fat/fat_misc.c" line="110" column="5" bodyfile="C:/Dev/git/UbixOS/sys/fs/fat/fat_misc.c" bodystart="110" bodyend="115"/>
        <references refid="structfat__dir__entry_1aa73be99077695ab87ddd8c329e12e779" compoundref="fat__defs_8h" startline="115">fat_dir_entry::Attr</references>
        <references refid="fat__defs_8h_1aeb0ab47a26edbbf113af1128a44304ee" compoundref="fat__defs_8h" startline="81">FILE_ATTR_LFN_TEXT</references>
        <referencedby refid="fat__access_8h_1a8a18a3afa5804c2c3143f671d462687d" compoundref="fat__access_8c" startline="380" endline="472">fatfs_get_file_entry</referencedby>
        <referencedby refid="fat__access_8h_1a256495a47634d609602fc487830aba5c" compoundref="fat__access_8c" startline="719" endline="846">fatfs_list_directory_next</referencedby>
        <referencedby refid="fat__access_8h_1a7333a9802b496ce05ca6df36c2fc6009" compoundref="fat__access_8c" startline="643" endline="702">fatfs_mark_file_deleted</referencedby>
        <referencedby refid="fat__access_8h_1a8bdad35bc1dd908eda5d02f47a8d73d4" compoundref="fat__access_8c" startline="478" endline="519">fatfs_sfn_exists</referencedby>
        <referencedby refid="fat__access_8h_1af94f715b4cdb59cf7854b564de855a65" compoundref="fat__access_8c" startline="578" endline="636">fatfs_update_file_length</referencedby>
      </memberdef>
      <memberdef kind="function" id="fat__misc_8c_1a0c733bd55626e6751be7a7fcd770acd5" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int fatfs_entry_sfn_only</definition>
        <argsstring>(struct fat_dir_entry *entry)</argsstring>
        <name>fatfs_entry_sfn_only</name>
        <param>
          <type>struct <ref refid="structfat__dir__entry" kindref="compound">fat_dir_entry</ref> *</type>
          <declname>entry</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/fat/fat_misc.c" line="142" column="5" bodyfile="C:/Dev/git/UbixOS/sys/fs/fat/fat_misc.c" bodystart="142" bodyend="147"/>
        <references refid="structfat__dir__entry_1aa73be99077695ab87ddd8c329e12e779" compoundref="fat__defs_8h" startline="115">fat_dir_entry::Attr</references>
        <references refid="fat__defs_8h_1aeb0ab47a26edbbf113af1128a44304ee" compoundref="fat__defs_8h" startline="81">FILE_ATTR_LFN_TEXT</references>
        <references refid="fat__defs_8h_1a9c6349054e802adf1045219e99714bed" compoundref="fat__defs_8h" startline="77">FILE_ATTR_SYSHID</references>
        <references refid="fat__defs_8h_1a491017a8d29ca6102617583588eceb0e" compoundref="fat__defs_8h" startline="78">FILE_ATTR_VOLUME_ID</references>
        <references refid="fat__defs_8h_1a7e2aeee00ea979682b81bea8f046af71" compoundref="fat__defs_8h" startline="82">FILE_HEADER_BLANK</references>
        <references refid="fat__defs_8h_1acc2882877e3f516e53feb76ee87013d3" compoundref="fat__defs_8h" startline="83">FILE_HEADER_DELETED</references>
        <references refid="structfat__dir__entry_1a3b690c897cb2883c0fd9b651128fbc69" compoundref="fat__defs_8h" startline="114">fat_dir_entry::Name</references>
        <referencedby refid="fat__access_8h_1a8a18a3afa5804c2c3143f671d462687d" compoundref="fat__access_8c" startline="380" endline="472">fatfs_get_file_entry</referencedby>
        <referencedby refid="fat__access_8h_1a256495a47634d609602fc487830aba5c" compoundref="fat__access_8c" startline="719" endline="846">fatfs_list_directory_next</referencedby>
        <referencedby refid="fat__access_8h_1a7333a9802b496ce05ca6df36c2fc6009" compoundref="fat__access_8c" startline="643" endline="702">fatfs_mark_file_deleted</referencedby>
        <referencedby refid="fat__access_8h_1a8bdad35bc1dd908eda5d02f47a8d73d4" compoundref="fat__access_8c" startline="478" endline="519">fatfs_sfn_exists</referencedby>
        <referencedby refid="fat__access_8h_1af94f715b4cdb59cf7854b564de855a65" compoundref="fat__access_8c" startline="578" endline="636">fatfs_update_file_length</referencedby>
      </memberdef>
      <memberdef kind="function" id="fat__misc_8c_1a0af6939cdfa14c20077e9508d1fd861d" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void fatfs_filename_to_lfn</definition>
        <argsstring>(char *filename, uint8 *buffer, int entry, uint8 sfnChk)</argsstring>
        <name>fatfs_filename_to_lfn</name>
        <param>
          <type>char *</type>
          <declname>filename</declname>
        </param>
        <param>
          <type><ref refid="fat__types_8h_1adde6aaee8457bee49c2a92621fe22b79" kindref="member">uint8</ref> *</type>
          <declname>buffer</declname>
        </param>
        <param>
          <type>int</type>
          <declname>entry</declname>
        </param>
        <param>
          <type><ref refid="fat__types_8h_1adde6aaee8457bee49c2a92621fe22b79" kindref="member">uint8</ref></type>
          <declname>sfnChk</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/fat/fat_misc.c" line="186" column="6" bodyfile="C:/Dev/git/UbixOS/sys/fs/fat/fat_misc.c" bodystart="186" bodyend="220"/>
        <references refid="shell_8c_1aff2566f4c366b48d73479bef43ee4d2e" compoundref="shell_8c" startline="47">buffer</references>
        <references refid="fat__defs_8h_1a0d73859aacf6d6e4ece7720fed28b9ca" compoundref="fat__defs_8h" startline="67">FAT_DIR_ENTRY_SIZE</references>
        <references refid="fat__misc_8c_1ac8a7ba27f05e541eda01418c21acca7c" compoundref="fat__misc_8c" startline="173" endline="180">fatfs_lfn_entries_required</references>
        <references refid="fat__misc_8h_1a2677e17baacb5a8739614e571253e15e" compoundref="fat__misc_8h" startline="11">MAX_LFN_ENTRY_LENGTH</references>
        <references refid="string_8h_1ace4b911463887af5e748326323e99a23">memset</references>
        <references refid="lib_8h_1ae6c8de953239811a34eeeab09458e55e" compoundref="strlen_8c" startline="55" endline="101">strlen</references>
      </memberdef>
      <memberdef kind="function" id="fat__misc_8c_1aa8e6dc9b043562388a1117b9e47d97e8" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void fatfs_itoa</definition>
        <argsstring>(uint32 num, char *s)</argsstring>
        <name>fatfs_itoa</name>
        <param>
          <type><ref refid="fat__types_8h_1a4b435a49c74bb91f284f075e63416cb6" kindref="member">uint32</ref></type>
          <declname>num</declname>
        </param>
        <param>
          <type>char *</type>
          <declname>s</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/fat/fat_misc.c" line="319" column="13" bodyfile="C:/Dev/git/UbixOS/sys/fs/fat/fat_misc.c" bodystart="319" bodyend="337"/>
      </memberdef>
      <memberdef kind="function" id="fat__misc_8c_1a37178e1cd0b3c962e4c41bd4e350c712" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void fatfs_lfn_cache_entry</definition>
        <argsstring>(struct lfn_cache *lfn, uint8 *entryBuffer)</argsstring>
        <name>fatfs_lfn_cache_entry</name>
        <param>
          <type>struct <ref refid="structlfn__cache" kindref="compound">lfn_cache</ref> *</type>
          <declname>lfn</declname>
        </param>
        <param>
          <type><ref refid="fat__types_8h_1adde6aaee8457bee49c2a92621fe22b79" kindref="member">uint8</ref> *</type>
          <declname>entryBuffer</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/fat/fat_misc.c" line="56" column="6" bodyfile="C:/Dev/git/UbixOS/sys/fs/fat/fat_misc.c" bodystart="56" bodyend="88"/>
        <references refid="fat__misc_8h_1a2677e17baacb5a8739614e571253e15e" compoundref="fat__misc_8h" startline="11">MAX_LFN_ENTRY_LENGTH</references>
        <references refid="fat__misc_8h_1aa9404fb17284e70b3ca510d8c422c348" compoundref="fat__misc_8h" startline="10">MAX_LONGFILENAME_ENTRIES</references>
        <references refid="structlfn__cache_1ad3c6533b79bd11d2218af143778e570d" compoundref="fat__misc_8h" startline="37">lfn_cache::no_of_strings</references>
        <references refid="structlfn__cache_1a2602f28cce8a1e1aaadd03b543528dc9" compoundref="fat__misc_8h" startline="34">lfn_cache::String</references>
        <referencedby refid="fat__access_8h_1a8a18a3afa5804c2c3143f671d462687d" compoundref="fat__access_8c" startline="380" endline="472">fatfs_get_file_entry</referencedby>
        <referencedby refid="fat__access_8h_1a256495a47634d609602fc487830aba5c" compoundref="fat__access_8c" startline="719" endline="846">fatfs_list_directory_next</referencedby>
      </memberdef>
      <memberdef kind="function" id="fat__misc_8c_1a30fee82472e2faf585b0a84068abc672" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>char *</type>
        <definition>char* fatfs_lfn_cache_get</definition>
        <argsstring>(struct lfn_cache *lfn)</argsstring>
        <name>fatfs_lfn_cache_get</name>
        <param>
          <type>struct <ref refid="structlfn__cache" kindref="compound">lfn_cache</ref> *</type>
          <declname>lfn</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/fat/fat_misc.c" line="94" column="6" bodyfile="C:/Dev/git/UbixOS/sys/fs/fat/fat_misc.c" bodystart="94" bodyend="104"/>
        <references refid="fat__misc_8h_1aa9404fb17284e70b3ca510d8c422c348" compoundref="fat__misc_8h" startline="10">MAX_LONGFILENAME_ENTRIES</references>
        <references refid="structlfn__cache_1ad3c6533b79bd11d2218af143778e570d" compoundref="fat__misc_8h" startline="37">lfn_cache::no_of_strings</references>
        <references refid="structlfn__cache_1a9217d0b98362b34ff1fda188c4755bd4" compoundref="fat__misc_8h" startline="35">lfn_cache::Null</references>
        <references refid="structlfn__cache_1a2602f28cce8a1e1aaadd03b543528dc9" compoundref="fat__misc_8h" startline="34">lfn_cache::String</references>
        <referencedby refid="fat__access_8h_1a8a18a3afa5804c2c3143f671d462687d" compoundref="fat__access_8c" startline="380" endline="472">fatfs_get_file_entry</referencedby>
        <referencedby refid="fat__access_8h_1a256495a47634d609602fc487830aba5c" compoundref="fat__access_8c" startline="719" endline="846">fatfs_list_directory_next</referencedby>
      </memberdef>
      <memberdef kind="function" id="fat__misc_8c_1aa1fe29de6c2c59fdcf3159607ac2af47" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void fatfs_lfn_cache_init</definition>
        <argsstring>(struct lfn_cache *lfn, int wipeTable)</argsstring>
        <name>fatfs_lfn_cache_init</name>
        <param>
          <type>struct <ref refid="structlfn__cache" kindref="compound">lfn_cache</ref> *</type>
          <declname>lfn</declname>
        </param>
        <param>
          <type>int</type>
          <declname>wipeTable</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/fat/fat_misc.c" line="38" column="6" bodyfile="C:/Dev/git/UbixOS/sys/fs/fat/fat_misc.c" bodystart="38" bodyend="50"/>
        <references refid="fat__misc_8h_1a2677e17baacb5a8739614e571253e15e" compoundref="fat__misc_8h" startline="11">MAX_LFN_ENTRY_LENGTH</references>
        <references refid="fat__misc_8h_1aa9404fb17284e70b3ca510d8c422c348" compoundref="fat__misc_8h" startline="10">MAX_LONGFILENAME_ENTRIES</references>
        <references refid="string_8h_1ace4b911463887af5e748326323e99a23">memset</references>
        <references refid="structlfn__cache_1ad3c6533b79bd11d2218af143778e570d" compoundref="fat__misc_8h" startline="37">lfn_cache::no_of_strings</references>
        <references refid="structlfn__cache_1a2602f28cce8a1e1aaadd03b543528dc9" compoundref="fat__misc_8h" startline="34">lfn_cache::String</references>
        <referencedby refid="fat__access_8h_1a8a18a3afa5804c2c3143f671d462687d" compoundref="fat__access_8c" startline="380" endline="472">fatfs_get_file_entry</referencedby>
        <referencedby refid="fat__access_8h_1a256495a47634d609602fc487830aba5c" compoundref="fat__access_8c" startline="719" endline="846">fatfs_list_directory_next</referencedby>
      </memberdef>
      <memberdef kind="function" id="fat__misc_8c_1a25a4d4a522ffdb06b4fab094d05b1763" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int fatfs_lfn_create_sfn</definition>
        <argsstring>(char *sfn_output, char *filename)</argsstring>
        <name>fatfs_lfn_create_sfn</name>
        <param>
          <type>char *</type>
          <declname>sfn_output</declname>
        </param>
        <param>
          <type>char *</type>
          <declname>filename</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/fat/fat_misc.c" line="260" column="5" bodyfile="C:/Dev/git/UbixOS/sys/fs/fat/fat_misc.c" bodystart="260" bodyend="315"/>
        <references refid="fat__defs_8h_1a0918d60f1f01721da31d3b2b0f79f7aa" compoundref="fat__defs_8h" startline="68">FAT_SFN_SIZE_FULL</references>
        <references refid="fat__defs_8h_1a25a96fb1ddc1bd5dae208f2491b0f7c3" compoundref="fat__defs_8h" startline="69">FAT_SFN_SIZE_PARTIAL</references>
        <references refid="string_8h_1ace4b911463887af5e748326323e99a23">memset</references>
        <references refid="lib_8h_1ae6c8de953239811a34eeeab09458e55e" compoundref="strlen_8c" startline="55" endline="101">strlen</references>
      </memberdef>
      <memberdef kind="function" id="fat__misc_8c_1ac8a7ba27f05e541eda01418c21acca7c" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int fatfs_lfn_entries_required</definition>
        <argsstring>(char *filename)</argsstring>
        <name>fatfs_lfn_entries_required</name>
        <param>
          <type>char *</type>
          <declname>filename</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/fat/fat_misc.c" line="173" column="5" bodyfile="C:/Dev/git/UbixOS/sys/fs/fat/fat_misc.c" bodystart="173" bodyend="180"/>
        <references refid="fat__misc_8h_1a2677e17baacb5a8739614e571253e15e" compoundref="fat__misc_8h" startline="11">MAX_LFN_ENTRY_LENGTH</references>
        <references refid="lib_8h_1ae6c8de953239811a34eeeab09458e55e" compoundref="strlen_8c" startline="55" endline="101">strlen</references>
        <referencedby refid="fat__write_8h_1a1d762d2afde765d8848e7eaff4dd2fb1" compoundref="fat__write_8c" startline="266" endline="372">fatfs_add_file_entry</referencedby>
        <referencedby refid="fat__misc_8h_1a0af6939cdfa14c20077e9508d1fd861d" compoundref="fat__misc_8c" startline="186" endline="220">fatfs_filename_to_lfn</referencedby>
      </memberdef>
      <memberdef kind="function" id="fat__misc_8c_1a140f2ac336bea9e8c945b6357fc65083" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int fatfs_lfn_generate_tail</definition>
        <argsstring>(char *sfn_output, char *sfn_input, uint32 tailNum)</argsstring>
        <name>fatfs_lfn_generate_tail</name>
        <param>
          <type>char *</type>
          <declname>sfn_output</declname>
        </param>
        <param>
          <type>char *</type>
          <declname>sfn_input</declname>
        </param>
        <param>
          <type><ref refid="fat__types_8h_1a4b435a49c74bb91f284f075e63416cb6" kindref="member">uint32</ref></type>
          <declname>tailNum</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/fat/fat_misc.c" line="346" column="5" bodyfile="C:/Dev/git/UbixOS/sys/fs/fat/fat_misc.c" bodystart="346" bodyend="366"/>
        <references refid="string_8h_1ace4b911463887af5e748326323e99a23">memset</references>
      </memberdef>
      <memberdef kind="function" id="fat__misc_8c_1ae562db5b28f07a3d0407e38aa9a77c13" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void fatfs_sfn_create_entry</definition>
        <argsstring>(char *shortfilename, uint32 size, uint32 startCluster, struct fat_dir_entry *entry, int dir)</argsstring>
        <name>fatfs_sfn_create_entry</name>
        <param>
          <type>char *</type>
          <declname>shortfilename</declname>
        </param>
        <param>
          <type><ref refid="fat__types_8h_1a4b435a49c74bb91f284f075e63416cb6" kindref="member">uint32</ref></type>
          <declname>size</declname>
        </param>
        <param>
          <type><ref refid="fat__types_8h_1a4b435a49c74bb91f284f075e63416cb6" kindref="member">uint32</ref></type>
          <declname>startCluster</declname>
        </param>
        <param>
          <type>struct <ref refid="structfat__dir__entry" kindref="compound">fat_dir_entry</ref> *</type>
          <declname>entry</declname>
        </param>
        <param>
          <type>int</type>
          <declname>dir</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/fat/fat_misc.c" line="226" column="6" bodyfile="C:/Dev/git/UbixOS/sys/fs/fat/fat_misc.c" bodystart="226" bodyend="254"/>
        <references refid="structfat__dir__entry_1aa73be99077695ab87ddd8c329e12e779" compoundref="fat__defs_8h" startline="115">fat_dir_entry::Attr</references>
        <references refid="structfat__dir__entry_1a4a12f862ca27a01051664d72e6c95b6e" compoundref="fat__defs_8h" startline="119">fat_dir_entry::CrtDate</references>
        <references refid="structfat__dir__entry_1a6a6b6e66fa26b03fad695a62bc12905f" compoundref="fat__defs_8h" startline="118">fat_dir_entry::CrtTime</references>
        <references refid="structfat__dir__entry_1a2201702ad673bc37d3e732f4baab3ef6" compoundref="fat__defs_8h" startline="117">fat_dir_entry::CrtTimeTenth</references>
        <references refid="fat__types_8h_1a79f47acd161cf6d4943a43745c179a6e" compoundref="fat__types_8h" startline="46">FAT_HTONL</references>
        <references refid="fat__types_8h_1abbb9c5db3bb96b1398c9b011870c335b" compoundref="fat__types_8h" startline="45">FAT_HTONS</references>
        <references refid="fat__defs_8h_1a0918d60f1f01721da31d3b2b0f79f7aa" compoundref="fat__defs_8h" startline="68">FAT_SFN_SIZE_FULL</references>
        <references refid="fat__defs_8h_1a57d8f1ade52476af4ab3c03f7387b973" compoundref="fat__defs_8h" startline="84">FILE_TYPE_DIR</references>
        <references refid="fat__defs_8h_1abace2d6eb53e065d5a32ab4c4758813b" compoundref="fat__defs_8h" startline="85">FILE_TYPE_FILE</references>
        <references refid="structfat__dir__entry_1a0a053ffe5aa88eb280c5ddde56c3c0c8" compoundref="fat__defs_8h" startline="125">fat_dir_entry::FileSize</references>
        <references refid="structfat__dir__entry_1abc27727d77c39b4481215c310058e7ef" compoundref="fat__defs_8h" startline="121">fat_dir_entry::FstClusHI</references>
        <references refid="structfat__dir__entry_1ae91aaa2c62dd33e7f7d6e5042e7c42ed" compoundref="fat__defs_8h" startline="124">fat_dir_entry::FstClusLO</references>
        <references refid="structfat__dir__entry_1a3908642d313faf4cb05c70052ce34b91" compoundref="fat__defs_8h" startline="120">fat_dir_entry::LstAccDate</references>
        <references refid="structfat__dir__entry_1a3b690c897cb2883c0fd9b651128fbc69" compoundref="fat__defs_8h" startline="114">fat_dir_entry::Name</references>
        <references refid="structfat__dir__entry_1a0af375d10cb5e96f95787716816a64d1" compoundref="fat__defs_8h" startline="116">fat_dir_entry::NTRes</references>
        <references refid="structfat__dir__entry_1a7e05fe6b6708c7e57ff675fe06d47d58" compoundref="fat__defs_8h" startline="123">fat_dir_entry::WrtDate</references>
        <references refid="structfat__dir__entry_1acab2693a2267a89aaaa11ffb35ec479d" compoundref="fat__defs_8h" startline="122">fat_dir_entry::WrtTime</references>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>FAT16/32<sp/>File<sp/>IO<sp/>Library</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>V2.6</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="5"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Ultra-Embedded.com</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="6"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Copyright<sp/>2003<sp/>-<sp/>2012</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="7"><highlight class="normal"></highlight><highlight class="comment">//</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="8"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Email:<sp/>admin@ultra-embedded.com</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="9"><highlight class="normal"></highlight><highlight class="comment">//</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="10"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>License:<sp/>GPL</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="11"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/>If<sp/>you<sp/>would<sp/>like<sp/>a<sp/>version<sp/>with<sp/>a<sp/>more<sp/>permissive<sp/>license<sp/>for<sp/>use<sp/>in</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="12"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/>closed<sp/>source<sp/>commercial<sp/>applications<sp/>please<sp/>contact<sp/>me<sp/>for<sp/>details.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="13"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="14"><highlight class="normal"></highlight><highlight class="comment">//</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="15"><highlight class="normal"></highlight><highlight class="comment">//<sp/>This<sp/>file<sp/>is<sp/>part<sp/>of<sp/>FAT<sp/>File<sp/>IO<sp/>Library.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="16"><highlight class="normal"></highlight><highlight class="comment">//</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="17"><highlight class="normal"></highlight><highlight class="comment">//<sp/>FAT<sp/>File<sp/>IO<sp/>Library<sp/>is<sp/>free<sp/>software;<sp/>you<sp/>can<sp/>redistribute<sp/>it<sp/>and/or<sp/>modify</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="18"><highlight class="normal"></highlight><highlight class="comment">//<sp/>it<sp/>under<sp/>the<sp/>terms<sp/>of<sp/>the<sp/>GNU<sp/>General<sp/>Public<sp/>License<sp/>as<sp/>published<sp/>by</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="19"><highlight class="normal"></highlight><highlight class="comment">//<sp/>the<sp/>Free<sp/>Software<sp/>Foundation;<sp/>either<sp/>version<sp/>2<sp/>of<sp/>the<sp/>License,<sp/>or</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="20"><highlight class="normal"></highlight><highlight class="comment">//<sp/>(at<sp/>your<sp/>option)<sp/>any<sp/>later<sp/>version.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="21"><highlight class="normal"></highlight><highlight class="comment">//</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="22"><highlight class="normal"></highlight><highlight class="comment">//<sp/>FAT<sp/>File<sp/>IO<sp/>Library<sp/>is<sp/>distributed<sp/>in<sp/>the<sp/>hope<sp/>that<sp/>it<sp/>will<sp/>be<sp/>useful,</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="23"><highlight class="normal"></highlight><highlight class="comment">//<sp/>but<sp/>WITHOUT<sp/>ANY<sp/>WARRANTY;<sp/>without<sp/>even<sp/>the<sp/>implied<sp/>warranty<sp/>of</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="24"><highlight class="normal"></highlight><highlight class="comment">//<sp/>MERCHANTABILITY<sp/>or<sp/>FITNESS<sp/>FOR<sp/>A<sp/>PARTICULAR<sp/>PURPOSE.<sp/><sp/>See<sp/>the</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="25"><highlight class="normal"></highlight><highlight class="comment">//<sp/>GNU<sp/>General<sp/>Public<sp/>License<sp/>for<sp/>more<sp/>details.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="26"><highlight class="normal"></highlight><highlight class="comment">//</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="27"><highlight class="normal"></highlight><highlight class="comment">//<sp/>You<sp/>should<sp/>have<sp/>received<sp/>a<sp/>copy<sp/>of<sp/>the<sp/>GNU<sp/>General<sp/>Public<sp/>License</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="28"><highlight class="normal"></highlight><highlight class="comment">//<sp/>along<sp/>with<sp/>FAT<sp/>File<sp/>IO<sp/>Library;<sp/>if<sp/>not,<sp/>write<sp/>to<sp/>the<sp/>Free<sp/>Software</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="29"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Foundation,<sp/>Inc.,<sp/>59<sp/>Temple<sp/>Place,<sp/>Suite<sp/>330,<sp/>Boston,<sp/>MA<sp/><sp/>02111-1307<sp/><sp/>USA</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="30"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="31"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="32"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="string_8h" kindref="compound">string.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="33"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="fat__misc_8h" kindref="compound">fat_misc.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="34"><highlight class="normal"></highlight></codeline>
<codeline lineno="35"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="36"><highlight class="normal"></highlight><highlight class="comment">//<sp/>fatfs_lfn_cache_init:<sp/>Clear<sp/>long<sp/>file<sp/>name<sp/>cache</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="37"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="38" refid="fat__misc_8h_1aa1fe29de6c2c59fdcf3159607ac2af47" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="fat__misc_8c_1aa1fe29de6c2c59fdcf3159607ac2af47" kindref="member">fatfs_lfn_cache_init</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structlfn__cache" kindref="compound">lfn_cache</ref><sp/>*lfn,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>wipeTable)<sp/>{</highlight></codeline>
<codeline lineno="39"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="40"><highlight class="normal"></highlight></codeline>
<codeline lineno="41"><highlight class="normal"><sp/><sp/>lfn-&gt;<ref refid="structlfn__cache_1ad3c6533b79bd11d2218af143778e570d" kindref="member">no_of_strings</ref><sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="42"><highlight class="normal"></highlight></codeline>
<codeline lineno="43"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>FATFS_INC_LFN_SUPPORT</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="44"><highlight class="normal"></highlight></codeline>
<codeline lineno="45"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Zero<sp/>out<sp/>buffer<sp/>also</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="46"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(wipeTable)</highlight></codeline>
<codeline lineno="47"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/><ref refid="fat__misc_8h_1aa9404fb17284e70b3ca510d8c422c348" kindref="member">MAX_LONGFILENAME_ENTRIES</ref>;<sp/>i++)</highlight></codeline>
<codeline lineno="48"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="string_8h_1ace4b911463887af5e748326323e99a23" kindref="member">memset</ref>(lfn-&gt;<ref refid="structlfn__cache_1a2602f28cce8a1e1aaadd03b543528dc9" kindref="member">String</ref>[i],<sp/>0x00,<sp/><ref refid="fat__misc_8h_1a2677e17baacb5a8739614e571253e15e" kindref="member">MAX_LFN_ENTRY_LENGTH</ref>);</highlight></codeline>
<codeline lineno="49"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="50"><highlight class="normal">}</highlight></codeline>
<codeline lineno="51"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="52"><highlight class="normal"></highlight><highlight class="comment">//<sp/>fatfs_lfn_cache_entry<sp/>-<sp/>Function<sp/>extracts<sp/>long<sp/>file<sp/>name<sp/>text<sp/>from<sp/>sector</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="53"><highlight class="normal"></highlight><highlight class="comment">//<sp/>at<sp/>a<sp/>specific<sp/>offset</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="54"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="55"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>FATFS_INC_LFN_SUPPORT</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="56" refid="fat__misc_8h_1a37178e1cd0b3c962e4c41bd4e350c712" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="fat__misc_8c_1a37178e1cd0b3c962e4c41bd4e350c712" kindref="member">fatfs_lfn_cache_entry</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structlfn__cache" kindref="compound">lfn_cache</ref><sp/>*lfn,<sp/><ref refid="fat__types_8h_1adde6aaee8457bee49c2a92621fe22b79" kindref="member">uint8</ref><sp/>*entryBuffer)<sp/>{</highlight></codeline>
<codeline lineno="57"><highlight class="normal"><sp/><sp/><ref refid="fat__types_8h_1adde6aaee8457bee49c2a92621fe22b79" kindref="member">uint8</ref><sp/>LFNIndex,<sp/>i;</highlight></codeline>
<codeline lineno="58"><highlight class="normal"><sp/><sp/>LFNIndex<sp/>=<sp/>entryBuffer[0]<sp/>&amp;<sp/>0x1F;</highlight></codeline>
<codeline lineno="59"><highlight class="normal"></highlight></codeline>
<codeline lineno="60"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Limit<sp/>file<sp/>name<sp/>to<sp/>cache<sp/>size!</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="61"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(LFNIndex<sp/>&gt;<sp/><ref refid="fat__misc_8h_1aa9404fb17284e70b3ca510d8c422c348" kindref="member">MAX_LONGFILENAME_ENTRIES</ref>)</highlight></codeline>
<codeline lineno="62"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="63"><highlight class="normal"></highlight></codeline>
<codeline lineno="64"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>This<sp/>is<sp/>an<sp/>error<sp/>condition</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="65"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(LFNIndex<sp/>==<sp/>0)</highlight></codeline>
<codeline lineno="66"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="67"><highlight class="normal"></highlight></codeline>
<codeline lineno="68"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(lfn-&gt;<ref refid="structlfn__cache_1ad3c6533b79bd11d2218af143778e570d" kindref="member">no_of_strings</ref><sp/>==<sp/>0)</highlight></codeline>
<codeline lineno="69"><highlight class="normal"><sp/><sp/><sp/><sp/>lfn-&gt;<ref refid="structlfn__cache_1ad3c6533b79bd11d2218af143778e570d" kindref="member">no_of_strings</ref><sp/>=<sp/>LFNIndex;</highlight></codeline>
<codeline lineno="70"><highlight class="normal"></highlight></codeline>
<codeline lineno="71"><highlight class="normal"><sp/><sp/>lfn-&gt;<ref refid="structlfn__cache_1a2602f28cce8a1e1aaadd03b543528dc9" kindref="member">String</ref>[LFNIndex<sp/>-<sp/>1][0]<sp/>=<sp/>entryBuffer[1];</highlight></codeline>
<codeline lineno="72"><highlight class="normal"><sp/><sp/>lfn-&gt;<ref refid="structlfn__cache_1a2602f28cce8a1e1aaadd03b543528dc9" kindref="member">String</ref>[LFNIndex<sp/>-<sp/>1][1]<sp/>=<sp/>entryBuffer[3];</highlight></codeline>
<codeline lineno="73"><highlight class="normal"><sp/><sp/>lfn-&gt;<ref refid="structlfn__cache_1a2602f28cce8a1e1aaadd03b543528dc9" kindref="member">String</ref>[LFNIndex<sp/>-<sp/>1][2]<sp/>=<sp/>entryBuffer[5];</highlight></codeline>
<codeline lineno="74"><highlight class="normal"><sp/><sp/>lfn-&gt;<ref refid="structlfn__cache_1a2602f28cce8a1e1aaadd03b543528dc9" kindref="member">String</ref>[LFNIndex<sp/>-<sp/>1][3]<sp/>=<sp/>entryBuffer[7];</highlight></codeline>
<codeline lineno="75"><highlight class="normal"><sp/><sp/>lfn-&gt;<ref refid="structlfn__cache_1a2602f28cce8a1e1aaadd03b543528dc9" kindref="member">String</ref>[LFNIndex<sp/>-<sp/>1][4]<sp/>=<sp/>entryBuffer[9];</highlight></codeline>
<codeline lineno="76"><highlight class="normal"><sp/><sp/>lfn-&gt;<ref refid="structlfn__cache_1a2602f28cce8a1e1aaadd03b543528dc9" kindref="member">String</ref>[LFNIndex<sp/>-<sp/>1][5]<sp/>=<sp/>entryBuffer[0x0E];</highlight></codeline>
<codeline lineno="77"><highlight class="normal"><sp/><sp/>lfn-&gt;<ref refid="structlfn__cache_1a2602f28cce8a1e1aaadd03b543528dc9" kindref="member">String</ref>[LFNIndex<sp/>-<sp/>1][6]<sp/>=<sp/>entryBuffer[0x10];</highlight></codeline>
<codeline lineno="78"><highlight class="normal"><sp/><sp/>lfn-&gt;<ref refid="structlfn__cache_1a2602f28cce8a1e1aaadd03b543528dc9" kindref="member">String</ref>[LFNIndex<sp/>-<sp/>1][7]<sp/>=<sp/>entryBuffer[0x12];</highlight></codeline>
<codeline lineno="79"><highlight class="normal"><sp/><sp/>lfn-&gt;<ref refid="structlfn__cache_1a2602f28cce8a1e1aaadd03b543528dc9" kindref="member">String</ref>[LFNIndex<sp/>-<sp/>1][8]<sp/>=<sp/>entryBuffer[0x14];</highlight></codeline>
<codeline lineno="80"><highlight class="normal"><sp/><sp/>lfn-&gt;<ref refid="structlfn__cache_1a2602f28cce8a1e1aaadd03b543528dc9" kindref="member">String</ref>[LFNIndex<sp/>-<sp/>1][9]<sp/>=<sp/>entryBuffer[0x16];</highlight></codeline>
<codeline lineno="81"><highlight class="normal"><sp/><sp/>lfn-&gt;<ref refid="structlfn__cache_1a2602f28cce8a1e1aaadd03b543528dc9" kindref="member">String</ref>[LFNIndex<sp/>-<sp/>1][10]<sp/>=<sp/>entryBuffer[0x18];</highlight></codeline>
<codeline lineno="82"><highlight class="normal"><sp/><sp/>lfn-&gt;<ref refid="structlfn__cache_1a2602f28cce8a1e1aaadd03b543528dc9" kindref="member">String</ref>[LFNIndex<sp/>-<sp/>1][11]<sp/>=<sp/>entryBuffer[0x1C];</highlight></codeline>
<codeline lineno="83"><highlight class="normal"><sp/><sp/>lfn-&gt;<ref refid="structlfn__cache_1a2602f28cce8a1e1aaadd03b543528dc9" kindref="member">String</ref>[LFNIndex<sp/>-<sp/>1][12]<sp/>=<sp/>entryBuffer[0x1E];</highlight></codeline>
<codeline lineno="84"><highlight class="normal"></highlight></codeline>
<codeline lineno="85"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/><ref refid="fat__misc_8h_1a2677e17baacb5a8739614e571253e15e" kindref="member">MAX_LFN_ENTRY_LENGTH</ref>;<sp/>i++)</highlight></codeline>
<codeline lineno="86"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(lfn-&gt;<ref refid="structlfn__cache_1a2602f28cce8a1e1aaadd03b543528dc9" kindref="member">String</ref>[LFNIndex<sp/>-<sp/>1][i]<sp/>==<sp/>0xFF)</highlight></codeline>
<codeline lineno="87"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>lfn-&gt;<ref refid="structlfn__cache_1a2602f28cce8a1e1aaadd03b543528dc9" kindref="member">String</ref>[LFNIndex<sp/>-<sp/>1][i]<sp/>=<sp/>0x20;<sp/></highlight><highlight class="comment">//<sp/>Replace<sp/>with<sp/>spaces</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="88"><highlight class="normal">}</highlight></codeline>
<codeline lineno="89"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="90"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="91"><highlight class="normal"></highlight><highlight class="comment">//<sp/>fatfs_lfn_cache_get:<sp/>Get<sp/>a<sp/>reference<sp/>to<sp/>the<sp/>long<sp/>filename</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="92"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="93"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>FATFS_INC_LFN_SUPPORT</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="94" refid="fat__misc_8h_1a30fee82472e2faf585b0a84068abc672" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/><ref refid="fat__misc_8c_1a30fee82472e2faf585b0a84068abc672" kindref="member">fatfs_lfn_cache_get</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structlfn__cache" kindref="compound">lfn_cache</ref><sp/>*lfn)<sp/>{</highlight></codeline>
<codeline lineno="95"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Null<sp/>terminate<sp/>long<sp/>filename</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="96"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(lfn-&gt;<ref refid="structlfn__cache_1ad3c6533b79bd11d2218af143778e570d" kindref="member">no_of_strings</ref><sp/>==<sp/><ref refid="fat__misc_8h_1aa9404fb17284e70b3ca510d8c422c348" kindref="member">MAX_LONGFILENAME_ENTRIES</ref>)</highlight></codeline>
<codeline lineno="97"><highlight class="normal"><sp/><sp/><sp/><sp/>lfn-&gt;<ref refid="structlfn__cache_1a9217d0b98362b34ff1fda188c4755bd4" kindref="member">Null</ref><sp/>=<sp/></highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="98"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(lfn-&gt;<ref refid="structlfn__cache_1ad3c6533b79bd11d2218af143778e570d" kindref="member">no_of_strings</ref>)</highlight></codeline>
<codeline lineno="99"><highlight class="normal"><sp/><sp/><sp/><sp/>lfn-&gt;<ref refid="structlfn__cache_1a2602f28cce8a1e1aaadd03b543528dc9" kindref="member">String</ref>[lfn-&gt;<ref refid="structlfn__cache_1ad3c6533b79bd11d2218af143778e570d" kindref="member">no_of_strings</ref>][0]<sp/>=<sp/></highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="100"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="101"><highlight class="normal"><sp/><sp/><sp/><sp/>lfn-&gt;<ref refid="structlfn__cache_1a2602f28cce8a1e1aaadd03b543528dc9" kindref="member">String</ref>[0][0]<sp/>=<sp/></highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="102"><highlight class="normal"></highlight></codeline>
<codeline lineno="103"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*)<sp/>&amp;lfn-&gt;<ref refid="structlfn__cache_1a2602f28cce8a1e1aaadd03b543528dc9" kindref="member">String</ref>[0][0];</highlight></codeline>
<codeline lineno="104"><highlight class="normal">}</highlight></codeline>
<codeline lineno="105"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="106"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="107"><highlight class="normal"></highlight><highlight class="comment">//<sp/>fatfs_entry_lfn_text:<sp/>If<sp/>LFN<sp/>text<sp/>entry<sp/>found</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="108"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="109"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>FATFS_INC_LFN_SUPPORT</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="110" refid="fat__misc_8h_1a7dac9a0d5348d1d6e9df6479c29d03c4" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="fat__misc_8c_1a7dac9a0d5348d1d6e9df6479c29d03c4" kindref="member">fatfs_entry_lfn_text</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structfat__dir__entry" kindref="compound">fat_dir_entry</ref><sp/>*entry)<sp/>{</highlight></codeline>
<codeline lineno="111"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((entry-&gt;<ref refid="structfat__dir__entry_1aa73be99077695ab87ddd8c329e12e779" kindref="member">Attr</ref><sp/>&amp;<sp/><ref refid="fat__defs_8h_1aeb0ab47a26edbbf113af1128a44304ee" kindref="member">FILE_ATTR_LFN_TEXT</ref>)<sp/>==<sp/><ref refid="fat__defs_8h_1aeb0ab47a26edbbf113af1128a44304ee" kindref="member">FILE_ATTR_LFN_TEXT</ref>)</highlight></codeline>
<codeline lineno="112"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>1;</highlight></codeline>
<codeline lineno="113"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="114"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="115"><highlight class="normal">}</highlight></codeline>
<codeline lineno="116"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="117"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="118"><highlight class="normal"></highlight><highlight class="comment">//<sp/>fatfs_entry_lfn_invalid:<sp/>If<sp/>SFN<sp/>found<sp/>not<sp/>relating<sp/>to<sp/>LFN</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="119"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="120"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>FATFS_INC_LFN_SUPPORT</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="121" refid="fat__misc_8h_1a4ed58a36d5257fed8f10aaca95433cdf" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="fat__misc_8c_1a4ed58a36d5257fed8f10aaca95433cdf" kindref="member">fatfs_entry_lfn_invalid</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structfat__dir__entry" kindref="compound">fat_dir_entry</ref><sp/>*entry)<sp/>{</highlight></codeline>
<codeline lineno="122"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((entry-&gt;<ref refid="structfat__dir__entry_1a3b690c897cb2883c0fd9b651128fbc69" kindref="member">Name</ref>[0]<sp/>==<sp/><ref refid="fat__defs_8h_1a7e2aeee00ea979682b81bea8f046af71" kindref="member">FILE_HEADER_BLANK</ref>)<sp/>||<sp/>(entry-&gt;<ref refid="structfat__dir__entry_1a3b690c897cb2883c0fd9b651128fbc69" kindref="member">Name</ref>[0]<sp/>==<sp/><ref refid="fat__defs_8h_1acc2882877e3f516e53feb76ee87013d3" kindref="member">FILE_HEADER_DELETED</ref>)<sp/>||<sp/>(entry-&gt;<ref refid="structfat__dir__entry_1aa73be99077695ab87ddd8c329e12e779" kindref="member">Attr</ref><sp/>==<sp/><ref refid="fat__defs_8h_1a491017a8d29ca6102617583588eceb0e" kindref="member">FILE_ATTR_VOLUME_ID</ref>)<sp/>||<sp/>(entry-&gt;<ref refid="structfat__dir__entry_1aa73be99077695ab87ddd8c329e12e779" kindref="member">Attr</ref><sp/>&amp;<sp/><ref refid="fat__defs_8h_1a9c6349054e802adf1045219e99714bed" kindref="member">FILE_ATTR_SYSHID</ref>))</highlight></codeline>
<codeline lineno="123"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>1;</highlight></codeline>
<codeline lineno="124"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="125"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="126"><highlight class="normal">}</highlight></codeline>
<codeline lineno="127"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="128"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="129"><highlight class="normal"></highlight><highlight class="comment">//<sp/>fatfs_entry_lfn_exists:<sp/>If<sp/>LFN<sp/>exists<sp/>and<sp/>correlation<sp/>SFN<sp/>found</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="130"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="131"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>FATFS_INC_LFN_SUPPORT</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="132" refid="fat__misc_8h_1a27351ac7857382bf893d7e5a74cf5710" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="fat__misc_8c_1a27351ac7857382bf893d7e5a74cf5710" kindref="member">fatfs_entry_lfn_exists</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structlfn__cache" kindref="compound">lfn_cache</ref><sp/>*lfn,<sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structfat__dir__entry" kindref="compound">fat_dir_entry</ref><sp/>*entry)<sp/>{</highlight></codeline>
<codeline lineno="133"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((entry-&gt;<ref refid="structfat__dir__entry_1aa73be99077695ab87ddd8c329e12e779" kindref="member">Attr</ref><sp/>!=<sp/><ref refid="fat__defs_8h_1aeb0ab47a26edbbf113af1128a44304ee" kindref="member">FILE_ATTR_LFN_TEXT</ref>)<sp/>&amp;&amp;<sp/>(entry-&gt;<ref refid="structfat__dir__entry_1a3b690c897cb2883c0fd9b651128fbc69" kindref="member">Name</ref>[0]<sp/>!=<sp/><ref refid="fat__defs_8h_1a7e2aeee00ea979682b81bea8f046af71" kindref="member">FILE_HEADER_BLANK</ref>)<sp/>&amp;&amp;<sp/>(entry-&gt;<ref refid="structfat__dir__entry_1a3b690c897cb2883c0fd9b651128fbc69" kindref="member">Name</ref>[0]<sp/>!=<sp/><ref refid="fat__defs_8h_1acc2882877e3f516e53feb76ee87013d3" kindref="member">FILE_HEADER_DELETED</ref>)<sp/>&amp;&amp;<sp/>(entry-&gt;<ref refid="structfat__dir__entry_1aa73be99077695ab87ddd8c329e12e779" kindref="member">Attr</ref><sp/>!=<sp/><ref refid="fat__defs_8h_1a491017a8d29ca6102617583588eceb0e" kindref="member">FILE_ATTR_VOLUME_ID</ref>)<sp/>&amp;&amp;<sp/>(!(entry-&gt;<ref refid="structfat__dir__entry_1aa73be99077695ab87ddd8c329e12e779" kindref="member">Attr</ref><sp/>&amp;<sp/><ref refid="fat__defs_8h_1a9c6349054e802adf1045219e99714bed" kindref="member">FILE_ATTR_SYSHID</ref>))<sp/>&amp;&amp;<sp/>(lfn-&gt;<ref refid="structlfn__cache_1ad3c6533b79bd11d2218af143778e570d" kindref="member">no_of_strings</ref>))</highlight></codeline>
<codeline lineno="134"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>1;</highlight></codeline>
<codeline lineno="135"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="136"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="137"><highlight class="normal">}</highlight></codeline>
<codeline lineno="138"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="139"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="140"><highlight class="normal"></highlight><highlight class="comment">//<sp/>fatfs_entry_sfn_only:<sp/>If<sp/>SFN<sp/>only<sp/>exists</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="141"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="142" refid="fat__misc_8h_1a0c733bd55626e6751be7a7fcd770acd5" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="fat__misc_8c_1a0c733bd55626e6751be7a7fcd770acd5" kindref="member">fatfs_entry_sfn_only</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structfat__dir__entry" kindref="compound">fat_dir_entry</ref><sp/>*entry)<sp/>{</highlight></codeline>
<codeline lineno="143"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((entry-&gt;<ref refid="structfat__dir__entry_1aa73be99077695ab87ddd8c329e12e779" kindref="member">Attr</ref><sp/>!=<sp/><ref refid="fat__defs_8h_1aeb0ab47a26edbbf113af1128a44304ee" kindref="member">FILE_ATTR_LFN_TEXT</ref>)<sp/>&amp;&amp;<sp/>(entry-&gt;<ref refid="structfat__dir__entry_1a3b690c897cb2883c0fd9b651128fbc69" kindref="member">Name</ref>[0]<sp/>!=<sp/><ref refid="fat__defs_8h_1a7e2aeee00ea979682b81bea8f046af71" kindref="member">FILE_HEADER_BLANK</ref>)<sp/>&amp;&amp;<sp/>(entry-&gt;<ref refid="structfat__dir__entry_1a3b690c897cb2883c0fd9b651128fbc69" kindref="member">Name</ref>[0]<sp/>!=<sp/><ref refid="fat__defs_8h_1acc2882877e3f516e53feb76ee87013d3" kindref="member">FILE_HEADER_DELETED</ref>)<sp/>&amp;&amp;<sp/>(entry-&gt;<ref refid="structfat__dir__entry_1aa73be99077695ab87ddd8c329e12e779" kindref="member">Attr</ref><sp/>!=<sp/><ref refid="fat__defs_8h_1a491017a8d29ca6102617583588eceb0e" kindref="member">FILE_ATTR_VOLUME_ID</ref>)<sp/>&amp;&amp;<sp/>(!(entry-&gt;<ref refid="structfat__dir__entry_1aa73be99077695ab87ddd8c329e12e779" kindref="member">Attr</ref><sp/>&amp;<sp/><ref refid="fat__defs_8h_1a9c6349054e802adf1045219e99714bed" kindref="member">FILE_ATTR_SYSHID</ref>)))</highlight></codeline>
<codeline lineno="144"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>1;</highlight></codeline>
<codeline lineno="145"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="146"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="147"><highlight class="normal">}</highlight></codeline>
<codeline lineno="148"><highlight class="normal"></highlight><highlight class="comment">//<sp/>TODO:<sp/>FILE_ATTR_SYSHID<sp/>?!?!??!</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="149"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="150"><highlight class="normal"></highlight><highlight class="comment">//<sp/>fatfs_entry_is_dir:<sp/>Returns<sp/>1<sp/>if<sp/>a<sp/>directory</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="151"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="152" refid="fat__misc_8h_1adca70c7e5b6a384a99baf9e1ecb9d1a8" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="fat__misc_8c_1adca70c7e5b6a384a99baf9e1ecb9d1a8" kindref="member">fatfs_entry_is_dir</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structfat__dir__entry" kindref="compound">fat_dir_entry</ref><sp/>*entry)<sp/>{</highlight></codeline>
<codeline lineno="153"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(entry-&gt;<ref refid="structfat__dir__entry_1aa73be99077695ab87ddd8c329e12e779" kindref="member">Attr</ref><sp/>&amp;<sp/><ref refid="fat__defs_8h_1a57d8f1ade52476af4ab3c03f7387b973" kindref="member">FILE_TYPE_DIR</ref>)</highlight></codeline>
<codeline lineno="154"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>1;</highlight></codeline>
<codeline lineno="155"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="156"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="157"><highlight class="normal">}</highlight></codeline>
<codeline lineno="158"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="159"><highlight class="normal"></highlight><highlight class="comment">//<sp/>fatfs_entry_is_file:<sp/>Returns<sp/>1<sp/>is<sp/>a<sp/>file<sp/>entry</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="160"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="161" refid="fat__misc_8h_1a11542caa285662d2b04f9d504f8f9e87" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="fat__misc_8c_1a11542caa285662d2b04f9d504f8f9e87" kindref="member">fatfs_entry_is_file</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structfat__dir__entry" kindref="compound">fat_dir_entry</ref><sp/>*entry)<sp/>{</highlight></codeline>
<codeline lineno="162"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>2020-01-26<sp/>(MrOlsen):<sp/>0x20<sp/>=<sp/>Archive<sp/>so<sp/>0x0<sp/>should<sp/>work<sp/>too?</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="163"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((entry-&gt;<ref refid="structfat__dir__entry_1aa73be99077695ab87ddd8c329e12e779" kindref="member">Attr</ref><sp/>==<sp/>0x0)<sp/>||<sp/>(entry-&gt;<ref refid="structfat__dir__entry_1aa73be99077695ab87ddd8c329e12e779" kindref="member">Attr</ref><sp/>&amp;<sp/><ref refid="fat__defs_8h_1abace2d6eb53e065d5a32ab4c4758813b" kindref="member">FILE_TYPE_FILE</ref>))</highlight></codeline>
<codeline lineno="164"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>1;</highlight></codeline>
<codeline lineno="165"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="166"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="167"><highlight class="normal">}</highlight></codeline>
<codeline lineno="168"><highlight class="normal"></highlight></codeline>
<codeline lineno="169"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="170"><highlight class="normal"></highlight><highlight class="comment">//<sp/>fatfs_lfn_entries_required:<sp/>Calculate<sp/>number<sp/>of<sp/>13<sp/>characters<sp/>entries</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="171"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="172"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>FATFS_INC_LFN_SUPPORT</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="173" refid="fat__misc_8h_1ac8a7ba27f05e541eda01418c21acca7c" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="fat__misc_8c_1ac8a7ba27f05e541eda01418c21acca7c" kindref="member">fatfs_lfn_entries_required</ref>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*filename)<sp/>{</highlight></codeline>
<codeline lineno="174"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>length<sp/>=<sp/>(int)<sp/><ref refid="lib_8h_1ae6c8de953239811a34eeeab09458e55e" kindref="member">strlen</ref>(filename);</highlight></codeline>
<codeline lineno="175"><highlight class="normal"></highlight></codeline>
<codeline lineno="176"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(length)</highlight></codeline>
<codeline lineno="177"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(length<sp/>+<sp/><ref refid="fat__misc_8h_1a2677e17baacb5a8739614e571253e15e" kindref="member">MAX_LFN_ENTRY_LENGTH</ref><sp/>-<sp/>1)<sp/>/<sp/><ref refid="fat__misc_8h_1a2677e17baacb5a8739614e571253e15e" kindref="member">MAX_LFN_ENTRY_LENGTH</ref>;</highlight></codeline>
<codeline lineno="178"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="179"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="180"><highlight class="normal">}</highlight></codeline>
<codeline lineno="181"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="182"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="183"><highlight class="normal"></highlight><highlight class="comment">//<sp/>fatfs_filename_to_lfn:</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="184"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="185"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>FATFS_INC_LFN_SUPPORT</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="186" refid="fat__misc_8h_1a0af6939cdfa14c20077e9508d1fd861d" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="fat__misc_8c_1a0af6939cdfa14c20077e9508d1fd861d" kindref="member">fatfs_filename_to_lfn</ref>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*filename,<sp/><ref refid="fat__types_8h_1adde6aaee8457bee49c2a92621fe22b79" kindref="member">uint8</ref><sp/>*<ref refid="shell_8c_1aff2566f4c366b48d73479bef43ee4d2e" kindref="member">buffer</ref>,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>entry,<sp/><ref refid="fat__types_8h_1adde6aaee8457bee49c2a92621fe22b79" kindref="member">uint8</ref><sp/>sfnChk)<sp/>{</highlight></codeline>
<codeline lineno="187"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
<codeline lineno="188"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nameIndexes[<ref refid="fat__misc_8h_1a2677e17baacb5a8739614e571253e15e" kindref="member">MAX_LFN_ENTRY_LENGTH</ref>]<sp/>=<sp/>{<sp/>1,<sp/>3,<sp/>5,<sp/>7,<sp/>9,<sp/>0x0E,<sp/>0x10,<sp/>0x12,<sp/>0x14,<sp/>0x16,<sp/>0x18,<sp/>0x1C,<sp/>0x1E<sp/>};</highlight></codeline>
<codeline lineno="189"><highlight class="normal"></highlight></codeline>
<codeline lineno="190"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>13<sp/>characters<sp/>entries</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="191"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>length<sp/>=<sp/>(int)<sp/><ref refid="lib_8h_1ae6c8de953239811a34eeeab09458e55e" kindref="member">strlen</ref>(filename);</highlight></codeline>
<codeline lineno="192"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>entriesRequired<sp/>=<sp/><ref refid="fat__misc_8c_1ac8a7ba27f05e541eda01418c21acca7c" kindref="member">fatfs_lfn_entries_required</ref>(filename);</highlight></codeline>
<codeline lineno="193"><highlight class="normal"></highlight></codeline>
<codeline lineno="194"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Filename<sp/>offset</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="195"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>start<sp/>=<sp/>entry<sp/>*<sp/><ref refid="fat__misc_8h_1a2677e17baacb5a8739614e571253e15e" kindref="member">MAX_LFN_ENTRY_LENGTH</ref>;</highlight></codeline>
<codeline lineno="196"><highlight class="normal"></highlight></codeline>
<codeline lineno="197"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Initialise<sp/>to<sp/>zeros</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="198"><highlight class="normal"><sp/><sp/><ref refid="string_8h_1ace4b911463887af5e748326323e99a23" kindref="member">memset</ref>(<ref refid="shell_8c_1aff2566f4c366b48d73479bef43ee4d2e" kindref="member">buffer</ref>,<sp/>0x00,<sp/><ref refid="fat__defs_8h_1a0d73859aacf6d6e4ece7720fed28b9ca" kindref="member">FAT_DIR_ENTRY_SIZE</ref>);</highlight></codeline>
<codeline lineno="199"><highlight class="normal"></highlight></codeline>
<codeline lineno="200"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>LFN<sp/>entry<sp/>number</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="201"><highlight class="normal"><sp/><sp/><ref refid="shell_8c_1aff2566f4c366b48d73479bef43ee4d2e" kindref="member">buffer</ref>[0]<sp/>=<sp/>(<ref refid="fat__types_8h_1adde6aaee8457bee49c2a92621fe22b79" kindref="member">uint8</ref>)<sp/>(((entriesRequired<sp/>-<sp/>1)<sp/>==<sp/>entry)<sp/>?<sp/>(0x40<sp/>|<sp/>(entry<sp/>+<sp/>1))<sp/>:<sp/>(entry<sp/>+<sp/>1));</highlight></codeline>
<codeline lineno="202"><highlight class="normal"></highlight></codeline>
<codeline lineno="203"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>LFN<sp/>flag</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="204"><highlight class="normal"><sp/><sp/><ref refid="shell_8c_1aff2566f4c366b48d73479bef43ee4d2e" kindref="member">buffer</ref>[11]<sp/>=<sp/>0x0F;</highlight></codeline>
<codeline lineno="205"><highlight class="normal"></highlight></codeline>
<codeline lineno="206"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Checksum<sp/>of<sp/>short<sp/>filename</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="207"><highlight class="normal"><sp/><sp/><ref refid="shell_8c_1aff2566f4c366b48d73479bef43ee4d2e" kindref="member">buffer</ref>[13]<sp/>=<sp/>sfnChk;</highlight></codeline>
<codeline lineno="208"><highlight class="normal"></highlight></codeline>
<codeline lineno="209"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Copy<sp/>to<sp/>buffer</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="210"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/><ref refid="fat__misc_8h_1a2677e17baacb5a8739614e571253e15e" kindref="member">MAX_LFN_ENTRY_LENGTH</ref>;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="211"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((start<sp/>+<sp/>i)<sp/>&lt;<sp/>length)</highlight></codeline>
<codeline lineno="212"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="shell_8c_1aff2566f4c366b48d73479bef43ee4d2e" kindref="member">buffer</ref>[nameIndexes[i]]<sp/>=<sp/>filename[start<sp/>+<sp/>i];</highlight></codeline>
<codeline lineno="213"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((start<sp/>+<sp/>i)<sp/>==<sp/>length)</highlight></codeline>
<codeline lineno="214"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="shell_8c_1aff2566f4c366b48d73479bef43ee4d2e" kindref="member">buffer</ref>[nameIndexes[i]]<sp/>=<sp/>0x00;</highlight></codeline>
<codeline lineno="215"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="216"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="shell_8c_1aff2566f4c366b48d73479bef43ee4d2e" kindref="member">buffer</ref>[nameIndexes[i]]<sp/>=<sp/>0xFF;</highlight></codeline>
<codeline lineno="217"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="shell_8c_1aff2566f4c366b48d73479bef43ee4d2e" kindref="member">buffer</ref>[nameIndexes[i]<sp/>+<sp/>1]<sp/>=<sp/>0xFF;</highlight></codeline>
<codeline lineno="218"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="219"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="220"><highlight class="normal">}</highlight></codeline>
<codeline lineno="221"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="222"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="223"><highlight class="normal"></highlight><highlight class="comment">//<sp/>fatfs_sfn_create_entry:<sp/>Create<sp/>the<sp/>short<sp/>filename<sp/>directory<sp/>entry</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="224"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="225"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>FATFS_INC_WRITE_SUPPORT</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="226" refid="fat__misc_8h_1ae562db5b28f07a3d0407e38aa9a77c13" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="fat__misc_8c_1ae562db5b28f07a3d0407e38aa9a77c13" kindref="member">fatfs_sfn_create_entry</ref>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*shortfilename,<sp/><ref refid="fat__types_8h_1a4b435a49c74bb91f284f075e63416cb6" kindref="member">uint32</ref><sp/>size,<sp/><ref refid="fat__types_8h_1a4b435a49c74bb91f284f075e63416cb6" kindref="member">uint32</ref><sp/>startCluster,<sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structfat__dir__entry" kindref="compound">fat_dir_entry</ref><sp/>*entry,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>dir)<sp/>{</highlight></codeline>
<codeline lineno="227"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
<codeline lineno="228"><highlight class="normal"></highlight></codeline>
<codeline lineno="229"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Copy<sp/>short<sp/>filename</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="230"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/><ref refid="fat__defs_8h_1a0918d60f1f01721da31d3b2b0f79f7aa" kindref="member">FAT_SFN_SIZE_FULL</ref>;<sp/>i++)</highlight></codeline>
<codeline lineno="231"><highlight class="normal"><sp/><sp/><sp/><sp/>entry-&gt;<ref refid="structfat__dir__entry_1a3b690c897cb2883c0fd9b651128fbc69" kindref="member">Name</ref>[i]<sp/>=<sp/>shortfilename[i];</highlight></codeline>
<codeline lineno="232"><highlight class="normal"></highlight></codeline>
<codeline lineno="233"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Unless<sp/>we<sp/>have<sp/>a<sp/>RTC<sp/>we<sp/>might<sp/>as<sp/>well<sp/>set<sp/>these<sp/>to<sp/>1980</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="234"><highlight class="normal"><sp/><sp/>entry-&gt;<ref refid="structfat__dir__entry_1a2201702ad673bc37d3e732f4baab3ef6" kindref="member">CrtTimeTenth</ref><sp/>=<sp/>0x00;</highlight></codeline>
<codeline lineno="235"><highlight class="normal"><sp/><sp/>entry-&gt;<ref refid="structfat__dir__entry_1a6a6b6e66fa26b03fad695a62bc12905f" kindref="member">CrtTime</ref>[1]<sp/>=<sp/>entry-&gt;<ref refid="structfat__dir__entry_1a6a6b6e66fa26b03fad695a62bc12905f" kindref="member">CrtTime</ref>[0]<sp/>=<sp/>0x00;</highlight></codeline>
<codeline lineno="236"><highlight class="normal"><sp/><sp/>entry-&gt;<ref refid="structfat__dir__entry_1a4a12f862ca27a01051664d72e6c95b6e" kindref="member">CrtDate</ref>[1]<sp/>=<sp/>0x00;</highlight></codeline>
<codeline lineno="237"><highlight class="normal"><sp/><sp/>entry-&gt;<ref refid="structfat__dir__entry_1a4a12f862ca27a01051664d72e6c95b6e" kindref="member">CrtDate</ref>[0]<sp/>=<sp/>0x20;</highlight></codeline>
<codeline lineno="238"><highlight class="normal"><sp/><sp/>entry-&gt;<ref refid="structfat__dir__entry_1a3908642d313faf4cb05c70052ce34b91" kindref="member">LstAccDate</ref>[1]<sp/>=<sp/>0x00;</highlight></codeline>
<codeline lineno="239"><highlight class="normal"><sp/><sp/>entry-&gt;<ref refid="structfat__dir__entry_1a3908642d313faf4cb05c70052ce34b91" kindref="member">LstAccDate</ref>[0]<sp/>=<sp/>0x20;</highlight></codeline>
<codeline lineno="240"><highlight class="normal"><sp/><sp/>entry-&gt;<ref refid="structfat__dir__entry_1acab2693a2267a89aaaa11ffb35ec479d" kindref="member">WrtTime</ref>[1]<sp/>=<sp/>entry-&gt;<ref refid="structfat__dir__entry_1acab2693a2267a89aaaa11ffb35ec479d" kindref="member">WrtTime</ref>[0]<sp/>=<sp/>0x00;</highlight></codeline>
<codeline lineno="241"><highlight class="normal"><sp/><sp/>entry-&gt;<ref refid="structfat__dir__entry_1a7e05fe6b6708c7e57ff675fe06d47d58" kindref="member">WrtDate</ref>[1]<sp/>=<sp/>0x00;</highlight></codeline>
<codeline lineno="242"><highlight class="normal"><sp/><sp/>entry-&gt;<ref refid="structfat__dir__entry_1a7e05fe6b6708c7e57ff675fe06d47d58" kindref="member">WrtDate</ref>[0]<sp/>=<sp/>0x20;</highlight></codeline>
<codeline lineno="243"><highlight class="normal"></highlight></codeline>
<codeline lineno="244"><highlight class="normal"><sp/><sp/>if<sp/>(!dir)</highlight></codeline>
<codeline lineno="245"><highlight class="normal"><sp/><sp/><sp/><sp/>entry-&gt;<ref refid="structfat__dir__entry_1aa73be99077695ab87ddd8c329e12e779" kindref="member">Attr</ref><sp/>=<sp/><ref refid="fat__defs_8h_1abace2d6eb53e065d5a32ab4c4758813b" kindref="member">FILE_TYPE_FILE</ref>;</highlight></codeline>
<codeline lineno="246"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="247"><highlight class="normal"><sp/><sp/><sp/><sp/>entry-&gt;<ref refid="structfat__dir__entry_1aa73be99077695ab87ddd8c329e12e779" kindref="member">Attr</ref><sp/>=<sp/><ref refid="fat__defs_8h_1a57d8f1ade52476af4ab3c03f7387b973" kindref="member">FILE_TYPE_DIR</ref>;</highlight></codeline>
<codeline lineno="248"><highlight class="normal"></highlight></codeline>
<codeline lineno="249"><highlight class="normal"><sp/><sp/>entry-&gt;<ref refid="structfat__dir__entry_1a0af375d10cb5e96f95787716816a64d1" kindref="member">NTRes</ref><sp/>=<sp/>0x00;</highlight></codeline>
<codeline lineno="250"><highlight class="normal"></highlight></codeline>
<codeline lineno="251"><highlight class="normal"><sp/><sp/>entry-&gt;<ref refid="structfat__dir__entry_1abc27727d77c39b4481215c310058e7ef" kindref="member">FstClusHI</ref><sp/>=<sp/><ref refid="fat__types_8h_1abbb9c5db3bb96b1398c9b011870c335b" kindref="member">FAT_HTONS</ref>((<ref refid="fat__types_8h_1a05f6b0ae8f6a6e135b0e290c25fe0e4e" kindref="member">uint16</ref><sp/>)((startCluster<sp/>&gt;&gt;<sp/>16)<sp/>&amp;<sp/>0xFFFF));</highlight></codeline>
<codeline lineno="252"><highlight class="normal"><sp/><sp/>entry-&gt;<ref refid="structfat__dir__entry_1ae91aaa2c62dd33e7f7d6e5042e7c42ed" kindref="member">FstClusLO</ref><sp/>=<sp/><ref refid="fat__types_8h_1abbb9c5db3bb96b1398c9b011870c335b" kindref="member">FAT_HTONS</ref>((<ref refid="fat__types_8h_1a05f6b0ae8f6a6e135b0e290c25fe0e4e" kindref="member">uint16</ref><sp/>)((startCluster<sp/>&gt;&gt;<sp/>0)<sp/>&amp;<sp/>0xFFFF));</highlight></codeline>
<codeline lineno="253"><highlight class="normal"><sp/><sp/>entry-&gt;<ref refid="structfat__dir__entry_1a0a053ffe5aa88eb280c5ddde56c3c0c8" kindref="member">FileSize</ref><sp/>=<sp/><ref refid="fat__types_8h_1a79f47acd161cf6d4943a43745c179a6e" kindref="member">FAT_HTONL</ref>(size);</highlight></codeline>
<codeline lineno="254"><highlight class="normal">}</highlight></codeline>
<codeline lineno="255"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="256"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="257"><highlight class="normal"></highlight><highlight class="comment">//<sp/>fatfs_lfn_create_sfn:<sp/>Create<sp/>a<sp/>padded<sp/>SFN</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="258"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="259"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>FATFS_INC_WRITE_SUPPORT</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="260" refid="fat__misc_8h_1a25a4d4a522ffdb06b4fab094d05b1763" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="fat__misc_8c_1a25a4d4a522ffdb06b4fab094d05b1763" kindref="member">fatfs_lfn_create_sfn</ref>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*sfn_output,<sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*filename)<sp/>{</highlight></codeline>
<codeline lineno="261"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
<codeline lineno="262"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>dotPos<sp/>=<sp/>-1;</highlight></codeline>
<codeline lineno="263"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>ext[3];</highlight></codeline>
<codeline lineno="264"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>pos;</highlight></codeline>
<codeline lineno="265"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>len<sp/>=<sp/>(int)<sp/><ref refid="lib_8h_1ae6c8de953239811a34eeeab09458e55e" kindref="member">strlen</ref>(filename);</highlight></codeline>
<codeline lineno="266"><highlight class="normal"></highlight></codeline>
<codeline lineno="267"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Invalid<sp/>to<sp/>start<sp/>with<sp/>.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="268"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(filename[0]<sp/>==<sp/></highlight><highlight class="charliteral">&apos;.&apos;</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="269"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="270"><highlight class="normal"></highlight></codeline>
<codeline lineno="271"><highlight class="normal"><sp/><sp/><ref refid="string_8h_1ace4b911463887af5e748326323e99a23" kindref="member">memset</ref>(sfn_output,<sp/></highlight><highlight class="charliteral">&apos;<sp/>&apos;</highlight><highlight class="normal">,<sp/><ref refid="fat__defs_8h_1a0918d60f1f01721da31d3b2b0f79f7aa" kindref="member">FAT_SFN_SIZE_FULL</ref>);</highlight></codeline>
<codeline lineno="272"><highlight class="normal"><sp/><sp/><ref refid="string_8h_1ace4b911463887af5e748326323e99a23" kindref="member">memset</ref>(ext,<sp/></highlight><highlight class="charliteral">&apos;<sp/>&apos;</highlight><highlight class="normal">,<sp/>3);</highlight></codeline>
<codeline lineno="273"><highlight class="normal"></highlight></codeline>
<codeline lineno="274"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Find<sp/>dot<sp/>seperator</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="275"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/>len;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="276"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(filename[i]<sp/>==<sp/></highlight><highlight class="charliteral">&apos;.&apos;</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="277"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>dotPos<sp/>=<sp/>i;</highlight></codeline>
<codeline lineno="278"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="279"><highlight class="normal"></highlight></codeline>
<codeline lineno="280"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Extract<sp/>extensions</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="281"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(dotPos<sp/>!=<sp/>-1)<sp/>{</highlight></codeline>
<codeline lineno="282"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Copy<sp/>first<sp/>three<sp/>chars<sp/>of<sp/>extension</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="283"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>(dotPos<sp/>+<sp/>1);<sp/>i<sp/>&lt;<sp/>(dotPos<sp/>+<sp/>1<sp/>+<sp/>3);<sp/>i++)</highlight></codeline>
<codeline lineno="284"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(i<sp/>&lt;<sp/>len)</highlight></codeline>
<codeline lineno="285"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ext[i<sp/>-<sp/>(dotPos<sp/>+<sp/>1)]<sp/>=<sp/>filename[i];</highlight></codeline>
<codeline lineno="286"><highlight class="normal"></highlight></codeline>
<codeline lineno="287"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Shorten<sp/>the<sp/>length<sp/>to<sp/>the<sp/>dot<sp/>position</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="288"><highlight class="normal"><sp/><sp/><sp/><sp/>len<sp/>=<sp/>dotPos;</highlight></codeline>
<codeline lineno="289"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="290"><highlight class="normal"></highlight></codeline>
<codeline lineno="291"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Add<sp/>filename<sp/>part</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="292"><highlight class="normal"><sp/><sp/>pos<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="293"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/>len;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="294"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((filename[i]<sp/>!=<sp/></highlight><highlight class="charliteral">&apos;<sp/>&apos;</highlight><highlight class="normal">)<sp/>&amp;&amp;<sp/>(filename[i]<sp/>!=<sp/></highlight><highlight class="charliteral">&apos;.&apos;</highlight><highlight class="normal">))<sp/>{</highlight></codeline>
<codeline lineno="295"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(filename[i]<sp/>&gt;=<sp/></highlight><highlight class="charliteral">&apos;a&apos;</highlight><highlight class="normal"><sp/>&amp;&amp;<sp/>filename[i]<sp/>&lt;=<sp/></highlight><highlight class="charliteral">&apos;z&apos;</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="296"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sfn_output[pos++]<sp/>=<sp/>filename[i]<sp/>-<sp/></highlight><highlight class="charliteral">&apos;a&apos;</highlight><highlight class="normal"><sp/>+<sp/></highlight><highlight class="charliteral">&apos;A&apos;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="297"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="298"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sfn_output[pos++]<sp/>=<sp/>filename[i];</highlight></codeline>
<codeline lineno="299"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="300"><highlight class="normal"></highlight></codeline>
<codeline lineno="301"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Fill<sp/>upto<sp/>8<sp/>characters</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="302"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(pos<sp/>==<sp/><ref refid="fat__defs_8h_1a25a96fb1ddc1bd5dae208f2491b0f7c3" kindref="member">FAT_SFN_SIZE_PARTIAL</ref>)</highlight></codeline>
<codeline lineno="303"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="304"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="305"><highlight class="normal"></highlight></codeline>
<codeline lineno="306"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Add<sp/>extension<sp/>part</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="307"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/><ref refid="fat__defs_8h_1a25a96fb1ddc1bd5dae208f2491b0f7c3" kindref="member">FAT_SFN_SIZE_PARTIAL</ref>;<sp/>i<sp/>&lt;<sp/><ref refid="fat__defs_8h_1a0918d60f1f01721da31d3b2b0f79f7aa" kindref="member">FAT_SFN_SIZE_FULL</ref>;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="308"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ext[i<sp/>-<sp/><ref refid="fat__defs_8h_1a25a96fb1ddc1bd5dae208f2491b0f7c3" kindref="member">FAT_SFN_SIZE_PARTIAL</ref>]<sp/>&gt;=<sp/></highlight><highlight class="charliteral">&apos;a&apos;</highlight><highlight class="normal"><sp/>&amp;&amp;<sp/>ext[i<sp/>-<sp/><ref refid="fat__defs_8h_1a25a96fb1ddc1bd5dae208f2491b0f7c3" kindref="member">FAT_SFN_SIZE_PARTIAL</ref>]<sp/>&lt;=<sp/></highlight><highlight class="charliteral">&apos;z&apos;</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="309"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>sfn_output[i]<sp/>=<sp/>ext[i<sp/>-<sp/><ref refid="fat__defs_8h_1a25a96fb1ddc1bd5dae208f2491b0f7c3" kindref="member">FAT_SFN_SIZE_PARTIAL</ref>]<sp/>-<sp/></highlight><highlight class="charliteral">&apos;a&apos;</highlight><highlight class="normal"><sp/>+<sp/></highlight><highlight class="charliteral">&apos;A&apos;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="310"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="311"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>sfn_output[i]<sp/>=<sp/>ext[i<sp/>-<sp/><ref refid="fat__defs_8h_1a25a96fb1ddc1bd5dae208f2491b0f7c3" kindref="member">FAT_SFN_SIZE_PARTIAL</ref>];</highlight></codeline>
<codeline lineno="312"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="313"><highlight class="normal"></highlight></codeline>
<codeline lineno="314"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>1;</highlight></codeline>
<codeline lineno="315"><highlight class="normal">}</highlight></codeline>
<codeline lineno="316"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="317"><highlight class="normal"></highlight><highlight class="comment">//<sp/>fatfs_itoa:</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="318"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="319"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>fatfs_itoa(<ref refid="fat__types_8h_1a4b435a49c74bb91f284f075e63416cb6" kindref="member">uint32</ref><sp/>num,<sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*s)<sp/>{</highlight></codeline>
<codeline lineno="320"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*cp;</highlight></codeline>
<codeline lineno="321"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>outbuf[12];</highlight></codeline>
<codeline lineno="322"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>digits[]<sp/>=<sp/></highlight><highlight class="stringliteral">&quot;0123456789ABCDEF&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="323"><highlight class="normal"></highlight></codeline>
<codeline lineno="324"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Build<sp/>string<sp/>backwards</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="325"><highlight class="normal"><sp/><sp/>cp<sp/>=<sp/>outbuf;</highlight></codeline>
<codeline lineno="326"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">do</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="327"><highlight class="normal"><sp/><sp/><sp/><sp/>*cp++<sp/>=<sp/>digits[(int)<sp/>(num<sp/>%<sp/>10)];</highlight></codeline>
<codeline lineno="328"><highlight class="normal"><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>((num<sp/>/=<sp/>10)<sp/>&gt;<sp/>0);</highlight></codeline>
<codeline lineno="329"><highlight class="normal"></highlight></codeline>
<codeline lineno="330"><highlight class="normal"><sp/><sp/>*cp--<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="331"><highlight class="normal"></highlight></codeline>
<codeline lineno="332"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Copy<sp/>in<sp/>forwards</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="333"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(cp<sp/>&gt;=<sp/>outbuf)</highlight></codeline>
<codeline lineno="334"><highlight class="normal"><sp/><sp/><sp/><sp/>*s++<sp/>=<sp/>*cp--;</highlight></codeline>
<codeline lineno="335"><highlight class="normal"></highlight></codeline>
<codeline lineno="336"><highlight class="normal"><sp/><sp/>*s<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="337"><highlight class="normal">}</highlight></codeline>
<codeline lineno="338"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="339"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="340"><highlight class="normal"></highlight><highlight class="comment">//<sp/>fatfs_lfn_generate_tail:</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="341"><highlight class="normal"></highlight><highlight class="comment">//<sp/>sfn_input<sp/>=<sp/>Input<sp/>short<sp/>filename,<sp/>spaced<sp/>format<sp/>&amp;<sp/>in<sp/>upper<sp/>case</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="342"><highlight class="normal"></highlight><highlight class="comment">//<sp/>sfn_output<sp/>=<sp/>Output<sp/>short<sp/>filename<sp/>with<sp/>tail</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="343"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="344"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>FATFS_INC_LFN_SUPPORT</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="345"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>FATFS_INC_WRITE_SUPPORT</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="346" refid="fat__misc_8h_1a140f2ac336bea9e8c945b6357fc65083" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="fat__misc_8c_1a140f2ac336bea9e8c945b6357fc65083" kindref="member">fatfs_lfn_generate_tail</ref>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*sfn_output,<sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*sfn_input,<sp/><ref refid="fat__types_8h_1a4b435a49c74bb91f284f075e63416cb6" kindref="member">uint32</ref><sp/>tailNum)<sp/>{</highlight></codeline>
<codeline lineno="347"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>tail_chars;</highlight></codeline>
<codeline lineno="348"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>tail_str[12];</highlight></codeline>
<codeline lineno="349"><highlight class="normal"></highlight></codeline>
<codeline lineno="350"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tailNum<sp/>&gt;<sp/>99999)</highlight></codeline>
<codeline lineno="351"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="352"><highlight class="normal"></highlight></codeline>
<codeline lineno="353"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Convert<sp/>to<sp/>number</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="354"><highlight class="normal"><sp/><sp/><ref refid="string_8h_1ace4b911463887af5e748326323e99a23" kindref="member">memset</ref>(tail_str,<sp/>0x00,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(tail_str));</highlight></codeline>
<codeline lineno="355"><highlight class="normal"><sp/><sp/>tail_str[0]<sp/>=<sp/></highlight><highlight class="charliteral">&apos;~&apos;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="356"><highlight class="normal"><sp/><sp/>fatfs_itoa(tailNum,<sp/>tail_str<sp/>+<sp/>1);</highlight></codeline>
<codeline lineno="357"><highlight class="normal"></highlight></codeline>
<codeline lineno="358"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Copy<sp/>in<sp/>base<sp/>filename</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="359"><highlight class="normal"><sp/><sp/><ref refid="string_8h_1ae33b18edb618c656b9b795b9fce2316c" kindref="member">memcpy</ref>(sfn_output,<sp/>sfn_input,<sp/><ref refid="fat__defs_8h_1a0918d60f1f01721da31d3b2b0f79f7aa" kindref="member">FAT_SFN_SIZE_FULL</ref>);</highlight></codeline>
<codeline lineno="360"><highlight class="normal"></highlight></codeline>
<codeline lineno="361"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Overwrite<sp/>with<sp/>tail</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="362"><highlight class="normal"><sp/><sp/>tail_chars<sp/>=<sp/>(int)<sp/><ref refid="lib_8h_1ae6c8de953239811a34eeeab09458e55e" kindref="member">strlen</ref>(tail_str);</highlight></codeline>
<codeline lineno="363"><highlight class="normal"><sp/><sp/><ref refid="string_8h_1ae33b18edb618c656b9b795b9fce2316c" kindref="member">memcpy</ref>(sfn_output<sp/>+<sp/>(<ref refid="fat__defs_8h_1a25a96fb1ddc1bd5dae208f2491b0f7c3" kindref="member">FAT_SFN_SIZE_PARTIAL</ref><sp/>-<sp/>tail_chars),<sp/>tail_str,<sp/>tail_chars);</highlight></codeline>
<codeline lineno="364"><highlight class="normal"></highlight></codeline>
<codeline lineno="365"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>1;</highlight></codeline>
<codeline lineno="366"><highlight class="normal">}</highlight></codeline>
<codeline lineno="367"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="368"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="369"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="370"><highlight class="normal"></highlight><highlight class="comment">//<sp/>fatfs_convert_from_fat_time:<sp/>Convert<sp/>FAT<sp/>time<sp/>to<sp/>h/m/s</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="371"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="372"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>FATFS_INC_TIME_DATE_SUPPORT</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="373"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="fat__misc_8h_1a8a0d22e7688e318ede6457eca6ba072d" kindref="member">fatfs_convert_from_fat_time</ref>(<ref refid="fat__types_8h_1a05f6b0ae8f6a6e135b0e290c25fe0e4e" kindref="member">uint16</ref><sp/>fat_time,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*hours,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*minutes,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*seconds)</highlight></codeline>
<codeline lineno="374"><highlight class="normal">{</highlight></codeline>
<codeline lineno="375"><highlight class="normal"><sp/><sp/><sp/><sp/>*hours<sp/>=<sp/>(fat_time<sp/>&gt;&gt;<sp/><ref refid="fat__defs_8h_1af8807f252b1136ddddb7c1846a531cec" kindref="member">FAT_TIME_HOURS_SHIFT</ref>)<sp/>&amp;<sp/><ref refid="fat__defs_8h_1a169ea846dbe1e7806e9358dfb4c74aee" kindref="member">FAT_TIME_HOURS_MASK</ref>;</highlight></codeline>
<codeline lineno="376"><highlight class="normal"><sp/><sp/><sp/><sp/>*minutes<sp/>=<sp/>(fat_time<sp/>&gt;&gt;<sp/><ref refid="fat__defs_8h_1ad816eb22eafec0d1ccc2c0eb0f64930d" kindref="member">FAT_TIME_MINUTES_SHIFT</ref>)<sp/>&amp;<sp/><ref refid="fat__defs_8h_1a930a47e4485e327b1d3dd3e1d87aa541" kindref="member">FAT_TIME_MINUTES_MASK</ref>;</highlight></codeline>
<codeline lineno="377"><highlight class="normal"><sp/><sp/><sp/><sp/>*seconds<sp/>=<sp/>(fat_time<sp/>&gt;&gt;<sp/><ref refid="fat__defs_8h_1adceaf5062e20400b9d551a49f58b3bcb" kindref="member">FAT_TIME_SECONDS_SHIFT</ref>)<sp/>&amp;<sp/><ref refid="fat__defs_8h_1ae1fb932e80c563cb8ec6c25dfd5aa2ab" kindref="member">FAT_TIME_SECONDS_MASK</ref>;</highlight></codeline>
<codeline lineno="378"><highlight class="normal"><sp/><sp/><sp/><sp/>*seconds<sp/>=<sp/>*seconds<sp/>*<sp/><ref refid="fat__defs_8h_1a22c7162ca5c0c072ee2c69feb8f9abfb" kindref="member">FAT_TIME_SECONDS_SCALE</ref>;</highlight></codeline>
<codeline lineno="379"><highlight class="normal">}</highlight></codeline>
<codeline lineno="380"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="381"><highlight class="normal"></highlight><highlight class="comment">//<sp/>fatfs_convert_from_fat_date:<sp/>Convert<sp/>FAT<sp/>date<sp/>to<sp/>d/m/y</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="382"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="383"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="fat__misc_8h_1ad9567e1afb538f55b9f5c8ec46871f44" kindref="member">fatfs_convert_from_fat_date</ref>(<ref refid="fat__types_8h_1a05f6b0ae8f6a6e135b0e290c25fe0e4e" kindref="member">uint16</ref><sp/>fat_date,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*day,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*month,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*year)</highlight></codeline>
<codeline lineno="384"><highlight class="normal">{</highlight></codeline>
<codeline lineno="385"><highlight class="normal"><sp/><sp/><sp/><sp/>*day<sp/>=<sp/>(fat_date<sp/>&gt;&gt;<sp/><ref refid="fat__defs_8h_1a6f5c053dba4c9105b0ad14ac88ab8ec0" kindref="member">FAT_DATE_DAY_SHIFT</ref>)<sp/>&amp;<sp/><ref refid="fat__defs_8h_1afc13d70fa37b5fc0e88b59e0653d5dba" kindref="member">FAT_DATE_DAY_MASK</ref>;</highlight></codeline>
<codeline lineno="386"><highlight class="normal"><sp/><sp/><sp/><sp/>*month<sp/>=<sp/>(fat_date<sp/>&gt;&gt;<sp/><ref refid="fat__defs_8h_1a965d68f837886808a79ecef6c7bbe14d" kindref="member">FAT_DATE_MONTH_SHIFT</ref>)<sp/>&amp;<sp/><ref refid="fat__defs_8h_1a77a9292b0fc358929617fd649e27745a" kindref="member">FAT_DATE_MONTH_MASK</ref>;</highlight></codeline>
<codeline lineno="387"><highlight class="normal"><sp/><sp/><sp/><sp/>*year<sp/>=<sp/>(fat_date<sp/>&gt;&gt;<sp/><ref refid="fat__defs_8h_1aca30ee4a2f42462ae75f909b894e9c7f" kindref="member">FAT_DATE_YEAR_SHIFT</ref>)<sp/>&amp;<sp/><ref refid="fat__defs_8h_1ac3a347eb42be2d219f09f73e170b54d0" kindref="member">FAT_DATE_YEAR_MASK</ref>;</highlight></codeline>
<codeline lineno="388"><highlight class="normal"><sp/><sp/><sp/><sp/>*year<sp/>=<sp/>*year<sp/>+<sp/><ref refid="fat__defs_8h_1a3032347c7c3e2fdf1eb83af61e62c949" kindref="member">FAT_DATE_YEAR_OFFSET</ref>;</highlight></codeline>
<codeline lineno="389"><highlight class="normal">}</highlight></codeline>
<codeline lineno="390"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="391"><highlight class="normal"></highlight><highlight class="comment">//<sp/>fatfs_convert_to_fat_time:<sp/>Convert<sp/>h/m/s<sp/>to<sp/>FAT<sp/>time</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="392"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="393"><highlight class="normal"><ref refid="fat__types_8h_1a05f6b0ae8f6a6e135b0e290c25fe0e4e" kindref="member">uint16</ref><sp/><ref refid="fat__misc_8h_1a42fbd44505592745afb1fdca6f074aab" kindref="member">fatfs_convert_to_fat_time</ref>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>hours,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>minutes,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>seconds)</highlight></codeline>
<codeline lineno="394"><highlight class="normal">{</highlight></codeline>
<codeline lineno="395"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="fat__types_8h_1a05f6b0ae8f6a6e135b0e290c25fe0e4e" kindref="member">uint16</ref><sp/>fat_time<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="396"><highlight class="normal"></highlight></codeline>
<codeline lineno="397"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Most<sp/>FAT<sp/>times<sp/>are<sp/>to<sp/>a<sp/>resolution<sp/>of<sp/>2<sp/>seconds</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="398"><highlight class="normal"><sp/><sp/><sp/><sp/>seconds<sp/>/=<sp/><ref refid="fat__defs_8h_1a22c7162ca5c0c072ee2c69feb8f9abfb" kindref="member">FAT_TIME_SECONDS_SCALE</ref>;</highlight></codeline>
<codeline lineno="399"><highlight class="normal"></highlight></codeline>
<codeline lineno="400"><highlight class="normal"><sp/><sp/><sp/><sp/>fat_time<sp/>=<sp/>(hours<sp/>&amp;<sp/><ref refid="fat__defs_8h_1a169ea846dbe1e7806e9358dfb4c74aee" kindref="member">FAT_TIME_HOURS_MASK</ref>)<sp/>&lt;&lt;<sp/><ref refid="fat__defs_8h_1af8807f252b1136ddddb7c1846a531cec" kindref="member">FAT_TIME_HOURS_SHIFT</ref>;</highlight></codeline>
<codeline lineno="401"><highlight class="normal"><sp/><sp/><sp/><sp/>fat_time|=<sp/>(minutes<sp/>&amp;<sp/><ref refid="fat__defs_8h_1a930a47e4485e327b1d3dd3e1d87aa541" kindref="member">FAT_TIME_MINUTES_MASK</ref>)<sp/>&lt;&lt;<sp/><ref refid="fat__defs_8h_1ad816eb22eafec0d1ccc2c0eb0f64930d" kindref="member">FAT_TIME_MINUTES_SHIFT</ref>;</highlight></codeline>
<codeline lineno="402"><highlight class="normal"><sp/><sp/><sp/><sp/>fat_time|=<sp/>(seconds<sp/>&amp;<sp/><ref refid="fat__defs_8h_1ae1fb932e80c563cb8ec6c25dfd5aa2ab" kindref="member">FAT_TIME_SECONDS_MASK</ref>)<sp/>&lt;&lt;<sp/><ref refid="fat__defs_8h_1adceaf5062e20400b9d551a49f58b3bcb" kindref="member">FAT_TIME_SECONDS_SHIFT</ref>;</highlight></codeline>
<codeline lineno="403"><highlight class="normal"></highlight></codeline>
<codeline lineno="404"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>fat_time;</highlight></codeline>
<codeline lineno="405"><highlight class="normal">}</highlight></codeline>
<codeline lineno="406"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="407"><highlight class="normal"></highlight><highlight class="comment">//<sp/>fatfs_convert_to_fat_date:<sp/>Convert<sp/>d/m/y<sp/>to<sp/>FAT<sp/>date</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="408"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="409"><highlight class="normal"><ref refid="fat__types_8h_1a05f6b0ae8f6a6e135b0e290c25fe0e4e" kindref="member">uint16</ref><sp/><ref refid="fat__misc_8h_1a1d864cba89ca98550fcaa4c7e0e5e976" kindref="member">fatfs_convert_to_fat_date</ref>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>day,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>month,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>year)</highlight></codeline>
<codeline lineno="410"><highlight class="normal">{</highlight></codeline>
<codeline lineno="411"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="fat__types_8h_1a05f6b0ae8f6a6e135b0e290c25fe0e4e" kindref="member">uint16</ref><sp/>fat_date<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="412"><highlight class="normal"></highlight></codeline>
<codeline lineno="413"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>FAT<sp/>dates<sp/>are<sp/>relative<sp/>to<sp/>1980</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="414"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(year<sp/>&gt;=<sp/><ref refid="fat__defs_8h_1a3032347c7c3e2fdf1eb83af61e62c949" kindref="member">FAT_DATE_YEAR_OFFSET</ref>)</highlight></codeline>
<codeline lineno="415"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>year<sp/>-=<sp/><ref refid="fat__defs_8h_1a3032347c7c3e2fdf1eb83af61e62c949" kindref="member">FAT_DATE_YEAR_OFFSET</ref>;</highlight></codeline>
<codeline lineno="416"><highlight class="normal"></highlight></codeline>
<codeline lineno="417"><highlight class="normal"><sp/><sp/><sp/><sp/>fat_date<sp/>=<sp/>(day<sp/>&amp;<sp/><ref refid="fat__defs_8h_1afc13d70fa37b5fc0e88b59e0653d5dba" kindref="member">FAT_DATE_DAY_MASK</ref>)<sp/>&lt;&lt;<sp/><ref refid="fat__defs_8h_1a6f5c053dba4c9105b0ad14ac88ab8ec0" kindref="member">FAT_DATE_DAY_SHIFT</ref>;</highlight></codeline>
<codeline lineno="418"><highlight class="normal"><sp/><sp/><sp/><sp/>fat_date|=<sp/>(month<sp/>&amp;<sp/><ref refid="fat__defs_8h_1a77a9292b0fc358929617fd649e27745a" kindref="member">FAT_DATE_MONTH_MASK</ref>)<sp/>&lt;&lt;<sp/><ref refid="fat__defs_8h_1a965d68f837886808a79ecef6c7bbe14d" kindref="member">FAT_DATE_MONTH_SHIFT</ref>;</highlight></codeline>
<codeline lineno="419"><highlight class="normal"><sp/><sp/><sp/><sp/>fat_date|=<sp/>(year<sp/>&amp;<sp/><ref refid="fat__defs_8h_1ac3a347eb42be2d219f09f73e170b54d0" kindref="member">FAT_DATE_YEAR_MASK</ref>)<sp/>&lt;&lt;<sp/><ref refid="fat__defs_8h_1aca30ee4a2f42462ae75f909b894e9c7f" kindref="member">FAT_DATE_YEAR_SHIFT</ref>;</highlight></codeline>
<codeline lineno="420"><highlight class="normal"></highlight></codeline>
<codeline lineno="421"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>fat_date;</highlight></codeline>
<codeline lineno="422"><highlight class="normal">}</highlight></codeline>
<codeline lineno="423"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="424"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="425"><highlight class="normal"></highlight><highlight class="comment">//<sp/>fatfs_print_sector:</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="426"><highlight class="normal"></highlight><highlight class="comment">//-----------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="427"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>FATFS_DEBUG</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="428"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="fat__misc_8h_1ad788122bd3b50b07596b78c824f27301" kindref="member">fatfs_print_sector</ref>(<ref refid="fat__types_8h_1a4b435a49c74bb91f284f075e63416cb6" kindref="member">uint32</ref><sp/>sector,<sp/><ref refid="fat__types_8h_1adde6aaee8457bee49c2a92621fe22b79" kindref="member">uint8</ref><sp/>*data)</highlight></codeline>
<codeline lineno="429"><highlight class="normal">{</highlight></codeline>
<codeline lineno="430"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
<codeline lineno="431"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>j;</highlight></codeline>
<codeline lineno="432"><highlight class="normal"></highlight></codeline>
<codeline lineno="433"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="fat__opts_8h_1a77e202c52dfa1ae6a4a060b21b70a80c" kindref="member">FAT_PRINTF</ref>((</highlight><highlight class="stringliteral">&quot;Sector<sp/>%d:\n&quot;</highlight><highlight class="normal">,<sp/>sector));</highlight></codeline>
<codeline lineno="434"><highlight class="normal"></highlight></codeline>
<codeline lineno="435"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i=0;i&lt;<ref refid="fat__opts_8h_1a873b78b38ef34edf6291274eb0708634" kindref="member">FAT_SECTOR_SIZE</ref>;i++)</highlight></codeline>
<codeline lineno="436"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="437"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!((i)<sp/>%<sp/>16))</highlight></codeline>
<codeline lineno="438"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="439"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="fat__opts_8h_1a77e202c52dfa1ae6a4a060b21b70a80c" kindref="member">FAT_PRINTF</ref>((</highlight><highlight class="stringliteral">&quot;<sp/><sp/>%04d:<sp/>&quot;</highlight><highlight class="normal">,<sp/>i));</highlight></codeline>
<codeline lineno="440"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="441"><highlight class="normal"></highlight></codeline>
<codeline lineno="442"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="fat__opts_8h_1a77e202c52dfa1ae6a4a060b21b70a80c" kindref="member">FAT_PRINTF</ref>((</highlight><highlight class="stringliteral">&quot;%02x&quot;</highlight><highlight class="normal">,<sp/>data[i]));</highlight></codeline>
<codeline lineno="443"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!((i+1)<sp/>%<sp/>4))</highlight></codeline>
<codeline lineno="444"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="445"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="fat__opts_8h_1a77e202c52dfa1ae6a4a060b21b70a80c" kindref="member">FAT_PRINTF</ref>((</highlight><highlight class="stringliteral">&quot;<sp/>&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="446"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="447"><highlight class="normal"></highlight></codeline>
<codeline lineno="448"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!((i+1)<sp/>%<sp/>16))</highlight></codeline>
<codeline lineno="449"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="450"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="fat__opts_8h_1a77e202c52dfa1ae6a4a060b21b70a80c" kindref="member">FAT_PRINTF</ref>((</highlight><highlight class="stringliteral">&quot;<sp/><sp/><sp/>&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="451"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(j=0;j&lt;16;j++)</highlight></codeline>
<codeline lineno="452"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="453"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>ch<sp/>=<sp/>data[i-15+j];</highlight></codeline>
<codeline lineno="454"><highlight class="normal"></highlight></codeline>
<codeline lineno="455"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Is<sp/>printable?</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="456"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ch<sp/>&gt;<sp/>31<sp/>&amp;&amp;<sp/>ch<sp/>&lt;<sp/>127)</highlight></codeline>
<codeline lineno="457"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="458"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="fat__opts_8h_1a77e202c52dfa1ae6a4a060b21b70a80c" kindref="member">FAT_PRINTF</ref>((</highlight><highlight class="stringliteral">&quot;%c&quot;</highlight><highlight class="normal">,<sp/>ch));</highlight></codeline>
<codeline lineno="459"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="460"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="461"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="462"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="fat__opts_8h_1a77e202c52dfa1ae6a4a060b21b70a80c" kindref="member">FAT_PRINTF</ref>((</highlight><highlight class="stringliteral">&quot;.&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="463"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="464"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="465"><highlight class="normal"></highlight></codeline>
<codeline lineno="466"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="fat__opts_8h_1a77e202c52dfa1ae6a4a060b21b70a80c" kindref="member">FAT_PRINTF</ref>((</highlight><highlight class="stringliteral">&quot;\n&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="467"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="468"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="469"><highlight class="normal">}</highlight></codeline>
<codeline lineno="470"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight></codeline>
    </programlisting>
    <location file="C:/Dev/git/UbixOS/sys/fs/fat/fat_misc.c"/>
  </compounddef>
</doxygen>
