Full Code of felis/UHS30 for AI

master 4c2e374ed6dc cached
252 files
4.1 MB
1.1M tokens
442 symbols
1 requests
Download .txt
Showing preview only (4,350K chars total). Download the full file or copy to clipboard to get everything.
Repository: felis/UHS30
Branch: master
Commit: 4c2e374ed6dc
Files: 252
Total size: 4.1 MB

Directory structure:
gitextract_yvv64a9_/

├── .gitattributes
├── .gitignore
├── .gitmodules
├── LICENSE
├── Makefile
├── README.md
├── libraries/
│   ├── ISR_safe_memory/
│   │   ├── ISR_safe_memory.h
│   │   ├── malloc.c
│   │   ├── mlock.c
│   │   ├── sectionname.h
│   │   └── stdlib_private.h
│   ├── UHS_ByteBuffer/
│   │   ├── UHS_ByteBuffer.cpp
│   │   ├── UHS_ByteBuffer.h
│   │   └── examples/
│   │       └── ByteBufferExample.ino
│   ├── UHS_FS/
│   │   ├── FAT/
│   │   │   ├── FAT.cpp
│   │   │   ├── FAT.h
│   │   │   └── FatFS/
│   │   │       ├── doc/
│   │   │       │   ├── 00index_e.html
│   │   │       │   ├── 00index_j.html
│   │   │       │   ├── css_e.css
│   │   │       │   ├── css_j.css
│   │   │       │   ├── en/
│   │   │       │   │   ├── appnote.html
│   │   │       │   │   ├── chdir.html
│   │   │       │   │   ├── chdrive.html
│   │   │       │   │   ├── chmod.html
│   │   │       │   │   ├── close.html
│   │   │       │   │   ├── dinit.html
│   │   │       │   │   ├── dioctl.html
│   │   │       │   │   ├── dread.html
│   │   │       │   │   ├── dstat.html
│   │   │       │   │   ├── dwrite.html
│   │   │       │   │   ├── eof.html
│   │   │       │   │   ├── error.html
│   │   │       │   │   ├── fattime.html
│   │   │       │   │   ├── fdisk.html
│   │   │       │   │   ├── filename.html
│   │   │       │   │   ├── forward.html
│   │   │       │   │   ├── getcwd.html
│   │   │       │   │   ├── getfree.html
│   │   │       │   │   ├── getlabel.html
│   │   │       │   │   ├── gets.html
│   │   │       │   │   ├── lseek.html
│   │   │       │   │   ├── mkdir.html
│   │   │       │   │   ├── mkfs.html
│   │   │       │   │   ├── mount.html
│   │   │       │   │   ├── open.html
│   │   │       │   │   ├── opendir.html
│   │   │       │   │   ├── printf.html
│   │   │       │   │   ├── putc.html
│   │   │       │   │   ├── puts.html
│   │   │       │   │   ├── rc.html
│   │   │       │   │   ├── read.html
│   │   │       │   │   ├── readdir.html
│   │   │       │   │   ├── rename.html
│   │   │       │   │   ├── sdir.html
│   │   │       │   │   ├── setlabel.html
│   │   │       │   │   ├── sfatfs.html
│   │   │       │   │   ├── sfile.html
│   │   │       │   │   ├── sfileinfo.html
│   │   │       │   │   ├── size.html
│   │   │       │   │   ├── stat.html
│   │   │       │   │   ├── sync.html
│   │   │       │   │   ├── tell.html
│   │   │       │   │   ├── truncate.html
│   │   │       │   │   ├── unlink.html
│   │   │       │   │   ├── utime.html
│   │   │       │   │   └── write.html
│   │   │       │   ├── ja/
│   │   │       │   │   ├── appnote.html
│   │   │       │   │   ├── chdir.html
│   │   │       │   │   ├── chdrive.html
│   │   │       │   │   ├── chmod.html
│   │   │       │   │   ├── close.html
│   │   │       │   │   ├── dinit.html
│   │   │       │   │   ├── dioctl.html
│   │   │       │   │   ├── dread.html
│   │   │       │   │   ├── dstat.html
│   │   │       │   │   ├── dwrite.html
│   │   │       │   │   ├── eof.html
│   │   │       │   │   ├── error.html
│   │   │       │   │   ├── fattime.html
│   │   │       │   │   ├── fdisk.html
│   │   │       │   │   ├── filename.html
│   │   │       │   │   ├── forward.html
│   │   │       │   │   ├── getcwd.html
│   │   │       │   │   ├── getfree.html
│   │   │       │   │   ├── getlabel.html
│   │   │       │   │   ├── gets.html
│   │   │       │   │   ├── lseek.html
│   │   │       │   │   ├── mkdir.html
│   │   │       │   │   ├── mkfs.html
│   │   │       │   │   ├── mount.html
│   │   │       │   │   ├── open.html
│   │   │       │   │   ├── opendir.html
│   │   │       │   │   ├── printf.html
│   │   │       │   │   ├── putc.html
│   │   │       │   │   ├── puts.html
│   │   │       │   │   ├── rc.html
│   │   │       │   │   ├── read.html
│   │   │       │   │   ├── readdir.html
│   │   │       │   │   ├── rename.html
│   │   │       │   │   ├── sdir.html
│   │   │       │   │   ├── setlabel.html
│   │   │       │   │   ├── sfatfs.html
│   │   │       │   │   ├── sfile.html
│   │   │       │   │   ├── sfileinfo.html
│   │   │       │   │   ├── size.html
│   │   │       │   │   ├── stat.html
│   │   │       │   │   ├── sync.html
│   │   │       │   │   ├── tell.html
│   │   │       │   │   ├── truncate.html
│   │   │       │   │   ├── unlink.html
│   │   │       │   │   ├── utime.html
│   │   │       │   │   └── write.html
│   │   │       │   └── updates.txt
│   │   │       └── src/
│   │   │           ├── 00readme.txt
│   │   │           ├── diskio.h
│   │   │           ├── ff.c
│   │   │           ├── ff.h
│   │   │           ├── ffconf.h
│   │   │           ├── integer.h
│   │   │           └── option/
│   │   │               ├── cc932.h
│   │   │               ├── cc936.h
│   │   │               ├── cc949.h
│   │   │               ├── cc950.h
│   │   │               ├── ccsbcs.h
│   │   │               ├── syscall.h
│   │   │               └── unicode.h
│   │   ├── PCpartition/
│   │   │   ├── PCPartition.cpp
│   │   │   └── PCPartition.h
│   │   ├── README.md
│   │   ├── UHS_FS.h
│   │   ├── UHS_FS_INLINE.h
│   │   ├── examples/
│   │   │   ├── UHS_FS_SPI_SDCARD/
│   │   │   │   ├── UHS_FS_SPI_SDCARD_DEMO/
│   │   │   │   │   ├── Makefile
│   │   │   │   │   └── UHS_FS_SPI_SDCARD_DEMO.ino
│   │   │   │   └── UHS_FS_SPI_SDCARD_DEMO_LABEL/
│   │   │   │       ├── Makefile
│   │   │   │       └── UHS_FS_SPI_SDCARD_DEMO_LABEL.ino
│   │   │   ├── UHS_KINETIS_EHCI/
│   │   │   │   ├── IOCTL/
│   │   │   │   │   ├── IOCTL.ino
│   │   │   │   │   └── Makefile
│   │   │   │   └── UHS_FS_NEW_DEMO/
│   │   │   │       ├── Makefile
│   │   │   │       └── UHS_FS_NEW_DEMO.ino
│   │   │   ├── UHS_KINETIS_FS_HOST/
│   │   │   │   └── UHS_FS_NEW_DEMO/
│   │   │   │       ├── Makefile
│   │   │   │       └── UHS_FS_NEW_DEMO.ino
│   │   │   └── USB_HOST_SHIELD/
│   │   │       ├── UHS_FS_ANY_LABEL/
│   │   │       │   ├── Makefile
│   │   │       │   └── UHS_FS_ANY_LABEL.ino
│   │   │       └── UHS_FS_NEW_DEMO/
│   │   │           ├── Makefile
│   │   │           └── UHS_FS_NEW_DEMO.ino
│   │   └── fcntl.h
│   ├── UHS_host/
│   │   ├── UHS_ADK/
│   │   │   ├── UHS_ADK.h
│   │   │   ├── UHS_ADK_INLINE.h
│   │   │   └── examples/
│   │   │       ├── UHS_KINETIS_FS_HOST/
│   │   │       │   ├── ArduinoBlinkLED/
│   │   │       │   │   ├── ArduinoBlinkLED.ino
│   │   │       │   │   └── Makefile
│   │   │       │   └── demokit_20/
│   │   │       │       ├── Makefile
│   │   │       │       └── demokit_20.ino
│   │   │       └── USB_HOST_SHIELD/
│   │   │           ├── ArduinoBlinkLED/
│   │   │           │   ├── ArduinoBlinkLED.ino
│   │   │           │   └── Makefile
│   │   │           └── demokit_20/
│   │   │               ├── Makefile
│   │   │               └── demokit_20.ino
│   │   ├── UHS_BULK_STORAGE/
│   │   │   ├── UHS_BULK_STORAGE.h
│   │   │   ├── UHS_BULK_STORAGE_INLINE.h
│   │   │   ├── UHS_SCSI.h
│   │   │   └── examples/
│   │   │       ├── UHS_KINETIS_FS_HOST/
│   │   │       │   └── TEST_BULK_K/
│   │   │       │       ├── Makefile
│   │   │       │       └── TEST_BULK_K.ino
│   │   │       └── USB_HOST_SHIELD/
│   │   │           └── TEST_BULK/
│   │   │               ├── Makefile
│   │   │               └── TEST_BULK.ino
│   │   ├── UHS_CDC/
│   │   │   └── UHS_CDC.h
│   │   ├── UHS_CDC_ACM/
│   │   │   ├── UHS_CDC_ACM.h
│   │   │   ├── UHS_CDC_ACM_FTDI.h
│   │   │   ├── UHS_CDC_ACM_INLINE.h
│   │   │   ├── UHS_CDC_ACM_PROLIFIC.h
│   │   │   ├── UHS_CDC_ACM_XR21B1411.h
│   │   │   └── examples/
│   │   │       ├── UHS_KINETIS_EHCI/
│   │   │       │   └── acm_terminal/
│   │   │       │       ├── Makefile
│   │   │       │       └── acm_terminal.ino
│   │   │       ├── UHS_KINETIS_FS_HOST/
│   │   │       │   ├── acm_terminal/
│   │   │       │   │   ├── Makefile
│   │   │       │   │   └── acm_terminal.ino
│   │   │       │   └── buffered_acm_terminal/
│   │   │       │       ├── Makefile
│   │   │       │       └── buffered_acm_terminal.ino
│   │   │       └── USB_HOST_SHIELD/
│   │   │           ├── acm_terminal/
│   │   │           │   ├── Makefile
│   │   │           │   └── acm_terminal.ino
│   │   │           └── buffered_acm_terminal/
│   │   │               ├── Makefile
│   │   │               └── buffered_acm_terminal.ino
│   │   ├── UHS_HID/
│   │   │   ├── HIDBOOT/
│   │   │   │   ├── UHS_HIDRAWBOOT_KEYBOARD.h
│   │   │   │   └── UHS_HIDRAWBOOT_MOUSE.h
│   │   │   ├── UHS_HID.h
│   │   │   ├── UHS_HID_INLINE.h
│   │   │   └── examples/
│   │   │       └── USB_HOST_SHIELD/
│   │   │           ├── UHS_HID_KB_MOUSE/
│   │   │           │   ├── Makefile
│   │   │           │   └── UHS_HID_KB_MOUSE.ino
│   │   │           └── UHS_HID_RAW/
│   │   │               ├── Makefile
│   │   │               └── UHS_HID_RAW.ino
│   │   ├── UHS_HUB/
│   │   │   ├── UHS_HUB.h
│   │   │   └── UHS_HUB_INLINE.h
│   │   ├── UHS_KINETIS_EHCI/
│   │   │   ├── UHS_KINETIS_EHCI.h
│   │   │   ├── UHS_KINETIS_EHCI_INLINE.h
│   │   │   └── examples/
│   │   │       └── KINETIS_EHCI_TEST/
│   │   │           ├── KINETIS_EHCI_TEST.ino
│   │   │           └── Makefile
│   │   ├── UHS_KINETIS_FS_HOST/
│   │   │   ├── UHS_KINETIS_FS_HOST.h
│   │   │   ├── UHS_KINETIS_FS_HOST_INLINE.h
│   │   │   └── examples/
│   │   │       ├── KINETIS_DEV_DESC/
│   │   │       │   ├── KINETIS_DEV_DESC.ino
│   │   │       │   └── Makefile
│   │   │       ├── KINETIS_TEST/
│   │   │       │   ├── KINETIS_TEST.ino
│   │   │       │   └── Makefile
│   │   │       └── TEST_KINETIS_BULK/
│   │   │           ├── Makefile
│   │   │           └── TEST_KINETIS_BULK.ino
│   │   ├── UHS_MIDI/
│   │   │   ├── UHS_MIDI.h
│   │   │   ├── UHS_MIDI_INLINE.h
│   │   │   └── examples/
│   │   │       ├── UHS_KINETIS_EHCI/
│   │   │       │   ├── USB_MIDI_Converter/
│   │   │       │   │   ├── Makefile
│   │   │       │   │   └── USB_MIDI_Converter.ino
│   │   │       │   └── USB_MIDI_dump/
│   │   │       │       ├── Makefile
│   │   │       │       └── USB_MIDI_dump.ino
│   │   │       ├── UHS_KINETIS_FS_HOST/
│   │   │       │   ├── USB_MIDI_Converter/
│   │   │       │   │   ├── Makefile
│   │   │       │   │   └── USB_MIDI_Converter.ino
│   │   │       │   └── USB_MIDI_dump/
│   │   │       │       ├── Makefile
│   │   │       │       └── USB_MIDI_dump.ino
│   │   │       └── USB_HOST_SHIELD/
│   │   │           ├── USB_MIDI_Converter/
│   │   │           │   ├── Makefile
│   │   │           │   └── USB_MIDI_Converter.ino
│   │   │           └── USB_MIDI_dump/
│   │   │               └── USB_MIDI_dump.ino
│   │   ├── UHS_PRINTER/
│   │   │   ├── UHS_PRINTER.h
│   │   │   ├── UHS_PRINTER_INLINE.h
│   │   │   └── examples/
│   │   │       └── USB_HOST_SHIELD/
│   │   │           ├── printer_demo/
│   │   │           │   ├── Makefile
│   │   │           │   └── printer_demo.ino
│   │   │           ├── printer_demo_epson_protocol/
│   │   │           │   ├── Makefile
│   │   │           │   ├── printer_demo_epson_protocol.ino
│   │   │           │   └── test_image.h
│   │   │           └── printer_demo_escP2_protocol/
│   │   │               ├── Makefile
│   │   │               ├── printer_demo_escP2_protocol.ino
│   │   │               └── test_image.h
│   │   ├── UHS_UNOFFICIAL_IDs.h
│   │   ├── UHS_USB_IDs.h
│   │   ├── UHS_UsbCore.h
│   │   ├── UHS_address.h
│   │   ├── UHS_hexdump.h
│   │   ├── UHS_host.h
│   │   ├── UHS_host_INLINE.h
│   │   ├── UHS_macros.h
│   │   ├── UHS_message.h
│   │   ├── UHS_printf_HELPER.h
│   │   ├── UHS_printhex.h
│   │   ├── UHS_settings.h
│   │   ├── UHS_usb_ch9.h
│   │   ├── UHS_usbhost.h
│   │   ├── UHS_util_INLINE.h
│   │   ├── USB_HOST_SHIELD/
│   │   │   ├── UHS_max3421e.h
│   │   │   ├── USB_HOST_SHIELD.h
│   │   │   ├── USB_HOST_SHIELD_INLINE.h
│   │   │   └── examples/
│   │   │       ├── TWO_HOSTS_BULK/
│   │   │       │   ├── Makefile
│   │   │       │   └── TWO_HOSTS_BULK.ino
│   │   │       └── board_qc/
│   │   │           ├── Makefile
│   │   │           └── board_qc.ino
│   │   ├── macro_logic.h
│   │   └── make-USB_IDs.py
│   └── dyn_SWI/
│       ├── SWI_INLINE.h
│       └── dyn_SWI.h
└── nbproject/
    ├── configurations.xml
    └── project.xml

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitattributes
================================================
# Auto detect text files and perform LF normalization
* text=auto
* text eol=lf

# Custom for Visual Studio
*.cs     diff=csharp
*.sln    merge=union
*.csproj merge=union
*.vbproj merge=union
*.fsproj merge=union
*.dbproj merge=union

# Standard to msysgit
*.doc	 diff=astextplain
*.DOC	 diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot  diff=astextplain
*.DOT  diff=astextplain
*.pdf  diff=astextplain
*.PDF	 diff=astextplain
*.rtf	 diff=astextplain
*.RTF	 diff=astextplain

*.jpg -text -diff

*.zip binary



================================================
FILE: .gitignore
================================================
*.bak
*.rar
*~
DEADJOE
*.orig
*.rej
nbproject/private
build

================================================
FILE: .gitmodules
================================================
[submodule "RTClib"]
	path = libraries/RTClib
	url = https://github.com/xxxajk/RTClib.git


================================================
FILE: LICENSE
================================================
GNU GENERAL PUBLIC LICENSE
                       Version 2, June 1991

 Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users.  This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it.  (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.)  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.

  To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have.  You must make sure that they, too, receive or can get the
source code.  And you must show them these terms so they know their
rights.

  We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

  Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software.  If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

  Finally, any free program is threatened constantly by software
patents.  We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary.  To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.

  The precise terms and conditions for copying, distribution and
modification follow.

                    GNU GENERAL PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License.  The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language.  (Hereinafter, translation is included without limitation in
the term "modification".)  Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.

  1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.

You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.

  2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

    a) You must cause the modified files to carry prominent notices
    stating that you changed the files and the date of any change.

    b) You must cause any work that you distribute or publish, that in
    whole or in part contains or is derived from the Program or any
    part thereof, to be licensed as a whole at no charge to all third
    parties under the terms of this License.

    c) If the modified program normally reads commands interactively
    when run, you must cause it, when started running for such
    interactive use in the most ordinary way, to print or display an
    announcement including an appropriate copyright notice and a
    notice that there is no warranty (or else, saying that you provide
    a warranty) and that users may redistribute the program under
    these conditions, and telling the user how to view a copy of this
    License.  (Exception: if the Program itself is interactive but
    does not normally print such an announcement, your work based on
    the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

  3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:

    a) Accompany it with the complete corresponding machine-readable
    source code, which must be distributed under the terms of Sections
    1 and 2 above on a medium customarily used for software interchange; or,

    b) Accompany it with a written offer, valid for at least three
    years, to give any third party, for a charge no more than your
    cost of physically performing source distribution, a complete
    machine-readable copy of the corresponding source code, to be
    distributed under the terms of Sections 1 and 2 above on a medium
    customarily used for software interchange; or,

    c) Accompany it with the information you received as to the offer
    to distribute corresponding source code.  (This alternative is
    allowed only for noncommercial distribution and only if you
    received the program in object code or executable form with such
    an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for
making modifications to it.  For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable.  However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.

If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.

  4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License.  Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.

  5. You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Program or its derivative works.  These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.

  6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.

  7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all.  For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

  8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded.  In such case, this License incorporates
the limitation as if written in the body of this License.

  9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

Each version is given a distinguishing version number.  If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation.  If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.

  10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission.  For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this.  Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

                            NO WARRANTY

  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    {description}
    Copyright (C) {year}  {fullname}

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

    Gnomovision version 69, Copyright (C) year name of author
    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary.  Here is a sample; alter the names:

  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  `Gnomovision' (which makes passes at compilers) written by James Hacker.

  {signature of Ty Coon}, 1 April 1989
  Ty Coon, President of Vice

This General Public License does not permit incorporating your program into
proprietary programs.  If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library.  If this is what you want to do, use the GNU Lesser General
Public License instead of this License.



================================================
FILE: Makefile
================================================
FIND ?=find
DIRNAME ?=dirname

TOTEST ?=$(shell $(FIND) ./libraries -name Makefile -exec $(DIRNAME) \{\} \;)
$(info $(TOTEST))
all: build

squeeky: $(TOTEST)
	@for i in $? ; do (cd $$i && make squeeky ) ; done
	@echo FULL cleanup done

clean: $(TOTEST)
	@for i in $? ; do (cd $$i && make clean ) ; done
	@echo Cleanup done

build: $(TOTEST)
	@for i in $? ; do (cd $$i && make all ) ; done
	@echo all targets built

monitor:
	cu -l /dev/ttyUSB0 -s 115200 || cu -l /dev/ttyACM0 -s 115200 || cu -l /dev/ttyUSB1 -s 115200 || cu -l /dev/ttyACM1 -s 115200

.PHONY: all clean build squeeky monitor


================================================
FILE: README.md
================================================
# UHS30
Pre-release of USB Host Library version 3.0. No technical support offered at this time.

__This set of libraries is EXTREMELY ALPHA!__

# Arduino version 1.6.9 OR BETTER ONLY! DO NOT USE 1.6.10, it is broken!
* This library set does all USB host operations in an interrupt. This means that calling the Task() method no longer does anything, unless you disable the interrupt mode in your sketch.
* This library set provides interrupt safe heap for AVR, ARM, and PIC32 based boards.<BR>
* Circuitsathome USB Host Shield support (of course!)
* Freescale Kinetis native full-speed host support!
    * NOTE! To use the Teensy 3.0/3.1/3.2/3.4/3.5 and LC in host mode, select "No USB" from the tools menu for USB Type.
* SDcard on SPI due to popular demand!
* Kinetis EHCI (experimental)

# Current working USB interface drivers
* HID RAW
* MIDI
* Hub
* Mass storage
* CDC-ACM serial
* XR21B1411 serial
* PROLIFIC serial
* FTDI serial

# USB interface drivers works in-progress
* HID-BOOT-MOUSE
* HID-BOOT-KEYBOARD

## AVR MEGA ADK
No special modifications are required!
### Thank you Olayinka Babalola for donating an Arduino Mega ADK board. It would not have been possible without your support!

## AVR Arduino 
### Software tools
Arduino AVR boards by Arduino 1.6.11.
Newer versions are broken.
### hardware instructions
On AVR based Arduino boards and clones, you must do one of the following:

Connect pin 9 to pin 3 with a jumper wire.

OR

Cut the INT solder bridge. Connect from the INT thru-hole to pin 3 thru-hole with a jumper wire.

OR

Cut the INT solder bridge. Install right angle headers and use a female jumper wire.

## ARM Arduino hardware instructions
No special modifications are required!
ARM boards have interrupt capabilities on nearly every pin.

## PIC32
UNO32, uC32, WF32, Wi-Fire

Please note that the UNO32 really lacks enough flash to be very useful. Some demos will be too big to fit into flash.

Digilent messed up on the ICSP connector. You need to modify your shield. Pull the 2x3 header plastic cover, and break off pin recepticle contacts for pins 2 and 5. Run a patch wire from +5V to pin 2. Run a patch wire from RESET to pin 5. Put plastic cover back on. Don't worry, the board will still work on all other development boards. Detailed photos are in the images directory. Alternatly, modify the Digilent board. More recent boards have an option jumper which you could use to do this fix as well, however you still need to patch 5v onto pin 2. 

Then you must do one of the following:

Connect pin 9 to pin 7 with a jumper wire.

OR

Cut the INT solder bridge. Connect from the INT thru-hole to pin 7 thru-hole with a jumper wire.

OR

Cut the INT solder bridge. Install right angle headers and use a female jumper wire.


### Installation
Clone the repository:

```
With a github account:
git clone --recursive git@github.com:felis/UHS30.git
or
Without a github account:
git clone --recursive https://github.com/felis/UHS30.git
```

Then

Copy each of the directories in the libraries directory into your USER LIBRARIES directory. DO NOT copy these to your system-wide installation. (you should never do that anyway!)

If you want to do development, see the wiki. https://github.com/felis/UHS30/wiki


================================================
FILE: libraries/ISR_safe_memory/ISR_safe_memory.h
================================================
/*
 * File:   ISR_safe_memory.h
 * Author: root
 *
 * Created on December 26, 2018, 1:25 AM
 */

#ifndef ISR_SAFE_MEMORY_H
#define	ISR_SAFE_MEMORY_H

#ifdef	__cplusplus
extern "C" {
#endif
#include <limits.h>

#if defined(__AVR__)
#define ISR_MEMORY_IS_SAFE
#endif

#if defined(_NEWLIB_VERSION)
#define ISR_MEMORY_IS_SAFE
#endif



#ifdef	__cplusplus
}
#endif

#if !defined(ISR_MEMORY_IS_SAFE)
#error MEMORY is not ISR SAFE!
#endif

#endif	/* ISR_SAFE_MEMORY_H */



================================================
FILE: libraries/ISR_safe_memory/malloc.c
================================================
#if defined(__AVR__)

// TO-DO: find out why newer avr-libc fails

/* Copyright (C) 2015-2016 Andrew J. Kroll
   and
Copyright (C) 2011 Circuits At Home, LTD. All rights reserved.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

Contact information
-------------------

Circuits At Home, LTD
Web      :  http://www.circuitsathome.com
e-mail   :  support@circuitsathome.com
 */

/* Copyright (c) 2002, 2004, 2010 Joerg Wunsch
   Copyright (c) 2010  Gerben van den Broeke
   All rights reserved.

   Redistribution and use in source and binary forms, with or without
   modification, are permitted provided that the following conditions are met:

 * Redistributions of source code must retain the above copyright
     notice, this list of conditions and the following disclaimer.

 * Redistributions in binary form must reproduce the above copyright
     notice, this list of conditions and the following disclaimer in
     the documentation and/or other materials provided with the
     distribution.

 * Neither the name of the copyright holders nor the names of
     contributors may be used to endorse or promote products derived
     from this software without specific prior written permission.

  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  POSSIBILITY OF SUCH DAMAGE.
 */


/* $Id: malloc.c 2149 2010-06-09 20:45:37Z joerg_wunsch $ */

#include <stdlib.h>
#include <string.h>

#include "sectionname.h"
#include "stdlib_private.h"

#include <avr/io.h>
#include <util/atomic.h>
#define XATOMIC_BLOCK(type) type, __ToDo; for (__ToDo = __iCliRetVal(); \
                               __ToDo ; __ToDo = 0 )

/*
 * Exported interface:
 *
 * When extending the data segment, the allocator will not try to go
 * beyond the current stack limit, decreased by __malloc_margin bytes.
 * Thus, all possible stack frames of interrupt routines that could
 * interrupt the current function, plus all further nested function
 * calls must not require more stack space, or they'll risk to collide
 * with the data segment.
 */

/* May be changed by the user only before the first malloc() call.  */

size_t __malloc_margin = 128;
char *__malloc_heap_start = &__heap_start;
char *__malloc_heap_end = &__heap_end;

char *__brkval;
struct __freelist *__flp;

static
void *
_malloc(size_t len) {
        struct __freelist *fp1=NULL, *fp2=NULL, *sfp1=NULL, *sfp2 = NULL;
        char *cp;
        size_t s, avail;


        /*
         * Our minimum chunk size is the size of a pointer (plus the
         * size of the "sz" field, but we don't need to account for
         * this), otherwise we could not possibly fit a freelist entry
         * into the chunk later.
         */
        if(len < sizeof(struct __freelist) - sizeof(size_t))
                len = sizeof(struct __freelist) - sizeof(size_t);

        /*
         * First, walk the free list and try finding a chunk that
         * would match exactly.  If we found one, we are done.  While
         * walking, note down the smallest chunk we found that would
         * still fit the request -- we need it for step 2.
         *
         */
        for(s = 0, fp1 = __flp, fp2 = 0;
                fp1;
                fp2 = fp1, fp1 = fp1->nx) {
                if(fp1->sz < len)
                        continue;
                if(fp1->sz == len) {
                        /*
                         * Found it.  Disconnect the chunk from the
                         * freelist, and return it.
                         */
                        if(fp2)
                                fp2->nx = fp1->nx;
                        else
                                __flp = fp1->nx;
                        return &(fp1->nx);
                } else {
                        if(s == 0 || fp1->sz < s) {
                                /* this is the smallest chunk found so far */
                                s = fp1->sz;
                                sfp1 = fp1;
                                sfp2 = fp2;
                        }
                }
        }
        /*
         * Step 2: If we found a chunk on the freelist that would fit
         * (but was too large), look it up again and use it, since it
         * is our closest match now.  Since the freelist entry needs
         * to be split into two entries then, watch out that the
         * difference between the requested size and the size of the
         * chunk found is large enough for another freelist entry; if
         * not, just enlarge the request size to what we have found,
         * and use the entire chunk.
         */
        if(s) {
                if(s - len < sizeof(struct __freelist)) {
                        /* Disconnect it from freelist and return it. */
                        if(sfp2)
                                sfp2->nx = sfp1->nx;
                        else
                                __flp = sfp1->nx;
                        return &(sfp1->nx);
                }
                /*
                 * Split them up.  Note that we leave the first part
                 * as the new (smaller) freelist entry, and return the
                 * upper portion to the caller.  This saves us the
                 * work to fix up the freelist chain; we just need to
                 * fixup the size of the current entry, and note down
                 * the size of the new chunk before returning it to
                 * the caller.
                 */
                cp = (char *) sfp1;
                s -= len;
                cp += s;
                sfp2 = (struct __freelist *) cp;
                sfp2->sz = len;
                sfp1->sz = s - sizeof(size_t);
                return &(sfp2->nx);
        }
        /*
         * Step 3: If the request could not be satisfied from a
         * freelist entry, just prepare a new chunk.  This means we
         * need to obtain more memory first.  The largest address just
         * not allocated so far is remembered in the brkval variable.
         * Under Unix, the "break value" was the end of the data
         * segment as dynamically requested from the operating system.
         * Since we don't have an operating system, just make sure
         * that we don't collide with the stack.
         */
        if(__brkval == NULL)
                __brkval = __malloc_heap_start;
        cp = __malloc_heap_end;
        if(cp == 0)
                cp = STACK_POINTER() - __malloc_margin;
        if(cp <= __brkval)
                /*
                 * Memory exhausted.
                 */
                return NULL;
        avail = cp - __brkval;
        /*
         * Both tests below are needed to catch the case len >= 0xfffe.
         */
        if(avail >= len && avail >= len + sizeof(size_t)) {
                fp1 = (struct __freelist *) __brkval;
                __brkval += len + sizeof(size_t);
                fp1->sz = len;
                return &(fp1->nx);
        }
        /*
         * Step 4: There's no help, just fail. :-/
         */
        return NULL;
}

static
void
_free(void *p) {
        struct __freelist *fp1, *fp2, *fpnew;
        char *cp1, *cp2, *cpnew;

        /* ISO C says free(NULL) must be a no-op */
        if(p == NULL)
                return;

        if((char *)p < __malloc_heap_start) return; // Don't free, out of range.
        cpnew = p;
        cpnew -= sizeof(size_t);
        fpnew = (struct __freelist *) cpnew;
        fpnew->nx = NULL;

        /*
         * Trivial case first: if there's no freelist yet, our entry
         * will be the only one on it.  If this is the last entry, we
         * can reduce __brkval instead.
         */
        if(__flp == NULL) {
                if((char *) p + fpnew->sz == __brkval)
                        __brkval = cpnew;
                else
                        __flp = fpnew;
                return;
        }

        /*
         * Now, find the position where our new entry belongs onto the
         * freelist.  Try to aggregate the chunk with adjacent chunks
         * if possible.
         */
        for(fp1 = __flp, fp2 = NULL;
                fp1;
                fp2 = fp1, fp1 = fp1->nx) {
                if(fp1 < fpnew)
                        continue;
                cp1 = (char *) fp1;
                fpnew->nx = fp1;
                if((char *) &(fpnew->nx) + fpnew->sz == cp1) {
                        /* upper chunk adjacent, assimilate it */
                        fpnew->sz += fp1->sz + sizeof(size_t);
                        fpnew->nx = fp1->nx;
                }
                if(fp2 == NULL) {
                        /* new head of freelist */
                        __flp = fpnew;
                        return;
                }
                break;
        }
        /*
         * Note that we get here either if we hit the "break" above,
         * or if we fell off the end of the loop.  The latter means
         * we've got a new topmost chunk.  Either way, try aggregating
         * with the lower chunk if possible.
         */
        fp2->nx = fpnew;
        cp2 = (char *) &(fp2->nx);
        if(cp2 + fp2->sz == cpnew) {
                /* lower junk adjacent, merge */
                fp2->sz += fpnew->sz + sizeof(size_t);
                fp2->nx = fpnew->nx;
        }
        /*
         * If there's a new topmost chunk, lower __brkval instead.
         */
        for(fp1 = __flp, fp2 = NULL;
                fp1->nx != 0;
                fp2 = fp1, fp1 = fp1->nx)
                /* advance to entry just before end of list */;
        cp2 = (char *) &(fp1->nx);
        if(cp2 + fp1->sz == __brkval) {
                if(fp2 == NULL)
                        /* Freelist is empty now. */
                        __flp = NULL;
                else
                        fp2->nx = NULL;
                __brkval = cp2 - sizeof(size_t);
        }
}

static
void *
_realloc(void *ptr, size_t len) {
        struct __freelist *fp1=NULL, *fp2, *fp3, *ofp3;
        char *cp, *cp1;
        void *memp;
        size_t s, incr;

        /* Trivial case, required by C standard. */
        if(ptr == NULL)
                return _malloc(len);

        if((char *)ptr < __malloc_heap_start) goto move_it; // Don't extend, and won't free.
        cp1 = (char *) ptr;
        cp1 -= sizeof(size_t);
        fp1 = (struct __freelist *) cp1;

        cp = (char *) ptr + len; /* new next pointer */
        if(cp < cp1)
                /* Pointer wrapped across top of RAM, fail. */
                return NULL;

        /*
         * See whether we are growing or shrinking.  When shrinking,
         * we split off a chunk for the released portion, and call
         * free() on it.  Therefore, we can only shrink if the new
         * size is at least sizeof(struct __freelist) smaller than the
         * previous size.
         */
        if(len <= fp1->sz) {
                /* The first test catches a possible unsigned int
                 * rollover condition. */
                if(fp1->sz <= sizeof(struct __freelist) ||
                        len > fp1->sz - sizeof(struct __freelist))
                        return ptr;
                fp2 = (struct __freelist *) cp;
                fp2->sz = fp1->sz - len - sizeof(size_t);
                fp1->sz = len;
                _free(&(fp2->nx));
                return ptr;
        }

        /*
         * If we get here, we are growing.  First, see whether there
         * is space in the free list on top of our current chunk.
         */
        incr = len - fp1->sz;
        cp = (char *) ptr + fp1->sz;
        fp2 = (struct __freelist *) cp;
        for(s = 0, ofp3 = NULL, fp3 = __flp;
                fp3;
                ofp3 = fp3, fp3 = fp3->nx) {
                if(fp3 == fp2 && fp3->sz + sizeof(size_t) >= incr) {
                        /* found something that fits */
                        if(fp3->sz + sizeof(size_t) - incr > sizeof(struct __freelist)) {
                                /* split off a new freelist entry */
                                cp = (char *) ptr + len;
                                fp2 = (struct __freelist *) cp;
                                fp2->nx = fp3->nx;
                                fp2->sz = fp3->sz - incr;
                                fp1->sz = len;
                        } else {
                                /* it just fits, so use it entirely */
                                fp1->sz += fp3->sz + sizeof(size_t);
                                fp2 = fp3->nx;
                        }
                        if(ofp3)
                                ofp3->nx = fp2;
                        else
                                __flp = fp2;
                        return ptr;
                }
                /*
                 * Find the largest chunk on the freelist while
                 * walking it.
                 */
                if(fp3->sz > s)
                        s = fp3->sz;
        }
        /*
         * If we are the topmost chunk in memory, and there was no
         * large enough chunk on the freelist that could be re-used
         * (by a call to malloc() below), quickly extend the
         * allocation area if possible, without need to copy the old
         * data.
         */
        if(__brkval == (char *) ptr + fp1->sz && len > s) {
                cp1 = __malloc_heap_end;
                cp = (char *) ptr + len;
                if(cp1 == 0)
                        cp1 = STACK_POINTER() - __malloc_margin;
                if(cp < cp1) {
                        __brkval = cp;
                        fp1->sz = len;
                        return ptr;
                }
                /* If that failed, we are out of luck. */
                return NULL;
        }

        /*
         * Call malloc() for a new chunk, then copy over the data, and
         * release the old region.
         */
move_it:
        if((memp = _malloc(len)) == NULL)
                return NULL;
        memcpy(memp, ptr, fp1->sz);
        _free(ptr);
        return memp;
}

/* thread/irq/task safe wrappers */

ATTRIBUTE_CLIB_SECTION
void *
malloc(size_t len) {
        register void *p;

        XATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
                p = _malloc(len);
        }
        return p;
}

ATTRIBUTE_CLIB_SECTION
void
free(void *p) {

        XATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
                _free(p);
        }
}

ATTRIBUTE_CLIB_SECTION
void *
realloc(void *ptr, size_t len) {
        register void *p;

        XATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
                p = _realloc(ptr, len);
        }
        return p;
}
#endif


================================================
FILE: libraries/ISR_safe_memory/mlock.c
================================================
/* Modified from newlib-2012.09 to support ISR safety. */
/* Copyright (C) 2015-2016 Andrew J. Kroll
   and
Copyright (C) 2011 Circuits At Home, LTD. All rights reserved.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

Contact information
-------------------

Circuits At Home, LTD
Web      :  http://www.circuitsathome.com
e-mail   :  support@circuitsathome.com
 */
#if !defined(ARDUINO_spresense_ast)
#include <limits.h>
#if defined(_NEWLIB_VERSION)
#include <Arduino.h>
#include <malloc.h>
#include <sys/lock.h>
#if !defined(DDSB)
#if defined(__arm__)
__attribute__((always_inline)) static inline void A__DSB(void) {
        __asm__ volatile ("dsb");
}
#endif // defined(__USE_CMSIS_VECTORS__)
#elif defined(__mips__)
__attribute__((always_inline)) static inline void A__DSB(void) {
        __asm__ volatile ("sync" : : : "memory");
}
#else
#error "No Barrier implementation"
#endif // defined(__arm__)

#define DDSB() A__DSB()

/* Indicate that we are to use ISR safety. */
#define __USE_ISR_SAFE_MALLOC__ 1

/*
FUNCTION
<<__malloc_lock>>, <<__malloc_unlock>>---lock malloc pool

INDEX
        __malloc_lock
INDEX
        __malloc_unlock

ANSI_SYNOPSIS
        #include <malloc.h>
        void __malloc_lock (struct _reent *<[reent]>);
        void __malloc_unlock (struct _reent *<[reent]>);

TRAD_SYNOPSIS
        void __malloc_lock(<[reent]>)
        struct _reent *<[reent]>;

        void __malloc_unlock(<[reent]>)
        struct _reent *<[reent]>;

DESCRIPTION
The <<malloc>> family of routines call these functions when they need to lock
the memory pool.  The version of these routines supplied in the library use
the lock API defined in sys/lock.h.  If multiple threads of execution can
call <<malloc>>, or if <<malloc>> can be called reentrantly, then you need to
define your own versions of these functions in order to safely lock the
memory pool during a call.  If you do not, the memory pool may become
corrupted.

A call to <<malloc>> may call <<__malloc_lock>> recursively; that is,
the sequence of calls may go <<__malloc_lock>>, <<__malloc_lock>>,
<<__malloc_unlock>>, <<__malloc_unlock>>.  Any implementation of these
routines must be careful to avoid causing a thread to wait for a lock
that it already holds.
 */


#ifndef __SINGLE_THREAD__
__attribute__((unused))
__LOCK_INIT_RECURSIVE(static, __malloc_lock_object);
#endif

#ifdef __USE_ISR_SAFE_MALLOC__
static volatile unsigned long __isr_safety = 0;


#if defined(__arm__)
static volatile uint8_t irecover;
#define dont_interrupt() __dont_interrupt()
#define can_interrupt(x)  __can_interrupt(x)

static inline void __can_interrupt(uint8_t status)  __attribute__((always_inline, unused));

static inline  void __can_interrupt(uint8_t status) {
        if(status) interrupts();
}

static inline unsigned char __dont_interrupt(void) __attribute__((always_inline, unused));

static inline unsigned char __dont_interrupt(void) {
        unsigned int primask, faultmask;
        asm volatile ("mrs %0, primask" : "=r" (primask));
        asm volatile ("mrs %0, faultmask" : "=r" (faultmask));
        noInterrupts();
        if(primask || faultmask) return 0;
        return 1;
}

#elif defined(ARDUINO_ARCH_PIC32)
static volatile uint32_t irecover;
#define dont_interrupt() disableInterrupts()
#define can_interrupt(x)  restoreInterrupts(x)
#else
#error "No ISR safety, sorry."
#endif

void
__malloc_lock(ptr)
struct _reent *ptr __attribute__((unused));
{
#ifdef __USE_ISR_SAFE_MALLOC__
#if defined(__arm__)
static volatile uint8_t i;
#elif defined(ARDUINO_ARCH_PIC32)
static volatile uint32_t i;
#endif

        i = dont_interrupt();
#if 0
        // debugging, pin 2 LOW
        digitalWrite(2, LOW);
#endif

        if(!__isr_safety) {
                irecover = i;
        }
        __isr_safety++;
        DDSB();
#endif
#ifndef __SINGLE_THREAD__
        __lock_acquire_recursive(__malloc_lock_object);
#endif
}

void
__malloc_unlock(ptr)
struct _reent *ptr __attribute__((unused));
{
#ifndef __SINGLE_THREAD__
        __lock_release_recursive(__malloc_lock_object);
#endif
#ifdef __USE_ISR_SAFE_MALLOC__
        if(__isr_safety) {
                __isr_safety--;
        }
        DDSB();
        if(!__isr_safety) {
#if 0
        // debugging, pin 2 HIGH
        digitalWrite(2, HIGH);
#endif
                can_interrupt(irecover);
        }
#endif
}
#else
// This is needed to keep the compiler happy...
int mlock_null(void) {
  return 0;
}
#endif
#endif
#endif


================================================
FILE: libraries/ISR_safe_memory/sectionname.h
================================================
#if defined(__AVR__)
/* Copyright (C) 2015-2016 Andrew J. Kroll
   and
Copyright (C) 2011 Circuits At Home, LTD. All rights reserved.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

Contact information
-------------------

Circuits At Home, LTD
Web      :  http://www.circuitsathome.com
e-mail   :  support@circuitsathome.com
 */
/* Copyright (c) 2009 Atmel Corporation
   All rights reserved.

   Redistribution and use in source and binary forms, with or without
   modification, are permitted provided that the following conditions are met:

 * Redistributions of source code must retain the above copyright
     notice, this list of conditions and the following disclaimer.

 * Redistributions in binary form must reproduce the above copyright
     notice, this list of conditions and the following disclaimer in
     the documentation and/or other materials provided with the
     distribution.

 * Neither the name of the copyright holders nor the names of
     contributors may be used to endorse or promote products derived
     from this software without specific prior written permission.

  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  POSSIBILITY OF SUCH DAMAGE.
 */

#ifndef __SECTIONNAME_H__
#define __SECTIONNAME_H__

/* Put all avr-libc functions in a common, unique sub-section name under .text. */

#define CLIB_SECTION    .text.avr-libc
#define MLIB_SECTION    .text.avr-libc.fplib

#define STR(x)   _STR(x)
#define _STR(x)  #x

#define ATTRIBUTE_CLIB_SECTION  __attribute__ ((section (STR(CLIB_SECTION))))
#define ATTRIBUTE_MLIB_SECTION  __attribute__ ((section (STR(MLIB_SECTION))))

#define ASSEMBLY_CLIB_SECTION   .section CLIB_SECTION, "ax", @progbits
#define ASSEMBLY_MLIB_SECTION   .section MLIB_SECTION, "ax", @progbits

#endif
#endif


================================================
FILE: libraries/ISR_safe_memory/stdlib_private.h
================================================
#if defined(__AVR__)
/* Copyright (C) 2015-2016 Andrew J. Kroll
   and
Copyright (C) 2011 Circuits At Home, LTD. All rights reserved.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

Contact information
-------------------

Circuits At Home, LTD
Web      :  http://www.circuitsathome.com
e-mail   :  support@circuitsathome.com
 */
/* Copyright (c) 2004, Joerg Wunsch
   All rights reserved.

   Redistribution and use in source and binary forms, with or without
   modification, are permitted provided that the following conditions are met:

 * Redistributions of source code must retain the above copyright
     notice, this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
     notice, this list of conditions and the following disclaimer in
     the documentation and/or other materials provided with the
     distribution.
 * Neither the name of the copyright holders nor the names of
     contributors may be used to endorse or promote products derived
     from this software without specific prior written permission.

  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  POSSIBILITY OF SUCH DAMAGE.
 */

/* $Id: stdlib_private.h 1657 2008-03-24 17:11:08Z arcanum $ */

#include <inttypes.h>
#include <stdlib.h>
#include <avr/io.h>

#if !defined(__DOXYGEN__)

struct __freelist {
        size_t sz;
        struct __freelist *nx;
};

#endif

extern char *__brkval; /* first location not yet allocated */
extern struct __freelist *__flp; /* freelist pointer (head of freelist) */
extern size_t __malloc_margin; /* user-changeable before the first malloc() */
extern char *__malloc_heap_start;
extern char *__malloc_heap_end;

extern char __heap_start;
extern char __heap_end;

#define STACK_POINTER() ((char *)AVR_STACK_POINTER_REG)

#endif


================================================
FILE: libraries/UHS_ByteBuffer/UHS_ByteBuffer.cpp
================================================
/*
  ByteBuffer.cpp - A circular buffer implementation for Arduino
  Created by Sigurdur Orn, July 19, 2010.
  siggi@mit.edu
  Updated by GreyGnome (aka Mike Schwager) Mon Apr  8 21:11:15 CDT 2013
        Fixed putString() so it reenables inputs correctly. In the if (length == capacity) section,
        it was missing this line:
                        SREG = oldSREG; // Restore register; reenables interrupts
  Updated by GreyGnome (aka Mike Schwager) Thu Feb 23 17:25:14 CST 2012
        added the putString() method and the fillError variable.
        added the checkError() and resetError() methods.  The checkError() method resets the fillError variable
        to false as a side effect.
        added the ByteBuffer(unsigned int buf_size) constructor.
        added the init() method, and had the constructor call it automagically.
        Also made the capacity, position, length, and fillError variables volatile, for safe use by interrupts.
        Mon Dec  3 07:55:04 CST 2012
        Added the putHex() and putDec() methods.
 Updated by Andrew J. Kroll
        Renamed library and removed the AVR bits and ISR protection,
        because this will only be used in ISR safe code.
 */

#include "UHS_ByteBuffer.h"

void UHS_ByteBuffer::init() {
        UHS_ByteBuffer::init(DEFAULTBUFSIZE);
}

void UHS_ByteBuffer::init(unsigned int buf_length) {
        deAllocate();
        if(buf_length > 0) {
                data = (uint8_t*)malloc(sizeof (uint8_t) * buf_length);
        }
        capacity = buf_length;
        position = 0;
        length = 0;
        fillError = false;
}

// Arduino 1.0: free() doesn't free.  :-(  This is a no-op as of 11/2012.

void UHS_ByteBuffer::deAllocate() {
        if(length > 0) {
                free(data);
                capacity = 0;
                position = 0;
                length = 0;
                fillError = false;
        }
}

void UHS_ByteBuffer::clear() {
        position = 0;
        length = 0;
}

void UHS_ByteBuffer::resetError() {
        fillError = false;
}

bool UHS_ByteBuffer::checkError() {
        /*
        if (fillError) {
                Serial.print("E: checkError: length ");
                Serial.println(length, DEC);
        }
         */

        bool result = fillError;
        fillError = false;
        return (result);
}

int UHS_ByteBuffer::getSize() {
        return length;
}

int UHS_ByteBuffer::AvailableForPut() {
        return capacity - length;
}

int UHS_ByteBuffer::getCapacity() {
        return capacity;
}

uint8_t UHS_ByteBuffer::peek(unsigned int index) {
        uint8_t b = data[(position + index) % capacity];
        return b;
}

uint8_t UHS_ByteBuffer::put(uint8_t in) {
        if(length < capacity) {
                // save data byte at end of buffer
                data[(position + length) % capacity] = in;
                // increment the length
                length++;
                return 1;
        }
        // return failure
        //Serial.print("E: put: ");
        //Serial.println(length, DEC);
        fillError = true;
        return 0;
}

uint8_t UHS_ByteBuffer::putString(const char *in) {
        return (putString((char *)in));
}

uint8_t UHS_ByteBuffer::putString(char *in) {
        uint8_t count = 0;
        char *inString;

        inString = in;
        while(length <= capacity) {
                if(length == capacity) {
                        fillError = true;
                        return count;
                }
                // save data byte at end of buffer
                data[(position + length) % capacity] = *inString;
                // increment the length
                length++;
                inString++;
                count++;
                if(*inString == 0) {
                        if(count == 0) fillError = true; // Serial.println("E: putString"); };
                        return count;
                }
        }
        return count;
}

uint8_t UHS_ByteBuffer::putInFront(uint8_t in) {
        if(length < capacity) {
                // save data byte at end of buffer
                if(position == 0)
                        position = capacity - 1;
                else
                        position = (position - 1) % capacity;
                data[position] = in;
                // increment the length
                length++;
                return 1;
        }
        // return failure
        //Serial.println("E: putInFront");
        fillError = true;
        return 0;
}

// Returns 0 if length of data is 0.

uint8_t UHS_ByteBuffer::get() {
        uint8_t b = 0;

        if(length > 0) {
                b = data[position];
                // move index down and decrement length
                position = (position + 1) % capacity;
                length--;
        }
        return b;
}

uint8_t UHS_ByteBuffer::getFromBack() {
        uint8_t b = 0;
        if(length > 0) {
                b = data[(position + length - 1) % capacity];
                length--;
        }

        return b;
}

//
// Ints
//

void UHS_ByteBuffer::putIntInFront(int in) {
        uint8_t *pointer = (uint8_t *) & in;
        putInFront(pointer[0]);
        putInFront(pointer[1]);
}

void UHS_ByteBuffer::putInt(int in) {
        uint8_t *pointer = (uint8_t *) & in;
        put(pointer[1]);
        put(pointer[0]);
}

int UHS_ByteBuffer::getInt() {
        int ret;
        uint8_t *pointer = (uint8_t *) & ret;
        pointer[1] = get();
        pointer[0] = get();
        return ret;
}

int UHS_ByteBuffer::getIntFromBack() {
        int ret;
        uint8_t *pointer = (uint8_t *) & ret;
        pointer[0] = getFromBack();
        pointer[1] = getFromBack();
        return ret;
}

void UHS_ByteBuffer::putHex(uint8_t theByte) {
        put('0');
        put('x');
        uint8_t hinybble = theByte >> 4;
        uint8_t lonybble = theByte & 0x0F;
        uint8_t addend = 0;
        if(hinybble >= 0x0a) addend = 7;
        put(hinybble + 48 + addend);
        if(lonybble >= 0x0a) addend = 7;
        else addend = 0;
        put(lonybble + 48 + addend);
}

void UHS_ByteBuffer::putDec(uint8_t number) {
        uint8_t hundreds = 0;
        uint8_t tens = 0;
        uint8_t ones = 0;
        uint8_t tmp = number;

        while(tmp >= 100) {
                hundreds++;
                tmp -= 100;
        }
        while(tmp >= 10) {
                tens++;
                tmp -= 10;
        }
        ones = tmp;
        hundreds += 48;
        tens += 48;
        ones += 48;
        if(number >= 100) {
                put(hundreds);
        }
        if(number >= 10) {
                put(tens);
        }
        put(ones);
}

void UHS_ByteBuffer::putDec(int8_t number) {
        uint8_t absNumber = abs(number);
        if(number < 0) put('-');
        putDec(absNumber);
}

//
// Longs
//

void UHS_ByteBuffer::putLongInFront(long in) {
        uint8_t *pointer = (uint8_t *) & in;
        putInFront(pointer[0]);
        putInFront(pointer[1]);
        putInFront(pointer[2]);
        putInFront(pointer[3]);
}

void UHS_ByteBuffer::putLong(long in) {
        uint8_t *pointer = (uint8_t *) & in;
        put(pointer[3]);
        put(pointer[2]);
        put(pointer[1]);
        put(pointer[0]);
}

long UHS_ByteBuffer::getLong() {
        long ret;
        uint8_t *pointer = (uint8_t *) & ret;
        pointer[3] = get();
        pointer[2] = get();
        pointer[1] = get();
        pointer[0] = get();
        return ret;
}

long UHS_ByteBuffer::getLongFromBack() {
        long ret;
        uint8_t *pointer = (uint8_t *) & ret;
        pointer[0] = getFromBack();
        pointer[1] = getFromBack();
        pointer[2] = getFromBack();
        pointer[3] = getFromBack();
        return ret;
}


//
// Floats
//

void UHS_ByteBuffer::putFloatInFront(float in) {
        uint8_t *pointer = (uint8_t *) & in;
        putInFront(pointer[0]);
        putInFront(pointer[1]);
        putInFront(pointer[2]);
        putInFront(pointer[3]);
}

void UHS_ByteBuffer::putFloat(float in) {
        uint8_t *pointer = (uint8_t *) & in;
        put(pointer[3]);
        put(pointer[2]);
        put(pointer[1]);
        put(pointer[0]);
}

float UHS_ByteBuffer::getFloat() {
        float ret;
        uint8_t *pointer = (uint8_t *) & ret;
        pointer[3] = get();
        pointer[2] = get();
        pointer[1] = get();
        pointer[0] = get();
        return ret;
}

float UHS_ByteBuffer::getFloatFromBack() {
        float ret;
        uint8_t *pointer = (uint8_t *) & ret;
        pointer[0] = getFromBack();
        pointer[1] = getFromBack();
        pointer[2] = getFromBack();
        pointer[3] = getFromBack();
        return ret;
}


================================================
FILE: libraries/UHS_ByteBuffer/UHS_ByteBuffer.h
================================================
/*
  ByteBuffer.h - A circular buffer implementation for Arduino
  Created by Sigurdur Orn, July 19, 2010.  siggi@mit.edu
  Updated by GreyGnome (aka Mike Schwager) Thu Feb 23 17:25:14 CST 2012
        added the putString() method and the fillError variable.
        added the checkError() and resetError() methods.  The checkError() method resets the fillError variable
        to false as a side effect.
        added the ByteBuffer(unsigned int buf_size) constructor.
        added the init() method, and had the constructor call it automagically.
        protected certain sections of the code with cli()/sei() calls, for safe use by interrupts.
        Also made the capacity, position, length, and fillError variables volatile, for safe use by interrupts.
 Updated by Andrew J. Kroll
        Renamed library and removed the AVR bits and ISR protection,
        because this will only be used in ISR safe code.
        Might kill methods ither than standard ones if they prove to be useless.
 */

#ifndef UHS_ByteBuffer_h
#define UHS_ByteBuffer_h

#include <stdint.h>
#include <stddef.h>
#include <stdlib.h>

#define DEFAULTBUFSIZE 32

class UHS_ByteBuffer {
public:

        UHS_ByteBuffer() {
                init();
        };

        UHS_ByteBuffer(unsigned int buf_size) {
                init(buf_size);
        };

        // This method initializes the datastore of the buffer to a certain size.
        void init(unsigned int buf_size);

        // This method initializes the datastore of the buffer to the default size.
        void init();

        // This method resets the buffer into an original state (with no data)
        void clear();

        // This method resets the fillError variable to false.
        void resetError();

        // This method tells you if your buffer overflowed at some time since the last
        // check.  The error state will be reset to false.
        bool checkError();

        // This releases resources for this buffer, after this has been called the buffer should NOT be used
        void deAllocate();

        // Returns how much space is used in the buffer
        int getSize();

        // Returns how much space is available
        int AvailableForPut();

        // Returns the maximum capacity of the buffer
        int getCapacity();

        // This method returns the byte that is located at index in the buffer but doesn't modify the buffer like the get methods (doesn't remove the returned byte from the buffer)
        uint8_t peek(unsigned int index);

        //
        // Put methods, either a regular put in back or put in front
        //
        uint8_t putInFront(uint8_t in);
        uint8_t put(uint8_t in);
        uint8_t putString(const char *in);
        uint8_t putString(char *in);

        void putIntInFront(int in);
        void putInt(int in);

        void putHex(uint8_t in);
        void putDec(uint8_t in);
        void putDec(int8_t in);

        void putLongInFront(long in);
        void putLong(long in);

        void putFloatInFront(float in);
        void putFloat(float in);

        //
        // Get methods, either a regular get from front or from back
        //
        uint8_t get();
        uint8_t getFromBack();

        int getInt();
        int getIntFromBack();

        long getLong();
        long getLongFromBack();

        float getFloat();
        float getFloatFromBack();

private:
        uint8_t* data=NULL;

        volatile unsigned int capacity=0;
        volatile unsigned int position=0;
        volatile unsigned int length=0;
        volatile bool fillError;
};

#endif


================================================
FILE: libraries/UHS_ByteBuffer/examples/ByteBufferExample.ino
================================================
#include <Arduino.h>
#include <UHS_ByteBuffer.h>

/*
  Silly program that emulates buffered processing
  using a circular bytebuffer
 */

UHS_ByteBuffer buffer;

void setup() {
        // Initialize the buffer with a capacity for 256 bytes
        buffer.init(256);

        // Init serial just to debug
        Serial.begin(9600);
}

int cnt = 0;

void loop() {
        cnt++;

        // Every 100th update
        if(cnt % 100 == 0) {
                buffer.clear();
                buffer.put(200); // Put one byte at end
                buffer.putInt(2000); // Put one int at end
                buffer.putLong(20000); // Put one long at end
                buffer.putFloatInFront(200000); // Put one float at beginning
        }

        // Every 100th update	(20 updates offset)
        if((cnt + 20) % 100 == 0) {
                Serial.println("Received following bytes");
                while(buffer.getSize() > 0)
                        Serial.println(buffer.get(), DEC);
                Serial.println("");
        }
}



================================================
FILE: libraries/UHS_FS/FAT/FAT.cpp
================================================
/* Copyright (C) 2015-2016 Andrew J. Kroll
 *  and
 * Copyright (C) 2011 Circuits At Home, LTD. All rights reserved.
 *
 * This Library is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This Library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this Library.  If not, see
 * <http://www.gnu.org/licenses/>.
 */
#include <Arduino.h>
#include <avr/pgmspace.h>
#include <inttypes.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "FAT/FAT.h"
#include "UHS_FS.h"
#include "FatFS/src/diskio.h"

#ifndef RTC_LOADED
#error RTClib NOT LOADED
#endif

uint32_t RTClock() {
        return RTCnow().FatPacked();
}

PFAT::PFAT(storage_t *sto, uint8_t lv) {
        Create(sto, lv, (uint32_t)0);
}

/* Identify the FAT type. */
PFAT::PFAT(storage_t *sto, uint8_t lv, uint32_t first) {
        Create(sto, lv, first);
}

void PFAT::Create(storage_t *sto, uint8_t lv, uint32_t first) {
        label = NULL;
        ffs = NULL;

        set_clock_call((void*)&RTClock);
        uint8_t buf[sto->SectorSize];
        TCHAR lb[256];
        lb[0] = 0x00;
        int i = 0;
        if(lv > PFAT_VOLUMES) return;
        st = (int)(sto->Reads)(first, buf, sto, 1);
        if(!st) {
                fat_boot_t *BR = (fat_boot_t *)buf;
                // verify that the sig is OK.
                if(BR->bootSectorSig0 != 0x55 || BR->bootSectorSig1 != 0xAA) {
                        //printf_P(PSTR("Bad sig? %02x %02x\r\n"), BR->bootSectorSig0, BR->bootSectorSig1);
                        st = -1;
                } else {
                        Offset = first;
                        storage = sto;
                        ffs = new FATFS;
                        ffs->pfat = this;
                        volmap = lv;
                        st = 0xff & f_mount(volmap, ffs);
                        if(!st) {
                                if(label != NULL) {
                                        delete label;
                                        label = NULL;
                                }
                                TCHAR path[4];
                                path[0] = '0' + lv;
                                path[1] = ':';
                                path[2] = '/';
                                path[3] = 0x00;
                                DWORD sn;
                                FRESULT t = f_getlabel(path, lb, &sn);
                                label = (uint8_t *)(operator new[] (13));
                                label[0] = '/';
                                label[1] = 0x00;
                                if(!t) {
                                        for(i = 0; lb[i] != 0x00 && i < 12; i++)
                                                label[i + 1] = lb[i];
                                        label[i + 1] = 0x00;
                                        // We will need to convert 'wide' chars, etc? yuck!
                                        // Life would be a whole lot easier if everything was just UTF-8!
                                }
                                //printf_P(PSTR("VOLUME %i @ '%s' Offset:%lu\r\n"), volmap, &label[0],Offset);
                        } else {
                                // Unmount it
                                f_mount(volmap, NULL);
                                //printf_P(PSTR("Mount failed %i(%x)\r\n"), st, st);
                        }
                }
        }
}

int PFAT::MountStatus() {
        return st;
}

/*
    disk_initialize - Initialize disk drive (no need for most devices!)
    disk_status - Get disk status
    disk_read - Read sector(s)
    disk_write - Write sector(s)
    disk_ioctl - Control device dependent features
    get_fattime - Get current time
 */
DSTATUS PFAT::disk_initialize(void) {
        return (storage->Initialize(storage));
}

DSTATUS PFAT::disk_status(void) {
        bool rc = storage->Status(storage);
        if(rc) {
                return STA_OK;
        }
        return STA_PROTECT;
}

DRESULT PFAT::disk_read(FBYTE *buff, DWORD sector, FBYTE count) {
        int rc = storage->Reads(sector+Offset, (uint8_t*)buff, storage, count);
        if(rc == 0) return RES_OK;
        return RES_ERROR;
}

DRESULT PFAT::disk_write(const FBYTE *buff, DWORD sector, FBYTE count) {
        int rc = storage->Writes(sector+Offset, (uint8_t*)buff, storage, count);
        if(rc == 0) return RES_OK;
        return RES_ERROR;
}

DRESULT PFAT::disk_ioctl(FBYTE cmd, void* buff) {
        switch(cmd) {
                case CTRL_POWER:
                        // 0 off
                        // 1 on
                        // 2 status
                        switch(*(int*)buff) {
                                case 0:
                                        if(ffs != NULL) {
                                                if(!storage->Status(storage)) {
                                                        storage->Commit(storage);
                                                }
                                                f_mount(volmap, NULL);
                                                delete ffs;
                                                ffs = NULL;
                                        }
                                        if(label != NULL) {
                                                delete label;
                                                label = NULL;
                                        }
#ifdef LOAD_UHS_BULK_STORAGE
                                        if(storage->driver_type == 0) {
                                                // USB...
                                                UHS_USB_Storage[((pvt_t *)storage->private_data)->B]->bPollEnable = 0; //->Release();
                                        }
#endif
                                        *(int*)buff = 0;
                                        break;
                                case 1:
                                        *(int*)buff = 1; // not possible, pretend
                                        break;
                                default:
                                        *(int*)buff = 1; // if it isn't present, it's not got any power :-D
                                        break;
                        }
                case CTRL_SYNC:
                        break;
                case GET_SECTOR_COUNT:
                        *(DWORD*)buff = storage->TotalSectors;
                        break;
                case GET_SECTOR_SIZE:
                        *(WORD*)buff = storage->SectorSize;
                        break;
                case CTRL_COMMIT:
                        if(!storage->Status(storage)) return RES_WRPRT;
                        if(storage->Commit(storage)) return RES_ERROR;
                        break;
                case CTRL_EJECT:
                        switch(*(int*)buff) {
                                case 0:

                                        if(ffs != NULL) {
                                                if(!storage->Status(storage)) {
                                                        storage->Commit(storage);
                                                }
                                                f_mount(volmap, NULL);
                                                delete ffs;
                                                ffs = NULL;
                                        }
                                        if(label != NULL) {
                                                delete label;
                                                label = NULL;
                                        }
                                        break;
                                default:
                                        // mount
                                        if(ffs != NULL) break;
                                        Create(storage, volmap, Offset);
                                        break;
                        }
                        break;
                default:
                        return RES_PARERR;
        }
        return RES_OK;
}

uint32_t PFAT::get_fattime() {

        return ((clock_call)());
}

void PFAT::set_clock_call(void *call) {

        clock_call = (uint32_t(*)())call;
}

/* This function is defined for only project compatibility               */

void disk_timerproc(void) {
        /* Nothing to do */
}

int PFAT::ReadSectors(uint32_t sector, uint8_t *buf, uint8_t count) {

        return storage->Reads(Offset + sector, buf, storage, count);
}

int PFAT::WriteSectors(uint32_t sector, uint8_t *buf, uint8_t count) {

        return storage->Writes(Offset + sector, buf, storage, count);
}

PFAT::~PFAT() {
        if(ffs != NULL) {
                f_mount(volmap, NULL);
                delete ffs;
                ffs = NULL;
        }

        if(label != NULL) {
                delete label;
                label = NULL;
        }
}

// Allow callbacks from C to C++ class methods.
extern "C" {

        DSTATUS CPP_PFAT_disk_initialize(PFAT *pfat) {
                return pfat->disk_initialize();
        }

        DSTATUS CPP_PFAT_disk_status(PFAT *pfat) {
                return pfat->disk_status();
        }

        DRESULT CPP_PFAT_disk_read(PFAT *pfat, FBYTE *buff, DWORD sector, FBYTE count) {
                return pfat->disk_read(buff, sector, count);
        }

        DRESULT CPP_PFAT_disk_write(PFAT *pfat, const FBYTE *buff, DWORD sector, FBYTE count) {
                return pfat->disk_write(buff, sector, count);
        }

        DRESULT CPP_PFAT_disk_ioctl(PFAT *pfat, FBYTE cmd, void *buff) {
                return pfat->disk_ioctl(cmd, buff);
        }

        uint32_t CPP_PFAT_get_fattime(PFAT *pfat) {
                return pfat->get_fattime();
        }
}


================================================
FILE: libraries/UHS_FS/FAT/FAT.h
================================================
/* Copyright (C) 2015-2016 Andrew J. Kroll
 *  and
 * Copyright (C) 2011 Circuits At Home, LTD. All rights reserved.
 *
 * Parts from
 *
 * Arduino SdFat Library
 * Copyright (C) 2012 by William Greiman
 *
 * This file is part of the Arduino SdFat Library
 *
 * This Library is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This Library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with the Arduino SdFat Library.  If not, see
 * <http://www.gnu.org/licenses/>.
 */

#ifndef FAT_H
#define	FAT_H
#include "FatFS/src/ff.h"



//------------------------------------------------------------------------------

/**
 * \struct fat_boot
 *
 * \brief Boot sector for a FAT12/FAT16 volume.
 *
 */
struct fat_boot {
        /**
         * The first three bytes of the boot sector must be valid,
         * executable x 86-based CPU instructions. This includes a
         * jump instruction that skips the next nonexecutable bytes.
         */
        uint8_t jump[3];
        /**
         * This is typically a string of characters that identifies
         * the operating system that formatted the volume.
         */
        char oemId[8];
        /**
         * The size of a hardware sector. Valid decimal values for this
         * field are 512, 1024, 2048, and 4096. For most disks used in
         * the United States, the value of this field is 512.
         */
        uint16_t bytesPerSector;
        /**
         * Number of sectors per allocation unit. This value must be a
         * power of 2 that is greater than 0. The legal values are
         * 1, 2, 4, 8, 16, 32, 64, and 128.  128 should be avoided.
         */
        uint8_t sectorsPerCluster;
        /**
         * The number of sectors preceding the start of the first FAT,
         * including the boot sector. The value of this field is always 1.
         */
        uint16_t reservedSectorCount;
        /**
         * The number of copies of the FAT on the volume.
         * The value of this field is always 2.
         */
        uint8_t fatCount;
        /**
         * For FAT12 and FAT16 volumes, this field contains the count of
         * 32-byte directory entries in the root directory. For FAT32 volumes,
         * this field must be set to 0. For FAT12 and FAT16 volumes, this
         * value should always specify a count that when multiplied by 32
         * results in a multiple of bytesPerSector.  FAT16 volumes should
         * use the value 512.
         */
        uint16_t rootDirEntryCount;
        /**
         * This field is the old 16-bit total count of sectors on the volume.
         * This count includes the count of all sectors in all four regions
         * of the volume. This field can be 0; if it is 0, then totalSectors32
         * must be nonzero.  For FAT32 volumes, this field must be 0. For
         * FAT12 and FAT16 volumes, this field contains the sector count, and
         * totalSectors32 is 0 if the total sector count fits
         * (is less than 0x10000).
         */
        uint16_t totalSectors16;
        /**
         * This dates back to the old MS-DOS 1.x media determination and is
         * no longer usually used for anything.  0xF8 is the standard value
         * for fixed (nonremovable) media. For removable media, 0xF0 is
         * frequently used. Legal values are 0xF0 or 0xF8-0xFF.
         */
        uint8_t mediaType;
        /**
         * Count of sectors occupied by one FAT on FAT12/FAT16 volumes.
         * On FAT32 volumes this field must be 0, and sectorsPerFat32
         * contains the FAT size count.
         */
        uint16_t sectorsPerFat16;
        /** Sectors per track for interrupt 0x13. Not used otherwise. */
        uint16_t sectorsPerTrack;
        /** Number of heads for interrupt 0x13.  Not used otherwise. */
        uint16_t headCount;
        /**
         * Count of hidden sectors preceding the partition that contains this
         * FAT volume. This field is generally only relevant for media
         * visible on interrupt 0x13.
         */
        uint32_t hidddenSectors;
        /**
         * This field is the new 32-bit total count of sectors on the volume.
         * This count includes the count of all sectors in all four regions
         * of the volume.  This field can be 0; if it is 0, then
         * totalSectors16 must be nonzero.
         */
        uint32_t totalSectors32;
        /**
         * Related to the BIOS physical drive number. Floppy drives are
         * identified as 0x00 and physical hard disks are identified as
         * 0x80, regardless of the number of physical disk drives.
         * Typically, this value is set prior to issuing an INT 13h BIOS
         * call to specify the device to access. The value is only
         * relevant if the device is a boot device.
         */
        uint8_t driveNumber;
        /** used by Windows NT - should be zero for FAT */
        uint8_t reserved1;
        /** 0X29 if next three fields are valid */
        uint8_t bootSignature;
        /**
         * A random serial number created when formatting a disk,
         * which helps to distinguish between disks.
         * Usually generated by combining date and time.
         */
        uint32_t volumeSerialNumber;
        /**
         * A field once used to store the volume label. The volume label
         * is now stored as a special file in the root directory.
         */
        char volumeLabel[11];
        /**
         * A field with a value of either FAT, FAT12 or FAT16,
         * depending on the disk format.
         */
        char fileSystemType[8];
        /** X86 boot code */
        uint8_t bootCode[448];
        /** must be 0X55 */
        uint8_t bootSectorSig0;
        /** must be 0XAA */
        uint8_t bootSectorSig1;
} __attribute__((packed));
/** Type name for FAT Boot Sector */
typedef struct fat_boot fat_boot_t;
//------------------------------------------------------------------------------

/**
 * \struct fat32_boot
 *
 * \brief Boot sector for a FAT32 volume.
 *
 */
struct fat32_boot {
        /**
         * The first three bytes of the boot sector must be valid,
         * executable x 86-based CPU instructions. This includes a
         * jump instruction that skips the next nonexecutable bytes.
         */
        uint8_t jump[3];
        /**
         * This is typically a string of characters that identifies
         * the operating system that formatted the volume.
         */
        char oemId[8];
        /**
         * The size of a hardware sector. Valid decimal values for this
         * field are 512, 1024, 2048, and 4096. For most disks used in
         * the United States, the value of this field is 512.
         */
        uint16_t bytesPerSector;
        /**
         * Number of sectors per allocation unit. This value must be a
         * power of 2 that is greater than 0. The legal values are
         * 1, 2, 4, 8, 16, 32, 64, and 128.  128 should be avoided.
         */
        uint8_t sectorsPerCluster;
        /**
         * The number of sectors preceding the start of the first FAT,
         * including the boot sector. Must not be zero
         */
        uint16_t reservedSectorCount;
        /**
         * The number of copies of the FAT on the volume.
         * The value of this field is always 2.
         */
        uint8_t fatCount;
        /**
         * FAT12/FAT16 only. For FAT32 volumes, this field must be set to 0.
         */
        uint16_t rootDirEntryCount;
        /**
         * For FAT32 volumes, this field must be 0.
         */
        uint16_t totalSectors16;
        /**
         * This dates back to the old MS-DOS 1.x media determination and is
         * no longer usually used for anything.  0xF8 is the standard value
         * for fixed (nonremovable) media. For removable media, 0xF0 is
         * frequently used. Legal values are 0xF0 or 0xF8-0xFF.
         */
        uint8_t mediaType;
        /**
         * On FAT32 volumes this field must be 0, and sectorsPerFat32
         * contains the FAT size count.
         */
        uint16_t sectorsPerFat16;
        /** Sectors per track for interrupt 0x13. Not used otherwise. */
        uint16_t sectorsPerTrack;
        /** Number of heads for interrupt 0x13.  Not used otherwise. */
        uint16_t headCount;
        /**
         * Count of hidden sectors preceding the partition that contains this
         * FAT volume. This field is generally only relevant for media
         * visible on interrupt 0x13.
         */
        uint32_t hidddenSectors;
        /**
         * Contains the total number of sectors in the FAT32 volume.
         */
        uint32_t totalSectors32;
        /**
         * Count of sectors occupied by one FAT on FAT32 volumes.
         */
        uint32_t sectorsPerFat32;
        /**
         * This field is only defined for FAT32 media and does not exist on
         * FAT12 and FAT16 media.
         * Bits 0-3 -- Zero-based number of active FAT.
         *             Only valid if mirroring is disabled.
         * Bits 4-6 -- Reserved.
         * Bit 7      -- 0 means the FAT is mirrored at runtime into all FATs.
         *        -- 1 means only one FAT is active; it is the one referenced
         *             in bits 0-3.
         * Bits 8-15  -- Reserved.
         */
        uint16_t fat32Flags;
        /**
         * FAT32 version. High byte is major revision number.
         * Low byte is minor revision number. Only 0.0 define.
         */
        uint16_t fat32Version;
        /**
         * Cluster number of the first cluster of the root directory for FAT32.
         * This usually 2 but not required to be 2.
         */
        uint32_t fat32RootCluster;
        /**
         * Sector number of FSINFO structure in the reserved area of the
         * FAT32 volume. Usually 1.
         */
        uint16_t fat32FSInfo;
        /**
         * If nonzero, indicates the sector number in the reserved area
         * of the volume of a copy of the boot record. Usually 6.
         * No value other than 6 is recommended.
         */
        uint16_t fat32BackBootBlock;
        /**
         * Reserved for future expansion. Code that formats FAT32 volumes
         * should always set all of the bytes of this field to 0.
         */
        uint8_t fat32Reserved[12];
        /**
         * Related to the BIOS physical drive number. Floppy drives are
         * identified as 0x00 and physical hard disks are identified as
         * 0x80, regardless of the number of physical disk drives.
         * Typically, this value is set prior to issuing an INT 13h BIOS
         * call to specify the device to access. The value is only
         * relevant if the device is a boot device.
         */
        uint8_t driveNumber;
        /** used by Windows NT - should be zero for FAT */
        uint8_t reserved1;
        /** 0X29 if next three fields are valid */
        uint8_t bootSignature;
        /**
         * A random serial number created when formatting a disk,
         * which helps to distinguish between disks.
         * Usually generated by combining date and time.
         */
        uint32_t volumeSerialNumber;
        /**
         * A field once used to store the volume label. The volume label
         * is now stored as a special file in the root directory.
         */
        char volumeLabel[11];
        /**
         * A text field with a value of FAT32.
         */
        char fileSystemType[8];
        /** X86 boot code */
        uint8_t bootCode[420];
        /** must be 0X55 */
        uint8_t bootSectorSig0;
        /** must be 0XAA */
        uint8_t bootSectorSig1;
} __attribute__((packed));
/** Type name for FAT32 Boot Sector */
typedef struct fat32_boot fat32_boot_t;
//------------------------------------------------------------------------------
/** Lead signature for a FSINFO sector */
uint32_t const FSINFO_LEAD_SIG = 0x41615252;
/** Struct signature for a FSINFO sector */
uint32_t const FSINFO_STRUCT_SIG = 0x61417272;

/**
 * \struct fat32_fsinfo
 *
 * \brief FSINFO sector for a FAT32 volume.
 *
 */
struct fat32_fsinfo {
        /** must be 0X52, 0X52, 0X61, 0X41 */
        uint32_t leadSignature;
        /** must be zero */
        uint8_t reserved1[480];
        /** must be 0X72, 0X72, 0X41, 0X61 */
        uint32_t structSignature;
        /**
         * Contains the last known free cluster count on the volume.
         * If the value is 0xFFFFFFFF, then the free count is unknown
         * and must be computed. Any other value can be used, but is
         * not necessarily correct. It should be range checked at least
         * to make sure it is <= volume cluster count.
         */
        uint32_t freeCount;
        /**
         * This is a hint for the FAT driver. It indicates the cluster
         * number at which the driver should start looking for free clusters.
         * If the value is 0xFFFFFFFF, then there is no hint and the driver
         * should start looking at cluster 2.
         */
        uint32_t nextFree;
        /** must be zero */
        uint8_t reserved2[12];
        /** must be 0X00, 0X00, 0X55, 0XAA */
        uint8_t tailSignature[4];
} __attribute__((packed));
/** Type name for FAT32 FSINFO Sector */
typedef struct fat32_fsinfo fat32_fsinfo_t;
//------------------------------------------------------------------------------
// End Of Chain values for FAT entries
/** FAT12 end of chain value used by Microsoft. */
uint16_t const FAT12EOC = 0XFFF;
/** Minimum value for FAT12 EOC.  Use to test for EOC. */
uint16_t const FAT12EOC_MIN = 0XFF8;
/** FAT16 end of chain value used by Microsoft. */
uint16_t const FAT16EOC = 0XFFFF;
/** Minimum value for FAT16 EOC.  Use to test for EOC. */
uint16_t const FAT16EOC_MIN = 0XFFF8;
/** FAT32 end of chain value used by Microsoft. */
uint32_t const FAT32EOC = 0X0FFFFFFF;
/** Minimum value for FAT32 EOC.  Use to test for EOC. */
uint32_t const FAT32EOC_MIN = 0X0FFFFFF8;
/** Mask a for FAT32 entry. Entries are 28 bits. */
uint32_t const FAT32MASK = 0X0FFFFFFF;
//------------------------------------------------------------------------------

/**
 * \struct directoryEntry
 * \brief FAT short directory entry
 *
 * Short means short 8.3 name, not the entry size.
 *
 * Date Format. A FAT directory entry date stamp is a 16-bit field that is
 * basically a date relative to the MS-DOS epoch of 01/01/1980. Here is the
 * format (bit 0 is the LSB of the 16-bit word, bit 15 is the MSB of the
 * 16-bit word):
 *
 * Bits 9-15: Count of years from 1980, valid value range 0-127
 * inclusive (1980-2107).
 *
 * Bits 5-8: Month of year, 1 = January, valid value range 1-12 inclusive.
 *
 * Bits 0-4: Day of month, valid value range 1-31 inclusive.
 *
 * Time Format. A FAT directory entry time stamp is a 16-bit field that has
 * a granularity of 2 seconds. Here is the format (bit 0 is the LSB of the
 * 16-bit word, bit 15 is the MSB of the 16-bit word).
 *
 * Bits 11-15: Hours, valid value range 0-23 inclusive.
 *
 * Bits 5-10: Minutes, valid value range 0-59 inclusive.
 *
 * Bits 0-4: 2-second count, valid value range 0-29 inclusive (0 - 58 seconds).
 *
 * The valid time range is from Midnight 00:00:00 to 23:59:58.
 */
struct directoryEntry {
        /** Short 8.3 name.
         *
         * The first eight bytes contain the file name with blank fill.
         * The last three bytes contain the file extension with blank fill.
         */
        uint8_t name[11];
        /** Entry attributes.
         *
         * The upper two bits of the attribute byte are reserved and should
         * always be set to 0 when a file is created and never modified or
         * looked at after that.  See defines that begin with DIR_ATT_.
         */
        uint8_t attributes;
        /**
         * Reserved for use by Windows NT. Set value to 0 when a file is
         * created and never modify or look at it after that.
         */
        uint8_t reservedNT;
        /**
         * The granularity of the seconds part of creationTime is 2 seconds
         * so this field is a count of tenths of a second and its valid
         * value range is 0-199 inclusive. (WHG note - seems to be hundredths)
         */
        uint8_t creationTimeTenths;
        /** Time file was created. */
        uint16_t creationTime;
        /** Date file was created. */
        uint16_t creationDate;
        /**
         * Last access date. Note that there is no last access time, only
         * a date.  This is the date of last read or write. In the case of
         * a write, this should be set to the same date as lastWriteDate.
         */
        uint16_t lastAccessDate;
        /**
         * High word of this entry's first cluster number (always 0 for a
         * FAT12 or FAT16 volume).
         */
        uint16_t firstClusterHigh;
        /** Time of last write. File creation is considered a write. */
        uint16_t lastWriteTime;
        /** Date of last write. File creation is considered a write. */
        uint16_t lastWriteDate;
        /** Low word of this entry's first cluster number. */
        uint16_t firstClusterLow;
        /** 32-bit unsigned holding this file's size in bytes. */
        uint32_t fileSize;
} __attribute__((packed));
//------------------------------------------------------------------------------
// Definitions for directory entries
//
/** Type name for directoryEntry */
typedef struct directoryEntry dir_t;
/** escape for name[0] = 0XE5 */
uint8_t const DIR_NAME_0XE5 = 0X05;
/** name[0] value for entry that is free after being "deleted" */
uint8_t const DIR_NAME_DELETED = 0XE5;
/** name[0] value for entry that is free and no allocated entries follow */
uint8_t const DIR_NAME_FREE = 0X00;
/** file is read-only */
uint8_t const DIR_ATT_READ_ONLY = 0X01;
/** File should hidden in directory listings */
uint8_t const DIR_ATT_HIDDEN = 0X02;
/** Entry is for a system file */
uint8_t const DIR_ATT_SYSTEM = 0X04;
/** Directory entry contains the volume label */
uint8_t const DIR_ATT_VOLUME_ID = 0X08;
/** Entry is for a directory */
uint8_t const DIR_ATT_DIRECTORY = 0X10;
/** Old DOS archive bit for backup support */
uint8_t const DIR_ATT_ARCHIVE = 0X20;
/** Test value for long name entry.  Test is
  (d->attributes & DIR_ATT_LONG_NAME_MASK) == DIR_ATT_LONG_NAME. */
uint8_t const DIR_ATT_LONG_NAME = 0X0F;
/** Test mask for long name entry */
uint8_t const DIR_ATT_LONG_NAME_MASK = 0X3F;
/** defined attribute bits */
uint8_t const DIR_ATT_DEFINED_BITS = 0X3F;

/** Directory entry is part of a long name
 * \param[in] dir Pointer to a directory entry.
 *
 * \return true if the entry is for part of a long name else false.
 */
static inline uint8_t DIR_IS_LONG_NAME(const dir_t* dir) {
        return(dir->attributes & DIR_ATT_LONG_NAME_MASK) == DIR_ATT_LONG_NAME;
}
/** Mask for file/subdirectory tests */
uint8_t const DIR_ATT_FILE_TYPE_MASK = (DIR_ATT_VOLUME_ID | DIR_ATT_DIRECTORY);

/** Directory entry is for a file
 * \param[in] dir Pointer to a directory entry.
 *
 * \return true if the entry is for a normal file else false.
 */
static inline uint8_t DIR_IS_FILE(const dir_t* dir) {
        return(dir->attributes & DIR_ATT_FILE_TYPE_MASK) == 0;
}

/** Directory entry is for a subdirectory
 * \param[in] dir Pointer to a directory entry.
 *
 * \return true if the entry is for a subdirectory else false.
 */
static inline uint8_t DIR_IS_SUBDIR(const dir_t* dir) {
        return(dir->attributes & DIR_ATT_FILE_TYPE_MASK) == DIR_ATT_DIRECTORY;
}

/** Directory entry is for a file or subdirectory
 * \param[in] dir Pointer to a directory entry.
 *
 * \return true if the entry is for a normal file or subdirectory else false.
 */
static inline uint8_t DIR_IS_FILE_OR_SUBDIR(const dir_t* dir) {
        return(dir->attributes & DIR_ATT_VOLUME_ID) == 0;
}

class PFAT {
public:
        PFAT(storage_t *sto, uint8_t lv);
        PFAT(storage_t *sto, uint8_t lv, uint32_t first);
        void Create(storage_t *sto, uint8_t lv, uint32_t first);
        int MountStatus();

        // read/write a sector, zero based, offset is automatically added.
        int ReadSectors(uint32_t, uint8_t *, uint8_t);
        int WriteSectors(uint32_t, uint8_t *, uint8_t);
        virtual ~PFAT();
        void set_clock_call(void *);
        uint32_t get_fattime();
        DSTATUS disk_initialize();
        DSTATUS disk_status();
        DRESULT disk_read(FBYTE *, DWORD, FBYTE);
        DRESULT disk_write(const FBYTE *, DWORD, FBYTE);
        DRESULT disk_ioctl(FBYTE, void *);
        storage_t *storage;
        FATFS *ffs;
        uint8_t *label; // Volume label NULL for /
        uint8_t volmap; // FatFS volume number
private:
        // ZERO if all went well.
        int st;
        uint32_t Offset;
        uint32_t(*clock_call)();
};
#endif	/* PARTITION_H */



================================================
FILE: libraries/UHS_FS/FAT/FatFS/doc/00index_e.html
================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta name="description" content="Open source FAT file system module for embedded projects">
<link rel="start" title="Site Top" href="../../">
<link rel="up" title="Freewares" href="../../fsw_e.html">
<link rel="alternate" hreflang="ja" title="Japanese version" href="00index_j.html">
<link rel="stylesheet" href="css_e.css" type="text/css" media="screen" title="ELM Default">
<title>FatFs - Generic FAT File System Module</title>
</head>

<body>
<h1>FatFs - Generic FAT File System Module</h1>
<hr>

<div class="abst">
<img src="img/layers.png" class="rset" width="245" height="255" alt="layer">
<p>FatFs is a generic FAT file system module for small embedded systems. The FatFs is written in compliance with ANSI C and completely separated from the disk I/O layer. Therefore it is independent of hardware architecture. It can be incorporated into low cost microcontrollers, such as AVR, 8051, PIC, ARM, Z80, 68k and etc..., without any change. Petit FatFs module is also available <a href="http://elm-chan.org/fsw/ff/00index_p.html">here</a>.</p>

<h4>Features</h4>
<ul>
 <li>Windows compatible FAT file system.</li>
 <li>Platform independent. Easy to port.</li>
 <li>Very small footprint for code and work area.</li>
 <li>Various configuration options:
  <ul>
   <li>Multiple volumes (physical drives and partitions).</li>
   <li>Multiple ANSI/OEM code pages including DBCS.</li>
   <li>Long file name support in ANSI/OEM or Unicode.</li>
   <li>RTOS support.</li>
   <li>Multiple sector size support.</li>
   <li>Read-only, minimized API, I/O buffer and etc...</li>
  </ul>
 </li>
</ul>
</div>


<div class="para">
<h3>Application Interface</h3>
<p>FatFs module provides following functions to the applications. In other words, this list describes what FatFs can do to access the FAT volumes.</p>
<ul>
<li><a href="en/mount.html">f_mount</a> - Register/Unregister a work area</li>
<li><a href="en/open.html">f_open</a> - Open/Create a file</li>
<li><a href="en/close.html">f_close</a> - Close a file</li>
<li><a href="en/read.html">f_read</a> - Read file</li>
<li><a href="en/write.html">f_write</a> - Write file</li>
<li><a href="en/lseek.html">f_lseek</a> - Move read/write pointer, Expand file size</li>
<li><a href="en/truncate.html">f_truncate</a> - Truncate file size</li>
<li><a href="en/sync.html">f_sync</a> - Flush cached data</li>
<li><a href="en/opendir.html">f_opendir</a> - Open a directory</li>
<li><a href="en/readdir.html">f_readdir</a> - Read a directory item</li>
<li><a href="en/getfree.html">f_getfree</a> - Get free clusters</li>
<li><a href="en/stat.html">f_stat</a> - Get file status</li>
<li><a href="en/mkdir.html">f_mkdir</a> - Create a directory</li>
<li><a href="en/unlink.html">f_unlink</a> - Remove a file or directory</li>
<li><a href="en/chmod.html">f_chmod</a> - Change attribute</li>
<li><a href="en/utime.html">f_utime</a> - Change timestamp</li>
<li><a href="en/rename.html">f_rename</a> - Rename/Move a file or directory</li>
<li><a href="en/chdir.html">f_chdir</a> - Change current directory</li>
<li><a href="en/chdrive.html">f_chdrive</a> - Change current drive</li>
<li><a href="en/getcwd.html">f_getcwd</a> - Retrieve the current directory</li>
<li><a href="en/getlabel.html">f_getlabel</a> - Get volume label</li>
<li><a href="en/setlabel.html">f_setlabel</a> - Set volume label</li>
<li><a href="en/forward.html">f_forward</a> - Forward file data to the stream directly</li>
<li><a href="en/mkfs.html">f_mkfs</a> - Create a file system on the drive</li>
<li><a href="en/fdisk.html">f_fdisk</a> - Divide a physical drive</li>
<li><a href="en/gets.html">f_gets</a> - Read a string</li>
<li><a href="en/putc.html">f_putc</a> - Write a character</li>
<li><a href="en/puts.html">f_puts</a> - Write a string</li>
<li><a href="en/printf.html">f_printf</a> - Write a formatted string</li>
<li><a href="en/tell.html">f_tell</a> - Get the current read/write pointer</li>
<li><a href="en/eof.html">f_eof</a> - Test for end-of-file on a file</li>
<li><a href="en/size.html">f_size</a> - Get size of a file</li>
<li><a href="en/error.html">f_error</a> - Test for an error on a file</li>
</ul>
</div>


<div class="para">
<h3>Disk I/O Interface</h3>
<p>Since the FatFs module is completely separated from disk I/O layer, it requires following functions at least to access the physical media. When O/S related feature is enabled, it will require process/memory functions in addition. However the low level disk I/O module is not a part of FatFs module, so that it must be provided by user. The sample drivers are also available in the resources.</p>
<ul>
<li><a href="en/dinit.html">disk_initialize</a> - Initialize disk drive</li>
<li><a href="en/dstat.html">disk_status</a> - Get disk status</li>
<li><a href="en/dread.html">disk_read</a> - Read sector(s)</li>
<li><a href="en/dwrite.html">disk_write</a> - Write sector(s)</li>
<li><a href="en/dioctl.html">disk_ioctl</a> - Control device dependent features</li>
<li><a href="en/fattime.html">get_fattime</a> - Get current time</li>
</ul>
</div>


<div class="para">
<h3>Resources</h3>
<p>The FatFs module is a free software opened for education, research and development. You can use, modify and/or redistribute it for personal projects or commercial products without any restriction under your responsibility. For further information, refer to the application note.</p>
<ul>
<li><a href="http://elm-chan.org/fsw/ff/bd/"><em>FatFs User Forum</em></a></li>
<li>Read first: <a href="en/appnote.html">FatFs module application note</a> <span class="mfd">January 23, 2014</span></li>
</ul>
</div>


</body>
</html>


================================================
FILE: libraries/UHS_FS/FAT/FatFS/doc/00index_j.html
================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta name="description" content="gݍ݃VXeėpFATt@CEVXe">
<link rel="start" title="Site Top" href="../../index_j.html">
<link rel="up" title="Freewares" href="../../fsw.html">
<link rel="alternate" hreflang="en" title="p" href="00index_e.html">
<link rel="stylesheet" href="css_j.css" type="text/css" media="screen" title="ELM Default">
<title>ELM - FatFs ėpFATt@CVXeEW[</title>
</head>

<body>
<h1>FatFs ėpFATt@CVXeEW[</h1>
<hr>

<div class="abst">
<img src="img/layers.png" class="rset" width="245" height="255" alt="layer">
<p>FatFs͏K͂ȑgݍ݃VXe̔ėpFATt@CVXeEW[łBANSI CŃn[hEFAEA[LeN`ɂ͈ˑȂ̂ŁAKvȃ[NEGAmۂł΁A8051, PIC, AVR, SH, Z80, 68k, H8, ARMȂLjȃ}CRłgp”\łBFatFsVN<a href="http://elm-chan.org/fsw/ff/00index_p.html">ՂFatFs</a>܂B</p>
<h4>FatFsW[̓</h4>
<ul>
 <li>Windows݊ FATt@CEVXe</li>
 <li>vbgtH[ˑ</li>
 <li>RpNgȃR[hRAMgp</li>
 <li>̍\IvV:
  <ul>
   <li>̃{[(hCuE)</li>
   <li>DBCS܂ޕANSI/OEMR[hEy[W</li>
   <li>t@C(LFN) (Unicode APII)</li>
   <li>}`^XN֘A</li>
   <li>}`EZN^ETCY</li>
   <li>[hEI[\AꕔAPI̍폜Aobt@\Ȃc</li>
  </ul>
 </li>
</ul>
</div>


<div class="para">
<h3>ʃCEC^[tF[X</h3>
<p>FatFsW[́AAvP[VECɑ΂Ãt@C֐(API)񋟂܂B‚܂ÃXgFatFsɂł邱ƂVvɎĂ܂B</p>
<ul>
<li><a href="ja/mount.html">f_mount</a> - [NGA̓o^E폜</li>
<li><a href="ja/open.html">f_open</a> - t@C̃I[vE쐬</li>
<li><a href="ja/close.html">f_close</a> - t@C̃N[Y</li>
<li><a href="ja/read.html">f_read</a> - t@C̓ǂݏo</li>
<li><a href="ja/write.html">f_write</a> - t@C̏</li>
<li><a href="ja/lseek.html">f_lseek</a> - [h/CgE|C^̈ړ, t@C̊g</li>
<li><a href="ja/truncate.html">f_truncate</a> - t@CETCY̐؂l</li>
<li><a href="ja/sync.html">f_sync</a> - LbVꂽf[^̃tbV</li>
<li><a href="ja/opendir.html">f_opendir</a> - fBNg̃I[v</li>
<li><a href="ja/readdir.html">f_readdir</a> - fBNg̓ǂݏo</li>
<li><a href="ja/getfree.html">f_getfree</a> - {[󂫗̈̎擾</li>
<li><a href="ja/stat.html">f_stat</a> - t@CEXe[^X̎擾</li>
<li><a href="ja/mkdir.html">f_mkdir</a> - fBNg̍쐬</li>
<li><a href="ja/unlink.html">f_unlink</a> - t@C/fBNg̍폜</li>
<li><a href="ja/chmod.html">f_chmod</a> - t@C/fBNg̑̕ύX</li>
<li><a href="ja/utime.html">f_utime</a> - t@C/fBNg̃^CX^v̕ύX</li>
<li><a href="ja/rename.html">f_rename</a> - t@C/fBNg̖OύXEړ</li>
<li><a href="ja/chdir.html">f_chdir</a> - JgEfBNg̕ύX</li>
<li><a href="ja/chdrive.html">f_chdrive</a> - JgEhCu̕ύX</li>
<li><a href="ja/getcwd.html">f_getcwd</a> - JgEfBNg̎擾</li>
<li><a href="ja/getlabel.html">f_getlabel</a> - {[Ex̎擾</li>
<li><a href="ja/setlabel.html">f_setlabel</a> - {[Ex̐ݒ</li>
<li><a href="ja/forward.html">f_forward</a> - t@CEf[^Xg[֐ɓ]</li>
<li><a href="ja/mkfs.html">f_mkfs</a> - _hCũtH[}bg</li>
<li><a href="ja/fdisk.html">f_fdisk</a> - hCu̕</li>
<li><a href="ja/gets.html">f_gets</a> - ̓ǂݏo</li>
<li><a href="ja/putc.html">f_putc</a> - ̏</li>
<li><a href="ja/puts.html">f_puts</a> - ̏</li>
<li><a href="ja/printf.html">f_printf</a> - ̏</li>
<li><a href="ja/tell.html">f_tell</a> - ݂̃[h/CgE|C^̎擾</li>
<li><a href="ja/eof.html">f_eof</a> - t@CI[̗L̎擾</li>
<li><a href="ja/size.html">f_size</a> - t@CETCY̎擾</li>
<li><a href="ja/error.html">f_error</a> - t@C̃G[̗L̎擾</li>
</ul>
</div>


<div class="para">
<h3>ʃCEC^[tF[X</h3>
<p>FatFsW[́APȂt@CEVXeECȂ̂ŁAfBA䃌C͊܂܂܂Bgp郁fBAɑΉ֐́A[UɂĒ񋟂Kv܂BFatFsW[́AʃCɑ΂ȂƂ̃C^[tF[Xv܂BOS֘A@\LɂƂ́AăvZX/֘A֐KvɂȂ܂BTvEvWFNgɉʃC̎܂B</p>
<ul>
<li><a href="ja/dinit.html">disk_initialize</a> - hCȕ</li>
<li><a href="ja/dstat.html">disk_status</a> - hCȕԎ擾</li>
<li><a href="ja/dread.html">disk_read</a> - f[^̓ǂݏo</li>
<li><a href="ja/dwrite.html">disk_write</a> - f[^̏</li>
<li><a href="ja/dioctl.html">disk_ioctl</a> - ̑̃hCu</li>
<li><a href="ja/fattime.html">get_fattime</a> - tE̎擾</li>
</ul>
</div>


<div class="para">
<h3></h3>
<p>FatFsW[̓t[E\tgEFAƂċEEJpɌJĂ܂Bǂ̂悤ȗpړIilp珤p܂ŁjłgpEρEzzɂ‚Ĉ؂̐͂܂񂪁ASėp҂̐ӔC̉ł̗pƂ܂Bڂ̓AvP[VEm[gQƂĂB</p>
<ul>
<li><a href="http://elm-chan.org/fsw/ff/bd/"><em>FatFs[UEtH[</em></a></li>
<li>ŏɓǂ: <a href="ja/appnote.html">FatFsW[EAvP[VEm[g</a> <span class="mfd">2013. 1. 24</span></li>
</ul>
</div>


</body>
</html>


================================================
FILE: libraries/UHS_FS/FAT/FatFS/doc/css_e.css
================================================
* {margin: 0; padding: 0; border-width: 0;}
body {margin: 8px; background-color: #e0ffff; font-color: black; font-family: serif; line-height: 133%; max-width: 1024px;}
a:link {color: blue;}
a:visited {color: darkmagenta;}
a:hover {background-color: #a0ffff;}
a:active {color: darkmagenta; overflow: hidden; outline:none; position: relative; top: 1px; left: 1px;}
abbr {border-width: 1px;}

p {margin: 0 0 0.3em 1em;}
em {font-style: normal; font-weight: bold; margin: 0 0.1em;}
strong {}
pre {border: 1px dashed gray; margin: 0.5em 1em; padding: 0.5em; line-height: 1.2em; font-size: 85%; font-family: "Consolas", "Courier New", monospace; background-color: white;}
pre span.c {color: green;}
pre span.k {color: blue;}
pre span.arg {font-style: italic;}
tt {margin: 0 0.2em; font-size: 0.85em; font-family: "Consolas", "Courier New", monospace; }
tt.arg {font-style: italic;}
ol {margin: 0 2.5em;}
ul {margin: 0 2em;}
dl {margin: 0 1em;}
dd {margin: 0 2em;}
dt {font-size: 0.85em; font-family: "Consolas", "Courier New", monospace;}
dl.par dt {margin: 0.5em 0 0 0 ; font-style: italic; }
dl.ret dt {margin: 0.5em 0 0 0 ; font-size: 0.85em; font-family: "Consolas", "Courier New", monospace;}
hr {border-width: 1px; margin: 1em;}
div.abst {font-family: sans-serif;}
div.para {clear: both; font-family: serif;}
div.ret a {font-size: 0.85em; font-family: "Consolas", "Courier New", monospace; }
.equ {text-indent: 0; margin: 1em 2em 1em;}
.indent {margin-left: 2em;}
.rset {float: right; margin: 0 0 0.5em 0.5em;}
.lset {float: left; margin: 0 0.5em 0.5em 0.5em;}
ul.flat li {list-style-type: none; margin: 0;}
a.imglnk img {border: 1px solid;}
.iequ {white-space: nowrap; font-weight: bold;}
.clr {clear: both;}
.it {font-style: italic;}
.mfd {font-size: 0.7em; padding: 0 1px; border: 1px solid; white-space : nowrap}

h1 {line-height: 1em; font-size: 2em; font-family: sans-serif; padding: 0.3em 0 0.3em;}
p.hdd {float: right; text-align: right; margin-top: 0.5em;}
hr.hds {clear: both; margin-bottom: 1em;}

h2 {font-size: 2em; font-family: sans-serif; background-color: #d8d8FF; padding: 0.5em 0.5em; margin: 0 0 0.5em;}
h3 {font-size: 1.5em; font-family: sans-serif; margin: 1.5em 0 0.5em;}
h4 {font-size: 1.2em; font-family: sans-serif; margin: 1em 0 0.2em;}
h5 {font-size: 1em; font-family: sans-serif; margin: 0.5em 0 0em;}
small {font-size: 80%;}
.indent {margin-left: 2em;}

/* Tables */
table {margin: 0.5em 1em; border-collapse: collapse; border: 2px solid black; }
th {background-color: white; border-style: solid; border-width: 1px 1px 2px; border-color: black; padding: 0 3px; vertical-align: top; white-space: nowrap;}
td {background-color: white; border: 1px solid black; padding: 0 3px; vertical-align: top; line-height: 1.3em;}
table.lst td:first-child {font-size: 0.85em; font-family: "Consolas", "Courier New", monospace;}
table.lst2 td {font-size: 0.85em; font-family: "Consolas", "Courier New", monospace;}
table caption {font-family: sans-serif; font-weight: bold;}
tr.lst3 td { border-width: 2px 1px 1px; }

p.foot {clear: both; text-indent: 0; margin: 1em 0.5em 1em;}


================================================
FILE: libraries/UHS_FS/FAT/FatFS/doc/css_j.css
================================================
@charset "Shift_JIS";
/* Common style sheet for Tech Notes */

* {margin: 0; padding: 0; border-width: 0;}
body {margin: 8px; background-color: #e0ffff; font-color: black; font-family:"lr o", serif; line-height: 150%; letter-spacing: 1px; max-width: 1024px;}
a:link {color: blue;}
a:visited {color: darkmagenta;}
a:hover {background-color: #a0ffff;}
a:active {color: darkmagenta; overflow: hidden; outline:none; position: relative; top: 1px; left: 1px;}
abbr {border-width: 1px;}

p {text-indent: 1em; margin: 0 0 0.3em 0.5em;}
em {font-style: normal; font-weight: bold; margin: 0 0.1em;}
strong {}
pre {border: 1px dashed gray; margin: 0.5em 1em; padding: 0.5em; line-height: 1.2em; letter-spacing: 0; font-size: 0.85em; font-family: "Consolas", "Courier New", "lr SVbN", monospace; background-color: white;}
pre span.c {color: green;}
pre span.k {color: blue;}
pre span.arg {font-style: italic;}
tt {margin: 0 0.2em; letter-spacing: 0; font-size: 0.85em; font-family: "Consolas", "Courier New", "lr SVbN", monospace;}
tt.arg {font-style: italic;}
ol {margin: 0 2.5em;}
ul {margin: 0 2em;}
dl {margin: 0 1em;}
dd {margin: 0 2em;}
dt {font-size: 0.85em; font-family: "Consolas", "Courier New", "lr SVbN", monospace;}
dl.par dt {margin: 0.5em 0 0 0 ; font-style: italic; letter-spacing: 0;}
dl.ret dt {margin: 0.5em 0 0 0 ; font-size: 0.85em; font-family: "Consolas", "Courier New", "lr SVbN", monospace; letter-spacing: 0; }
hr {border-width: 1px; margin: 1em;}
div.abst {font-family: "lr oSVbN",sans-serif;}
div.para {clear: both; font-family: "lr o",serif;}
.equ {text-indent: 0; margin: 1em 2em 1em;}
.indent {margin-left: 2em;}
.rset {float: right; margin: 0 0 0.5em 0.5em;}
.lset {float: left; margin: 0 0.5em 0.5em 0.5em;}
ul.flat li {list-style-type: none; margin: 0;}
a.imglnk img {border: 1px solid;}
.iequ {white-space: nowrap; font-weight: bold;}
.clr {clear: both;}
.it {font-style: italic;}
.mfd {font-size: 0.7em; padding: 0 1px; border: 1px solid; white-space : nowrap}

h1 {line-height: 1em; font-size: 2em; font-family: sans-serif; padding: 0.3em 0 0.3em;}
p.hdd {float: right; text-align: right; margin-top: 0.5em;}
hr.hds {clear: both; margin-bottom: 1em;}

h2 {font-size: 2em; font-family: "lr oSVbN",sans-serif; background-color: #d8d8FF; padding: 0.5em 0.5em; margin: 0 0 0.5em;}
h3 {font-size: 1.5em; font-family: "lr oSVbN",sans-serif; margin: 1.5em 0 0.5em;}
h4 {font-size: 1.2em; font-family: "lr oSVbN",sans-serif; margin: 1em 0 0.2em;}
h5 {font-size: 1em; font-family: "lr oSVbN",sans-serif; margin: 0.5em 0 0em;}
small {font-size: 80%;}
.indent {margin-left: 2em;}

/* Tables */
table {margin: 0.5em 1em; border-collapse: collapse; border: 2px solid black; letter-spacing: 0;}
th {background-color: white; border-style: solid; border-width: 1px 1px 2px; border-color: black; padding: 0 3px; vertical-align: top;}
td {background-color: white; border: 1px solid black; padding: 0 3px; vertical-align: top; line-height: 1.3em;}
table.lst td:first-child {font-size: 0.85em; font-family: "Consolas", "Courier New", monospace; white-space: nowrap;}
table.lst2 td {font-size: 0.85em; font-family: "Consolas", "Courier New", monospace; white-space: nowrap;}
table caption {font-family: sans-serif; font-weight: bold;}
tr.lst3 td {border-width: 2px 1px 1px; }

p.foot {clear: both; text-indent: 0; margin: 1em 0.5em 1em;}


================================================
FILE: libraries/UHS_FS/FAT/FatFS/doc/en/appnote.html
================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="up" title="FatFs" href="../00index_e.html">
<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/appnote.html">
<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
<title>FatFs Module Application Note</title>
</head>

<body>
<h1>FatFs Module Application Note</h1>
<ol class="toc">
<li><a href="#port">How to Port</a></li>
<li><a href="#limits">Limits</a></li>
<li><a href="#memory">Memory Usage</a></li>
<li><a href="#reduce">Module Size Reduction</a></li>
<li><a href="#lfn">Long File Name</a></li>
<li><a href="#unicode">Unicode API</a></li>
<li><a href="#reentrant">Re-entrancy</a></li>
<li><a href="#dup">Duplicated File Access</a></li>
<li><a href="#fs1">Performance Effective File Access</a></li>
<li><a href="#fs2">Considerations on Flash Memory Media</a></li>
<li><a href="#critical">Critical Section</a></li>
<li><a href="#license">About FatFs License</a></li>
</ol>
<hr>

<div class="para" id="port">
<h3>How to Port</h3>

<h4>Basic considerations</h4>
<p>The FatFs module is assuming following conditions on portability.</p>
<ul>
<li>ANSI C<br>
The FatFs module is a middleware which is written in ANSI C (C89). There is no platform dependence, so long as the compiler is in compliance with ANSI C.</li>
<li>Size of integer types<br>
The FatFs module assumes that size of char/short/long are 8/16/32 bit and int is 16 or 32 bit. These correspondence are defined in integer.h. This will not be a problem on most compilers. When any conflict with existing definitions is occurred, you must resolve it with care.</li>
</ul>

<h4>System organizations</h4>
<p>The dependency diagram shown below is a typical configuration of the embedded system with FatFs module.</p>
<p><img src="../img/modules.png" width="507" height="224" alt="dependency diagram"></p>

<h4>Which function is required?</h4>
<p>You need to provide only low level disk I/O functions that required by FatFs module and nothing else. If a working disk module for the target is already existing, you need to write only glue functions to attach it to the FatFs module. If not, you need to port any other disk module or write it from scratch. All defined functions are not that always required. For example, disk write function is not required in read-only configuration. Following table shows which function is required depends on configuration options.</p>
<table class="lst2">
<tr><th>Function</th><th>Required when:</th><th>Note</th></tr>
<tr><td>disk_initialize<br>disk_status<br>disk_read</td><td>Always</td><td rowspan="5">Disk I/O functions.<br>Samples available in ffsample.zip.<br>There are many implementations on the web.</td></tr>
<tr><td>disk_write<br>get_fattime<br>disk_ioctl (CTRL_SYNC)</td><td>_FS_READONLY == 0</td></tr>
<tr><td>disk_ioctl (GET_SECTOR_COUNT)<br>disk_ioctl (GET_BLOCK_SIZE)</td><td>_USE_MKFS == 1</td></tr>
<tr><td>disk_ioctl (GET_SECTOR_SIZE)</td><td>_MAX_SS &gt; 512</td></tr>
<tr><td>disk_ioctl (CTRL_ERASE_SECTOR)</td><td>_USE_ERASE == 1</td></tr>
<tr><td>ff_convert<br>ff_wtoupper</td><td>_USE_LFN &gt;= 1</td><td>Unicode support functions.<br>Available in option/cc*.c.</td></tr>
<tr><td>ff_cre_syncobj<br>ff_del_syncobj<br>ff_req_grant<br>ff_rel_grant</td><td>_FS_REENTRANT == 1</td><td rowspan="2">O/S dependent functions.<br>Samples available in option/syscall.c.</td></tr>
<tr><td>ff_mem_alloc<br>ff_mem_free</td><td>_USE_LFN == 3</td></tr>
</table>
</div>

<div class="para" id="limits">
<h3>Limits</h3>
<ul>
<li>FAT sub-types: FAT12, FAT16 and FAT32.</li>
<li>Number of open files: Unlimited, depends on available memory.</li>
<li>Number of volumes: Up to 10.</li>
<li>File size: Depends on FAT specs. (up to 4G-1 bytes)</li>
<li>Volume size: Depends on FAT specs. (up to 2T bytes on 512 bytes/sector)</li>
<li>Cluster size: Depends on FAT specs. (up to 64K bytes on 512 bytes/sector)</li>
<li>Sector size: Depends on FAT specs. (up to 4K bytes)</li>
</ul>
</div>

<div class="para" id="memory">
<h3>Memory Usage</h3>
<table class="lst2">
<tr><th></th><th>ARM7<small><br>32bit</small></th><th>ARM7<small><br>Thumb</small></th><th>CM3<small><br>Thumb-2</small></th><th>AVR</th><th>H8/300H</th><th>PIC24</th><th>RL78</th><th>V850ES</th><th>SH-2A</th><th>RX600</th><th>IA-32</th></tr>
<tr><td>Compiler</td><td>GCC</td><td>GCC</td><td>GCC</td><td>GCC</td><td>CH38</td><td>C30</td><td>CC78K0R</td><td>CA850</td><td>SHC</td><td>RXC</td><td>VC6</td></tr>
<tr><td>_WORD_ACCESS</td><td>0</td><td>0</td><td>0</td><td>1</td><td>0</td><td>0</td><td>0</td><td>1</td><td>0</td><td>1</td><td>1</td></tr>
<!--                                          *ARM         *Thumb        *CM3         *AVR          *H8          *PIC24         RL78        *V850ES       *SH-2A       *RX600       *IA-32   -->
<tr class="lst3"><td>text (Full, R/W)</td><td>10395</td><td>7037</td><td>6555</td><td>13362</td><td>10609</td><td>11364</td><td>12884</td><td>7814</td><td>8783</td><td>5826</td><td>7659</td></tr>
<tr>             <td>text (Min, R/W)</td>  <td>6519</td><td>4747</td><td>4315</td> <td>8608</td> <td>7043</td> <td>7539</td> <td>8860</td><td>5070</td><td>5723</td><td>3821</td><td>5038</td></tr>
<tr>             <td>text (Full, R/O)</td> <td>4563</td><td>3147</td><td>2911</td> <td>6174</td> <td>4925</td> <td>5340</td> <td>6136</td><td>3628</td><td>3863</td><td>2721</td><td>3534</td></tr>
<tr>             <td>text (Min, R/O)</td>  <td>3311</td><td>2463</td><td>2209</td> <td>4610</td> <td>3817</td> <td>4029</td> <td>4641</td><td>2762</td><td>3003</td><td>2068</td><td>2722</td></tr>
<tr>             <td>bss</td><td>V*4 + 2</td><td>V*4 + 2</td><td>V*4 + 2</td><td>V*2 + 2</td><td>V*4 + 2</td><td>V*2 + 2</td><td>V*2 + 2</td><td>V*4 + 2</td><td>V*4 + 2</td><td>V*4 + 2</td><td>V*4 + 2</td></tr>
<tr>             <td>Work area<br>(_FS_TINY == 0)</td><td>V*564 +<br>F*550</td><td>V*564 +<br>F*550</td><td>V*564 +<br>F*550</td><td>V*564 +<br>F*544</td><td>V*564 +<br>F*550</td><td>V*564 +<br>F*544</td><td>V*564 +<br>F*544</td><td>V*564 +<br>F*544</td><td>V*564 +<br>F*550</td><td>V*564 +<br>F*550</td><td>V*564 +<br>F*550</td></tr>
<tr><td>Work area<br>(_FS_TINY == 1)</td><td>V*564 +<br>F*36</td><td>V*564 +<br>F*36</td><td>V*564 +<br>F*36</td><td>V*564 +<br>F*32</td><td>V*564 +<br>F*36</td><td>V*564 +<br>F*32</td><td>V*564 +<br>F*32</td><td>V*564 +<br>F*36</td><td>V*564 +<br>F*36</td><td>V*564 +<br>F*36</td><td>V*564 +<br>F*36</td></tr>
</table>
<p>These are the memory usage on some target systems with following condition. The memory sizes are in unit of byte, <em>V</em> means number of volumes and <em>F</em> means number of open files. All samples are optimezed in code size.</p>
<pre>
FatFs R0.09b options:
_FS_READONLY     0 (R/W), 1 (R/O)
_FS_MINIMIZE     0 (Full function), 3 (Minimized function)
_USE_STRFUNC     0 (Disable string functions)
_USE_MKFS        0 (Disable f_mkfs function)
_USE_FORWARD     0 (Disable f_forward function)
_USE_FASTSEEK    0 (Disable fast seek feature)
_CODE_PAGE       932 (Japanese Shift-JIS)
_USE_LFN         0 (Disable LFN)
_MAX_SS          512 (Fixed sector size)
_FS_RPATH        0 (Disable relative path feature)
_FS_LABEL        0 (Disable volume label functions)
_VOLUMES         V (Number of logical drives to be used)
_MULTI_PARTITION 0 (Single partition per drive)
_FS_REENTRANT    0 (Disable reentrancy)
_FS_LOCK         0 (Disable sharing control)
</pre>
</div>

<div class="para" id="reduce">
<h3>Module Size Reduction</h3>
<p>Following table shows which API function is removed by configuration options for the module size reduction.</p>
<table class="lst2">
<tr><td rowspan="2">Function</td><td colspan="4">_FS_MINIMIZE</td><td colspan="2">_FS_READONLY</td><td colspan="2">_USE_STRFUNC</td><td colspan="3">_FS_RPATH</td><td colspan="2">_FS_LABEL</td><td colspan="2">_USE_MKFS</td><td colspan="2">_USE_FORWARD</td><td colspan="2">_MULTI_PARTITION</td></tr>
<tr><td>0</td><td>1</td><td>2</td><td>3</td><td>0</td><td>1</td><td>0&nbsp;&nbsp;</td><td>1/2</td><td>0</td><td>1</td><td>2</td><td>0</td><td>1</td><td>0</td><td>1</td><td>0</td><td>1</td><td>0</td><td>1</td></tr>
<tr class="lst3"><td>f_mount</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td>f_open</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td>f_close</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td>f_read</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td>f_write</td><td></td><td></td><td></td><td></td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td>f_sync</td><td></td><td></td><td></td><td></td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td>f_lseek</td><td></td><td></td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td>f_opendir</td><td></td><td></td><td>x</td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td>f_readdir</td><td></td><td></td><td>x</td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td>f_stat</td><td></td><td>x</td><td>x</td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td>f_getfree</td><td></td><td>x</td><td>x</td><td>x</td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td>f_truncate</td><td></td><td>x</td><td>x</td><td>x</td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td>f_unlink</td><td></td><td>x</td><td>x</td><td>x</td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td>f_mkdir</td><td></td><td>x</td><td>x</td><td>x</td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td>f_chmod</td><td></td><td>x</td><td>x</td><td>x</td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td>f_utime</td><td></td><td>x</td><td>x</td><td>x</td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td>f_rename</td><td></td><td>x</td><td>x</td><td>x</td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td>f_chdir</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td>f_chdrive</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td>f_getcwd</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>x</td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td>f_getlabel</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td>f_setlabel</td><td></td><td></td><td></td><td></td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td>f_forward</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>x</td><td></td><td></td><td></td></tr>
<tr><td>f_mkfs</td><td></td><td></td><td></td><td></td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td>f_fdisk</td><td></td><td></td><td></td><td></td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>x</td><td></td><td></td><td></td><td>x</td><td></td></tr>
<tr><td>f_putc</td><td></td><td></td><td></td><td></td><td></td><td>x</td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td>f_puts</td><td></td><td></td><td></td><td></td><td></td><td>x</td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td>f_printf</td><td></td><td></td><td></td><td></td><td></td><td>x</td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td>f_gets</td><td></td><td></td><td></td><td></td><td></td><td></td><td>x</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
</table>
</div>

<div class="para" id="lfn">
<h3>Long File Name</h3>
<p>The FatFs module has started to support long file name (LFN) at revision 0.07. The two different file names, SFN and LFN, of a file is transparent in the file functions except for f_readdir function. To enable LFN feature, set <tt>_USE_LFN</tt> to 1, 2 or 3, and add a Unicode code conversion function <tt>ff_convert()</tt> and <tt>ff_wtoupper()</tt> to the project. The LFN feature requiers a certain working buffer in addition. The buffer size can be configured by <tt>_MAX_LFN</tt> corresponding to the available memory size. The size of long file name will reach up to 255 characters so that the <tt>_MAX_LFN</tt> should be set to 255 for full featured LFN operation. If the size of working buffer is insufficient for the given file name, the file function fails with <tt>FR_INVALID_NAME</tt>. When enable the LFN feature with re-entrant feature, <tt>_USE_LFN</tt> must be set to 2 or 3. In this case, the file function allocates the working buffer on the stack or heap. The working buffer occupies <tt>(_MAX_LFN + 1) * 2</tt> bytes.</p>
<table class="lst2 rset">
<caption>LFN cfg on ARM7</caption>
<tr><th>Code page</th><th>Program size</th></tr>
<tr><td>SBCS</td><td>+3.7K</td></tr>
<tr><td>932(Shift-JIS)</td><td>+62K</td></tr>
<tr><td>936(GBK)</td><td>+177K</td></tr>
<tr><td>949(Korean)</td><td>+139K</td></tr>
<tr><td>950(Big5)</td><td>+111K</td></tr>
</table>
<p>When the LFN feature is enabled, the module size will be increased depends on the selected code page. Right table shows how many bytes increased when LFN feature is enabled with some code pages. Especially, in the CJK region, tens of thousands of characters are being used. Unfortunately, it requires a huge OEM-Unicode bidirectional conversion table and the module size will be drastically increased that shown in the table. As the result, the FatFs with LFN feature with those code pages will not able to be implemented to most 8-bit microcontrollers.</p>
<p>Note that the LFN feature on the FAT file system is a patent of Microsoft Corporation. This is not the case on FAT32 but most FAT32 drivers include the LFN feature. FatFs can switch the LFN feature off by configuration option. When enable LFN feature on the commercial products, a license from Microsoft may be required depends on the final destination.</p>
</div>

<div class="para" id="unicode">
<h3>Unicode API</h3>
<p>In default, FatFs supports ANSI/OEM code set on the API but FatFs can also switch the code set to Unicode. This means the FatFs supports the True LFN feature. For more information, refer to the description in the <a href="filename.html">file name</a>.</p>
</div>

<div class="para" id="reentrant">
<h3>Re-entrancy</h3>
<p>The file operations to the different volume is always re-entrant and can work simultaneously. The file operations to the same volume is not re-entrant but it can also be configured to thread-safe with <tt>_FS_REENTRANT</tt> option. In this case, also the OS dependent synchronization object control functions, <tt>ff_cre_syncobj(), ff_del_syncobj(), ff_req_grant() and ff_rel_grant()</tt> must be added to the project.</p>
<p>When a file function is called while the volume is in use by any other task, the file function is suspended until that task leaves file function. If wait time exceeded a period defined by <tt>_TIMEOUT</tt>, the file function will abort with <tt>FR_TIMEOUT</tt>. The timeout feature might not be supported on some RTOS.</p>
<p>There is an exception on <tt>f_mount()</tt> and <tt>f_mkfs()</tt> function. These functions are not re-entrant to the same volume. When use these functions, all other task must close the corresponding file on the volume and avoid to access the volume.</p>
<p>Note that this section describes on the re-entrancy of the FatFs module itself but also the low level disk I/O layer must be re-entrant.</p>
</div>

<div class="para" id="dup">
<h3>Duplicated File Access</h3>
<p>FatFs module does not support the sharing controls of duplicated file access in default. It is permitted when open method to a file is only read mode. The duplicated open in write mode to a file is always prohibited and open file must not be renamed, deleted, or the FAT structure on the volume can be collated.</p>
<p>The file sharing control can also be available when <tt>_FS_LOCK</tt> is set to 1 or grater. The value specifies the number of files to manage simultaneously. In this case, if any open, rename or remove that violating the file sharing rule that described above is attempted, the file function will fail with <tt>FR_LOCKED</tt>. If number of open files gets larger than <tt>_FS_LOCK</tt>, the <tt>f_open()</tt> function will fail with <tt>FR_TOO_MANY_OPEN_FILES</tt>.</p>
</div>

<div class="para" id="fs1">
<h3>Performance Effective File Access</h3>
<p>For good performance on reading/writing files on the small embedded system, application programmer should consider what process is done in the FatFs module. The file data on the disk is transferred in following sequence by <tt>f_read()</tt> function.</p>
<p>Figure 1. Sector miss-aligned read (short)<br>
<img src="../img/f1.png" width="490" height="110" alt="">
</p>
<p>Figure 2. Sector miss-aligned read (long)<br>
<img src="../img/f2.png" width="490" height="140" alt="">
</p>
<p>Figure 3. Sector aligned read<br>
<img src="../img/f3.png" width="490" height="119" alt="">
</p>
<p>The file I/O buffer means a sector buffer to read/write a partial data on the sector. The sector buffer is either file private sector buffer on each file object or shared sector buffer on the file system object. The buffer configuration option <tt>_FS_TINY</tt> determines which sector buffer is used for the file data transfer. When tiny buffer (1) is selected, data memory consumption is reduced 512 bytes each file object. In this case, FatFs module uses only a sector buffer on the file system object for file data transfer and FAT/directory access. The disadvantage of the tiny buffer configuration is: the FAT data cached in the sector buffer will be lost by file data transfer and it must be reloaded at every cluster boundary. However it will be suitable for most application from view point of the decent performance and low memory consumption.</p>
<p>Figure 1 shows that partial sector data is transferred via the file I/O buffer. On long data transfer shown in Figure 2, middle of transfer data that covers one or more sector is transferred to application buffer directly. Figure 3 shows that the case of entier transfer data is aligned to the sector boundary. In this case, file I/O buffer is not used. On the direct transfer, the maximum extent of sectors are read with <tt>disk_read()</tt> function at a time but the multi sector transfer never across the cluster boundary even if it is contiguous.</p>
<p>Therefore taking effort to sector aligned read/write access avoids buffered data transfer and the read/write performance will be improved. Besides the effect, cached FAT data will not be flushed by file data transfer on the tiny configuration so that it can achieve same performance as non-tiny configuration with small memory footprint.</p>
</div>

<div class="para" id="fs2">
<h3>Considerations on Flash Memory Media</h3>
<p>To maximize the write performance of flash memory media, such as SDC and CFC, it must be controlled in consideration of its characteristitcs.</p>
<h4>Using Mutiple-Sector Write</h4>
<div class="rset">
Figure 6. Comparison between Multiple/Single Sector Write<br>
<img src="../img/f6.png" width="630" height="148" alt="fig.6">
</div>
<p>The write throughput of the flash memory media becomes the worst at single sector write and it increases proportional to the number of sectors per a write transaction. This effect more appears at more fast bus clock and its ratio often becomes grater than ten. The number of write transaction also affects the life time of the media. Therefore the application program should write the data in large block as possible. The ideal block size is cluster size or power of 2 bytes and the byte offset should be aligned to the block. Of course all layers between the application and the media must support multiple sector write feature, however most of open-source disk drivers lack it. Do not split a multiple sector write request into single sector writes or the write throughput gets poor. Note that FatFs module and its sample disk drivers support multiple sector read/write feature.</p>
<h4>Forcing Memory Erase</h4>
<p>When remove a file with <tt>f_remove()</tt> function, the data clusters occupied by the file are marked 'free' on the FAT. But the data sectors containing the file data are not that applied any process, so that the file data left occupies a part of the flash memory array as live blocks. If the file data is forced erased on removing the file, the number of free blocks on the flash memory will be increased. This may skip internal block erase operation to the data block on next write. As the result the write performance might be improved. To enable this feature, set <tt>_USE_ERASE</tt> to 1. Note that this is a feature with expectation of internal process of the flash memory media. It may not always effective and f_remove function will take a time on removing a large file.</p>
</div>

<div class="para" id="critical">
<h3>Critical Section</h3>
<p>If a write operation to the FAT file system is interrupted due to any accidental failure, such as sudden blackout, incorrect disk removal and unrecoverable disk error, the FAT structure can be collated. Following images shows the critical section on the FatFs application.</p>
<div class="lset">
Figure 4. Long critical section<br>
<img src="../img/f4.png" width="320" height="436" alt="fig.4">
</div>
<div class="lset">
Figure 5. Minimized critical section<br>
<img src="../img/f5.png" width="320" height="436" alt="fig.5">
</div>
<br class="clr">
<p>An interruption in the red section can cause a cross link; as a result, the object being changed may be lost. There is one or more possibility listed below when an interruption in the yellow section is occurred.</p>
<ul>
<li>File data being rewritten is collated.</li>
<li>A file being appended returns initial state.</li>
<li>A file created as new is gone.</li>
<li>A file created as new or in overwritten remains with no content.</li>
<li>Efficiency of disk use gets worse due to lost clusters.</li>
</ul>
<p>Each case does not affect the files that not in write mode open. To minimize risk of data loss, the critical section can be minimized like shown in Figure 5 by minimizing the time that file is opened in write mode or using <tt>f_sync()</tt> function properly.</p>
</div>

<div class="para" id="license">
<h3>About FatFs License</h3>
<p>This is a copy of the FatFs license document that included in the source codes.</p>
<pre>/*----------------------------------------------------------------------------/
/  FatFs - FAT file system module  R0.09b                    (C)ChaN, 2013
/-----------------------------------------------------------------------------/
/ FatFs module is a generic FAT file system module for small embedded systems.
/ This is a free software that opened for education, research and commercial
/ developments under license policy of following trems.
/
/  Copyright (C) 2013, ChaN, all right reserved.
/
/ * The FatFs module is a free software and there is NO WARRANTY.
/ * No restriction on use. You can use, modify and redistribute it for
/   personal, non-profit or commercial products UNDER YOUR RESPONSIBILITY.
/ * Redistributions of source code must retain the above copyright notice.
/
/-----------------------------------------------------------------------------/</pre>
<p>Therefore FatFs license is one of the BSD-style license but there is a big difference. Because FatFs is for embedded projects, the conditions for redistributions in binary form, such as embedded code, hex file and binary library, is not specified to increase its usability. The documentation of the distributions need not include about FatFs and its license document, and it may also. Of course FatFs is compatible with the projects under GNU GPL. When redistribute it with any modification, the license can also be changed to GNU GPL or BSD-style license.</p>
</div>

<p class="foot"><a href="../00index_e.html">Return</a></p>
</body>
</html>


================================================
FILE: libraries/UHS_FS/FAT/FatFS/doc/en/chdir.html
================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="up" title="FatFs" href="../00index_e.html">
<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/chdir.html">
<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
<title>FatFs - f_chdir</title>
</head>

<body>

<div class="para func">
<h2>f_chdir</h2>
<p>The f_chdir function changes the current directory of a drive.</p>
<pre>
FRESULT f_chdir (
  const TCHAR* <span class="arg">path</span> <span class="c">/* [IN] Path name */</span>
);
</pre>
</div>

<div class="para arg">
<h4>Parameters</h4>
<dl class="par">
<dt>path</dt>
<dd>Pointer to the null-terminated string that specifies a <a href="filename.html">directory</a> to go.</dd>
</dl>
</div>


<div class="para ret">
<h4>Return Values</h4>
<p>
<a href="rc.html#ok">FR_OK</a>,
<a href="rc.html#de">FR_DISK_ERR</a>,
<a href="rc.html#ie">FR_INT_ERR</a>,
<a href="rc.html#nr">FR_NOT_READY</a>,
<a href="rc.html#np">FR_NO_PATH</a>,
<a href="rc.html#in">FR_INVALID_NAME</a>,
<a href="rc.html#id">FR_INVALID_DRIVE</a>,
<a href="rc.html#ne">FR_NOT_ENABLED</a>,
<a href="rc.html#ns">FR_NO_FILESYSTEM</a>,
<a href="rc.html#tm">FR_TIMEOUT</a>,
<a href="rc.html#nc">FR_NOT_ENOUGH_CORE</a>
</p>
</div>


<div class="para desc">
<h4>Description</h4>
<p>The <tt>f_chdir()</tt> function changes the current directory of the logical drive. The current directory of a drive is initialized to the root directory when the drive is auto-mounted. Note that the current directory is retained in the each file system object so that it also affects other tasks that using the drive.</p>
</div>


<div class="para comp">
<h4>QuickInfo</h4>
<p>Available when <tt>_FS_RPATH >= 1</tt>.</p>
</div>


<div class="para use">
<h4>Example</h4>
<pre>
    <span class="c">/* Change current directory of the current drive (dir1 under root dir) */</span>
    f_chdir("/dir1");

    <span class="c">/* Change current directory of drive 2 (parent dir) */</span>
    f_chdir("2:..");
</pre>
</div>

<div class="para ref">
<h4>See Also</h4>
<p><tt><a href="chdrive.html">f_chdrive</a>, <a href="getcwd.html">f_getcwd</a></tt></p>
</div>

<p class="foot"><a href="../00index_e.html">Return</a></p>
</body>
</html>


================================================
FILE: libraries/UHS_FS/FAT/FatFS/doc/en/chdrive.html
================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="up" title="FatFs" href="../00index_e.html">
<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/chdrive.html">
<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
<title>FatFs - f_chdrive</title>
</head>

<body>

<div class="para func">
<h2>f_chdrive</h2>
<p>The f_chdrive function changes the current drive.</p>
<pre>
FRESULT f_chdrive (
  BYTE <span class="arg">drv</span> <span class="c">/* [IN] Logical drive number */</span>
);
</pre>
</div>

<div class="para arg">
<h4>Parameters</h4>
<dl class="par">
<dt>drv</dt>
<dd>Specifies the <a href="filename.html">logical drive number</a> to be set as the current drive.</dd>
</dl>
</div>


<div class="para ret">
<h4>Return Values</h4>
<p>
<a href="rc.html#ok">FR_OK</a>,
<a href="rc.html#id">FR_INVALID_DRIVE</a>
</p>
</div>


<div class="para desc">
<h4>Description</h4>
<p>The <tt>f_chdrive()</tt> function changes the current drive. The initial value of the current drive number is 0. Note that the current drive is retained in a static variable so that it also affects other tasks that using the file functions.</p>
</div>

<div class="para comp">
<h4>QuickInfo</h4>
<p>Available when <tt>_FS_RPATH >= 1</tt>.</p>
</div>


<div class="para ref">
<h4>See Also</h4>
<p><tt><a href="chdir.html">f_chdir</a>, <a href="getcwd.html">f_getcwd</a></tt></p>
</div>

<p class="foot"><a href="../00index_e.html">Return</a></p>
</body>
</html>


================================================
FILE: libraries/UHS_FS/FAT/FatFS/doc/en/chmod.html
================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="up" title="FatFs" href="../00index_e.html">
<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/chmod.html">
<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
<title>FatFs - f_chmod</title>
</head>

<body>

<div class="para func">
<h2>f_chmod</h2>
<p>The f_chmod function changes the attribute of a file or directory.</p>
<pre>
FRESULT f_chmod (
  const TCHAR* <span class="arg">path</span>, <span class="c">/* [IN] Object name */</span>
  BYTE <span class="arg">attr</span>,         <span class="c">/* [IN] Attribute flags */</span>
  BYTE <span class="arg">mask</span>          <span class="c">/* [IN] Attribute masks */</span>
);
</pre>
</div>

<div class="para arg">
<h4>Parameters</h4>
<dl class="par">
<dt>path</dt>
<dd>Pointer to the null-terminated string that specifies a <a href="filename.html">file or directory</a> to be changed</dd>
<dt>attr</dt>
<dd>Attribute flags to be set in one or more combination of the following flags. The specified flags are set and others are cleard.<br>
<table class="lst">
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td>AM_RDO</td><td>Read only</td></tr>
<tr><td>AM_ARC</td><td>Archive</td></tr>
<tr><td>AM_SYS</td><td>System</td></tr>
<tr><td>AM_HID</td><td>Hidden</td></tr>
</table>
</dd>
<dt>mask</dt>
<dd>Attribute mask that specifies which attribute is changed. The specified aattributes are set or cleard.</dd>
</dl>
</div>


<div class="para ret">
<h4>Return Values</h4>
<p>
<a href="rc.html#ok">FR_OK</a>,
<a href="rc.html#de">FR_DISK_ERR</a>,
<a href="rc.html#ie">FR_INT_ERR</a>,
<a href="rc.html#nr">FR_NOT_READY</a>,
<a href="rc.html#ok">FR_NO_FILE</a>,
<a href="rc.html#np">FR_NO_PATH</a>,
<a href="rc.html#in">FR_INVALID_NAME</a>,
<a href="rc.html#wp">FR_WRITE_PROTECTED</a>,
<a href="rc.html#id">FR_INVALID_DRIVE</a>,
<a href="rc.html#ne">FR_NOT_ENABLED</a>,
<a href="rc.html#ns">FR_NO_FILESYSTEM</a>,
<a href="rc.html#tm">FR_TIMEOUT</a>,
<a href="rc.html#nc">FR_NOT_ENOUGH_CORE</a>
</p>
</div>


<div class="para desc">
<h4>Description</h4>
<p>The <tt>f_chmod()</tt> function changes the attribute of a file or directory.</p>
</div>


<div class="para comp">
<h4>QuickInfo</h4>
<p>Available when <tt>_FS_READONLY == 0</tt> and <tt>_FS_MINIMIZE == 0</tt>.</p>
</div>


<div class="para use">
<h4>Example</h4>
<pre>
    <span class="c">/* Set read-only flag, clear archive flag and others are retained. */</span>
    f_chmod("file.txt", AR_RDO, AR_RDO | AR_ARC);
</pre>
</div>

<p class="foot"><a href="../00index_e.html">Return</a></p>
</body>
</html>


================================================
FILE: libraries/UHS_FS/FAT/FatFS/doc/en/close.html
================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="up" title="FatFs" href="../00index_e.html">
<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/close.html">
<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
<title>FatFs - f_close</title>
</head>

<body>

<div class="para func">
<h2>f_close</h2>
<p>The f_close function closes an open file.</p>
<pre>
FRESULT f_close (
  FIL* <span class="arg">fp</span>     <span class="c">/* [IN] Pointer to the file object */</span>
);
</pre>
</div>

<div class="para arg">
<h4>Parameter</h4>
<dl class="par">
<dt>fp</dt>
<dd>Pointer to the open file object structure to be closed.</dd>
</dl>
</div>


<div class="para ret">
<h4>Return Values</h4>
<p>
<a href="rc.html#ok">FR_OK</a>,
<a href="rc.html#de">FR_DISK_ERR</a>,
<a href="rc.html#ie">FR_INT_ERR</a>,
<a href="rc.html#nr">FR_NOT_READY</a>,
<a href="rc.html#io">FR_INVALID_OBJECT</a>,
<a href="rc.html#tm">FR_TIMEOUT</a>
</p>
</div>


<div class="para desc">
<h4>Description</h4>
<p>The <tt>f_close()</tt> function closes an open file object. If any data has been written to the file, the cached information of the file is written back to the disk. After the function succeeded, the file object is no longer valid and it can be discarded.</p>
</div>


<div class="para comp">
<h4>QuickInfo</h4>
<p>Always available.</p>
</div>


<div class="para ref">
<h4>See Also</h4>
<p><tt><a href="open.html">f_open</a>, <a href="read.html">f_read</a>, <a href="write.html">f_write</a>,  <a href="sync.html">f_sync</a>, <a href="sfile.html">FIL</a>, <a href="sfatfs.html">FATFS</a></tt></p>
</div>

<p class="foot"><a href="../00index_e.html">Return</a></p>
</body>
</html>


================================================
FILE: libraries/UHS_FS/FAT/FatFS/doc/en/dinit.html
================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="up" title="FatFs" href="../00index_e.html">
<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/dinit.html">
<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
<title>FatFs - disk_initialize</title>
</head>

<body>

<div class="para func">
<h2>disk_initialize</h2>
<p>The disk_initialize function initializes the disk drive.</p>
<pre>
DSTATUS disk_initialize (
  BYTE <span class="arg">pdrv</span>           <span class="c">/* [IN] Physical drive number */</span>
);
</pre>
</div>

<div class="para arg">
<h4>Parameter</h4>
<dl class="par">
<dt>pdrv</dt>
<dd>Specifies the physical drive number to initialize.</dd>
</dl>
</div>


<div class="para ret">
<h4>Return Values</h4>
<p>This function returns a disk status as the result. For details of the disk status, refer to the <a href="dstat.html">disk_status</a> function.</p>
</div>

<div class="para desc">
<h4>Description</h4>
<p>This function initializes a physical drive and put it ready to generic read/write data. When the function succeeded, <tt>STA_NOINIT</tt> flag in the return value is cleared.</p>
<p><em>Application program MUST NOT call this function, or FAT structure on the volume can be corrapted. To re-initialize the file system, use <tt>f_mount()</tt> function instead.</em> This function is called on volume mount process by FatFs module to manage the media change.</p>
</div>

<p class="foot"><a href="../00index_e.html">Return</a></p>
</body>
</html>


================================================
FILE: libraries/UHS_FS/FAT/FatFS/doc/en/dioctl.html
================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="up" title="FatFs" href="../00index_e.html">
<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/dioctl.html">
<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
<title>FatFs - disk_ioctl</title>
</head>

<body>

<div class="para func">
<h2>disk_ioctl</h2>
<p>The disk_ioctl function cntrols device specific features and miscellaneous functions other than generic read/write.</p>
<pre>
DRESULT disk_ioctl (
  BYTE <span class="arg">pdrv</span>,     <span class="c">/* [IN] Drive number */</span>
  BYTE <span class="arg">cmd</span>,      <span class="c">/* [IN] Control command code */</span>
  void* <span class="arg">buff</span>     <span class="c">/* [I/O] Parameter and data buffer */</span>
);
</pre>
</div>

<div class="para arg">
<h4>Parameters</h4>
<dl class="par">
<dt>pdrv</dt>
<dd>Specifies the drive number (0-9).</dd>
<dt>cmd</dt>
<dd>Specifies the command code.</dd>
<dt>buff</dt>
<dd>Pointer to the parameter buffer depends on the command code. When it is not used, specify a NULL pointer.</dd>
</dl>
</div>


<div class="para ret">
<h4>Return Value</h4>
<dl class="ret">
<dt>RES_OK (0)</dt>
<dd>The function succeeded.</dd>
<dt>RES_ERROR</dt>
<dd>Any error occurred.</dd>
<dt>RES_PARERR</dt>
<dd>Invalid command code or parameter.</dd>
<dt>RES_NOTRDY</dt>
<dd>The disk drive has not been initialized.</dd>
</dl>
</div>


<div class="para desc">
<h4>Description</h4>
<p>The FatFs module uses only device independent commands described below. Any device dependent function is not used.</p>
<table class="lst">
<tr><th>Command</th><th>Description</th></tr>
<tr><td>CTRL_SYNC</td><td>Make sure that the disk drive has finished pending write process. When the disk I/O module has a write back cache, flush the dirty sector immediately. This command is not used in read-only configuration.</td></tr>
<tr><td>GET_SECTOR_SIZE</td><td>Returns sector size of the drive into the <tt>WORD</tt> variable pointed by <tt>Buffer</tt>. This command is not used in fixed sector size configuration, <tt>_MAX_SS</tt> is 512.</td></tr>
<tr><td>GET_SECTOR_COUNT</td><td>Returns number of available sectors on the drive into the <tt>DWORD</tt> variable pointed by <tt class="arg">buff</tt>. This command is used by only <tt>f_mkfs()</tt> function to determine the volume size to be created.</td></tr>
<tr><td>GET_BLOCK_SIZE</td><td>Returns erase block size of the flash memory in unit of sector into the <tt>DWORD</tt> variable pointed by <tt class="arg">buff</tt>. The allowable value is 1 to 32768 in power of 2. Return 1 if the erase block size is unknown or disk devices. This command is used by only <tt>f_mkfs()</tt> function and it attempts to align data area to the erase block boundary.</td></tr>
<tr><td>CTRL_ERASE_SECTOR</td><td>Erases a part of the flash memory specified by a <tt>DWORD</tt> array {&lt;start sector&gt;, &lt;end sector&gt;} pointed by <tt class="arg">buff</tt>. This is similar command to Trim command of ATA command set. When this feature is not supported or not a flash memory media, this command has no effect. The FatFs does not check the result code and the file function is not affected even if the sectors are not erased well. This command is called on removing a cluster chain when <tt>_USE_ERASE</tt> is 1.</td></tr>
</table>
</div>

<p class="foot"><a href="../00index_e.html">Return</a></p>
</body>
</html>


================================================
FILE: libraries/UHS_FS/FAT/FatFS/doc/en/dread.html
================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="up" title="FatFs" href="../00index_e.html">
<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/dread.html">
<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
<title>FatFs - disk_read</title>
</head>

<body>

<div class="para func">
<h2>disk_read</h2>
<p>The disk_read function reads sector(s) from the disk drive.</p>
<pre>
DRESULT disk_read (
  BYTE <span class="arg">pdrv</span>,     <span class="c">/* [IN] Physical drive number */</span>
  BYTE* <span class="arg">buff</span>,    <span class="c">/* [OUT] Pointer to the read data buffer */</span>
  DWORD <span class="arg">sector</span>,  <span class="c">/* [IN] Start sector number */</span>
  BYTE <span class="arg">count</span>     <span class="c">/* [IN] Number of sectros to read */</span>
);
</pre>
</div>

<div class="para arg">
<h4>Parameters</h4>
<dl class="par">
<dt>pdrv</dt>
<dd>Specifies the physical drive number.</dd>
<dt>buff</dt>
<dd>Pointer to the <em>byte array</em> to store the read data. The size of buffer must be in sector size * sector count.</dd>
<dt>sector</dt>
<dd>Specifies the start sector number in logical block address (LBA).</dd>
<dt>count</dt>
<dd>Specifies number of sectors to read. The value can be 1 to 128. Generally, a multiple sector transfer request must not be split into single sector transactions to the device, or you may not get good read performance.</dd>
</dl>
</div>


<div class="para ret">
<h4>Return Value</h4>
<dl class="ret">
<dt>RES_OK (0)</dt>
<dd>The function succeeded.</dd>
<dt>RES_ERROR</dt>
<dd>Any hard error occurred during the read operation and could not recover it.</dd>
<dt>RES_PARERR</dt>
<dd>Invalid parameter.</dd>
<dt>RES_NOTRDY</dt>
<dd>The disk drive has not been initialized.</dd>
</dl>
</div>


<div class="para desc">
<h4>Description</h4>
<p>The specified memory address is not that always aligned to word boundary because the type of pointer is defined as <tt>BYTE</tt>. The misaligned read/write request can occur at <a href="appnote.html#fs1">direct transfer</a>. If the bus architecture, especially DMA controller, does not allow misaligned memory access, it should be solved in this function. There are some workarounds described below to avoid this problem.</p>
<ul>
<li>Convert word transfer to byte transfer in this function. - Recommended.</li>
<li>On <tt>f_read()</tt>, avoid long read request that includes a whole of sector. - Direct transfer will never occur.</li>
<li>On <tt>f_read(fp, buff, btr, &amp;br)</tt>, make sure that <tt>(((UINT)buff &amp; 3) == (f_tell(fp) &amp; 3))</tt> is true. - Word aligned direct transfer is guaranteed.</li>
</ul>
</div>


<p class="foot"><a href="../00index_e.html">Return</a></p>
</body>
</html>


================================================
FILE: libraries/UHS_FS/FAT/FatFS/doc/en/dstat.html
================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="up" title="FatFs" href="../00index_e.html">
<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/dstat.html">
<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
<title>FatFs - disk_status</title>
</head>

<body>

<div class="para func">
<h2>disk_status</h2>
<p>The disk_status function returns the current disk status.</p>
<pre>
DSTATUS disk_status (
  BYTE <span class="arg">pdrv</span>     <span class="c">/* [IN] Physical drive number */</span>
);
</pre>
</div>

<div class="para arg">
<h4>Parameter</h4>
<dl class="par">
<dt>pdrv</dt>
<dd>Specifies the physical drive number to be confirmed.</dd>
</dl>
</div>


<div class="para ret">
<h4>Return Values</h4>
<p>The disk status is returned in combination of following flags. FatFs refers only <tt>STA_NOINIT</tt> and <tt>STA_PROTECTED</tt>.</p>
<dl class="ret">
<dt>STA_NOINIT</dt>
<dd>Indicates that the disk drive is not initialized. This flag is set on system reset, media removal, media change and <tt>disk_initialize()</tt> function failed. The flag is cleared on disk_initialize function succeeded. Media change that occurs asynchronously must be captured and reflect it to the status flags, or auto-mount feature will not work correctly. When media change detection is not supported, application program should clear the file system object with <tt>f_mount()</tt> function after the media change.</dd>
<dt>STA_NODISK</dt>
<dd>Indicates that no medium in the drive. This is always cleared on fixed disk drive.</dd>
<dt>STA_PROTECTED</dt>
<dd>Indicates that the medium is write protected. This is always cleared on the drive that does not support write protect notch. Not valid while <tt>STA_NODISK</tt> is set.</dd>
</dl>
</div>

<p class="foot"><a href="../00index_e.html">Return</a></p>
</body>
</html>


================================================
FILE: libraries/UHS_FS/FAT/FatFS/doc/en/dwrite.html
================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="up" title="FatFs" href="../00index_e.html">
<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/dwrite.html">
<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
<title>FatFs - disk_write</title>
</head>

<body>

<div class="para func">
<h2>disk_write</h2>
<p>The disk_write writes sector(s) to the disk.</p>
<pre>
DRESULT disk_write (
  BYTE <span class="arg">drv</span>,         <span class="c">/* [IN] Physical drive number */</span>
  const BYTE* <span class="arg">buff</span>, <span class="c">/* [IN] Write data (may be non aligned) */</span>
  DWORD <span class="arg">sector</span>,     <span class="c">/* [IN] Sector number to write */</span>
  BYTE <span class="arg">count</span>        <span class="c">/* [IN] Number of sectors to write */</span>
);
</pre>
</div>

<div class="para arg">
<h4>Parameters</h4>
<dl class="par">
<dt>pdrv</dt>
<dd>Specifies the physical drive number.</dd>
<dt>buff</dt>
<dd>Pointer to the <em>byte array</em> to be written.</dd>
<dt>sector</dt>
<dd>Specifies the start sector number in logical block address (LBA).</dd>
<dt>count</dt>
<dd>Specifies the number of sectors to write. The value can be 1 to 128. Generally, a multiple sector transfer request must not be split into single sector transactions to the device, or you will never get good write performance.</dd>
</dl>
</div>


<div class="para ret">
<h4>Return Values</h4>
<dl class="ret">
<dt>RES_OK (0)</dt>
<dd>The function succeeded.</dd>
<dt>RES_ERROR</dt>
<dd>Any hard error occurred during the write operation and could not recover it.</dd>
<dt>RES_WRPRT</dt>
<dd>The medium is write protected.</dd>
<dt>RES_PARERR</dt>
<dd>Invalid parameter.</dd>
<dt>RES_NOTRDY</dt>
<dd>The disk drive has not been initialized.</dd>
</dl>
</div>


<div class="para desc">
<h4>Description</h4>
<p>This function is not required in read only configuration. The specified memory address is not that always aligned to word boundary because the type of pointer is defined as <tt>BYTE</tt>. For more information, read <a href="dread.html">description in disk_read function</a>.</p>
</div>


<p class="foot"><a href="../00index_e.html">Return</a></p>
</body>
</html>


================================================
FILE: libraries/UHS_FS/FAT/FatFS/doc/en/eof.html
================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="up" title="FatFs" href="../00index_e.html">
<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/eof.html">
<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
<title>FatFs - f_eof</title>
</head>

<body>

<div class="para func">
<h2>f_eof</h2>
<p>The f_eof function tests for end-of-file on a file.</p>
<pre>
int f_eof (
  FIL* <span class="arg">fp</span>   <span class="c">/* [IN] File object */</span>
);
</pre>
</div>


<div class="para arg">
<h4>Parameters</h4>
<dl class="par">
<dt>fp</dt>
<dd>Pointer to the open file object structure.</dd>
</dl>
</div>


<div class="para ret">
<h4>Return Values</h4>
<p>The <tt>f_eof()</tt> function returns a non-zero value if the read/write pointer has reached end of the file; otherwise it returns a zero.</p>
</div>


<div class="para desc">
<h4>Description</h4>
<p>In this revision, this function is implemented as a macro.</p>
<pre>
<span class="k">#define</span> f_eof(fp) (((fp)->fptr) == ((fp)->fsize) ? 1 : 0)
</pre>
</div>


<div class="para comp">
<h4>QuickInfo</h4>
<p>Always available.</p>
</div>


<div class="para ref">
<h4>See Also</h4>
<p><tt><a href="open.html">f_open</a>, <a href="lseek.html">f_lseek</a>, <a href="sfile.html">FIL</a></tt></p>
</div>

<p class="foot"><a href="../00index_e.html">Return</a></p>
</body>
</html>


================================================
FILE: libraries/UHS_FS/FAT/FatFS/doc/en/error.html
================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="up" title="FatFs" href="../00index_e.html">
<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/error.html">
<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
<title>FatFs - f_error</title>
</head>

<body>

<div class="para func">
<h2>f_error</h2>
<p>The f_error tests for an error on a file.</p>
<pre>
int f_error (
  FIL* <span class="arg">fp</span>   <span class="c">/* [IN] File object */</span>
);
</pre>
</div>


<div class="para arg">
<h4>Parameters</h4>
<dl class="par">
<dt>fp</dt>
<dd>Pointer to the open file object structure.</dd>
</dl>
</div>


<div class="para ret">
<h4>Return Values</h4>
<p>Returns a non-zero value if an error has occurred; otherwise it returns a zero.</p>
</div>


<div class="para desc">
<h4>Description</h4>
<p>In this revision, this function is implemented as a macro.</p>
<pre>
<span class="k">#define</span> f_error(fp) (((fp)->flag & FA__ERROR) ? 1 : 0)
</pre>
</div>


<div class="para comp">
<h4>QuickInfo</h4>
<p>Always available.</p>
</div>


<div class="para ref">
<h4>See Also</h4>
<p><tt><a href="open.html">f_open</a>, <a href="sfile.html">FIL</a></tt></p>
</div>

<p class="foot"><a href="../00index_e.html">Return</a></p>
</body>
</html>


================================================
FILE: libraries/UHS_FS/FAT/FatFS/doc/en/fattime.html
================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="up" title="FatFs" href="../00index_e.html">
<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/fattime.html">
<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
<title>FatFs - get_fattime</title>
</head>

<body>

<div class="para func">
<h2>get_fattime</h2>
<p>The get_fattime function gets current time.</p>
<pre>
DWORD get_fattime (void);
</pre>
</div>


<div class="para ret">
<h4>Return Value</h4>
<p>Current time is returned with packed into a <tt>DWORD</tt> value. The bit field is as follows:</p>
<dl class="ret">
<dt>bit31:25</dt>
<dd>Year from 1980 (0..127)</dd>
<dt>bit24:21</dt>
<dd>Month (1..12)</dd>
<dt>bit20:16</dt>
<dd>Day in month(1..31)</dd>
<dt>bit15:11</dt>
<dd>Hour (0..23)</dd>
<dt>bit10:5</dt>
<dd>Minute (0..59)</dd>
<dt>bit4:0</dt>
<dd>Second / 2 (0..29)</dd>
</dl>
</div>


<div class="para desc">
<h4>Description</h4>
<p>The <tt>get_fattime()</tt> function must return any valid time even if the system does not support a real time clock. If a zero is returned, the file will not have a valid time. This function is not required in read only configuration.</p>
</div>


<p class="foot"><a href="../00index_e.html">Return</a></p>
</body>
</html>


================================================
FILE: libraries/UHS_FS/FAT/FatFS/doc/en/fdisk.html
================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="up" title="FatFs" href="../00index_e.html">
<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/fdisk.html">
<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
<title>FatFs - f_fdisk</title>
</head>

<body>

<div class="para func">
<h2>f_fdisk</h2>
<p>The f_fdisk function divides a physical drive.</p>
<pre>
FRESULT f_fdisk (
  BYTE  <span class="arg">pdrv</span>,         <span class="c">/* [IN] Physical drive number */</span>
  const DWORD <em>part[]</em>, <span class="c">/* [IN] Partition size */</span>
  void* <span class="arg">work</span>          <span class="c">/* [IN] Work area */</span>
);
</pre>
</div>

<div class="para arg">
<h4>Parameters</h4>
<dl class="par">
<dt>pdrv</dt>
<dd>Specifies the <em>physical drive</em> to be divided.</dd>
<dt>part[]</dt>
<dd>Partition map table. It must have four items.</dd>
<dt>work</dt>
<dd>Pointer to the function work area. The size must be at least <tt>_MAX_SS</tt> bytes.</dd>
</dl>
</div>

<div class="para ret">
<h4>Return Values</h4>
<p>
<a href="rc.html#ok">FR_OK</a>,
<a href="rc.html#de">FR_DISK_ERR</a>,
<a href="rc.html#nr">FR_NOT_READY</a>,
<a href="rc.html#wp">FR_WRITE_PROTECTED</a>,
<a href="rc.html#ip">FR_INVALID_PARAMETER</a>
</p>
</div>

<div class="para desc">
<h4>Description</h4>
<p>The <tt>f_fdisk()</tt> function creates a partition table into the MBR of the physical drive. The partitioning rule is in generic FDISK format so that it can create up to four primary partitions. Extended partition is not supported. The <tt class="arg">part[]</tt> array with four items specifies how to divide the physical drive. The first item specifies the size of first primary partition and fourth item specifies the fourth primary partition. If the value is less than or equal to 100, it means percentage of the partition in the entire disk space. If it is larger than 100, it means partition size in unit of sector.</p>
</div>

<div class="para comp">
<h4>QuickInfo</h4>
<p>Available when <tt>_FS_READOLNY == 0</tt>, <tt>_USE_MKFS == 1</tt> and <tt>_MULTI_PARTITION == 1</tt>.</p>
</div>

<div class="para use">
<h4>Example</h4>
<pre>
    <span class="c">/* Volume management table defined by user (required when _MULTI_PARTITION == 1) */</span>

    PARTITION VolToPart[] = {
        {0, 1},    <span class="c">/* Logical drive 0 ==> Physical drive 0, 1st partition */</span>
        {0, 2},    <span class="c">/* Logical drive 1 ==> Physical drive 0, 2nd partition */</span>
        {1, 0}     <span class="c">/* Logical drive 2 ==> Physical drive 1, auto detection */</span>
    };
</pre>
<pre>
    <span class="c">/* Initialize a brand-new disk drive mapped to physical drive 0 */</span>

    FATFS Fatfs;
    DWORD plist[] = {50, 50, 0, 0};  <span class="c">/* Divide drive into two partitions */</span>
    BYTE work[_MAX_SS];

    f_fdisk(0, plist, work);  <span class="c">/* Divide physical drive 0 */</span>

    f_mount(0, &amp;Fatfs);
    f_mkfs(0, 0, 0);          <span class="c">/* Create an FAT volume on the logical drive 0. 2nd argument is ignored. */</span>
    f_mount(0, 0);

    f_mount(1, &amp;Fatfs);
    f_mkfs(1, 0, 0);
    f_mount(1, 0);

</pre>
</div>

<div class="para ref">
<h4>See Also</h4>
<p><a href="filename.html#vol">Volume management</a>, <a href="mkfs.html"><tt>f_mkfs</tt></a></p>
</div>

<p class="foot"><a href="../00index_e.html">Return</a></p>
</body>
</html>


================================================
FILE: libraries/UHS_FS/FAT/FatFS/doc/en/filename.html
================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="up" title="FatFs" href="../00index_e.html">
<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/filename.html">
<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
<title>FatFs - Path Names</title>
</head>

<body>
<h1>Path Names</h1>

<div class="para" id="nam">
<h3>Format of the path names</h3>
<p>The format of path name on the FatFs module is similer to the filename specs of DOS/Windows as follows:</p>
<pre>"[drive#:][/]directory/file"</pre>
<p>The FatFs module supports long file name (LFN) and 8.3 format file name (SFN). The LFN can be used when LFN feature is enabled (<tt>_USE_LFN &gt; 0</tt>). The sub directories are separated with a \ or / in the same way as DOS/Windows API. Duplicated separators are skipped and ignored. Only a difference is that the logical drive is specified in a numeral with a colon. When the drive number is omitted, it is assumed as <em>default drive</em> (drive 0 or current drive).</p>
<p>Control characters (<tt>'\0'</tt> to <tt>'\x1F'</tt>) are recognized as end of the path name. Leading/embedded spaces in the path name are valid as a part of the name on LFN configuration but they are recognized as end of the path name on non-LFN configuration. Trailing spaces and dots are ignored.</p>
<p>In default configuration (<tt>_FS_RPATH == 0</tt>), it does not have a concept of current directory like OS oriented file system. All objects on the volume are always specified in full path name that follows from the root directory. Dot directory names are not allowed. Heading separator is ignored and it can be exist or omitted. The default drive number is fixed to 0.</p>
<p>When relative path feature is enabled (<tt>_FS_RPATH == 1</tt>), specified path is followed from the root directory if a heading separator is exist. If not, it is followed from the current directory set with <a href="chdir.html">f_chdir</a> function. Dot names are also allowed for the path name. The default drive is the current drive set with <a href="chdrive.html">f_chdrive</a> function.</p>
<table class="lst2">
<tr><td>Path name</td><td>_FS_RPATH == 0</td><td>_FS_RPATH == 1</td></tr>
<tr class="lst3"><td>file.txt</td><td>A file in the root directory of the drive 0</td><td>A file in the current directory of the current drive</td></tr>
<tr><td>/file.txt</td><td>A file in the root directory of the drive 0</td><td>A file in the root directory of the current drive</td></tr>
<tr><td></td><td>The root directory of the drive 0</td><td>The current directory of the current drive</td></tr>
<tr><td>/</td><td>The root directory of the drive 0</td><td>The root directory of the current drive</td></tr>
<tr><td>2:</td><td>The root directory of the drive 2</td><td>The current directory of the drive 2</td></tr>
<tr><td>2:/</td><td>The root directory of the drive 2</td><td>The root directory of the drive 2</td></tr>
<tr><td>2:file.txt</td><td>A file in the root directory of the drive 2</td><td>A file in the current directory of the drive 2</td></tr>
<tr><td>../file.txt</td><td>Invalid name</td><td>A file in the parent directory</td></tr>
<tr><td>.</td><td>Invalid name</td><td>This directory</td></tr>
<tr><td>..</td><td>Invalid name</td><td>Parent directory of the current directory</td></tr>
<tr><td>dir1/..</td><td>Invalid name</td><td>The current directory</td></tr>
<tr><td>/..</td><td>Invalid name</td><td>The root directory (sticks the top level)</td></tr>
</table>
</div>

<p><br></p>
<div class="para" id="uni">
<h3>Unicode API</h3>
<p>The path names are input/output in either ANSI/OEM code (SBCS/DBCS) or Unicode depends on the configuration options. The type of arguments that specifies the file names are defined as <tt>TCHAR</tt> which is an alias of <tt>char</tt> in default. The code set of the file name string is the ANSI/OEM code set specified by <tt>_CODE_PAGE</tt>. When <tt>_LFN_UNICODE</tt> is set to 1, the type of the <tt>TCHAR</tt> is switched to <tt>WCHAR, unsigned short</tt> (UCS-2 character) to support Unicode. In this case, the LFN feature is fully supported and the Unicode specific characters, such as ✝☪✡☸☭, can also be used for the path name. It also affects data types and encoding of the string I/O functions. To define literal strings, <tt>_T(s)</tt> and <tt>_TEXT(s)</tt> macro are available to select either ANSI/OEM or Unicode automatically. The code shown below is an example to define the literal strings.</p>
<pre>
 f_open(fp, "filename.txt", FA_READ);      <span class="c">/* ANSI/OEM only */</span>
 f_open(fp, L"filename.txt", FA_READ);     <span class="c">/* Unicode only */</span>
 f_open(fp, _T("filename.txt"), FA_READ);  <span class="c">/* Changed by configuration */</span>
</pre>
</div>

<p><br></p>
<div class="para" id="vol">
<h3>Correspondence between logical and physical drives</h3>
<p>The FatFs module has work areas that called <em>file system object</em> for each volume (logical drive). In default, each logical drive is bound to the physical drive that has same drive number. It attempts to mount a volume as SFD format and first FDISK partition. When <tt>_MULTI_PARTITION &gt;= 1</tt> is specified in configuration option, each individual logical drive is bound to any physical drive/partition. In this case, a volume management table must be defined by user. It is used to resolve relationship between logical drives and partitions as follows:</p>
<pre>
Example: Logical drive 0-2 are assigned to three pri-partitions on the physical drive 0 (fixed disk)
         Logical drive 3 is assigned to physical drive 1 (removable disk)

PARTITION VolToPart[] = {
    {0, 1},     <span class="c">/* Logical drive 0 ==> Physical drive 0, 1st partition */</span>
    {0, 2},     <span class="c">/* Logical drive 1 ==> Physical drive 0, 2nd partition */</span>
    {0, 3},     <span class="c">/* Logical drive 2 ==> Physical drive 0, 3rd partition */</span>
    {1, 0}      <span class="c">/* Logical drive 3 ==> Physical drive 1 (auto detection) */</span>
};
</pre>
<p>There are some considerations when use <tt>_MULTI_PARTITION</tt> configuration.</p>
<ul>
<li>Only four pri-partitions can be mounted. Extended partition is not supported.</li>
<li>The physical drive that has two or more partitions must be non-removable class.</li>
</ul>
</div>

</body>
</html>


================================================
FILE: libraries/UHS_FS/FAT/FatFS/doc/en/forward.html
================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="up" title="FatFs" href="../00index_e.html">
<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/forward.html">
<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
<title>FatFs - f_forward</title>
</head>

<body>

<div class="para func">
<h2>f_forward</h2>
<p>The f_forward function reads the file data and forward it to the data streaming device.</p>
<pre>
FRESULT f_forward (
  FIL* <span class="arg">fp</span>,                        <span class="c">/* [IN] File object */</span>
  UINT (*<span class="arg">func</span>)(const BYTE*,UINT), <span class="c">/* [IN] Data streaming function */</span>
  UINT <span class="arg">btf</span>,                       <span class="c">/* [IN] Number of bytes to forward */</span>
  UINT* <span class="arg">bf</span>                        <span class="c">/* [OUT] Number of bytes forwarded */</span>
);
</pre>
</div>

<div class="para arg">
<h4>Parameters</h4>
<dl class="par">
<dt>fp</dt>
<dd>Pointer to the open file object.</dd>
<dt>func</dt>
<dd>Pointer to the user-defined data streaming function. For details, refer to the sample code.</dd>
<dt>btf</dt>
<dd>Number of bytes to forward in range of <tt>UINT</tt>.</dd>
<dt>bf</dt>
<dd>Pointer to the <tt>UINT</tt> variable to return number of bytes forwarded.</dd>
</dl>
</div>


<div class="para ret">
<h4>Return Values</h4>
<p>
<a href="rc.html#ok">FR_OK</a>,
<a href="rc.html#de">FR_DISK_ERR</a>,
<a href="rc.html#ie">FR_INT_ERR</a>,
<a href="rc.html#nr">FR_NOT_READY</a>,
<a href="rc.html#io">FR_INVALID_OBJECT</a>,
<a href="rc.html#tm">FR_TIMEOUT</a>
</p>
</div>


<div class="para desc">
<h4>Description</h4>
<p>The <tt>f_forward()</tt> function reads the data from the file and forward it to the outgoing stream without data buffer. This is suitable for small memory system because it does not require any data buffer at application module. The file pointer of the file object increases in number of bytes forwarded. In case of <tt class="arg">*bf</tt> is less than <tt class="arg">btf</tt> without error, it means the requested bytes could not be transferred due to end of file or stream goes busy during data transfer.</p>
</div>


<div class="para comp">
<h4>QuickInfo</h4>
<p>Available when <tt>_USE_FORWARD == 1</tt> and <tt>_FS_TINY == 1</tt>.</p>
</div>


<div class="para use">
<h4>Example (Audio playback)</h4>
<pre>
<span class="c">/*------------------------------------------------------------------------*/</span>
<span class="c">/* Sample code of data transfer function to be called back from f_forward */</span>
<span class="c">/*------------------------------------------------------------------------*/</span>

UINT out_stream (   <span class="c">/* Returns number of bytes sent or stream status */</span>
    const BYTE *p,  <span class="c">/* Pointer to the data block to be sent */</span>
    UINT btf        <span class="c">/* &gt;0: Transfer call (Number of bytes to be sent). 0: Sense call */</span>
)
{
    UINT cnt = 0;


    if (btf == 0) {     <span class="c">/* Sense call */</span>
        <span class="c">/* Return stream status (0: Busy, 1: Ready) */</span>
        <span class="c">/* When once it returned ready to sense call, it must accept a byte at least */</span>
        <span class="c">/* at subsequent transfer call, or f_forward will fail with FR_INT_ERR. */</span>
        if (FIFO_READY) cnt = 1;
    }
    else {              <span class="c">/* Transfer call */</span>
        do {    <span class="c">/* Repeat while there is any data to be sent and the stream is ready */</span>
            FIFO_PORT = *p++;
            cnt++;
        } while (cnt &lt; btf &amp;&amp; FIFO_READY);
    }

    return cnt;
}


<span class="c">/*------------------------------------------------------------------------*/</span>
<span class="c">/* Sample code using f_forward function                                   */</span>
<span class="c">/*------------------------------------------------------------------------*/</span>

FRESULT play_file (
    char *fn        <span class="c">/* Pointer to the audio file name to be played */</span>
)
{
    FRESULT rc;
    FIL fil;
    UINT dmy;

    <span class="c">/* Open the audio file in read only mode */</span>
    rc = f_open(&amp;fil, fn, FA_READ);
    if (rc) return rc;

    <span class="c">/* Repeat until the file pointer reaches end of the file */</span>
    while (rc == FR_OK &amp;&amp; fil.fptr &lt; fil.fsize) {

        <span class="c">/* any other processes... */</span>

        <span class="c">/* Fill output stream periodically or on-demand */</span>
        rc = f_forward(&amp;fil, out_stream, 1000, &amp;dmy);
    }

    <span class="c">/* Close the file and return */</span>
    f_close(&amp;fil);
    return rc;
}
</pre>
</div>


<div class="para ref">
<h4>See Also</h4>
<p><tt><a href="open.html">f_open</a>, <a href="gets.html">fgets</a>, <a href="write.html">f_write</a>, <a href="close.html">f_close</a>, <a href="sfile.html">FIL</a></tt></p>
</div>

<p class="foot"><a href="../00index_e.html">Return</a></p>
</body>
</html>


================================================
FILE: libraries/UHS_FS/FAT/FatFS/doc/en/getcwd.html
================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="up" title="FatFs" href="../00index_e.html">
<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/getcwd.html">
<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
<title>FatFs - f_getcwd</title>
</head>

<body>

<div class="para func">
<h2>f_getcwd</h2>
<p>The f_getcwd function retrieves the current directory.</p>
<pre>
FRESULT f_getcwd (
  TCHAR* <span class="arg">buff</span>, <span class="c">/* [OUT] Buffer to return path name */</span>
  UINT <span class="arg">len</span>     <span class="c">/* [IN] The length of the buffer */</span>
);
</pre>
</div>

<div class="para arg">
<h4>Parameters</h4>
<dl class="par">
<dt>buff</dt>
<dd>Pointer to the buffer to receive the current directory string.</dd>
<dt>len</dt>
<dd>Size of the buffer in unit of TCHAR.</dd>
</dl>
</div>


<div class="para ret">
<h4>Return Values</h4>
<p>
<a href="rc.html#ok">FR_OK</a>,
<a href="rc.html#de">FR_DISK_ERR</a>,
<a href="rc.html#ie">FR_INT_ERR</a>,
<a href="rc.html#nr">FR_NOT_READY</a>,
<a href="rc.html#ne">FR_NOT_ENABLED</a>,
<a href="rc.html#ns">FR_NO_FILESYSTEM</a>,
<a href="rc.html#tm">FR_TIMEOUT</a>,
<a href="rc.html#nc">FR_NOT_ENOUGH_CORE</a>
</p>
</div>


<div class="para desc">
<h4>Description</h4>
<p>The <tt>f_getcwd()</tt> function retrieves the current directory of the current drive in full path string including drive number.</p>
</div>


<div class="para comp">
<h4>QuickInfo</h4>
<p>Available when <tt>_FS_RPATH == 2</tt>.</p>
</div>


<div class="para ref">
<h4>See Also</h4>
<p><tt><a href="chdrive.html">f_chdrive</a>, <a href="chdir.html">f_chdir</a></tt></p>
</div>

<p class="foot"><a href="../00index_e.html">Return</a></p>
</body>
</html>


================================================
FILE: libraries/UHS_FS/FAT/FatFS/doc/en/getfree.html
================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="up" title="FatFs" href="../00index_e.html">
<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/getfree.html">
<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
<title>FatFs - f_getfree</title>
</head>

<body>

<div class="para func">
<h2>f_getfree</h2>
<p>The f_getfree function gets number of the free clusters.</p>
<pre>
FRESULT f_getfree (
  const TCHAR* <span class="arg">path</span>,  <span class="c">/* [IN] Logical drive number */</span>
  DWORD* <span class="arg">nclst</span>,       <span class="c">/* [OUT] Number of free clusters */</span>
  FATFS** <span class="arg">fatfs</span>       <span class="c">/* [OUT] Corresponding file system object */</span>
);
</pre>
</div>

<div class="para arg">
<h4>Parameters</h4>
<dl class="par">
<dt>path</dt>
<dd>Pinter to the null-terminated string that specifies the <a href="filename.html">logical drive</a>. A null-string means the current drive.</dd>
<dt>nclst</dt>
<dd>Pointer to the <tt>DWORD</tt> variable to store number of free clusters.</dd>
<dt>fatfs</dt>
<dd>Pointer to pointer that to store a pointer to the corresponding file system object.</dd>
</dl>
</div>


<div class="para ret">
<h4>Return Values</h4>
<p>
<a href="rc.html#ok">FR_OK</a>,
<a href="rc.html#de">FR_DISK_ERR</a>,
<a href="rc.html#ie">FR_INT_ERR</a>,
<a href="rc.html#nr">FR_NOT_READY</a>,
<a href="rc.html#id">FR_INVALID_DRIVE</a>,
<a href="rc.html#ne">FR_NOT_ENABLED</a>,
<a href="rc.html#ns">FR_NO_FILESYSTEM</a>,
<a href="rc.html#tm">FR_TIMEOUT</a>
</p>
</div>


<div class="para desc">
<h4>Descriptions</h4>
<p>The <tt>f_getfree()</tt> function gets number of free clusters on the drive. The member <tt>csize</tt> in the file system object is refrecting number of sectors per cluster, so that the free space in unit of sector can be calcurated with this. When FSInfo structure on FAT32 volume is not in sync, this function can return an incorrect free cluster count.</p>
</div>


<div class="para comp">
<h4>QuickInfo</h4>
<p>Available when <tt>_FS_READONLY == 0</tt> and <tt>_FS_MINIMIZE == 0</tt>.</p>
</div>


<div class="para use">
<h4>Example</h4>
<pre>
    FATFS *fs;
    DWORD fre_clust, fre_sect, tot_sect;


    <span class="c">/* Get volume information and free clusters of drive 1 */</span>
    res = f_getfree("1:", &amp;fre_clust, &amp;fs);
    if (res) die(res);

    <span class="c">/* Get total sectors and free sectors */</span>
    tot_sect = (fs->n_fatent - 2) * fs->csize;
    fre_sect = fre_clust * fs->csize;

    <span class="c">/* Print free space in unit of KiB (assuming 512 bytes/sector) */</span>
    printf("%lu KB total drive space.\n%lu KB available.\n",
           tot_sect / 2, fre_sect / 2);
</pre>
</div>


<div class="para ref">
<h4>See Also</h4>
<p><tt><a href="sfatfs.html">FATFS</a></tt></p>
</div>

<p class="foot"><a href="../00index_e.html">Return</a></p>
</body>
</html>


================================================
FILE: libraries/UHS_FS/FAT/FatFS/doc/en/getlabel.html
================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="up" title="FatFs" href="../00index_e.html">
<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/getlabel.html">
<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
<title>FatFs - f_getlabel</title>
</head>

<body>

<div class="para func">
<h2>f_getlabel</h2>
<p>The f_getlabel function returns volume label and volume serial number of a drive.</p>
<pre>
FRESULT f_getlabel (
  const TCHAR* <span class="arg">path</span>,  <span class="c">/* [IN] Path name */</span>
  TCHAR* <span class="arg">buff</span>,        <span class="c">/* [OUT] Volume label */</span>
  DWORD* <span class="arg">sn</span>           <span class="c">/* [OUT] Volume serial number */</span>
);
</pre>
</div>

<div class="para arg">
<h4>Parameters</h4>
<dl class="par">
<dt>path</dt>
<dd>Pointer to the nul-terminated string specifying the logical drive. Null-string specifies the default drive.</dd>
<dt>buff</dt>
<dd>Pointer to the buffer to store the volume label. The buffer size must be at least 12 items. If no volume label, a nul-string will be returned. Set null pointer if this information is not needed.</dd>
<dt>sn</dt>
<dd>Pointer to the <tt>DWORD</tt> variable to store the volume serial number. Set null pointer if this information is not needed.</dd>
</dl>
</div>


<div class="para ret">
<h4>Return Values</h4>
<p>
<a href="rc.html#ok">FR_OK</a>,
<a href="rc.html#de">FR_DISK_ERR</a>,
<a href="rc.html#ie">FR_INT_ERR</a>,
<a href="rc.html#nr">FR_NOT_READY</a>,
<a href="rc.html#id">FR_INVALID_DRIVE</a>,
<a href="rc.html#ne">FR_NOT_ENABLED</a>,
<a href="rc.html#ns">FR_NO_FILESYSTEM</a>,
<a href="rc.html#tm">FR_TIMEOUT</a>
</p>
</div>


<div class="para comp">
<h4>QuickInfo</h4>
<p>Available when <tt>_USE_LABEL == 1</tt>.</p>
</div>


<div class="para use">
<h4>Example</h4>
<pre>
    char str[12];

    <span class="c">/* Get volume label of the default drive */</span>
    f_getlabel("", str, 0);

    <span class="c">/* Get volume label of the drive 2 */</span>
    f_getlabel("2:", str, 0);
</pre>
</div>


<div class="para ref">
<h4>See Also</h4>
<tt><a href="setlabel.html">f_setlabel</a></tt>
</div>


<p class="foot"><a href="../00index_e.html">Return</a></p>
</body>
</html>


================================================
FILE: libraries/UHS_FS/FAT/FatFS/doc/en/gets.html
================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="up" title="FatFs" href="../00index_e.html">
<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/gets.html">
<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
<title>FatFs - f_gets</title>
</head>

<body>

<div class="para func">
<h2>f_gets</h2>
<p>The f_gets reads a string from the file.</p>
<pre>
TCHAR* f_gets (
  TCHAR* <span class="arg">buff</span>, <span class="c">/* [OUT] Read buffer */</span>
  int <span class="arg">len</span>,     <span class="c">/* [IN] Size of the read buffer */</span>
  FIL* <span class="arg">fp</span>      <span class="c">/* [IN] File object */</span>
);
</pre>
</div>

<div class="para arg">
<h4>Parameters</h4>
<dl class="par">
<dt>str</dt>
<dd>Pointer to read buffer to store the read string.</dd>
<dt>len</dt>
<dd>Size of the read buffer in unit of character.</dd>
<dt>fp</dt>
<dd>Pointer to the open file object structure.</dd>
</dl>
</div>


<div class="para ret">
<h4>Return Values</h4>
<p>When the function succeeded, <tt class="arg">str</tt> will be returuned.</p>
</div>


<div class="para desc">
<h4>Description</h4>
<p>The <tt>f_gets()</tt> function is a wrapper function of <a href="read.html">f_read()</a> function. The read operation continues until a <tt>'\n'</tt> is stored, reached end of the file or the buffer is filled with <tt>len - 1</tt> characters. The read string is terminated with a <tt>'\0'</tt>. When no character to read or any error occurred during read operation, it returns a null pointer. The status of eof and error can be examined with <tt>f_eof()</tt> and <tt>f_error()</tt> macros.</p>
<p>When the FatFs is configured to Unicode API (<tt>_LFN_UNICODE == 1</tt>), the file is read in assumption of UTF-8 encoding and stored it to the buffer in UCS-2. If not the case, the file will be read in one byte per character without any code conversion.</p>
</div>


<div class="para comp">
<h4>QuickInfo</h4>
<p>Available when <tt>_USE_STRFUNC</tt> is 1 or 2. When it is set to 2, <tt>'\r'</tt>s contained in the file are stripped out.</p>
</div>


<div class="para ref">
<h4>See Also</h4>
<p><tt><a href="open.html">f_open</a>, <a href="read.html">f_read</a>, <a href="putc.html">f_putc</a>, <a href="puts.html">f_puts</a>, <a href="printf.html">f_printf</a>, <a href="close.html">f_close</a>, <a href="sfile.html">FIL</a></tt></p>
</div>

<p class="foot"><a href="../00index_e.html">Return</a></p>
</body>
</html>


================================================
FILE: libraries/UHS_FS/FAT/FatFS/doc/en/lseek.html
================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="up" title="FatFs" href="../00index_e.html">
<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/lseek.html">
<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
<title>FatFs - f_lseek</title>
</head>

<body>

<div class="para func">
<h2>f_lseek</h2>
<p>The f_lseek function moves the file read/write pointer of an open file object. It can also be used to increase the file size (cluster pre-allocation). </p>

<pre>
FRESULT f_lseek (
  FIL* <span class="arg">fp</span>,   <span class="c">/* [IN] File object */</span>
  DWORD <span class="arg">ofs</span>  <span class="c">/* [IN] File offset in unit of byte */</span>
);
</pre>
</div>

<div class="para arg">
<h4>Parameters</h4>
<dl class="par">
<dt>fp</dt>
<dd>Pointer to the open file object.</dd>
<dt>ofs</dt>
<dd>Number of bytes where from start of the file</dd>
</dl>
</div>


<div class="para ret">
<h4>Return Values</h4>
<p>
<a href="rc.html#ok">FR_OK</a>,
<a href="rc.html#de">FR_DISK_ERR</a>,
<a href="rc.html#ie">FR_INT_ERR</a>,
<a href="rc.html#nr">FR_NOT_READY</a>,
<a href="rc.html#io">FR_INVALID_OBJECT</a>,
<a href="rc.html#tm">FR_TIMEOUT</a>
</p>
</div>


<div class="para desc">
<h4>Description</h4>
<p>The <tt>f_lseek()</tt> function moves the file read/write pointer of an open file. The offset can be specified in only origin from top of the file. When an offset above the file size is specified in write mode, the file size is increased to the offset and the data in the expanded area is undefined. This is suitable to create a large file quickly, for fast write operation. After the <tt>f_lseek()</tt> function succeeded, current read/write pointer should be checked in order to make sure the read/write pointer has been moved correctry. In case of the current read/write pointer is not the expected value, either of following has been occurred.</p>
<ul>
<li>End of file. The specified <tt class="arg">ofs</tt> was clipped at end of the file because the file has been opened in read-only mode.</li>
<li>Disk full. There is insufficient free space on the volume to expand the file size.</li>
</ul>
<p>Fast seek feature is enabled when <tt>_USE_FASTSEEK</tt> is set to 1 and the member <tt>cltbl</tt> in the file object is not NULL. This feature enables fast backward/long seek operations without FAT access by using cluster link map table (CLMT). It is also applied to f_read/f_write functions. In this mode, the file size cannot be increased by <tt>f_write()/f_lseek()</tt> functions.</p>
<p>The CLMT must be created in the user defined <tt>DWORD</tt> array prior to use fast seek feature. To create the CLMT, set pointer to the <tt>DWORD</tt> array to the member <tt>cltbl</tt> in the file object, set the array size in unit of items into the first item and call the <tt>f_lseek()</tt> function with <tt class="arg">ofs</tt><tt> = CREATE_LINKMAP</tt>. After the function succeeded and CLMT is created, no FAT access is occurred in subsequent <tt>f_read()/f_write()/f_lseek()</tt> functions to the file. If the function failed with <tt>FR_NOT_ENOUGH_CORE</tt>, the given array size is insufficient for the file and number of items required is returned into the first item of the array. The required array size is (number of fragments + 1) * 2 items. For example, when the file is fragmented in 5, 12 items will be required for the CLMT.</p>
</div>


<div class="para comp">
<h4>Quick
Download .txt
gitextract_yvv64a9_/

├── .gitattributes
├── .gitignore
├── .gitmodules
├── LICENSE
├── Makefile
├── README.md
├── libraries/
│   ├── ISR_safe_memory/
│   │   ├── ISR_safe_memory.h
│   │   ├── malloc.c
│   │   ├── mlock.c
│   │   ├── sectionname.h
│   │   └── stdlib_private.h
│   ├── UHS_ByteBuffer/
│   │   ├── UHS_ByteBuffer.cpp
│   │   ├── UHS_ByteBuffer.h
│   │   └── examples/
│   │       └── ByteBufferExample.ino
│   ├── UHS_FS/
│   │   ├── FAT/
│   │   │   ├── FAT.cpp
│   │   │   ├── FAT.h
│   │   │   └── FatFS/
│   │   │       ├── doc/
│   │   │       │   ├── 00index_e.html
│   │   │       │   ├── 00index_j.html
│   │   │       │   ├── css_e.css
│   │   │       │   ├── css_j.css
│   │   │       │   ├── en/
│   │   │       │   │   ├── appnote.html
│   │   │       │   │   ├── chdir.html
│   │   │       │   │   ├── chdrive.html
│   │   │       │   │   ├── chmod.html
│   │   │       │   │   ├── close.html
│   │   │       │   │   ├── dinit.html
│   │   │       │   │   ├── dioctl.html
│   │   │       │   │   ├── dread.html
│   │   │       │   │   ├── dstat.html
│   │   │       │   │   ├── dwrite.html
│   │   │       │   │   ├── eof.html
│   │   │       │   │   ├── error.html
│   │   │       │   │   ├── fattime.html
│   │   │       │   │   ├── fdisk.html
│   │   │       │   │   ├── filename.html
│   │   │       │   │   ├── forward.html
│   │   │       │   │   ├── getcwd.html
│   │   │       │   │   ├── getfree.html
│   │   │       │   │   ├── getlabel.html
│   │   │       │   │   ├── gets.html
│   │   │       │   │   ├── lseek.html
│   │   │       │   │   ├── mkdir.html
│   │   │       │   │   ├── mkfs.html
│   │   │       │   │   ├── mount.html
│   │   │       │   │   ├── open.html
│   │   │       │   │   ├── opendir.html
│   │   │       │   │   ├── printf.html
│   │   │       │   │   ├── putc.html
│   │   │       │   │   ├── puts.html
│   │   │       │   │   ├── rc.html
│   │   │       │   │   ├── read.html
│   │   │       │   │   ├── readdir.html
│   │   │       │   │   ├── rename.html
│   │   │       │   │   ├── sdir.html
│   │   │       │   │   ├── setlabel.html
│   │   │       │   │   ├── sfatfs.html
│   │   │       │   │   ├── sfile.html
│   │   │       │   │   ├── sfileinfo.html
│   │   │       │   │   ├── size.html
│   │   │       │   │   ├── stat.html
│   │   │       │   │   ├── sync.html
│   │   │       │   │   ├── tell.html
│   │   │       │   │   ├── truncate.html
│   │   │       │   │   ├── unlink.html
│   │   │       │   │   ├── utime.html
│   │   │       │   │   └── write.html
│   │   │       │   ├── ja/
│   │   │       │   │   ├── appnote.html
│   │   │       │   │   ├── chdir.html
│   │   │       │   │   ├── chdrive.html
│   │   │       │   │   ├── chmod.html
│   │   │       │   │   ├── close.html
│   │   │       │   │   ├── dinit.html
│   │   │       │   │   ├── dioctl.html
│   │   │       │   │   ├── dread.html
│   │   │       │   │   ├── dstat.html
│   │   │       │   │   ├── dwrite.html
│   │   │       │   │   ├── eof.html
│   │   │       │   │   ├── error.html
│   │   │       │   │   ├── fattime.html
│   │   │       │   │   ├── fdisk.html
│   │   │       │   │   ├── filename.html
│   │   │       │   │   ├── forward.html
│   │   │       │   │   ├── getcwd.html
│   │   │       │   │   ├── getfree.html
│   │   │       │   │   ├── getlabel.html
│   │   │       │   │   ├── gets.html
│   │   │       │   │   ├── lseek.html
│   │   │       │   │   ├── mkdir.html
│   │   │       │   │   ├── mkfs.html
│   │   │       │   │   ├── mount.html
│   │   │       │   │   ├── open.html
│   │   │       │   │   ├── opendir.html
│   │   │       │   │   ├── printf.html
│   │   │       │   │   ├── putc.html
│   │   │       │   │   ├── puts.html
│   │   │       │   │   ├── rc.html
│   │   │       │   │   ├── read.html
│   │   │       │   │   ├── readdir.html
│   │   │       │   │   ├── rename.html
│   │   │       │   │   ├── sdir.html
│   │   │       │   │   ├── setlabel.html
│   │   │       │   │   ├── sfatfs.html
│   │   │       │   │   ├── sfile.html
│   │   │       │   │   ├── sfileinfo.html
│   │   │       │   │   ├── size.html
│   │   │       │   │   ├── stat.html
│   │   │       │   │   ├── sync.html
│   │   │       │   │   ├── tell.html
│   │   │       │   │   ├── truncate.html
│   │   │       │   │   ├── unlink.html
│   │   │       │   │   ├── utime.html
│   │   │       │   │   └── write.html
│   │   │       │   └── updates.txt
│   │   │       └── src/
│   │   │           ├── 00readme.txt
│   │   │           ├── diskio.h
│   │   │           ├── ff.c
│   │   │           ├── ff.h
│   │   │           ├── ffconf.h
│   │   │           ├── integer.h
│   │   │           └── option/
│   │   │               ├── cc932.h
│   │   │               ├── cc936.h
│   │   │               ├── cc949.h
│   │   │               ├── cc950.h
│   │   │               ├── ccsbcs.h
│   │   │               ├── syscall.h
│   │   │               └── unicode.h
│   │   ├── PCpartition/
│   │   │   ├── PCPartition.cpp
│   │   │   └── PCPartition.h
│   │   ├── README.md
│   │   ├── UHS_FS.h
│   │   ├── UHS_FS_INLINE.h
│   │   ├── examples/
│   │   │   ├── UHS_FS_SPI_SDCARD/
│   │   │   │   ├── UHS_FS_SPI_SDCARD_DEMO/
│   │   │   │   │   ├── Makefile
│   │   │   │   │   └── UHS_FS_SPI_SDCARD_DEMO.ino
│   │   │   │   └── UHS_FS_SPI_SDCARD_DEMO_LABEL/
│   │   │   │       ├── Makefile
│   │   │   │       └── UHS_FS_SPI_SDCARD_DEMO_LABEL.ino
│   │   │   ├── UHS_KINETIS_EHCI/
│   │   │   │   ├── IOCTL/
│   │   │   │   │   ├── IOCTL.ino
│   │   │   │   │   └── Makefile
│   │   │   │   └── UHS_FS_NEW_DEMO/
│   │   │   │       ├── Makefile
│   │   │   │       └── UHS_FS_NEW_DEMO.ino
│   │   │   ├── UHS_KINETIS_FS_HOST/
│   │   │   │   └── UHS_FS_NEW_DEMO/
│   │   │   │       ├── Makefile
│   │   │   │       └── UHS_FS_NEW_DEMO.ino
│   │   │   └── USB_HOST_SHIELD/
│   │   │       ├── UHS_FS_ANY_LABEL/
│   │   │       │   ├── Makefile
│   │   │       │   └── UHS_FS_ANY_LABEL.ino
│   │   │       └── UHS_FS_NEW_DEMO/
│   │   │           ├── Makefile
│   │   │           └── UHS_FS_NEW_DEMO.ino
│   │   └── fcntl.h
│   ├── UHS_host/
│   │   ├── UHS_ADK/
│   │   │   ├── UHS_ADK.h
│   │   │   ├── UHS_ADK_INLINE.h
│   │   │   └── examples/
│   │   │       ├── UHS_KINETIS_FS_HOST/
│   │   │       │   ├── ArduinoBlinkLED/
│   │   │       │   │   ├── ArduinoBlinkLED.ino
│   │   │       │   │   └── Makefile
│   │   │       │   └── demokit_20/
│   │   │       │       ├── Makefile
│   │   │       │       └── demokit_20.ino
│   │   │       └── USB_HOST_SHIELD/
│   │   │           ├── ArduinoBlinkLED/
│   │   │           │   ├── ArduinoBlinkLED.ino
│   │   │           │   └── Makefile
│   │   │           └── demokit_20/
│   │   │               ├── Makefile
│   │   │               └── demokit_20.ino
│   │   ├── UHS_BULK_STORAGE/
│   │   │   ├── UHS_BULK_STORAGE.h
│   │   │   ├── UHS_BULK_STORAGE_INLINE.h
│   │   │   ├── UHS_SCSI.h
│   │   │   └── examples/
│   │   │       ├── UHS_KINETIS_FS_HOST/
│   │   │       │   └── TEST_BULK_K/
│   │   │       │       ├── Makefile
│   │   │       │       └── TEST_BULK_K.ino
│   │   │       └── USB_HOST_SHIELD/
│   │   │           └── TEST_BULK/
│   │   │               ├── Makefile
│   │   │               └── TEST_BULK.ino
│   │   ├── UHS_CDC/
│   │   │   └── UHS_CDC.h
│   │   ├── UHS_CDC_ACM/
│   │   │   ├── UHS_CDC_ACM.h
│   │   │   ├── UHS_CDC_ACM_FTDI.h
│   │   │   ├── UHS_CDC_ACM_INLINE.h
│   │   │   ├── UHS_CDC_ACM_PROLIFIC.h
│   │   │   ├── UHS_CDC_ACM_XR21B1411.h
│   │   │   └── examples/
│   │   │       ├── UHS_KINETIS_EHCI/
│   │   │       │   └── acm_terminal/
│   │   │       │       ├── Makefile
│   │   │       │       └── acm_terminal.ino
│   │   │       ├── UHS_KINETIS_FS_HOST/
│   │   │       │   ├── acm_terminal/
│   │   │       │   │   ├── Makefile
│   │   │       │   │   └── acm_terminal.ino
│   │   │       │   └── buffered_acm_terminal/
│   │   │       │       ├── Makefile
│   │   │       │       └── buffered_acm_terminal.ino
│   │   │       └── USB_HOST_SHIELD/
│   │   │           ├── acm_terminal/
│   │   │           │   ├── Makefile
│   │   │           │   └── acm_terminal.ino
│   │   │           └── buffered_acm_terminal/
│   │   │               ├── Makefile
│   │   │               └── buffered_acm_terminal.ino
│   │   ├── UHS_HID/
│   │   │   ├── HIDBOOT/
│   │   │   │   ├── UHS_HIDRAWBOOT_KEYBOARD.h
│   │   │   │   └── UHS_HIDRAWBOOT_MOUSE.h
│   │   │   ├── UHS_HID.h
│   │   │   ├── UHS_HID_INLINE.h
│   │   │   └── examples/
│   │   │       └── USB_HOST_SHIELD/
│   │   │           ├── UHS_HID_KB_MOUSE/
│   │   │           │   ├── Makefile
│   │   │           │   └── UHS_HID_KB_MOUSE.ino
│   │   │           └── UHS_HID_RAW/
│   │   │               ├── Makefile
│   │   │               └── UHS_HID_RAW.ino
│   │   ├── UHS_HUB/
│   │   │   ├── UHS_HUB.h
│   │   │   └── UHS_HUB_INLINE.h
│   │   ├── UHS_KINETIS_EHCI/
│   │   │   ├── UHS_KINETIS_EHCI.h
│   │   │   ├── UHS_KINETIS_EHCI_INLINE.h
│   │   │   └── examples/
│   │   │       └── KINETIS_EHCI_TEST/
│   │   │           ├── KINETIS_EHCI_TEST.ino
│   │   │           └── Makefile
│   │   ├── UHS_KINETIS_FS_HOST/
│   │   │   ├── UHS_KINETIS_FS_HOST.h
│   │   │   ├── UHS_KINETIS_FS_HOST_INLINE.h
│   │   │   └── examples/
│   │   │       ├── KINETIS_DEV_DESC/
│   │   │       │   ├── KINETIS_DEV_DESC.ino
│   │   │       │   └── Makefile
│   │   │       ├── KINETIS_TEST/
│   │   │       │   ├── KINETIS_TEST.ino
│   │   │       │   └── Makefile
│   │   │       └── TEST_KINETIS_BULK/
│   │   │           ├── Makefile
│   │   │           └── TEST_KINETIS_BULK.ino
│   │   ├── UHS_MIDI/
│   │   │   ├── UHS_MIDI.h
│   │   │   ├── UHS_MIDI_INLINE.h
│   │   │   └── examples/
│   │   │       ├── UHS_KINETIS_EHCI/
│   │   │       │   ├── USB_MIDI_Converter/
│   │   │       │   │   ├── Makefile
│   │   │       │   │   └── USB_MIDI_Converter.ino
│   │   │       │   └── USB_MIDI_dump/
│   │   │       │       ├── Makefile
│   │   │       │       └── USB_MIDI_dump.ino
│   │   │       ├── UHS_KINETIS_FS_HOST/
│   │   │       │   ├── USB_MIDI_Converter/
│   │   │       │   │   ├── Makefile
│   │   │       │   │   └── USB_MIDI_Converter.ino
│   │   │       │   └── USB_MIDI_dump/
│   │   │       │       ├── Makefile
│   │   │       │       └── USB_MIDI_dump.ino
│   │   │       └── USB_HOST_SHIELD/
│   │   │           ├── USB_MIDI_Converter/
│   │   │           │   ├── Makefile
│   │   │           │   └── USB_MIDI_Converter.ino
│   │   │           └── USB_MIDI_dump/
│   │   │               └── USB_MIDI_dump.ino
│   │   ├── UHS_PRINTER/
│   │   │   ├── UHS_PRINTER.h
│   │   │   ├── UHS_PRINTER_INLINE.h
│   │   │   └── examples/
│   │   │       └── USB_HOST_SHIELD/
│   │   │           ├── printer_demo/
│   │   │           │   ├── Makefile
│   │   │           │   └── printer_demo.ino
│   │   │           ├── printer_demo_epson_protocol/
│   │   │           │   ├── Makefile
│   │   │           │   ├── printer_demo_epson_protocol.ino
│   │   │           │   └── test_image.h
│   │   │           └── printer_demo_escP2_protocol/
│   │   │               ├── Makefile
│   │   │               ├── printer_demo_escP2_protocol.ino
│   │   │               └── test_image.h
│   │   ├── UHS_UNOFFICIAL_IDs.h
│   │   ├── UHS_USB_IDs.h
│   │   ├── UHS_UsbCore.h
│   │   ├── UHS_address.h
│   │   ├── UHS_hexdump.h
│   │   ├── UHS_host.h
│   │   ├── UHS_host_INLINE.h
│   │   ├── UHS_macros.h
│   │   ├── UHS_message.h
│   │   ├── UHS_printf_HELPER.h
│   │   ├── UHS_printhex.h
│   │   ├── UHS_settings.h
│   │   ├── UHS_usb_ch9.h
│   │   ├── UHS_usbhost.h
│   │   ├── UHS_util_INLINE.h
│   │   ├── USB_HOST_SHIELD/
│   │   │   ├── UHS_max3421e.h
│   │   │   ├── USB_HOST_SHIELD.h
│   │   │   ├── USB_HOST_SHIELD_INLINE.h
│   │   │   └── examples/
│   │   │       ├── TWO_HOSTS_BULK/
│   │   │       │   ├── Makefile
│   │   │       │   └── TWO_HOSTS_BULK.ino
│   │   │       └── board_qc/
│   │   │           ├── Makefile
│   │   │           └── board_qc.ino
│   │   ├── macro_logic.h
│   │   └── make-USB_IDs.py
│   └── dyn_SWI/
│       ├── SWI_INLINE.h
│       └── dyn_SWI.h
└── nbproject/
    ├── configurations.xml
    └── project.xml
Download .txt
SYMBOL INDEX (442 symbols across 56 files)

FILE: libraries/ISR_safe_memory/malloc.c
  type __freelist (line 95) | struct __freelist
  type __freelist (line 100) | struct __freelist
  type __freelist (line 111) | struct __freelist
  type __freelist (line 112) | struct __freelist
  type __freelist (line 156) | struct __freelist
  type __freelist (line 176) | struct __freelist
  type __freelist (line 206) | struct __freelist
  function _free (line 217) | static
  type __freelist (line 304) | struct __freelist
  type __freelist (line 316) | struct __freelist
  type __freelist (line 333) | struct __freelist
  type __freelist (line 334) | struct __freelist
  type __freelist (line 336) | struct __freelist
  type __freelist (line 349) | struct __freelist
  type __freelist (line 355) | struct __freelist
  type __freelist (line 358) | struct __freelist
  function ATTRIBUTE_CLIB_SECTION (line 415) | ATTRIBUTE_CLIB_SECTION
  function ATTRIBUTE_CLIB_SECTION (line 426) | ATTRIBUTE_CLIB_SECTION
  function ATTRIBUTE_CLIB_SECTION (line 435) | ATTRIBUTE_CLIB_SECTION

FILE: libraries/ISR_safe_memory/mlock.c
  function A__DSB (line 35) | __attribute__((always_inline)) static inline void A__DSB(void) {
  function A__DSB (line 40) | __attribute__((always_inline)) static inline void A__DSB(void) {
  function __can_interrupt (line 106) | static inline  void __can_interrupt(uint8_t status) {
  function __dont_interrupt (line 112) | static inline unsigned char __dont_interrupt(void) {
  function __malloc_lock (line 129) | void
  function __malloc_unlock (line 157) | void
  function mlock_null (line 180) | int mlock_null(void) {

FILE: libraries/ISR_safe_memory/stdlib_private.h
  type __freelist (line 64) | struct __freelist {
  type __freelist (line 72) | struct __freelist

FILE: libraries/UHS_ByteBuffer/UHS_ByteBuffer.h
  function class (line 27) | class UHS_ByteBuffer {

FILE: libraries/UHS_FS/FAT/FAT.cpp
  function RTClock (line 34) | uint32_t RTClock() {
  function DSTATUS (line 115) | DSTATUS PFAT::disk_initialize(void) {
  function DSTATUS (line 119) | DSTATUS PFAT::disk_status(void) {
  function DRESULT (line 127) | DRESULT PFAT::disk_read(FBYTE *buff, DWORD sector, FBYTE count) {
  function DRESULT (line 133) | DRESULT PFAT::disk_write(const FBYTE *buff, DWORD sector, FBYTE count) {
  function DRESULT (line 139) | DRESULT PFAT::disk_ioctl(FBYTE cmd, void* buff) {
  function disk_timerproc (line 228) | void disk_timerproc(void) {
  function DSTATUS (line 258) | DSTATUS CPP_PFAT_disk_initialize(PFAT *pfat) {
  function DSTATUS (line 262) | DSTATUS CPP_PFAT_disk_status(PFAT *pfat) {
  function DRESULT (line 266) | DRESULT CPP_PFAT_disk_read(PFAT *pfat, FBYTE *buff, DWORD sector, FBYTE ...
  function DRESULT (line 270) | DRESULT CPP_PFAT_disk_write(PFAT *pfat, const FBYTE *buff, DWORD sector,...
  function DRESULT (line 274) | DRESULT CPP_PFAT_disk_ioctl(PFAT *pfat, FBYTE cmd, void *buff) {
  function CPP_PFAT_get_fattime (line 278) | uint32_t CPP_PFAT_get_fattime(PFAT *pfat) {

FILE: libraries/UHS_FS/FAT/FAT.h
  type fat_boot (line 41) | struct fat_boot {
  type fat_boot_t (line 161) | typedef struct fat_boot fat_boot_t;
  type fat32_boot (line 170) | struct fat32_boot {
  type fat32_boot_t (line 316) | typedef struct fat32_boot fat32_boot_t;
  type fat32_fsinfo (line 329) | struct fat32_fsinfo {
  type fat32_fsinfo_t (line 357) | typedef struct fat32_fsinfo fat32_fsinfo_t;
  type directoryEntry (line 406) | struct directoryEntry {
  type dir_t (line 459) | typedef struct directoryEntry dir_t;
  function DIR_IS_LONG_NAME (line 491) | static inline uint8_t DIR_IS_LONG_NAME(const dir_t* dir) {
  function DIR_IS_FILE (line 502) | static inline uint8_t DIR_IS_FILE(const dir_t* dir) {
  function DIR_IS_SUBDIR (line 511) | static inline uint8_t DIR_IS_SUBDIR(const dir_t* dir) {
  function DIR_IS_FILE_OR_SUBDIR (line 520) | static inline uint8_t DIR_IS_FILE_OR_SUBDIR(const dir_t* dir) {
  function class (line 524) | class PFAT {

FILE: libraries/UHS_FS/FAT/FatFS/src/diskio.h
  type FBYTE (line 17) | typedef FBYTE DSTATUS;
  type DRESULT (line 20) | typedef enum {
  type PFAT (line 32) | struct PFAT
  type PFAT (line 33) | struct PFAT
  type PFAT (line 34) | struct PFAT
  type PFAT (line 35) | struct PFAT
  type PFAT (line 36) | struct PFAT
  type PFAT (line 37) | struct PFAT
  type PFAT (line 38) | struct PFAT

FILE: libraries/UHS_FS/FAT/FatFS/src/ff.c
  type FILESEM (line 158) | typedef struct {
  function mem_cpy (line 555) | static void mem_cpy(void* dst, const void* src, UINT cnt) {
  function mem_set (line 578) | static void mem_set(void* dst, int val, UINT cnt) {
  function mem_cmp (line 593) | static int mem_cmp(const void* dst, const void* src, UINT cnt) {
  function lock_fs (line 647) | static int lock_fs(FATFS *fs) {
  function unlock_fs (line 657) | static void unlock_fs(FATFS *fs, FRESULT res) {
  function FRESULT (line 679) | static FRESULT chk_lock(DIR* dj, int acc) {
  function enq_lock (line 704) | static int enq_lock(void) {
  function UINT (line 718) | static UINT inc_lock(DIR* dj, int acc) {
  function FRESULT (line 749) | static FRESULT dec_lock(UINT i) {
  function clear_lock (line 772) | static void clear_lock(FATFS *fs) {
  function FRESULT (line 790) | static FRESULT sync_window(FATFS *fs) {
  function FRESULT (line 819) | static FRESULT move_window(FATFS *fs, DWORD sector) {
  function FRESULT (line 844) | static FRESULT sync_fs(FATFS *fs) {
  function FRESULT (line 871) | FRESULT commit_fs(FATFS *fs) {
  function DWORD (line 884) | DWORD clust2sect(FATFS *fs, DWORD clst) {
  function DWORD (line 898) | DWORD get_fat(/*  */
  function FRESULT (line 945) | FRESULT put_fat(FATFS *fs, DWORD clst, DWORD val) {
  function FRESULT (line 1005) | static FRESULT remove_chain(FATFS *fs, DWORD clst) {
  function DWORD (line 1063) | static DWORD create_chain(FATFS *fs, DWORD clst) {
  function DWORD (line 1119) | static DWORD clmt_clust(FIL* fp, DWORD ofs) {
  function FRESULT (line 1145) | static FRESULT dir_sdi(DIR *dj, WORD idx) {
  function FRESULT (line 1188) | static FRESULT dir_next(DIR *dj, int stretch) {
  function FRESULT (line 1254) | static FRESULT dir_alloc(DIR* dj, UINT nent) {
  function DWORD (line 1286) | static DWORD ld_clust(
  function st_clust (line 1308) | static void st_clust(FBYTE *dir, DWORD cl) {
  function cmp_lfn (line 1335) | static int cmp_lfn(WCHAR *lfnbuf, FBYTE *dir) {
  function pick_lfn (line 1367) | static
  function fit_lfn (line 1406) | static void fit_lfn(const WCHAR *lfnbuf, FBYTE *dir, FBYTE ord, FBYTE su...
  function gen_numname (line 1441) | void gen_numname(FBYTE *dst, const FBYTE *src, const WCHAR *lfn, WORD se...
  function FBYTE (line 1485) | static FBYTE sum_sfn(const FBYTE *dir) {
  function FRESULT (line 1502) | static FRESULT dir_find(DIR *dj) {
  function FRESULT (line 1568) | static FRESULT dir_read(DIR *dj, int vol) {
  function FRESULT (line 1632) | static FRESULT dir_register(DIR *dj) {
  function FRESULT (line 1712) | static FRESULT dir_remove(DIR *dj) {
  function FRESULT (line 1754) | static FRESULT create_name(DIR *dj, const TCHAR **path) {
  function get_fileinfo (line 1980) | static void get_fileinfo(DIR *dj, FILINFO *fno) {
  function FRESULT (line 2063) | static FRESULT follow_path(DIR *dj, const TCHAR *path) {
  function FBYTE (line 2123) | static FBYTE check_fs(FATFS *fs, DWORD sect) {
  function FRESULT (line 2146) | static FRESULT chk_mounted(const TCHAR **path, FATFS **rfs, FBYTE wmode) {
  function FRESULT (line 2319) | static FRESULT validate(void* obj) {
  function FBYTE (line 2348) | FBYTE f_next_mount(void) {
  function FRESULT (line 2362) | FRESULT f_stat_mount(FBYTE vol) {
  function FRESULT (line 2377) | FRESULT f_mount(FBYTE vol, FATFS *fs) {
  function FRESULT (line 2533) | FRESULT f_open(FIL *fp, const TCHAR *path, FBYTE mode) {
  function FRESULT (line 2666) | FRESULT f_read(FIL *fp, void *buff, UINT btr, UINT *br) {
  function FRESULT (line 2764) | FRESULT f_sync_fs(FATFS *fs) {
  function FRESULT (line 2778) | FRESULT FIX_OPTIMZERBUG f_write(FIL *fp, const void *buff, UINT btw, UIN...
  function FRESULT (line 2895) | FRESULT f_sync(FIL *fp) {
  function FRESULT (line 2939) | FRESULT f_close(FIL *fp) {
  function FRESULT (line 2990) | FRESULT f_chdrive(FBYTE drv) {
  function FRESULT (line 3004) | FRESULT f_chdir(const TCHAR *path) {
  function FRESULT (line 3041) | FRESULT f_getcwd(TCHAR *buff, UINT len) {
  function FRESULT (line 3117) | FRESULT f_lseek(FIL *fp, DWORD ofs) {
  function FRESULT (line 3279) | FRESULT f_clseek(FIL* fp, DWORD ofs, FBYTE whence) {
  function FRESULT (line 3312) | FRESULT f_opendir(DIR *dj, const TCHAR *path) {
  function FRESULT (line 3359) | FRESULT f_readdir(DIR *dj, FILINFO *fno) {
  function FRESULT (line 3400) | FRESULT f_stat(const TCHAR *path, FILINFO *fno) {
  function FRESULT (line 3433) | FRESULT f_getfree(const TCHAR *path, DWORD *nclst, FATFS **fatfs) {
  function FRESULT (line 3509) | FRESULT f_truncate(FIL *fp) {
  function FRESULT (line 3554) | FRESULT f_unlink(
  function FRESULT (line 3625) | FRESULT f_mkdir(
  function FRESULT (line 3702) | FRESULT f_chmod(const TCHAR *path, FBYTE value, FBYTE mask) {
  function FRESULT (line 3739) | FRESULT f_utime(const TCHAR *path, const FILINFO *fno) {
  function FRESULT (line 3779) | FRESULT f_rename(const TCHAR *path_old, const TCHAR *path_new) {
  function FRESULT (line 3859) | FRESULT f_getlabel(const TCHAR* path, TCHAR* label, DWORD* sn) {
  function FRESULT (line 3920) | FRESULT f_setlabel(const TCHAR* label) {
  function FRESULT (line 4014) | FRESULT f_forward(
  function FRESULT (line 4081) | FRESULT f_mkfs(FBYTE vol, FBYTE sfd, UINT au) {
  function FRESULT (line 4321) | FRESULT f_fdisk(
  function TCHAR (line 4397) | TCHAR* f_gets(
  function f_putc (line 4452) | int f_putc(
  function f_puts (line 4496) | int f_puts(
  function f_printf (line 4517) | int f_printf(

FILE: libraries/UHS_FS/FAT/FatFS/src/ff.h
  type PARTITION (line 49) | typedef struct {
  type TCHAR (line 80) | typedef char TCHAR;
  type FATFS (line 89) | typedef struct {
  type FIL (line 127) | typedef struct {
  type DIR (line 154) | typedef struct {
  type FILINFO (line 171) | typedef struct {
  type FRESULT (line 185) | typedef enum {
  type partitionTable (line 380) | struct partitionTable {
  type part_t (line 432) | typedef struct partitionTable part_t;
  type masterBootRecord (line 442) | struct masterBootRecord {
  type mbr_t (line 457) | typedef struct masterBootRecord mbr_t;

FILE: libraries/UHS_FS/FAT/FatFS/src/integer.h
  type INT (line 17) | typedef int16_t INT;
  type UINT (line 18) | typedef uint16_t UINT;
  type CHAR (line 21) | typedef int8_t CHAR;
  type UCHAR (line 22) | typedef uint8_t UCHAR;
  type FBYTE (line 23) | typedef uint8_t FBYTE;
  type SHORT (line 26) | typedef int16_t SHORT;
  type USHORT (line 27) | typedef uint16_t USHORT;
  type WORD (line 28) | typedef uint16_t WORD;
  type WCHAR (line 29) | typedef uint16_t WCHAR;
  type LONG (line 32) | typedef int32_t LONG;
  type ULONG (line 33) | typedef uint32_t ULONG;
  type DWORD (line 34) | typedef uint32_t DWORD;

FILE: libraries/UHS_FS/FAT/FatFS/src/option/cc932.h
  function WCHAR (line 3732) | WCHAR ff_convert(/* Converted code, 0 means conversion error */
  function WCHAR (line 3807) | WCHAR ff_wtoupper(/* Upper converted character */

FILE: libraries/UHS_FS/FAT/FatFS/src/option/cc936.h
  function WCHAR (line 10930) | WCHAR ff_convert(/* Converted code, 0 means conversion error */
  function WCHAR (line 10964) | WCHAR ff_wtoupper(/* Upper converted character */

FILE: libraries/UHS_FS/FAT/FatFS/src/option/cc949.h
  function WCHAR (line 8559) | WCHAR ff_convert(/* Converted code, 0 means conversion error */
  function WCHAR (line 8593) | WCHAR ff_wtoupper(/* Upper converted character */

FILE: libraries/UHS_FS/FAT/FatFS/src/option/cc950.h
  function WCHAR (line 6786) | WCHAR ff_convert(/* Converted code, 0 means conversion error */
  function WCHAR (line 6820) | WCHAR ff_wtoupper(/* Upper converted character */

FILE: libraries/UHS_FS/FAT/FatFS/src/option/ccsbcs.h
  function WCHAR (line 503) | WCHAR ff_convert(/* Converted character, Returns zero on error */
  function WCHAR (line 527) | WCHAR ff_wtoupper(/* Upper converted character */

FILE: libraries/UHS_FS/FAT/FatFS/src/option/syscall.h
  function ff_cre_syncobj (line 25) | int ff_cre_syncobj(/* 1:Function succeeded, 0:Could not create due to an...
  function ff_del_syncobj (line 61) | int ff_del_syncobj(/* 1:Function succeeded, 0:Could not delete due to an...
  function ff_req_grant (line 89) | int ff_req_grant(/* TRUE:Got a grant to access the volume, FALSE:Could n...
  function ff_rel_grant (line 115) | void ff_rel_grant(
  function ff_memfree (line 152) | void ff_memfree(

FILE: libraries/UHS_FS/PCpartition/PCPartition.cpp
  function part_t (line 80) | part_t * PCPartition::GetPart(int number) {

FILE: libraries/UHS_FS/PCpartition/PCPartition.h
  function class (line 55) | class PCPartition {

FILE: libraries/UHS_FS/UHS_FS.h
  type storage_t (line 67) | typedef struct Storage {
  type PFAT_DIRINFO (line 82) | typedef struct {
  type pvt_t (line 183) | typedef struct Pvt {
  function class (line 188) | class UHS_FS_BULK_DRIVER : public UHS_Bulk_Storage {
  type UHS_SD_cid_t (line 320) | typedef struct UHS_SD_CID {
  type UHS_SD_csd1_t (line 343) | typedef struct UHS_SD_CSDV1 {
  type UHS_SD_csd2_t (line 403) | typedef struct UHS_SD_CSDV2 {
  type SDpvt_t (line 466) | typedef struct SDPvt {
  function class (line 470) | class UHS_SD {
  function class (line 581) | class UHS_FS_SD_DRIVER : public UHS_SD {

FILE: libraries/UHS_FS/UHS_FS_INLINE.h
  function none_ready (line 45) | static void none_ready(int idx) {
  function SD_none_ready (line 63) | static void SD_none_ready(int idx) {
  function kill_mounts (line 70) | static void kill_mounts(int idx, int drv) {
  function DSTATUS (line 91) | DSTATUS UHS_SD_Initialize(storage_t *sto) {
  function UHS_SD_Status (line 99) | bool UHS_SD_Status(storage_t *sto) {
  function UHS_SD_Read (line 105) | int UHS_SD_Read(uint32_t LBA, uint8_t *buf, storage_t *sto, uint8_t coun...
  function UHS_SD_Write (line 127) | int UHS_SD_Write(uint32_t LBA, uint8_t *buf, storage_t *sto, uint8_t cou...
  function UHS_SD_Commit (line 147) | uint8_t UHS_SD_Commit(NOTUSED(storage_t *sto)) {
  function DSTATUS (line 156) | DSTATUS UHS_USB_BulkOnly_Initialize(storage_t *sto) {
  function UHS_USB_BulkOnly_Status (line 164) | bool UHS_USB_BulkOnly_Status(storage_t *sto) {
  function UHS_USB_BulkOnly_Read (line 170) | int UHS_USB_BulkOnly_Read(uint32_t LBA, uint8_t *buf, storage_t *sto, ui...
  function UHS_USB_BulkOnly_Write (line 192) | int UHS_USB_BulkOnly_Write(uint32_t LBA, uint8_t *buf, storage_t *sto, u...
  function UHS_USB_BulkOnly_Commit (line 212) | uint8_t UHS_USB_BulkOnly_Commit(NOTUSED(storage_t *sto)) {
  function OnStart (line 227) | uint8_t UHS_FS_BULK_DRIVER::OnStart(void) {
  function OnPoll (line 232) | void UHS_FS_BULK_DRIVER::OnPoll(void) {
  function OnRelease (line 320) | void UHS_FS_BULK_DRIVER::OnRelease(void) {
  function UHS_USB_BulkOnly_Init (line 330) | static void UHS_USB_BulkOnly_Init(UHS_USB_HOST_BASE *hd) {
  function waitNotBusy (line 348) | bool UHS_SD::waitNotBusy(uint16_t timeoutMillis) {
  function cardCommand (line 357) | uint8_t UHS_SD::cardCommand(uint8_t cmd, uint32_t arg) {
  function readRegister (line 372) | bool UHS_SD::readRegister(uint8_t cmd, void* buf) {
  function waitStartBlock (line 396) | bool UHS_SD::waitStartBlock(void) {
  function cardSize (line 417) | uint32_t UHS_SD::cardSize(void) {
  function Read (line 438) | uint8_t UHS_SD::Read(uint32_t addr, uint16_t bsize, uint8_t blocks, uint...
  function writeData (line 472) | bool UHS_SD::writeData(uint8_t token, const uint8_t* src) {
  function writeBlock (line 489) | bool UHS_SD::writeBlock(uint32_t blockNumber, const uint8_t* src) {
  function Write (line 522) | uint8_t UHS_SD::Write(uint32_t addr, uint16_t bsize, uint8_t blocks, con...
  function IRQ (line 542) | void UHS_FS_SD_DRIVER::IRQ(void) {
  function Init_Generic_Storage (line 724) | void Init_Generic_Storage(void *hd) {
  function fs_ready (line 820) | uint8_t AJK_NI fs_ready(const char *path) {
  function fs_simplify_path (line 845) | void fs_simplify_path(char *path) {
  function _fs_util_vol (line 900) | uint8_t AJK_NI _fs_util_vol(const char *path) {
  function fs_opendir (line 957) | uint8_t AJK_NI fs_opendir(const char *path) {
  function _fs_open (line 996) | uint8_t AJK_NI _fs_open(const char *path, const char *mode) {
  function fs_close (line 1046) | int AJK_NI fs_close(uint8_t fd) {
  function fs_closedir (line 1065) | int AJK_NI fs_closedir(uint8_t dh) {
  function fs_readdir (line 1077) | int AJK_NI fs_readdir(uint8_t fd, PFAT_DIRINFO *data) {
  function fs_sync (line 1119) | uint8_t AJK_NI fs_sync(void) {
  function fs_flush (line 1144) | uint8_t AJK_NI fs_flush(uint8_t fd) {
  function fs_eof (line 1164) | uint8_t AJK_NI fs_eof(uint8_t fd) {
  function fs_truncate (line 1183) | uint8_t AJK_NI fs_truncate(uint8_t fd) {
  function fs_tell (line 1202) | unsigned long AJK_NI fs_tell(uint8_t fd) {
  function fs_lseek (line 1230) | uint8_t AJK_NI fs_lseek(uint8_t fd, unsigned long offset, int whence) {
  function fs_read (line 1251) | int AJK_NI fs_read(uint8_t fd, void *data, uint16_t amount) {
  function fs_write (line 1279) | int AJK_NI fs_write(uint8_t fd, const void *data, uint16_t amount) {
  function fs_unlink (line 1305) | uint8_t AJK_NI fs_unlink(const char *path) {
  function fs_chmod (line 1330) | uint8_t AJK_NI fs_chmod(const char *path, uint8_t mode) {
  function fs_mkdir (line 1352) | uint8_t AJK_NI fs_mkdir(const char *path, uint8_t mode) {
  function fs_utime (line 1377) | uint8_t AJK_NI fs_utime(const char *path, time_t timesec) {
  function fs_stat (line 1402) | uint8_t AJK_NI fs_stat(const char *path, FILINFO *buf) {
  function fs_rename (line 1425) | uint8_t AJK_NI fs_rename(const char *oldpath, const char *newpath) {
  function fs_setlabel (line 1449) | uint8_t AJK_NI fs_setlabel(const char *oldpath, const char *newpath) {
  function fs_getfree (line 1484) | uint64_t AJK_NI fs_getfree(const char *path) {
  function fs_mountcount (line 1504) | uint8_t AJK_NI fs_mountcount(void) {
  function fs_open (line 1524) | uint8_t AJK_NI fs_open(const char *pathname, int flags) {

FILE: libraries/UHS_host/UHS_ADK/UHS_ADK.h
  function class (line 83) | class UHS_ADK_Enabler : public UHS_USBInterface {
  function class (line 116) | class UHS_ADK : public UHS_USBInterface {
  function GetAddress (line 153) | uint8_t GetAddress() {
  function isReady (line 157) | bool isReady() {

FILE: libraries/UHS_host/UHS_ADK/UHS_ADK_INLINE.h
  function UHS_NI (line 30) | UHS_NI UHS_ADK_Enabler::UHS_ADK_Enabler(UHS_USB_HOST_BASE *p) {
  function UHS_NI (line 200) | UHS_NI UHS_ADK::UHS_ADK(UHS_USB_HOST_BASE *p) {

FILE: libraries/UHS_host/UHS_BULK_STORAGE/UHS_BULK_STORAGE.h
  type UHS_BULK_CommandBlockWrapperBase (line 94) | struct UHS_BULK_CommandBlockWrapperBase {
  type UHS_BULK_CommandStatusWrapper (line 157) | struct UHS_BULK_CommandStatusWrapper {
  function class (line 164) | class UHS_Bulk_Storage : public UHS_USBInterface {

FILE: libraries/UHS_host/UHS_BULK_STORAGE/UHS_BULK_STORAGE_INLINE.h
  function UHS_NI (line 310) | UHS_NI UHS_Bulk_Storage::UHS_Bulk_Storage(UHS_USB_HOST_BASE *p) {

FILE: libraries/UHS_host/UHS_BULK_STORAGE/UHS_SCSI.h
  type SCSI_Capacity (line 118) | struct SCSI_Capacity {
  type SCSI_CDB_BASE (line 124) | struct SCSI_CDB_BASE {
  type SCSI_CDB_BASE (line 133) | typedef SCSI_CDB_BASE SCSI_CDB_BASE_t;
  type SCSI_CDB12 (line 201) | struct SCSI_CDB12 {
  type SCSI_CDB_LBA32_16 (line 219) | struct SCSI_CDB_LBA32_16 {
  type SCSI_CDB_LBA64_16 (line 244) | struct SCSI_CDB_LBA64_16 {
  type SCSI_Inquiry_Response (line 267) | struct SCSI_Inquiry_Response {
  type SCSI_Request_Sense_Response (line 314) | struct SCSI_Request_Sense_Response {

FILE: libraries/UHS_host/UHS_CDC/UHS_CDC.h
  type UHS_CDC_ACM_HEADER_DESCR (line 122) | typedef struct usb_cdc_header_desc {
  type UHS_CDC_CALL_MGMNT_FUNC_DESCR (line 129) | typedef struct {
  type UHS_CDC_ACM_FUNC_DESCR (line 137) | typedef struct {
  type UHS_CDC_TEL_RINGER_FUNC_DESCR (line 144) | typedef struct {
  type UHS_CDC_LINE_CODING (line 152) | typedef struct {
  type UHS_CDC_CLASS_NOTIFICATION (line 159) | typedef struct {
  type UHS_CDC_tty_features (line 173) | typedef struct {

FILE: libraries/UHS_host/UHS_CDC_ACM/UHS_CDC_ACM.h
  type tty_features (line 75) | typedef struct {
  function class (line 93) | class UHS_CDC_ACM : public UHS_USBInterface {

FILE: libraries/UHS_host/UHS_CDC_ACM/UHS_CDC_ACM_INLINE.h
  function UHS_NI (line 29) | UHS_NI UHS_CDC_ACM::UHS_CDC_ACM(UHS_USB_HOST_BASE *p) {
  function else (line 131) | else if((ei->interface.epInfo[ep].bmAttributes == USB_TRANSFER_TYPE_BULK...

FILE: libraries/UHS_host/UHS_CDC_ACM/UHS_CDC_ACM_PROLIFIC.h
  type PROLIFIC_tXO_State (line 100) | enum PROLIFIC_tXO_State {
  type PROLIFIC_pl2303_type (line 108) | enum PROLIFIC_pl2303_type {

FILE: libraries/UHS_host/UHS_HID/HIDBOOT/UHS_HIDRAWBOOT_KEYBOARD.h
  function class (line 47) | class UHS_HIDBOOT_keyboard : public UHS_HID_base {

FILE: libraries/UHS_host/UHS_HID/HIDBOOT/UHS_HIDRAWBOOT_MOUSE.h
  type MOUSEINFO (line 47) | struct MOUSEINFO {
  function class (line 64) | class UHS_HIDBOOT_mouse : public UHS_HID_base {

FILE: libraries/UHS_host/UHS_HID/UHS_HID.h
  type UHS_HID_driver_t (line 49) | enum UHS_HID_driver_t {
  function class (line 58) | class UHS_HID_PROCESSOR {
  function class (line 67) | class UHS_HID : public UHS_USBInterface {
  function class (line 105) | class UHS_HID_base {
  function class (line 132) | class UHS_HID_RAW : public UHS_HID_base {

FILE: libraries/UHS_host/UHS_HID/UHS_HID_INLINE.h
  function UHS_NI (line 44) | UHS_NI UHS_HID::UHS_HID(UHS_USB_HOST_BASE *p, UHS_HID_PROCESSOR *hp) {

FILE: libraries/UHS_host/UHS_HUB/UHS_HUB.h
  type UHS_HubDescriptor (line 131) | struct UHS_HubDescriptor {
  type UHS_HubEvent (line 157) | struct UHS_HubEvent {
  function class (line 170) | class UHS_USBHub :  public UHS_USBInterface {
  function ClearHubFeature (line 217) | inline uint8_t UHS_USBHub::ClearHubFeature(uint8_t fid) {
  function ClearPortFeature (line 222) | inline uint8_t UHS_USBHub::ClearPortFeature(uint8_t fid, uint8_t port, u...
  function GetHubDescriptor (line 227) | inline uint8_t UHS_USBHub::GetHubDescriptor(uint8_t index, uint16_t nbyt...
  function GetHubStatus (line 232) | inline uint8_t UHS_USBHub::GetHubStatus(uint16_t nbytes, uint8_t* datapt...
  function GetPortStatus (line 237) | inline uint8_t UHS_USBHub::GetPortStatus(uint8_t port, uint16_t nbytes, ...
  function SetHubFeature (line 242) | inline uint8_t UHS_USBHub::SetHubFeature(uint8_t fid) {
  function SetPortFeature (line 247) | inline uint8_t UHS_USBHub::SetPortFeature(uint8_t fid, uint8_t port, uin...

FILE: libraries/UHS_host/UHS_HUB/UHS_HUB_INLINE.h
  function UHS_NI (line 47) | UHS_NI UHS_USBHub::UHS_USBHub(UHS_USB_HOST_BASE *p) {
  function PrintHubPortStatus (line 393) | void UHS_NI PrintHubPortStatus(UHS_USBHub *hubptr, NOTUSED(uint8_t addr)...

FILE: libraries/UHS_host/UHS_KINETIS_EHCI/UHS_KINETIS_EHCI.h
  type uhs_kehci_qh_t (line 142) | typedef struct _uhs_kehci_qh {
  type UHS_EHCI_TOKEN (line 152) | typedef struct _UHS_EHCI_TOKEN {
  type uhs_kehci_qtd_t (line 170) | typedef struct _uhs_kehci_qtd {
  function UHS_NI (line 237) | UHS_NI sof_delay(uint16_t x) {
  function UHS_NI (line 245) | UHS_NI vbusPower(uint8_t port, VBUS_t state) {
  function IsHub (line 267) | void UHS_NI IsHub(NOTUSED(bool p)) {
  function ReleaseChildren (line 270) | void UHS_NI ReleaseChildren(void) {
  function UHS_NI (line 277) | UHS_NI doHostReset(void) {
  function Init (line 307) | int16_t UHS_NI Init(void) {
  function dyn_SWISR (line 311) | void dyn_SWISR(void) {
  function UHS_NI (line 315) | UHS_NI suspend_host(void) {
  function UHS_NI (line 318) | UHS_NI resume_host(void) {

FILE: libraries/UHS_host/UHS_KINETIS_EHCI/UHS_KINETIS_EHCI_INLINE.h
  function call_ISR_kinetis_EHCI (line 60) | static void UHS_NI call_ISR_kinetis_EHCI(void) {
  function QH_capabilities1 (line 527) | static uint32_t QH_capabilities1(uint32_t nak_count_reload, uint32_t con...
  function QH_capabilities2 (line 536) | static uint32_t QH_capabilities2(uint32_t high_bw_mult, uint32_t hub_por...
  function init_qTD (line 542) | void UHS_KINETIS_EHCI::init_qTD(uint32_t len, uint32_t data01) {

FILE: libraries/UHS_host/UHS_KINETIS_FS_HOST/UHS_KINETIS_FS_HOST.h
  type bdt_t (line 97) | typedef struct {
  function UHS_NI (line 205) | UHS_NI sof_delay(uint16_t x) {
  function virtual (line 215) | virtual uint8_t vbusPower(uint8_t port, VBUS_t state) {
  function IsHub (line 237) | void UHS_NI IsHub(bool p) {
  function ReleaseChildren (line 245) | void UHS_NI ReleaseChildren(void) {
  function UHS_NI (line 252) | UHS_NI doHostReset(void) {
  function Init (line 274) | int16_t UHS_NI Init(void) {
  function dyn_SWISR (line 278) | void dyn_SWISR(void) {
  function UHS_NI (line 282) | UHS_NI suspend_host(void) {
  function UHS_NI (line 285) | UHS_NI resume_host(void) {

FILE: libraries/UHS_host/UHS_KINETIS_FS_HOST/UHS_KINETIS_FS_HOST_INLINE.h
  function call_ISR_kinetis (line 32) | static void UHS_NI call_ISR_kinetis(void) {

FILE: libraries/UHS_host/UHS_MIDI/UHS_MIDI.h
  function class (line 36) | class UHS_MIDI : public UHS_USBInterface {

FILE: libraries/UHS_host/UHS_MIDI/UHS_MIDI_INLINE.h
  function UHS_NI (line 32) | UHS_NI UHS_MIDI::UHS_MIDI(UHS_USB_HOST_BASE *p) {

FILE: libraries/UHS_host/UHS_PRINTER/UHS_PRINTER.h
  type quirk_printer_struct (line 21) | struct quirk_printer_struct {
  type quirk_printer_struct (line 31) | struct quirk_printer_struct
  type UHS_PRINTER_STATUS (line 51) | struct UHS_PRINTER_STATUS {
  function class (line 59) | class UHS_PRINTER : public UHS_USBInterface {

FILE: libraries/UHS_host/UHS_PRINTER/UHS_PRINTER_INLINE.h
  function UHS_NI (line 29) | UHS_NI UHS_PRINTER::UHS_PRINTER(UHS_USB_HOST_BASE *p) {

FILE: libraries/UHS_host/UHS_UsbCore.h
  type ENDPOINT_INFO (line 265) | struct ENDPOINT_INFO {
  type INTERFACE_INFO (line 272) | struct INTERFACE_INFO {
  type ENUMERATION_INFO (line 282) | struct ENUMERATION_INFO {
  type SETUP_PKT (line 298) | typedef struct {

FILE: libraries/UHS_host/UHS_address.h
  type UHS_EpInfo (line 45) | struct UHS_EpInfo {
  type UHS_DeviceAddress (line 63) | struct UHS_DeviceAddress {
  type UHS_Device (line 75) | struct UHS_Device {
  function class (line 86) | class AddressPool {

FILE: libraries/UHS_host/UHS_hexdump.h
  function Initialize (line 43) | void Initialize(void) {

FILE: libraries/UHS_host/UHS_host_INLINE.h
  function setEpInfoEntry (line 82) | uint8_t UHS_USB_HOST_BASE::setEpInfoEntry(uint8_t addr, uint8_t iface, u...
  function DeviceDefaults (line 112) | void UHS_USB_HOST_BASE::DeviceDefaults(uint8_t maxep, UHS_USBInterface *...
  function doSoftReset (line 137) | uint8_t UHS_USB_HOST_BASE::doSoftReset(uint8_t parent, uint8_t port, uin...
  function ReleaseDevice (line 586) | void UHS_USB_HOST_BASE::ReleaseDevice(uint8_t addr) {
  function getDevDescr (line 611) | uint8_t UHS_USB_HOST_BASE::getDevDescr(uint8_t addr, uint16_t nbytes, ui...
  function getDevStatus (line 623) | uint8_t UHS_USB_HOST_BASE::getDevStatus(uint8_t addr, uint16_t nbytes, u...
  function getConfDescr (line 636) | uint8_t UHS_USB_HOST_BASE::getConfDescr(uint8_t addr, uint16_t nbytes, u...
  function getStrDescr (line 650) | uint8_t UHS_USB_HOST_BASE::getStrDescr(uint8_t addr, uint16_t ns, uint8_...
  function setAddr (line 665) | uint8_t UHS_USB_HOST_BASE::setAddr(uint8_t oldaddr, uint8_t newaddr) {
  function setConf (line 682) | uint8_t UHS_USB_HOST_BASE::setConf(uint8_t addr, uint8_t conf_value) {
  function outTransfer (line 697) | uint8_t UHS_USB_HOST_BASE::outTransfer(uint8_t addr, uint8_t ep, uint16_...
  function inTransfer (line 718) | uint8_t UHS_USB_HOST_BASE::inTransfer(uint8_t addr, uint8_t ep, uint16_t...
  function initDescrStream (line 748) | uint8_t UHS_USB_HOST_BASE::initDescrStream(ENUMERATION_INFO *ei, USB_CON...
  function getNextInterface (line 760) | uint8_t UHS_USB_HOST_BASE::getNextInterface(ENUMERATION_INFO *ei, UHS_Ep...
  function seekInterface (line 864) | uint8_t UHS_USB_HOST_BASE::seekInterface(ENUMERATION_INFO *ei, uint16_t ...
  function getone (line 976) | uint8_t UHS_USB_HOST_BASE::getone(UHS_EpInfo *pep, uint16_t *left, uint1...
  function eat (line 998) | uint8_t UHS_USB_HOST_BASE::eat(UHS_EpInfo *pep, uint16_t *left, uint16_t...
  function ctrlReq (line 1009) | uint8_t UHS_USB_HOST_BASE::ctrlReq(uint8_t addr, uint64_t Request, uint1...
  function EPClearHalt (line 1067) | uint8_t UHS_USB_HOST_BASE::EPClearHalt(uint8_t addr, uint8_t ep) {
  function TestInterface (line 1072) | uint8_t UHS_USB_HOST_BASE::TestInterface(ENUMERATION_INFO *ei) {
  function enumerateInterface (line 1109) | uint8_t UHS_USB_HOST_BASE::enumerateInterface(ENUMERATION_INFO *ei) {
  function DefaultAddressing (line 1207) | uint8_t UHS_USB_HOST_BASE::DefaultAddressing(uint8_t parent, uint8_t por...

FILE: libraries/UHS_host/UHS_printf_HELPER.h
  function _mon_putc (line 93) | void _mon_putc(char s) {
  function _mon_getc (line 97) | int _mon_getc() {
  function tty_stderr_putc (line 115) | static int tty_stderr_putc(char c, NOTUSED(FILE *t)) {
  function tty_stderr_flush (line 120) | static int tty_stderr_flush(NOTUSED(FILE *t)) {
  function tty_std_putc (line 125) | static int tty_std_putc(char c, NOTUSED(FILE *t)) {
  function tty_std_getc (line 130) | static int tty_std_getc(NOTUSED(FILE *t)) {
  function tty_std_flush (line 135) | static int tty_std_flush(NOTUSED(FILE *t)) {
  function _write (line 143) | int _write(int fd, const char *ptr, int len) {
  function _read (line 154) | int _read(int fd, char *ptr, int len) {
  function _fstat (line 165) | int _fstat(int fd, struct stat *st) {
  function _isatty (line 172) | int _isatty(int fd) {
  function UHS_PJRC_printf_HELPER_init (line 177) | void UHS_PJRC_printf_HELPER_init(void) {
  function UHS_AVR_printf_HELPER_init (line 190) | void UHS_AVR_printf_HELPER_init(void) {

FILE: libraries/UHS_host/UHS_printhex.h
  function D_PrintHex (line 82) | D_PrintHex(NOTUSED(T val), NOTUSED(int lvl)) {
  function D_PrintBin (line 90) | D_PrintBin(NOTUSED(T val), NOTUSED(int lvl)) {

FILE: libraries/UHS_host/UHS_usb_ch9.h
  type USB_DEVICE_DESCRIPTOR (line 152) | typedef struct {
  type USB_CONFIGURATION_DESCRIPTOR (line 170) | typedef struct {
  type USB_INTERFACE_DESCRIPTOR (line 182) | typedef struct {
  type USB_ENDPOINT_DESCRIPTOR (line 195) | typedef struct {
  type HID_CLASS_DESCRIPTOR_LEN_AND_TYPE (line 217) | typedef struct {

FILE: libraries/UHS_host/UHS_usbhost.h
  type VBUS_t (line 55) | typedef enum {
  function class (line 62) | class UHS_USB_HOST_BASE {
  function UHS_NI (line 110) | UHS_NI vbusPower(NOTUSED(uint8_t port), NOTUSED(VBUS_t state)) {
  function UHS_NI (line 114) | UHS_NI Task(void) {
  function UHS_NI (line 117) | UHS_NI SetAddress(NOTUSED(uint8_t addr), NOTUSED(uint8_t ep), NOTUSED(UH...
  function UHS_NI (line 121) | UHS_NI OutTransfer(NOTUSED(UHS_EpInfo *pep), NOTUSED(uint16_t nak_limit)...
  function UHS_NI (line 125) | UHS_NI InTransfer(NOTUSED(UHS_EpInfo *pep), NOTUSED(uint16_t nak_limit),...
  function UHS_NI (line 129) | UHS_NI ctrlReqClose(NOTUSED(UHS_EpInfo *pep), NOTUSED(uint8_t bmReqType)...
  function UHS_NI (line 133) | UHS_NI ctrlReqRead(NOTUSED(UHS_EpInfo *pep), NOTUSED(uint16_t *left), NO...
  function UHS_NI (line 141) | UHS_NI init(void) {
  function UHS_NI (line 145) | UHS_NI doHostReset(void) {
  function UHS_NI (line 148) | UHS_NI Init(NOTUSED(int16_t mseconds)) {
  function UHS_NI (line 152) | UHS_NI Init(void) {
  function virtual (line 156) | virtual uint8_t hwlPowerUp(void) {
  function virtual (line 161) | virtual uint8_t hwPowerDown(void) {
  function virtual (line 166) | virtual void IsHub(NOTUSED(bool p)) {
  function UHS_NI (line 169) | UHS_NI suspend_host(void) {
  function UHS_NI (line 175) | UHS_NI resume_host(void) {
  function Poll_Others (line 188) | inline void Poll_Others(void) {
  function DisablePoll (line 197) | inline void DisablePoll(void) {
  function EnablePoll (line 204) | inline void EnablePoll(void) {
  function vbusPower (line 211) | uint8_t UHS_NI vbusPower(uint8_t port, bool state) {
  function getUsbTaskState (line 244) | inline uint8_t getUsbTaskState(void) {
  function AddressPool (line 248) | inline AddressPool* GetAddressPool(void) {
  function RegisterDeviceClass (line 252) | int UHS_NI RegisterDeviceClass(UHS_USBInterface *pdev) {
  function ForEachUsbDevice (line 264) | inline void ForEachUsbDevice(UsbDeviceHandleFunc pfunc) {
  function class (line 283) | class UHS_USBInterface {

FILE: libraries/UHS_host/UHS_util_INLINE.h
  function E_Notifyc (line 35) | void E_Notifyc(char c, int lvl) {
  function E_Notify (line 45) | void E_Notify(char const * msg, int lvl) {
  function E_NotifyStr (line 53) | void E_NotifyStr(char const * msg, int lvl) {
  function E_Notify (line 61) | void E_Notify(uint8_t b, int lvl) {
  function E_Notify (line 70) | void E_Notify(double d, int lvl) {
  function NotifyFailGetDevDescr (line 77) | void NotifyFailGetDevDescr(void) {
  function NotifyFailSetDevTblEntry (line 81) | void NotifyFailSetDevTblEntry(void) {
  function NotifyFailGetConfDescr (line 85) | void NotifyFailGetConfDescr(void) {
  function NotifyFailSetConfDescr (line 89) | void NotifyFailSetConfDescr(void) {
  function NotifyFailGetDevDescr (line 93) | void NotifyFailGetDevDescr(uint8_t reason) {
  function NotifyFailSetDevTblEntry (line 98) | void NotifyFailSetDevTblEntry(uint8_t reason) {
  function NotifyFailGetConfDescr (line 104) | void NotifyFailGetConfDescr(uint8_t reason) {
  function NotifyFailSetConfDescr (line 109) | void NotifyFailSetConfDescr(uint8_t reason) {
  function NotifyFailUnknownDevice (line 114) | void NotifyFailUnknownDevice(uint16_t VID, uint16_t PID) {
  function NotifyFail (line 121) | void NotifyFail(uint8_t rcode) {

FILE: libraries/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD.h
  function UHS_NI (line 316) | UHS_NI MAX3421E_HOST(void) {
  function UHS_NI (line 330) | UHS_NI MAX3421E_HOST(uint8_t pss, uint8_t pirq) {
  function UHS_NI (line 344) | UHS_NI MAX3421E_HOST(uint8_t pss, uint8_t pirq, uint32_t pspd) {
  function UHS_NI (line 356) | UHS_NI sof_delay(uint16_t x) {
  function UHS_NI (line 370) | UHS_NI vbusPower(uint8_t port, VBUS_t state) {
  function ReleaseChildren (line 385) | void UHS_NI ReleaseChildren(void) {
  function virtual (line 392) | virtual void IsHub(bool p) {
  function Init (line 448) | int16_t UHS_NI Init(void) {
  function dyn_SWISR (line 468) | void dyn_SWISR(void) {
  function UHS_NI (line 473) | UHS_NI suspend_host(void) {

FILE: libraries/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD_INLINE.h
  function call_ISReven (line 37) | static void UHS_NI call_ISReven(void) {
  function call_ISRodd (line 41) | static void UHS_NI call_ISRodd(void) {

FILE: libraries/dyn_SWI/SWI_INLINE.h
  function __DSB (line 45) | __attribute__((always_inline)) static inline void __DSB(void) {
  function __DSB (line 50) | __attribute__((always_inline)) static inline void __DSB(void) {
  function softISR (line 74) | void softISR(void) {
  function __interruptsStatus (line 126) | static inline unsigned char __interruptsStatus(void) {
  function Init_dyn_SWI (line 137) | static void Init_dyn_SWI(void) {
  function exec_SWI (line 172) | int exec_SWI(const dyn_SWI* klass) {
  function Init_dyn_SWI (line 204) | static void Init_dyn_SWI(void) {
  function exec_SWI (line 226) | int exec_SWI(const dyn_SWI* klass) {

FILE: libraries/dyn_SWI/dyn_SWI.h
  function class (line 152) | class dyn_SWI {
Condensed preview — 252 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (4,413K chars).
[
  {
    "path": ".gitattributes",
    "chars": 531,
    "preview": "# Auto detect text files and perform LF normalization\n* text=auto\n* text eol=lf\n\n# Custom for Visual Studio\n*.cs     dif"
  },
  {
    "path": ".gitignore",
    "chars": 59,
    "preview": "*.bak\n*.rar\n*~\nDEADJOE\n*.orig\n*.rej\nnbproject/private\nbuild"
  },
  {
    "path": ".gitmodules",
    "chars": 90,
    "preview": "[submodule \"RTClib\"]\n\tpath = libraries/RTClib\n\turl = https://github.com/xxxajk/RTClib.git\n"
  },
  {
    "path": "LICENSE",
    "chars": 18027,
    "preview": "GNU GENERAL PUBLIC LICENSE\n                       Version 2, June 1991\n\n Copyright (C) 1989, 1991 Free Software Foundati"
  },
  {
    "path": "Makefile",
    "chars": 591,
    "preview": "FIND ?=find\nDIRNAME ?=dirname\n\nTOTEST ?=$(shell $(FIND) ./libraries -name Makefile -exec $(DIRNAME) \\{\\} \\;)\n$(info $(TO"
  },
  {
    "path": "README.md",
    "chars": 3240,
    "preview": "# UHS30\nPre-release of USB Host Library version 3.0. No technical support offered at this time.\n\n__This set of libraries"
  },
  {
    "path": "libraries/ISR_safe_memory/ISR_safe_memory.h",
    "chars": 465,
    "preview": "/*\n * File:   ISR_safe_memory.h\n * Author: root\n *\n * Created on December 26, 2018, 1:25 AM\n */\n\n#ifndef ISR_SAFE_MEMORY"
  },
  {
    "path": "libraries/ISR_safe_memory/malloc.c",
    "chars": 15921,
    "preview": "#if defined(__AVR__)\n\n// TO-DO: find out why newer avr-libc fails\n\n/* Copyright (C) 2015-2016 Andrew J. Kroll\n   and\nCop"
  },
  {
    "path": "libraries/ISR_safe_memory/mlock.c",
    "chars": 5077,
    "preview": "/* Modified from newlib-2012.09 to support ISR safety. */\n/* Copyright (C) 2015-2016 Andrew J. Kroll\n   and\nCopyright (C"
  },
  {
    "path": "libraries/ISR_safe_memory/sectionname.h",
    "chars": 3094,
    "preview": "#if defined(__AVR__)\n/* Copyright (C) 2015-2016 Andrew J. Kroll\n   and\nCopyright (C) 2011 Circuits At Home, LTD. All rig"
  },
  {
    "path": "libraries/ISR_safe_memory/stdlib_private.h",
    "chars": 3141,
    "preview": "#if defined(__AVR__)\n/* Copyright (C) 2015-2016 Andrew J. Kroll\n   and\nCopyright (C) 2011 Circuits At Home, LTD. All rig"
  },
  {
    "path": "libraries/UHS_ByteBuffer/UHS_ByteBuffer.cpp",
    "chars": 8676,
    "preview": "/*\n  ByteBuffer.cpp - A circular buffer implementation for Arduino\n  Created by Sigurdur Orn, July 19, 2010.\n  siggi@mit"
  },
  {
    "path": "libraries/UHS_ByteBuffer/UHS_ByteBuffer.h",
    "chars": 3605,
    "preview": "/*\n  ByteBuffer.h - A circular buffer implementation for Arduino\n  Created by Sigurdur Orn, July 19, 2010.  siggi@mit.ed"
  },
  {
    "path": "libraries/UHS_ByteBuffer/examples/ByteBufferExample.ino",
    "chars": 1034,
    "preview": "#include <Arduino.h>\n#include <UHS_ByteBuffer.h>\n\n/*\n  Silly program that emulates buffered processing\n  using a circula"
  },
  {
    "path": "libraries/UHS_FS/FAT/FAT.cpp",
    "chars": 10290,
    "preview": "/* Copyright (C) 2015-2016 Andrew J. Kroll\n *  and\n * Copyright (C) 2011 Circuits At Home, LTD. All rights reserved.\n *\n"
  },
  {
    "path": "libraries/UHS_FS/FAT/FAT.h",
    "chars": 21285,
    "preview": "/* Copyright (C) 2015-2016 Andrew J. Kroll\n *  and\n * Copyright (C) 2011 Circuits At Home, LTD. All rights reserved.\n *\n"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/00index_e.html",
    "chars": 5843,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/00index_j.html",
    "chars": 4162,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/css_e.css",
    "chars": 3092,
    "preview": "* {margin: 0; padding: 0; border-width: 0;}\nbody {margin: 8px; background-color: #e0ffff; font-color: black; font-family"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/css_j.css",
    "chars": 3342,
    "preview": "@charset \"Shift_JIS\";\n/* Common style sheet for Tech Notes */\n\n* {margin: 0; padding: 0; border-width: 0;}\nbody {margin:"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/appnote.html",
    "chars": 26533,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/chdir.html",
    "chars": 2439,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/chdrive.html",
    "chars": 1700,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/chmod.html",
    "chars": 2833,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/close.html",
    "chars": 1922,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/dinit.html",
    "chars": 1738,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/dioctl.html",
    "chars": 3653,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/dread.html",
    "chars": 2995,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/dstat.html",
    "chars": 2077,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/dwrite.html",
    "chars": 2460,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/eof.html",
    "chars": 1602,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/error.html",
    "chars": 1504,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/fattime.html",
    "chars": 1487,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/fdisk.html",
    "chars": 3681,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/filename.html",
    "chars": 6550,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/forward.html",
    "chars": 5338,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/getcwd.html",
    "chars": 1968,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/getfree.html",
    "chars": 3166,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/getlabel.html",
    "chars": 2488,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/gets.html",
    "chars": 2695,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/lseek.html",
    "chars": 6273,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/mkdir.html",
    "chars": 2107,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/mkfs.html",
    "chars": 3971,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/mount.html",
    "chars": 2419,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/open.html",
    "chars": 6167,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/opendir.html",
    "chars": 2215,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/printf.html",
    "chars": 3625,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/putc.html",
    "chars": 2150,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/puts.html",
    "chars": 2281,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/rc.html",
    "chars": 4274,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/read.html",
    "chars": 2531,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/readdir.html",
    "chars": 4932,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/rename.html",
    "chars": 2653,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/sdir.html",
    "chars": 1866,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/setlabel.html",
    "chars": 2583,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/sfatfs.html",
    "chars": 3264,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/sfile.html",
    "chars": 2542,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/sfileinfo.html",
    "chars": 2794,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/size.html",
    "chars": 1500,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/stat.html",
    "chars": 2298,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/sync.html",
    "chars": 2265,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/tell.html",
    "chars": 1523,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/truncate.html",
    "chars": 1817,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/unlink.html",
    "chars": 2506,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/utime.html",
    "chars": 2734,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/en/write.html",
    "chars": 2772,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/appnote.html",
    "chars": 21090,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/chdir.html",
    "chars": 1963,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/chdrive.html",
    "chars": 1320,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/chmod.html",
    "chars": 2358,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/close.html",
    "chars": 1609,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/dinit.html",
    "chars": 1229,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/dioctl.html",
    "chars": 2300,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/dread.html",
    "chars": 1589,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/dstat.html",
    "chars": 1236,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/dwrite.html",
    "chars": 1674,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/eof.html",
    "chars": 1350,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/error.html",
    "chars": 1296,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/fattime.html",
    "chars": 1163,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/fdisk.html",
    "chars": 2708,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/filename.html",
    "chars": 4229,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/forward.html",
    "chars": 4177,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/getcwd.html",
    "chars": 1662,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/getfree.html",
    "chars": 2512,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/getlabel.html",
    "chars": 2052,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/gets.html",
    "chars": 1952,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/lseek.html",
    "chars": 4312,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/mkdir.html",
    "chars": 1924,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/mkfs.html",
    "chars": 2387,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/mount.html",
    "chars": 1693,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/open.html",
    "chars": 4662,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/opendir.html",
    "chars": 1900,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/printf.html",
    "chars": 3012,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/putc.html",
    "chars": 1673,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/puts.html",
    "chars": 1714,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/rc.html",
    "chars": 3156,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/read.html",
    "chars": 2082,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/readdir.html",
    "chars": 3795,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/rename.html",
    "chars": 2258,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/sdir.html",
    "chars": 1571,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/setlabel.html",
    "chars": 2050,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/sfatfs.html",
    "chars": 2650,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/sfile.html",
    "chars": 2112,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/sfileinfo.html",
    "chars": 2072,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/size.html",
    "chars": 1295,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/stat.html",
    "chars": 1930,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/sync.html",
    "chars": 1597,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/tell.html",
    "chars": 1314,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/truncate.html",
    "chars": 1590,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/unlink.html",
    "chars": 1931,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/utime.html",
    "chars": 2411,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/ja/write.html",
    "chars": 2195,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"ja\">\n<head>\n<meta"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/doc/updates.txt",
    "chars": 4145,
    "preview": "R0.09b, Jan 24, 2013\n  Added f_getlabel() and f_setlabel(). (_USE_LABEL = 1)\n\nR0.09a, Aug 27, 2012\n  Fixed assertion fai"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/src/00readme.txt",
    "chars": 6767,
    "preview": "FatFs Module Source Files R0.09b                       (C)ChaN, 2013\n\n\nFILES\n\n  ffconf.h   Configuration file for FatFs "
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/src/diskio.h",
    "chars": 3746,
    "preview": "/*-----------------------------------------------------------------------\n/  Low level disk interface module include fil"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/src/ff.c",
    "chars": 191016,
    "preview": "/*----------------------------------------------------------------------------/\n/  FatFs - FAT file system module  R0.09"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/src/ff.h",
    "chars": 18945,
    "preview": "/*---------------------------------------------------------------------------/\n/  FatFs - FAT file system module include"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/src/ffconf.h",
    "chars": 9399,
    "preview": "/*---------------------------------------------------------------------------/\n/  FatFs - FAT file system module configu"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/src/integer.h",
    "chars": 798,
    "preview": "/*-------------------------------------------*/\n/* Integer type definitions for FatFs module */\n/*----------------------"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/src/option/cc932.h",
    "chars": 273369,
    "preview": "/*------------------------------------------------------------------------*/\n/* Unicode - OEM code bidirectional convert"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/src/option/cc936.h",
    "chars": 790305,
    "preview": "/*------------------------------------------------------------------------*/\n/* Unicode - OEM code bidirectional convert"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/src/option/cc949.h",
    "chars": 619521,
    "preview": "/*------------------------------------------------------------------------*/\n/* Unicode - OEM code bidirectional convert"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/src/option/cc950.h",
    "chars": 491890,
    "preview": "/*------------------------------------------------------------------------*/\n/* Unicode - OEM code bidirectional convert"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/src/option/ccsbcs.h",
    "chars": 32541,
    "preview": "/*------------------------------------------------------------------------*/\n/* Unicode - Local code bidirectional conve"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/src/option/syscall.h",
    "chars": 5023,
    "preview": "/*------------------------------------------------------------------------*/\n/* Sample code of OS dependent controls for"
  },
  {
    "path": "libraries/UHS_FS/FAT/FatFS/src/option/unicode.h",
    "chars": 173,
    "preview": "#ifndef FATFS_UNICODE_H_\n#include \"../ff.h\"\n\n#if _USE_LFN != 0\n#include \"cc932.h\"\n#include \"cc936.h\"\n#include \"cc949.h\"\n"
  },
  {
    "path": "libraries/UHS_FS/PCpartition/PCPartition.cpp",
    "chars": 3256,
    "preview": "/* Copyright (C) 2015-2016 Andrew J. Kroll\n   and\nCopyright (C) 2011 Circuits At Home, LTD. All rights reserved.\n\nThis p"
  },
  {
    "path": "libraries/UHS_FS/PCpartition/PCPartition.h",
    "chars": 2166,
    "preview": "/* Copyright (C) 2015-2016 Andrew J. Kroll\n   and\nCopyright (C) 2011 Circuits At Home, LTD. All rights reserved.\n\nThis p"
  },
  {
    "path": "libraries/UHS_FS/README.md",
    "chars": 658,
    "preview": "generic_storage\n===============\n\nGeneric partition and filesystem hooks for Arduino\n\n<pre>\n* IMPORTANT! PLEASE USE Ardui"
  },
  {
    "path": "libraries/UHS_FS/UHS_FS.h",
    "chars": 20518,
    "preview": "/*\n * File:   Storage.h\n * Author: xxxajk@gmail.com\n *\n * Created on February 19, 2013, 7:44 AM\n */\n\n/* Copyright (C) 20"
  },
  {
    "path": "libraries/UHS_FS/UHS_FS_INLINE.h",
    "chars": 64419,
    "preview": "/* Copyright (C) 2015-2016 Andrew J. Kroll\n   and\nCopyright (C) 2011 Circuits At Home, LTD. All rights reserved.\n\nThis p"
  },
  {
    "path": "libraries/UHS_FS/examples/UHS_FS_SPI_SDCARD/UHS_FS_SPI_SDCARD_DEMO/Makefile",
    "chars": 964,
    "preview": "#BOARD=arduino:samd:arduino_zero_edbg\n#BOARD=arduino:sam:arduino_due_x_dbg\n#BOARD=esp8266:esp8266:huzzah:CpuFrequency=80"
  },
  {
    "path": "libraries/UHS_FS/examples/UHS_FS_SPI_SDCARD/UHS_FS_SPI_SDCARD_DEMO/UHS_FS_SPI_SDCARD_DEMO.ino",
    "chars": 15833,
    "preview": "// define the label of your filesystem. VOL_PATH must end in '/'\n// Example:\n// #define VOL_LABEL \"/foo\"\n// #define VOL_"
  },
  {
    "path": "libraries/UHS_FS/examples/UHS_FS_SPI_SDCARD/UHS_FS_SPI_SDCARD_DEMO_LABEL/Makefile",
    "chars": 964,
    "preview": "#BOARD=arduino:samd:arduino_zero_edbg\n#BOARD=arduino:sam:arduino_due_x_dbg\n#BOARD=esp8266:esp8266:huzzah:CpuFrequency=80"
  },
  {
    "path": "libraries/UHS_FS/examples/UHS_FS_SPI_SDCARD/UHS_FS_SPI_SDCARD_DEMO_LABEL/UHS_FS_SPI_SDCARD_DEMO_LABEL.ino",
    "chars": 7018,
    "preview": "#if defined(__MK66FX1M0__)\n// Teensy 3.6 :-)\n#define SDCARD_CS_PIN 62\n#define SDCARD_DETECT_PIN 37\n\n#else\n#define SDCARD"
  },
  {
    "path": "libraries/UHS_FS/examples/UHS_KINETIS_EHCI/IOCTL/IOCTL.ino",
    "chars": 9568,
    "preview": "//////////////////////////////////////\n// libraries that we will be using\n//////////////////////////////////////\n\n// inl"
  },
  {
    "path": "libraries/UHS_FS/examples/UHS_KINETIS_EHCI/IOCTL/Makefile",
    "chars": 375,
    "preview": "BOARD=teensy:avr:teensy36:usb=serial,speed=180,opt=o1std,keys=en-us\n#BOARD=teensy:avr:teensy36:usb=serial,speed=96,opt=o"
  },
  {
    "path": "libraries/UHS_FS/examples/UHS_KINETIS_EHCI/UHS_FS_NEW_DEMO/Makefile",
    "chars": 375,
    "preview": "BOARD=teensy:avr:teensy36:usb=serial,speed=180,opt=o1std,keys=en-us\n#BOARD=teensy:avr:teensy36:usb=serial,speed=96,opt=o"
  },
  {
    "path": "libraries/UHS_FS/examples/UHS_KINETIS_EHCI/UHS_FS_NEW_DEMO/UHS_FS_NEW_DEMO.ino",
    "chars": 13816,
    "preview": "//////////////////////////////////////\n// libraries that we will be using\n//////////////////////////////////////\n\n// inl"
  },
  {
    "path": "libraries/UHS_FS/examples/UHS_KINETIS_FS_HOST/UHS_FS_NEW_DEMO/Makefile",
    "chars": 722,
    "preview": "#BOARD=teensy:avr:teensy30:usb=disable,speed=96,opt=o1std,keys=en-us\nBOARD=teensy:avr:teensy31:usb=disable,speed=96,opt="
  },
  {
    "path": "libraries/UHS_FS/examples/UHS_KINETIS_FS_HOST/UHS_FS_NEW_DEMO/UHS_FS_NEW_DEMO.ino",
    "chars": 13823,
    "preview": "//////////////////////////////////////\n// libraries that we will be using\n//////////////////////////////////////\n\n// inl"
  },
  {
    "path": "libraries/UHS_FS/examples/USB_HOST_SHIELD/UHS_FS_ANY_LABEL/Makefile",
    "chars": 964,
    "preview": "#BOARD=arduino:samd:arduino_zero_edbg\n#BOARD=arduino:sam:arduino_due_x_dbg\n#BOARD=esp8266:esp8266:huzzah:CpuFrequency=80"
  },
  {
    "path": "libraries/UHS_FS/examples/USB_HOST_SHIELD/UHS_FS_ANY_LABEL/UHS_FS_ANY_LABEL.ino",
    "chars": 16214,
    "preview": "\n// inline library loading\n// Patch printf so we can use it.\n#define LOAD_UHS_PRINTF_HELPER\n// Load the USB Host System "
  },
  {
    "path": "libraries/UHS_FS/examples/USB_HOST_SHIELD/UHS_FS_NEW_DEMO/Makefile",
    "chars": 964,
    "preview": "#BOARD=arduino:samd:arduino_zero_edbg\n#BOARD=arduino:sam:arduino_due_x_dbg\n#BOARD=esp8266:esp8266:huzzah:CpuFrequency=80"
  },
  {
    "path": "libraries/UHS_FS/examples/USB_HOST_SHIELD/UHS_FS_NEW_DEMO/UHS_FS_NEW_DEMO.ino",
    "chars": 15053,
    "preview": "// define the label of your filesystem. VOL_PATH must end in '/'\n// Example:\n// #define VOL_LABEL \"/foo\"\n// #define VOL_"
  },
  {
    "path": "libraries/UHS_FS/fcntl.h",
    "chars": 1384,
    "preview": "/*\n * File:   fcntl.h\n * Author: xxxajk@gmail.com\n *\n * Created on March 5, 2014, 1:15 AM\n */\n\n/* Copyright (C) 2015-201"
  },
  {
    "path": "libraries/UHS_host/UHS_ADK/UHS_ADK.h",
    "chars": 5278,
    "preview": "/* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved.\n\nThis program is free software; you can redistribute i"
  },
  {
    "path": "libraries/UHS_host/UHS_ADK/UHS_ADK_INLINE.h",
    "chars": 12705,
    "preview": "/* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved.\n\nThis program is free software; you can redistribute i"
  },
  {
    "path": "libraries/UHS_host/UHS_ADK/examples/UHS_KINETIS_FS_HOST/ArduinoBlinkLED/ArduinoBlinkLED.ino",
    "chars": 3597,
    "preview": "// The source for the Android application can be found at the following link: https://github.com/Lauszus/ArduinoBlinkLED"
  },
  {
    "path": "libraries/UHS_host/UHS_ADK/examples/UHS_KINETIS_FS_HOST/ArduinoBlinkLED/Makefile",
    "chars": 722,
    "preview": "#BOARD=teensy:avr:teensy30:usb=disable,speed=96,opt=o1std,keys=en-us\nBOARD=teensy:avr:teensy31:usb=disable,speed=96,opt="
  },
  {
    "path": "libraries/UHS_host/UHS_ADK/examples/UHS_KINETIS_FS_HOST/demokit_20/Makefile",
    "chars": 722,
    "preview": "#BOARD=teensy:avr:teensy30:usb=disable,speed=96,opt=o1std,keys=en-us\nBOARD=teensy:avr:teensy31:usb=disable,speed=96,opt="
  },
  {
    "path": "libraries/UHS_host/UHS_ADK/examples/UHS_KINETIS_FS_HOST/demokit_20/demokit_20.ino",
    "chars": 3383,
    "preview": "// Load the USB Host System core\n#define LOAD_USB_HOST_SYSTEM\n// Load the Kinetis core\n#define LOAD_UHS_KINETIS_FS_HOST\n"
  },
  {
    "path": "libraries/UHS_host/UHS_ADK/examples/USB_HOST_SHIELD/ArduinoBlinkLED/ArduinoBlinkLED.ino",
    "chars": 3585,
    "preview": "// The source for the Android application can be found at the following link: https://github.com/Lauszus/ArduinoBlinkLED"
  },
  {
    "path": "libraries/UHS_host/UHS_ADK/examples/USB_HOST_SHIELD/ArduinoBlinkLED/Makefile",
    "chars": 698,
    "preview": "#BOARD=teensy:avr:teensy30:usb=disable,speed=96opt,keys=en-us\n#BOARD=teensy:avr:teensy31:usb=disable,speed=96opt,keys=en"
  },
  {
    "path": "libraries/UHS_host/UHS_ADK/examples/USB_HOST_SHIELD/demokit_20/Makefile",
    "chars": 698,
    "preview": "#BOARD=teensy:avr:teensy30:usb=disable,speed=96opt,keys=en-us\n#BOARD=teensy:avr:teensy31:usb=disable,speed=96opt,keys=en"
  },
  {
    "path": "libraries/UHS_host/UHS_ADK/examples/USB_HOST_SHIELD/demokit_20/demokit_20.ino",
    "chars": 3674,
    "preview": "// The source for the Android application can be found at the following link: https://github.com/Lauszus/ArduinoBlinkLED"
  },
  {
    "path": "libraries/UHS_host/UHS_BULK_STORAGE/UHS_BULK_STORAGE.h",
    "chars": 10133,
    "preview": "/* Copyright (C) 2015-2016 Andrew J. Kroll\n   and\n Copyright (C) 2011 Circuits At Home, LTD. All rights reserved.\n\nThis "
  },
  {
    "path": "libraries/UHS_host/UHS_BULK_STORAGE/UHS_BULK_STORAGE_INLINE.h",
    "chars": 44665,
    "preview": "/* Copyright (C) 2015-2016 Andrew J. Kroll\n   and\nCopyright (C) 2011 Circuits At Home, LTD. All rights reserved.\n\nThis p"
  },
  {
    "path": "libraries/UHS_host/UHS_BULK_STORAGE/UHS_SCSI.h",
    "chars": 10402,
    "preview": "/* Copyright (C) 2015-2016 Andrew J. Kroll\n   and\nCopyright (C) 2011 Circuits At Home, LTD. All rights reserved.\n\nThis p"
  },
  {
    "path": "libraries/UHS_host/UHS_BULK_STORAGE/examples/UHS_KINETIS_FS_HOST/TEST_BULK_K/Makefile",
    "chars": 722,
    "preview": "#BOARD=teensy:avr:teensy30:usb=disable,speed=96,opt=o1std,keys=en-us\nBOARD=teensy:avr:teensy31:usb=disable,speed=96,opt="
  },
  {
    "path": "libraries/UHS_host/UHS_BULK_STORAGE/examples/UHS_KINETIS_FS_HOST/TEST_BULK_K/TEST_BULK_K.ino",
    "chars": 4254,
    "preview": "//////////////////////////////////////\n// libraries that we will be using\n//////////////////////////////////////\n// Patc"
  },
  {
    "path": "libraries/UHS_host/UHS_BULK_STORAGE/examples/USB_HOST_SHIELD/TEST_BULK/Makefile",
    "chars": 964,
    "preview": "#BOARD=arduino:samd:arduino_zero_edbg\n#BOARD=arduino:sam:arduino_due_x_dbg\n#BOARD=esp8266:esp8266:huzzah:CpuFrequency=80"
  },
  {
    "path": "libraries/UHS_host/UHS_BULK_STORAGE/examples/USB_HOST_SHIELD/TEST_BULK/TEST_BULK.ino",
    "chars": 4066,
    "preview": "// inline library loading\n// Load the USB Host System core\n#define LOAD_USB_HOST_SYSTEM\n// Load USB Host Shield\n#define "
  },
  {
    "path": "libraries/UHS_host/UHS_CDC/UHS_CDC.h",
    "chars": 9063,
    "preview": "/* Copyright (C) 2015-2016 Andrew J. Kroll\n   and\nCopyright (C) 2011 Circuits At Home, LTD. All rights reserved.\n\nThis p"
  },
  {
    "path": "libraries/UHS_host/UHS_CDC_ACM/UHS_CDC_ACM.h",
    "chars": 22308,
    "preview": "/* Copyright (C) 2015-2016 Andrew J. Kroll\n   and\nCopyright (C) 2011 Circuits At Home, LTD. All rights reserved.\n\nThis p"
  },
  {
    "path": "libraries/UHS_host/UHS_CDC_ACM/UHS_CDC_ACM_FTDI.h",
    "chars": 3852,
    "preview": "/* Copyright (C) 2015-2016 Andrew J. Kroll\n   and\nCopyright (C) 2011 Circuits At Home, LTD. All rights reserved.\n\nThis p"
  },
  {
    "path": "libraries/UHS_host/UHS_CDC_ACM/UHS_CDC_ACM_INLINE.h",
    "chars": 16999,
    "preview": "/* Copyright (C) 2015-2016 Andrew J. Kroll\n   and\nCopyright (C) 2011 Circuits At Home, LTD. All rights reserved.\n\nThis p"
  },
  {
    "path": "libraries/UHS_host/UHS_CDC_ACM/UHS_CDC_ACM_PROLIFIC.h",
    "chars": 5335,
    "preview": "/* Copyright (C) 2015-2016 Andrew J. Kroll\n   and\nCopyright (C) 2011 Circuits At Home, LTD. All rights reserved.\n\nThis p"
  },
  {
    "path": "libraries/UHS_host/UHS_CDC_ACM/UHS_CDC_ACM_XR21B1411.h",
    "chars": 5779,
    "preview": "/* Copyright (C) 2015-2016 Andrew J. Kroll\n   and\n   Circuits At Home, LTD. All rights reserved.\n\nThis program is free s"
  },
  {
    "path": "libraries/UHS_host/UHS_CDC_ACM/examples/UHS_KINETIS_EHCI/acm_terminal/Makefile",
    "chars": 356,
    "preview": "BOARD=teensy:avr:teensy36:usb=serial,speed=180,opt=o1std,keys=en-us\n\nPORT = /dev/ttyACM0\n\n# And finally, the part that b"
  },
  {
    "path": "libraries/UHS_host/UHS_CDC_ACM/examples/UHS_KINETIS_EHCI/acm_terminal/acm_terminal.ino",
    "chars": 3729,
    "preview": "// Load the USB Host System core\n#define LOAD_USB_HOST_SYSTEM\n// Load the Kinetis core\n#define LOAD_UHS_KINETIS_EHCI\n// "
  },
  {
    "path": "libraries/UHS_host/UHS_CDC_ACM/examples/UHS_KINETIS_FS_HOST/acm_terminal/Makefile",
    "chars": 722,
    "preview": "#BOARD=teensy:avr:teensy30:usb=disable,speed=96,opt=o1std,keys=en-us\nBOARD=teensy:avr:teensy31:usb=disable,speed=96,opt="
  },
  {
    "path": "libraries/UHS_host/UHS_CDC_ACM/examples/UHS_KINETIS_FS_HOST/acm_terminal/acm_terminal.ino",
    "chars": 5347,
    "preview": "// Load the USB Host System core\n#define LOAD_USB_HOST_SYSTEM\n// Load the Kinetis core\n#define LOAD_UHS_KINETIS_FS_HOST\n"
  },
  {
    "path": "libraries/UHS_host/UHS_CDC_ACM/examples/UHS_KINETIS_FS_HOST/buffered_acm_terminal/Makefile",
    "chars": 701,
    "preview": "#BOARD=teensy:avr:teensy30:usb=disable,speed=96,opt=o1std,keys=en-us\nBOARD=teensy:avr:teensy31:usb=disable,speed=96,opt="
  },
  {
    "path": "libraries/UHS_host/UHS_CDC_ACM/examples/UHS_KINETIS_FS_HOST/buffered_acm_terminal/buffered_acm_terminal.ino",
    "chars": 11852,
    "preview": "\n// Load the USB Host System core\n#define LOAD_USB_HOST_SYSTEM\n// Load the Kinetis core\n#define LOAD_UHS_KINETIS_FS_HOST"
  },
  {
    "path": "libraries/UHS_host/UHS_CDC_ACM/examples/USB_HOST_SHIELD/acm_terminal/Makefile",
    "chars": 965,
    "preview": "#BOARD=arduino:samd:arduino_zero_edbg\n#BOARD=arduino:sam:arduino_due_x_dbg\n#BOARD=esp8266:esp8266:huzzah:CpuFrequency=80"
  },
  {
    "path": "libraries/UHS_host/UHS_CDC_ACM/examples/USB_HOST_SHIELD/acm_terminal/acm_terminal.ino",
    "chars": 3763,
    "preview": "// Load the USB Host System core\n#define LOAD_USB_HOST_SYSTEM\n// Load USB Host Shield\n#define LOAD_USB_HOST_SHIELD\n// Us"
  },
  {
    "path": "libraries/UHS_host/UHS_CDC_ACM/examples/USB_HOST_SHIELD/buffered_acm_terminal/Makefile",
    "chars": 1013,
    "preview": "#BOARD=arduino:samd:arduino_zero_edbg\n#BOARD=arduino:sam:arduino_due_x_dbg\n#BOARD=esp8266:esp8266:huzzah:CpuFrequency=80"
  },
  {
    "path": "libraries/UHS_host/UHS_CDC_ACM/examples/USB_HOST_SHIELD/buffered_acm_terminal/buffered_acm_terminal.ino",
    "chars": 10031,
    "preview": "\n// The data rate on the device must be < host, 115200/2 = 57600\n#define CLIENT_SERIAL_SPEED 57600\n#define HOST_SERIAL_S"
  },
  {
    "path": "libraries/UHS_host/UHS_HID/HIDBOOT/UHS_HIDRAWBOOT_KEYBOARD.h",
    "chars": 4239,
    "preview": "/* Copyright (C) 2015-2016 Andrew J. Kroll\n   and\nCopyright (C) 2011 Circuits At Home, LTD. All rights reserved.\n\nThis p"
  },
  {
    "path": "libraries/UHS_host/UHS_HID/HIDBOOT/UHS_HIDRAWBOOT_MOUSE.h",
    "chars": 3660,
    "preview": "/* Copyright (C) 2015-2016 Andrew J. Kroll\n   and\nCopyright (C) 2011 Circuits At Home, LTD. All rights reserved.\n\nThis p"
  },
  {
    "path": "libraries/UHS_host/UHS_HID/UHS_HID.h",
    "chars": 5198,
    "preview": "/* Copyright (C) 2015-2016 Andrew J. Kroll\n   and\nCopyright (C) 2011 Circuits At Home, LTD. All rights reserved.\n\nThis p"
  },
  {
    "path": "libraries/UHS_host/UHS_HID/UHS_HID_INLINE.h",
    "chars": 7205,
    "preview": "/* Copyright (C) 2015-2016 Andrew J. Kroll\n   and\nCopyright (C) 2011 Circuits At Home, LTD. All rights reserved.\n\nThis p"
  },
  {
    "path": "libraries/UHS_host/UHS_HID/examples/USB_HOST_SHIELD/UHS_HID_KB_MOUSE/Makefile",
    "chars": 1028,
    "preview": "#BOARD=arduino:samd:arduino_zero_edbg\n#BOARD=arduino:sam:arduino_due_x_dbg\n#BOARD=esp8266:esp8266:huzzah:CpuFrequency=80"
  },
  {
    "path": "libraries/UHS_host/UHS_HID/examples/USB_HOST_SHIELD/UHS_HID_KB_MOUSE/UHS_HID_KB_MOUSE.ino",
    "chars": 18921,
    "preview": "// Load the USB Host System core\n#define LOAD_USB_HOST_SYSTEM\n// Load USB Host Shield\n#define LOAD_USB_HOST_SHIELD\n// Us"
  },
  {
    "path": "libraries/UHS_host/UHS_HID/examples/USB_HOST_SHIELD/UHS_HID_RAW/Makefile",
    "chars": 993,
    "preview": "#BOARD=arduino:samd:arduino_zero_edbg\n#BOARD=arduino:sam:arduino_due_x_dbg\n#BOARD=esp8266:esp8266:huzzah:CpuFrequency=80"
  },
  {
    "path": "libraries/UHS_host/UHS_HID/examples/USB_HOST_SHIELD/UHS_HID_RAW/UHS_HID_RAW.ino",
    "chars": 1998,
    "preview": "// Load the USB Host System core\n#define LOAD_USB_HOST_SYSTEM\n// Load USB Host Shield\n#define LOAD_USB_HOST_SHIELD\n// Us"
  },
  {
    "path": "libraries/UHS_host/UHS_HUB/UHS_HUB.h",
    "chars": 13181,
    "preview": "/* Copyright (C) 2015-2016 Andrew J. Kroll\n   and\nCopyright (C) 2011 Circuits At Home, LTD. All rights reserved.\n\nThis p"
  },
  {
    "path": "libraries/UHS_host/UHS_HUB/UHS_HUB_INLINE.h",
    "chars": 19214,
    "preview": "/* Copyright (C) 2015-2016 Andrew J. Kroll\n   and\nCopyright (C) 2011 Circuits At Home, LTD. All rights reserved.\n\nThis p"
  },
  {
    "path": "libraries/UHS_host/UHS_KINETIS_EHCI/UHS_KINETIS_EHCI.h",
    "chars": 11560,
    "preview": "/*\n * File:   UHS_KINETIS_EHCI.h\n * Author: root\n *\n * Created on July 31, 2016, 1:00 AM\n */\n\n\n/*\n * Notes.\n *\n *\n * Sup"
  },
  {
    "path": "libraries/UHS_host/UHS_KINETIS_EHCI/UHS_KINETIS_EHCI_INLINE.h",
    "chars": 39740,
    "preview": "/*\n * File:   UHS_KINETIS_EHCI_INLINE.h\n * Author: root\n *\n * Created on July 31, 2016, 1:01 AM\n *\n * This is a simplifi"
  },
  {
    "path": "libraries/UHS_host/UHS_KINETIS_EHCI/examples/KINETIS_EHCI_TEST/KINETIS_EHCI_TEST.ino",
    "chars": 4649,
    "preview": "// Send an 's' to print out the INTEN and CTL registers.\n// Send a 'p' to print out status of the interface.\n\n// inline "
  },
  {
    "path": "libraries/UHS_host/UHS_KINETIS_EHCI/examples/KINETIS_EHCI_TEST/Makefile",
    "chars": 375,
    "preview": "BOARD=teensy:avr:teensy36:usb=serial,speed=180,opt=o1std,keys=en-us\n#BOARD=teensy:avr:teensy36:usb=serial,speed=96,opt=o"
  },
  {
    "path": "libraries/UHS_host/UHS_KINETIS_FS_HOST/UHS_KINETIS_FS_HOST.h",
    "chars": 10775,
    "preview": "/* Copyright (C) 2015-2016 Andrew J. Kroll\n   and\nCopyright (C) 2011 Circuits At Home, LTD. All rights reserved.\n\nThis p"
  },
  {
    "path": "libraries/UHS_host/UHS_KINETIS_FS_HOST/UHS_KINETIS_FS_HOST_INLINE.h",
    "chars": 42411,
    "preview": "/* Copyright (C) 2015-2016 Andrew J. Kroll\n   and\nCopyright (C) 2011 Circuits At Home, LTD. All rights reserved.\n\nThis p"
  },
  {
    "path": "libraries/UHS_host/UHS_KINETIS_FS_HOST/examples/KINETIS_DEV_DESC/KINETIS_DEV_DESC.ino",
    "chars": 4845,
    "preview": "#include <Arduino.h>\n#ifdef true\n#undef true\n#endif\n#ifdef false\n#undef false\n#endif\n\n#define LOAD_USB_HOST_SYSTEM\n#defi"
  },
  {
    "path": "libraries/UHS_host/UHS_KINETIS_FS_HOST/examples/KINETIS_DEV_DESC/Makefile",
    "chars": 792,
    "preview": "#BOARD=teensy:avr:teensy30:usb=disable,speed=96,opt=o1std,keys=en-us\nBOARD=teensy:avr:teensy31:usb=disable,speed=96,opt="
  },
  {
    "path": "libraries/UHS_host/UHS_KINETIS_FS_HOST/examples/KINETIS_TEST/KINETIS_TEST.ino",
    "chars": 1704,
    "preview": "// Redirect debugging and printf\n#define USB_HOST_SERIAL Serial1\n\n// inline library loading\n// Patch printf so we can us"
  },
  {
    "path": "libraries/UHS_host/UHS_KINETIS_FS_HOST/examples/KINETIS_TEST/Makefile",
    "chars": 722,
    "preview": "#BOARD=teensy:avr:teensy30:usb=disable,speed=96,opt=o1std,keys=en-us\nBOARD=teensy:avr:teensy31:usb=disable,speed=96,opt="
  },
  {
    "path": "libraries/UHS_host/UHS_KINETIS_FS_HOST/examples/TEST_KINETIS_BULK/Makefile",
    "chars": 722,
    "preview": "#BOARD=teensy:avr:teensy30:usb=disable,speed=96,opt=o1std,keys=en-us\nBOARD=teensy:avr:teensy31:usb=disable,speed=96,opt="
  }
]

// ... and 52 more files (download for full content)

About this extraction

This page contains the full source code of the felis/UHS30 GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 252 files (4.1 MB), approximately 1.1M tokens, and a symbol index with 442 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!