-<Project name="LUFA"><Folder name="Demos"><Folder name="Device"><Folder name="ClassDriver"><Folder name="AudioInput"><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.c"></File><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.h"></File><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.txt"></File><File path="Demos\Device\ClassDriver\AudioInput\Descriptors.c"></File><File path="Demos\Device\ClassDriver\AudioInput\Descriptors.h"></File><File path="Demos\Device\ClassDriver\AudioInput\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\AudioInput\makefile"></File></Folder><Folder name="AudioOutput"><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.c"></File><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.h"></File><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.txt"></File><File path="Demos\Device\ClassDriver\AudioOutput\Descriptors.c"></File><File path="Demos\Device\ClassDriver\AudioOutput\Descriptors.h"></File><File path="Demos\Device\ClassDriver\AudioOutput\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\AudioOutput\makefile"></File></Folder><Folder name="DualVirtualSerial"><File path="Demos\Device\ClassDriver\DualVirtualSerial\Descriptors.c"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\Descriptors.h"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\DualVirtualSerial.c"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\DualVirtualSerial.h"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\DualVirtualSerial.txt"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\LUFA DualVirtualSerial.inf"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\makefile"></File></Folder><Folder name="GenericHID"><File path="Demos\Device\ClassDriver\GenericHID\Descriptors.c"></File><File path="Demos\Device\ClassDriver\GenericHID\Descriptors.h"></File><File path="Demos\Device\ClassDriver\GenericHID\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.c"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.h"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.txt"></File><File path="Demos\Device\ClassDriver\GenericHID\makefile"></File></Folder><Folder name="Joystick"><File path="Demos\Device\ClassDriver\Joystick\Descriptors.c"></File><File path="Demos\Device\ClassDriver\Joystick\Descriptors.h"></File><File path="Demos\Device\ClassDriver\Joystick\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.c"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.h"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.txt"></File><File path="Demos\Device\ClassDriver\Joystick\makefile"></File></Folder><Folder name="Keyboard"><File path="Demos\Device\ClassDriver\Keyboard\Descriptors.c"></File><File path="Demos\Device\ClassDriver\Keyboard\Descriptors.h"></File><File path="Demos\Device\ClassDriver\Keyboard\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.c"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.h"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.txt"></File><File path="Demos\Device\ClassDriver\Keyboard\makefile"></File></Folder><Folder name="KeyboardMouse"><File path="Demos\Device\ClassDriver\KeyboardMouse\Descriptors.c"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\Descriptors.h"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.c"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.h"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.txt"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\makefile"></File></Folder><Folder name="MassStorage"><Folder name="Lib"><File path="Demos\Device\ClassDriver\MassStorage\Lib\DataflashManager.c"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\DataflashManager.h"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\SCSI.c"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\SCSI.h"></File></Folder><File path="Demos\Device\ClassDriver\MassStorage\Descriptors.c"></File><File path="Demos\Device\ClassDriver\MassStorage\Descriptors.h"></File><File path="Demos\Device\ClassDriver\MassStorage\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\MassStorage\makefile"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.c"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.h"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.txt"></File></Folder><Folder name="MassStorageKeyboard"><Folder name="Lib"><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\DataflashManager.c"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\DataflashManager.h"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\SCSI.c"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\SCSI.h"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\SCSI_Codes.h"></File></Folder><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Descriptors.c"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Descriptors.h"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\makefile"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\MassStorageKeyboard.c"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\MassStorageKeyboard.h"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\MassStorageKeyboard.txt"></File></Folder><Folder name="MIDI"><File path="Demos\Device\ClassDriver\MIDI\Descriptors.c"></File><File path="Demos\Device\ClassDriver\MIDI\Descriptors.h"></File><File path="Demos\Device\ClassDriver\MIDI\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\MIDI\makefile"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.c"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.h"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.txt"></File></Folder><Folder name="Mouse"><File path="Demos\Device\ClassDriver\Mouse\Descriptors.c"></File><File path="Demos\Device\ClassDriver\Mouse\Descriptors.h"></File><File path="Demos\Device\ClassDriver\Mouse\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\Mouse\makefile"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.c"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.h"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.txt"></File></Folder><Folder name="RNDISEthernet"><Folder name="Lib"><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Webserver.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ARP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ARP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\DHCP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\DHCP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Ethernet.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Ethernet.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\EthernetProtocols.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ICMP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ICMP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\IP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\IP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ProtocolDecoders.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ProtocolDecoders.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\TCP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\TCP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\UDP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\UDP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Webserver.c"></File></Folder><File path="Demos\Device\ClassDriver\RNDISEthernet\Descriptors.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Descriptors.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\LUFA RNDIS.inf"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\makefile"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.txt"></File></Folder><Folder name="VirtualSerial"><File path="Demos\Device\ClassDriver\VirtualSerial\Descriptors.c"></File><File path="Demos\Device\ClassDriver\VirtualSerial\Descriptors.h"></File><File path="Demos\Device\ClassDriver\VirtualSerial\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\VirtualSerial\LUFA VirtualSerial.inf"></File><File path="Demos\Device\ClassDriver\VirtualSerial\makefile"></File><File path="Demos\Device\ClassDriver\VirtualSerial\VirtualSerial.c"></File><File path="Demos\Device\ClassDriver\VirtualSerial\VirtualSerial.h"></File><File path="Demos\Device\ClassDriver\VirtualSerial\VirtualSerial.txt"></File></Folder><Folder name="VirtualSerialMouse"><File path="Demos\Device\ClassDriver\VirtualSerialMouse\Descriptors.c"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\Descriptors.h"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\LUFA VirtualSerialMouse.inf"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\makefile"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\VirtualSerialMouse.c"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\VirtualSerialMouse.h"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\VirtualSerialMouse.txt"></File></Folder><File path="Demos\Device\ClassDriver\makefile"></File></Folder><Folder name="LowLevel"><Folder name="AudioInput"><File path="Demos\Device\LowLevel\AudioInput\AudioInput.c"></File><File path="Demos\Device\LowLevel\AudioInput\AudioInput.h"></File><File path="Demos\Device\LowLevel\AudioInput\AudioInput.txt"></File><File path="Demos\Device\LowLevel\AudioInput\Descriptors.c"></File><File path="Demos\Device\LowLevel\AudioInput\Descriptors.h"></File><File path="Demos\Device\LowLevel\AudioInput\Doxygen.conf"></File><File path="Demos\Device\LowLevel\AudioInput\makefile"></File></Folder><Folder name="AudioOutput"><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.c"></File><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.h"></File><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.txt"></File><File path="Demos\Device\LowLevel\AudioOutput\Descriptors.c"></File><File path="Demos\Device\LowLevel\AudioOutput\Descriptors.h"></File><File path="Demos\Device\LowLevel\AudioOutput\Doxygen.conf"></File><File path="Demos\Device\LowLevel\AudioOutput\makefile"></File></Folder><Folder name="DualVirtualSerial"><File path="Demos\Device\LowLevel\DualVirtualSerial\Descriptors.c"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\Descriptors.h"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\Doxygen.conf"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\DualVirtualSerial.c"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\DualVirtualSerial.h"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\DualVirtualSerial.txt"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\LUFA DualVirtualSerial.inf"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\makefile"></File></Folder><Folder name="GenericHID"><File path="Demos\Device\LowLevel\GenericHID\Descriptors.c"></File><File path="Demos\Device\LowLevel\GenericHID\Descriptors.h"></File><File path="Demos\Device\LowLevel\GenericHID\Doxygen.conf"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.c"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.h"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.txt"></File><File path="Demos\Device\LowLevel\GenericHID\makefile"></File></Folder><Folder name="Joystick"><File path="Demos\Device\LowLevel\Joystick\Descriptors.c"></File><File path="Demos\Device\LowLevel\Joystick\Descriptors.h"></File><File path="Demos\Device\LowLevel\Joystick\Doxygen.conf"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.c"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.h"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.txt"></File><File path="Demos\Device\LowLevel\Joystick\makefile"></File></Folder><Folder name="Keyboard"><File path="Demos\Device\LowLevel\Keyboard\Descriptors.c"></File><File path="Demos\Device\LowLevel\Keyboard\Descriptors.h"></File><File path="Demos\Device\LowLevel\Keyboard\Doxygen.conf"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.c"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.h"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.txt"></File><File path="Demos\Device\LowLevel\Keyboard\makefile"></File></Folder><Folder name="KeyboardMouse"><File path="Demos\Device\LowLevel\KeyboardMouse\Descriptors.c"></File><File path="Demos\Device\LowLevel\KeyboardMouse\Descriptors.h"></File><File path="Demos\Device\LowLevel\KeyboardMouse\Doxygen.conf"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.c"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.h"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.txt"></File><File path="Demos\Device\LowLevel\KeyboardMouse\makefile"></File></Folder><Folder name="MassStorage"><Folder name="Lib"><File path="Demos\Device\LowLevel\MassStorage\Lib\DataflashManager.c"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\DataflashManager.h"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\SCSI.c"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\SCSI.h"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\SCSI_Codes.h"></File></Folder><File path="Demos\Device\LowLevel\MassStorage\Descriptors.c"></File><File path="Demos\Device\LowLevel\MassStorage\Descriptors.h"></File><File path="Demos\Device\LowLevel\MassStorage\Doxygen.conf"></File><File path="Demos\Device\LowLevel\MassStorage\makefile"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.c"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.h"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.txt"></File></Folder><Folder name="MIDI"><File path="Demos\Device\LowLevel\MIDI\Descriptors.c"></File><File path="Demos\Device\LowLevel\MIDI\Descriptors.h"></File><File path="Demos\Device\LowLevel\MIDI\Doxygen.conf"></File><File path="Demos\Device\LowLevel\MIDI\makefile"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.c"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.h"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.txt"></File></Folder><Folder name="Mouse"><File path="Demos\Device\LowLevel\Mouse\Descriptors.c"></File><File path="Demos\Device\LowLevel\Mouse\Descriptors.h"></File><File path="Demos\Device\LowLevel\Mouse\Doxygen.conf"></File><File path="Demos\Device\LowLevel\Mouse\makefile"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.c"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.h"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.txt"></File></Folder><Folder name="RNDISEthernet"><Folder name="Lib"><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Webserver.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ARP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ARP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\DHCP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\DHCP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Ethernet.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Ethernet.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\EthernetProtocols.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ICMP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ICMP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\IP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\IP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ProtocolDecoders.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ProtocolDecoders.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\RNDIS.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\RNDIS.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\RNDISConstants.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\TCP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\TCP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\UDP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\UDP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Webserver.c"></File></Folder><File path="Demos\Device\LowLevel\RNDISEthernet\Descriptors.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Descriptors.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Doxygen.conf"></File><File path="Demos\Device\LowLevel\RNDISEthernet\LUFA RNDIS.inf"></File><File path="Demos\Device\LowLevel\RNDISEthernet\makefile"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.txt"></File></Folder><Folder name="VirtualSerial"><File path="Demos\Device\LowLevel\VirtualSerial\Descriptors.c"></File><File path="Demos\Device\LowLevel\VirtualSerial\Descriptors.h"></File><File path="Demos\Device\LowLevel\VirtualSerial\Doxygen.conf"></File><File path="Demos\Device\LowLevel\VirtualSerial\LUFA VirtualSerial.inf"></File><File path="Demos\Device\LowLevel\VirtualSerial\makefile"></File><File path="Demos\Device\LowLevel\VirtualSerial\VirtualSerial.c"></File><File path="Demos\Device\LowLevel\VirtualSerial\VirtualSerial.h"></File><File path="Demos\Device\LowLevel\VirtualSerial\VirtualSerial.txt"></File></Folder><File path="Demos\Device\LowLevel\makefile"></File></Folder><Folder name="Incomplete"><Folder name="SideShow"><Folder name="Lib"><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowApplications.c"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowApplications.h"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowCommands.c"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowCommands.h"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowCommon.c"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowCommon.h"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowContent.c"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowContent.h"></File></Folder><File path="Demos\Device\Incomplete\Sideshow\Descriptors.c"></File><File path="Demos\Device\Incomplete\Sideshow\Descriptors.h"></File><File path="Demos\Device\Incomplete\Sideshow\makefile"></File><File path="Demos\Device\Incomplete\Sideshow\Sideshow.c"></File><File path="Demos\Device\Incomplete\Sideshow\Sideshow.h"></File></Folder></Folder><File path="Demos\Device\makefile"></File></Folder><Folder name="Host"><Folder name="ClassDriver"><Folder name="JoystickHostWithParser"><File path="Demos\Host\ClassDriver\JoystickHostWithParser\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\JoystickHostWithParser\JoystickHostWithParser.c"></File><File path="Demos\Host\ClassDriver\JoystickHostWithParser\JoystickHostWithParser.h"></File><File path="Demos\Host\ClassDriver\JoystickHostWithParser\JoystickHostWithParser.txt"></File><File path="Demos\Host\ClassDriver\JoystickHostWithParser\makefile"></File></Folder><Folder name="KeyboardHost"><File path="Demos\Host\ClassDriver\KeyboardHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\KeyboardHost\KeyboardHost.c"></File><File path="Demos\Host\ClassDriver\KeyboardHost\KeyboardHost.h"></File><File path="Demos\Host\ClassDriver\KeyboardHost\makefile"></File><File path="Demos\Host\ClassDriver\KeyboardHost\KeyboardHost.txt"></File></Folder><Folder name="KeyboardHostWithParser"><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\KeyboardHostWithParser.c"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\KeyboardHostWithParser.h"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\makefile"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\KeyboardHostWithParser.txt"></File></Folder><Folder name="MIDIHost"><File path="Demos\Host\ClassDriver\MIDIHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\MIDIHost\makefile"></File><File path="Demos\Host\ClassDriver\MIDIHost\MIDIHost.c"></File><File path="Demos\Host\ClassDriver\MIDIHost\MIDIHost.h"></File><File path="Demos\Host\ClassDriver\MIDIHost\MIDIHost.txt"></File></Folder><Folder name="MouseHost"><File path="Demos\Host\ClassDriver\MouseHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\MouseHost\makefile"></File><File path="Demos\Host\ClassDriver\MouseHost\MouseHost.c"></File><File path="Demos\Host\ClassDriver\MouseHost\MouseHost.h"></File><File path="Demos\Host\ClassDriver\MouseHost\MouseHost.txt"></File></Folder><Folder name="MouseHostWithParser"><File path="Demos\Host\ClassDriver\MouseHostWithParser\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\makefile"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\MouseHostWithParser.txt"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\MouseHostWithParser.c"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\MouseHostWithParser.h"></File></Folder><Folder name="MassStorageHost"><File path="Demos\Host\ClassDriver\MassStorageHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\MassStorageHost\makefile"></File><File path="Demos\Host\ClassDriver\MassStorageHost\MassStorageHost.c"></File><File path="Demos\Host\ClassDriver\MassStorageHost\MassStorageHost.h"></File><File path="Demos\Host\ClassDriver\MassStorageHost\MassStorageHost.txt"></File></Folder><Folder name="PrinterHost"><File path="Demos\Host\ClassDriver\PrinterHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\PrinterHost\makefile"></File><File path="Demos\Host\ClassDriver\PrinterHost\PrinterHost.c"></File><File path="Demos\Host\ClassDriver\PrinterHost\PrinterHost.h"></File><File path="Demos\Host\ClassDriver\PrinterHost\PrinterHost.txt"></File></Folder><Folder name="RNDISEthernetHost"><File path="Demos\Host\ClassDriver\RNDISEthernetHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\RNDISEthernetHost\makefile"></File><File path="Demos\Host\ClassDriver\RNDISEthernetHost\RNDISEthernetHost.c"></File><File path="Demos\Host\ClassDriver\RNDISEthernetHost\RNDISEthernetHost.h"></File><File path="Demos\Host\ClassDriver\RNDISEthernetHost\RNDISEthernetHost.txt"></File></Folder><Folder name="StillImageHost"><File path="Demos\Host\ClassDriver\StillImageHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\StillImageHost\makefile"></File><File path="Demos\Host\ClassDriver\StillImageHost\StillImageHost.c"></File><File path="Demos\Host\ClassDriver\StillImageHost\StillImageHost.h"></File><File path="Demos\Host\ClassDriver\StillImageHost\StillImageHost.txt"></File></Folder><Folder name="VirtualSerialHost"><File path="Demos\Host\ClassDriver\VirtualSerialHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\VirtualSerialHost\makefile"></File><File path="Demos\Host\ClassDriver\VirtualSerialHost\VirtualSerialHost.c"></File><File path="Demos\Host\ClassDriver\VirtualSerialHost\VirtualSerialHost.h"></File><File path="Demos\Host\ClassDriver\VirtualSerialHost\VirtualSerialHost.txt"></File></Folder><File path="Demos\Host\ClassDriver\makefile"></File></Folder><Folder name="LowLevel"><Folder name="GenericHIDHost"><File path="Demos\Host\LowLevel\GenericHIDHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\GenericHIDHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\GenericHIDHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\GenericHIDHost\GenericHIDHost.c"></File><File path="Demos\Host\LowLevel\GenericHIDHost\GenericHIDHost.h"></File><File path="Demos\Host\LowLevel\GenericHIDHost\GenericHIDHost.txt"></File><File path="Demos\Host\LowLevel\GenericHIDHost\makefile"></File></Folder><Folder name="JoystickHostWithParser"><File path="Demos\Host\LowLevel\JoystickHostWithParser\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\Doxygen.conf"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\HIDReport.c"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\HIDReport.h"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\JoystickHostWithParser.c"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\JoystickHostWithParser.h"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\JoystickHostWithParser.txt"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\makefile"></File></Folder><Folder name="KeyboardHost"><File path="Demos\Host\LowLevel\KeyboardHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\KeyboardHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\KeyboardHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\KeyboardHost\KeyboardHost.c"></File><File path="Demos\Host\LowLevel\KeyboardHost\KeyboardHost.h"></File><File path="Demos\Host\LowLevel\KeyboardHost\KeyboardHost.txt"></File><File path="Demos\Host\LowLevel\KeyboardHost\makefile"></File></Folder><Folder name="KeyboardHostWithParser"><File path="Demos\Host\LowLevel\KeyboardHostWithParser\makefile"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\Doxygen.conf"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\HIDReport.c"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\HIDReport.h"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\KeyboardHostWithParser.c"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\KeyboardHostWithParser.h"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\KeyboardHostWithParser.txt"></File></Folder><Folder name="MassStorageHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\MassStorageHost\Lib\MassStoreCommands.c"></File><File path="Demos\Host\LowLevel\MassStorageHost\Lib\MassStoreCommands.h"></File><File path="Demos\Host\LowLevel\MassStorageHost\Lib\SCSI_Codes.h"></File></Folder><File path="Demos\Host\LowLevel\MassStorageHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MassStorageHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MassStorageHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MassStorageHost\makefile"></File><File path="Demos\Host\LowLevel\MassStorageHost\MassStorageHost.c"></File><File path="Demos\Host\LowLevel\MassStorageHost\MassStorageHost.h"></File><File path="Demos\Host\LowLevel\MassStorageHost\MassStorageHost.txt"></File></Folder><Folder name="MIDIHost"><File path="Demos\Host\LowLevel\MIDIHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MIDIHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MIDIHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MIDIHost\makefile"></File><File path="Demos\Host\LowLevel\MIDIHost\MIDIHost.c"></File><File path="Demos\Host\LowLevel\MIDIHost\MIDIHost.h"></File><File path="Demos\Host\LowLevel\MIDIHost\MIDIHost.txt"></File></Folder><Folder name="MouseHost"><File path="Demos\Host\LowLevel\MouseHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MouseHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MouseHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MouseHost\makefile"></File><File path="Demos\Host\LowLevel\MouseHost\MouseHost.c"></File><File path="Demos\Host\LowLevel\MouseHost\MouseHost.h"></File><File path="Demos\Host\LowLevel\MouseHost\MouseHost.txt"></File></Folder><Folder name="MouseHostWithParser"><File path="Demos\Host\LowLevel\MouseHostWithParser\MouseHostWithParser.txt"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\HIDReport.c"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\HIDReport.h"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\makefile"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\MouseHostWithParser.c"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\MouseHostWithParser.h"></File></Folder><Folder name="PrinterHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\PrinterHost\Lib\PrinterCommands.c"></File><File path="Demos\Host\LowLevel\PrinterHost\Lib\PrinterCommands.h"></File></Folder><File path="Demos\Host\LowLevel\PrinterHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\PrinterHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\PrinterHost\makefile"></File><File path="Demos\Host\LowLevel\PrinterHost\PrinterHost.c"></File><File path="Demos\Host\LowLevel\PrinterHost\PrinterHost.h"></File><File path="Demos\Host\LowLevel\PrinterHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\PrinterHost\PrinterHost.txt"></File></Folder><Folder name="RNDISEthernetHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\RNDISEthernetHost\Lib\RNDISCommands.c"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\Lib\RNDISCommands.h"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\Lib\RNDISConstants.h"></File></Folder><File path="Demos\Host\LowLevel\RNDISEthernetHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\makefile"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\RNDISEthernetHost.c"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\RNDISEthernetHost.h"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\RNDISHost.txt"></File></Folder><Folder name="StillImageHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\StillImageHost\Lib\PIMACodes.h"></File><File path="Demos\Host\LowLevel\StillImageHost\Lib\StillImageCommands.c"></File><File path="Demos\Host\LowLevel\StillImageHost\Lib\StillImageCommands.h"></File></Folder><File path="Demos\Host\LowLevel\StillImageHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\StillImageHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\StillImageHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\StillImageHost\makefile"></File><File path="Demos\Host\LowLevel\StillImageHost\StillImageHost.c"></File><File path="Demos\Host\LowLevel\StillImageHost\StillImageHost.h"></File><File path="Demos\Host\LowLevel\StillImageHost\StillImageHost.txt"></File></Folder><Folder name="VirtualSerialHost"><File path="Demos\Host\LowLevel\VirtualSerialHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\makefile"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\VirtualSerialHost.c"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\VirtualSerialHost.h"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\VirtualSerialHost.txt"></File></Folder><File path="Demos\Host\LowLevel\makefile"></File></Folder><Folder name="Incomplete"><Folder name="BluetoothHost"><Folder name="Lib"><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothACLPackets.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothACLPackets.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothClassCodes.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothHCICommands.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothHCICommands.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothStack.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothStack.h"></File></Folder><File path="Demos\Host\Incomplete\BluetoothHost\makefile"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothHost.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothHost.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\ConfigDescriptor.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\ConfigDescriptor.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\DeviceDescriptor.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\DeviceDescriptor.h"></File></Folder></Folder><File path="Demos\Host\makefile"></File></Folder><Folder name="DualRole"><Folder name="ClassDriver"><Folder name="MouseHostDevice"><File path="Demos\DualRole\ClassDriver\MouseHostDevice\Doxygen.conf"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\makefile"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\MouseHostDevice.c"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\MouseHostDevice.h"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\Descriptors.c"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\Descriptors.h"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\DeviceFunctions.c"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\HostFunctions.c"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\HostFunctions.h"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\DeviceFunctions.h"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\MouseHostDevice.txt"></File></Folder><File path="Demos\DualRole\ClassDriver\makefile"></File></Folder><File path="Demos\DualRole\makefile"></File></Folder><File path="Demos\makefile"></File></Folder><Folder name="LUFA"><Folder name="Common"><File path="LUFA\Common\Common.h"></File><File path="LUFA\Common\FunctionAttributes.h"></File><File path="LUFA\Common\BoardTypes.h"></File></Folder><Folder name="Drivers"><Folder name="USB"><Folder name="LowLevel"><Folder name="Template"><File path="LUFA\Drivers\USB\LowLevel\Template\Template_Endpoint_RW.c"></File><File path="LUFA\Drivers\USB\LowLevel\Template\Template_Endpoint_Control_R.c"></File><File path="LUFA\Drivers\USB\LowLevel\Template\Template_Endpoint_Control_W.c"></File><File path="LUFA\Drivers\USB\LowLevel\Template\Template_Pipe_RW.c"></File></Folder><File path="LUFA\Drivers\USB\LowLevel\HostChapter9.h"></File><File path="LUFA\Drivers\USB\LowLevel\LowLevel.c"></File><File path="LUFA\Drivers\USB\LowLevel\LowLevel.h"></File><File path="LUFA\Drivers\USB\LowLevel\Pipe.c"></File><File path="LUFA\Drivers\USB\LowLevel\Pipe.h"></File><File path="LUFA\Drivers\USB\LowLevel\DevChapter9.c"></File><File path="LUFA\Drivers\USB\LowLevel\DevChapter9.h"></File><File path="LUFA\Drivers\USB\LowLevel\Device.h"></File><File path="LUFA\Drivers\USB\LowLevel\Endpoint.c"></File><File path="LUFA\Drivers\USB\LowLevel\Endpoint.h"></File><File path="LUFA\Drivers\USB\LowLevel\Host.c"></File><File path="LUFA\Drivers\USB\LowLevel\Host.h"></File><File path="LUFA\Drivers\USB\LowLevel\HostChapter9.c"></File><File path="LUFA\Drivers\USB\LowLevel\OTG.h"></File></Folder><Folder name="HighLevel"><File path="LUFA\Drivers\USB\HighLevel\USBTask.h"></File><File path="LUFA\Drivers\USB\HighLevel\Events.c"></File><File path="LUFA\Drivers\USB\HighLevel\Events.h"></File><File path="LUFA\Drivers\USB\HighLevel\USBInterrupt.c"></File><File path="LUFA\Drivers\USB\HighLevel\USBInterrupt.h"></File><File path="LUFA\Drivers\USB\HighLevel\USBTask.c"></File><File path="LUFA\Drivers\USB\HighLevel\StdDescriptors.h"></File><File path="LUFA\Drivers\USB\HighLevel\StdRequestType.h"></File><File path="LUFA\Drivers\USB\HighLevel\StreamCallbacks.h"></File><File path="LUFA\Drivers\USB\HighLevel\USBMode.h"></File><File path="LUFA\Drivers\USB\HighLevel\ConfigDescriptor.c"></File><File path="LUFA\Drivers\USB\HighLevel\ConfigDescriptor.h"></File></Folder><Folder name="Class"><Folder name="Device"><File path="LUFA\Drivers\USB\Class\Device\HID.c"></File><File path="LUFA\Drivers\USB\Class\Device\HID.h"></File><File path="LUFA\Drivers\USB\Class\Device\CDC.c"></File><File path="LUFA\Drivers\USB\Class\Device\CDC.h"></File><File path="LUFA\Drivers\USB\Class\Device\RNDIS.c"></File><File path="LUFA\Drivers\USB\Class\Device\RNDIS.h"></File><File path="LUFA\Drivers\USB\Class\Device\MassStorage.c"></File><File path="LUFA\Drivers\USB\Class\Device\MassStorage.h"></File><File path="LUFA\Drivers\USB\Class\Device\Audio.c"></File><File path="LUFA\Drivers\USB\Class\Device\Audio.h"></File><File path="LUFA\Drivers\USB\Class\Device\MIDI.c"></File><File path="LUFA\Drivers\USB\Class\Device\MIDI.h"></File></Folder><Folder name="Host"><File path="LUFA\Drivers\USB\Class\Host\HIDParser.c"></File><File path="LUFA\Drivers\USB\Class\Host\HIDParser.h"></File><File path="LUFA\Drivers\USB\Class\Host\HIDReportData.h"></File><File path="LUFA\Drivers\USB\Class\Host\CDC.c"></File><File path="LUFA\Drivers\USB\Class\Host\CDC.h"></File><File path="LUFA\Drivers\USB\Class\Host\HID.c"></File><File path="LUFA\Drivers\USB\Class\Host\HID.h"></File><File path="LUFA\Drivers\USB\Class\Host\MassStorage.c"></File><File path="LUFA\Drivers\USB\Class\Host\MassStorage.h"></File><File path="LUFA\Drivers\USB\Class\Host\StillImage.c"></File><File path="LUFA\Drivers\USB\Class\Host\StillImage.h"></File><File path="LUFA\Drivers\USB\Class\Host\MIDI.c"></File><File path="LUFA\Drivers\USB\Class\Host\MIDI.h"></File><File path="LUFA\Drivers\USB\Class\Host\Printer.c"></File><File path="LUFA\Drivers\USB\Class\Host\Printer.h"></File><File path="LUFA\Drivers\USB\Class\Host\RNDIS.h"></File><File path="LUFA\Drivers\USB\Class\Host\RNDIS.c"></File></Folder><Folder name="Common"><File path="LUFA\Drivers\USB\Class\Common\Audio.h"></File><File path="LUFA\Drivers\USB\Class\Common\CDC.h"></File><File path="LUFA\Drivers\USB\Class\Common\HID.h"></File><File path="LUFA\Drivers\USB\Class\Common\MassStorage.h"></File><File path="LUFA\Drivers\USB\Class\Common\MIDI.h"></File><File path="LUFA\Drivers\USB\Class\Common\RNDIS.h"></File><File path="LUFA\Drivers\USB\Class\Common\StillImage.h"></File><File path="LUFA\Drivers\USB\Class\Common\Printer.h"></File><File path="LUFA\Drivers\USB\Class\Common\RNDISConstants.h"></File></Folder><File path="LUFA\Drivers\USB\Class\Audio.h"></File><File path="LUFA\Drivers\USB\Class\CDC.h"></File><File path="LUFA\Drivers\USB\Class\HID.h"></File><File path="LUFA\Drivers\USB\Class\MassStorage.h"></File><File path="LUFA\Drivers\USB\Class\MIDI.h"></File><File path="LUFA\Drivers\USB\Class\RNDIS.h"></File><File path="LUFA\Drivers\USB\Class\StillImage.h"></File><File path="LUFA\Drivers\USB\Class\Printer.h"></File></Folder><File path="LUFA\Drivers\USB\USB.h"></File></Folder><Folder name="Misc"><File path="LUFA\Drivers\Misc\TerminalCodes.h"></File></Folder><Folder name="Board"><Folder name="USBKEY"><File path="LUFA\Drivers\Board\USBKEY\Dataflash.h"></File><File path="LUFA\Drivers\Board\USBKEY\Joystick.h"></File><File path="LUFA\Drivers\Board\USBKEY\AT45DB642D.h"></File><File path="LUFA\Drivers\Board\USBKEY\LEDs.h"></File><File path="LUFA\Drivers\Board\USBKEY\Buttons.h"></File></Folder><Folder name="STK526"><File path="LUFA\Drivers\Board\STK526\Dataflash.h"></File><File path="LUFA\Drivers\Board\STK526\Joystick.h"></File><File path="LUFA\Drivers\Board\STK526\AT45DB642D.h"></File><File path="LUFA\Drivers\Board\STK526\LEDs.h"></File><File path="LUFA\Drivers\Board\STK526\Buttons.h"></File></Folder><Folder name="STK525"><File path="LUFA\Drivers\Board\STK525\Dataflash.h"></File><File path="LUFA\Drivers\Board\STK525\Joystick.h"></File><File path="LUFA\Drivers\Board\STK525\AT45DB321C.h"></File><File path="LUFA\Drivers\Board\STK525\LEDs.h"></File><File path="LUFA\Drivers\Board\STK525\Buttons.h"></File></Folder><Folder name="RZUSBSTICK"><File path="LUFA\Drivers\Board\RZUSBSTICK\LEDs.h"></File></Folder><Folder name="ATAVRUSBRF01"><File path="LUFA\Drivers\Board\ATAVRUSBRF01\LEDs.h"></File><File path="LUFA\Drivers\Board\ATAVRUSBRF01\Buttons.h"></File></Folder><Folder name="BUMBLEB"><File path="LUFA\Drivers\Board\BUMBLEB\Buttons.h"></File><File path="LUFA\Drivers\Board\BUMBLEB\Joystick.h"></File><File path="LUFA\Drivers\Board\BUMBLEB\LEDs.h"></File></Folder><Folder name="XPLAIN"><File path="LUFA\Drivers\Board\XPLAIN\LEDs.h"></File><File path="LUFA\Drivers\Board\XPLAIN\AT45DB642D.h"></File><File path="LUFA\Drivers\Board\XPLAIN\Dataflash.h"></File></Folder><Folder name="EVK527"><File path="LUFA\Drivers\Board\EVK527\Buttons.h"></File><File path="LUFA\Drivers\Board\EVK527\LEDs.h"></File><File path="LUFA\Drivers\Board\EVK527\Joystick.h"></File><File path="LUFA\Drivers\Board\EVK527\AT45DB321C.h"></File><File path="LUFA\Drivers\Board\EVK527\Dataflash.h"></File></Folder><File path="LUFA\Drivers\Board\Temperature.h"></File><File path="LUFA\Drivers\Board\Dataflash.h"></File><File path="LUFA\Drivers\Board\Joystick.h"></File><File path="LUFA\Drivers\Board\Temperature.c"></File><File path="LUFA\Drivers\Board\LEDs.h"></File><File path="LUFA\Drivers\Board\Buttons.h"></File></Folder><Folder name="Peripheral"><Folder name="AVRU4U6U7"><File path="LUFA\Drivers\Peripheral\AVRU4U6U7\ADC.h"></File></Folder><File path="LUFA\Drivers\Peripheral\ADC.h"></File><File path="LUFA\Drivers\Peripheral\Serial.c"></File><File path="LUFA\Drivers\Peripheral\Serial.h"></File><File path="LUFA\Drivers\Peripheral\SPI.h"></File><File path="LUFA\Drivers\Peripheral\SerialStream.c"></File><File path="LUFA\Drivers\Peripheral\SerialStream.h"></File></Folder></Folder><Folder name="DriverStubs"><File path="LUFA\DriverStubs\Dataflash.h"></File><File path="LUFA\DriverStubs\Joystick.h"></File><File path="LUFA\DriverStubs\LEDs.h"></File><File path="LUFA\DriverStubs\Buttons.h"></File></Folder><Folder name="ManPages"><File path="LUFA\ManPages\AboutLUFA.txt"></File><File path="LUFA\ManPages\BuildingLinkableLibraries.txt"></File><File path="LUFA\ManPages\ChangeLog.txt"></File><File path="LUFA\ManPages\CompileTimeTokens.txt"></File><File path="LUFA\ManPages\DevelopingWithLUFA.txt"></File><File path="LUFA\ManPages\DeviceSupport.txt"></File><File path="LUFA\ManPages\DirectorySummaries.txt"></File><File path="LUFA\ManPages\Donating.txt"></File><File path="LUFA\ManPages\FutureChanges.txt"></File><File path="LUFA\ManPages\GettingStarted.txt"></File><File path="LUFA\ManPages\Groups.txt"></File><File path="LUFA\ManPages\LibraryResources.txt"></File><File path="LUFA\ManPages\LUFAPoweredProjects.txt"></File><File path="LUFA\ManPages\MainPage.txt"></File><File path="LUFA\ManPages\MigrationInformation.txt"></File><File path="LUFA\ManPages\VIDAndPIDValues.txt"></File><File path="LUFA\ManPages\WritingBoardDrivers.txt"></File><File path="LUFA\ManPages\ConfiguringApps.txt"></File><File path="LUFA\ManPages\CompilingApps.txt"></File><File path="LUFA\ManPages\ProgrammingApps.txt"></File><File path="LUFA\ManPages\LibraryApps.txt"></File><File path="LUFA\ManPages\Licence.txt"></File><File path="LUFA\ManPages\WhyUseLUFA.txt"></File><File path="LUFA\ManPages\LUFAvsAtmelStack.txt"></File><File path="LUFA\ManPages\AlternativeStacks.txt"></File></Folder><Folder name="Scheduler"><File path="LUFA\Scheduler\Scheduler.c"></File><File path="LUFA\Scheduler\Scheduler.h"></File></Folder><File path="LUFA\makefile"></File><File path="LUFA\Version.h"></File><File path="LUFA\Doxygen.conf"></File></Folder><Folder name="Bootloaders"><Folder name="DFU"><File path="Bootloaders\DFU\BootloaderDFU.c"></File><File path="Bootloaders\DFU\BootloaderDFU.h"></File><File path="Bootloaders\DFU\Descriptors.c"></File><File path="Bootloaders\DFU\Descriptors.h"></File><File path="Bootloaders\DFU\makefile"></File><File path="Bootloaders\DFU\BootloaderDFU.txt"></File><File path="Bootloaders\DFU\Doxygen.conf"></File></Folder><Folder name="CDC"><File path="Bootloaders\CDC\BootloaderCDC.c"></File><File path="Bootloaders\CDC\BootloaderCDC.h"></File><File path="Bootloaders\CDC\Descriptors.c"></File><File path="Bootloaders\CDC\Descriptors.h"></File><File path="Bootloaders\CDC\makefile"></File><File path="Bootloaders\CDC\LUFA CDC Bootloader.inf"></File><File path="Bootloaders\CDC\Doxygen.conf"></File><File path="Bootloaders\CDC\BootloaderCDC.txt"></File></Folder><Folder name="TeensyHID"><File path="Bootloaders\TeensyHID\Descriptors.c"></File><File path="Bootloaders\TeensyHID\Descriptors.h"></File><File path="Bootloaders\TeensyHID\makefile"></File><File path="Bootloaders\TeensyHID\TeensyHID.c"></File><File path="Bootloaders\TeensyHID\TeensyHID.h"></File><File path="Bootloaders\TeensyHID\TeensyHID.txt"></File></Folder><Folder name="Incomplete"><Folder name="MIDI"><Folder name="JavaHost"><File path="Bootloaders\Incomplete\MIDI\JavaHost\BIN2BOOT.java"></File><File path="Bootloaders\Incomplete\MIDI\JavaHost\MIDIMessageReceiver.java"></File></Folder><File path="Bootloaders\Incomplete\MIDI\BootloaderMIDI.c"></File><File path="Bootloaders\Incomplete\MIDI\BootloaderMIDI.h"></File><File path="Bootloaders\Incomplete\MIDI\Descriptors.c"></File><File path="Bootloaders\Incomplete\MIDI\Descriptors.h"></File><File path="Bootloaders\Incomplete\MIDI\Doxygen.conf"></File><File path="Bootloaders\Incomplete\MIDI\makefile"></File><File path="Bootloaders\Incomplete\MIDI\MIDI.c"></File></Folder></Folder><File path="Bootloaders\makefile"></File></Folder><Folder name="Projects"><Folder name="AVRISP-MKII"><Folder name="Lib"><Folder name="ISP"><File path="Projects\AVRISP-MKII\Lib\ISP\ISPProtocol.c"></File><File path="Projects\AVRISP-MKII\Lib\ISP\ISPProtocol.h"></File><File path="Projects\AVRISP-MKII\Lib\ISP\ISPTarget.c"></File><File path="Projects\AVRISP-MKII\Lib\ISP\ISPTarget.h"></File></Folder><Folder name="XPROG"><File path="Projects\AVRISP-MKII\Lib\XPROG\TINYNVM.c"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\TINYNVM.h"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\XMEGANVM.c"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\XMEGANVM.h"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\XPROGProtocol.c"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\XPROGProtocol.h"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\XPROGTarget.c"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\XPROGTarget.h"></File></Folder><File path="Projects\AVRISP-MKII\Lib\V2Protocol.c"></File><File path="Projects\AVRISP-MKII\Lib\V2Protocol.h"></File><File path="Projects\AVRISP-MKII\Lib\V2ProtocolConstants.h"></File><File path="Projects\AVRISP-MKII\Lib\V2ProtocolParams.c"></File><File path="Projects\AVRISP-MKII\Lib\V2ProtocolParams.h"></File></Folder><File path="Projects\AVRISP-MKII\AVRISP.c"></File><File path="Projects\AVRISP-MKII\AVRISP.h"></File><File path="Projects\AVRISP-MKII\AVRISP.txt"></File><File path="Projects\AVRISP-MKII\Descriptors.c"></File><File path="Projects\AVRISP-MKII\Descriptors.h"></File><File path="Projects\AVRISP-MKII\Doxygen.conf"></File><File path="Projects\AVRISP-MKII\makefile"></File></Folder><Folder name="Benito"><Folder name="Board"><File path="Projects\Benito\Board\LEDs.h"></File></Folder><Folder name="Lib"><File path="Projects\Benito\Lib\RingBuff.c"></File><File path="Projects\Benito\Lib\RingBuff.h"></File></Folder><File path="Projects\Benito\Benito.c"></File><File path="Projects\Benito\Benito.h"></File><File path="Projects\Benito\Descriptors.c"></File><File path="Projects\Benito\Descriptors.h"></File><File path="Projects\Benito\Doxygen.conf"></File><File path="Projects\Benito\makefile"></File><File path="Projects\Benito\Benito.txt"></File><File path="Projects\Benito\Benito Programmer.inf"></File></Folder><Folder name="LEDNotifier"><Folder name="Board"><File path="Projects\LEDNotifier\Board\LEDs.h"></File></Folder><Folder name="CPUUsageApp"><File path="Projects\LEDNotifier\CPUUsageApp\CPUMonitor.cs"></File><File path="Projects\LEDNotifier\CPUUsageApp\CPUMonitor.csproj"></File><File path="Projects\LEDNotifier\CPUUsageApp\CPUMonitor.Designer.cs"></File><File path="Projects\LEDNotifier\CPUUsageApp\CPUMonitor.resx"></File><File path="Projects\LEDNotifier\CPUUsageApp\Program.cs"></File></Folder><Folder name="HotmailNotifierApp"><File path="Projects\LEDNotifier\HotmailNotifierApp\MailNotifier.cs"></File><File path="Projects\LEDNotifier\HotmailNotifierApp\MailNotifier.csproj"></File><File path="Projects\LEDNotifier\HotmailNotifierApp\MailNotifier.Designer.cs"></File><File path="Projects\LEDNotifier\HotmailNotifierApp\MailNotifier.resx"></File><File path="Projects\LEDNotifier\HotmailNotifierApp\Program.cs"></File></Folder><Folder name="LEDMixerApp"><File path="Projects\LEDNotifier\LEDMixerApp\LEDMixer.cs"></File><File path="Projects\LEDNotifier\LEDMixerApp\LEDMixer.csproj"></File><File path="Projects\LEDNotifier\LEDMixerApp\LEDMixer.Designer.cs"></File><File path="Projects\LEDNotifier\LEDMixerApp\LEDMixer.resx"></File><File path="Projects\LEDNotifier\LEDMixerApp\Program.cs"></File></Folder><File path="Projects\LEDNotifier\Descriptors.c"></File><File path="Projects\LEDNotifier\Descriptors.h"></File><File path="Projects\LEDNotifier\Doxygen.conf"></File><File path="Projects\LEDNotifier\LEDNotifier.c"></File><File path="Projects\LEDNotifier\LEDNotifier.h"></File><File path="Projects\LEDNotifier\LEDNotifier.txt"></File><File path="Projects\LEDNotifier\LUFA LED Notifier.inf"></File><File path="Projects\LEDNotifier\makefile"></File></Folder><Folder name="MagStripe"><Folder name="Lib"><File path="Projects\Magstripe\Lib\CircularBitBuffer.c"></File><File path="Projects\Magstripe\Lib\CircularBitBuffer.h"></File><File path="Projects\Magstripe\Lib\MagstripeHW.h"></File></Folder><File path="Projects\Magstripe\Descriptors.c"></File><File path="Projects\Magstripe\Descriptors.h"></File><File path="Projects\Magstripe\Magstripe.c"></File><File path="Projects\Magstripe\Magstripe.h"></File><File path="Projects\Magstripe\makefile"></File><File path="Projects\Magstripe\Magstripe.txt"></File><File path="Projects\Magstripe\Doxygen.conf"></File></Folder><Folder name="MissileLauncher"><File path="Projects\MissileLauncher\ConfigDescriptor.c"></File><File path="Projects\MissileLauncher\ConfigDescriptor.h"></File><File path="Projects\MissileLauncher\Doxygen.conf"></File><File path="Projects\MissileLauncher\makefile"></File><File path="Projects\MissileLauncher\MissileLauncher.c"></File><File path="Projects\MissileLauncher\MissileLauncher.h"></File><File path="Projects\MissileLauncher\MissileLauncher.txt"></File></Folder><Folder name="USBtoSerial"><Folder name="Lib"><File path="Projects\USBtoSerial\Lib\RingBuff.c"></File><File path="Projects\USBtoSerial\Lib\RingBuff.h"></File></Folder><File path="Projects\USBtoSerial\Descriptors.c"></File><File path="Projects\USBtoSerial\Descriptors.h"></File><File path="Projects\USBtoSerial\Doxygen.conf"></File><File path="Projects\USBtoSerial\LUFA USBtoSerial.inf"></File><File path="Projects\USBtoSerial\makefile"></File><File path="Projects\USBtoSerial\USBtoSerial.c"></File><File path="Projects\USBtoSerial\USBtoSerial.h"></File><File path="Projects\USBtoSerial\USBtoSerial.txt"></File></Folder><Folder name="XPLAINBridge"><Folder name="Lib"><File path="Projects\XPLAINBridge\Lib\RingBuff.c"></File><File path="Projects\XPLAINBridge\Lib\RingBuff.h"></File><File path="Projects\XPLAINBridge\Lib\SoftUART.c"></File><File path="Projects\XPLAINBridge\Lib\SoftUART.h"></File></Folder><File path="Projects\XPLAINBridge\Descriptors.c"></File><File path="Projects\XPLAINBridge\Descriptors.h"></File><File path="Projects\XPLAINBridge\LUFA XPLAIN Bridge.inf"></File><File path="Projects\XPLAINBridge\makefile"></File><File path="Projects\XPLAINBridge\XPLAINBridge.c"></File><File path="Projects\XPLAINBridge\XPLAINBridge.h"></File><File path="Projects\XPLAINBridge\XPLAINBridge.txt"></File></Folder><Folder name="Incomplete"><Folder name="StandaloneProgrammer"><Folder name="Lib"><Folder name="PetiteFATFs"><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\diskio.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\diskio.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\integer.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\pff.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\pff.h"></File></Folder><File path="Projects\Incomplete\StandaloneProgrammer\Lib\DataflashManager.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\DataflashManager.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\SCSI.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\SCSI.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\ProgrammerConfig.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\ProgrammerConfig.h"></File></Folder><File path="Projects\Incomplete\StandaloneProgrammer\Descriptors.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Descriptors.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\makefile"></File><File path="Projects\Incomplete\StandaloneProgrammer\StandaloneProgrammer.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\StandaloneProgrammer.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\DiskDevice.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\DiskDevice.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\DiskHost.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\DiskHost.h"></File></Folder></Folder><File path="Projects\makefile"></File></Folder><File path="makefile"></File><File path="README.txt"></File></Project>
\ No newline at end of file
+<Project name="LUFA"><Folder name="Demos"><Folder name="Device"><Folder name="ClassDriver"><Folder name="AudioInput"><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.c"></File><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.h"></File><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.txt"></File><File path="Demos\Device\ClassDriver\AudioInput\Descriptors.c"></File><File path="Demos\Device\ClassDriver\AudioInput\Descriptors.h"></File><File path="Demos\Device\ClassDriver\AudioInput\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\AudioInput\makefile"></File></Folder><Folder name="AudioOutput"><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.c"></File><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.h"></File><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.txt"></File><File path="Demos\Device\ClassDriver\AudioOutput\Descriptors.c"></File><File path="Demos\Device\ClassDriver\AudioOutput\Descriptors.h"></File><File path="Demos\Device\ClassDriver\AudioOutput\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\AudioOutput\makefile"></File></Folder><Folder name="DualVirtualSerial"><File path="Demos\Device\ClassDriver\DualVirtualSerial\Descriptors.c"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\Descriptors.h"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\DualVirtualSerial.c"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\DualVirtualSerial.h"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\DualVirtualSerial.txt"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\LUFA DualVirtualSerial.inf"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\makefile"></File></Folder><Folder name="GenericHID"><File path="Demos\Device\ClassDriver\GenericHID\Descriptors.c"></File><File path="Demos\Device\ClassDriver\GenericHID\Descriptors.h"></File><File path="Demos\Device\ClassDriver\GenericHID\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.c"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.h"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.txt"></File><File path="Demos\Device\ClassDriver\GenericHID\makefile"></File></Folder><Folder name="Joystick"><File path="Demos\Device\ClassDriver\Joystick\Descriptors.c"></File><File path="Demos\Device\ClassDriver\Joystick\Descriptors.h"></File><File path="Demos\Device\ClassDriver\Joystick\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.c"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.h"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.txt"></File><File path="Demos\Device\ClassDriver\Joystick\makefile"></File></Folder><Folder name="Keyboard"><File path="Demos\Device\ClassDriver\Keyboard\Descriptors.c"></File><File path="Demos\Device\ClassDriver\Keyboard\Descriptors.h"></File><File path="Demos\Device\ClassDriver\Keyboard\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.c"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.h"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.txt"></File><File path="Demos\Device\ClassDriver\Keyboard\makefile"></File></Folder><Folder name="KeyboardMouse"><File path="Demos\Device\ClassDriver\KeyboardMouse\Descriptors.c"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\Descriptors.h"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.c"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.h"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.txt"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\makefile"></File></Folder><Folder name="MassStorage"><Folder name="Lib"><File path="Demos\Device\ClassDriver\MassStorage\Lib\DataflashManager.c"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\DataflashManager.h"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\SCSI.c"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\SCSI.h"></File></Folder><File path="Demos\Device\ClassDriver\MassStorage\Descriptors.c"></File><File path="Demos\Device\ClassDriver\MassStorage\Descriptors.h"></File><File path="Demos\Device\ClassDriver\MassStorage\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\MassStorage\makefile"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.c"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.h"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.txt"></File></Folder><Folder name="MassStorageKeyboard"><Folder name="Lib"><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\DataflashManager.c"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\DataflashManager.h"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\SCSI.c"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\SCSI.h"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\SCSI_Codes.h"></File></Folder><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Descriptors.c"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Descriptors.h"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\makefile"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\MassStorageKeyboard.c"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\MassStorageKeyboard.h"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\MassStorageKeyboard.txt"></File></Folder><Folder name="MIDI"><File path="Demos\Device\ClassDriver\MIDI\Descriptors.c"></File><File path="Demos\Device\ClassDriver\MIDI\Descriptors.h"></File><File path="Demos\Device\ClassDriver\MIDI\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\MIDI\makefile"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.c"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.h"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.txt"></File></Folder><Folder name="Mouse"><File path="Demos\Device\ClassDriver\Mouse\Descriptors.c"></File><File path="Demos\Device\ClassDriver\Mouse\Descriptors.h"></File><File path="Demos\Device\ClassDriver\Mouse\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\Mouse\makefile"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.c"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.h"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.txt"></File></Folder><Folder name="RNDISEthernet"><Folder name="Lib"><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Webserver.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ARP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ARP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\DHCP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\DHCP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Ethernet.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Ethernet.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\EthernetProtocols.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ICMP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ICMP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\IP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\IP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ProtocolDecoders.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ProtocolDecoders.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\TCP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\TCP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\UDP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\UDP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Webserver.c"></File></Folder><File path="Demos\Device\ClassDriver\RNDISEthernet\Descriptors.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Descriptors.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\LUFA RNDIS.inf"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\makefile"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.txt"></File></Folder><Folder name="VirtualSerial"><File path="Demos\Device\ClassDriver\VirtualSerial\Descriptors.c"></File><File path="Demos\Device\ClassDriver\VirtualSerial\Descriptors.h"></File><File path="Demos\Device\ClassDriver\VirtualSerial\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\VirtualSerial\LUFA VirtualSerial.inf"></File><File path="Demos\Device\ClassDriver\VirtualSerial\makefile"></File><File path="Demos\Device\ClassDriver\VirtualSerial\VirtualSerial.c"></File><File path="Demos\Device\ClassDriver\VirtualSerial\VirtualSerial.h"></File><File path="Demos\Device\ClassDriver\VirtualSerial\VirtualSerial.txt"></File></Folder><Folder name="VirtualSerialMouse"><File path="Demos\Device\ClassDriver\VirtualSerialMouse\Descriptors.c"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\Descriptors.h"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\LUFA VirtualSerialMouse.inf"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\makefile"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\VirtualSerialMouse.c"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\VirtualSerialMouse.h"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\VirtualSerialMouse.txt"></File></Folder><File path="Demos\Device\ClassDriver\makefile"></File></Folder><Folder name="LowLevel"><Folder name="AudioInput"><File path="Demos\Device\LowLevel\AudioInput\AudioInput.c"></File><File path="Demos\Device\LowLevel\AudioInput\AudioInput.h"></File><File path="Demos\Device\LowLevel\AudioInput\AudioInput.txt"></File><File path="Demos\Device\LowLevel\AudioInput\Descriptors.c"></File><File path="Demos\Device\LowLevel\AudioInput\Descriptors.h"></File><File path="Demos\Device\LowLevel\AudioInput\Doxygen.conf"></File><File path="Demos\Device\LowLevel\AudioInput\makefile"></File></Folder><Folder name="AudioOutput"><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.c"></File><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.h"></File><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.txt"></File><File path="Demos\Device\LowLevel\AudioOutput\Descriptors.c"></File><File path="Demos\Device\LowLevel\AudioOutput\Descriptors.h"></File><File path="Demos\Device\LowLevel\AudioOutput\Doxygen.conf"></File><File path="Demos\Device\LowLevel\AudioOutput\makefile"></File></Folder><Folder name="DualVirtualSerial"><File path="Demos\Device\LowLevel\DualVirtualSerial\Descriptors.c"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\Descriptors.h"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\Doxygen.conf"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\DualVirtualSerial.c"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\DualVirtualSerial.h"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\DualVirtualSerial.txt"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\LUFA DualVirtualSerial.inf"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\makefile"></File></Folder><Folder name="GenericHID"><File path="Demos\Device\LowLevel\GenericHID\Descriptors.c"></File><File path="Demos\Device\LowLevel\GenericHID\Descriptors.h"></File><File path="Demos\Device\LowLevel\GenericHID\Doxygen.conf"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.c"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.h"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.txt"></File><File path="Demos\Device\LowLevel\GenericHID\makefile"></File></Folder><Folder name="Joystick"><File path="Demos\Device\LowLevel\Joystick\Descriptors.c"></File><File path="Demos\Device\LowLevel\Joystick\Descriptors.h"></File><File path="Demos\Device\LowLevel\Joystick\Doxygen.conf"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.c"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.h"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.txt"></File><File path="Demos\Device\LowLevel\Joystick\makefile"></File></Folder><Folder name="Keyboard"><File path="Demos\Device\LowLevel\Keyboard\Descriptors.c"></File><File path="Demos\Device\LowLevel\Keyboard\Descriptors.h"></File><File path="Demos\Device\LowLevel\Keyboard\Doxygen.conf"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.c"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.h"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.txt"></File><File path="Demos\Device\LowLevel\Keyboard\makefile"></File></Folder><Folder name="KeyboardMouse"><File path="Demos\Device\LowLevel\KeyboardMouse\Descriptors.c"></File><File path="Demos\Device\LowLevel\KeyboardMouse\Descriptors.h"></File><File path="Demos\Device\LowLevel\KeyboardMouse\Doxygen.conf"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.c"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.h"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.txt"></File><File path="Demos\Device\LowLevel\KeyboardMouse\makefile"></File></Folder><Folder name="MassStorage"><Folder name="Lib"><File path="Demos\Device\LowLevel\MassStorage\Lib\DataflashManager.c"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\DataflashManager.h"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\SCSI.c"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\SCSI.h"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\SCSI_Codes.h"></File></Folder><File path="Demos\Device\LowLevel\MassStorage\Descriptors.c"></File><File path="Demos\Device\LowLevel\MassStorage\Descriptors.h"></File><File path="Demos\Device\LowLevel\MassStorage\Doxygen.conf"></File><File path="Demos\Device\LowLevel\MassStorage\makefile"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.c"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.h"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.txt"></File></Folder><Folder name="MIDI"><File path="Demos\Device\LowLevel\MIDI\Descriptors.c"></File><File path="Demos\Device\LowLevel\MIDI\Descriptors.h"></File><File path="Demos\Device\LowLevel\MIDI\Doxygen.conf"></File><File path="Demos\Device\LowLevel\MIDI\makefile"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.c"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.h"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.txt"></File></Folder><Folder name="Mouse"><File path="Demos\Device\LowLevel\Mouse\Descriptors.c"></File><File path="Demos\Device\LowLevel\Mouse\Descriptors.h"></File><File path="Demos\Device\LowLevel\Mouse\Doxygen.conf"></File><File path="Demos\Device\LowLevel\Mouse\makefile"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.c"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.h"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.txt"></File></Folder><Folder name="RNDISEthernet"><Folder name="Lib"><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Webserver.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ARP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ARP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\DHCP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\DHCP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Ethernet.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Ethernet.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\EthernetProtocols.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ICMP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ICMP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\IP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\IP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ProtocolDecoders.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ProtocolDecoders.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\RNDIS.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\RNDIS.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\RNDISConstants.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\TCP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\TCP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\UDP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\UDP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Webserver.c"></File></Folder><File path="Demos\Device\LowLevel\RNDISEthernet\Descriptors.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Descriptors.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Doxygen.conf"></File><File path="Demos\Device\LowLevel\RNDISEthernet\LUFA RNDIS.inf"></File><File path="Demos\Device\LowLevel\RNDISEthernet\makefile"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.txt"></File></Folder><Folder name="VirtualSerial"><File path="Demos\Device\LowLevel\VirtualSerial\Descriptors.c"></File><File path="Demos\Device\LowLevel\VirtualSerial\Descriptors.h"></File><File path="Demos\Device\LowLevel\VirtualSerial\Doxygen.conf"></File><File path="Demos\Device\LowLevel\VirtualSerial\LUFA VirtualSerial.inf"></File><File path="Demos\Device\LowLevel\VirtualSerial\makefile"></File><File path="Demos\Device\LowLevel\VirtualSerial\VirtualSerial.c"></File><File path="Demos\Device\LowLevel\VirtualSerial\VirtualSerial.h"></File><File path="Demos\Device\LowLevel\VirtualSerial\VirtualSerial.txt"></File></Folder><File path="Demos\Device\LowLevel\makefile"></File></Folder><Folder name="Incomplete"><Folder name="SideShow"><Folder name="Lib"><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowApplications.c"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowApplications.h"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowCommands.c"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowCommands.h"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowCommon.c"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowCommon.h"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowContent.c"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowContent.h"></File></Folder><File path="Demos\Device\Incomplete\Sideshow\Descriptors.c"></File><File path="Demos\Device\Incomplete\Sideshow\Descriptors.h"></File><File path="Demos\Device\Incomplete\Sideshow\makefile"></File><File path="Demos\Device\Incomplete\Sideshow\Sideshow.c"></File><File path="Demos\Device\Incomplete\Sideshow\Sideshow.h"></File></Folder></Folder><File path="Demos\Device\makefile"></File></Folder><Folder name="Host"><Folder name="ClassDriver"><Folder name="JoystickHostWithParser"><File path="Demos\Host\ClassDriver\JoystickHostWithParser\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\JoystickHostWithParser\JoystickHostWithParser.c"></File><File path="Demos\Host\ClassDriver\JoystickHostWithParser\JoystickHostWithParser.h"></File><File path="Demos\Host\ClassDriver\JoystickHostWithParser\JoystickHostWithParser.txt"></File><File path="Demos\Host\ClassDriver\JoystickHostWithParser\makefile"></File></Folder><Folder name="KeyboardHost"><File path="Demos\Host\ClassDriver\KeyboardHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\KeyboardHost\KeyboardHost.c"></File><File path="Demos\Host\ClassDriver\KeyboardHost\KeyboardHost.h"></File><File path="Demos\Host\ClassDriver\KeyboardHost\makefile"></File><File path="Demos\Host\ClassDriver\KeyboardHost\KeyboardHost.txt"></File></Folder><Folder name="KeyboardHostWithParser"><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\KeyboardHostWithParser.c"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\KeyboardHostWithParser.h"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\makefile"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\KeyboardHostWithParser.txt"></File></Folder><Folder name="MIDIHost"><File path="Demos\Host\ClassDriver\MIDIHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\MIDIHost\makefile"></File><File path="Demos\Host\ClassDriver\MIDIHost\MIDIHost.c"></File><File path="Demos\Host\ClassDriver\MIDIHost\MIDIHost.h"></File><File path="Demos\Host\ClassDriver\MIDIHost\MIDIHost.txt"></File></Folder><Folder name="MouseHost"><File path="Demos\Host\ClassDriver\MouseHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\MouseHost\makefile"></File><File path="Demos\Host\ClassDriver\MouseHost\MouseHost.c"></File><File path="Demos\Host\ClassDriver\MouseHost\MouseHost.h"></File><File path="Demos\Host\ClassDriver\MouseHost\MouseHost.txt"></File></Folder><Folder name="MouseHostWithParser"><File path="Demos\Host\ClassDriver\MouseHostWithParser\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\makefile"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\MouseHostWithParser.txt"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\MouseHostWithParser.c"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\MouseHostWithParser.h"></File></Folder><Folder name="MassStorageHost"><File path="Demos\Host\ClassDriver\MassStorageHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\MassStorageHost\makefile"></File><File path="Demos\Host\ClassDriver\MassStorageHost\MassStorageHost.c"></File><File path="Demos\Host\ClassDriver\MassStorageHost\MassStorageHost.h"></File><File path="Demos\Host\ClassDriver\MassStorageHost\MassStorageHost.txt"></File></Folder><Folder name="PrinterHost"><File path="Demos\Host\ClassDriver\PrinterHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\PrinterHost\makefile"></File><File path="Demos\Host\ClassDriver\PrinterHost\PrinterHost.c"></File><File path="Demos\Host\ClassDriver\PrinterHost\PrinterHost.h"></File><File path="Demos\Host\ClassDriver\PrinterHost\PrinterHost.txt"></File></Folder><Folder name="RNDISEthernetHost"><File path="Demos\Host\ClassDriver\RNDISEthernetHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\RNDISEthernetHost\makefile"></File><File path="Demos\Host\ClassDriver\RNDISEthernetHost\RNDISEthernetHost.c"></File><File path="Demos\Host\ClassDriver\RNDISEthernetHost\RNDISEthernetHost.h"></File><File path="Demos\Host\ClassDriver\RNDISEthernetHost\RNDISEthernetHost.txt"></File></Folder><Folder name="StillImageHost"><File path="Demos\Host\ClassDriver\StillImageHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\StillImageHost\makefile"></File><File path="Demos\Host\ClassDriver\StillImageHost\StillImageHost.c"></File><File path="Demos\Host\ClassDriver\StillImageHost\StillImageHost.h"></File><File path="Demos\Host\ClassDriver\StillImageHost\StillImageHost.txt"></File></Folder><Folder name="VirtualSerialHost"><File path="Demos\Host\ClassDriver\VirtualSerialHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\VirtualSerialHost\makefile"></File><File path="Demos\Host\ClassDriver\VirtualSerialHost\VirtualSerialHost.c"></File><File path="Demos\Host\ClassDriver\VirtualSerialHost\VirtualSerialHost.h"></File><File path="Demos\Host\ClassDriver\VirtualSerialHost\VirtualSerialHost.txt"></File></Folder><File path="Demos\Host\ClassDriver\makefile"></File></Folder><Folder name="LowLevel"><Folder name="GenericHIDHost"><File path="Demos\Host\LowLevel\GenericHIDHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\GenericHIDHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\GenericHIDHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\GenericHIDHost\GenericHIDHost.c"></File><File path="Demos\Host\LowLevel\GenericHIDHost\GenericHIDHost.h"></File><File path="Demos\Host\LowLevel\GenericHIDHost\GenericHIDHost.txt"></File><File path="Demos\Host\LowLevel\GenericHIDHost\makefile"></File></Folder><Folder name="JoystickHostWithParser"><File path="Demos\Host\LowLevel\JoystickHostWithParser\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\Doxygen.conf"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\HIDReport.c"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\HIDReport.h"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\JoystickHostWithParser.c"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\JoystickHostWithParser.h"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\JoystickHostWithParser.txt"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\makefile"></File></Folder><Folder name="KeyboardHost"><File path="Demos\Host\LowLevel\KeyboardHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\KeyboardHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\KeyboardHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\KeyboardHost\KeyboardHost.c"></File><File path="Demos\Host\LowLevel\KeyboardHost\KeyboardHost.h"></File><File path="Demos\Host\LowLevel\KeyboardHost\KeyboardHost.txt"></File><File path="Demos\Host\LowLevel\KeyboardHost\makefile"></File></Folder><Folder name="KeyboardHostWithParser"><File path="Demos\Host\LowLevel\KeyboardHostWithParser\makefile"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\Doxygen.conf"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\HIDReport.c"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\HIDReport.h"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\KeyboardHostWithParser.c"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\KeyboardHostWithParser.h"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\KeyboardHostWithParser.txt"></File></Folder><Folder name="MassStorageHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\MassStorageHost\Lib\MassStoreCommands.c"></File><File path="Demos\Host\LowLevel\MassStorageHost\Lib\MassStoreCommands.h"></File><File path="Demos\Host\LowLevel\MassStorageHost\Lib\SCSI_Codes.h"></File></Folder><File path="Demos\Host\LowLevel\MassStorageHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MassStorageHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MassStorageHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MassStorageHost\makefile"></File><File path="Demos\Host\LowLevel\MassStorageHost\MassStorageHost.c"></File><File path="Demos\Host\LowLevel\MassStorageHost\MassStorageHost.h"></File><File path="Demos\Host\LowLevel\MassStorageHost\MassStorageHost.txt"></File></Folder><Folder name="MIDIHost"><File path="Demos\Host\LowLevel\MIDIHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MIDIHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MIDIHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MIDIHost\makefile"></File><File path="Demos\Host\LowLevel\MIDIHost\MIDIHost.c"></File><File path="Demos\Host\LowLevel\MIDIHost\MIDIHost.h"></File><File path="Demos\Host\LowLevel\MIDIHost\MIDIHost.txt"></File></Folder><Folder name="MouseHost"><File path="Demos\Host\LowLevel\MouseHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MouseHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MouseHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MouseHost\makefile"></File><File path="Demos\Host\LowLevel\MouseHost\MouseHost.c"></File><File path="Demos\Host\LowLevel\MouseHost\MouseHost.h"></File><File path="Demos\Host\LowLevel\MouseHost\MouseHost.txt"></File></Folder><Folder name="MouseHostWithParser"><File path="Demos\Host\LowLevel\MouseHostWithParser\MouseHostWithParser.txt"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\HIDReport.c"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\HIDReport.h"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\makefile"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\MouseHostWithParser.c"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\MouseHostWithParser.h"></File></Folder><Folder name="PrinterHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\PrinterHost\Lib\PrinterCommands.c"></File><File path="Demos\Host\LowLevel\PrinterHost\Lib\PrinterCommands.h"></File></Folder><File path="Demos\Host\LowLevel\PrinterHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\PrinterHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\PrinterHost\makefile"></File><File path="Demos\Host\LowLevel\PrinterHost\PrinterHost.c"></File><File path="Demos\Host\LowLevel\PrinterHost\PrinterHost.h"></File><File path="Demos\Host\LowLevel\PrinterHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\PrinterHost\PrinterHost.txt"></File></Folder><Folder name="RNDISEthernetHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\RNDISEthernetHost\Lib\RNDISCommands.c"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\Lib\RNDISCommands.h"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\Lib\RNDISConstants.h"></File></Folder><File path="Demos\Host\LowLevel\RNDISEthernetHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\makefile"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\RNDISEthernetHost.c"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\RNDISEthernetHost.h"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\RNDISHost.txt"></File></Folder><Folder name="StillImageHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\StillImageHost\Lib\PIMACodes.h"></File><File path="Demos\Host\LowLevel\StillImageHost\Lib\StillImageCommands.c"></File><File path="Demos\Host\LowLevel\StillImageHost\Lib\StillImageCommands.h"></File></Folder><File path="Demos\Host\LowLevel\StillImageHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\StillImageHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\StillImageHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\StillImageHost\makefile"></File><File path="Demos\Host\LowLevel\StillImageHost\StillImageHost.c"></File><File path="Demos\Host\LowLevel\StillImageHost\StillImageHost.h"></File><File path="Demos\Host\LowLevel\StillImageHost\StillImageHost.txt"></File></Folder><Folder name="VirtualSerialHost"><File path="Demos\Host\LowLevel\VirtualSerialHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\makefile"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\VirtualSerialHost.c"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\VirtualSerialHost.h"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\VirtualSerialHost.txt"></File></Folder><File path="Demos\Host\LowLevel\makefile"></File></Folder><Folder name="Incomplete"><Folder name="BluetoothHost"><Folder name="Lib"><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothACLPackets.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothACLPackets.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothClassCodes.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothHCICommands.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothHCICommands.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothStack.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothStack.h"></File></Folder><File path="Demos\Host\Incomplete\BluetoothHost\makefile"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothHost.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothHost.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\ConfigDescriptor.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\ConfigDescriptor.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\DeviceDescriptor.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\DeviceDescriptor.h"></File></Folder></Folder><File path="Demos\Host\makefile"></File></Folder><Folder name="DualRole"><Folder name="ClassDriver"><Folder name="MouseHostDevice"><File path="Demos\DualRole\ClassDriver\MouseHostDevice\Doxygen.conf"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\makefile"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\MouseHostDevice.c"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\MouseHostDevice.h"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\Descriptors.c"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\Descriptors.h"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\DeviceFunctions.c"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\HostFunctions.c"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\HostFunctions.h"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\DeviceFunctions.h"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\MouseHostDevice.txt"></File></Folder><File path="Demos\DualRole\ClassDriver\makefile"></File></Folder><File path="Demos\DualRole\makefile"></File></Folder><File path="Demos\makefile"></File></Folder><Folder name="LUFA"><Folder name="Common"><File path="LUFA\Common\Common.h"></File><File path="LUFA\Common\FunctionAttributes.h"></File><File path="LUFA\Common\BoardTypes.h"></File></Folder><Folder name="Drivers"><Folder name="USB"><Folder name="LowLevel"><Folder name="Template"><File path="LUFA\Drivers\USB\LowLevel\Template\Template_Endpoint_RW.c"></File><File path="LUFA\Drivers\USB\LowLevel\Template\Template_Endpoint_Control_R.c"></File><File path="LUFA\Drivers\USB\LowLevel\Template\Template_Endpoint_Control_W.c"></File><File path="LUFA\Drivers\USB\LowLevel\Template\Template_Pipe_RW.c"></File></Folder><File path="LUFA\Drivers\USB\LowLevel\HostChapter9.h"></File><File path="LUFA\Drivers\USB\LowLevel\LowLevel.c"></File><File path="LUFA\Drivers\USB\LowLevel\LowLevel.h"></File><File path="LUFA\Drivers\USB\LowLevel\Pipe.c"></File><File path="LUFA\Drivers\USB\LowLevel\Pipe.h"></File><File path="LUFA\Drivers\USB\LowLevel\DevChapter9.c"></File><File path="LUFA\Drivers\USB\LowLevel\DevChapter9.h"></File><File path="LUFA\Drivers\USB\LowLevel\Device.h"></File><File path="LUFA\Drivers\USB\LowLevel\Endpoint.c"></File><File path="LUFA\Drivers\USB\LowLevel\Endpoint.h"></File><File path="LUFA\Drivers\USB\LowLevel\Host.c"></File><File path="LUFA\Drivers\USB\LowLevel\Host.h"></File><File path="LUFA\Drivers\USB\LowLevel\HostChapter9.c"></File><File path="LUFA\Drivers\USB\LowLevel\OTG.h"></File></Folder><Folder name="HighLevel"><File path="LUFA\Drivers\USB\HighLevel\USBTask.h"></File><File path="LUFA\Drivers\USB\HighLevel\Events.c"></File><File path="LUFA\Drivers\USB\HighLevel\Events.h"></File><File path="LUFA\Drivers\USB\HighLevel\USBInterrupt.c"></File><File path="LUFA\Drivers\USB\HighLevel\USBInterrupt.h"></File><File path="LUFA\Drivers\USB\HighLevel\USBTask.c"></File><File path="LUFA\Drivers\USB\HighLevel\StdDescriptors.h"></File><File path="LUFA\Drivers\USB\HighLevel\StdRequestType.h"></File><File path="LUFA\Drivers\USB\HighLevel\StreamCallbacks.h"></File><File path="LUFA\Drivers\USB\HighLevel\USBMode.h"></File><File path="LUFA\Drivers\USB\HighLevel\ConfigDescriptor.c"></File><File path="LUFA\Drivers\USB\HighLevel\ConfigDescriptor.h"></File></Folder><Folder name="Class"><Folder name="Device"><File path="LUFA\Drivers\USB\Class\Device\HID.c"></File><File path="LUFA\Drivers\USB\Class\Device\HID.h"></File><File path="LUFA\Drivers\USB\Class\Device\CDC.c"></File><File path="LUFA\Drivers\USB\Class\Device\CDC.h"></File><File path="LUFA\Drivers\USB\Class\Device\RNDIS.c"></File><File path="LUFA\Drivers\USB\Class\Device\RNDIS.h"></File><File path="LUFA\Drivers\USB\Class\Device\MassStorage.c"></File><File path="LUFA\Drivers\USB\Class\Device\MassStorage.h"></File><File path="LUFA\Drivers\USB\Class\Device\Audio.c"></File><File path="LUFA\Drivers\USB\Class\Device\Audio.h"></File><File path="LUFA\Drivers\USB\Class\Device\MIDI.c"></File><File path="LUFA\Drivers\USB\Class\Device\MIDI.h"></File></Folder><Folder name="Host"><File path="LUFA\Drivers\USB\Class\Host\HIDParser.c"></File><File path="LUFA\Drivers\USB\Class\Host\HIDParser.h"></File><File path="LUFA\Drivers\USB\Class\Host\HIDReportData.h"></File><File path="LUFA\Drivers\USB\Class\Host\CDC.c"></File><File path="LUFA\Drivers\USB\Class\Host\CDC.h"></File><File path="LUFA\Drivers\USB\Class\Host\HID.c"></File><File path="LUFA\Drivers\USB\Class\Host\HID.h"></File><File path="LUFA\Drivers\USB\Class\Host\MassStorage.c"></File><File path="LUFA\Drivers\USB\Class\Host\MassStorage.h"></File><File path="LUFA\Drivers\USB\Class\Host\StillImage.c"></File><File path="LUFA\Drivers\USB\Class\Host\StillImage.h"></File><File path="LUFA\Drivers\USB\Class\Host\MIDI.c"></File><File path="LUFA\Drivers\USB\Class\Host\MIDI.h"></File><File path="LUFA\Drivers\USB\Class\Host\Printer.c"></File><File path="LUFA\Drivers\USB\Class\Host\Printer.h"></File><File path="LUFA\Drivers\USB\Class\Host\RNDIS.h"></File><File path="LUFA\Drivers\USB\Class\Host\RNDIS.c"></File></Folder><Folder name="Common"><File path="LUFA\Drivers\USB\Class\Common\Audio.h"></File><File path="LUFA\Drivers\USB\Class\Common\CDC.h"></File><File path="LUFA\Drivers\USB\Class\Common\HID.h"></File><File path="LUFA\Drivers\USB\Class\Common\MassStorage.h"></File><File path="LUFA\Drivers\USB\Class\Common\MIDI.h"></File><File path="LUFA\Drivers\USB\Class\Common\RNDIS.h"></File><File path="LUFA\Drivers\USB\Class\Common\StillImage.h"></File><File path="LUFA\Drivers\USB\Class\Common\Printer.h"></File><File path="LUFA\Drivers\USB\Class\Common\RNDISConstants.h"></File></Folder><File path="LUFA\Drivers\USB\Class\Audio.h"></File><File path="LUFA\Drivers\USB\Class\CDC.h"></File><File path="LUFA\Drivers\USB\Class\HID.h"></File><File path="LUFA\Drivers\USB\Class\MassStorage.h"></File><File path="LUFA\Drivers\USB\Class\MIDI.h"></File><File path="LUFA\Drivers\USB\Class\RNDIS.h"></File><File path="LUFA\Drivers\USB\Class\StillImage.h"></File><File path="LUFA\Drivers\USB\Class\Printer.h"></File></Folder><File path="LUFA\Drivers\USB\USB.h"></File></Folder><Folder name="Misc"><File path="LUFA\Drivers\Misc\TerminalCodes.h"></File></Folder><Folder name="Board"><Folder name="USBKEY"><File path="LUFA\Drivers\Board\USBKEY\Dataflash.h"></File><File path="LUFA\Drivers\Board\USBKEY\Joystick.h"></File><File path="LUFA\Drivers\Board\USBKEY\AT45DB642D.h"></File><File path="LUFA\Drivers\Board\USBKEY\LEDs.h"></File><File path="LUFA\Drivers\Board\USBKEY\Buttons.h"></File></Folder><Folder name="STK526"><File path="LUFA\Drivers\Board\STK526\Dataflash.h"></File><File path="LUFA\Drivers\Board\STK526\Joystick.h"></File><File path="LUFA\Drivers\Board\STK526\AT45DB642D.h"></File><File path="LUFA\Drivers\Board\STK526\LEDs.h"></File><File path="LUFA\Drivers\Board\STK526\Buttons.h"></File></Folder><Folder name="STK525"><File path="LUFA\Drivers\Board\STK525\Dataflash.h"></File><File path="LUFA\Drivers\Board\STK525\Joystick.h"></File><File path="LUFA\Drivers\Board\STK525\AT45DB321C.h"></File><File path="LUFA\Drivers\Board\STK525\LEDs.h"></File><File path="LUFA\Drivers\Board\STK525\Buttons.h"></File></Folder><Folder name="RZUSBSTICK"><File path="LUFA\Drivers\Board\RZUSBSTICK\LEDs.h"></File></Folder><Folder name="ATAVRUSBRF01"><File path="LUFA\Drivers\Board\ATAVRUSBRF01\LEDs.h"></File><File path="LUFA\Drivers\Board\ATAVRUSBRF01\Buttons.h"></File></Folder><Folder name="BUMBLEB"><File path="LUFA\Drivers\Board\BUMBLEB\Buttons.h"></File><File path="LUFA\Drivers\Board\BUMBLEB\Joystick.h"></File><File path="LUFA\Drivers\Board\BUMBLEB\LEDs.h"></File></Folder><Folder name="XPLAIN"><File path="LUFA\Drivers\Board\XPLAIN\LEDs.h"></File><File path="LUFA\Drivers\Board\XPLAIN\AT45DB642D.h"></File><File path="LUFA\Drivers\Board\XPLAIN\Dataflash.h"></File></Folder><Folder name="EVK527"><File path="LUFA\Drivers\Board\EVK527\Buttons.h"></File><File path="LUFA\Drivers\Board\EVK527\LEDs.h"></File><File path="LUFA\Drivers\Board\EVK527\Joystick.h"></File><File path="LUFA\Drivers\Board\EVK527\AT45DB321C.h"></File><File path="LUFA\Drivers\Board\EVK527\Dataflash.h"></File></Folder><File path="LUFA\Drivers\Board\Temperature.h"></File><File path="LUFA\Drivers\Board\Dataflash.h"></File><File path="LUFA\Drivers\Board\Joystick.h"></File><File path="LUFA\Drivers\Board\Temperature.c"></File><File path="LUFA\Drivers\Board\LEDs.h"></File><File path="LUFA\Drivers\Board\Buttons.h"></File></Folder><Folder name="Peripheral"><Folder name="AVRU4U6U7"><File path="LUFA\Drivers\Peripheral\AVRU4U6U7\ADC.h"></File></Folder><File path="LUFA\Drivers\Peripheral\ADC.h"></File><File path="LUFA\Drivers\Peripheral\Serial.c"></File><File path="LUFA\Drivers\Peripheral\Serial.h"></File><File path="LUFA\Drivers\Peripheral\SPI.h"></File><File path="LUFA\Drivers\Peripheral\SerialStream.c"></File><File path="LUFA\Drivers\Peripheral\SerialStream.h"></File></Folder></Folder><Folder name="DriverStubs"><File path="LUFA\DriverStubs\Dataflash.h"></File><File path="LUFA\DriverStubs\Joystick.h"></File><File path="LUFA\DriverStubs\LEDs.h"></File><File path="LUFA\DriverStubs\Buttons.h"></File></Folder><Folder name="ManPages"><File path="LUFA\ManPages\AboutLUFA.txt"></File><File path="LUFA\ManPages\BuildingLinkableLibraries.txt"></File><File path="LUFA\ManPages\ChangeLog.txt"></File><File path="LUFA\ManPages\CompileTimeTokens.txt"></File><File path="LUFA\ManPages\DevelopingWithLUFA.txt"></File><File path="LUFA\ManPages\DeviceSupport.txt"></File><File path="LUFA\ManPages\DirectorySummaries.txt"></File><File path="LUFA\ManPages\Donating.txt"></File><File path="LUFA\ManPages\FutureChanges.txt"></File><File path="LUFA\ManPages\GettingStarted.txt"></File><File path="LUFA\ManPages\Groups.txt"></File><File path="LUFA\ManPages\LibraryResources.txt"></File><File path="LUFA\ManPages\LUFAPoweredProjects.txt"></File><File path="LUFA\ManPages\MainPage.txt"></File><File path="LUFA\ManPages\MigrationInformation.txt"></File><File path="LUFA\ManPages\VIDAndPIDValues.txt"></File><File path="LUFA\ManPages\WritingBoardDrivers.txt"></File><File path="LUFA\ManPages\ConfiguringApps.txt"></File><File path="LUFA\ManPages\CompilingApps.txt"></File><File path="LUFA\ManPages\ProgrammingApps.txt"></File><File path="LUFA\ManPages\LibraryApps.txt"></File><File path="LUFA\ManPages\Licence.txt"></File><File path="LUFA\ManPages\WhyUseLUFA.txt"></File><File path="LUFA\ManPages\LUFAvsAtmelStack.txt"></File><File path="LUFA\ManPages\AlternativeStacks.txt"></File></Folder><Folder name="Scheduler"><File path="LUFA\Scheduler\Scheduler.c"></File><File path="LUFA\Scheduler\Scheduler.h"></File></Folder><File path="LUFA\makefile"></File><File path="LUFA\Version.h"></File><File path="LUFA\Doxygen.conf"></File></Folder><Folder name="Bootloaders"><Folder name="DFU"><File path="Bootloaders\DFU\BootloaderDFU.c"></File><File path="Bootloaders\DFU\BootloaderDFU.h"></File><File path="Bootloaders\DFU\Descriptors.c"></File><File path="Bootloaders\DFU\Descriptors.h"></File><File path="Bootloaders\DFU\makefile"></File><File path="Bootloaders\DFU\BootloaderDFU.txt"></File><File path="Bootloaders\DFU\Doxygen.conf"></File></Folder><Folder name="CDC"><File path="Bootloaders\CDC\BootloaderCDC.c"></File><File path="Bootloaders\CDC\BootloaderCDC.h"></File><File path="Bootloaders\CDC\Descriptors.c"></File><File path="Bootloaders\CDC\Descriptors.h"></File><File path="Bootloaders\CDC\makefile"></File><File path="Bootloaders\CDC\LUFA CDC Bootloader.inf"></File><File path="Bootloaders\CDC\Doxygen.conf"></File><File path="Bootloaders\CDC\BootloaderCDC.txt"></File></Folder><Folder name="TeensyHID"><File path="Bootloaders\TeensyHID\Descriptors.c"></File><File path="Bootloaders\TeensyHID\Descriptors.h"></File><File path="Bootloaders\TeensyHID\makefile"></File><File path="Bootloaders\TeensyHID\TeensyHID.c"></File><File path="Bootloaders\TeensyHID\TeensyHID.h"></File><File path="Bootloaders\TeensyHID\TeensyHID.txt"></File></Folder><Folder name="Incomplete"><Folder name="MIDI"><Folder name="JavaHost"><File path="Bootloaders\Incomplete\MIDI\JavaHost\BIN2BOOT.java"></File><File path="Bootloaders\Incomplete\MIDI\JavaHost\MIDIMessageReceiver.java"></File></Folder><File path="Bootloaders\Incomplete\MIDI\BootloaderMIDI.c"></File><File path="Bootloaders\Incomplete\MIDI\BootloaderMIDI.h"></File><File path="Bootloaders\Incomplete\MIDI\Descriptors.c"></File><File path="Bootloaders\Incomplete\MIDI\Descriptors.h"></File><File path="Bootloaders\Incomplete\MIDI\Doxygen.conf"></File><File path="Bootloaders\Incomplete\MIDI\makefile"></File><File path="Bootloaders\Incomplete\MIDI\MIDI.c"></File></Folder></Folder><File path="Bootloaders\makefile"></File></Folder><Folder name="Projects"><Folder name="AVRISP-MKII"><Folder name="Lib"><Folder name="ISP"><File path="Projects\AVRISP-MKII\Lib\ISP\ISPProtocol.c"></File><File path="Projects\AVRISP-MKII\Lib\ISP\ISPProtocol.h"></File><File path="Projects\AVRISP-MKII\Lib\ISP\ISPTarget.c"></File><File path="Projects\AVRISP-MKII\Lib\ISP\ISPTarget.h"></File></Folder><Folder name="XPROG"><File path="Projects\AVRISP-MKII\Lib\XPROG\TINYNVM.c"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\TINYNVM.h"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\XMEGANVM.c"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\XMEGANVM.h"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\XPROGProtocol.c"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\XPROGProtocol.h"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\XPROGTarget.c"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\XPROGTarget.h"></File></Folder><File path="Projects\AVRISP-MKII\Lib\V2Protocol.c"></File><File path="Projects\AVRISP-MKII\Lib\V2Protocol.h"></File><File path="Projects\AVRISP-MKII\Lib\V2ProtocolConstants.h"></File><File path="Projects\AVRISP-MKII\Lib\V2ProtocolParams.c"></File><File path="Projects\AVRISP-MKII\Lib\V2ProtocolParams.h"></File></Folder><File path="Projects\AVRISP-MKII\AVRISP.c"></File><File path="Projects\AVRISP-MKII\AVRISP.h"></File><File path="Projects\AVRISP-MKII\AVRISP.txt"></File><File path="Projects\AVRISP-MKII\Descriptors.c"></File><File path="Projects\AVRISP-MKII\Descriptors.h"></File><File path="Projects\AVRISP-MKII\Doxygen.conf"></File><File path="Projects\AVRISP-MKII\makefile"></File></Folder><Folder name="Benito"><Folder name="Board"><File path="Projects\Benito\Board\LEDs.h"></File></Folder><Folder name="Lib"><File path="Projects\Benito\Lib\RingBuff.c"></File><File path="Projects\Benito\Lib\RingBuff.h"></File></Folder><File path="Projects\Benito\Benito.c"></File><File path="Projects\Benito\Benito.h"></File><File path="Projects\Benito\Descriptors.c"></File><File path="Projects\Benito\Descriptors.h"></File><File path="Projects\Benito\Doxygen.conf"></File><File path="Projects\Benito\makefile"></File><File path="Projects\Benito\Benito.txt"></File><File path="Projects\Benito\Benito Programmer.inf"></File></Folder><Folder name="LEDNotifier"><Folder name="Board"><File path="Projects\LEDNotifier\Board\LEDs.h"></File></Folder><Folder name="CPUUsageApp"><File path="Projects\LEDNotifier\CPUUsageApp\CPUMonitor.cs"></File><File path="Projects\LEDNotifier\CPUUsageApp\CPUMonitor.csproj"></File><File path="Projects\LEDNotifier\CPUUsageApp\CPUMonitor.Designer.cs"></File><File path="Projects\LEDNotifier\CPUUsageApp\CPUMonitor.resx"></File><File path="Projects\LEDNotifier\CPUUsageApp\Program.cs"></File></Folder><Folder name="HotmailNotifierApp"><File path="Projects\LEDNotifier\HotmailNotifierApp\MailNotifier.cs"></File><File path="Projects\LEDNotifier\HotmailNotifierApp\MailNotifier.csproj"></File><File path="Projects\LEDNotifier\HotmailNotifierApp\MailNotifier.Designer.cs"></File><File path="Projects\LEDNotifier\HotmailNotifierApp\MailNotifier.resx"></File><File path="Projects\LEDNotifier\HotmailNotifierApp\Program.cs"></File></Folder><Folder name="LEDMixerApp"><File path="Projects\LEDNotifier\LEDMixerApp\LEDMixer.cs"></File><File path="Projects\LEDNotifier\LEDMixerApp\LEDMixer.csproj"></File><File path="Projects\LEDNotifier\LEDMixerApp\LEDMixer.Designer.cs"></File><File path="Projects\LEDNotifier\LEDMixerApp\LEDMixer.resx"></File><File path="Projects\LEDNotifier\LEDMixerApp\Program.cs"></File></Folder><File path="Projects\LEDNotifier\Descriptors.c"></File><File path="Projects\LEDNotifier\Descriptors.h"></File><File path="Projects\LEDNotifier\Doxygen.conf"></File><File path="Projects\LEDNotifier\LEDNotifier.c"></File><File path="Projects\LEDNotifier\LEDNotifier.h"></File><File path="Projects\LEDNotifier\LEDNotifier.txt"></File><File path="Projects\LEDNotifier\LUFA LED Notifier.inf"></File><File path="Projects\LEDNotifier\makefile"></File></Folder><Folder name="MagStripe"><Folder name="Lib"><File path="Projects\Magstripe\Lib\CircularBitBuffer.c"></File><File path="Projects\Magstripe\Lib\CircularBitBuffer.h"></File><File path="Projects\Magstripe\Lib\MagstripeHW.h"></File></Folder><File path="Projects\Magstripe\Descriptors.c"></File><File path="Projects\Magstripe\Descriptors.h"></File><File path="Projects\Magstripe\Magstripe.c"></File><File path="Projects\Magstripe\Magstripe.h"></File><File path="Projects\Magstripe\makefile"></File><File path="Projects\Magstripe\Magstripe.txt"></File><File path="Projects\Magstripe\Doxygen.conf"></File></Folder><Folder name="MissileLauncher"><File path="Projects\MissileLauncher\ConfigDescriptor.c"></File><File path="Projects\MissileLauncher\ConfigDescriptor.h"></File><File path="Projects\MissileLauncher\Doxygen.conf"></File><File path="Projects\MissileLauncher\makefile"></File><File path="Projects\MissileLauncher\MissileLauncher.c"></File><File path="Projects\MissileLauncher\MissileLauncher.h"></File><File path="Projects\MissileLauncher\MissileLauncher.txt"></File></Folder><Folder name="TemperatureDataLogger"><Folder name="Lib"><Folder name="FATFs"><File path="Projects\TemperatureDataLogger\Lib\FATFs\diskio.c"></File><File path="Projects\TemperatureDataLogger\Lib\FATFs\diskio.h"></File><File path="Projects\TemperatureDataLogger\Lib\FATFs\ff.c"></File><File path="Projects\TemperatureDataLogger\Lib\FATFs\ff.h"></File><File path="Projects\TemperatureDataLogger\Lib\FATFs\ffconf.h"></File><File path="Projects\TemperatureDataLogger\Lib\FATFs\integer.h"></File></Folder><File path="Projects\TemperatureDataLogger\Lib\DataflashManager.c"></File><File path="Projects\TemperatureDataLogger\Lib\DataflashManager.h"></File><File path="Projects\TemperatureDataLogger\Lib\SCSI.c"></File><File path="Projects\TemperatureDataLogger\Lib\SCSI.h"></File></Folder><File path="Projects\TemperatureDataLogger\Descriptors.c"></File><File path="Projects\TemperatureDataLogger\Descriptors.h"></File><File path="Projects\TemperatureDataLogger\makefile"></File><File path="Projects\TemperatureDataLogger\TempDataLogger.c"></File><File path="Projects\TemperatureDataLogger\TempDataLogger.h"></File></Folder><Folder name="USBtoSerial"><Folder name="Lib"><File path="Projects\USBtoSerial\Lib\RingBuff.c"></File><File path="Projects\USBtoSerial\Lib\RingBuff.h"></File></Folder><File path="Projects\USBtoSerial\Descriptors.c"></File><File path="Projects\USBtoSerial\Descriptors.h"></File><File path="Projects\USBtoSerial\Doxygen.conf"></File><File path="Projects\USBtoSerial\LUFA USBtoSerial.inf"></File><File path="Projects\USBtoSerial\makefile"></File><File path="Projects\USBtoSerial\USBtoSerial.c"></File><File path="Projects\USBtoSerial\USBtoSerial.h"></File><File path="Projects\USBtoSerial\USBtoSerial.txt"></File></Folder><Folder name="XPLAINBridge"><Folder name="Lib"><File path="Projects\XPLAINBridge\Lib\RingBuff.c"></File><File path="Projects\XPLAINBridge\Lib\RingBuff.h"></File><File path="Projects\XPLAINBridge\Lib\SoftUART.c"></File><File path="Projects\XPLAINBridge\Lib\SoftUART.h"></File></Folder><File path="Projects\XPLAINBridge\Descriptors.c"></File><File path="Projects\XPLAINBridge\Descriptors.h"></File><File path="Projects\XPLAINBridge\LUFA XPLAIN Bridge.inf"></File><File path="Projects\XPLAINBridge\makefile"></File><File path="Projects\XPLAINBridge\XPLAINBridge.c"></File><File path="Projects\XPLAINBridge\XPLAINBridge.h"></File><File path="Projects\XPLAINBridge\XPLAINBridge.txt"></File></Folder><Folder name="Incomplete"><Folder name="StandaloneProgrammer"><Folder name="Lib"><Folder name="PetiteFATFs"><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\diskio.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\diskio.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\integer.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\pff.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\pff.h"></File></Folder><File path="Projects\Incomplete\StandaloneProgrammer\Lib\DataflashManager.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\DataflashManager.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\SCSI.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\SCSI.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\ProgrammerConfig.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\ProgrammerConfig.h"></File></Folder><File path="Projects\Incomplete\StandaloneProgrammer\Descriptors.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Descriptors.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\makefile"></File><File path="Projects\Incomplete\StandaloneProgrammer\StandaloneProgrammer.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\StandaloneProgrammer.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\DiskDevice.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\DiskDevice.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\DiskHost.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\DiskHost.h"></File></Folder></Folder><File path="Projects\makefile"></File></Folder><File path="makefile"></File><File path="README.txt"></File></Project>
\ No newline at end of file
\r
#define ADC_GetStatus() ((ADCSRA & (1 << ADEN)) ? true : false)\r
\r
- #define ADC_IsReadingComplete() (!(ADCSRA & (1 << ADSC)))\r
+ #define ADC_IsReadingComplete() (ADCSRA & (1 << ADSC))\r
\r
#define ADC_GetResult() ADC \r
#endif\r
* - Added TPI programming support for 6-pin ATTINY to the AVRISP programmer project\r
* - Added command timeout counter to the AVRISP project so that the device no longer freezes when incorrectly connected\r
* to a target\r
+ * - Added new TemperatureDataLogger application, a USB data logger which writes to the device's dataflash and appears to\r
+ * the host as a standard Mass Storage device when inserted\r
*\r
* <b>Changed:</b>\r
* - Slowed down bit-banged PDI programming in the AVRISP project slightly to prevent transmission errors\r
* <b>Fixed:</b>\r
* - Fixed AVRISP project not able to enter programming mode when ISP protocol is used\r
* - Fixed AVRISP PDI race condition where the guard time between direction changes could be interpreted as a start bit\r
+ * - Fixed ADC_IsReadingComplete() returning an inverted result\r
*\r
* \section Sec_ChangeLog091223 Version 091223\r
*\r
* - <b>LEDNotifier</b> - USB LED Notification project\r
* - <b>Magstripe</b> - Magnetic Stripe Card Reader project\r
* - <b>MissileLaucher</b> - Toy Missile Launcher Host project\r
+ * - <b>TemperatureDataLogger</b> - Temperature Datalogging project\r
* - <b>USBtoSerial</b> - USB to USART Serial Converter project\r
*\r
* </small>\r
* \param[in] TotalBlocks Number of blocks of data to write\r
* \param[in] BufferPtr Pointer to the data source RAM buffer\r
*/\r
-void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress, uint16_t TotalBlocks, uint8_t* BufferPtr)\r
+void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress, uint16_t TotalBlocks, const uint8_t* BufferPtr)\r
{\r
uint16_t CurrDFPage = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) / DATAFLASH_PAGE_SIZE);\r
uint16_t CurrDFPageByte = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);\r
void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* MSInterfaceInfo, const uint32_t BlockAddress,\r
uint16_t TotalBlocks);\r
void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress, uint16_t TotalBlocks,\r
- uint8_t* BufferPtr) ATTR_NON_NULL_PTR_ARG(3);\r
+ const uint8_t* BufferPtr) ATTR_NON_NULL_PTR_ARG(3);\r
void DataflashManager_ReadBlocks_RAM(const uint32_t BlockAddress, uint16_t TotalBlocks,\r
uint8_t* BufferPtr) ATTR_NON_NULL_PTR_ARG(3);\r
void DataflashManager_ResetDataflashProtections(void);\r
--- /dev/null
+/*\r
+ LUFA Library\r
+ Copyright (C) Dean Camera, 2009.\r
+ \r
+ dean [at] fourwalledcubicle [dot] com\r
+ www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+ Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+ Permission to use, copy, modify, distribute, and sell this \r
+ software and its documentation for any purpose is hereby granted\r
+ without fee, provided that the above copyright notice appear in \r
+ all copies and that both that the copyright notice and this\r
+ permission notice and warranty disclaimer appear in supporting \r
+ documentation, and that the name of the author not be used in \r
+ advertising or publicity pertaining to distribution of the \r
+ software without specific, written prior permission.\r
+\r
+ The author disclaim all warranties with regard to this\r
+ software, including all implied warranties of merchantability\r
+ and fitness. In no event shall the author be liable for any\r
+ special, indirect or consequential damages or any damages\r
+ whatsoever resulting from loss of use, data or profits, whether\r
+ in an action of contract, negligence or other tortious action,\r
+ arising out of or in connection with the use or performance of\r
+ this software.\r
+*/\r
+\r
+/** \file\r
+ *\r
+ * USB Device Descriptors, for library use when in USB device mode. Descriptors are special \r
+ * computer-readable structures which the host requests upon device enumeration, to determine\r
+ * the device's capabilities and functions. \r
+ */\r
+\r
+#include "Descriptors.h"\r
+\r
+/* On some devices, there is a factory set internal serial number which can be automatically sent to the host as\r
+ * the device's serial number when the Device Descriptor's .SerialNumStrIndex entry is set to USE_INTERNAL_SERIAL.\r
+ * This allows the host to track a device across insertions on different ports, allowing them to retain allocated\r
+ * resources like COM port numbers and drivers. On demos using this feature, give a warning on unsupported devices\r
+ * so that the user can supply their own serial number descriptor instead or remove the USE_INTERNAL_SERIAL value\r
+ * from the Device Descriptor (forcing the host to generate a serial number for each device from the VID, PID and\r
+ * port location).\r
+ */\r
+#if (USE_INTERNAL_SERIAL == NO_DESCRIPTOR)\r
+ #warning USE_INTERNAL_SERIAL is not available on this AVR - please manually construct a device serial descriptor.\r
+#endif\r
+\r
+/** Device descriptor structure. This descriptor, located in FLASH memory, describes the overall\r
+ * device characteristics, including the supported USB version, control endpoint size and the\r
+ * number of device configurations. The descriptor is read out by the USB host when the enumeration\r
+ * process begins.\r
+ */\r
+USB_Descriptor_Device_t PROGMEM DeviceDescriptor =\r
+{\r
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},\r
+ \r
+ .USBSpecification = VERSION_BCD(01.10),\r
+ .Class = 0x00,\r
+ .SubClass = 0x00,\r
+ .Protocol = 0x00,\r
+ \r
+ .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,\r
+ \r
+ .VendorID = 0x03EB,\r
+ .ProductID = 0x2045,\r
+ .ReleaseNumber = 0x0000,\r
+ \r
+ .ManufacturerStrIndex = 0x01,\r
+ .ProductStrIndex = 0x02,\r
+ .SerialNumStrIndex = USE_INTERNAL_SERIAL,\r
+ \r
+ .NumberOfConfigurations = FIXED_NUM_CONFIGURATIONS\r
+};\r
+\r
+/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage\r
+ * of the device in one of its supported configurations, including information about any device interfaces\r
+ * and endpoints. The descriptor is read out by the USB host during the enumeration process when selecting\r
+ * a configuration so that the host may correctly communicate with the USB device.\r
+ */\r
+USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =\r
+{\r
+ .Config = \r
+ {\r
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},\r
+\r
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),\r
+ .TotalInterfaces = 1,\r
+ \r
+ .ConfigurationNumber = 1,\r
+ .ConfigurationStrIndex = NO_DESCRIPTOR,\r
+ \r
+ .ConfigAttributes = USB_CONFIG_ATTR_BUSPOWERED,\r
+ \r
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)\r
+ },\r
+ \r
+ .Interface = \r
+ {\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
+\r
+ .InterfaceNumber = 0,\r
+ .AlternateSetting = 0,\r
+ \r
+ .TotalEndpoints = 2,\r
+ \r
+ .Class = 0x08,\r
+ .SubClass = 0x06,\r
+ .Protocol = 0x50,\r
+ \r
+ .InterfaceStrIndex = NO_DESCRIPTOR\r
+ },\r
+\r
+ .DataInEndpoint = \r
+ {\r
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
+\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | MASS_STORAGE_IN_EPNUM),\r
+ .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),\r
+ .EndpointSize = MASS_STORAGE_IO_EPSIZE,\r
+ .PollingIntervalMS = 0x00\r
+ },\r
+\r
+ .DataOutEndpoint = \r
+ {\r
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
+\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | MASS_STORAGE_OUT_EPNUM),\r
+ .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),\r
+ .EndpointSize = MASS_STORAGE_IO_EPSIZE,\r
+ .PollingIntervalMS = 0x00\r
+ }\r
+};\r
+\r
+/** Language descriptor structure. This descriptor, located in FLASH memory, is returned when the host requests\r
+ * the string descriptor with index 0 (the first index). It is actually an array of 16-bit integers, which indicate\r
+ * via the language ID table available at USB.org what languages the device supports for its string descriptors.\r
+ */\r
+USB_Descriptor_String_t PROGMEM LanguageString =\r
+{\r
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},\r
+ \r
+ .UnicodeString = {LANGUAGE_ID_ENG}\r
+};\r
+\r
+/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable\r
+ * form, and is read out upon request by the host when the appropriate string ID is requested, listed in the Device\r
+ * Descriptor.\r
+ */\r
+USB_Descriptor_String_t PROGMEM ManufacturerString =\r
+{\r
+ .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},\r
+ \r
+ .UnicodeString = L"Dean Camera"\r
+};\r
+\r
+/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,\r
+ * and is read out upon request by the host when the appropriate string ID is requested, listed in the Device\r
+ * Descriptor.\r
+ */\r
+USB_Descriptor_String_t PROGMEM ProductString =\r
+{\r
+ .Header = {.Size = USB_STRING_LEN(22), .Type = DTYPE_String},\r
+ \r
+ .UnicodeString = L"LUFA Mass Storage Demo"\r
+};\r
+\r
+/** This function is called by the library when in device mode, and must be overridden (see library "USB Descriptors"\r
+ * documentation) by the application code so that the address and size of a requested descriptor can be given\r
+ * to the USB library. When the device receives a Get Descriptor request on the control endpoint, this function\r
+ * is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the\r
+ * USB host.\r
+ */\r
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)\r
+{\r
+ const uint8_t DescriptorType = (wValue >> 8);\r
+ const uint8_t DescriptorNumber = (wValue & 0xFF);\r
+\r
+ void* Address = NULL;\r
+ uint16_t Size = NO_DESCRIPTOR;\r
+\r
+ switch (DescriptorType)\r
+ {\r
+ case DTYPE_Device: \r
+ Address = (void*)&DeviceDescriptor;\r
+ Size = sizeof(USB_Descriptor_Device_t);\r
+ break;\r
+ case DTYPE_Configuration: \r
+ Address = (void*)&ConfigurationDescriptor;\r
+ Size = sizeof(USB_Descriptor_Configuration_t);\r
+ break;\r
+ case DTYPE_String: \r
+ switch (DescriptorNumber)\r
+ {\r
+ case 0x00: \r
+ Address = (void*)&LanguageString;\r
+ Size = pgm_read_byte(&LanguageString.Header.Size);\r
+ break;\r
+ case 0x01: \r
+ Address = (void*)&ManufacturerString;\r
+ Size = pgm_read_byte(&ManufacturerString.Header.Size);\r
+ break;\r
+ case 0x02: \r
+ Address = (void*)&ProductString;\r
+ Size = pgm_read_byte(&ProductString.Header.Size);\r
+ break;\r
+ }\r
+ \r
+ break;\r
+ }\r
+ \r
+ *DescriptorAddress = Address;\r
+ return Size;\r
+}\r
--- /dev/null
+/*\r
+ LUFA Library\r
+ Copyright (C) Dean Camera, 2009.\r
+ \r
+ dean [at] fourwalledcubicle [dot] com\r
+ www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+ Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+ Permission to use, copy, modify, distribute, and sell this \r
+ software and its documentation for any purpose is hereby granted\r
+ without fee, provided that the above copyright notice appear in \r
+ all copies and that both that the copyright notice and this\r
+ permission notice and warranty disclaimer appear in supporting \r
+ documentation, and that the name of the author not be used in \r
+ advertising or publicity pertaining to distribution of the \r
+ software without specific, written prior permission.\r
+\r
+ The author disclaim all warranties with regard to this\r
+ software, including all implied warranties of merchantability\r
+ and fitness. In no event shall the author be liable for any\r
+ special, indirect or consequential damages or any damages\r
+ whatsoever resulting from loss of use, data or profits, whether\r
+ in an action of contract, negligence or other tortious action,\r
+ arising out of or in connection with the use or performance of\r
+ this software.\r
+*/\r
+\r
+/** \file\r
+ *\r
+ * Header file for Descriptors.c.\r
+ */\r
+ \r
+#ifndef _DESCRIPTORS_H_\r
+#define _DESCRIPTORS_H_\r
+\r
+ /* Includes: */\r
+ #include <avr/pgmspace.h>\r
+\r
+ #include <LUFA/Drivers/USB/USB.h>\r
+ #include <LUFA/Drivers/USB/Class/MassStorage.h>\r
+\r
+ /* Macros: */\r
+ /** Endpoint number of the Mass Storage device-to-host data IN endpoint. */\r
+ #define MASS_STORAGE_IN_EPNUM 3 \r
+\r
+ /** Endpoint number of the Mass Storage host-to-device data OUT endpoint. */\r
+ #define MASS_STORAGE_OUT_EPNUM 4 \r
+\r
+ /** Size in bytes of the Mass Storage data endpoints. */\r
+ #define MASS_STORAGE_IO_EPSIZE 64\r
+ \r
+ /* Type Defines: */ \r
+ /** Type define for the device configuration descriptor structure. This must be defined in the\r
+ * application code, as the configuration descriptor contains several sub-descriptors which\r
+ * vary between devices, and which describe the device's usage to the host.\r
+ */\r
+ typedef struct\r
+ {\r
+ USB_Descriptor_Configuration_Header_t Config;\r
+ USB_Descriptor_Interface_t Interface;\r
+ USB_Descriptor_Endpoint_t DataInEndpoint;\r
+ USB_Descriptor_Endpoint_t DataOutEndpoint;\r
+ } USB_Descriptor_Configuration_t;\r
+ \r
+ /* Function Prototypes: */\r
+ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)\r
+ ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);\r
+\r
+#endif\r
--- /dev/null
+# Doxyfile 1.5.7.1\r
+\r
+# This file describes the settings to be used by the documentation system\r
+# doxygen (www.doxygen.org) for a project\r
+#\r
+# All text after a hash (#) is considered a comment and will be ignored\r
+# The format is:\r
+# TAG = value [value, ...]\r
+# For lists items can also be appended using:\r
+# TAG += value [value, ...]\r
+# Values that contain spaces should be placed between quotes (" ")\r
+\r
+#---------------------------------------------------------------------------\r
+# Project related configuration options\r
+#---------------------------------------------------------------------------\r
+\r
+# This tag specifies the encoding used for all characters in the config file \r
+# that follow. The default is UTF-8 which is also the encoding used for all \r
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the \r
+# iconv built into libc) for the transcoding. See \r
+# http://www.gnu.org/software/libiconv for the list of possible encodings.\r
+\r
+DOXYFILE_ENCODING = UTF-8\r
+\r
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded \r
+# by quotes) that should identify the project.\r
+\r
+PROJECT_NAME = "Temperature Datalogger Project"\r
+\r
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. \r
+# This could be handy for archiving the generated documentation or \r
+# if some version control system is used.\r
+\r
+PROJECT_NUMBER = 0.0.0\r
+\r
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) \r
+# base path where the generated documentation will be put. \r
+# If a relative path is entered, it will be relative to the location \r
+# where doxygen was started. If left blank the current directory will be used.\r
+\r
+OUTPUT_DIRECTORY = ./Documentation/\r
+\r
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create \r
+# 4096 sub-directories (in 2 levels) under the output directory of each output \r
+# format and will distribute the generated files over these directories. \r
+# Enabling this option can be useful when feeding doxygen a huge amount of \r
+# source files, where putting all generated files in the same directory would \r
+# otherwise cause performance problems for the file system.\r
+\r
+CREATE_SUBDIRS = NO\r
+\r
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all \r
+# documentation generated by doxygen is written. Doxygen will use this \r
+# information to generate all constant output in the proper language. \r
+# The default language is English, other supported languages are: \r
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, \r
+# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, \r
+# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), \r
+# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, \r
+# Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, Slovene, \r
+# Spanish, Swedish, and Ukrainian.\r
+\r
+OUTPUT_LANGUAGE = English\r
+\r
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will \r
+# include brief member descriptions after the members that are listed in \r
+# the file and class documentation (similar to JavaDoc). \r
+# Set to NO to disable this.\r
+\r
+BRIEF_MEMBER_DESC = YES\r
+\r
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend \r
+# the brief description of a member or function before the detailed description. \r
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the \r
+# brief descriptions will be completely suppressed.\r
+\r
+REPEAT_BRIEF = YES\r
+\r
+# This tag implements a quasi-intelligent brief description abbreviator \r
+# that is used to form the text in various listings. Each string \r
+# in this list, if found as the leading text of the brief description, will be \r
+# stripped from the text and the result after processing the whole list, is \r
+# used as the annotated text. Otherwise, the brief description is used as-is. \r
+# If left blank, the following values are used ("$name" is automatically \r
+# replaced with the name of the entity): "The $name class" "The $name widget" \r
+# "The $name file" "is" "provides" "specifies" "contains" \r
+# "represents" "a" "an" "the"\r
+\r
+ABBREVIATE_BRIEF = "The $name class" \\r
+ "The $name widget" \\r
+ "The $name file" \\r
+ is \\r
+ provides \\r
+ specifies \\r
+ contains \\r
+ represents \\r
+ a \\r
+ an \\r
+ the\r
+\r
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then \r
+# Doxygen will generate a detailed section even if there is only a brief \r
+# description.\r
+\r
+ALWAYS_DETAILED_SEC = NO\r
+\r
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all \r
+# inherited members of a class in the documentation of that class as if those \r
+# members were ordinary class members. Constructors, destructors and assignment \r
+# operators of the base classes will not be shown.\r
+\r
+INLINE_INHERITED_MEMB = NO\r
+\r
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full \r
+# path before files name in the file list and in the header files. If set \r
+# to NO the shortest path that makes the file name unique will be used.\r
+\r
+FULL_PATH_NAMES = YES\r
+\r
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag \r
+# can be used to strip a user-defined part of the path. Stripping is \r
+# only done if one of the specified strings matches the left-hand part of \r
+# the path. The tag can be used to show relative paths in the file list. \r
+# If left blank the directory from which doxygen is run is used as the \r
+# path to strip.\r
+\r
+STRIP_FROM_PATH = \r
+\r
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of \r
+# the path mentioned in the documentation of a class, which tells \r
+# the reader which header file to include in order to use a class. \r
+# If left blank only the name of the header file containing the class \r
+# definition is used. Otherwise one should specify the include paths that \r
+# are normally passed to the compiler using the -I flag.\r
+\r
+STRIP_FROM_INC_PATH = \r
+\r
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter \r
+# (but less readable) file names. This can be useful is your file systems \r
+# doesn't support long names like on DOS, Mac, or CD-ROM.\r
+\r
+SHORT_NAMES = YES\r
+\r
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen \r
+# will interpret the first line (until the first dot) of a JavaDoc-style \r
+# comment as the brief description. If set to NO, the JavaDoc \r
+# comments will behave just like regular Qt-style comments \r
+# (thus requiring an explicit @brief command for a brief description.)\r
+\r
+JAVADOC_AUTOBRIEF = NO\r
+\r
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will \r
+# interpret the first line (until the first dot) of a Qt-style \r
+# comment as the brief description. If set to NO, the comments \r
+# will behave just like regular Qt-style comments (thus requiring \r
+# an explicit \brief command for a brief description.)\r
+\r
+QT_AUTOBRIEF = NO\r
+\r
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen \r
+# treat a multi-line C++ special comment block (i.e. a block of //! or /// \r
+# comments) as a brief description. This used to be the default behaviour. \r
+# The new default is to treat a multi-line C++ comment block as a detailed \r
+# description. Set this tag to YES if you prefer the old behaviour instead.\r
+\r
+MULTILINE_CPP_IS_BRIEF = NO\r
+\r
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented \r
+# member inherits the documentation from any documented member that it \r
+# re-implements.\r
+\r
+INHERIT_DOCS = YES\r
+\r
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce \r
+# a new page for each member. If set to NO, the documentation of a member will \r
+# be part of the file/class/namespace that contains it.\r
+\r
+SEPARATE_MEMBER_PAGES = NO\r
+\r
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. \r
+# Doxygen uses this value to replace tabs by spaces in code fragments.\r
+\r
+TAB_SIZE = 4\r
+\r
+# This tag can be used to specify a number of aliases that acts \r
+# as commands in the documentation. An alias has the form "name=value". \r
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to \r
+# put the command \sideeffect (or @sideeffect) in the documentation, which \r
+# will result in a user-defined paragraph with heading "Side Effects:". \r
+# You can put \n's in the value part of an alias to insert newlines.\r
+\r
+ALIASES = \r
+\r
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C \r
+# sources only. Doxygen will then generate output that is more tailored for C. \r
+# For instance, some of the names that are used will be different. The list \r
+# of all members will be omitted, etc.\r
+\r
+OPTIMIZE_OUTPUT_FOR_C = YES\r
+\r
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java \r
+# sources only. Doxygen will then generate output that is more tailored for \r
+# Java. For instance, namespaces will be presented as packages, qualified \r
+# scopes will look different, etc.\r
+\r
+OPTIMIZE_OUTPUT_JAVA = NO\r
+\r
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran \r
+# sources only. Doxygen will then generate output that is more tailored for \r
+# Fortran.\r
+\r
+OPTIMIZE_FOR_FORTRAN = NO\r
+\r
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL \r
+# sources. Doxygen will then generate output that is tailored for \r
+# VHDL.\r
+\r
+OPTIMIZE_OUTPUT_VHDL = NO\r
+\r
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want \r
+# to include (a tag file for) the STL sources as input, then you should \r
+# set this tag to YES in order to let doxygen match functions declarations and \r
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. \r
+# func(std::string) {}). This also make the inheritance and collaboration \r
+# diagrams that involve STL classes more complete and accurate.\r
+\r
+BUILTIN_STL_SUPPORT = NO\r
+\r
+# If you use Microsoft's C++/CLI language, you should set this option to YES to\r
+# enable parsing support.\r
+\r
+CPP_CLI_SUPPORT = NO\r
+\r
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. \r
+# Doxygen will parse them like normal C++ but will assume all classes use public \r
+# instead of private inheritance when no explicit protection keyword is present.\r
+\r
+SIP_SUPPORT = NO\r
+\r
+# For Microsoft's IDL there are propget and propput attributes to indicate getter \r
+# and setter methods for a property. Setting this option to YES (the default) \r
+# will make doxygen to replace the get and set methods by a property in the \r
+# documentation. This will only work if the methods are indeed getting or \r
+# setting a simple type. If this is not the case, or you want to show the \r
+# methods anyway, you should set this option to NO.\r
+\r
+IDL_PROPERTY_SUPPORT = YES\r
+\r
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC \r
+# tag is set to YES, then doxygen will reuse the documentation of the first \r
+# member in the group (if any) for the other members of the group. By default \r
+# all members of a group must be documented explicitly.\r
+\r
+DISTRIBUTE_GROUP_DOC = NO\r
+\r
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of \r
+# the same type (for instance a group of public functions) to be put as a \r
+# subgroup of that type (e.g. under the Public Functions section). Set it to \r
+# NO to prevent subgrouping. Alternatively, this can be done per class using \r
+# the \nosubgrouping command.\r
+\r
+SUBGROUPING = YES\r
+\r
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum \r
+# is documented as struct, union, or enum with the name of the typedef. So \r
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct \r
+# with name TypeT. When disabled the typedef will appear as a member of a file, \r
+# namespace, or class. And the struct will be named TypeS. This can typically \r
+# be useful for C code in case the coding convention dictates that all compound \r
+# types are typedef'ed and only the typedef is referenced, never the tag name.\r
+\r
+TYPEDEF_HIDES_STRUCT = NO\r
+\r
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to \r
+# determine which symbols to keep in memory and which to flush to disk.\r
+# When the cache is full, less often used symbols will be written to disk.\r
+# For small to medium size projects (<1000 input files) the default value is \r
+# probably good enough. For larger projects a too small cache size can cause \r
+# doxygen to be busy swapping symbols to and from disk most of the time \r
+# causing a significant performance penality. \r
+# If the system has enough physical memory increasing the cache will improve the \r
+# performance by keeping more symbols in memory. Note that the value works on \r
+# a logarithmic scale so increasing the size by one will rougly double the \r
+# memory usage. The cache size is given by this formula: \r
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, \r
+# corresponding to a cache size of 2^16 = 65536 symbols\r
+\r
+SYMBOL_CACHE_SIZE = 0\r
+\r
+#---------------------------------------------------------------------------\r
+# Build related configuration options\r
+#---------------------------------------------------------------------------\r
+\r
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in \r
+# documentation are documented, even if no documentation was available. \r
+# Private class members and static file members will be hidden unless \r
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES\r
+\r
+EXTRACT_ALL = YES\r
+\r
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class \r
+# will be included in the documentation.\r
+\r
+EXTRACT_PRIVATE = YES\r
+\r
+# If the EXTRACT_STATIC tag is set to YES all static members of a file \r
+# will be included in the documentation.\r
+\r
+EXTRACT_STATIC = YES\r
+\r
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) \r
+# defined locally in source files will be included in the documentation. \r
+# If set to NO only classes defined in header files are included.\r
+\r
+EXTRACT_LOCAL_CLASSES = YES\r
+\r
+# This flag is only useful for Objective-C code. When set to YES local \r
+# methods, which are defined in the implementation section but not in \r
+# the interface are included in the documentation. \r
+# If set to NO (the default) only methods in the interface are included.\r
+\r
+EXTRACT_LOCAL_METHODS = NO\r
+\r
+# If this flag is set to YES, the members of anonymous namespaces will be \r
+# extracted and appear in the documentation as a namespace called \r
+# 'anonymous_namespace{file}', where file will be replaced with the base \r
+# name of the file that contains the anonymous namespace. By default \r
+# anonymous namespace are hidden.\r
+\r
+EXTRACT_ANON_NSPACES = NO\r
+\r
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all \r
+# undocumented members of documented classes, files or namespaces. \r
+# If set to NO (the default) these members will be included in the \r
+# various overviews, but no documentation section is generated. \r
+# This option has no effect if EXTRACT_ALL is enabled.\r
+\r
+HIDE_UNDOC_MEMBERS = NO\r
+\r
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all \r
+# undocumented classes that are normally visible in the class hierarchy. \r
+# If set to NO (the default) these classes will be included in the various \r
+# overviews. This option has no effect if EXTRACT_ALL is enabled.\r
+\r
+HIDE_UNDOC_CLASSES = NO\r
+\r
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all \r
+# friend (class|struct|union) declarations. \r
+# If set to NO (the default) these declarations will be included in the \r
+# documentation.\r
+\r
+HIDE_FRIEND_COMPOUNDS = NO\r
+\r
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any \r
+# documentation blocks found inside the body of a function. \r
+# If set to NO (the default) these blocks will be appended to the \r
+# function's detailed documentation block.\r
+\r
+HIDE_IN_BODY_DOCS = NO\r
+\r
+# The INTERNAL_DOCS tag determines if documentation \r
+# that is typed after a \internal command is included. If the tag is set \r
+# to NO (the default) then the documentation will be excluded. \r
+# Set it to YES to include the internal documentation.\r
+\r
+INTERNAL_DOCS = NO\r
+\r
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate \r
+# file names in lower-case letters. If set to YES upper-case letters are also \r
+# allowed. This is useful if you have classes or files whose names only differ \r
+# in case and if your file system supports case sensitive file names. Windows \r
+# and Mac users are advised to set this option to NO.\r
+\r
+CASE_SENSE_NAMES = NO\r
+\r
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen \r
+# will show members with their full class and namespace scopes in the \r
+# documentation. If set to YES the scope will be hidden.\r
+\r
+HIDE_SCOPE_NAMES = NO\r
+\r
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen \r
+# will put a list of the files that are included by a file in the documentation \r
+# of that file.\r
+\r
+SHOW_INCLUDE_FILES = YES\r
+\r
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] \r
+# is inserted in the documentation for inline members.\r
+\r
+INLINE_INFO = YES\r
+\r
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen \r
+# will sort the (detailed) documentation of file and class members \r
+# alphabetically by member name. If set to NO the members will appear in \r
+# declaration order.\r
+\r
+SORT_MEMBER_DOCS = YES\r
+\r
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the \r
+# brief documentation of file, namespace and class members alphabetically \r
+# by member name. If set to NO (the default) the members will appear in \r
+# declaration order.\r
+\r
+SORT_BRIEF_DOCS = NO\r
+\r
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the \r
+# hierarchy of group names into alphabetical order. If set to NO (the default) \r
+# the group names will appear in their defined order.\r
+\r
+SORT_GROUP_NAMES = NO\r
+\r
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be \r
+# sorted by fully-qualified names, including namespaces. If set to \r
+# NO (the default), the class list will be sorted only by class name, \r
+# not including the namespace part. \r
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.\r
+# Note: This option applies only to the class list, not to the \r
+# alphabetical list.\r
+\r
+SORT_BY_SCOPE_NAME = NO\r
+\r
+# The GENERATE_TODOLIST tag can be used to enable (YES) or \r
+# disable (NO) the todo list. This list is created by putting \todo \r
+# commands in the documentation.\r
+\r
+GENERATE_TODOLIST = NO\r
+\r
+# The GENERATE_TESTLIST tag can be used to enable (YES) or \r
+# disable (NO) the test list. This list is created by putting \test \r
+# commands in the documentation.\r
+\r
+GENERATE_TESTLIST = NO\r
+\r
+# The GENERATE_BUGLIST tag can be used to enable (YES) or \r
+# disable (NO) the bug list. This list is created by putting \bug \r
+# commands in the documentation.\r
+\r
+GENERATE_BUGLIST = NO\r
+\r
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or \r
+# disable (NO) the deprecated list. This list is created by putting \r
+# \deprecated commands in the documentation.\r
+\r
+GENERATE_DEPRECATEDLIST= YES\r
+\r
+# The ENABLED_SECTIONS tag can be used to enable conditional \r
+# documentation sections, marked by \if sectionname ... \endif.\r
+\r
+ENABLED_SECTIONS = \r
+\r
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines \r
+# the initial value of a variable or define consists of for it to appear in \r
+# the documentation. If the initializer consists of more lines than specified \r
+# here it will be hidden. Use a value of 0 to hide initializers completely. \r
+# The appearance of the initializer of individual variables and defines in the \r
+# documentation can be controlled using \showinitializer or \hideinitializer \r
+# command in the documentation regardless of this setting.\r
+\r
+MAX_INITIALIZER_LINES = 30\r
+\r
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated \r
+# at the bottom of the documentation of classes and structs. If set to YES the \r
+# list will mention the files that were used to generate the documentation.\r
+\r
+SHOW_USED_FILES = YES\r
+\r
+# If the sources in your project are distributed over multiple directories \r
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy \r
+# in the documentation. The default is NO.\r
+\r
+SHOW_DIRECTORIES = YES\r
+\r
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page.\r
+# This will remove the Files entry from the Quick Index and from the \r
+# Folder Tree View (if specified). The default is YES.\r
+\r
+SHOW_FILES = YES\r
+\r
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the \r
+# Namespaces page. This will remove the Namespaces entry from the Quick Index\r
+# and from the Folder Tree View (if specified). The default is YES.\r
+\r
+SHOW_NAMESPACES = YES\r
+\r
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that \r
+# doxygen should invoke to get the current version for each file (typically from \r
+# the version control system). Doxygen will invoke the program by executing (via \r
+# popen()) the command <command> <input-file>, where <command> is the value of \r
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file \r
+# provided by doxygen. Whatever the program writes to standard output \r
+# is used as the file version. See the manual for examples.\r
+\r
+FILE_VERSION_FILTER = \r
+\r
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by \r
+# doxygen. The layout file controls the global structure of the generated output files \r
+# in an output format independent way. The create the layout file that represents \r
+# doxygen's defaults, run doxygen with the -l option. You can optionally specify a \r
+# file name after the option, if omitted DoxygenLayout.xml will be used as the name \r
+# of the layout file.\r
+\r
+LAYOUT_FILE = \r
+\r
+#---------------------------------------------------------------------------\r
+# configuration options related to warning and progress messages\r
+#---------------------------------------------------------------------------\r
+\r
+# The QUIET tag can be used to turn on/off the messages that are generated \r
+# by doxygen. Possible values are YES and NO. If left blank NO is used.\r
+\r
+QUIET = YES\r
+\r
+# The WARNINGS tag can be used to turn on/off the warning messages that are \r
+# generated by doxygen. Possible values are YES and NO. If left blank \r
+# NO is used.\r
+\r
+WARNINGS = YES\r
+\r
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings \r
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will \r
+# automatically be disabled.\r
+\r
+WARN_IF_UNDOCUMENTED = YES\r
+\r
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for \r
+# potential errors in the documentation, such as not documenting some \r
+# parameters in a documented function, or documenting parameters that \r
+# don't exist or using markup commands wrongly.\r
+\r
+WARN_IF_DOC_ERROR = YES\r
+\r
+# This WARN_NO_PARAMDOC option can be abled to get warnings for \r
+# functions that are documented, but have no documentation for their parameters \r
+# or return value. If set to NO (the default) doxygen will only warn about \r
+# wrong or incomplete parameter documentation, but not about the absence of \r
+# documentation.\r
+\r
+WARN_NO_PARAMDOC = YES\r
+\r
+# The WARN_FORMAT tag determines the format of the warning messages that \r
+# doxygen can produce. The string should contain the $file, $line, and $text \r
+# tags, which will be replaced by the file and line number from which the \r
+# warning originated and the warning text. Optionally the format may contain \r
+# $version, which will be replaced by the version of the file (if it could \r
+# be obtained via FILE_VERSION_FILTER)\r
+\r
+WARN_FORMAT = "$file:$line: $text"\r
+\r
+# The WARN_LOGFILE tag can be used to specify a file to which warning \r
+# and error messages should be written. If left blank the output is written \r
+# to stderr.\r
+\r
+WARN_LOGFILE = \r
+\r
+#---------------------------------------------------------------------------\r
+# configuration options related to the input files\r
+#---------------------------------------------------------------------------\r
+\r
+# The INPUT tag can be used to specify the files and/or directories that contain \r
+# documented source files. You may enter file names like "myfile.cpp" or \r
+# directories like "/usr/src/myproject". Separate the files or directories \r
+# with spaces.\r
+\r
+INPUT = ./\r
+\r
+# This tag can be used to specify the character encoding of the source files \r
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is \r
+# also the default input encoding. Doxygen uses libiconv (or the iconv built \r
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for \r
+# the list of possible encodings.\r
+\r
+INPUT_ENCODING = UTF-8\r
+\r
+# If the value of the INPUT tag contains directories, you can use the \r
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp \r
+# and *.h) to filter out the source-files in the directories. If left \r
+# blank the following patterns are tested: \r
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx \r
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90\r
+\r
+FILE_PATTERNS = *.h \\r
+ *.c \\r
+ *.txt\r
+\r
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories \r
+# should be searched for input files as well. Possible values are YES and NO. \r
+# If left blank NO is used.\r
+\r
+RECURSIVE = YES\r
+\r
+# The EXCLUDE tag can be used to specify files and/or directories that should \r
+# excluded from the INPUT source files. This way you can easily exclude a \r
+# subdirectory from a directory tree whose root is specified with the INPUT tag.\r
+\r
+EXCLUDE = Documentation/\r
+\r
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or \r
+# directories that are symbolic links (a Unix filesystem feature) are excluded \r
+# from the input.\r
+\r
+EXCLUDE_SYMLINKS = NO\r
+\r
+# If the value of the INPUT tag contains directories, you can use the \r
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude \r
+# certain files from those directories. Note that the wildcards are matched \r
+# against the file with absolute path, so to exclude all test directories \r
+# for example use the pattern */test/*\r
+\r
+EXCLUDE_PATTERNS = */LowLevel/USBMode.h\r
+\r
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names \r
+# (namespaces, classes, functions, etc.) that should be excluded from the \r
+# output. The symbol name can be a fully qualified name, a word, or if the \r
+# wildcard * is used, a substring. Examples: ANamespace, AClass, \r
+# AClass::ANamespace, ANamespace::*Test\r
+\r
+EXCLUDE_SYMBOLS = __*\r
+\r
+# The EXAMPLE_PATH tag can be used to specify one or more files or \r
+# directories that contain example code fragments that are included (see \r
+# the \include command).\r
+\r
+EXAMPLE_PATH = \r
+\r
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the \r
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp \r
+# and *.h) to filter out the source-files in the directories. If left \r
+# blank all files are included.\r
+\r
+EXAMPLE_PATTERNS = *\r
+\r
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be \r
+# searched for input files to be used with the \include or \dontinclude \r
+# commands irrespective of the value of the RECURSIVE tag. \r
+# Possible values are YES and NO. If left blank NO is used.\r
+\r
+EXAMPLE_RECURSIVE = NO\r
+\r
+# The IMAGE_PATH tag can be used to specify one or more files or \r
+# directories that contain image that are included in the documentation (see \r
+# the \image command).\r
+\r
+IMAGE_PATH = \r
+\r
+# The INPUT_FILTER tag can be used to specify a program that doxygen should \r
+# invoke to filter for each input file. Doxygen will invoke the filter program \r
+# by executing (via popen()) the command <filter> <input-file>, where <filter> \r
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an \r
+# input file. Doxygen will then use the output that the filter program writes \r
+# to standard output. If FILTER_PATTERNS is specified, this tag will be \r
+# ignored.\r
+\r
+INPUT_FILTER = \r
+\r
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern \r
+# basis. Doxygen will compare the file name with each pattern and apply the \r
+# filter if there is a match. The filters are a list of the form: \r
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further \r
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER \r
+# is applied to all files.\r
+\r
+FILTER_PATTERNS = \r
+\r
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using \r
+# INPUT_FILTER) will be used to filter the input files when producing source \r
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).\r
+\r
+FILTER_SOURCE_FILES = NO\r
+\r
+#---------------------------------------------------------------------------\r
+# configuration options related to source browsing\r
+#---------------------------------------------------------------------------\r
+\r
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will \r
+# be generated. Documented entities will be cross-referenced with these sources. \r
+# Note: To get rid of all source code in the generated output, make sure also \r
+# VERBATIM_HEADERS is set to NO.\r
+\r
+SOURCE_BROWSER = NO\r
+\r
+# Setting the INLINE_SOURCES tag to YES will include the body \r
+# of functions and classes directly in the documentation.\r
+\r
+INLINE_SOURCES = NO\r
+\r
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct \r
+# doxygen to hide any special comment blocks from generated source code \r
+# fragments. Normal C and C++ comments will always remain visible.\r
+\r
+STRIP_CODE_COMMENTS = YES\r
+\r
+# If the REFERENCED_BY_RELATION tag is set to YES \r
+# then for each documented function all documented \r
+# functions referencing it will be listed.\r
+\r
+REFERENCED_BY_RELATION = NO\r
+\r
+# If the REFERENCES_RELATION tag is set to YES \r
+# then for each documented function all documented entities \r
+# called/used by that function will be listed.\r
+\r
+REFERENCES_RELATION = NO\r
+\r
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)\r
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from\r
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will\r
+# link to the source code. Otherwise they will link to the documentstion.\r
+\r
+REFERENCES_LINK_SOURCE = NO\r
+\r
+# If the USE_HTAGS tag is set to YES then the references to source code \r
+# will point to the HTML generated by the htags(1) tool instead of doxygen \r
+# built-in source browser. The htags tool is part of GNU's global source \r
+# tagging system (see http://www.gnu.org/software/global/global.html). You \r
+# will need version 4.8.6 or higher.\r
+\r
+USE_HTAGS = NO\r
+\r
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen \r
+# will generate a verbatim copy of the header file for each class for \r
+# which an include is specified. Set to NO to disable this.\r
+\r
+VERBATIM_HEADERS = NO\r
+\r
+#---------------------------------------------------------------------------\r
+# configuration options related to the alphabetical class index\r
+#---------------------------------------------------------------------------\r
+\r
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index \r
+# of all compounds will be generated. Enable this if the project \r
+# contains a lot of classes, structs, unions or interfaces.\r
+\r
+ALPHABETICAL_INDEX = YES\r
+\r
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then \r
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns \r
+# in which this list will be split (can be a number in the range [1..20])\r
+\r
+COLS_IN_ALPHA_INDEX = 5\r
+\r
+# In case all classes in a project start with a common prefix, all \r
+# classes will be put under the same header in the alphabetical index. \r
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that \r
+# should be ignored while generating the index headers.\r
+\r
+IGNORE_PREFIX = \r
+\r
+#---------------------------------------------------------------------------\r
+# configuration options related to the HTML output\r
+#---------------------------------------------------------------------------\r
+\r
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will \r
+# generate HTML output.\r
+\r
+GENERATE_HTML = YES\r
+\r
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. \r
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be \r
+# put in front of it. If left blank `html' will be used as the default path.\r
+\r
+HTML_OUTPUT = html\r
+\r
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for \r
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank \r
+# doxygen will generate files with .html extension.\r
+\r
+HTML_FILE_EXTENSION = .html\r
+\r
+# The HTML_HEADER tag can be used to specify a personal HTML header for \r
+# each generated HTML page. If it is left blank doxygen will generate a \r
+# standard header.\r
+\r
+HTML_HEADER = \r
+\r
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for \r
+# each generated HTML page. If it is left blank doxygen will generate a \r
+# standard footer.\r
+\r
+HTML_FOOTER = \r
+\r
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading \r
+# style sheet that is used by each HTML page. It can be used to \r
+# fine-tune the look of the HTML output. If the tag is left blank doxygen \r
+# will generate a default style sheet. Note that doxygen will try to copy \r
+# the style sheet file to the HTML output directory, so don't put your own \r
+# stylesheet in the HTML output directory as well, or it will be erased!\r
+\r
+HTML_STYLESHEET = \r
+\r
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, \r
+# files or namespaces will be aligned in HTML using tables. If set to \r
+# NO a bullet list will be used.\r
+\r
+HTML_ALIGN_MEMBERS = YES\r
+\r
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML \r
+# documentation will contain sections that can be hidden and shown after the \r
+# page has loaded. For this to work a browser that supports \r
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox \r
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).\r
+\r
+HTML_DYNAMIC_SECTIONS = YES\r
+\r
+# If the GENERATE_DOCSET tag is set to YES, additional index files \r
+# will be generated that can be used as input for Apple's Xcode 3 \r
+# integrated development environment, introduced with OSX 10.5 (Leopard). \r
+# To create a documentation set, doxygen will generate a Makefile in the \r
+# HTML output directory. Running make will produce the docset in that \r
+# directory and running "make install" will install the docset in \r
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find \r
+# it at startup. \r
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information.\r
+\r
+GENERATE_DOCSET = NO\r
+\r
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the \r
+# feed. A documentation feed provides an umbrella under which multiple \r
+# documentation sets from a single provider (such as a company or product suite) \r
+# can be grouped.\r
+\r
+DOCSET_FEEDNAME = "Doxygen generated docs"\r
+\r
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that \r
+# should uniquely identify the documentation set bundle. This should be a \r
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen \r
+# will append .docset to the name.\r
+\r
+DOCSET_BUNDLE_ID = org.doxygen.Project\r
+\r
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files \r
+# will be generated that can be used as input for tools like the \r
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) \r
+# of the generated HTML documentation.\r
+\r
+GENERATE_HTMLHELP = NO\r
+\r
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can \r
+# be used to specify the file name of the resulting .chm file. You \r
+# can add a path in front of the file if the result should not be \r
+# written to the html output directory.\r
+\r
+CHM_FILE = \r
+\r
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can \r
+# be used to specify the location (absolute path including file name) of \r
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run \r
+# the HTML help compiler on the generated index.hhp.\r
+\r
+HHC_LOCATION = \r
+\r
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag \r
+# controls if a separate .chi index file is generated (YES) or that \r
+# it should be included in the master .chm file (NO).\r
+\r
+GENERATE_CHI = NO\r
+\r
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING\r
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file\r
+# content.\r
+\r
+CHM_INDEX_ENCODING = \r
+\r
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag \r
+# controls whether a binary table of contents is generated (YES) or a \r
+# normal table of contents (NO) in the .chm file.\r
+\r
+BINARY_TOC = NO\r
+\r
+# The TOC_EXPAND flag can be set to YES to add extra items for group members \r
+# to the contents of the HTML help documentation and to the tree view.\r
+\r
+TOC_EXPAND = YES\r
+\r
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER \r
+# are set, an additional index file will be generated that can be used as input for \r
+# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated \r
+# HTML documentation.\r
+\r
+GENERATE_QHP = NO\r
+\r
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can \r
+# be used to specify the file name of the resulting .qch file. \r
+# The path specified is relative to the HTML output folder.\r
+\r
+QCH_FILE = \r
+\r
+# The QHP_NAMESPACE tag specifies the namespace to use when generating \r
+# Qt Help Project output. For more information please see \r
+# <a href="http://doc.trolltech.com/qthelpproject.html#namespace">Qt Help Project / Namespace</a>.\r
+\r
+QHP_NAMESPACE = org.doxygen.Project\r
+\r
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating \r
+# Qt Help Project output. For more information please see \r
+# <a href="http://doc.trolltech.com/qthelpproject.html#virtual-folders">Qt Help Project / Virtual Folders</a>.\r
+\r
+QHP_VIRTUAL_FOLDER = doc\r
+\r
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can \r
+# be used to specify the location of Qt's qhelpgenerator. \r
+# If non-empty doxygen will try to run qhelpgenerator on the generated \r
+# .qhp file .\r
+\r
+QHG_LOCATION = \r
+\r
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at \r
+# top of each HTML page. The value NO (the default) enables the index and \r
+# the value YES disables it.\r
+\r
+DISABLE_INDEX = NO\r
+\r
+# This tag can be used to set the number of enum values (range [1..20]) \r
+# that doxygen will group on one line in the generated HTML documentation.\r
+\r
+ENUM_VALUES_PER_LINE = 1\r
+\r
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index\r
+# structure should be generated to display hierarchical information.\r
+# If the tag value is set to FRAME, a side panel will be generated\r
+# containing a tree-like index structure (just like the one that \r
+# is generated for HTML Help). For this to work a browser that supports \r
+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, \r
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are \r
+# probably better off using the HTML help feature. Other possible values \r
+# for this tag are: HIERARCHIES, which will generate the Groups, Directories,\r
+# and Class Hierarchy pages using a tree view instead of an ordered list;\r
+# ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which\r
+# disables this behavior completely. For backwards compatibility with previous\r
+# releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE\r
+# respectively.\r
+\r
+GENERATE_TREEVIEW = YES\r
+\r
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be \r
+# used to set the initial width (in pixels) of the frame in which the tree \r
+# is shown.\r
+\r
+TREEVIEW_WIDTH = 250\r
+\r
+# Use this tag to change the font size of Latex formulas included \r
+# as images in the HTML documentation. The default is 10. Note that \r
+# when you change the font size after a successful doxygen run you need \r
+# to manually remove any form_*.png images from the HTML output directory \r
+# to force them to be regenerated.\r
+\r
+FORMULA_FONTSIZE = 10\r
+\r
+#---------------------------------------------------------------------------\r
+# configuration options related to the LaTeX output\r
+#---------------------------------------------------------------------------\r
+\r
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will \r
+# generate Latex output.\r
+\r
+GENERATE_LATEX = NO\r
+\r
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. \r
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be \r
+# put in front of it. If left blank `latex' will be used as the default path.\r
+\r
+LATEX_OUTPUT = latex\r
+\r
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be \r
+# invoked. If left blank `latex' will be used as the default command name.\r
+\r
+LATEX_CMD_NAME = latex\r
+\r
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to \r
+# generate index for LaTeX. If left blank `makeindex' will be used as the \r
+# default command name.\r
+\r
+MAKEINDEX_CMD_NAME = makeindex\r
+\r
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact \r
+# LaTeX documents. This may be useful for small projects and may help to \r
+# save some trees in general.\r
+\r
+COMPACT_LATEX = NO\r
+\r
+# The PAPER_TYPE tag can be used to set the paper type that is used \r
+# by the printer. Possible values are: a4, a4wide, letter, legal and \r
+# executive. If left blank a4wide will be used.\r
+\r
+PAPER_TYPE = a4wide\r
+\r
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX \r
+# packages that should be included in the LaTeX output.\r
+\r
+EXTRA_PACKAGES = \r
+\r
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for \r
+# the generated latex document. The header should contain everything until \r
+# the first chapter. If it is left blank doxygen will generate a \r
+# standard header. Notice: only use this tag if you know what you are doing!\r
+\r
+LATEX_HEADER = \r
+\r
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated \r
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will \r
+# contain links (just like the HTML output) instead of page references \r
+# This makes the output suitable for online browsing using a pdf viewer.\r
+\r
+PDF_HYPERLINKS = YES\r
+\r
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of \r
+# plain latex in the generated Makefile. Set this option to YES to get a \r
+# higher quality PDF documentation.\r
+\r
+USE_PDFLATEX = YES\r
+\r
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. \r
+# command to the generated LaTeX files. This will instruct LaTeX to keep \r
+# running if errors occur, instead of asking the user for help. \r
+# This option is also used when generating formulas in HTML.\r
+\r
+LATEX_BATCHMODE = NO\r
+\r
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not \r
+# include the index chapters (such as File Index, Compound Index, etc.) \r
+# in the output.\r
+\r
+LATEX_HIDE_INDICES = NO\r
+\r
+#---------------------------------------------------------------------------\r
+# configuration options related to the RTF output\r
+#---------------------------------------------------------------------------\r
+\r
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output \r
+# The RTF output is optimized for Word 97 and may not look very pretty with \r
+# other RTF readers or editors.\r
+\r
+GENERATE_RTF = NO\r
+\r
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. \r
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be \r
+# put in front of it. If left blank `rtf' will be used as the default path.\r
+\r
+RTF_OUTPUT = rtf\r
+\r
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact \r
+# RTF documents. This may be useful for small projects and may help to \r
+# save some trees in general.\r
+\r
+COMPACT_RTF = NO\r
+\r
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated \r
+# will contain hyperlink fields. The RTF file will \r
+# contain links (just like the HTML output) instead of page references. \r
+# This makes the output suitable for online browsing using WORD or other \r
+# programs which support those fields. \r
+# Note: wordpad (write) and others do not support links.\r
+\r
+RTF_HYPERLINKS = NO\r
+\r
+# Load stylesheet definitions from file. Syntax is similar to doxygen's \r
+# config file, i.e. a series of assignments. You only have to provide \r
+# replacements, missing definitions are set to their default value.\r
+\r
+RTF_STYLESHEET_FILE = \r
+\r
+# Set optional variables used in the generation of an rtf document. \r
+# Syntax is similar to doxygen's config file.\r
+\r
+RTF_EXTENSIONS_FILE = \r
+\r
+#---------------------------------------------------------------------------\r
+# configuration options related to the man page output\r
+#---------------------------------------------------------------------------\r
+\r
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will \r
+# generate man pages\r
+\r
+GENERATE_MAN = NO\r
+\r
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. \r
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be \r
+# put in front of it. If left blank `man' will be used as the default path.\r
+\r
+MAN_OUTPUT = man\r
+\r
+# The MAN_EXTENSION tag determines the extension that is added to \r
+# the generated man pages (default is the subroutine's section .3)\r
+\r
+MAN_EXTENSION = .3\r
+\r
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output, \r
+# then it will generate one additional man file for each entity \r
+# documented in the real man page(s). These additional files \r
+# only source the real man page, but without them the man command \r
+# would be unable to find the correct page. The default is NO.\r
+\r
+MAN_LINKS = NO\r
+\r
+#---------------------------------------------------------------------------\r
+# configuration options related to the XML output\r
+#---------------------------------------------------------------------------\r
+\r
+# If the GENERATE_XML tag is set to YES Doxygen will \r
+# generate an XML file that captures the structure of \r
+# the code including all documentation.\r
+\r
+GENERATE_XML = NO\r
+\r
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. \r
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be \r
+# put in front of it. If left blank `xml' will be used as the default path.\r
+\r
+XML_OUTPUT = xml\r
+\r
+# The XML_SCHEMA tag can be used to specify an XML schema, \r
+# which can be used by a validating XML parser to check the \r
+# syntax of the XML files.\r
+\r
+XML_SCHEMA = \r
+\r
+# The XML_DTD tag can be used to specify an XML DTD, \r
+# which can be used by a validating XML parser to check the \r
+# syntax of the XML files.\r
+\r
+XML_DTD = \r
+\r
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will \r
+# dump the program listings (including syntax highlighting \r
+# and cross-referencing information) to the XML output. Note that \r
+# enabling this will significantly increase the size of the XML output.\r
+\r
+XML_PROGRAMLISTING = YES\r
+\r
+#---------------------------------------------------------------------------\r
+# configuration options for the AutoGen Definitions output\r
+#---------------------------------------------------------------------------\r
+\r
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will \r
+# generate an AutoGen Definitions (see autogen.sf.net) file \r
+# that captures the structure of the code including all \r
+# documentation. Note that this feature is still experimental \r
+# and incomplete at the moment.\r
+\r
+GENERATE_AUTOGEN_DEF = NO\r
+\r
+#---------------------------------------------------------------------------\r
+# configuration options related to the Perl module output\r
+#---------------------------------------------------------------------------\r
+\r
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will \r
+# generate a Perl module file that captures the structure of \r
+# the code including all documentation. Note that this \r
+# feature is still experimental and incomplete at the \r
+# moment.\r
+\r
+GENERATE_PERLMOD = NO\r
+\r
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate \r
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able \r
+# to generate PDF and DVI output from the Perl module output.\r
+\r
+PERLMOD_LATEX = NO\r
+\r
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be \r
+# nicely formatted so it can be parsed by a human reader. This is useful \r
+# if you want to understand what is going on. On the other hand, if this \r
+# tag is set to NO the size of the Perl module output will be much smaller \r
+# and Perl will parse it just the same.\r
+\r
+PERLMOD_PRETTY = YES\r
+\r
+# The names of the make variables in the generated doxyrules.make file \r
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. \r
+# This is useful so different doxyrules.make files included by the same \r
+# Makefile don't overwrite each other's variables.\r
+\r
+PERLMOD_MAKEVAR_PREFIX = \r
+\r
+#---------------------------------------------------------------------------\r
+# Configuration options related to the preprocessor \r
+#---------------------------------------------------------------------------\r
+\r
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will \r
+# evaluate all C-preprocessor directives found in the sources and include \r
+# files.\r
+\r
+ENABLE_PREPROCESSING = YES\r
+\r
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro \r
+# names in the source code. If set to NO (the default) only conditional \r
+# compilation will be performed. Macro expansion can be done in a controlled \r
+# way by setting EXPAND_ONLY_PREDEF to YES.\r
+\r
+MACRO_EXPANSION = YES\r
+\r
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES \r
+# then the macro expansion is limited to the macros specified with the \r
+# PREDEFINED and EXPAND_AS_DEFINED tags.\r
+\r
+EXPAND_ONLY_PREDEF = YES\r
+\r
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files \r
+# in the INCLUDE_PATH (see below) will be search if a #include is found.\r
+\r
+SEARCH_INCLUDES = YES\r
+\r
+# The INCLUDE_PATH tag can be used to specify one or more directories that \r
+# contain include files that are not input files but should be processed by \r
+# the preprocessor.\r
+\r
+INCLUDE_PATH = \r
+\r
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard \r
+# patterns (like *.h and *.hpp) to filter out the header-files in the \r
+# directories. If left blank, the patterns specified with FILE_PATTERNS will \r
+# be used.\r
+\r
+INCLUDE_FILE_PATTERNS = \r
+\r
+# The PREDEFINED tag can be used to specify one or more macro names that \r
+# are defined before the preprocessor is started (similar to the -D option of \r
+# gcc). The argument of the tag is a list of macros of the form: name \r
+# or name=definition (no spaces). If the definition and the = are \r
+# omitted =1 is assumed. To prevent a macro definition from being \r
+# undefined via #undef or recursively expanded use the := operator \r
+# instead of the = operator.\r
+\r
+PREDEFINED = __DOXYGEN__\r
+\r
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then \r
+# this tag can be used to specify a list of macro names that should be expanded. \r
+# The macro definition that is found in the sources will be used. \r
+# Use the PREDEFINED tag if you want to use a different macro definition.\r
+\r
+EXPAND_AS_DEFINED = BUTTLOADTAG\r
+\r
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then \r
+# doxygen's preprocessor will remove all function-like macros that are alone \r
+# on a line, have an all uppercase name, and do not end with a semicolon. Such \r
+# function macros are typically used for boiler-plate code, and will confuse \r
+# the parser if not removed.\r
+\r
+SKIP_FUNCTION_MACROS = YES\r
+\r
+#---------------------------------------------------------------------------\r
+# Configuration::additions related to external references \r
+#---------------------------------------------------------------------------\r
+\r
+# The TAGFILES option can be used to specify one or more tagfiles. \r
+# Optionally an initial location of the external documentation \r
+# can be added for each tagfile. The format of a tag file without \r
+# this location is as follows: \r
+# TAGFILES = file1 file2 ... \r
+# Adding location for the tag files is done as follows: \r
+# TAGFILES = file1=loc1 "file2 = loc2" ... \r
+# where "loc1" and "loc2" can be relative or absolute paths or \r
+# URLs. If a location is present for each tag, the installdox tool \r
+# does not have to be run to correct the links.\r
+# Note that each tag file must have a unique name\r
+# (where the name does NOT include the path)\r
+# If a tag file is not located in the directory in which doxygen \r
+# is run, you must also specify the path to the tagfile here.\r
+\r
+TAGFILES = \r
+\r
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create \r
+# a tag file that is based on the input files it reads.\r
+\r
+GENERATE_TAGFILE = \r
+\r
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed \r
+# in the class index. If set to NO only the inherited external classes \r
+# will be listed.\r
+\r
+ALLEXTERNALS = NO\r
+\r
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed \r
+# in the modules index. If set to NO, only the current project's groups will \r
+# be listed.\r
+\r
+EXTERNAL_GROUPS = YES\r
+\r
+# The PERL_PATH should be the absolute path and name of the perl script \r
+# interpreter (i.e. the result of `which perl').\r
+\r
+PERL_PATH = /usr/bin/perl\r
+\r
+#---------------------------------------------------------------------------\r
+# Configuration options related to the dot tool \r
+#---------------------------------------------------------------------------\r
+\r
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will \r
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base \r
+# or super classes. Setting the tag to NO turns the diagrams off. Note that \r
+# this option is superseded by the HAVE_DOT option below. This is only a \r
+# fallback. It is recommended to install and use dot, since it yields more \r
+# powerful graphs.\r
+\r
+CLASS_DIAGRAMS = NO\r
+\r
+# You can define message sequence charts within doxygen comments using the \msc \r
+# command. Doxygen will then run the mscgen tool (see \r
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the \r
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where \r
+# the mscgen tool resides. If left empty the tool is assumed to be found in the \r
+# default search path.\r
+\r
+MSCGEN_PATH = \r
+\r
+# If set to YES, the inheritance and collaboration graphs will hide \r
+# inheritance and usage relations if the target is undocumented \r
+# or is not a class.\r
+\r
+HIDE_UNDOC_RELATIONS = YES\r
+\r
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is \r
+# available from the path. This tool is part of Graphviz, a graph visualization \r
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section \r
+# have no effect if this option is set to NO (the default)\r
+\r
+HAVE_DOT = NO\r
+\r
+# By default doxygen will write a font called FreeSans.ttf to the output \r
+# directory and reference it in all dot files that doxygen generates. This \r
+# font does not include all possible unicode characters however, so when you need \r
+# these (or just want a differently looking font) you can specify the font name \r
+# using DOT_FONTNAME. You need need to make sure dot is able to find the font, \r
+# which can be done by putting it in a standard location or by setting the \r
+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory \r
+# containing the font.\r
+\r
+DOT_FONTNAME = FreeSans\r
+\r
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. \r
+# The default size is 10pt.\r
+\r
+DOT_FONTSIZE = 10\r
+\r
+# By default doxygen will tell dot to use the output directory to look for the \r
+# FreeSans.ttf font (which doxygen will put there itself). If you specify a \r
+# different font using DOT_FONTNAME you can set the path where dot \r
+# can find it using this tag.\r
+\r
+DOT_FONTPATH = \r
+\r
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen \r
+# will generate a graph for each documented class showing the direct and \r
+# indirect inheritance relations. Setting this tag to YES will force the \r
+# the CLASS_DIAGRAMS tag to NO.\r
+\r
+CLASS_GRAPH = NO\r
+\r
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen \r
+# will generate a graph for each documented class showing the direct and \r
+# indirect implementation dependencies (inheritance, containment, and \r
+# class references variables) of the class with other documented classes.\r
+\r
+COLLABORATION_GRAPH = NO\r
+\r
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen \r
+# will generate a graph for groups, showing the direct groups dependencies\r
+\r
+GROUP_GRAPHS = NO\r
+\r
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and \r
+# collaboration diagrams in a style similar to the OMG's Unified Modeling \r
+# Language.\r
+\r
+UML_LOOK = NO\r
+\r
+# If set to YES, the inheritance and collaboration graphs will show the \r
+# relations between templates and their instances.\r
+\r
+TEMPLATE_RELATIONS = NO\r
+\r
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT \r
+# tags are set to YES then doxygen will generate a graph for each documented \r
+# file showing the direct and indirect include dependencies of the file with \r
+# other documented files.\r
+\r
+INCLUDE_GRAPH = NO\r
+\r
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and \r
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each \r
+# documented header file showing the documented files that directly or \r
+# indirectly include this file.\r
+\r
+INCLUDED_BY_GRAPH = NO\r
+\r
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then \r
+# doxygen will generate a call dependency graph for every global function \r
+# or class method. Note that enabling this option will significantly increase \r
+# the time of a run. So in most cases it will be better to enable call graphs \r
+# for selected functions only using the \callgraph command.\r
+\r
+CALL_GRAPH = NO\r
+\r
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then \r
+# doxygen will generate a caller dependency graph for every global function \r
+# or class method. Note that enabling this option will significantly increase \r
+# the time of a run. So in most cases it will be better to enable caller \r
+# graphs for selected functions only using the \callergraph command.\r
+\r
+CALLER_GRAPH = NO\r
+\r
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen \r
+# will graphical hierarchy of all classes instead of a textual one.\r
+\r
+GRAPHICAL_HIERARCHY = NO\r
+\r
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES \r
+# then doxygen will show the dependencies a directory has on other directories \r
+# in a graphical way. The dependency relations are determined by the #include\r
+# relations between the files in the directories.\r
+\r
+DIRECTORY_GRAPH = NO\r
+\r
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images \r
+# generated by dot. Possible values are png, jpg, or gif\r
+# If left blank png will be used.\r
+\r
+DOT_IMAGE_FORMAT = png\r
+\r
+# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
+# found. If left blank, it is assumed the dot tool can be found in the path.\r
+\r
+DOT_PATH = \r
+\r
+# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
+# contain dot files that are included in the documentation (see the \r
+# \dotfile command).\r
+\r
+DOTFILE_DIRS = \r
+\r
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of \r
+# nodes that will be shown in the graph. If the number of nodes in a graph \r
+# becomes larger than this value, doxygen will truncate the graph, which is \r
+# visualized by representing a node as a red box. Note that doxygen if the \r
+# number of direct children of the root node in a graph is already larger than \r
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note \r
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.\r
+\r
+DOT_GRAPH_MAX_NODES = 15\r
+\r
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the \r
+# graphs generated by dot. A depth value of 3 means that only nodes reachable \r
+# from the root by following a path via at most 3 edges will be shown. Nodes \r
+# that lay further from the root node will be omitted. Note that setting this \r
+# option to 1 or 2 may greatly reduce the computation time needed for large \r
+# code bases. Also note that the size of a graph can be further restricted by \r
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.\r
+\r
+MAX_DOT_GRAPH_DEPTH = 2\r
+\r
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent \r
+# background. This is disabled by default, because dot on Windows does not \r
+# seem to support this out of the box. Warning: Depending on the platform used, \r
+# enabling this option may lead to badly anti-aliased labels on the edges of \r
+# a graph (i.e. they become hard to read).\r
+\r
+DOT_TRANSPARENT = YES\r
+\r
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output \r
+# files in one run (i.e. multiple -o and -T options on the command line). This \r
+# makes dot run faster, but since only newer versions of dot (>1.8.10) \r
+# support this, this feature is disabled by default.\r
+\r
+DOT_MULTI_TARGETS = NO\r
+\r
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will \r
+# generate a legend page explaining the meaning of the various boxes and \r
+# arrows in the dot generated graphs.\r
+\r
+GENERATE_LEGEND = YES\r
+\r
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will \r
+# remove the intermediate dot files that are used to generate \r
+# the various graphs.\r
+\r
+DOT_CLEANUP = YES\r
+\r
+#---------------------------------------------------------------------------\r
+# Configuration::additions related to the search engine \r
+#---------------------------------------------------------------------------\r
+\r
+# The SEARCHENGINE tag specifies whether or not a search engine should be \r
+# used. If set to NO the values of all tags below this one will be ignored.\r
+\r
+SEARCHENGINE = NO\r
--- /dev/null
+/*\r
+ LUFA Library\r
+ Copyright (C) Dean Camera, 2009.\r
+ \r
+ dean [at] fourwalledcubicle [dot] com\r
+ www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+ Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+ Permission to use, copy, modify, distribute, and sell this \r
+ software and its documentation for any purpose is hereby granted\r
+ without fee, provided that the above copyright notice appear in \r
+ all copies and that both that the copyright notice and this\r
+ permission notice and warranty disclaimer appear in supporting \r
+ documentation, and that the name of the author not be used in \r
+ advertising or publicity pertaining to distribution of the \r
+ software without specific, written prior permission.\r
+\r
+ The author disclaim all warranties with regard to this\r
+ software, including all implied warranties of merchantability\r
+ and fitness. In no event shall the author be liable for any\r
+ special, indirect or consequential damages or any damages\r
+ whatsoever resulting from loss of use, data or profits, whether\r
+ in an action of contract, negligence or other tortious action,\r
+ arising out of or in connection with the use or performance of\r
+ this software.\r
+*/\r
+\r
+/** \file\r
+ *\r
+ * Functions to manage the physical dataflash media, including reading and writing of\r
+ * blocks of data. These functions are called by the SCSI layer when data must be stored\r
+ * or retrieved to/from the physical storage media. If a different media is used (such\r
+ * as a SD card or EEPROM), functions similar to these will need to be generated.\r
+ */\r
+\r
+#define INCLUDE_FROM_DATAFLASHMANAGER_C\r
+#include "DataflashManager.h"\r
+\r
+/** Writes blocks (OS blocks, not Dataflash pages) to the storage medium, the board dataflash IC(s), from\r
+ * the pre-selected data OUT endpoint. This routine reads in OS sized blocks from the endpoint and writes\r
+ * them to the dataflash in Dataflash page sized blocks.\r
+ *\r
+ * \param[in] MSInterfaceInfo Pointer to a structure containing a Mass Storage Class configuration and state\r
+ * \param[in] BlockAddress Data block starting address for the write sequence\r
+ * \param[in] TotalBlocks Number of blocks of data to write\r
+ */\r
+void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* MSInterfaceInfo, const uint32_t BlockAddress, uint16_t TotalBlocks)\r
+{\r
+ uint16_t CurrDFPage = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) / DATAFLASH_PAGE_SIZE);\r
+ uint16_t CurrDFPageByte = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);\r
+ uint8_t CurrDFPageByteDiv16 = (CurrDFPageByte >> 4);\r
+ bool UsingSecondBuffer = false;\r
+\r
+ /* Select the correct starting Dataflash IC for the block requested */\r
+ Dataflash_SelectChipFromPage(CurrDFPage);\r
+\r
+#if (DATAFLASH_PAGE_SIZE > VIRTUAL_MEMORY_BLOCK_SIZE)\r
+ /* Copy selected dataflash's current page contents to the dataflash buffer */\r
+ Dataflash_SendByte(DF_CMD_MAINMEMTOBUFF1);\r
+ Dataflash_SendAddressBytes(CurrDFPage, 0);\r
+ Dataflash_WaitWhileBusy();\r
+#endif\r
+\r
+ /* Send the dataflash buffer write command */\r
+ Dataflash_SendByte(DF_CMD_BUFF1WRITE);\r
+ Dataflash_SendAddressBytes(0, CurrDFPageByte);\r
+\r
+ /* Wait until endpoint is ready before continuing */\r
+ if (Endpoint_WaitUntilReady())\r
+ return;\r
+\r
+ while (TotalBlocks)\r
+ {\r
+ uint8_t BytesInBlockDiv16 = 0;\r
+ \r
+ /* Write an endpoint packet sized data block to the dataflash */\r
+ while (BytesInBlockDiv16 < (VIRTUAL_MEMORY_BLOCK_SIZE >> 4))\r
+ {\r
+ /* Check if the endpoint is currently empty */\r
+ if (!(Endpoint_IsReadWriteAllowed()))\r
+ {\r
+ /* Clear the current endpoint bank */\r
+ Endpoint_ClearOUT();\r
+ \r
+ /* Wait until the host has sent another packet */\r
+ if (Endpoint_WaitUntilReady())\r
+ return;\r
+ }\r
+\r
+ /* Check if end of dataflash page reached */\r
+ if (CurrDFPageByteDiv16 == (DATAFLASH_PAGE_SIZE >> 4))\r
+ {\r
+ /* Write the dataflash buffer contents back to the dataflash page */\r
+ Dataflash_WaitWhileBusy();\r
+ Dataflash_SendByte(UsingSecondBuffer ? DF_CMD_BUFF2TOMAINMEMWITHERASE : DF_CMD_BUFF1TOMAINMEMWITHERASE);\r
+ Dataflash_SendAddressBytes(CurrDFPage, 0);\r
+\r
+ /* Reset the dataflash buffer counter, increment the page counter */\r
+ CurrDFPageByteDiv16 = 0;\r
+ CurrDFPage++;\r
+\r
+ /* Once all the dataflash ICs have had their first buffers filled, switch buffers to maintain throughput */\r
+ if (Dataflash_GetSelectedChip() == DATAFLASH_CHIP_MASK(DATAFLASH_TOTALCHIPS))\r
+ UsingSecondBuffer = !(UsingSecondBuffer);\r
+\r
+ /* Select the next dataflash chip based on the new dataflash page index */\r
+ Dataflash_SelectChipFromPage(CurrDFPage);\r
+\r
+#if (DATAFLASH_PAGE_SIZE > VIRTUAL_MEMORY_BLOCK_SIZE)\r
+ /* If less than one dataflash page remaining, copy over the existing page to preserve trailing data */\r
+ if ((TotalBlocks * (VIRTUAL_MEMORY_BLOCK_SIZE >> 4)) < (DATAFLASH_PAGE_SIZE >> 4))\r
+ {\r
+ /* Copy selected dataflash's current page contents to the dataflash buffer */\r
+ Dataflash_WaitWhileBusy();\r
+ Dataflash_SendByte(UsingSecondBuffer ? DF_CMD_MAINMEMTOBUFF2 : DF_CMD_MAINMEMTOBUFF1);\r
+ Dataflash_SendAddressBytes(CurrDFPage, 0);\r
+ Dataflash_WaitWhileBusy();\r
+ }\r
+#endif\r
+\r
+ /* Send the dataflash buffer write command */\r
+ Dataflash_SendByte(UsingSecondBuffer ? DF_CMD_BUFF2WRITE : DF_CMD_BUFF1WRITE);\r
+ Dataflash_SendAddressBytes(0, 0); \r
+ }\r
+\r
+ /* Write one 16-byte chunk of data to the dataflash */\r
+ Dataflash_SendByte(Endpoint_Read_Byte());\r
+ Dataflash_SendByte(Endpoint_Read_Byte());\r
+ Dataflash_SendByte(Endpoint_Read_Byte());\r
+ Dataflash_SendByte(Endpoint_Read_Byte());\r
+ Dataflash_SendByte(Endpoint_Read_Byte());\r
+ Dataflash_SendByte(Endpoint_Read_Byte());\r
+ Dataflash_SendByte(Endpoint_Read_Byte());\r
+ Dataflash_SendByte(Endpoint_Read_Byte());\r
+ Dataflash_SendByte(Endpoint_Read_Byte());\r
+ Dataflash_SendByte(Endpoint_Read_Byte());\r
+ Dataflash_SendByte(Endpoint_Read_Byte());\r
+ Dataflash_SendByte(Endpoint_Read_Byte());\r
+ Dataflash_SendByte(Endpoint_Read_Byte());\r
+ Dataflash_SendByte(Endpoint_Read_Byte());\r
+ Dataflash_SendByte(Endpoint_Read_Byte());\r
+ Dataflash_SendByte(Endpoint_Read_Byte());\r
+ \r
+ /* Increment the dataflash page 16 byte block counter */\r
+ CurrDFPageByteDiv16++;\r
+\r
+ /* Increment the block 16 byte block counter */\r
+ BytesInBlockDiv16++;\r
+\r
+ /* Check if the current command is being aborted by the host */\r
+ if (MSInterfaceInfo->State.IsMassStoreReset)\r
+ return; \r
+ }\r
+ \r
+ /* Decrement the blocks remaining counter and reset the sub block counter */\r
+ TotalBlocks--;\r
+ }\r
+\r
+ /* Write the dataflash buffer contents back to the dataflash page */\r
+ Dataflash_WaitWhileBusy();\r
+ Dataflash_SendByte(UsingSecondBuffer ? DF_CMD_BUFF2TOMAINMEMWITHERASE : DF_CMD_BUFF1TOMAINMEMWITHERASE);\r
+ Dataflash_SendAddressBytes(CurrDFPage, 0x00);\r
+ Dataflash_WaitWhileBusy();\r
+\r
+ /* If the endpoint is empty, clear it ready for the next packet from the host */\r
+ if (!(Endpoint_IsReadWriteAllowed()))\r
+ Endpoint_ClearOUT();\r
+\r
+ /* Deselect all dataflash chips */\r
+ Dataflash_DeselectChip();\r
+}\r
+\r
+/** Reads blocks (OS blocks, not Dataflash pages) from the storage medium, the board dataflash IC(s), into\r
+ * the pre-selected data IN endpoint. This routine reads in Dataflash page sized blocks from the Dataflash\r
+ * and writes them in OS sized blocks to the endpoint.\r
+ *\r
+ * \param[in] MSInterfaceInfo Pointer to a structure containing a Mass Storage Class configuration and state\r
+ * \param[in] BlockAddress Data block starting address for the read sequence\r
+ * \param[in] TotalBlocks Number of blocks of data to read\r
+ */\r
+void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* MSInterfaceInfo, const uint32_t BlockAddress, uint16_t TotalBlocks)\r
+{\r
+ uint16_t CurrDFPage = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) / DATAFLASH_PAGE_SIZE);\r
+ uint16_t CurrDFPageByte = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);\r
+ uint8_t CurrDFPageByteDiv16 = (CurrDFPageByte >> 4);\r
+\r
+ /* Select the correct starting Dataflash IC for the block requested */\r
+ Dataflash_SelectChipFromPage(CurrDFPage);\r
+\r
+ /* Send the dataflash main memory page read command */\r
+ Dataflash_SendByte(DF_CMD_MAINMEMPAGEREAD);\r
+ Dataflash_SendAddressBytes(CurrDFPage, CurrDFPageByte);\r
+ Dataflash_SendByte(0x00);\r
+ Dataflash_SendByte(0x00);\r
+ Dataflash_SendByte(0x00);\r
+ Dataflash_SendByte(0x00);\r
+ \r
+ /* Wait until endpoint is ready before continuing */\r
+ if (Endpoint_WaitUntilReady())\r
+ return;\r
+ \r
+ while (TotalBlocks)\r
+ {\r
+ uint8_t BytesInBlockDiv16 = 0;\r
+ \r
+ /* Write an endpoint packet sized data block to the dataflash */\r
+ while (BytesInBlockDiv16 < (VIRTUAL_MEMORY_BLOCK_SIZE >> 4))\r
+ {\r
+ /* Check if the endpoint is currently full */\r
+ if (!(Endpoint_IsReadWriteAllowed()))\r
+ {\r
+ /* Clear the endpoint bank to send its contents to the host */\r
+ Endpoint_ClearIN();\r
+ \r
+ /* Wait until the endpoint is ready for more data */\r
+ if (Endpoint_WaitUntilReady())\r
+ return;\r
+ }\r
+ \r
+ /* Check if end of dataflash page reached */\r
+ if (CurrDFPageByteDiv16 == (DATAFLASH_PAGE_SIZE >> 4))\r
+ {\r
+ /* Reset the dataflash buffer counter, increment the page counter */\r
+ CurrDFPageByteDiv16 = 0;\r
+ CurrDFPage++;\r
+\r
+ /* Select the next dataflash chip based on the new dataflash page index */\r
+ Dataflash_SelectChipFromPage(CurrDFPage);\r
+ \r
+ /* Send the dataflash main memory page read command */\r
+ Dataflash_SendByte(DF_CMD_MAINMEMPAGEREAD);\r
+ Dataflash_SendAddressBytes(CurrDFPage, 0);\r
+ Dataflash_SendByte(0x00);\r
+ Dataflash_SendByte(0x00);\r
+ Dataflash_SendByte(0x00);\r
+ Dataflash_SendByte(0x00);\r
+ } \r
+\r
+ /* Read one 16-byte chunk of data from the dataflash */\r
+ Endpoint_Write_Byte(Dataflash_ReceiveByte());\r
+ Endpoint_Write_Byte(Dataflash_ReceiveByte());\r
+ Endpoint_Write_Byte(Dataflash_ReceiveByte());\r
+ Endpoint_Write_Byte(Dataflash_ReceiveByte());\r
+ Endpoint_Write_Byte(Dataflash_ReceiveByte());\r
+ Endpoint_Write_Byte(Dataflash_ReceiveByte());\r
+ Endpoint_Write_Byte(Dataflash_ReceiveByte());\r
+ Endpoint_Write_Byte(Dataflash_ReceiveByte());\r
+ Endpoint_Write_Byte(Dataflash_ReceiveByte());\r
+ Endpoint_Write_Byte(Dataflash_ReceiveByte());\r
+ Endpoint_Write_Byte(Dataflash_ReceiveByte());\r
+ Endpoint_Write_Byte(Dataflash_ReceiveByte());\r
+ Endpoint_Write_Byte(Dataflash_ReceiveByte());\r
+ Endpoint_Write_Byte(Dataflash_ReceiveByte());\r
+ Endpoint_Write_Byte(Dataflash_ReceiveByte());\r
+ Endpoint_Write_Byte(Dataflash_ReceiveByte());\r
+ \r
+ /* Increment the dataflash page 16 byte block counter */\r
+ CurrDFPageByteDiv16++;\r
+ \r
+ /* Increment the block 16 byte block counter */\r
+ BytesInBlockDiv16++;\r
+\r
+ /* Check if the current command is being aborted by the host */\r
+ if (MSInterfaceInfo->State.IsMassStoreReset)\r
+ return;\r
+ }\r
+ \r
+ /* Decrement the blocks remaining counter */\r
+ TotalBlocks--;\r
+ }\r
+ \r
+ /* If the endpoint is full, send its contents to the host */\r
+ if (!(Endpoint_IsReadWriteAllowed()))\r
+ Endpoint_ClearIN();\r
+\r
+ /* Deselect all dataflash chips */\r
+ Dataflash_DeselectChip();\r
+}\r
+\r
+/** Writes blocks (OS blocks, not Dataflash pages) to the storage medium, the board dataflash IC(s), from\r
+ * the a given RAM buffer. This routine reads in OS sized blocks from the buffer and writes them to the\r
+ * dataflash in Dataflash page sized blocks. This can be linked to FAT libraries to write files to the\r
+ * dataflash.\r
+ *\r
+ * \param[in] BlockAddress Data block starting address for the write sequence\r
+ * \param[in] TotalBlocks Number of blocks of data to write\r
+ * \param[in] BufferPtr Pointer to the data source RAM buffer\r
+ */\r
+void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress, uint16_t TotalBlocks, const uint8_t* BufferPtr)\r
+{\r
+ uint16_t CurrDFPage = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) / DATAFLASH_PAGE_SIZE);\r
+ uint16_t CurrDFPageByte = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);\r
+ uint8_t CurrDFPageByteDiv16 = (CurrDFPageByte >> 4);\r
+ bool UsingSecondBuffer = false;\r
+\r
+ /* Select the correct starting Dataflash IC for the block requested */\r
+ Dataflash_SelectChipFromPage(CurrDFPage);\r
+\r
+#if (DATAFLASH_PAGE_SIZE > VIRTUAL_MEMORY_BLOCK_SIZE)\r
+ /* Copy selected dataflash's current page contents to the dataflash buffer */\r
+ Dataflash_SendByte(DF_CMD_MAINMEMTOBUFF1);\r
+ Dataflash_SendAddressBytes(CurrDFPage, 0);\r
+ Dataflash_WaitWhileBusy();\r
+#endif\r
+\r
+ /* Send the dataflash buffer write command */\r
+ Dataflash_SendByte(DF_CMD_BUFF1WRITE);\r
+ Dataflash_SendAddressBytes(0, CurrDFPageByte);\r
+ \r
+ while (TotalBlocks)\r
+ {\r
+ uint8_t BytesInBlockDiv16 = 0;\r
+ \r
+ /* Write an endpoint packet sized data block to the dataflash */\r
+ while (BytesInBlockDiv16 < (VIRTUAL_MEMORY_BLOCK_SIZE >> 4))\r
+ {\r
+ /* Check if end of dataflash page reached */\r
+ if (CurrDFPageByteDiv16 == (DATAFLASH_PAGE_SIZE >> 4))\r
+ {\r
+ /* Write the dataflash buffer contents back to the dataflash page */\r
+ Dataflash_WaitWhileBusy();\r
+ Dataflash_SendByte(UsingSecondBuffer ? DF_CMD_BUFF2TOMAINMEMWITHERASE : DF_CMD_BUFF1TOMAINMEMWITHERASE);\r
+ Dataflash_SendAddressBytes(CurrDFPage, 0);\r
+\r
+ /* Reset the dataflash buffer counter, increment the page counter */\r
+ CurrDFPageByteDiv16 = 0;\r
+ CurrDFPage++;\r
+\r
+ /* Once all the dataflash ICs have had their first buffers filled, switch buffers to maintain throughput */\r
+ if (Dataflash_GetSelectedChip() == DATAFLASH_CHIP_MASK(DATAFLASH_TOTALCHIPS))\r
+ UsingSecondBuffer = !(UsingSecondBuffer);\r
+\r
+ /* Select the next dataflash chip based on the new dataflash page index */\r
+ Dataflash_SelectChipFromPage(CurrDFPage);\r
+\r
+#if (DATAFLASH_PAGE_SIZE > VIRTUAL_MEMORY_BLOCK_SIZE)\r
+ /* If less than one dataflash page remaining, copy over the existing page to preserve trailing data */\r
+ if ((TotalBlocks * (VIRTUAL_MEMORY_BLOCK_SIZE >> 4)) < (DATAFLASH_PAGE_SIZE >> 4))\r
+ {\r
+ /* Copy selected dataflash's current page contents to the dataflash buffer */\r
+ Dataflash_WaitWhileBusy();\r
+ Dataflash_SendByte(UsingSecondBuffer ? DF_CMD_MAINMEMTOBUFF2 : DF_CMD_MAINMEMTOBUFF1);\r
+ Dataflash_SendAddressBytes(CurrDFPage, 0);\r
+ Dataflash_WaitWhileBusy();\r
+ }\r
+#endif\r
+\r
+ /* Send the dataflash buffer write command */\r
+ Dataflash_ToggleSelectedChipCS();\r
+ Dataflash_SendByte(DF_CMD_BUFF1WRITE);\r
+ Dataflash_SendAddressBytes(0, 0);\r
+ }\r
+ \r
+ /* Write one 16-byte chunk of data to the dataflash */\r
+ for (uint8_t ByteNum = 0; ByteNum < 16; ByteNum++)\r
+ Dataflash_SendByte(*(BufferPtr++));\r
+ \r
+ /* Increment the dataflash page 16 byte block counter */\r
+ CurrDFPageByteDiv16++;\r
+\r
+ /* Increment the block 16 byte block counter */\r
+ BytesInBlockDiv16++; \r
+ }\r
+ \r
+ /* Decrement the blocks remaining counter and reset the sub block counter */\r
+ TotalBlocks--;\r
+ }\r
+\r
+ /* Write the dataflash buffer contents back to the dataflash page */\r
+ Dataflash_WaitWhileBusy();\r
+ Dataflash_SendByte(UsingSecondBuffer ? DF_CMD_BUFF2TOMAINMEMWITHERASE : DF_CMD_BUFF1TOMAINMEMWITHERASE);\r
+ Dataflash_SendAddressBytes(CurrDFPage, 0x00);\r
+ Dataflash_WaitWhileBusy();\r
+\r
+ /* Deselect all dataflash chips */\r
+ Dataflash_DeselectChip();\r
+}\r
+\r
+/** Reads blocks (OS blocks, not Dataflash pages) from the storage medium, the board dataflash IC(s), into\r
+ * the a preallocated RAM buffer. This routine reads in Dataflash page sized blocks from the Dataflash\r
+ * and writes them in OS sized blocks to the given buffer. This can be linked to FAT libraries to read\r
+ * the files stored on the dataflash.\r
+ *\r
+ * \param[in] BlockAddress Data block starting address for the read sequence\r
+ * \param[in] TotalBlocks Number of blocks of data to read\r
+ * \param[out] BufferPtr Pointer to the data destination RAM buffer\r
+ */\r
+void DataflashManager_ReadBlocks_RAM(const uint32_t BlockAddress, uint16_t TotalBlocks, uint8_t* BufferPtr)\r
+{\r
+ uint16_t CurrDFPage = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) / DATAFLASH_PAGE_SIZE);\r
+ uint16_t CurrDFPageByte = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);\r
+ uint8_t CurrDFPageByteDiv16 = (CurrDFPageByte >> 4);\r
+\r
+ /* Select the correct starting Dataflash IC for the block requested */\r
+ Dataflash_SelectChipFromPage(CurrDFPage);\r
+\r
+ /* Send the dataflash main memory page read command */\r
+ Dataflash_SendByte(DF_CMD_MAINMEMPAGEREAD);\r
+ Dataflash_SendAddressBytes(CurrDFPage, CurrDFPageByte);\r
+ Dataflash_SendByte(0x00);\r
+ Dataflash_SendByte(0x00);\r
+ Dataflash_SendByte(0x00);\r
+ Dataflash_SendByte(0x00);\r
+\r
+ while (TotalBlocks)\r
+ {\r
+ uint8_t BytesInBlockDiv16 = 0;\r
+ \r
+ /* Write an endpoint packet sized data block to the dataflash */\r
+ while (BytesInBlockDiv16 < (VIRTUAL_MEMORY_BLOCK_SIZE >> 4))\r
+ {\r
+ /* Check if end of dataflash page reached */\r
+ if (CurrDFPageByteDiv16 == (DATAFLASH_PAGE_SIZE >> 4))\r
+ {\r
+ /* Reset the dataflash buffer counter, increment the page counter */\r
+ CurrDFPageByteDiv16 = 0;\r
+ CurrDFPage++;\r
+\r
+ /* Select the next dataflash chip based on the new dataflash page index */\r
+ Dataflash_SelectChipFromPage(CurrDFPage);\r
+ \r
+ /* Send the dataflash main memory page read command */\r
+ Dataflash_SendByte(DF_CMD_MAINMEMPAGEREAD);\r
+ Dataflash_SendAddressBytes(CurrDFPage, 0);\r
+ Dataflash_SendByte(0x00);\r
+ Dataflash_SendByte(0x00);\r
+ Dataflash_SendByte(0x00);\r
+ Dataflash_SendByte(0x00);\r
+ } \r
+\r
+ /* Read one 16-byte chunk of data from the dataflash */\r
+ for (uint8_t ByteNum = 0; ByteNum < 16; ByteNum++)\r
+ *(BufferPtr++) = Dataflash_ReceiveByte();\r
+ \r
+ /* Increment the dataflash page 16 byte block counter */\r
+ CurrDFPageByteDiv16++;\r
+ \r
+ /* Increment the block 16 byte block counter */\r
+ BytesInBlockDiv16++;\r
+ }\r
+ \r
+ /* Decrement the blocks remaining counter */\r
+ TotalBlocks--;\r
+ }\r
+\r
+ /* Deselect all dataflash chips */\r
+ Dataflash_DeselectChip();\r
+}\r
+\r
+/** Disables the dataflash memory write protection bits on the board Dataflash ICs, if enabled. */\r
+void DataflashManager_ResetDataflashProtections(void)\r
+{\r
+ /* Select first dataflash chip, send the read status register command */\r
+ Dataflash_SelectChip(DATAFLASH_CHIP1);\r
+ Dataflash_SendByte(DF_CMD_GETSTATUS);\r
+ \r
+ /* Check if sector protection is enabled */\r
+ if (Dataflash_ReceiveByte() & DF_STATUS_SECTORPROTECTION_ON)\r
+ {\r
+ Dataflash_ToggleSelectedChipCS();\r
+\r
+ /* Send the commands to disable sector protection */\r
+ Dataflash_SendByte(DF_CMD_SECTORPROTECTIONOFF[0]);\r
+ Dataflash_SendByte(DF_CMD_SECTORPROTECTIONOFF[1]);\r
+ Dataflash_SendByte(DF_CMD_SECTORPROTECTIONOFF[2]);\r
+ Dataflash_SendByte(DF_CMD_SECTORPROTECTIONOFF[3]);\r
+ }\r
+ \r
+ /* Select second dataflash chip (if present on selected board), send read status register command */\r
+ #if (DATAFLASH_TOTALCHIPS == 2)\r
+ Dataflash_SelectChip(DATAFLASH_CHIP2);\r
+ Dataflash_SendByte(DF_CMD_GETSTATUS);\r
+ \r
+ /* Check if sector protection is enabled */\r
+ if (Dataflash_ReceiveByte() & DF_STATUS_SECTORPROTECTION_ON)\r
+ {\r
+ Dataflash_ToggleSelectedChipCS();\r
+\r
+ /* Send the commands to disable sector protection */\r
+ Dataflash_SendByte(DF_CMD_SECTORPROTECTIONOFF[0]);\r
+ Dataflash_SendByte(DF_CMD_SECTORPROTECTIONOFF[1]);\r
+ Dataflash_SendByte(DF_CMD_SECTORPROTECTIONOFF[2]);\r
+ Dataflash_SendByte(DF_CMD_SECTORPROTECTIONOFF[3]);\r
+ }\r
+ #endif\r
+ \r
+ /* Deselect current dataflash chip */\r
+ Dataflash_DeselectChip();\r
+}\r
+\r
+/** Performs a simple test on the attached Dataflash IC(s) to ensure that they are working.\r
+ *\r
+ * \return Boolean true if all media chips are working, false otherwise\r
+ */\r
+bool DataflashManager_CheckDataflashOperation(void)\r
+{\r
+ uint8_t ReturnByte;\r
+\r
+ /* Test first Dataflash IC is present and responding to commands */\r
+ Dataflash_SelectChip(DATAFLASH_CHIP1);\r
+ Dataflash_SendByte(DF_CMD_READMANUFACTURERDEVICEINFO);\r
+ ReturnByte = Dataflash_ReceiveByte();\r
+ Dataflash_DeselectChip();\r
+\r
+ /* If returned data is invalid, fail the command */\r
+ if (ReturnByte != DF_MANUFACTURER_ATMEL)\r
+ return false;\r
+\r
+ #if (DATAFLASH_TOTALCHIPS == 2)\r
+ /* Test second Dataflash IC is present and responding to commands */\r
+ Dataflash_SelectChip(DATAFLASH_CHIP2);\r
+ Dataflash_SendByte(DF_CMD_READMANUFACTURERDEVICEINFO);\r
+ ReturnByte = Dataflash_ReceiveByte();\r
+ Dataflash_DeselectChip();\r
+\r
+ /* If returned data is invalid, fail the command */\r
+ if (ReturnByte != DF_MANUFACTURER_ATMEL)\r
+ return false;\r
+ #endif\r
+ \r
+ return true;\r
+}\r
--- /dev/null
+/*\r
+ LUFA Library\r
+ Copyright (C) Dean Camera, 2009.\r
+ \r
+ dean [at] fourwalledcubicle [dot] com\r
+ www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+ Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+ Permission to use, copy, modify, distribute, and sell this \r
+ software and its documentation for any purpose is hereby granted\r
+ without fee, provided that the above copyright notice appear in \r
+ all copies and that both that the copyright notice and this\r
+ permission notice and warranty disclaimer appear in supporting \r
+ documentation, and that the name of the author not be used in \r
+ advertising or publicity pertaining to distribution of the \r
+ software without specific, written prior permission.\r
+\r
+ The author disclaim all warranties with regard to this\r
+ software, including all implied warranties of merchantability\r
+ and fitness. In no event shall the author be liable for any\r
+ special, indirect or consequential damages or any damages\r
+ whatsoever resulting from loss of use, data or profits, whether\r
+ in an action of contract, negligence or other tortious action,\r
+ arising out of or in connection with the use or performance of\r
+ this software.\r
+*/\r
+\r
+/** \file\r
+ *\r
+ * Header file for DataflashManager.c.\r
+ */\r
+ \r
+#ifndef _DATAFLASH_MANAGER_H\r
+#define _DATAFLASH_MANAGER_H\r
+\r
+ /* Includes: */\r
+ #include <avr/io.h>\r
+ \r
+ #include "TempDataLogger.h"\r
+ #include "Descriptors.h"\r
+\r
+ #include <LUFA/Common/Common.h>\r
+ #include <LUFA/Drivers/USB/USB.h>\r
+ #include <LUFA/Drivers/USB/Class/MassStorage.h>\r
+ #include <LUFA/Drivers/Board/Dataflash.h>\r
+\r
+ /* Preprocessor Checks: */\r
+ #if (DATAFLASH_PAGE_SIZE % 16)\r
+ #error Dataflash page size must be a multiple of 16 bytes.\r
+ #endif\r
+\r
+ /* Defines: */\r
+ /** Total number of bytes of the storage medium, comprised of one or more dataflash ICs. */\r
+ #define VIRTUAL_MEMORY_BYTES ((uint32_t)DATAFLASH_PAGES * DATAFLASH_PAGE_SIZE * DATAFLASH_TOTALCHIPS)\r
+\r
+ /** Block size of the device. This is kept at 512 to remain compatible with the OS despite the underlying\r
+ * storage media (Dataflash) using a different native block size. Do not change this value.\r
+ */\r
+ #define VIRTUAL_MEMORY_BLOCK_SIZE 512\r
+ \r
+ /** Total number of blocks of the virtual memory for reporting to the host as the device's total capacity. Do not\r
+ * change this value; change VIRTUAL_MEMORY_BYTES instead to alter the media size.\r
+ */\r
+ #define VIRTUAL_MEMORY_BLOCKS (VIRTUAL_MEMORY_BYTES / VIRTUAL_MEMORY_BLOCK_SIZE)\r
+ \r
+ /* Function Prototypes: */\r
+ void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* MSInterfaceInfo, const uint32_t BlockAddress,\r
+ uint16_t TotalBlocks);\r
+ void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* MSInterfaceInfo, const uint32_t BlockAddress,\r
+ uint16_t TotalBlocks);\r
+ void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress, uint16_t TotalBlocks,\r
+ const uint8_t* BufferPtr) ATTR_NON_NULL_PTR_ARG(3);\r
+ void DataflashManager_ReadBlocks_RAM(const uint32_t BlockAddress, uint16_t TotalBlocks,\r
+ uint8_t* BufferPtr) ATTR_NON_NULL_PTR_ARG(3);\r
+ void DataflashManager_ResetDataflashProtections(void);\r
+ bool DataflashManager_CheckDataflashOperation(void);\r
+ \r
+#endif\r
--- /dev/null
+FatFs Module Source Files R0.07e (C)ChaN, 2009\r
+\r
+\r
+FILES\r
+\r
+ ffconf.h Configuration file for FatFs module.\r
+ ff.h Common include file for FatFs and application module.\r
+ ff.c FatFs module.\r
+ diskio.h Common include file for FatFs and disk I/O module.\r
+ diskio.c Skeleton of low level disk I/O module.\r
+ integer.h Alternative type definitions for integer variables.\r
+ option Optional external functions.\r
+\r
+ Low level disk I/O module is not included in this archive because the FatFs\r
+ module is only a generic file system layer and not depend on any specific\r
+ storage device. You have to provide a low level disk I/O module that written\r
+ to control your storage device.\r
+\r
+\r
+\r
+AGREEMENTS\r
+\r
+ FatFs module is an open source software to implement FAT file system to\r
+ small embedded systems. This is a free software and is opened for education,\r
+ research and commercial developments under license policy of following trems.\r
+\r
+ Copyright (C) 2009, ChaN, all right reserved.\r
+\r
+ * The FatFs module is a free software and there is NO WARRANTY.\r
+ * No restriction on use. You can use, modify and redistribute it for\r
+ personal, non-profit or commercial product UNDER YOUR RESPONSIBILITY.\r
+ * Redistributions of source code must retain the above copyright notice.\r
+\r
+\r
+\r
+REVISION HISTORY\r
+\r
+ Feb 26, 2006 R0.00 Prototype\r
+\r
+ Apr 29, 2006 R0.01 First release.\r
+\r
+ Jun 01, 2006 R0.02 Added FAT12.\r
+ Removed unbuffered mode.\r
+ Fixed a problem on small (<32M) patition.\r
+\r
+ Jun 10, 2006 R0.02a Added a configuration option _FS_MINIMUM.\r
+\r
+ Sep 22, 2006 R0.03 Added f_rename.\r
+ Changed option _FS_MINIMUM to _FS_MINIMIZE.\r
+\r
+ Dec 11, 2006 R0.03a Improved cluster scan algolithm to write files fast.\r
+ Fixed f_mkdir creates incorrect directory on FAT32.\r
+\r
+ Feb 04, 2007 R0.04 Supported multiple drive system. (FatFs)\r
+ Changed some APIs for multiple drive system.\r
+ Added f_mkfs. (FatFs)\r
+ Added _USE_FAT32 option. (Tiny-FatFs)\r
+\r
+ Apr 01, 2007 R0.04a Supported multiple partitions on a plysical drive. (FatFs)\r
+ Fixed an endian sensitive code in f_mkfs. (FatFs)\r
+ Added a capability of extending the file size to f_lseek.\r
+ Added minimization level 3.\r
+ Fixed a problem that can collapse a sector when recreate an\r
+ existing file in any sub-directory at non FAT32 cfg. (Tiny-FatFs)\r
+\r
+ May 05, 2007 R0.04b Added _USE_NTFLAG option.\r
+ Added FSInfo support.\r
+ Fixed some problems corresponds to FAT32. (Tiny-FatFs)\r
+ Fixed DBCS name can result FR_INVALID_NAME.\r
+ Fixed short seek (0 < ofs <= csize) collapses the file object.\r
+\r
+ Aug 25, 2007 R0.05 Changed arguments of f_read, f_write.\r
+ Changed arguments of f_mkfs. (FatFs)\r
+ Fixed f_mkfs on FAT32 creates incorrect FSInfo. (FatFs)\r
+ Fixed f_mkdir on FAT32 creates incorrect directory. (FatFs)\r
+\r
+ Feb 03, 2008 R0.05a Added f_truncate().\r
+ Added f_utime().\r
+ Fixed off by one error at FAT sub-type determination.\r
+ Fixed btr in f_read() can be mistruncated.\r
+ Fixed cached sector is not flushed when create and close without write.\r
+\r
+ Apr 01, 2008 R0.06 Added f_forward(). (Tiny-FatFs)\r
+ Added string functions: fputc(), fputs(), fprintf() and fgets().\r
+ Improved performance of f_lseek() on move to the same or following cluster.\r
+\r
+ Apr 01, 2009, R0.07 Merged Tiny-FatFs as a buffer configuration option.\r
+ Added long file name support.\r
+ Added multiple code page support.\r
+ Added re-entrancy for multitask operation.\r
+ Added auto cluster size selection to f_mkfs().\r
+ Added rewind option to f_readdir().\r
+ Changed result code of critical errors.\r
+ Renamed string functions to avoid name collision.\r
+\r
+ Apr 14, 2009, R0.07a Separated out OS dependent code on reentrant cfg.\r
+ Added multiple sector size support.\r
+\r
+ Jun 21, 2009, R0.07c Fixed f_unlink() may return FR_OK on error.\r
+ Fixed wrong cache control in f_lseek().\r
+ Added relative path feature.\r
+ Added f_chdir().\r
+ Added f_chdrive().\r
+ Added proper case conversion for extended characters.\r
+\r
+ Nov 03,'2009 R0.07e Separated out configuration options from ff.h to ffconf.h.\r
+ Added a configuration option, _LFN_UNICODE.\r
+ Fixed f_unlink() fails to remove a sub-dir on _FS_RPATH.\r
+ Fixed name matching error on the 13 char boundary.\r
+ Changed f_readdir() to return the SFN with always upper case on non-LFN cfg.\r
--- /dev/null
+/*-----------------------------------------------------------------------*/\r
+/* Low level disk I/O module skeleton for FatFs (C)ChaN, 2007 */\r
+/*-----------------------------------------------------------------------*/\r
+/* This is a stub disk I/O module that acts as front end of the existing */\r
+/* disk I/O modules and attach it to FatFs module with common interface. */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+#include "diskio.h"\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Inidialize a Drive */\r
+\r
+DSTATUS disk_initialize (\r
+ BYTE drv /* Physical drive nmuber (0..) */\r
+)\r
+{\r
+ return FR_OK;\r
+}\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Return Disk Status */\r
+\r
+DSTATUS disk_status (\r
+ BYTE drv /* Physical drive nmuber (0..) */\r
+)\r
+{\r
+ return FR_OK;\r
+}\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Read Sector(s) */\r
+\r
+DRESULT disk_read (\r
+ BYTE drv, /* Physical drive nmuber (0..) */\r
+ BYTE *buff, /* Data buffer to store read data */\r
+ DWORD sector, /* Sector address (LBA) */\r
+ BYTE count /* Number of sectors to read (1..255) */\r
+)\r
+{\r
+ DataflashManager_ReadBlocks_RAM(sector, count, buff);\r
+ return RES_OK;\r
+}\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Write Sector(s) */\r
+\r
+#if _READONLY == 0\r
+DRESULT disk_write (\r
+ BYTE drv, /* Physical drive nmuber (0..) */\r
+ const BYTE *buff, /* Data to be written */\r
+ DWORD sector, /* Sector address (LBA) */\r
+ BYTE count /* Number of sectors to write (1..255) */\r
+)\r
+{\r
+ DataflashManager_WriteBlocks_RAM(sector, count, buff);\r
+ return RES_OK;\r
+}\r
+#endif /* _READONLY */\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Miscellaneous Functions */\r
+\r
+DRESULT disk_ioctl (\r
+ BYTE drv, /* Physical drive nmuber (0..) */\r
+ BYTE ctrl, /* Control code */\r
+ void *buff /* Buffer to send/receive control data */\r
+)\r
+{\r
+ if (ctrl == CTRL_SYNC)\r
+ return RES_OK;\r
+ else\r
+ return RES_PARERR;\r
+}\r
+\r
+\r
+DWORD get_fattime (void)\r
+{\r
+ return (1UL << 25) | (1UL << 21) | (1UL << 16) | (1UL << 11) | (1UL << 5) | (1UL << 0);\r
+}\r
--- /dev/null
+/*-----------------------------------------------------------------------\r
+/ Low level disk interface modlue include file R0.07 (C)ChaN, 2009\r
+/-----------------------------------------------------------------------*/\r
+\r
+#ifndef _DISKIO\r
+\r
+#define _READONLY 0 /* 1: Read-only mode */\r
+#define _USE_IOCTL 1\r
+\r
+#include "integer.h"\r
+\r
+#include "../DataflashManager.h"\r
+\r
+\r
+/* Status of Disk Functions */\r
+typedef BYTE DSTATUS;\r
+\r
+/* Results of Disk Functions */\r
+typedef enum {\r
+ RES_OK = 0, /* 0: Successful */\r
+ RES_ERROR, /* 1: R/W Error */\r
+ RES_WRPRT, /* 2: Write Protected */\r
+ RES_NOTRDY, /* 3: Not Ready */\r
+ RES_PARERR /* 4: Invalid Parameter */\r
+} DRESULT;\r
+\r
+\r
+/*---------------------------------------*/\r
+/* Prototypes for disk control functions */\r
+\r
+BOOL assign_drives (int argc, char *argv[]);\r
+DSTATUS disk_initialize (BYTE);\r
+DSTATUS disk_status (BYTE);\r
+DRESULT disk_read (BYTE, BYTE*, DWORD, BYTE);\r
+#if _READONLY == 0\r
+DRESULT disk_write (BYTE, const BYTE*, DWORD, BYTE);\r
+#endif\r
+DRESULT disk_ioctl (BYTE, BYTE, void*);\r
+\r
+\r
+/* Disk Status Bits (DSTATUS) */\r
+\r
+#define STA_NOINIT 0x01 /* Drive not initialized */\r
+#define STA_NODISK 0x02 /* No medium in the drive */\r
+#define STA_PROTECT 0x04 /* Write protected */\r
+\r
+\r
+/* Command code for disk_ioctrl() */\r
+\r
+/* Generic command */\r
+#define CTRL_SYNC 0 /* Mandatory for write functions */\r
+#define GET_SECTOR_COUNT 1 /* Mandatory for only f_mkfs() */\r
+#define GET_SECTOR_SIZE 2 /* Mandatory for multiple sector size cfg */\r
+#define GET_BLOCK_SIZE 3 /* Mandatory for only f_mkfs() */\r
+#define CTRL_POWER 4\r
+#define CTRL_LOCK 5\r
+#define CTRL_EJECT 6\r
+/* MMC/SDC command */\r
+#define MMC_GET_TYPE 10\r
+#define MMC_GET_CSD 11\r
+#define MMC_GET_CID 12\r
+#define MMC_GET_OCR 13\r
+#define MMC_GET_SDSTAT 14\r
+/* ATA/CF command */\r
+#define ATA_GET_REV 20\r
+#define ATA_GET_MODEL 21\r
+#define ATA_GET_SN 22\r
+\r
+\r
+#define _DISKIO\r
+#endif\r
--- /dev/null
+ 1 .file "diskio.c"\r
+ 2 __SREG__ = 0x3f\r
+ 3 __SP_H__ = 0x3e\r
+ 4 __SP_L__ = 0x3d\r
+ 5 __CCP__ = 0x34\r
+ 6 __tmp_reg__ = 0\r
+ 7 __zero_reg__ = 1\r
+ 15 .Ltext0:\r
+ 16 .section .text.disk_initialize,"ax",@progbits\r
+ 17 .global disk_initialize\r
+ 19 disk_initialize:\r
+ 20 .LFB52:\r
+ 21 .LSM0:\r
+ 22 .LVL0:\r
+ 23 /* prologue: function */\r
+ 24 /* frame size = 0 */\r
+ 25 .LSM1:\r
+ 26 0000 80E0 ldi r24,lo8(0)\r
+ 27 .LVL1:\r
+ 28 /* epilogue start */\r
+ 29 0002 0895 ret\r
+ 30 .LFE52:\r
+ 32 .section .text.disk_status,"ax",@progbits\r
+ 33 .global disk_status\r
+ 35 disk_status:\r
+ 36 .LFB53:\r
+ 37 .LSM2:\r
+ 38 .LVL2:\r
+ 39 /* prologue: function */\r
+ 40 /* frame size = 0 */\r
+ 41 .LSM3:\r
+ 42 0000 80E0 ldi r24,lo8(0)\r
+ 43 .LVL3:\r
+ 44 /* epilogue start */\r
+ 45 0002 0895 ret\r
+ 46 .LFE53:\r
+ 48 .section .text.disk_ioctl,"ax",@progbits\r
+ 49 .global disk_ioctl\r
+ 51 disk_ioctl:\r
+ 52 .LFB56:\r
+ 53 .LSM4:\r
+ 54 .LVL4:\r
+ 55 /* prologue: function */\r
+ 56 /* frame size = 0 */\r
+ 57 .LSM5:\r
+ 58 0000 6623 tst r22\r
+ 59 0002 01F0 breq .L6\r
+ 60 0004 84E0 ldi r24,lo8(4)\r
+ 61 .LVL5:\r
+ 62 0006 0895 ret\r
+ 63 .LVL6:\r
+ 64 .L6:\r
+ 65 0008 80E0 ldi r24,lo8(0)\r
+ 66 .LVL7:\r
+ 67 .LSM6:\r
+ 68 000a 0895 ret\r
+ 69 .LFE56:\r
+ 71 .section .text.get_fattime,"ax",@progbits\r
+ 72 .global get_fattime\r
+ 74 get_fattime:\r
+ 75 .LFB57:\r
+ 76 .LSM7:\r
+ 77 /* prologue: function */\r
+ 78 /* frame size = 0 */\r
+ 79 .LSM8:\r
+ 80 0000 61E2 ldi r22,lo8(35719201)\r
+ 81 0002 78E0 ldi r23,hi8(35719201)\r
+ 82 0004 81E2 ldi r24,hlo8(35719201)\r
+ 83 0006 92E0 ldi r25,hhi8(35719201)\r
+ 84 /* epilogue start */\r
+ 85 0008 0895 ret\r
+ 86 .LFE57:\r
+ 88 .section .text.disk_write,"ax",@progbits\r
+ 89 .global disk_write\r
+ 91 disk_write:\r
+ 92 .LFB55:\r
+ 93 .LSM9:\r
+ 94 .LVL8:\r
+ 95 0000 0F93 push r16\r
+ 96 .LVL9:\r
+ 97 /* prologue: function */\r
+ 98 /* frame size = 0 */\r
+ 99 0002 FB01 movw r30,r22\r
+ 100 .LSM10:\r
+ 101 0004 CA01 movw r24,r20\r
+ 102 0006 B901 movw r22,r18\r
+ 103 .LVL10:\r
+ 104 0008 402F mov r20,r16\r
+ 105 .LVL11:\r
+ 106 000a 50E0 ldi r21,lo8(0)\r
+ 107 000c 9F01 movw r18,r30\r
+ 108 .LVL12:\r
+ 109 000e 0E94 0000 call DataflashManager_WriteBlocks_RAM\r
+ 110 .LVL13:\r
+ 111 .LSM11:\r
+ 112 0012 80E0 ldi r24,lo8(0)\r
+ 113 /* epilogue start */\r
+ 114 0014 0F91 pop r16\r
+ 115 .LVL14:\r
+ 116 0016 0895 ret\r
+ 117 .LFE55:\r
+ 119 .section .text.disk_read,"ax",@progbits\r
+ 120 .global disk_read\r
+ 122 disk_read:\r
+ 123 .LFB54:\r
+ 124 .LSM12:\r
+ 125 .LVL15:\r
+ 126 0000 0F93 push r16\r
+ 127 .LVL16:\r
+ 128 /* prologue: function */\r
+ 129 /* frame size = 0 */\r
+ 130 0002 FB01 movw r30,r22\r
+ 131 .LSM13:\r
+ 132 0004 CA01 movw r24,r20\r
+ 133 0006 B901 movw r22,r18\r
+ 134 .LVL17:\r
+ 135 0008 402F mov r20,r16\r
+ 136 .LVL18:\r
+ 137 000a 50E0 ldi r21,lo8(0)\r
+ 138 000c 9F01 movw r18,r30\r
+ 139 .LVL19:\r
+ 140 000e 0E94 0000 call DataflashManager_ReadBlocks_RAM\r
+ 141 .LVL20:\r
+ 142 .LSM14:\r
+ 143 0012 80E0 ldi r24,lo8(0)\r
+ 144 /* epilogue start */\r
+ 145 0014 0F91 pop r16\r
+ 146 .LVL21:\r
+ 147 0016 0895 ret\r
+ 148 .LFE54:\r
+ 214 .Letext0:\r
+DEFINED SYMBOLS\r
+ *ABS*:00000000 diskio.c\r
+C:\Users\Dean\AppData\Local\Temp/ccUCer1P.s:2 *ABS*:0000003f __SREG__\r
+C:\Users\Dean\AppData\Local\Temp/ccUCer1P.s:3 *ABS*:0000003e __SP_H__\r
+C:\Users\Dean\AppData\Local\Temp/ccUCer1P.s:4 *ABS*:0000003d __SP_L__\r
+C:\Users\Dean\AppData\Local\Temp/ccUCer1P.s:5 *ABS*:00000034 __CCP__\r
+C:\Users\Dean\AppData\Local\Temp/ccUCer1P.s:6 *ABS*:00000000 __tmp_reg__\r
+C:\Users\Dean\AppData\Local\Temp/ccUCer1P.s:7 *ABS*:00000001 __zero_reg__\r
+C:\Users\Dean\AppData\Local\Temp/ccUCer1P.s:19 .text.disk_initialize:00000000 disk_initialize\r
+C:\Users\Dean\AppData\Local\Temp/ccUCer1P.s:35 .text.disk_status:00000000 disk_status\r
+C:\Users\Dean\AppData\Local\Temp/ccUCer1P.s:51 .text.disk_ioctl:00000000 disk_ioctl\r
+C:\Users\Dean\AppData\Local\Temp/ccUCer1P.s:74 .text.get_fattime:00000000 get_fattime\r
+C:\Users\Dean\AppData\Local\Temp/ccUCer1P.s:91 .text.disk_write:00000000 disk_write\r
+C:\Users\Dean\AppData\Local\Temp/ccUCer1P.s:122 .text.disk_read:00000000 disk_read\r
+\r
+UNDEFINED SYMBOLS\r
+DataflashManager_WriteBlocks_RAM\r
+DataflashManager_ReadBlocks_RAM\r
--- /dev/null
+/*----------------------------------------------------------------------------/\r
+/ FatFs - FAT file system module R0.07e (C)ChaN, 2009\r
+/-----------------------------------------------------------------------------/\r
+/ FatFs module is a generic FAT file system module for small embedded systems.\r
+/ This is a free software that opened for education, research and commercial\r
+/ developments under license policy of following trems.\r
+/\r
+/ Copyright (C) 2009, ChaN, all right reserved.\r
+/\r
+/ * The FatFs module is a free software and there is NO WARRANTY.\r
+/ * No restriction on use. You can use, modify and redistribute it for\r
+/ personal, non-profit or commercial products UNDER YOUR RESPONSIBILITY.\r
+/ * Redistributions of source code must retain the above copyright notice.\r
+/\r
+/-----------------------------------------------------------------------------/\r
+/ Feb 26,'06 R0.00 Prototype.\r
+/\r
+/ Apr 29,'06 R0.01 First stable version.\r
+/\r
+/ Jun 01,'06 R0.02 Added FAT12 support.\r
+/ Removed unbuffered mode.\r
+/ Fixed a problem on small (<32M) patition.\r
+/ Jun 10,'06 R0.02a Added a configuration option (_FS_MINIMUM).\r
+/\r
+/ Sep 22,'06 R0.03 Added f_rename().\r
+/ Changed option _FS_MINIMUM to _FS_MINIMIZE.\r
+/ Dec 11,'06 R0.03a Improved cluster scan algolithm to write files fast.\r
+/ Fixed f_mkdir() creates incorrect directory on FAT32.\r
+/\r
+/ Feb 04,'07 R0.04 Supported multiple drive system.\r
+/ Changed some interfaces for multiple drive system.\r
+/ Changed f_mountdrv() to f_mount().\r
+/ Added f_mkfs().\r
+/ Apr 01,'07 R0.04a Supported multiple partitions on a plysical drive.\r
+/ Added a capability of extending file size to f_lseek().\r
+/ Added minimization level 3.\r
+/ Fixed an endian sensitive code in f_mkfs().\r
+/ May 05,'07 R0.04b Added a configuration option _USE_NTFLAG.\r
+/ Added FSInfo support.\r
+/ Fixed DBCS name can result FR_INVALID_NAME.\r
+/ Fixed short seek (<= csize) collapses the file object.\r
+/\r
+/ Aug 25,'07 R0.05 Changed arguments of f_read(), f_write() and f_mkfs().\r
+/ Fixed f_mkfs() on FAT32 creates incorrect FSInfo.\r
+/ Fixed f_mkdir() on FAT32 creates incorrect directory.\r
+/ Feb 03,'08 R0.05a Added f_truncate() and f_utime().\r
+/ Fixed off by one error at FAT sub-type determination.\r
+/ Fixed btr in f_read() can be mistruncated.\r
+/ Fixed cached sector is not flushed when create and close\r
+/ without write.\r
+/\r
+/ Apr 01,'08 R0.06 Added fputc(), fputs(), fprintf() and fgets().\r
+/ Improved performance of f_lseek() on moving to the same\r
+/ or following cluster.\r
+/\r
+/ Apr 01,'09 R0.07 Merged Tiny-FatFs as a buffer configuration option.\r
+/ Added long file name support.\r
+/ Added multiple code page support.\r
+/ Added re-entrancy for multitask operation.\r
+/ Added auto cluster size selection to f_mkfs().\r
+/ Added rewind option to f_readdir().\r
+/ Changed result code of critical errors.\r
+/ Renamed string functions to avoid name collision.\r
+/ Apr 14,'09 R0.07a Separated out OS dependent code on reentrant cfg.\r
+/ Added multiple sector size support.\r
+/ Jun 21,'09 R0.07c Fixed f_unlink() can return FR_OK on error.\r
+/ Fixed wrong cache control in f_lseek().\r
+/ Added relative path feature.\r
+/ Added f_chdir() and f_chdrive().\r
+/ Added proper case conversion to extended char.\r
+/ Nov 03,'09 R0.07e Separated out configuration options from ff.h to ffconf.h.\r
+/ Fixed f_unlink() fails to remove a sub-dir on _FS_RPATH.\r
+/ Fixed name matching error on the 13 char boundary.\r
+/ Added a configuration option, _LFN_UNICODE.\r
+/ Changed f_readdir() to return the SFN with always upper\r
+/ case on non-LFN cfg.\r
+/---------------------------------------------------------------------------*/\r
+\r
+#include "ff.h" /* FatFs configurations and declarations */\r
+#include "diskio.h" /* Declarations of low level disk I/O functions */\r
+\r
+/*--------------------------------------------------------------------------\r
+\r
+ Module Private Definitions\r
+\r
+---------------------------------------------------------------------------*/\r
+\r
+#if _FATFS != 0x007E\r
+#error Wrong include file (ff.h).\r
+#endif\r
+\r
+#if _FS_REENTRANT\r
+#if _USE_LFN == 1\r
+#error Static LFN work area must not be used in re-entrant configuration.\r
+#endif\r
+#define ENTER_FF(fs) { if (!lock_fs(fs)) return FR_TIMEOUT; }\r
+#define LEAVE_FF(fs, res) { unlock_fs(fs, res); return res; }\r
+\r
+#else\r
+#define ENTER_FF(fs)\r
+#define LEAVE_FF(fs, res) return res\r
+\r
+#endif\r
+\r
+#define ABORT(fs, res) { fp->flag |= FA__ERROR; LEAVE_FF(fs, res); }\r
+\r
+#ifndef NULL\r
+#define NULL 0\r
+#endif\r
+\r
+/* Name status flags */\r
+#define NS 11 /* Offset of name status byte */\r
+#define NS_LOSS 0x01 /* Out of 8.3 format */\r
+#define NS_LFN 0x02 /* Force to create LFN entry */\r
+#define NS_LAST 0x04 /* Last segment */\r
+#define NS_BODY 0x08 /* Lower case flag (body) */\r
+#define NS_EXT 0x10 /* Lower case flag (ext) */\r
+#define NS_DOT 0x20 /* Dot entry */\r
+\r
+\r
+\r
+\r
+/*--------------------------------------------------------------------------\r
+\r
+ Private Work Area\r
+\r
+---------------------------------------------------------------------------*/\r
+\r
+#if _DRIVES < 1 || _DRIVES > 9\r
+#error Number of drives must be 1-9.\r
+#endif\r
+static\r
+FATFS *FatFs[_DRIVES]; /* Pointer to the file system objects (logical drives) */\r
+\r
+static\r
+WORD Fsid; /* File system mount ID */\r
+\r
+#if _FS_RPATH\r
+static\r
+BYTE Drive; /* Current drive */\r
+#endif\r
+\r
+\r
+#if _USE_LFN == 1 /* LFN with static LFN working buffer */\r
+static\r
+WCHAR LfnBuf[_MAX_LFN + 1];\r
+#define NAMEBUF(sp,lp) BYTE sp[12]; WCHAR *lp = LfnBuf\r
+#define INITBUF(dj,sp,lp) dj.fn = sp; dj.lfn = lp\r
+\r
+#elif _USE_LFN > 1 /* LFN with dynamic LFN working buffer */\r
+#define NAMEBUF(sp,lp) BYTE sp[12]; WCHAR lbuf[_MAX_LFN + 1], *lp = lbuf\r
+#define INITBUF(dj,sp,lp) dj.fn = sp; dj.lfn = lp\r
+\r
+#else /* No LFN */\r
+#define NAMEBUF(sp,lp) BYTE sp[12]\r
+#define INITBUF(dj,sp,lp) dj.fn = sp\r
+\r
+#endif\r
+\r
+\r
+\r
+\r
+/*--------------------------------------------------------------------------\r
+\r
+ Module Private Functions\r
+\r
+---------------------------------------------------------------------------*/\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* String functions */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+/* Copy memory to memory */\r
+static\r
+void mem_cpy (void* dst, const void* src, int cnt) {\r
+ char *d = (char*)dst;\r
+ const char *s = (const char *)src;\r
+ while (cnt--) *d++ = *s++;\r
+}\r
+\r
+/* Fill memory */\r
+static\r
+void mem_set (void* dst, int val, int cnt) {\r
+ char *d = (char*)dst;\r
+ while (cnt--) *d++ = (char)val;\r
+}\r
+\r
+/* Compare memory to memory */\r
+static\r
+int mem_cmp (const void* dst, const void* src, int cnt) {\r
+ const char *d = (const char *)dst, *s = (const char *)src;\r
+ int r = 0;\r
+ while (cnt-- && (r = *d++ - *s++) == 0) ;\r
+ return r;\r
+}\r
+\r
+/* Check if chr is contained in the string */\r
+static\r
+int chk_chr (const char* str, int chr) {\r
+ while (*str && *str != chr) str++;\r
+ return *str;\r
+}\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Request/Release grant to access the volume */\r
+/*-----------------------------------------------------------------------*/\r
+#if _FS_REENTRANT\r
+\r
+static\r
+BOOL lock_fs (\r
+ FATFS *fs /* File system object */\r
+)\r
+{\r
+ return ff_req_grant(fs->sobj);\r
+}\r
+\r
+\r
+static\r
+void unlock_fs (\r
+ FATFS *fs, /* File system object */\r
+ FRESULT res /* Result code to be returned */\r
+)\r
+{\r
+ if (res != FR_NOT_ENABLED &&\r
+ res != FR_INVALID_DRIVE &&\r
+ res != FR_INVALID_OBJECT &&\r
+ res != FR_TIMEOUT) {\r
+ ff_rel_grant(fs->sobj);\r
+ }\r
+}\r
+#endif\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Change window offset */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+static\r
+FRESULT move_window (\r
+ FATFS *fs, /* File system object */\r
+ DWORD sector /* Sector number to make apperance in the fs->win[] */\r
+) /* Move to zero only writes back dirty window */\r
+{\r
+ DWORD wsect;\r
+\r
+\r
+ wsect = fs->winsect;\r
+ if (wsect != sector) { /* Changed current window */\r
+#if !_FS_READONLY\r
+ if (fs->wflag) { /* Write back dirty window if needed */\r
+ if (disk_write(fs->drive, fs->win, wsect, 1) != RES_OK)\r
+ return FR_DISK_ERR;\r
+ fs->wflag = 0;\r
+ if (wsect < (fs->fatbase + fs->sects_fat)) { /* In FAT area */\r
+ BYTE nf;\r
+ for (nf = fs->n_fats; nf > 1; nf--) { /* Refrect the change to all FAT copies */\r
+ wsect += fs->sects_fat;\r
+ disk_write(fs->drive, fs->win, wsect, 1);\r
+ }\r
+ }\r
+ }\r
+#endif\r
+ if (sector) {\r
+ if (disk_read(fs->drive, fs->win, sector, 1) != RES_OK)\r
+ return FR_DISK_ERR;\r
+ fs->winsect = sector;\r
+ }\r
+ }\r
+\r
+ return FR_OK;\r
+}\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Clean-up cached data */\r
+/*-----------------------------------------------------------------------*/\r
+#if !_FS_READONLY\r
+static\r
+FRESULT sync ( /* FR_OK: successful, FR_DISK_ERR: failed */\r
+ FATFS *fs /* File system object */\r
+)\r
+{\r
+ FRESULT res;\r
+\r
+\r
+ res = move_window(fs, 0);\r
+ if (res == FR_OK) {\r
+ /* Update FSInfo sector if needed */\r
+ if (fs->fs_type == FS_FAT32 && fs->fsi_flag) {\r
+ fs->winsect = 0;\r
+ mem_set(fs->win, 0, 512);\r
+ ST_WORD(fs->win+BS_55AA, 0xAA55);\r
+ ST_DWORD(fs->win+FSI_LeadSig, 0x41615252);\r
+ ST_DWORD(fs->win+FSI_StrucSig, 0x61417272);\r
+ ST_DWORD(fs->win+FSI_Free_Count, fs->free_clust);\r
+ ST_DWORD(fs->win+FSI_Nxt_Free, fs->last_clust);\r
+ disk_write(fs->drive, fs->win, fs->fsi_sector, 1);\r
+ fs->fsi_flag = 0;\r
+ }\r
+ /* Make sure that no pending write process in the physical drive */\r
+ if (disk_ioctl(fs->drive, CTRL_SYNC, (void*)NULL) != RES_OK)\r
+ res = FR_DISK_ERR;\r
+ }\r
+\r
+ return res;\r
+}\r
+#endif\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* FAT access - Read value of a FAT entry */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+\r
+DWORD get_fat ( /* 0xFFFFFFFF:Disk error, 1:Interal error, Else:Cluster status */\r
+ FATFS *fs, /* File system object */\r
+ DWORD clst /* Cluster# to get the link information */\r
+)\r
+{\r
+ UINT wc, bc;\r
+ DWORD fsect;\r
+\r
+\r
+ if (clst < 2 || clst >= fs->max_clust) /* Range check */\r
+ return 1;\r
+\r
+ fsect = fs->fatbase;\r
+ switch (fs->fs_type) {\r
+ case FS_FAT12 :\r
+ bc = clst; bc += bc / 2;\r
+ if (move_window(fs, fsect + (bc / SS(fs)))) break;\r
+ wc = fs->win[bc & (SS(fs) - 1)]; bc++;\r
+ if (move_window(fs, fsect + (bc / SS(fs)))) break;\r
+ wc |= (WORD)fs->win[bc & (SS(fs) - 1)] << 8;\r
+ return (clst & 1) ? (wc >> 4) : (wc & 0xFFF);\r
+\r
+ case FS_FAT16 :\r
+ if (move_window(fs, fsect + (clst / (SS(fs) / 2)))) break;\r
+ return LD_WORD(&fs->win[((WORD)clst * 2) & (SS(fs) - 1)]);\r
+\r
+ case FS_FAT32 :\r
+ if (move_window(fs, fsect + (clst / (SS(fs) / 4)))) break;\r
+ return LD_DWORD(&fs->win[((WORD)clst * 4) & (SS(fs) - 1)]) & 0x0FFFFFFF;\r
+ }\r
+\r
+ return 0xFFFFFFFF; /* An error occured at the disk I/O layer */\r
+}\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* FAT access - Change value of a FAT entry */\r
+/*-----------------------------------------------------------------------*/\r
+#if !_FS_READONLY\r
+\r
+FRESULT put_fat (\r
+ FATFS *fs, /* File system object */\r
+ DWORD clst, /* Cluster# to be changed in range of 2 to fs->max_clust - 1 */\r
+ DWORD val /* New value to mark the cluster */\r
+)\r
+{\r
+ UINT bc;\r
+ BYTE *p;\r
+ DWORD fsect;\r
+ FRESULT res;\r
+\r
+\r
+ if (clst < 2 || clst >= fs->max_clust) { /* Range check */\r
+ res = FR_INT_ERR;\r
+\r
+ } else {\r
+ fsect = fs->fatbase;\r
+ switch (fs->fs_type) {\r
+ case FS_FAT12 :\r
+ bc = clst; bc += bc / 2;\r
+ res = move_window(fs, fsect + (bc / SS(fs)));\r
+ if (res != FR_OK) break;\r
+ p = &fs->win[bc & (SS(fs) - 1)];\r
+ *p = (clst & 1) ? ((*p & 0x0F) | ((BYTE)val << 4)) : (BYTE)val;\r
+ bc++;\r
+ fs->wflag = 1;\r
+ res = move_window(fs, fsect + (bc / SS(fs)));\r
+ if (res != FR_OK) break;\r
+ p = &fs->win[bc & (SS(fs) - 1)];\r
+ *p = (clst & 1) ? (BYTE)(val >> 4) : ((*p & 0xF0) | ((BYTE)(val >> 8) & 0x0F));\r
+ break;\r
+\r
+ case FS_FAT16 :\r
+ res = move_window(fs, fsect + (clst / (SS(fs) / 2)));\r
+ if (res != FR_OK) break;\r
+ ST_WORD(&fs->win[((WORD)clst * 2) & (SS(fs) - 1)], (WORD)val);\r
+ break;\r
+\r
+ case FS_FAT32 :\r
+ res = move_window(fs, fsect + (clst / (SS(fs) / 4)));\r
+ if (res != FR_OK) break;\r
+ ST_DWORD(&fs->win[((WORD)clst * 4) & (SS(fs) - 1)], val);\r
+ break;\r
+\r
+ default :\r
+ res = FR_INT_ERR;\r
+ }\r
+ fs->wflag = 1;\r
+ }\r
+\r
+ return res;\r
+}\r
+#endif /* !_FS_READONLY */\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* FAT handling - Remove a cluster chain */\r
+/*-----------------------------------------------------------------------*/\r
+#if !_FS_READONLY\r
+static\r
+FRESULT remove_chain (\r
+ FATFS *fs, /* File system object */\r
+ DWORD clst /* Cluster# to remove a chain from */\r
+)\r
+{\r
+ FRESULT res;\r
+ DWORD nxt;\r
+\r
+\r
+ if (clst < 2 || clst >= fs->max_clust) { /* Check the range of cluster# */\r
+ res = FR_INT_ERR;\r
+\r
+ } else {\r
+ res = FR_OK;\r
+ while (clst < fs->max_clust) { /* Not a last link? */\r
+ nxt = get_fat(fs, clst); /* Get cluster status */\r
+ if (nxt == 0) break; /* Empty cluster? */\r
+ if (nxt == 1) { res = FR_INT_ERR; break; } /* Internal error? */\r
+ if (nxt == 0xFFFFFFFF) { res = FR_DISK_ERR; break; } /* Disk error? */\r
+ res = put_fat(fs, clst, 0); /* Mark the cluster "empty" */\r
+ if (res != FR_OK) break;\r
+ if (fs->free_clust != 0xFFFFFFFF) { /* Update FSInfo */\r
+ fs->free_clust++;\r
+ fs->fsi_flag = 1;\r
+ }\r
+ clst = nxt; /* Next cluster */\r
+ }\r
+ }\r
+\r
+ return res;\r
+}\r
+#endif\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* FAT handling - Stretch or Create a cluster chain */\r
+/*-----------------------------------------------------------------------*/\r
+#if !_FS_READONLY\r
+static\r
+DWORD create_chain ( /* 0:No free cluster, 1:Internal error, 0xFFFFFFFF:Disk error, >=2:New cluster# */\r
+ FATFS *fs, /* File system object */\r
+ DWORD clst /* Cluster# to stretch. 0 means create a new chain. */\r
+)\r
+{\r
+ DWORD cs, ncl, scl, mcl;\r
+\r
+\r
+ mcl = fs->max_clust;\r
+ if (clst == 0) { /* Create new chain */\r
+ scl = fs->last_clust; /* Get suggested start point */\r
+ if (scl == 0 || scl >= mcl) scl = 1;\r
+ }\r
+ else { /* Stretch existing chain */\r
+ cs = get_fat(fs, clst); /* Check the cluster status */\r
+ if (cs < 2) return 1; /* It is an invalid cluster */\r
+ if (cs < mcl) return cs; /* It is already followed by next cluster */\r
+ scl = clst;\r
+ }\r
+\r
+ ncl = scl; /* Start cluster */\r
+ for (;;) {\r
+ ncl++; /* Next cluster */\r
+ if (ncl >= mcl) { /* Wrap around */\r
+ ncl = 2;\r
+ if (ncl > scl) return 0; /* No free custer */\r
+ }\r
+ cs = get_fat(fs, ncl); /* Get the cluster status */\r
+ if (cs == 0) break; /* Found a free cluster */\r
+ if (cs == 0xFFFFFFFF || cs == 1)/* An error occured */\r
+ return cs;\r
+ if (ncl == scl) return 0; /* No free custer */\r
+ }\r
+\r
+ if (put_fat(fs, ncl, 0x0FFFFFFF)) /* Mark the new cluster "in use" */\r
+ return 0xFFFFFFFF;\r
+ if (clst != 0) { /* Link it to the previous one if needed */\r
+ if (put_fat(fs, clst, ncl))\r
+ return 0xFFFFFFFF;\r
+ }\r
+\r
+ fs->last_clust = ncl; /* Update FSINFO */\r
+ if (fs->free_clust != 0xFFFFFFFF) {\r
+ fs->free_clust--;\r
+ fs->fsi_flag = 1;\r
+ }\r
+\r
+ return ncl; /* Return new cluster number */\r
+}\r
+#endif /* !_FS_READONLY */\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Get sector# from cluster# */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+\r
+DWORD clust2sect ( /* !=0: Sector number, 0: Failed - invalid cluster# */\r
+ FATFS *fs, /* File system object */\r
+ DWORD clst /* Cluster# to be converted */\r
+)\r
+{\r
+ clst -= 2;\r
+ if (clst >= (fs->max_clust - 2)) return 0; /* Invalid cluster# */\r
+ return clst * fs->csize + fs->database;\r
+}\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Directory handling - Seek directory index */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+static\r
+FRESULT dir_seek (\r
+ DIR *dj, /* Pointer to directory object */\r
+ WORD idx /* Directory index number */\r
+)\r
+{\r
+ DWORD clst;\r
+ WORD ic;\r
+\r
+\r
+ dj->index = idx;\r
+ clst = dj->sclust;\r
+ if (clst == 1 || clst >= dj->fs->max_clust) /* Check start cluster range */\r
+ return FR_INT_ERR;\r
+ if (!clst && dj->fs->fs_type == FS_FAT32) /* Replace cluster# 0 with root cluster# if in FAT32 */\r
+ clst = dj->fs->dirbase;\r
+\r
+ if (clst == 0) { /* Static table */\r
+ dj->clust = clst;\r
+ if (idx >= dj->fs->n_rootdir) /* Index is out of range */\r
+ return FR_INT_ERR;\r
+ dj->sect = dj->fs->dirbase + idx / (SS(dj->fs) / 32); /* Sector# */\r
+ }\r
+ else { /* Dynamic table */\r
+ ic = SS(dj->fs) / 32 * dj->fs->csize; /* Entries per cluster */\r
+ while (idx >= ic) { /* Follow cluster chain */\r
+ clst = get_fat(dj->fs, clst); /* Get next cluster */\r
+ if (clst == 0xFFFFFFFF) return FR_DISK_ERR; /* Disk error */\r
+ if (clst < 2 || clst >= dj->fs->max_clust) /* Reached to end of table or int error */\r
+ return FR_INT_ERR;\r
+ idx -= ic;\r
+ }\r
+ dj->clust = clst;\r
+ dj->sect = clust2sect(dj->fs, clst) + idx / (SS(dj->fs) / 32); /* Sector# */\r
+ }\r
+\r
+ dj->dir = dj->fs->win + (idx % (SS(dj->fs) / 32)) * 32; /* Ptr to the entry in the sector */\r
+\r
+ return FR_OK; /* Seek succeeded */\r
+}\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Directory handling - Move directory index next */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+static\r
+FRESULT dir_next ( /* FR_OK:Succeeded, FR_NO_FILE:End of table, FR_DENIED:EOT and could not streach */\r
+ DIR *dj, /* Pointer to directory object */\r
+ BOOL streach /* FALSE: Do not streach table, TRUE: Streach table if needed */\r
+)\r
+{\r
+ DWORD clst;\r
+ WORD i;\r
+\r
+\r
+ i = dj->index + 1;\r
+ if (!i || !dj->sect) /* Report EOT when index has reached 65535 */\r
+ return FR_NO_FILE;\r
+\r
+ if (!(i % (SS(dj->fs) / 32))) { /* Sector changed? */\r
+ dj->sect++; /* Next sector */\r
+\r
+ if (dj->clust == 0) { /* Static table */\r
+ if (i >= dj->fs->n_rootdir) /* Report EOT when end of table */\r
+ return FR_NO_FILE;\r
+ }\r
+ else { /* Dynamic table */\r
+ if (((i / (SS(dj->fs) / 32)) & (dj->fs->csize - 1)) == 0) { /* Cluster changed? */\r
+ clst = get_fat(dj->fs, dj->clust); /* Get next cluster */\r
+ if (clst <= 1) return FR_INT_ERR;\r
+ if (clst == 0xFFFFFFFF) return FR_DISK_ERR;\r
+ if (clst >= dj->fs->max_clust) { /* When it reached end of dynamic table */\r
+#if !_FS_READONLY\r
+ BYTE c;\r
+ if (!streach) return FR_NO_FILE; /* When do not streach, report EOT */\r
+ clst = create_chain(dj->fs, dj->clust); /* Streach cluster chain */\r
+ if (clst == 0) return FR_DENIED; /* No free cluster */\r
+ if (clst == 1) return FR_INT_ERR;\r
+ if (clst == 0xFFFFFFFF) return FR_DISK_ERR;\r
+ /* Clean-up streached table */\r
+ if (move_window(dj->fs, 0)) return FR_DISK_ERR; /* Flush active window */\r
+ mem_set(dj->fs->win, 0, SS(dj->fs)); /* Clear window buffer */\r
+ dj->fs->winsect = clust2sect(dj->fs, clst); /* Cluster start sector */\r
+ for (c = 0; c < dj->fs->csize; c++) { /* Fill the new cluster with 0 */\r
+ dj->fs->wflag = 1;\r
+ if (move_window(dj->fs, 0)) return FR_DISK_ERR;\r
+ dj->fs->winsect++;\r
+ }\r
+ dj->fs->winsect -= c; /* Rewind window address */\r
+#else\r
+ return FR_NO_FILE; /* Report EOT */\r
+#endif\r
+ }\r
+ dj->clust = clst; /* Initialize data for new cluster */\r
+ dj->sect = clust2sect(dj->fs, clst);\r
+ }\r
+ }\r
+ }\r
+\r
+ dj->index = i;\r
+ dj->dir = dj->fs->win + (i % (SS(dj->fs) / 32)) * 32;\r
+\r
+ return FR_OK;\r
+}\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* LFN handling - Test/Pick/Fit an LFN segment from/to directory entry */\r
+/*-----------------------------------------------------------------------*/\r
+#if _USE_LFN\r
+static\r
+const BYTE LfnOfs[] = {1,3,5,7,9,14,16,18,20,22,24,28,30}; /* Offset of LFN chars in the directory entry */\r
+\r
+\r
+static\r
+BOOL cmp_lfn ( /* TRUE:Matched, FALSE:Not matched */\r
+ WCHAR *lfnbuf, /* Pointer to the LFN to be compared */\r
+ BYTE *dir /* Pointer to the directory entry containing a part of LFN */\r
+)\r
+{\r
+ int i, s;\r
+ WCHAR wc, uc;\r
+\r
+\r
+ i = ((dir[LDIR_Ord] & 0xBF) - 1) * 13; /* Get offset in the LFN buffer */\r
+ s = 0; wc = 1;\r
+ do {\r
+ uc = LD_WORD(dir+LfnOfs[s]); /* Pick an LFN character from the entry */\r
+ if (wc) { /* Last char has not been processed */\r
+ wc = ff_wtoupper(uc); /* Convert it to upper case */\r
+ if (i >= _MAX_LFN || wc != ff_wtoupper(lfnbuf[i++])) /* Compare it */\r
+ return FALSE; /* Not matched */\r
+ } else {\r
+ if (uc != 0xFFFF) return FALSE; /* Check filler */\r
+ }\r
+ } while (++s < 13); /* Repeat until all chars in the entry are checked */\r
+\r
+ if ((dir[LDIR_Ord] & 0x40) && wc && lfnbuf[i]) /* Last segment matched but different length */\r
+ return FALSE;\r
+\r
+ return TRUE; /* The part of LFN matched */\r
+}\r
+\r
+\r
+\r
+static\r
+BOOL pick_lfn ( /* TRUE:Succeeded, FALSE:Buffer overflow */\r
+ WCHAR *lfnbuf, /* Pointer to the Unicode-LFN buffer */\r
+ BYTE *dir /* Pointer to the directory entry */\r
+)\r
+{\r
+ int i, s;\r
+ WCHAR wc, uc;\r
+\r
+\r
+ i = ((dir[LDIR_Ord] & 0x3F) - 1) * 13; /* Offset in the LFN buffer */\r
+\r
+ s = 0; wc = 1;\r
+ do {\r
+ uc = LD_WORD(dir+LfnOfs[s]); /* Pick an LFN character from the entry */\r
+ if (wc) { /* Last char has not been processed */\r
+ if (i >= _MAX_LFN) return FALSE; /* Buffer overflow? */\r
+ lfnbuf[i++] = wc = uc; /* Store it */\r
+ } else {\r
+ if (uc != 0xFFFF) return FALSE; /* Check filler */\r
+ }\r
+ } while (++s < 13); /* Read all character in the entry */\r
+\r
+ if (dir[LDIR_Ord] & 0x40) { /* Put terminator if it is the last LFN part */\r
+ if (i >= _MAX_LFN) return FALSE; /* Buffer overflow? */\r
+ lfnbuf[i] = 0;\r
+ }\r
+\r
+ return TRUE;\r
+}\r
+\r
+\r
+#if !_FS_READONLY\r
+static\r
+void fit_lfn (\r
+ const WCHAR *lfnbuf, /* Pointer to the LFN buffer */\r
+ BYTE *dir, /* Pointer to the directory entry */\r
+ BYTE ord, /* LFN order (1-20) */\r
+ BYTE sum /* SFN sum */\r
+)\r
+{\r
+ int i, s;\r
+ WCHAR wc;\r
+\r
+\r
+ dir[LDIR_Chksum] = sum; /* Set check sum */\r
+ dir[LDIR_Attr] = AM_LFN; /* Set attribute. LFN entry */\r
+ dir[LDIR_Type] = 0;\r
+ ST_WORD(dir+LDIR_FstClusLO, 0);\r
+\r
+ i = (ord - 1) * 13; /* Get offset in the LFN buffer */\r
+ s = wc = 0;\r
+ do {\r
+ if (wc != 0xFFFF) wc = lfnbuf[i++]; /* Get an effective char */\r
+ ST_WORD(dir+LfnOfs[s], wc); /* Put it */\r
+ if (!wc) wc = 0xFFFF; /* Padding chars following last char */\r
+ } while (++s < 13);\r
+ if (wc == 0xFFFF || !lfnbuf[i]) ord |= 0x40; /* Bottom LFN part is the start of LFN sequence */\r
+ dir[LDIR_Ord] = ord; /* Set the LFN order */\r
+}\r
+\r
+#endif\r
+#endif\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Create numbered name */\r
+/*-----------------------------------------------------------------------*/\r
+#if _USE_LFN\r
+void gen_numname (\r
+ BYTE *dst, /* Pointer to genartated SFN */\r
+ const BYTE *src, /* Pointer to source SFN to be modified */\r
+ const WCHAR *lfn, /* Pointer to LFN */\r
+ WORD num /* Sequense number */\r
+)\r
+{\r
+ char ns[8];\r
+ int i, j;\r
+\r
+\r
+ mem_cpy(dst, src, 11);\r
+\r
+ if (num > 5) { /* On many collisions, generate a hash number instead of sequencial number */\r
+ do num = (num >> 1) + (num << 15) + (WORD)*lfn++; while (*lfn);\r
+ }\r
+\r
+ /* itoa */\r
+ i = 7;\r
+ do {\r
+ ns[i--] = (num % 10) + '0';\r
+ num /= 10;\r
+ } while (num);\r
+ ns[i] = '~';\r
+\r
+ /* Append the number */\r
+ for (j = 0; j < i && dst[j] != ' '; j++) {\r
+ if (IsDBCS1(dst[j])) {\r
+ if (j == i - 1) break;\r
+ j++;\r
+ }\r
+ }\r
+ do {\r
+ dst[j++] = (i < 8) ? ns[i++] : ' ';\r
+ } while (j < 8);\r
+}\r
+#endif\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Calculate sum of an SFN */\r
+/*-----------------------------------------------------------------------*/\r
+#if _USE_LFN\r
+static\r
+BYTE sum_sfn (\r
+ const BYTE *dir /* Ptr to directory entry */\r
+)\r
+{\r
+ BYTE sum = 0;\r
+ int n = 11;\r
+\r
+ do sum = (sum >> 1) + (sum << 7) + *dir++; while (--n);\r
+ return sum;\r
+}\r
+#endif\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Directory handling - Find an object in the directory */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+static\r
+FRESULT dir_find (\r
+ DIR *dj /* Pointer to the directory object linked to the file name */\r
+)\r
+{\r
+ FRESULT res;\r
+ BYTE c, *dir;\r
+#if _USE_LFN\r
+ BYTE a, ord, sum;\r
+#endif\r
+\r
+ res = dir_seek(dj, 0); /* Rewind directory object */\r
+ if (res != FR_OK) return res;\r
+\r
+#if _USE_LFN\r
+ ord = sum = 0xFF;\r
+#endif\r
+ do {\r
+ res = move_window(dj->fs, dj->sect);\r
+ if (res != FR_OK) break;\r
+ dir = dj->dir; /* Ptr to the directory entry of current index */\r
+ c = dir[DIR_Name];\r
+ if (c == 0) { res = FR_NO_FILE; break; } /* Reached to end of table */\r
+#if _USE_LFN /* LFN configuration */\r
+ a = dir[DIR_Attr] & AM_MASK;\r
+ if (c == 0xE5 || ((a & AM_VOL) && a != AM_LFN)) { /* An entry without valid data */\r
+ ord = 0xFF;\r
+ } else {\r
+ if (a == AM_LFN) { /* An LFN entry is found */\r
+ if (dj->lfn) {\r
+ if (c & 0x40) { /* Is it start of LFN sequence? */\r
+ sum = dir[LDIR_Chksum];\r
+ c &= 0xBF; ord = c; /* LFN start order */\r
+ dj->lfn_idx = dj->index;\r
+ }\r
+ /* Check validity of the LFN entry and compare it with given name */\r
+ ord = (c == ord && sum == dir[LDIR_Chksum] && cmp_lfn(dj->lfn, dir)) ? ord - 1 : 0xFF;\r
+ }\r
+ } else { /* An SFN entry is found */\r
+ if (!ord && sum == sum_sfn(dir)) break; /* LFN matched? */\r
+ ord = 0xFF; dj->lfn_idx = 0xFFFF; /* Reset LFN sequence */\r
+ if (!(dj->fn[NS] & NS_LOSS) && !mem_cmp(dir, dj->fn, 11)) break; /* SFN matched? */\r
+ }\r
+ }\r
+#else /* Non LFN configuration */\r
+ if (!(dir[DIR_Attr] & AM_VOL) && !mem_cmp(dir, dj->fn, 11)) /* Is it a valid entry? */\r
+ break;\r
+#endif\r
+ res = dir_next(dj, FALSE); /* Next entry */\r
+ } while (res == FR_OK);\r
+\r
+ return res;\r
+}\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Read an object from the directory */\r
+/*-----------------------------------------------------------------------*/\r
+#if _FS_MINIMIZE <= 1\r
+static\r
+FRESULT dir_read (\r
+ DIR *dj /* Pointer to the directory object that pointing the entry to be read */\r
+)\r
+{\r
+ FRESULT res;\r
+ BYTE c, *dir;\r
+#if _USE_LFN\r
+ BYTE a, ord = 0xFF, sum = 0xFF;\r
+#endif\r
+\r
+ res = FR_NO_FILE;\r
+ while (dj->sect) {\r
+ res = move_window(dj->fs, dj->sect);\r
+ if (res != FR_OK) break;\r
+ dir = dj->dir; /* Ptr to the directory entry of current index */\r
+ c = dir[DIR_Name];\r
+ if (c == 0) { res = FR_NO_FILE; break; } /* Reached to end of table */\r
+#if _USE_LFN /* LFN configuration */\r
+ a = dir[DIR_Attr] & AM_MASK;\r
+ if (c == 0xE5 || (!_FS_RPATH && c == '.') || ((a & AM_VOL) && a != AM_LFN)) { /* An entry without valid data */\r
+ ord = 0xFF;\r
+ } else {\r
+ if (a == AM_LFN) { /* An LFN entry is found */\r
+ if (c & 0x40) { /* Is it start of LFN sequence? */\r
+ sum = dir[LDIR_Chksum];\r
+ c &= 0xBF; ord = c;\r
+ dj->lfn_idx = dj->index;\r
+ }\r
+ /* Check LFN validity and capture it */\r
+ ord = (c == ord && sum == dir[LDIR_Chksum] && pick_lfn(dj->lfn, dir)) ? ord - 1 : 0xFF;\r
+ } else { /* An SFN entry is found */\r
+ if (ord || sum != sum_sfn(dir)) /* Is there a valid LFN? */\r
+ dj->lfn_idx = 0xFFFF; /* It has no LFN. */\r
+ break;\r
+ }\r
+ }\r
+#else /* Non LFN configuration */\r
+ if (c != 0xE5 && (_FS_RPATH || c != '.') && !(dir[DIR_Attr] & AM_VOL)) /* Is it a valid entry? */\r
+ break;\r
+#endif\r
+ res = dir_next(dj, FALSE); /* Next entry */\r
+ if (res != FR_OK) break;\r
+ }\r
+\r
+ if (res != FR_OK) dj->sect = 0;\r
+\r
+ return res;\r
+}\r
+#endif\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Register an object to the directory */\r
+/*-----------------------------------------------------------------------*/\r
+#if !_FS_READONLY\r
+static\r
+FRESULT dir_register ( /* FR_OK:Successful, FR_DENIED:No free entry or too many SFN collision, FR_DISK_ERR:Disk error */\r
+ DIR *dj /* Target directory with object name to be created */\r
+)\r
+{\r
+ FRESULT res;\r
+ BYTE c, *dir;\r
+#if _USE_LFN /* LFN configuration */\r
+ WORD n, ne, is;\r
+ BYTE sn[12], *fn, sum;\r
+ WCHAR *lfn;\r
+\r
+\r
+ fn = dj->fn; lfn = dj->lfn;\r
+ mem_cpy(sn, fn, 12);\r
+\r
+ if (_FS_RPATH && (sn[NS] & NS_DOT)) return FR_INVALID_NAME; /* Cannot create dot entry */\r
+\r
+ if (sn[NS] & NS_LOSS) { /* When LFN is out of 8.3 format, generate a numbered name */\r
+ fn[NS] = 0; dj->lfn = NULL; /* Find only SFN */\r
+ for (n = 1; n < 100; n++) {\r
+ gen_numname(fn, sn, lfn, n); /* Generate a numbered name */\r
+ res = dir_find(dj); /* Check if the name collides with existing SFN */\r
+ if (res != FR_OK) break;\r
+ }\r
+ if (n == 100) return FR_DENIED; /* Abort if too many collisions */\r
+ if (res != FR_NO_FILE) return res; /* Abort if the result is other than 'not collided' */\r
+ fn[NS] = sn[NS]; dj->lfn = lfn;\r
+ }\r
+\r
+ if (sn[NS] & NS_LFN) { /* When LFN is to be created, reserve reserve an SFN + LFN entries. */\r
+ for (ne = 0; lfn[ne]; ne++) ;\r
+ ne = (ne + 25) / 13;\r
+ } else { /* Otherwise reserve only an SFN entry. */\r
+ ne = 1;\r
+ }\r
+\r
+ /* Reserve contiguous entries */\r
+ res = dir_seek(dj, 0);\r
+ if (res != FR_OK) return res;\r
+ n = is = 0;\r
+ do {\r
+ res = move_window(dj->fs, dj->sect);\r
+ if (res != FR_OK) break;\r
+ c = *dj->dir; /* Check the entry status */\r
+ if (c == 0xE5 || c == 0) { /* Is it a blank entry? */\r
+ if (n == 0) is = dj->index; /* First index of the contigulus entry */\r
+ if (++n == ne) break; /* A contiguous entry that requiered count is found */\r
+ } else {\r
+ n = 0; /* Not a blank entry. Restart to search */\r
+ }\r
+ res = dir_next(dj, TRUE); /* Next entry with table streach */\r
+ } while (res == FR_OK);\r
+\r
+ if (res == FR_OK && ne > 1) { /* Initialize LFN entry if needed */\r
+ res = dir_seek(dj, is);\r
+ if (res == FR_OK) {\r
+ sum = sum_sfn(dj->fn); /* Sum of the SFN tied to the LFN */\r
+ ne--;\r
+ do { /* Store LFN entries in bottom first */\r
+ res = move_window(dj->fs, dj->sect);\r
+ if (res != FR_OK) break;\r
+ fit_lfn(dj->lfn, dj->dir, (BYTE)ne, sum);\r
+ dj->fs->wflag = 1;\r
+ res = dir_next(dj, FALSE); /* Next entry */\r
+ } while (res == FR_OK && --ne);\r
+ }\r
+ }\r
+\r
+#else /* Non LFN configuration */\r
+ res = dir_seek(dj, 0);\r
+ if (res == FR_OK) {\r
+ do { /* Find a blank entry for the SFN */\r
+ res = move_window(dj->fs, dj->sect);\r
+ if (res != FR_OK) break;\r
+ c = *dj->dir;\r
+ if (c == 0xE5 || c == 0) break; /* Is it a blank entry? */\r
+ res = dir_next(dj, TRUE); /* Next entry with table streach */\r
+ } while (res == FR_OK);\r
+ }\r
+#endif\r
+\r
+ if (res == FR_OK) { /* Initialize the SFN entry */\r
+ res = move_window(dj->fs, dj->sect);\r
+ if (res == FR_OK) {\r
+ dir = dj->dir;\r
+ mem_set(dir, 0, 32); /* Clean the entry */\r
+ mem_cpy(dir, dj->fn, 11); /* Put SFN */\r
+ dir[DIR_NTres] = *(dj->fn+NS) & (NS_BODY | NS_EXT); /* Put NT flag */\r
+ dj->fs->wflag = 1;\r
+ }\r
+ }\r
+\r
+ return res;\r
+}\r
+#endif /* !_FS_READONLY */\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Remove an object from the directory */\r
+/*-----------------------------------------------------------------------*/\r
+#if !_FS_READONLY && !_FS_MINIMIZE\r
+static\r
+FRESULT dir_remove ( /* FR_OK: Successful, FR_DISK_ERR: A disk error */\r
+ DIR *dj /* Directory object pointing the entry to be removed */\r
+)\r
+{\r
+ FRESULT res;\r
+#if _USE_LFN /* LFN configuration */\r
+ WORD i;\r
+\r
+ i = dj->index; /* SFN index */\r
+ res = dir_seek(dj, (WORD)((dj->lfn_idx == 0xFFFF) ? i : dj->lfn_idx)); /* Goto the SFN or top of the LFN entries */\r
+ if (res == FR_OK) {\r
+ do {\r
+ res = move_window(dj->fs, dj->sect);\r
+ if (res != FR_OK) break;\r
+ *dj->dir = 0xE5; /* Mark the entry "deleted" */\r
+ dj->fs->wflag = 1;\r
+ if (dj->index >= i) break; /* When reached SFN, all entries of the object has been deleted. */\r
+ res = dir_next(dj, FALSE); /* Next entry */\r
+ } while (res == FR_OK);\r
+ if (res == FR_NO_FILE) res = FR_INT_ERR;\r
+ }\r
+\r
+#else /* Non LFN configuration */\r
+ res = dir_seek(dj, dj->index);\r
+ if (res == FR_OK) {\r
+ res = move_window(dj->fs, dj->sect);\r
+ if (res == FR_OK) {\r
+ *dj->dir = 0xE5; /* Mark the entry "deleted" */\r
+ dj->fs->wflag = 1;\r
+ }\r
+ }\r
+#endif\r
+\r
+ return res;\r
+}\r
+#endif /* !_FS_READONLY */\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Pick a segment and create the object name in directory form */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+static\r
+FRESULT create_name (\r
+ DIR *dj, /* Pointer to the directory object */\r
+ const XCHAR **path /* Pointer to pointer to the segment in the path string */\r
+)\r
+{\r
+#ifdef _EXCVT\r
+ static const BYTE cvt[] = _EXCVT;\r
+#endif\r
+\r
+#if _USE_LFN /* LFN configuration */\r
+ BYTE b, cf;\r
+ WCHAR w, *lfn;\r
+ int i, ni, si, di;\r
+ const XCHAR *p;\r
+\r
+ /* Create LFN in Unicode */\r
+ si = di = 0;\r
+ p = *path;\r
+ lfn = dj->lfn;\r
+ for (;;) {\r
+ w = p[si++]; /* Get a character */\r
+ if (w < ' ' || w == '/' || w == '\\') break; /* Break on end of segment */\r
+ if (di >= _MAX_LFN) /* Reject too long name */\r
+ return FR_INVALID_NAME;\r
+#if !_LFN_UNICODE\r
+ w &= 0xFF;\r
+ if (IsDBCS1(w)) { /* If it is a DBC 1st byte */\r
+ b = p[si++]; /* Get 2nd byte */\r
+ if (!IsDBCS2(b)) /* Reject invalid code for DBC */\r
+ return FR_INVALID_NAME;\r
+ w = (w << 8) + b;\r
+ }\r
+ w = ff_convert(w, 1); /* Convert OEM to Unicode */\r
+ if (!w) return FR_INVALID_NAME; /* Reject invalid code */\r
+#endif\r
+ if (w < 0x80 && chk_chr("\"*:<>\?|\x7F", w)) /* Reject illegal chars for LFN */\r
+ return FR_INVALID_NAME;\r
+ lfn[di++] = w; /* Store the Unicode char */\r
+ }\r
+ *path = &p[si]; /* Rerurn pointer to the next segment */\r
+ cf = (w < ' ') ? NS_LAST : 0; /* Set last segment flag if end of path */\r
+#if _FS_RPATH\r
+ if ((di == 1 && lfn[di - 1] == '.') || /* Is this a dot entry? */\r
+ (di == 2 && lfn[di - 1] == '.' && lfn[di - 2] == '.')) {\r
+ lfn[di] = 0;\r
+ for (i = 0; i < 11; i++)\r
+ dj->fn[i] = (i < di) ? '.' : ' ';\r
+ dj->fn[i] = cf | NS_DOT; /* This is a dot entry */\r
+ return FR_OK;\r
+ }\r
+#endif\r
+ while (di) { /* Strip trailing spaces and dots */\r
+ w = lfn[di - 1];\r
+ if (w != ' ' && w != '.') break;\r
+ di--;\r
+ }\r
+ if (!di) return FR_INVALID_NAME; /* Reject null string */\r
+\r
+ lfn[di] = 0; /* LFN is created */\r
+\r
+ /* Create SFN in directory form */\r
+ mem_set(dj->fn, ' ', 11);\r
+ for (si = 0; lfn[si] == ' ' || lfn[si] == '.'; si++) ; /* Strip leading spaces and dots */\r
+ if (si) cf |= NS_LOSS | NS_LFN;\r
+ while (di && lfn[di - 1] != '.') di--; /* Find extension (di<=si: no extension) */\r
+\r
+ b = i = 0; ni = 8;\r
+ for (;;) {\r
+ w = lfn[si++]; /* Get an LFN char */\r
+ if (!w) break; /* Break on enf of the LFN */\r
+ if (w == ' ' || (w == '.' && si != di)) { /* Remove spaces and dots */\r
+ cf |= NS_LOSS | NS_LFN; continue;\r
+ }\r
+\r
+ if (i >= ni || si == di) { /* Extension or end of SFN */\r
+ if (ni == 11) { /* Long extension */\r
+ cf |= NS_LOSS | NS_LFN; break;\r
+ }\r
+ if (si != di) cf |= NS_LOSS | NS_LFN; /* Out of 8.3 format */\r
+ if (si > di) break; /* No extension */\r
+ si = di; i = 8; ni = 11; /* Enter extension section */\r
+ b <<= 2; continue;\r
+ }\r
+\r
+ if (w >= 0x80) { /* Non ASCII char */\r
+#ifdef _EXCVT\r
+ w = ff_convert(w, 0); /* Unicode -> OEM code */\r
+ if (w) w = cvt[w - 0x80]; /* Convert extended char to upper (SBCS) */\r
+#else\r
+ w = ff_convert(ff_wtoupper(w), 0); /* Upper converted Unicode -> OEM code */\r
+#endif\r
+ cf |= NS_LFN; /* Force create LFN entry */\r
+ }\r
+\r
+ if (_DF1S && w >= 0x100) { /* Double byte char */\r
+ if (i >= ni - 1) {\r
+ cf |= NS_LOSS | NS_LFN; i = ni; continue;\r
+ }\r
+ dj->fn[i++] = (BYTE)(w >> 8);\r
+ } else { /* Single byte char */\r
+ if (!w || chk_chr("+,;[=]", w)) { /* Replace illegal chars for SFN */\r
+ w = '_'; cf |= NS_LOSS | NS_LFN; /* Lossy conversion */\r
+ } else {\r
+ if (IsUpper(w)) { /* ASCII large capital */\r
+ b |= 2;\r
+ } else {\r
+ if (IsLower(w)) { /* ASCII small capital */\r
+ b |= 1; w -= 0x20;\r
+ }\r
+ }\r
+ }\r
+ }\r
+ dj->fn[i++] = (BYTE)w;\r
+ }\r
+\r
+ if (dj->fn[0] == 0xE5) dj->fn[0] = 0x05; /* If the first char collides with deleted mark, replace it with 0x05 */\r
+\r
+ if (ni == 8) b <<= 2;\r
+ if ((b & 0x0C) == 0x0C || (b & 0x03) == 0x03) /* Create LFN entry when there are composite capitals */\r
+ cf |= NS_LFN;\r
+ if (!(cf & NS_LFN)) { /* When LFN is in 8.3 format without extended char, NT flags are created */\r
+ if ((b & 0x03) == 0x01) cf |= NS_EXT; /* NT flag (Extension has only small capital) */\r
+ if ((b & 0x0C) == 0x04) cf |= NS_BODY; /* NT flag (Filename has only small capital) */\r
+ }\r
+\r
+ dj->fn[NS] = cf; /* SFN is created */\r
+\r
+ return FR_OK;\r
+\r
+\r
+#else /* Non-LFN configuration */\r
+ BYTE b, c, d, *sfn;\r
+ int ni, si, i;\r
+ const char *p;\r
+\r
+ /* Create file name in directory form */\r
+ sfn = dj->fn;\r
+ mem_set(sfn, ' ', 11);\r
+ si = i = b = 0; ni = 8;\r
+ p = *path;\r
+#if _FS_RPATH\r
+ if (p[si] == '.') { /* Is this a dot entry? */\r
+ for (;;) {\r
+ c = p[si++];\r
+ if (c != '.' || si >= 3) break;\r
+ sfn[i++] = c;\r
+ }\r
+ if (c != '/' && c != '\\' && c > ' ') return FR_INVALID_NAME;\r
+ *path = &p[si]; /* Rerurn pointer to the next segment */\r
+ sfn[NS] = (c <= ' ') ? NS_LAST | NS_DOT : NS_DOT; /* Set last segment flag if end of path */\r
+ return FR_OK;\r
+ }\r
+#endif\r
+ for (;;) {\r
+ c = p[si++];\r
+ if (c <= ' ' || c == '/' || c == '\\') break; /* Break on end of segment */\r
+ if (c == '.' || i >= ni) {\r
+ if (ni != 8 || c != '.') return FR_INVALID_NAME;\r
+ i = 8; ni = 11;\r
+ b <<= 2; continue;\r
+ }\r
+ if (c >= 0x80) { /* Extended char */\r
+#ifdef _EXCVT\r
+ c = cvt[c - 0x80]; /* Convert extend char (SBCS) */\r
+#else\r
+ b |= 3; /* Eliminate NT flag if ext char is exist */\r
+#if !_DF1S /* ASCII only cfg */\r
+ return FR_INVALID_NAME;\r
+#endif\r
+#endif\r
+ }\r
+ if (IsDBCS1(c)) { /* DBC 1st byte? */\r
+ d = p[si++]; /* Get 2nd byte */\r
+ if (!IsDBCS2(d) || i >= ni - 1) /* Reject invalid DBC */\r
+ return FR_INVALID_NAME;\r
+ sfn[i++] = c;\r
+ sfn[i++] = d;\r
+ } else { /* Single byte code */\r
+ if (chk_chr(" \"*+,[=]|\x7F", c)) /* Reject illegal chrs for SFN */\r
+ return FR_INVALID_NAME;\r
+ if (IsUpper(c)) { /* ASCII large capital? */\r
+ b |= 2;\r
+ } else {\r
+ if (IsLower(c)) { /* ASCII small capital? */\r
+ b |= 1; c -= 0x20;\r
+ }\r
+ }\r
+ sfn[i++] = c;\r
+ }\r
+ }\r
+ *path = &p[si]; /* Rerurn pointer to the next segment */\r
+ c = (c <= ' ') ? NS_LAST : 0; /* Set last segment flag if end of path */\r
+\r
+ if (!i) return FR_INVALID_NAME; /* Reject null string */\r
+ if (sfn[0] == 0xE5) sfn[0] = 0x05; /* When first char collides with 0xE5, replace it with 0x05 */\r
+\r
+ if (ni == 8) b <<= 2;\r
+ if ((b & 0x03) == 0x01) c |= NS_EXT; /* NT flag (Extension has only small capital) */\r
+ if ((b & 0x0C) == 0x04) c |= NS_BODY; /* NT flag (Filename has only small capital) */\r
+\r
+ sfn[NS] = c; /* Store NT flag, File name is created */\r
+\r
+ return FR_OK;\r
+#endif\r
+}\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Get file information from directory entry */\r
+/*-----------------------------------------------------------------------*/\r
+#if _FS_MINIMIZE <= 1\r
+static\r
+void get_fileinfo ( /* No return code */\r
+ DIR *dj, /* Pointer to the directory object */\r
+ FILINFO *fno /* Pointer to the file information to be filled */\r
+)\r
+{\r
+ int i;\r
+ BYTE c, nt, *dir;\r
+ char *p;\r
+\r
+\r
+ p = fno->fname;\r
+ if (dj->sect) {\r
+ dir = dj->dir;\r
+ nt = dir[DIR_NTres]; /* NT flag */\r
+ for (i = 0; i < 8; i++) { /* Copy name body */\r
+ c = dir[i];\r
+ if (c == ' ') break;\r
+ if (c == 0x05) c = 0xE5;\r
+ if (_USE_LFN && (nt & NS_BODY) && IsUpper(c)) c += 0x20;\r
+ *p++ = c;\r
+ }\r
+ if (dir[8] != ' ') { /* Copy name extension */\r
+ *p++ = '.';\r
+ for (i = 8; i < 11; i++) {\r
+ c = dir[i];\r
+ if (c == ' ') break;\r
+ if (_USE_LFN && (nt & NS_EXT) && IsUpper(c)) c += 0x20;\r
+ *p++ = c;\r
+ }\r
+ }\r
+ fno->fattrib = dir[DIR_Attr]; /* Attribute */\r
+ fno->fsize = LD_DWORD(dir+DIR_FileSize); /* Size */\r
+ fno->fdate = LD_WORD(dir+DIR_WrtDate); /* Date */\r
+ fno->ftime = LD_WORD(dir+DIR_WrtTime); /* Time */\r
+ }\r
+ *p = 0;\r
+\r
+#if _USE_LFN\r
+ if (fno->lfname) {\r
+ XCHAR *tp = fno->lfname;\r
+ WCHAR w, *lfn;\r
+\r
+ i = 0;\r
+ if (dj->sect && dj->lfn_idx != 0xFFFF) {/* Get LFN if available */\r
+ lfn = dj->lfn;\r
+ while ((w = *lfn++) != 0) { /* Get an LFN char */\r
+#if !_LFN_UNICODE\r
+ w = ff_convert(w, 0); /* Unicode -> OEM conversion */\r
+ if (!w) { i = 0; break; } /* Could not convert, no LFN */\r
+ if (_DF1S && w >= 0x100) /* Put 1st byte if it is a DBC */\r
+ tp[i++] = (XCHAR)(w >> 8);\r
+#endif\r
+ if (i >= fno->lfsize - 1) { i = 0; break; } /* Buffer overrun, no LFN */\r
+ tp[i++] = (XCHAR)w;\r
+ }\r
+ }\r
+ tp[i] = 0; /* Terminator */\r
+ }\r
+#endif\r
+}\r
+#endif /* _FS_MINIMIZE <= 1 */\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Follow a file path */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+static\r
+FRESULT follow_path ( /* FR_OK(0): successful, !=0: error code */\r
+ DIR *dj, /* Directory object to return last directory and found object */\r
+ const XCHAR *path /* Full-path string to find a file or directory */\r
+)\r
+{\r
+ FRESULT res;\r
+ BYTE *dir, last;\r
+\r
+\r
+ while (!_USE_LFN && *path == ' ') path++; /* Skip leading spaces */\r
+#if _FS_RPATH\r
+ if (*path == '/' || *path == '\\') { /* There is a heading separator */\r
+ path++; dj->sclust = 0; /* Strip it and start from the root dir */\r
+ } else { /* No heading saparator */\r
+ dj->sclust = dj->fs->cdir; /* Start from the current dir */\r
+ }\r
+#else\r
+ if (*path == '/' || *path == '\\') /* Strip heading separator if exist */\r
+ path++;\r
+ dj->sclust = 0; /* Start from the root dir */\r
+#endif\r
+\r
+ if ((UINT)*path < ' ') { /* Null path means the start directory itself */\r
+ res = dir_seek(dj, 0);\r
+ dj->dir = NULL;\r
+\r
+ } else { /* Follow path */\r
+ for (;;) {\r
+ res = create_name(dj, &path); /* Get a segment */\r
+ if (res != FR_OK) break;\r
+ res = dir_find(dj); /* Find it */\r
+ last = *(dj->fn+NS) & NS_LAST;\r
+ if (res != FR_OK) { /* Could not find the object */\r
+ if (res == FR_NO_FILE && !last)\r
+ res = FR_NO_PATH;\r
+ break;\r
+ }\r
+ if (last) break; /* Last segment match. Function completed. */\r
+ dir = dj->dir; /* There is next segment. Follow the sub directory */\r
+ if (!(dir[DIR_Attr] & AM_DIR)) { /* Cannot follow because it is a file */\r
+ res = FR_NO_PATH; break;\r
+ }\r
+ dj->sclust = ((DWORD)LD_WORD(dir+DIR_FstClusHI) << 16) | LD_WORD(dir+DIR_FstClusLO);\r
+ }\r
+ }\r
+\r
+ return res;\r
+}\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Load boot record and check if it is an FAT boot record */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+static\r
+BYTE check_fs ( /* 0:The FAT boot record, 1:Valid boot record but not an FAT, 2:Not a boot record, 3:Error */\r
+ FATFS *fs, /* File system object */\r
+ DWORD sect /* Sector# (lba) to check if it is an FAT boot record or not */\r
+)\r
+{\r
+ if (disk_read(fs->drive, fs->win, sect, 1) != RES_OK) /* Load boot record */\r
+ return 3;\r
+ if (LD_WORD(&fs->win[BS_55AA]) != 0xAA55) /* Check record signature (always placed at offset 510 even if the sector size is >512) */\r
+ return 2;\r
+\r
+ if ((LD_DWORD(&fs->win[BS_FilSysType]) & 0xFFFFFF) == 0x544146) /* Check "FAT" string */\r
+ return 0;\r
+ if ((LD_DWORD(&fs->win[BS_FilSysType32]) & 0xFFFFFF) == 0x544146)\r
+ return 0;\r
+\r
+ return 1;\r
+}\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Make sure that the file system is valid */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+\r
+FRESULT chk_mounted ( /* FR_OK(0): successful, !=0: any error occured */\r
+ const XCHAR **path, /* Pointer to pointer to the path name (drive number) */\r
+ FATFS **rfs, /* Pointer to pointer to the found file system object */\r
+ BYTE chk_wp /* !=0: Check media write protection for write access */\r
+)\r
+{\r
+ BYTE fmt, *tbl;\r
+ UINT vol;\r
+ DSTATUS stat;\r
+ DWORD bsect, fsize, tsect, mclst;\r
+ const XCHAR *p = *path;\r
+ FATFS *fs;\r
+\r
+ /* Get logical drive number from the path name */\r
+ vol = p[0] - '0'; /* Is there a drive number? */\r
+ if (vol <= 9 && p[1] == ':') { /* Found a drive number, get and strip it */\r
+ p += 2; *path = p; /* Return pointer to the path name */\r
+ } else { /* No drive number is given */\r
+#if _FS_RPATH\r
+ vol = Drive; /* Use current drive */\r
+#else\r
+ vol = 0; /* Use drive 0 */\r
+#endif\r
+ }\r
+\r
+ /* Check if the logical drive is valid or not */\r
+ if (vol >= _DRIVES) /* Is the drive number valid? */\r
+ return FR_INVALID_DRIVE;\r
+ *rfs = fs = FatFs[vol]; /* Returen pointer to the corresponding file system object */\r
+ if (!fs) return FR_NOT_ENABLED; /* Is the file system object available? */\r
+\r
+ ENTER_FF(fs); /* Lock file system */\r
+\r
+ if (fs->fs_type) { /* If the logical drive has been mounted */\r
+ stat = disk_status(fs->drive);\r
+ if (!(stat & STA_NOINIT)) { /* and the physical drive is kept initialized (has not been changed), */\r
+#if !_FS_READONLY\r
+ if (chk_wp && (stat & STA_PROTECT)) /* Check write protection if needed */\r
+ return FR_WRITE_PROTECTED;\r
+#endif\r
+ return FR_OK; /* The file system object is valid */\r
+ }\r
+ }\r
+\r
+ /* The logical drive must be mounted. Following code attempts to mount the volume */\r
+\r
+ fs->fs_type = 0; /* Clear the file system object */\r
+ fs->drive = (BYTE)LD2PD(vol); /* Bind the logical drive and a physical drive */\r
+ stat = disk_initialize(fs->drive); /* Initialize low level disk I/O layer */\r
+ if (stat & STA_NOINIT) /* Check if the drive is ready */\r
+ return FR_NOT_READY;\r
+#if _MAX_SS != 512 /* Get disk sector size if needed */\r
+ if (disk_ioctl(fs->drive, GET_SECTOR_SIZE, &SS(fs)) != RES_OK || SS(fs) > _MAX_SS)\r
+ return FR_NO_FILESYSTEM;\r
+#endif\r
+#if !_FS_READONLY\r
+ if (chk_wp && (stat & STA_PROTECT)) /* Check disk write protection if needed */\r
+ return FR_WRITE_PROTECTED;\r
+#endif\r
+ /* Search FAT partition on the drive */\r
+ fmt = check_fs(fs, bsect = 0); /* Check sector 0 as an SFD format */\r
+ if (fmt == 1) { /* Not an FAT boot record, it may be patitioned */\r
+ /* Check a partition listed in top of the partition table */\r
+ tbl = &fs->win[MBR_Table + LD2PT(vol) * 16]; /* Partition table */\r
+ if (tbl[4]) { /* Is the partition existing? */\r
+ bsect = LD_DWORD(&tbl[8]); /* Partition offset in LBA */\r
+ fmt = check_fs(fs, bsect); /* Check the partition */\r
+ }\r
+ }\r
+ if (fmt == 3) return FR_DISK_ERR;\r
+ if (fmt || LD_WORD(fs->win+BPB_BytsPerSec) != SS(fs)) /* No valid FAT patition is found */\r
+ return FR_NO_FILESYSTEM;\r
+\r
+ /* Initialize the file system object */\r
+ fsize = LD_WORD(fs->win+BPB_FATSz16); /* Number of sectors per FAT */\r
+ if (!fsize) fsize = LD_DWORD(fs->win+BPB_FATSz32);\r
+ fs->sects_fat = fsize;\r
+ fs->n_fats = fs->win[BPB_NumFATs]; /* Number of FAT copies */\r
+ fsize *= fs->n_fats; /* (Number of sectors in FAT area) */\r
+ fs->fatbase = bsect + LD_WORD(fs->win+BPB_RsvdSecCnt); /* FAT start sector (lba) */\r
+ fs->csize = fs->win[BPB_SecPerClus]; /* Number of sectors per cluster */\r
+ fs->n_rootdir = LD_WORD(fs->win+BPB_RootEntCnt); /* Nmuber of root directory entries */\r
+ tsect = LD_WORD(fs->win+BPB_TotSec16); /* Number of sectors on the volume */\r
+ if (!tsect) tsect = LD_DWORD(fs->win+BPB_TotSec32);\r
+ fs->max_clust = mclst = (tsect /* Last cluster# + 1 (Number of clusters + 2) */\r
+ - LD_WORD(fs->win+BPB_RsvdSecCnt) - fsize - fs->n_rootdir / (SS(fs)/32)\r
+ ) / fs->csize + 2;\r
+\r
+ fmt = FS_FAT12; /* Determine the FAT sub type */\r
+ if (mclst >= 0xFF7) fmt = FS_FAT16; /* Number of clusters >= 0xFF5 */\r
+ if (mclst >= 0xFFF7) fmt = FS_FAT32; /* Number of clusters >= 0xFFF5 */\r
+\r
+ if (fmt == FS_FAT32)\r
+ fs->dirbase = LD_DWORD(fs->win+BPB_RootClus); /* Root directory start cluster */\r
+ else\r
+ fs->dirbase = fs->fatbase + fsize; /* Root directory start sector (lba) */\r
+ fs->database = fs->fatbase + fsize + fs->n_rootdir / (SS(fs)/32); /* Data start sector (lba) */\r
+\r
+#if !_FS_READONLY\r
+ /* Initialize allocation information */\r
+ fs->free_clust = 0xFFFFFFFF;\r
+ fs->wflag = 0;\r
+ /* Get fsinfo if needed */\r
+ if (fmt == FS_FAT32) {\r
+ fs->fsi_flag = 0;\r
+ fs->fsi_sector = bsect + LD_WORD(fs->win+BPB_FSInfo);\r
+ if (disk_read(fs->drive, fs->win, fs->fsi_sector, 1) == RES_OK &&\r
+ LD_WORD(fs->win+BS_55AA) == 0xAA55 &&\r
+ LD_DWORD(fs->win+FSI_LeadSig) == 0x41615252 &&\r
+ LD_DWORD(fs->win+FSI_StrucSig) == 0x61417272) {\r
+ fs->last_clust = LD_DWORD(fs->win+FSI_Nxt_Free);\r
+ fs->free_clust = LD_DWORD(fs->win+FSI_Free_Count);\r
+ }\r
+ }\r
+#endif\r
+ fs->fs_type = fmt; /* FAT sub-type */\r
+ fs->winsect = 0; /* Invalidate sector cache */\r
+#if _FS_RPATH\r
+ fs->cdir = 0; /* Current directory (root dir) */\r
+#endif\r
+ fs->id = ++Fsid; /* File system mount ID */\r
+\r
+ return FR_OK;\r
+}\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Check if the file/dir object is valid or not */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+static\r
+FRESULT validate ( /* FR_OK(0): The object is valid, !=0: Invalid */\r
+ FATFS *fs, /* Pointer to the file system object */\r
+ WORD id /* Member id of the target object to be checked */\r
+)\r
+{\r
+ if (!fs || !fs->fs_type || fs->id != id)\r
+ return FR_INVALID_OBJECT;\r
+\r
+ ENTER_FF(fs); /* Lock file system */\r
+\r
+ if (disk_status(fs->drive) & STA_NOINIT)\r
+ return FR_NOT_READY;\r
+\r
+ return FR_OK;\r
+}\r
+\r
+\r
+\r
+\r
+/*--------------------------------------------------------------------------\r
+\r
+ Public Functions\r
+\r
+--------------------------------------------------------------------------*/\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Mount/Unmount a Locical Drive */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+FRESULT f_mount (\r
+ BYTE vol, /* Logical drive number to be mounted/unmounted */\r
+ FATFS *fs /* Pointer to new file system object (NULL for unmount)*/\r
+)\r
+{\r
+ FATFS *rfs;\r
+\r
+\r
+ if (vol >= _DRIVES) /* Check if the drive number is valid */\r
+ return FR_INVALID_DRIVE;\r
+ rfs = FatFs[vol]; /* Get current fs object */\r
+\r
+ if (rfs) {\r
+#if _FS_REENTRANT /* Discard sync object of the current volume */\r
+ if (!ff_del_syncobj(rfs->sobj)) return FR_INT_ERR;\r
+#endif\r
+ rfs->fs_type = 0; /* Clear old fs object */\r
+ }\r
+\r
+ if (fs) {\r
+ fs->fs_type = 0; /* Clear new fs object */\r
+#if _FS_REENTRANT /* Create sync object for the new volume */\r
+ if (!ff_cre_syncobj(vol, &fs->sobj)) return FR_INT_ERR;\r
+#endif\r
+ }\r
+ FatFs[vol] = fs; /* Register new fs object */\r
+\r
+ return FR_OK;\r
+}\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Open or Create a File */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+FRESULT f_open (\r
+ FIL *fp, /* Pointer to the blank file object */\r
+ const XCHAR *path, /* Pointer to the file name */\r
+ BYTE mode /* Access mode and file open mode flags */\r
+)\r
+{\r
+ FRESULT res;\r
+ DIR dj;\r
+ NAMEBUF(sfn, lfn);\r
+ BYTE *dir;\r
+\r
+\r
+ fp->fs = NULL; /* Clear file object */\r
+#if !_FS_READONLY\r
+ mode &= (FA_READ | FA_WRITE | FA_CREATE_ALWAYS | FA_OPEN_ALWAYS | FA_CREATE_NEW);\r
+ res = chk_mounted(&path, &dj.fs, (BYTE)(mode & (FA_WRITE | FA_CREATE_ALWAYS | FA_OPEN_ALWAYS | FA_CREATE_NEW)));\r
+#else\r
+ mode &= FA_READ;\r
+ res = chk_mounted(&path, &dj.fs, 0);\r
+#endif\r
+ if (res != FR_OK) LEAVE_FF(dj.fs, res);\r
+ INITBUF(dj, sfn, lfn);\r
+ res = follow_path(&dj, path); /* Follow the file path */\r
+\r
+#if !_FS_READONLY\r
+ /* Create or Open a file */\r
+ if (mode & (FA_CREATE_ALWAYS | FA_OPEN_ALWAYS | FA_CREATE_NEW)) {\r
+ DWORD ps, cl;\r
+\r
+ if (res != FR_OK) { /* No file, create new */\r
+ if (res == FR_NO_FILE) /* There is no file to open, create a new entry */\r
+ res = dir_register(&dj);\r
+ if (res != FR_OK) LEAVE_FF(dj.fs, res);\r
+ mode |= FA_CREATE_ALWAYS;\r
+ dir = dj.dir; /* Created entry (SFN entry) */\r
+ }\r
+ else { /* Any object is already existing */\r
+ if (mode & FA_CREATE_NEW) /* Cannot create new */\r
+ LEAVE_FF(dj.fs, FR_EXIST);\r
+ dir = dj.dir;\r
+ if (!dir || (dir[DIR_Attr] & (AM_RDO | AM_DIR))) /* Cannot overwrite it (R/O or DIR) */\r
+ LEAVE_FF(dj.fs, FR_DENIED);\r
+ if (mode & FA_CREATE_ALWAYS) { /* Resize it to zero on over write mode */\r
+ cl = ((DWORD)LD_WORD(dir+DIR_FstClusHI) << 16) | LD_WORD(dir+DIR_FstClusLO); /* Get start cluster */\r
+ ST_WORD(dir+DIR_FstClusHI, 0); /* cluster = 0 */\r
+ ST_WORD(dir+DIR_FstClusLO, 0);\r
+ ST_DWORD(dir+DIR_FileSize, 0); /* size = 0 */\r
+ dj.fs->wflag = 1;\r
+ ps = dj.fs->winsect; /* Remove the cluster chain */\r
+ if (cl) {\r
+ res = remove_chain(dj.fs, cl);\r
+ if (res) LEAVE_FF(dj.fs, res);\r
+ dj.fs->last_clust = cl - 1; /* Reuse the cluster hole */\r
+ }\r
+ res = move_window(dj.fs, ps);\r
+ if (res != FR_OK) LEAVE_FF(dj.fs, res);\r
+ }\r
+ }\r
+ if (mode & FA_CREATE_ALWAYS) {\r
+ dir[DIR_Attr] = 0; /* Reset attribute */\r
+ ps = get_fattime();\r
+ ST_DWORD(dir+DIR_CrtTime, ps); /* Created time */\r
+ dj.fs->wflag = 1;\r
+ mode |= FA__WRITTEN; /* Set file changed flag */\r
+ }\r
+ }\r
+ /* Open an existing file */\r
+ else {\r
+#endif /* !_FS_READONLY */\r
+ if (res != FR_OK) LEAVE_FF(dj.fs, res); /* Follow failed */\r
+ dir = dj.dir;\r
+ if (!dir || (dir[DIR_Attr] & AM_DIR)) /* It is a directory */\r
+ LEAVE_FF(dj.fs, FR_NO_FILE);\r
+#if !_FS_READONLY\r
+ if ((mode & FA_WRITE) && (dir[DIR_Attr] & AM_RDO)) /* R/O violation */\r
+ LEAVE_FF(dj.fs, FR_DENIED);\r
+ }\r
+ fp->dir_sect = dj.fs->winsect; /* Pointer to the directory entry */\r
+ fp->dir_ptr = dj.dir;\r
+#endif\r
+ fp->flag = mode; /* File access mode */\r
+ fp->org_clust = /* File start cluster */\r
+ ((DWORD)LD_WORD(dir+DIR_FstClusHI) << 16) | LD_WORD(dir+DIR_FstClusLO);\r
+ fp->fsize = LD_DWORD(dir+DIR_FileSize); /* File size */\r
+ fp->fptr = 0; fp->csect = 255; /* File pointer */\r
+ fp->dsect = 0;\r
+ fp->fs = dj.fs; fp->id = dj.fs->id; /* Owner file system object of the file */\r
+\r
+ LEAVE_FF(dj.fs, FR_OK);\r
+}\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Read File */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+FRESULT f_read (\r
+ FIL *fp, /* Pointer to the file object */\r
+ void *buff, /* Pointer to data buffer */\r
+ UINT btr, /* Number of bytes to read */\r
+ UINT *br /* Pointer to number of bytes read */\r
+)\r
+{\r
+ FRESULT res;\r
+ DWORD clst, sect, remain;\r
+ UINT rcnt, cc;\r
+ BYTE *rbuff = buff;\r
+\r
+\r
+ *br = 0; /* Initialize bytes read */\r
+\r
+ res = validate(fp->fs, fp->id); /* Check validity of the object */\r
+ if (res != FR_OK) LEAVE_FF(fp->fs, res);\r
+ if (fp->flag & FA__ERROR) /* Check abort flag */\r
+ LEAVE_FF(fp->fs, FR_INT_ERR);\r
+ if (!(fp->flag & FA_READ)) /* Check access mode */\r
+ LEAVE_FF(fp->fs, FR_DENIED);\r
+ remain = fp->fsize - fp->fptr;\r
+ if (btr > remain) btr = (UINT)remain; /* Truncate btr by remaining bytes */\r
+\r
+ for ( ; btr; /* Repeat until all data transferred */\r
+ rbuff += rcnt, fp->fptr += rcnt, *br += rcnt, btr -= rcnt) {\r
+ if ((fp->fptr % SS(fp->fs)) == 0) { /* On the sector boundary? */\r
+ if (fp->csect >= fp->fs->csize) { /* On the cluster boundary? */\r
+ clst = (fp->fptr == 0) ? /* On the top of the file? */\r
+ fp->org_clust : get_fat(fp->fs, fp->curr_clust);\r
+ if (clst <= 1) ABORT(fp->fs, FR_INT_ERR);\r
+ if (clst == 0xFFFFFFFF) ABORT(fp->fs, FR_DISK_ERR);\r
+ fp->curr_clust = clst; /* Update current cluster */\r
+ fp->csect = 0; /* Reset sector offset in the cluster */\r
+ }\r
+ sect = clust2sect(fp->fs, fp->curr_clust); /* Get current sector */\r
+ if (!sect) ABORT(fp->fs, FR_INT_ERR);\r
+ sect += fp->csect;\r
+ cc = btr / SS(fp->fs); /* When remaining bytes >= sector size, */\r
+ if (cc) { /* Read maximum contiguous sectors directly */\r
+ if (fp->csect + cc > fp->fs->csize) /* Clip at cluster boundary */\r
+ cc = fp->fs->csize - fp->csect;\r
+ if (disk_read(fp->fs->drive, rbuff, sect, (BYTE)cc) != RES_OK)\r
+ ABORT(fp->fs, FR_DISK_ERR);\r
+#if !_FS_READONLY && _FS_MINIMIZE <= 2\r
+#if _FS_TINY\r
+ if (fp->fs->wflag && fp->fs->winsect - sect < cc) /* Replace one of the read sectors with cached data if it contains a dirty sector */\r
+ mem_cpy(rbuff + ((fp->fs->winsect - sect) * SS(fp->fs)), fp->fs->win, SS(fp->fs));\r
+#else\r
+ if ((fp->flag & FA__DIRTY) && fp->dsect - sect < cc) /* Replace one of the read sectors with cached data if it contains a dirty sector */\r
+ mem_cpy(rbuff + ((fp->dsect - sect) * SS(fp->fs)), fp->buf, SS(fp->fs));\r
+#endif\r
+#endif\r
+ fp->csect += (BYTE)cc; /* Next sector address in the cluster */\r
+ rcnt = SS(fp->fs) * cc; /* Number of bytes transferred */\r
+ continue;\r
+ }\r
+#if !_FS_TINY\r
+#if !_FS_READONLY\r
+ if (fp->flag & FA__DIRTY) { /* Write sector I/O buffer if needed */\r
+ if (disk_write(fp->fs->drive, fp->buf, fp->dsect, 1) != RES_OK)\r
+ ABORT(fp->fs, FR_DISK_ERR);\r
+ fp->flag &= ~FA__DIRTY;\r
+ }\r
+#endif\r
+ if (fp->dsect != sect) { /* Fill sector buffer with file data */\r
+ if (disk_read(fp->fs->drive, fp->buf, sect, 1) != RES_OK)\r
+ ABORT(fp->fs, FR_DISK_ERR);\r
+ }\r
+#endif\r
+ fp->dsect = sect;\r
+ fp->csect++; /* Next sector address in the cluster */\r
+ }\r
+ rcnt = SS(fp->fs) - (fp->fptr % SS(fp->fs)); /* Get partial sector data from sector buffer */\r
+ if (rcnt > btr) rcnt = btr;\r
+#if _FS_TINY\r
+ if (move_window(fp->fs, fp->dsect)) /* Move sector window */\r
+ ABORT(fp->fs, FR_DISK_ERR);\r
+ mem_cpy(rbuff, &fp->fs->win[fp->fptr % SS(fp->fs)], rcnt); /* Pick partial sector */\r
+#else\r
+ mem_cpy(rbuff, &fp->buf[fp->fptr % SS(fp->fs)], rcnt); /* Pick partial sector */\r
+#endif\r
+ }\r
+\r
+ LEAVE_FF(fp->fs, FR_OK);\r
+}\r
+\r
+\r
+\r
+\r
+#if !_FS_READONLY\r
+/*-----------------------------------------------------------------------*/\r
+/* Write File */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+FRESULT f_write (\r
+ FIL *fp, /* Pointer to the file object */\r
+ const void *buff, /* Pointer to the data to be written */\r
+ UINT btw, /* Number of bytes to write */\r
+ UINT *bw /* Pointer to number of bytes written */\r
+)\r
+{\r
+ FRESULT res;\r
+ DWORD clst, sect;\r
+ UINT wcnt, cc;\r
+ const BYTE *wbuff = buff;\r
+\r
+\r
+ *bw = 0; /* Initialize bytes written */\r
+\r
+ res = validate(fp->fs, fp->id); /* Check validity of the object */\r
+ if (res != FR_OK) LEAVE_FF(fp->fs, res);\r
+ if (fp->flag & FA__ERROR) /* Check abort flag */\r
+ LEAVE_FF(fp->fs, FR_INT_ERR);\r
+ if (!(fp->flag & FA_WRITE)) /* Check access mode */\r
+ LEAVE_FF(fp->fs, FR_DENIED);\r
+ if (fp->fsize + btw < fp->fsize) btw = 0; /* File size cannot reach 4GB */\r
+\r
+ for ( ; btw; /* Repeat until all data transferred */\r
+ wbuff += wcnt, fp->fptr += wcnt, *bw += wcnt, btw -= wcnt) {\r
+ if ((fp->fptr % SS(fp->fs)) == 0) { /* On the sector boundary? */\r
+ if (fp->csect >= fp->fs->csize) { /* On the cluster boundary? */\r
+ if (fp->fptr == 0) { /* On the top of the file? */\r
+ clst = fp->org_clust; /* Follow from the origin */\r
+ if (clst == 0) /* When there is no cluster chain, */\r
+ fp->org_clust = clst = create_chain(fp->fs, 0); /* Create a new cluster chain */\r
+ } else { /* Middle or end of the file */\r
+ clst = create_chain(fp->fs, fp->curr_clust); /* Follow or streach cluster chain */\r
+ }\r
+ if (clst == 0) break; /* Could not allocate a new cluster (disk full) */\r
+ if (clst == 1) ABORT(fp->fs, FR_INT_ERR);\r
+ if (clst == 0xFFFFFFFF) ABORT(fp->fs, FR_DISK_ERR);\r
+ fp->curr_clust = clst; /* Update current cluster */\r
+ fp->csect = 0; /* Reset sector address in the cluster */\r
+ }\r
+#if _FS_TINY\r
+ if (fp->fs->winsect == fp->dsect && move_window(fp->fs, 0)) /* Write back data buffer prior to following direct transfer */\r
+ ABORT(fp->fs, FR_DISK_ERR);\r
+#else\r
+ if (fp->flag & FA__DIRTY) { /* Write back data buffer prior to following direct transfer */\r
+ if (disk_write(fp->fs->drive, fp->buf, fp->dsect, 1) != RES_OK)\r
+ ABORT(fp->fs, FR_DISK_ERR);\r
+ fp->flag &= ~FA__DIRTY;\r
+ }\r
+#endif\r
+ sect = clust2sect(fp->fs, fp->curr_clust); /* Get current sector */\r
+ if (!sect) ABORT(fp->fs, FR_INT_ERR);\r
+ sect += fp->csect;\r
+ cc = btw / SS(fp->fs); /* When remaining bytes >= sector size, */\r
+ if (cc) { /* Write maximum contiguous sectors directly */\r
+ if (fp->csect + cc > fp->fs->csize) /* Clip at cluster boundary */\r
+ cc = fp->fs->csize - fp->csect;\r
+ if (disk_write(fp->fs->drive, wbuff, sect, (BYTE)cc) != RES_OK)\r
+ ABORT(fp->fs, FR_DISK_ERR);\r
+#if _FS_TINY\r
+ if (fp->fs->winsect - sect < cc) { /* Refill sector cache if it gets dirty by the direct write */\r
+ mem_cpy(fp->fs->win, wbuff + ((fp->fs->winsect - sect) * SS(fp->fs)), SS(fp->fs));\r
+ fp->fs->wflag = 0;\r
+ }\r
+#else\r
+ if (fp->dsect - sect < cc) { /* Refill sector cache if it gets dirty by the direct write */\r
+ mem_cpy(fp->buf, wbuff + ((fp->dsect - sect) * SS(fp->fs)), SS(fp->fs));\r
+ fp->flag &= ~FA__DIRTY;\r
+ }\r
+#endif\r
+ fp->csect += (BYTE)cc; /* Next sector address in the cluster */\r
+ wcnt = SS(fp->fs) * cc; /* Number of bytes transferred */\r
+ continue;\r
+ }\r
+#if _FS_TINY\r
+ if (fp->fptr >= fp->fsize) { /* Avoid silly buffer filling at growing edge */\r
+ if (move_window(fp->fs, 0)) ABORT(fp->fs, FR_DISK_ERR);\r
+ fp->fs->winsect = sect;\r
+ }\r
+#else\r
+ if (fp->dsect != sect) { /* Fill sector buffer with file data */\r
+ if (fp->fptr < fp->fsize &&\r
+ disk_read(fp->fs->drive, fp->buf, sect, 1) != RES_OK)\r
+ ABORT(fp->fs, FR_DISK_ERR);\r
+ }\r
+#endif\r
+ fp->dsect = sect;\r
+ fp->csect++; /* Next sector address in the cluster */\r
+ }\r
+ wcnt = SS(fp->fs) - (fp->fptr % SS(fp->fs)); /* Put partial sector into file I/O buffer */\r
+ if (wcnt > btw) wcnt = btw;\r
+#if _FS_TINY\r
+ if (move_window(fp->fs, fp->dsect)) /* Move sector window */\r
+ ABORT(fp->fs, FR_DISK_ERR);\r
+ mem_cpy(&fp->fs->win[fp->fptr % SS(fp->fs)], wbuff, wcnt); /* Fit partial sector */\r
+ fp->fs->wflag = 1;\r
+#else\r
+ mem_cpy(&fp->buf[fp->fptr % SS(fp->fs)], wbuff, wcnt); /* Fit partial sector */\r
+ fp->flag |= FA__DIRTY;\r
+#endif\r
+ }\r
+\r
+ if (fp->fptr > fp->fsize) fp->fsize = fp->fptr; /* Update file size if needed */\r
+ fp->flag |= FA__WRITTEN; /* Set file changed flag */\r
+\r
+ LEAVE_FF(fp->fs, FR_OK);\r
+}\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Synchronize the File Object */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+FRESULT f_sync (\r
+ FIL *fp /* Pointer to the file object */\r
+)\r
+{\r
+ FRESULT res;\r
+ DWORD tim;\r
+ BYTE *dir;\r
+\r
+\r
+ res = validate(fp->fs, fp->id); /* Check validity of the object */\r
+ if (res == FR_OK) {\r
+ if (fp->flag & FA__WRITTEN) { /* Has the file been written? */\r
+#if !_FS_TINY /* Write-back dirty buffer */\r
+ if (fp->flag & FA__DIRTY) {\r
+ if (disk_write(fp->fs->drive, fp->buf, fp->dsect, 1) != RES_OK)\r
+ LEAVE_FF(fp->fs, FR_DISK_ERR);\r
+ fp->flag &= ~FA__DIRTY;\r
+ }\r
+#endif\r
+ /* Update the directory entry */\r
+ res = move_window(fp->fs, fp->dir_sect);\r
+ if (res == FR_OK) {\r
+ dir = fp->dir_ptr;\r
+ dir[DIR_Attr] |= AM_ARC; /* Set archive bit */\r
+ ST_DWORD(dir+DIR_FileSize, fp->fsize); /* Update file size */\r
+ ST_WORD(dir+DIR_FstClusLO, fp->org_clust); /* Update start cluster */\r
+ ST_WORD(dir+DIR_FstClusHI, fp->org_clust >> 16);\r
+ tim = get_fattime(); /* Updated time */\r
+ ST_DWORD(dir+DIR_WrtTime, tim);\r
+ fp->flag &= ~FA__WRITTEN;\r
+ fp->fs->wflag = 1;\r
+ res = sync(fp->fs);\r
+ }\r
+ }\r
+ }\r
+\r
+ LEAVE_FF(fp->fs, res);\r
+}\r
+\r
+#endif /* !_FS_READONLY */\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Close File */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+FRESULT f_close (\r
+ FIL *fp /* Pointer to the file object to be closed */\r
+)\r
+{\r
+ FRESULT res;\r
+\r
+\r
+#if _FS_READONLY\r
+ res = validate(fp->fs, fp->id);\r
+ if (res == FR_OK) fp->fs = NULL;\r
+ LEAVE_FF(fp->fs, res);\r
+#else\r
+ res = f_sync(fp);\r
+ if (res == FR_OK) fp->fs = NULL;\r
+ return res;\r
+#endif\r
+}\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Change Current Drive/Directory */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+#if _FS_RPATH\r
+\r
+FRESULT f_chdrive (\r
+ BYTE drv /* Drive number */\r
+)\r
+{\r
+ if (drv >= _DRIVES) return FR_INVALID_DRIVE;\r
+\r
+ Drive = drv;\r
+\r
+ return FR_OK;\r
+}\r
+\r
+\r
+\r
+\r
+FRESULT f_chdir (\r
+ const XCHAR *path /* Pointer to the directory path */\r
+)\r
+{\r
+ FRESULT res;\r
+ DIR dj;\r
+ NAMEBUF(sfn, lfn);\r
+ BYTE *dir;\r
+\r
+\r
+ res = chk_mounted(&path, &dj.fs, 0);\r
+ if (res == FR_OK) {\r
+ INITBUF(dj, sfn, lfn);\r
+ res = follow_path(&dj, path); /* Follow the file path */\r
+ if (res == FR_OK) { /* Follow completed */\r
+ dir = dj.dir; /* Pointer to the entry */\r
+ if (!dir) {\r
+ dj.fs->cdir = 0; /* No entry (root dir) */\r
+ } else {\r
+ if (dir[DIR_Attr] & AM_DIR) /* Reached to the dir */\r
+ dj.fs->cdir = ((DWORD)LD_WORD(dir+DIR_FstClusHI) << 16) | LD_WORD(dir+DIR_FstClusLO);\r
+ else\r
+ res = FR_NO_PATH; /* Could not reach the dir (it is a file) */\r
+ }\r
+ }\r
+ if (res == FR_NO_FILE) res = FR_NO_PATH;\r
+ }\r
+\r
+ LEAVE_FF(dj.fs, res);\r
+}\r
+\r
+#endif\r
+\r
+\r
+\r
+#if _FS_MINIMIZE <= 2\r
+/*-----------------------------------------------------------------------*/\r
+/* Seek File R/W Pointer */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+FRESULT f_lseek (\r
+ FIL *fp, /* Pointer to the file object */\r
+ DWORD ofs /* File pointer from top of file */\r
+)\r
+{\r
+ FRESULT res;\r
+ DWORD clst, bcs, nsect, ifptr;\r
+\r
+\r
+ res = validate(fp->fs, fp->id); /* Check validity of the object */\r
+ if (res != FR_OK) LEAVE_FF(fp->fs, res);\r
+ if (fp->flag & FA__ERROR) /* Check abort flag */\r
+ LEAVE_FF(fp->fs, FR_INT_ERR);\r
+ if (ofs > fp->fsize /* In read-only mode, clip offset with the file size */\r
+#if !_FS_READONLY\r
+ && !(fp->flag & FA_WRITE)\r
+#endif\r
+ ) ofs = fp->fsize;\r
+\r
+ ifptr = fp->fptr;\r
+ fp->fptr = nsect = 0; fp->csect = 255;\r
+ if (ofs > 0) {\r
+ bcs = (DWORD)fp->fs->csize * SS(fp->fs); /* Cluster size (byte) */\r
+ if (ifptr > 0 &&\r
+ (ofs - 1) / bcs >= (ifptr - 1) / bcs) { /* When seek to same or following cluster, */\r
+ fp->fptr = (ifptr - 1) & ~(bcs - 1); /* start from the current cluster */\r
+ ofs -= fp->fptr;\r
+ clst = fp->curr_clust;\r
+ } else { /* When seek to back cluster, */\r
+ clst = fp->org_clust; /* start from the first cluster */\r
+#if !_FS_READONLY\r
+ if (clst == 0) { /* If no cluster chain, create a new chain */\r
+ clst = create_chain(fp->fs, 0);\r
+ if (clst == 1) ABORT(fp->fs, FR_INT_ERR);\r
+ if (clst == 0xFFFFFFFF) ABORT(fp->fs, FR_DISK_ERR);\r
+ fp->org_clust = clst;\r
+ }\r
+#endif\r
+ fp->curr_clust = clst;\r
+ }\r
+ if (clst != 0) {\r
+ while (ofs > bcs) { /* Cluster following loop */\r
+#if !_FS_READONLY\r
+ if (fp->flag & FA_WRITE) { /* Check if in write mode or not */\r
+ clst = create_chain(fp->fs, clst); /* Force streached if in write mode */\r
+ if (clst == 0) { /* When disk gets full, clip file size */\r
+ ofs = bcs; break;\r
+ }\r
+ } else\r
+#endif\r
+ clst = get_fat(fp->fs, clst); /* Follow cluster chain if not in write mode */\r
+ if (clst == 0xFFFFFFFF) ABORT(fp->fs, FR_DISK_ERR);\r
+ if (clst <= 1 || clst >= fp->fs->max_clust) ABORT(fp->fs, FR_INT_ERR);\r
+ fp->curr_clust = clst;\r
+ fp->fptr += bcs;\r
+ ofs -= bcs;\r
+ }\r
+ fp->fptr += ofs;\r
+ fp->csect = (BYTE)(ofs / SS(fp->fs)); /* Sector offset in the cluster */\r
+ if (ofs % SS(fp->fs)) {\r
+ nsect = clust2sect(fp->fs, clst); /* Current sector */\r
+ if (!nsect) ABORT(fp->fs, FR_INT_ERR);\r
+ nsect += fp->csect;\r
+ fp->csect++;\r
+ }\r
+ }\r
+ }\r
+ if (fp->fptr % SS(fp->fs) && nsect != fp->dsect) {\r
+#if !_FS_TINY\r
+#if !_FS_READONLY\r
+ if (fp->flag & FA__DIRTY) { /* Write-back dirty buffer if needed */\r
+ if (disk_write(fp->fs->drive, fp->buf, fp->dsect, 1) != RES_OK)\r
+ ABORT(fp->fs, FR_DISK_ERR);\r
+ fp->flag &= ~FA__DIRTY;\r
+ }\r
+#endif\r
+ if (disk_read(fp->fs->drive, fp->buf, nsect, 1) != RES_OK)\r
+ ABORT(fp->fs, FR_DISK_ERR);\r
+#endif\r
+ fp->dsect = nsect;\r
+ }\r
+#if !_FS_READONLY\r
+ if (fp->fptr > fp->fsize) { /* Set changed flag if the file size is extended */\r
+ fp->fsize = fp->fptr;\r
+ fp->flag |= FA__WRITTEN;\r
+ }\r
+#endif\r
+\r
+ LEAVE_FF(fp->fs, res);\r
+}\r
+\r
+\r
+\r
+\r
+#if _FS_MINIMIZE <= 1\r
+/*-----------------------------------------------------------------------*/\r
+/* Create a Directroy Object */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+FRESULT f_opendir (\r
+ DIR *dj, /* Pointer to directory object to create */\r
+ const XCHAR *path /* Pointer to the directory path */\r
+)\r
+{\r
+ FRESULT res;\r
+ NAMEBUF(sfn, lfn);\r
+ BYTE *dir;\r
+\r
+\r
+ res = chk_mounted(&path, &dj->fs, 0);\r
+ if (res == FR_OK) {\r
+ INITBUF((*dj), sfn, lfn);\r
+ res = follow_path(dj, path); /* Follow the path to the directory */\r
+ if (res == FR_OK) { /* Follow completed */\r
+ dir = dj->dir;\r
+ if (dir) { /* It is not the root dir */\r
+ if (dir[DIR_Attr] & AM_DIR) { /* The object is a directory */\r
+ dj->sclust = ((DWORD)LD_WORD(dir+DIR_FstClusHI) << 16) | LD_WORD(dir+DIR_FstClusLO);\r
+ } else { /* The object is not a directory */\r
+ res = FR_NO_PATH;\r
+ }\r
+ }\r
+ if (res == FR_OK) {\r
+ dj->id = dj->fs->id;\r
+ res = dir_seek(dj, 0); /* Rewind dir */\r
+ }\r
+ }\r
+ if (res == FR_NO_FILE) res = FR_NO_PATH;\r
+ }\r
+\r
+ LEAVE_FF(dj->fs, res);\r
+}\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Read Directory Entry in Sequense */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+FRESULT f_readdir (\r
+ DIR *dj, /* Pointer to the open directory object */\r
+ FILINFO *fno /* Pointer to file information to return */\r
+)\r
+{\r
+ FRESULT res;\r
+ NAMEBUF(sfn, lfn);\r
+\r
+\r
+ res = validate(dj->fs, dj->id); /* Check validity of the object */\r
+ if (res == FR_OK) {\r
+ INITBUF((*dj), sfn, lfn);\r
+ if (!fno) {\r
+ res = dir_seek(dj, 0);\r
+ } else {\r
+ res = dir_read(dj);\r
+ if (res == FR_NO_FILE) {\r
+ dj->sect = 0;\r
+ res = FR_OK;\r
+ }\r
+ if (res == FR_OK) { /* A valid entry is found */\r
+ get_fileinfo(dj, fno); /* Get the object information */\r
+ res = dir_next(dj, FALSE); /* Increment index for next */\r
+ if (res == FR_NO_FILE) {\r
+ dj->sect = 0;\r
+ res = FR_OK;\r
+ }\r
+ }\r
+ }\r
+ }\r
+\r
+ LEAVE_FF(dj->fs, res);\r
+}\r
+\r
+\r
+\r
+#if _FS_MINIMIZE == 0\r
+/*-----------------------------------------------------------------------*/\r
+/* Get File Status */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+FRESULT f_stat (\r
+ const XCHAR *path, /* Pointer to the file path */\r
+ FILINFO *fno /* Pointer to file information to return */\r
+)\r
+{\r
+ FRESULT res;\r
+ DIR dj;\r
+ NAMEBUF(sfn, lfn);\r
+\r
+\r
+ res = chk_mounted(&path, &dj.fs, 0);\r
+ if (res == FR_OK) {\r
+ INITBUF(dj, sfn, lfn);\r
+ res = follow_path(&dj, path); /* Follow the file path */\r
+ if (res == FR_OK) { /* Follwo completed */\r
+ if (dj.dir) /* Found an object */\r
+ get_fileinfo(&dj, fno);\r
+ else /* It is root dir */\r
+ res = FR_INVALID_NAME;\r
+ }\r
+ }\r
+\r
+ LEAVE_FF(dj.fs, res);\r
+}\r
+\r
+\r
+\r
+#if !_FS_READONLY\r
+/*-----------------------------------------------------------------------*/\r
+/* Get Number of Free Clusters */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+FRESULT f_getfree (\r
+ const XCHAR *path, /* Pointer to the logical drive number (root dir) */\r
+ DWORD *nclst, /* Pointer to the variable to return number of free clusters */\r
+ FATFS **fatfs /* Pointer to pointer to corresponding file system object to return */\r
+)\r
+{\r
+ FRESULT res;\r
+ DWORD n, clst, sect, stat;\r
+ UINT i;\r
+ BYTE fat, *p;\r
+\r
+\r
+ /* Get drive number */\r
+ res = chk_mounted(&path, fatfs, 0);\r
+ if (res != FR_OK) LEAVE_FF(*fatfs, res);\r
+\r
+ /* If number of free cluster is valid, return it without cluster scan. */\r
+ if ((*fatfs)->free_clust <= (*fatfs)->max_clust - 2) {\r
+ *nclst = (*fatfs)->free_clust;\r
+ LEAVE_FF(*fatfs, FR_OK);\r
+ }\r
+\r
+ /* Get number of free clusters */\r
+ fat = (*fatfs)->fs_type;\r
+ n = 0;\r
+ if (fat == FS_FAT12) {\r
+ clst = 2;\r
+ do {\r
+ stat = get_fat(*fatfs, clst);\r
+ if (stat == 0xFFFFFFFF) LEAVE_FF(*fatfs, FR_DISK_ERR);\r
+ if (stat == 1) LEAVE_FF(*fatfs, FR_INT_ERR);\r
+ if (stat == 0) n++;\r
+ } while (++clst < (*fatfs)->max_clust);\r
+ } else {\r
+ clst = (*fatfs)->max_clust;\r
+ sect = (*fatfs)->fatbase;\r
+ i = 0; p = 0;\r
+ do {\r
+ if (!i) {\r
+ res = move_window(*fatfs, sect++);\r
+ if (res != FR_OK)\r
+ LEAVE_FF(*fatfs, res);\r
+ p = (*fatfs)->win;\r
+ i = SS(*fatfs);\r
+ }\r
+ if (fat == FS_FAT16) {\r
+ if (LD_WORD(p) == 0) n++;\r
+ p += 2; i -= 2;\r
+ } else {\r
+ if ((LD_DWORD(p) & 0x0FFFFFFF) == 0) n++;\r
+ p += 4; i -= 4;\r
+ }\r
+ } while (--clst);\r
+ }\r
+ (*fatfs)->free_clust = n;\r
+ if (fat == FS_FAT32) (*fatfs)->fsi_flag = 1;\r
+ *nclst = n;\r
+\r
+ LEAVE_FF(*fatfs, FR_OK);\r
+}\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Truncate File */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+FRESULT f_truncate (\r
+ FIL *fp /* Pointer to the file object */\r
+)\r
+{\r
+ FRESULT res;\r
+ DWORD ncl;\r
+\r
+\r
+ res = validate(fp->fs, fp->id); /* Check validity of the object */\r
+ if (res != FR_OK) LEAVE_FF(fp->fs, res);\r
+ if (fp->flag & FA__ERROR) /* Check abort flag */\r
+ LEAVE_FF(fp->fs, FR_INT_ERR);\r
+ if (!(fp->flag & FA_WRITE)) /* Check access mode */\r
+ LEAVE_FF(fp->fs, FR_DENIED);\r
+\r
+ if (fp->fsize > fp->fptr) {\r
+ fp->fsize = fp->fptr; /* Set file size to current R/W point */\r
+ fp->flag |= FA__WRITTEN;\r
+ if (fp->fptr == 0) { /* When set file size to zero, remove entire cluster chain */\r
+ res = remove_chain(fp->fs, fp->org_clust);\r
+ fp->org_clust = 0;\r
+ } else { /* When truncate a part of the file, remove remaining clusters */\r
+ ncl = get_fat(fp->fs, fp->curr_clust);\r
+ res = FR_OK;\r
+ if (ncl == 0xFFFFFFFF) res = FR_DISK_ERR;\r
+ if (ncl == 1) res = FR_INT_ERR;\r
+ if (res == FR_OK && ncl < fp->fs->max_clust) {\r
+ res = put_fat(fp->fs, fp->curr_clust, 0x0FFFFFFF);\r
+ if (res == FR_OK) res = remove_chain(fp->fs, ncl);\r
+ }\r
+ }\r
+ }\r
+ if (res != FR_OK) fp->flag |= FA__ERROR;\r
+\r
+ LEAVE_FF(fp->fs, res);\r
+}\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Delete a File or Directory */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+FRESULT f_unlink (\r
+ const XCHAR *path /* Pointer to the file or directory path */\r
+)\r
+{\r
+ FRESULT res;\r
+ DIR dj, sdj;\r
+ NAMEBUF(sfn, lfn);\r
+ BYTE *dir;\r
+ DWORD dclst;\r
+\r
+\r
+ res = chk_mounted(&path, &dj.fs, 1);\r
+ if (res != FR_OK) LEAVE_FF(dj.fs, res);\r
+\r
+ INITBUF(dj, sfn, lfn);\r
+ res = follow_path(&dj, path); /* Follow the file path */\r
+ if (_FS_RPATH && res == FR_OK && (dj.fn[NS] & NS_DOT))\r
+ res = FR_INVALID_NAME;\r
+ if (res != FR_OK) LEAVE_FF(dj.fs, res); /* Follow failed */\r
+\r
+ dir = dj.dir;\r
+ if (!dir) /* Is it the root directory? */\r
+ LEAVE_FF(dj.fs, FR_INVALID_NAME);\r
+ if (dir[DIR_Attr] & AM_RDO) /* Is it a R/O object? */\r
+ LEAVE_FF(dj.fs, FR_DENIED);\r
+ dclst = ((DWORD)LD_WORD(dir+DIR_FstClusHI) << 16) | LD_WORD(dir+DIR_FstClusLO);\r
+\r
+ if (dir[DIR_Attr] & AM_DIR) { /* It is a sub-directory */\r
+ if (dclst < 2) LEAVE_FF(dj.fs, FR_INT_ERR);\r
+ mem_cpy(&sdj, &dj, sizeof(DIR)); /* Check if the sub-dir is empty or not */\r
+ sdj.sclust = dclst;\r
+ res = dir_seek(&sdj, 2);\r
+ if (res != FR_OK) LEAVE_FF(dj.fs, res);\r
+ res = dir_read(&sdj);\r
+ if (res == FR_OK) res = FR_DENIED; /* Not empty sub-dir */\r
+ if (res != FR_NO_FILE) LEAVE_FF(dj.fs, res);\r
+ }\r
+\r
+ res = dir_remove(&dj); /* Remove directory entry */\r
+ if (res == FR_OK) {\r
+ if (dclst)\r
+ res = remove_chain(dj.fs, dclst); /* Remove the cluster chain */\r
+ if (res == FR_OK) res = sync(dj.fs);\r
+ }\r
+\r
+ LEAVE_FF(dj.fs, res);\r
+}\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Create a Directory */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+FRESULT f_mkdir (\r
+ const XCHAR *path /* Pointer to the directory path */\r
+)\r
+{\r
+ FRESULT res;\r
+ DIR dj;\r
+ NAMEBUF(sfn, lfn);\r
+ BYTE *dir, n;\r
+ DWORD dsect, dclst, pclst, tim;\r
+\r
+\r
+ res = chk_mounted(&path, &dj.fs, 1);\r
+ if (res != FR_OK) LEAVE_FF(dj.fs, res);\r
+\r
+ INITBUF(dj, sfn, lfn);\r
+ res = follow_path(&dj, path); /* Follow the file path */\r
+ if (res == FR_OK) res = FR_EXIST; /* Any file or directory is already existing */\r
+ if (_FS_RPATH && res == FR_NO_FILE && (dj.fn[NS] & NS_DOT))\r
+ res = FR_INVALID_NAME;\r
+ if (res != FR_NO_FILE) /* Any error occured */\r
+ LEAVE_FF(dj.fs, res);\r
+\r
+ dclst = create_chain(dj.fs, 0); /* Allocate a new cluster for new directory table */\r
+ res = FR_OK;\r
+ if (dclst == 0) res = FR_DENIED;\r
+ if (dclst == 1) res = FR_INT_ERR;\r
+ if (dclst == 0xFFFFFFFF) res = FR_DISK_ERR;\r
+ if (res == FR_OK)\r
+ res = move_window(dj.fs, 0);\r
+ if (res != FR_OK) LEAVE_FF(dj.fs, res);\r
+ dsect = clust2sect(dj.fs, dclst);\r
+\r
+ dir = dj.fs->win; /* Initialize the new directory table */\r
+ mem_set(dir, 0, SS(dj.fs));\r
+ mem_set(dir+DIR_Name, ' ', 8+3); /* Create "." entry */\r
+ dir[DIR_Name] = '.';\r
+ dir[DIR_Attr] = AM_DIR;\r
+ tim = get_fattime();\r
+ ST_DWORD(dir+DIR_WrtTime, tim);\r
+ ST_WORD(dir+DIR_FstClusLO, dclst);\r
+ ST_WORD(dir+DIR_FstClusHI, dclst >> 16);\r
+ mem_cpy(dir+32, dir, 32); /* Create ".." entry */\r
+ dir[33] = '.';\r
+ pclst = dj.sclust;\r
+ if (dj.fs->fs_type == FS_FAT32 && pclst == dj.fs->dirbase)\r
+ pclst = 0;\r
+ ST_WORD(dir+32+DIR_FstClusLO, pclst);\r
+ ST_WORD(dir+32+DIR_FstClusHI, pclst >> 16);\r
+ for (n = 0; n < dj.fs->csize; n++) { /* Write dot entries and clear left sectors */\r
+ dj.fs->winsect = dsect++;\r
+ dj.fs->wflag = 1;\r
+ res = move_window(dj.fs, 0);\r
+ if (res) LEAVE_FF(dj.fs, res);\r
+ mem_set(dir, 0, SS(dj.fs));\r
+ }\r
+\r
+ res = dir_register(&dj);\r
+ if (res != FR_OK) {\r
+ remove_chain(dj.fs, dclst);\r
+ } else {\r
+ dir = dj.dir;\r
+ dir[DIR_Attr] = AM_DIR; /* Attribute */\r
+ ST_DWORD(dir+DIR_WrtTime, tim); /* Crated time */\r
+ ST_WORD(dir+DIR_FstClusLO, dclst); /* Table start cluster */\r
+ ST_WORD(dir+DIR_FstClusHI, dclst >> 16);\r
+ dj.fs->wflag = 1;\r
+ res = sync(dj.fs);\r
+ }\r
+\r
+ LEAVE_FF(dj.fs, res);\r
+}\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Change File Attribute */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+FRESULT f_chmod (\r
+ const XCHAR *path, /* Pointer to the file path */\r
+ BYTE value, /* Attribute bits */\r
+ BYTE mask /* Attribute mask to change */\r
+)\r
+{\r
+ FRESULT res;\r
+ DIR dj;\r
+ NAMEBUF(sfn, lfn);\r
+ BYTE *dir;\r
+\r
+\r
+ res = chk_mounted(&path, &dj.fs, 1);\r
+ if (res == FR_OK) {\r
+ INITBUF(dj, sfn, lfn);\r
+ res = follow_path(&dj, path); /* Follow the file path */\r
+ if (_FS_RPATH && res == FR_OK && (dj.fn[NS] & NS_DOT))\r
+ res = FR_INVALID_NAME;\r
+ if (res == FR_OK) {\r
+ dir = dj.dir;\r
+ if (!dir) { /* Is it a root directory? */\r
+ res = FR_INVALID_NAME;\r
+ } else { /* File or sub directory */\r
+ mask &= AM_RDO|AM_HID|AM_SYS|AM_ARC; /* Valid attribute mask */\r
+ dir[DIR_Attr] = (value & mask) | (dir[DIR_Attr] & (BYTE)~mask); /* Apply attribute change */\r
+ dj.fs->wflag = 1;\r
+ res = sync(dj.fs);\r
+ }\r
+ }\r
+ }\r
+\r
+ LEAVE_FF(dj.fs, res);\r
+}\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Change Timestamp */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+FRESULT f_utime (\r
+ const XCHAR *path, /* Pointer to the file/directory name */\r
+ const FILINFO *fno /* Pointer to the timestamp to be set */\r
+)\r
+{\r
+ FRESULT res;\r
+ DIR dj;\r
+ NAMEBUF(sfn, lfn);\r
+ BYTE *dir;\r
+\r
+\r
+ res = chk_mounted(&path, &dj.fs, 1);\r
+ if (res == FR_OK) {\r
+ INITBUF(dj, sfn, lfn);\r
+ res = follow_path(&dj, path); /* Follow the file path */\r
+ if (_FS_RPATH && res == FR_OK && (dj.fn[NS] & NS_DOT))\r
+ res = FR_INVALID_NAME;\r
+ if (res == FR_OK) {\r
+ dir = dj.dir;\r
+ if (!dir) { /* Root directory */\r
+ res = FR_INVALID_NAME;\r
+ } else { /* File or sub-directory */\r
+ ST_WORD(dir+DIR_WrtTime, fno->ftime);\r
+ ST_WORD(dir+DIR_WrtDate, fno->fdate);\r
+ dj.fs->wflag = 1;\r
+ res = sync(dj.fs);\r
+ }\r
+ }\r
+ }\r
+\r
+ LEAVE_FF(dj.fs, res);\r
+}\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Rename File/Directory */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+FRESULT f_rename (\r
+ const XCHAR *path_old, /* Pointer to the old name */\r
+ const XCHAR *path_new /* Pointer to the new name */\r
+)\r
+{\r
+ FRESULT res;\r
+ DIR dj_old, dj_new;\r
+ NAMEBUF(sfn, lfn);\r
+ BYTE buf[21], *dir;\r
+ DWORD dw;\r
+\r
+\r
+ INITBUF(dj_old, sfn, lfn);\r
+ res = chk_mounted(&path_old, &dj_old.fs, 1);\r
+ if (res == FR_OK) {\r
+ dj_new.fs = dj_old.fs;\r
+ res = follow_path(&dj_old, path_old); /* Check old object */\r
+ if (_FS_RPATH && res == FR_OK && (dj_old.fn[NS] & NS_DOT))\r
+ res = FR_INVALID_NAME;\r
+ }\r
+ if (res != FR_OK) LEAVE_FF(dj_old.fs, res); /* The old object is not found */\r
+\r
+ if (!dj_old.dir) LEAVE_FF(dj_old.fs, FR_NO_FILE); /* Is root dir? */\r
+ mem_cpy(buf, dj_old.dir+DIR_Attr, 21); /* Save the object information */\r
+\r
+ mem_cpy(&dj_new, &dj_old, sizeof(DIR));\r
+ res = follow_path(&dj_new, path_new); /* Check new object */\r
+ if (res == FR_OK) res = FR_EXIST; /* The new object name is already existing */\r
+ if (res == FR_NO_FILE) { /* Is it a valid path and no name collision? */\r
+ res = dir_register(&dj_new); /* Register the new object */\r
+ if (res == FR_OK) {\r
+ dir = dj_new.dir; /* Copy object information into new entry */\r
+ mem_cpy(dir+13, buf+2, 19);\r
+ dir[DIR_Attr] = buf[0] | AM_ARC;\r
+ dj_old.fs->wflag = 1;\r
+ if (dir[DIR_Attr] & AM_DIR) { /* Update .. entry in the directory if needed */\r
+ dw = clust2sect(dj_new.fs, (DWORD)LD_WORD(dir+DIR_FstClusHI) | LD_WORD(dir+DIR_FstClusLO));\r
+ if (!dw) {\r
+ res = FR_INT_ERR;\r
+ } else {\r
+ res = move_window(dj_new.fs, dw);\r
+ dir = dj_new.fs->win+32;\r
+ if (res == FR_OK && dir[1] == '.') {\r
+ dw = (dj_new.fs->fs_type == FS_FAT32 && dj_new.sclust == dj_new.fs->dirbase) ? 0 : dj_new.sclust;\r
+ ST_WORD(dir+DIR_FstClusLO, dw);\r
+ ST_WORD(dir+DIR_FstClusHI, dw >> 16);\r
+ dj_new.fs->wflag = 1;\r
+ }\r
+ }\r
+ }\r
+ if (res == FR_OK) {\r
+ res = dir_remove(&dj_old); /* Remove old entry */\r
+ if (res == FR_OK)\r
+ res = sync(dj_old.fs);\r
+ }\r
+ }\r
+ }\r
+\r
+ LEAVE_FF(dj_old.fs, res);\r
+}\r
+\r
+#endif /* !_FS_READONLY */\r
+#endif /* _FS_MINIMIZE == 0 */\r
+#endif /* _FS_MINIMIZE <= 1 */\r
+#endif /* _FS_MINIMIZE <= 2 */\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Forward data to the stream directly (Available on only _FS_TINY cfg) */\r
+/*-----------------------------------------------------------------------*/\r
+#if _USE_FORWARD && _FS_TINY\r
+\r
+FRESULT f_forward (\r
+ FIL *fp, /* Pointer to the file object */\r
+ UINT (*func)(const BYTE*,UINT), /* Pointer to the streaming function */\r
+ UINT btr, /* Number of bytes to forward */\r
+ UINT *bf /* Pointer to number of bytes forwarded */\r
+)\r
+{\r
+ FRESULT res;\r
+ DWORD remain, clst, sect;\r
+ UINT rcnt;\r
+\r
+\r
+ *bf = 0;\r
+\r
+ res = validate(fp->fs, fp->id); /* Check validity of the object */\r
+ if (res != FR_OK) LEAVE_FF(fp->fs, res);\r
+ if (fp->flag & FA__ERROR) /* Check error flag */\r
+ LEAVE_FF(fp->fs, FR_INT_ERR);\r
+ if (!(fp->flag & FA_READ)) /* Check access mode */\r
+ LEAVE_FF(fp->fs, FR_DENIED);\r
+\r
+ remain = fp->fsize - fp->fptr;\r
+ if (btr > remain) btr = (UINT)remain; /* Truncate btr by remaining bytes */\r
+\r
+ for ( ; btr && (*func)(NULL, 0); /* Repeat until all data transferred or stream becomes busy */\r
+ fp->fptr += rcnt, *bf += rcnt, btr -= rcnt) {\r
+ if ((fp->fptr % SS(fp->fs)) == 0) { /* On the sector boundary? */\r
+ if (fp->csect >= fp->fs->csize) { /* On the cluster boundary? */\r
+ clst = (fp->fptr == 0) ? /* On the top of the file? */\r
+ fp->org_clust : get_fat(fp->fs, fp->curr_clust);\r
+ if (clst <= 1) ABORT(fp->fs, FR_INT_ERR);\r
+ if (clst == 0xFFFFFFFF) ABORT(fp->fs, FR_DISK_ERR);\r
+ fp->curr_clust = clst; /* Update current cluster */\r
+ fp->csect = 0; /* Reset sector address in the cluster */\r
+ }\r
+ fp->csect++; /* Next sector address in the cluster */\r
+ }\r
+ sect = clust2sect(fp->fs, fp->curr_clust); /* Get current data sector */\r
+ if (!sect) ABORT(fp->fs, FR_INT_ERR);\r
+ sect += fp->csect - 1;\r
+ if (move_window(fp->fs, sect)) /* Move sector window */\r
+ ABORT(fp->fs, FR_DISK_ERR);\r
+ fp->dsect = sect;\r
+ rcnt = SS(fp->fs) - (WORD)(fp->fptr % SS(fp->fs)); /* Forward data from sector window */\r
+ if (rcnt > btr) rcnt = btr;\r
+ rcnt = (*func)(&fp->fs->win[(WORD)fp->fptr % SS(fp->fs)], rcnt);\r
+ if (!rcnt) ABORT(fp->fs, FR_INT_ERR);\r
+ }\r
+\r
+ LEAVE_FF(fp->fs, FR_OK);\r
+}\r
+#endif /* _USE_FORWARD */\r
+\r
+\r
+\r
+#if _USE_MKFS && !_FS_READONLY\r
+/*-----------------------------------------------------------------------*/\r
+/* Create File System on the Drive */\r
+/*-----------------------------------------------------------------------*/\r
+#define N_ROOTDIR 512 /* Multiple of 32 and <= 2048 */\r
+#define N_FATS 1 /* 1 or 2 */\r
+#define MAX_SECTOR 131072000UL /* Maximum partition size */\r
+#define MIN_SECTOR 2000UL /* Minimum partition size */\r
+\r
+\r
+FRESULT f_mkfs (\r
+ BYTE drv, /* Logical drive number */\r
+ BYTE partition, /* Partitioning rule 0:FDISK, 1:SFD */\r
+ WORD allocsize /* Allocation unit size [bytes] */\r
+)\r
+{\r
+ static const DWORD sstbl[] = { 2048000, 1024000, 512000, 256000, 128000, 64000, 32000, 16000, 8000, 4000, 0 };\r
+ static const WORD cstbl[] = { 32768, 16384, 8192, 4096, 2048, 16384, 8192, 4096, 2048, 1024, 512 };\r
+ BYTE fmt, m, *tbl;\r
+ DWORD b_part, b_fat, b_dir, b_data; /* Area offset (LBA) */\r
+ DWORD n_part, n_rsv, n_fat, n_dir; /* Area size */\r
+ DWORD n_clst, d, n;\r
+ WORD as;\r
+ FATFS *fs;\r
+ DSTATUS stat;\r
+\r
+\r
+ /* Check validity of the parameters */\r
+ if (drv >= _DRIVES) return FR_INVALID_DRIVE;\r
+ if (partition >= 2) return FR_MKFS_ABORTED;\r
+\r
+ /* Check mounted drive and clear work area */\r
+ fs = FatFs[drv];\r
+ if (!fs) return FR_NOT_ENABLED;\r
+ fs->fs_type = 0;\r
+ drv = LD2PD(drv);\r
+\r
+ /* Get disk statics */\r
+ stat = disk_initialize(drv);\r
+ if (stat & STA_NOINIT) return FR_NOT_READY;\r
+ if (stat & STA_PROTECT) return FR_WRITE_PROTECTED;\r
+#if _MAX_SS != 512 /* Get disk sector size */\r
+ if (disk_ioctl(drv, GET_SECTOR_SIZE, &SS(fs)) != RES_OK\r
+ || SS(fs) > _MAX_SS)\r
+ return FR_MKFS_ABORTED;\r
+#endif\r
+ if (disk_ioctl(drv, GET_SECTOR_COUNT, &n_part) != RES_OK || n_part < MIN_SECTOR)\r
+ return FR_MKFS_ABORTED;\r
+ if (n_part > MAX_SECTOR) n_part = MAX_SECTOR;\r
+ b_part = (!partition) ? 63 : 0; /* Boot sector */\r
+ n_part -= b_part;\r
+ for (d = 512; d <= 32768U && d != allocsize; d <<= 1) ; /* Check validity of the allocation unit size */\r
+ if (d != allocsize) allocsize = 0;\r
+ if (!allocsize) { /* Auto selection of cluster size */\r
+ d = n_part;\r
+ for (as = SS(fs); as > 512U; as >>= 1) d >>= 1;\r
+ for (n = 0; d < sstbl[n]; n++) ;\r
+ allocsize = cstbl[n];\r
+ }\r
+ if (allocsize < SS(fs)) allocsize = SS(fs);\r
+\r
+ allocsize /= SS(fs); /* Number of sectors per cluster */\r
+\r
+ /* Pre-compute number of clusters and FAT type */\r
+ n_clst = n_part / allocsize;\r
+ fmt = FS_FAT12;\r
+ if (n_clst >= 0xFF5) fmt = FS_FAT16;\r
+ if (n_clst >= 0xFFF5) fmt = FS_FAT32;\r
+\r
+ /* Determine offset and size of FAT structure */\r
+ switch (fmt) {\r
+ case FS_FAT12:\r
+ n_fat = ((n_clst * 3 + 1) / 2 + 3 + SS(fs) - 1) / SS(fs);\r
+ n_rsv = 1 + partition;\r
+ n_dir = N_ROOTDIR * 32 / SS(fs);\r
+ break;\r
+ case FS_FAT16:\r
+ n_fat = ((n_clst * 2) + 4 + SS(fs) - 1) / SS(fs);\r
+ n_rsv = 1 + partition;\r
+ n_dir = N_ROOTDIR * 32 / SS(fs);\r
+ break;\r
+ default:\r
+ n_fat = ((n_clst * 4) + 8 + SS(fs) - 1) / SS(fs);\r
+ n_rsv = 33 - partition;\r
+ n_dir = 0;\r
+ }\r
+ b_fat = b_part + n_rsv; /* FATs start sector */\r
+ b_dir = b_fat + n_fat * N_FATS; /* Directory start sector */\r
+ b_data = b_dir + n_dir; /* Data start sector */\r
+\r
+ /* Align data start sector to erase block boundary (for flash memory media) */\r
+ if (disk_ioctl(drv, GET_BLOCK_SIZE, &n) != RES_OK) return FR_MKFS_ABORTED;\r
+ n = (b_data + n - 1) & ~(n - 1);\r
+ n_fat += (n - b_data) / N_FATS;\r
+ /* b_dir and b_data are no longer used below */\r
+\r
+ /* Determine number of cluster and final check of validity of the FAT type */\r
+ n_clst = (n_part - n_rsv - n_fat * N_FATS - n_dir) / allocsize;\r
+ if ( (fmt == FS_FAT16 && n_clst < 0xFF5)\r
+ || (fmt == FS_FAT32 && n_clst < 0xFFF5))\r
+ return FR_MKFS_ABORTED;\r
+\r
+ /* Create partition table if needed */\r
+ if (!partition) {\r
+ DWORD n_disk = b_part + n_part;\r
+\r
+ mem_set(fs->win, 0, SS(fs));\r
+ tbl = fs->win+MBR_Table;\r
+ ST_DWORD(tbl, 0x00010180); /* Partition start in CHS */\r
+ if (n_disk < 63UL * 255 * 1024) { /* Partition end in CHS */\r
+ n_disk = n_disk / 63 / 255;\r
+ tbl[7] = (BYTE)n_disk;\r
+ tbl[6] = (BYTE)((n_disk >> 2) | 63);\r
+ } else {\r
+ ST_WORD(&tbl[6], 0xFFFF);\r
+ }\r
+ tbl[5] = 254;\r
+ if (fmt != FS_FAT32) /* System ID */\r
+ tbl[4] = (n_part < 0x10000) ? 0x04 : 0x06;\r
+ else\r
+ tbl[4] = 0x0c;\r
+ ST_DWORD(tbl+8, 63); /* Partition start in LBA */\r
+ ST_DWORD(tbl+12, n_part); /* Partition size in LBA */\r
+ ST_WORD(tbl+64, 0xAA55); /* Signature */\r
+ if (disk_write(drv, fs->win, 0, 1) != RES_OK)\r
+ return FR_DISK_ERR;\r
+ partition = 0xF8;\r
+ } else {\r
+ partition = 0xF0;\r
+ }\r
+\r
+ /* Create boot record */\r
+ tbl = fs->win; /* Clear buffer */\r
+ mem_set(tbl, 0, SS(fs));\r
+ ST_DWORD(tbl+BS_jmpBoot, 0x90FEEB); /* Boot code (jmp $, nop) */\r
+ ST_WORD(tbl+BPB_BytsPerSec, SS(fs)); /* Sector size */\r
+ tbl[BPB_SecPerClus] = (BYTE)allocsize; /* Sectors per cluster */\r
+ ST_WORD(tbl+BPB_RsvdSecCnt, n_rsv); /* Reserved sectors */\r
+ tbl[BPB_NumFATs] = N_FATS; /* Number of FATs */\r
+ ST_WORD(tbl+BPB_RootEntCnt, SS(fs) / 32 * n_dir); /* Number of rootdir entries */\r
+ if (n_part < 0x10000) { /* Number of total sectors */\r
+ ST_WORD(tbl+BPB_TotSec16, n_part);\r
+ } else {\r
+ ST_DWORD(tbl+BPB_TotSec32, n_part);\r
+ }\r
+ tbl[BPB_Media] = partition; /* Media descripter */\r
+ ST_WORD(tbl+BPB_SecPerTrk, 63); /* Number of sectors per track */\r
+ ST_WORD(tbl+BPB_NumHeads, 255); /* Number of heads */\r
+ ST_DWORD(tbl+BPB_HiddSec, b_part); /* Hidden sectors */\r
+ n = get_fattime(); /* Use current time as a VSN */\r
+ if (fmt != FS_FAT32) {\r
+ ST_DWORD(tbl+BS_VolID, n); /* Volume serial number */\r
+ ST_WORD(tbl+BPB_FATSz16, n_fat); /* Number of secters per FAT */\r
+ tbl[BS_DrvNum] = 0x80; /* Drive number */\r
+ tbl[BS_BootSig] = 0x29; /* Extended boot signature */\r
+ mem_cpy(tbl+BS_VolLab, "NO NAME FAT ", 19); /* Volume lavel, FAT signature */\r
+ } else {\r
+ ST_DWORD(tbl+BS_VolID32, n); /* Volume serial number */\r
+ ST_DWORD(tbl+BPB_FATSz32, n_fat); /* Number of secters per FAT */\r
+ ST_DWORD(tbl+BPB_RootClus, 2); /* Root directory cluster (2) */\r
+ ST_WORD(tbl+BPB_FSInfo, 1); /* FSInfo record offset (bs+1) */\r
+ ST_WORD(tbl+BPB_BkBootSec, 6); /* Backup boot record offset (bs+6) */\r
+ tbl[BS_DrvNum32] = 0x80; /* Drive number */\r
+ tbl[BS_BootSig32] = 0x29; /* Extended boot signature */\r
+ mem_cpy(tbl+BS_VolLab32, "NO NAME FAT32 ", 19); /* Volume lavel, FAT signature */\r
+ }\r
+ ST_WORD(tbl+BS_55AA, 0xAA55); /* Signature */\r
+ if (SS(fs) > 512U) {\r
+ ST_WORD(tbl+SS(fs)-2, 0xAA55);\r
+ }\r
+ if (disk_write(drv, tbl, b_part+0, 1) != RES_OK)\r
+ return FR_DISK_ERR;\r
+ if (fmt == FS_FAT32)\r
+ disk_write(drv, tbl, b_part+6, 1);\r
+\r
+ /* Initialize FAT area */\r
+ for (m = 0; m < N_FATS; m++) {\r
+ mem_set(tbl, 0, SS(fs)); /* 1st sector of the FAT */\r
+ if (fmt != FS_FAT32) {\r
+ n = (fmt == FS_FAT12) ? 0x00FFFF00 : 0xFFFFFF00;\r
+ n |= partition;\r
+ ST_DWORD(tbl, n); /* Reserve cluster #0-1 (FAT12/16) */\r
+ } else {\r
+ ST_DWORD(tbl+0, 0xFFFFFFF8); /* Reserve cluster #0-1 (FAT32) */\r
+ ST_DWORD(tbl+4, 0xFFFFFFFF);\r
+ ST_DWORD(tbl+8, 0x0FFFFFFF); /* Reserve cluster #2 for root dir */\r
+ }\r
+ if (disk_write(drv, tbl, b_fat++, 1) != RES_OK)\r
+ return FR_DISK_ERR;\r
+ mem_set(tbl, 0, SS(fs)); /* Following FAT entries are filled by zero */\r
+ for (n = 1; n < n_fat; n++) {\r
+ if (disk_write(drv, tbl, b_fat++, 1) != RES_OK)\r
+ return FR_DISK_ERR;\r
+ }\r
+ }\r
+\r
+ /* Initialize Root directory */\r
+ m = (BYTE)((fmt == FS_FAT32) ? allocsize : n_dir);\r
+ do {\r
+ if (disk_write(drv, tbl, b_fat++, 1) != RES_OK)\r
+ return FR_DISK_ERR;\r
+ } while (--m);\r
+\r
+ /* Create FSInfo record if needed */\r
+ if (fmt == FS_FAT32) {\r
+ ST_WORD(tbl+BS_55AA, 0xAA55);\r
+ ST_DWORD(tbl+FSI_LeadSig, 0x41615252);\r
+ ST_DWORD(tbl+FSI_StrucSig, 0x61417272);\r
+ ST_DWORD(tbl+FSI_Free_Count, n_clst - 1);\r
+ ST_DWORD(tbl+FSI_Nxt_Free, 0xFFFFFFFF);\r
+ disk_write(drv, tbl, b_part+1, 1);\r
+ disk_write(drv, tbl, b_part+7, 1);\r
+ }\r
+\r
+ return (disk_ioctl(drv, CTRL_SYNC, (void*)NULL) == RES_OK) ? FR_OK : FR_DISK_ERR;\r
+}\r
+\r
+#endif /* _USE_MKFS && !_FS_READONLY */\r
+\r
+\r
+\r
+\r
+#if _USE_STRFUNC\r
+/*-----------------------------------------------------------------------*/\r
+/* Get a string from the file */\r
+/*-----------------------------------------------------------------------*/\r
+char* f_gets (\r
+ char* buff, /* Pointer to the string buffer to read */\r
+ int len, /* Size of string buffer */\r
+ FIL* fil /* Pointer to the file object */\r
+)\r
+{\r
+ int i = 0;\r
+ char *p = buff;\r
+ UINT rc;\r
+\r
+\r
+ while (i < len - 1) { /* Read bytes until buffer gets filled */\r
+ f_read(fil, p, 1, &rc);\r
+ if (rc != 1) break; /* Break when no data to read */\r
+#if _USE_STRFUNC >= 2\r
+ if (*p == '\r') continue; /* Strip '\r' */\r
+#endif\r
+ i++;\r
+ if (*p++ == '\n') break; /* Break when reached end of line */\r
+ }\r
+ *p = 0;\r
+ return i ? buff : NULL; /* When no data read (eof or error), return with error. */\r
+}\r
+\r
+\r
+\r
+#if !_FS_READONLY\r
+#include <stdarg.h>\r
+/*-----------------------------------------------------------------------*/\r
+/* Put a character to the file */\r
+/*-----------------------------------------------------------------------*/\r
+int f_putc (\r
+ int chr, /* A character to be output */\r
+ FIL* fil /* Ponter to the file object */\r
+)\r
+{\r
+ UINT bw;\r
+ char c;\r
+\r
+\r
+#if _USE_STRFUNC >= 2\r
+ if (chr == '\n') f_putc ('\r', fil); /* LF -> CRLF conversion */\r
+#endif\r
+ if (!fil) { /* Special value may be used to switch the destination to any other device */\r
+ /* put_console(chr); */\r
+ return chr;\r
+ }\r
+ c = (char)chr;\r
+ f_write(fil, &c, 1, &bw); /* Write a byte to the file */\r
+ return bw ? chr : EOF; /* Return the result */\r
+}\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Put a string to the file */\r
+/*-----------------------------------------------------------------------*/\r
+int f_puts (\r
+ const char* str, /* Pointer to the string to be output */\r
+ FIL* fil /* Pointer to the file object */\r
+)\r
+{\r
+ int n;\r
+\r
+\r
+ for (n = 0; *str; str++, n++) {\r
+ if (f_putc(*str, fil) == EOF) return EOF;\r
+ }\r
+ return n;\r
+}\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Put a formatted string to the file */\r
+/*-----------------------------------------------------------------------*/\r
+int f_printf (\r
+ FIL* fil, /* Pointer to the file object */\r
+ const char* str, /* Pointer to the format string */\r
+ ... /* Optional arguments... */\r
+)\r
+{\r
+ va_list arp;\r
+ UCHAR c, f, r;\r
+ ULONG val;\r
+ char s[16];\r
+ int i, w, res, cc;\r
+\r
+\r
+ va_start(arp, str);\r
+\r
+ for (cc = res = 0; cc != EOF; res += cc) {\r
+ c = *str++;\r
+ if (c == 0) break; /* End of string */\r
+ if (c != '%') { /* Non escape cahracter */\r
+ cc = f_putc(c, fil);\r
+ if (cc != EOF) cc = 1;\r
+ continue;\r
+ }\r
+ w = f = 0;\r
+ c = *str++;\r
+ if (c == '0') { /* Flag: '0' padding */\r
+ f = 1; c = *str++;\r
+ }\r
+ while (c >= '0' && c <= '9') { /* Precision */\r
+ w = w * 10 + (c - '0');\r
+ c = *str++;\r
+ }\r
+ if (c == 'l') { /* Prefix: Size is long int */\r
+ f |= 2; c = *str++;\r
+ }\r
+ if (c == 's') { /* Type is string */\r
+ cc = f_puts(va_arg(arp, char*), fil);\r
+ continue;\r
+ }\r
+ if (c == 'c') { /* Type is character */\r
+ cc = f_putc(va_arg(arp, int), fil);\r
+ if (cc != EOF) cc = 1;\r
+ continue;\r
+ }\r
+ r = 0;\r
+ if (c == 'd') r = 10; /* Type is signed decimal */\r
+ if (c == 'u') r = 10; /* Type is unsigned decimal */\r
+ if (c == 'X') r = 16; /* Type is unsigned hexdecimal */\r
+ if (r == 0) break; /* Unknown type */\r
+ if (f & 2) { /* Get the value */\r
+ val = (ULONG)va_arg(arp, long);\r
+ } else {\r
+ val = (c == 'd') ? (ULONG)(long)va_arg(arp, int) : (ULONG)va_arg(arp, unsigned int);\r
+ }\r
+ /* Put numeral string */\r
+ if (c == 'd') {\r
+ if (val & 0x80000000) {\r
+ val = 0 - val;\r
+ f |= 4;\r
+ }\r
+ }\r
+ i = sizeof(s) - 1; s[i] = 0;\r
+ do {\r
+ c = (UCHAR)(val % r + '0');\r
+ if (c > '9') c += 7;\r
+ s[--i] = c;\r
+ val /= r;\r
+ } while (i && val);\r
+ if (i && (f & 4)) s[--i] = '-';\r
+ w = sizeof(s) - 1 - w;\r
+ while (i && i > w) s[--i] = (f & 1) ? '0' : ' ';\r
+ cc = f_puts(&s[i], fil);\r
+ }\r
+\r
+ va_end(arp);\r
+ return (cc == EOF) ? cc : res;\r
+}\r
+\r
+#endif /* !_FS_READONLY */\r
+#endif /* _USE_STRFUNC */\r
--- /dev/null
+/*---------------------------------------------------------------------------/\r
+/ FatFs - FAT file system module include file R0.07e (C)ChaN, 2009\r
+/----------------------------------------------------------------------------/\r
+/ FatFs module is a generic FAT file system module for small embedded systems.\r
+/ This is a free software that opened for education, research and commercial\r
+/ developments under license policy of following trems.\r
+/\r
+/ Copyright (C) 2009, ChaN, all right reserved.\r
+/\r
+/ * The FatFs module is a free software and there is NO WARRANTY.\r
+/ * No restriction on use. You can use, modify and redistribute it for\r
+/ personal, non-profit or commercial product UNDER YOUR RESPONSIBILITY.\r
+/ * Redistributions of source code must retain the above copyright notice.\r
+/----------------------------------------------------------------------------*/\r
+\r
+#ifndef _FATFS\r
+#define _FATFS 0x007E\r
+\r
+#include "integer.h" /* Basic integer types */\r
+#include "ffconf.h" /* FatFs configuration options */\r
+\r
+#if _FATFS != _FFCONFIG\r
+#error Wrong configuration file (ffconf.h).\r
+#endif\r
+\r
+\r
+/* DBCS code ranges and SBCS extend char conversion table */\r
+\r
+#if _CODE_PAGE == 932 /* Japanese Shift-JIS */\r
+#define _DF1S 0x81 /* DBC 1st byte range 1 start */\r
+#define _DF1E 0x9F /* DBC 1st byte range 1 end */\r
+#define _DF2S 0xE0 /* DBC 1st byte range 2 start */\r
+#define _DF2E 0xFC /* DBC 1st byte range 2 end */\r
+#define _DS1S 0x40 /* DBC 2nd byte range 1 start */\r
+#define _DS1E 0x7E /* DBC 2nd byte range 1 end */\r
+#define _DS2S 0x80 /* DBC 2nd byte range 2 start */\r
+#define _DS2E 0xFC /* DBC 2nd byte range 2 end */\r
+\r
+#elif _CODE_PAGE == 936 /* Simplified Chinese GBK */\r
+#define _DF1S 0x81\r
+#define _DF1E 0xFE\r
+#define _DS1S 0x40\r
+#define _DS1E 0x7E\r
+#define _DS2S 0x80\r
+#define _DS2E 0xFE\r
+\r
+#elif _CODE_PAGE == 949 /* Korean */\r
+#define _DF1S 0x81\r
+#define _DF1E 0xFE\r
+#define _DS1S 0x41\r
+#define _DS1E 0x5A\r
+#define _DS2S 0x61\r
+#define _DS2E 0x7A\r
+#define _DS3S 0x81\r
+#define _DS3E 0xFE\r
+\r
+#elif _CODE_PAGE == 950 /* Traditional Chinese Big5 */\r
+#define _DF1S 0x81\r
+#define _DF1E 0xFE\r
+#define _DS1S 0x40\r
+#define _DS1E 0x7E\r
+#define _DS2S 0xA1\r
+#define _DS2E 0xFE\r
+\r
+#elif _CODE_PAGE == 437 /* U.S. (OEM) */\r
+#define _DF1S 0\r
+#define _EXCVT {0x80,0x9A,0x90,0x41,0x8E,0x41,0x8F,0x80,0x45,0x45,0x45,0x49,0x49,0x49,0x8E,0x8F,0x90,0x92,0x92,0x4F,0x99,0x4F,0x55,0x55,0x59,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \\r
+ 0x41,0x49,0x4F,0x55,0xA5,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0x21,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \\r
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \\r
+ 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}\r
+\r
+#elif _CODE_PAGE == 720 /* Arabic (OEM) */\r
+#define _DF1S 0\r
+#define _EXCVT {0x80,0x81,0x45,0x41,0x84,0x41,0x86,0x43,0x45,0x45,0x45,0x49,0x49,0x8D,0x8E,0x8F,0x90,0x92,0x92,0x93,0x94,0x95,0x49,0x49,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \\r
+ 0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \\r
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \\r
+ 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}\r
+\r
+#elif _CODE_PAGE == 737 /* Greek (OEM) */\r
+#define _DF1S 0\r
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x92,0x92,0x93,0x94,0x95,0x96,0x97,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87, \\r
+ 0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0xAA,0x92,0x93,0x94,0x95,0x96,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \\r
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \\r
+ 0x97,0xEA,0xEB,0xEC,0xE4,0xED,0xEE,0xE7,0xE8,0xF1,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}\r
+\r
+#elif _CODE_PAGE == 775 /* Baltic (OEM) */\r
+#define _DF1S 0\r
+#define _EXCVT {0x80,0x9A,0x91,0xA0,0x8E,0x95,0x8F,0x80,0xAD,0xED,0x8A,0x8A,0xA1,0x8D,0x8E,0x8F,0x90,0x92,0x92,0xE2,0x99,0x95,0x96,0x97,0x97,0x99,0x9A,0x9D,0x9C,0x9D,0x9E,0x9F, \\r
+ 0xA0,0xA1,0xE0,0xA3,0xA3,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \\r
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xB5,0xB6,0xB7,0xB8,0xBD,0xBE,0xC6,0xC7,0xA5,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \\r
+ 0xE0,0xE1,0xE2,0xE3,0xE5,0xE5,0xE6,0xE3,0xE8,0xE8,0xEA,0xEA,0xEE,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}\r
+\r
+#elif _CODE_PAGE == 850 /* Multilingual Latin 1 (OEM) */\r
+#define _DF1S 0\r
+#define _EXCVT {0x80,0x9A,0x90,0xB6,0x8E,0xB7,0x8F,0x80,0xD2,0xD3,0xD4,0xD8,0xD7,0xDE,0x8E,0x8F,0x90,0x92,0x92,0xE2,0x99,0xE3,0xEA,0xEB,0x59,0x99,0x9A,0x9D,0x9C,0x9D,0x9E,0x9F, \\r
+ 0xB5,0xD6,0xE0,0xE9,0xA5,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0x21,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \\r
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC7,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \\r
+ 0xE0,0xE1,0xE2,0xE3,0xE5,0xE5,0xE6,0xE7,0xE7,0xE9,0xEA,0xEB,0xED,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}\r
+\r
+#elif _CODE_PAGE == 852 /* Latin 2 (OEM) */\r
+#define _DF1S 0\r
+#define _EXCVT {0x80,0x9A,0x90,0xB6,0x8E,0xDE,0x8F,0x80,0x9D,0xD3,0x8A,0x8A,0xD7,0x8D,0x8E,0x8F,0x90,0x91,0x91,0xE2,0x99,0x95,0x95,0x97,0x97,0x99,0x9A,0x9B,0x9B,0x9D,0x9E,0x9F, \\r
+ 0xB5,0xD6,0xE0,0xE9,0xA4,0xA4,0xA6,0xA6,0xA8,0xA8,0xAA,0x8D,0xAC,0xB8,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBD,0xBF, \\r
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC6,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD1,0xD1,0xD2,0xD3,0xD2,0xD5,0xD6,0xD7,0xB7,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \\r
+ 0xE0,0xE1,0xE2,0xE3,0xE3,0xD5,0xE6,0xE6,0xE8,0xE9,0xE8,0xEB,0xED,0xED,0xDD,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xEB,0xFC,0xFC,0xFE,0xFF}\r
+\r
+#elif _CODE_PAGE == 855 /* Cyrillic (OEM) */\r
+#define _DF1S 0\r
+#define _EXCVT {0x81,0x81,0x83,0x83,0x85,0x85,0x87,0x87,0x89,0x89,0x8B,0x8B,0x8D,0x8D,0x8F,0x8F,0x91,0x91,0x93,0x93,0x95,0x95,0x97,0x97,0x99,0x99,0x9B,0x9B,0x9D,0x9D,0x9F,0x9F, \\r
+ 0xA1,0xA1,0xA3,0xA3,0xA5,0xA5,0xA7,0xA7,0xA9,0xA9,0xAB,0xAB,0xAD,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB6,0xB6,0xB8,0xB8,0xB9,0xBA,0xBB,0xBC,0xBE,0xBE,0xBF, \\r
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC7,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD1,0xD1,0xD3,0xD3,0xD5,0xD5,0xD7,0xD7,0xDD,0xD9,0xDA,0xDB,0xDC,0xDD,0xE0,0xDF, \\r
+ 0xE0,0xE2,0xE2,0xE4,0xE4,0xE6,0xE6,0xE8,0xE8,0xEA,0xEA,0xEC,0xEC,0xEE,0xEE,0xEF,0xF0,0xF2,0xF2,0xF4,0xF4,0xF6,0xF6,0xF8,0xF8,0xFA,0xFA,0xFC,0xFC,0xFD,0xFE,0xFF}\r
+\r
+#elif _CODE_PAGE == 857 /* Turkish (OEM) */\r
+#define _DF1S 0\r
+#define _EXCVT {0x80,0x9A,0x90,0xB6,0x8E,0xB7,0x8F,0x80,0xD2,0xD3,0xD4,0xD8,0xD7,0x98,0x8E,0x8F,0x90,0x92,0x92,0xE2,0x99,0xE3,0xEA,0xEB,0x98,0x99,0x9A,0x9D,0x9C,0x9D,0x9E,0x9E, \\r
+ 0xB5,0xD6,0xE0,0xE9,0xA5,0xA5,0xA6,0xA6,0xA8,0xA9,0xAA,0xAB,0xAC,0x21,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \\r
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC7,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \\r
+ 0xE0,0xE1,0xE2,0xE3,0xE5,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xDE,0x59,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}\r
+\r
+#elif _CODE_PAGE == 858 /* Multilingual Latin 1 + Euro (OEM) */\r
+#define _DF1S 0\r
+#define _EXCVT {0x80,0x9A,0x90,0xB6,0x8E,0xB7,0x8F,0x80,0xD2,0xD3,0xD4,0xD8,0xD7,0xDE,0x8E,0x8F,0x90,0x92,0x92,0xE2,0x99,0xE3,0xEA,0xEB,0x59,0x99,0x9A,0x9D,0x9C,0x9D,0x9E,0x9F, \\r
+ 0xB5,0xD6,0xE0,0xE9,0xA5,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0x21,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \\r
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC7,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD1,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \\r
+ 0xE0,0xE1,0xE2,0xE3,0xE5,0xE5,0xE6,0xE7,0xE7,0xE9,0xEA,0xEB,0xED,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}\r
+\r
+#elif _CODE_PAGE == 862 /* Hebrew (OEM) */\r
+#define _DF1S 0\r
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \\r
+ 0x41,0x49,0x4F,0x55,0xA5,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0x21,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \\r
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \\r
+ 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}\r
+\r
+#elif _CODE_PAGE == 866 /* Russian (OEM) */\r
+#define _DF1S 0\r
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \\r
+ 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \\r
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \\r
+ 0x90,0x91,0x92,0x93,0x9d,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xF0,0xF0,0xF2,0xF2,0xF4,0xF4,0xF6,0xF6,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}\r
+\r
+#elif _CODE_PAGE == 874 /* Thai (OEM, Windows) */\r
+#define _DF1S 0\r
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \\r
+ 0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \\r
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \\r
+ 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}\r
+\r
+#elif _CODE_PAGE == 1250 /* Central Europe (Windows) */\r
+#define _DF1S 0\r
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x8A,0x9B,0x8C,0x8D,0x8E,0x8F, \\r
+ 0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xA3,0xB4,0xB5,0xB6,0xB7,0xB8,0xA5,0xAA,0xBB,0xBC,0xBD,0xBC,0xAF, \\r
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \\r
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF}\r
+\r
+#elif _CODE_PAGE == 1251 /* Cyrillic (Windows) */\r
+#define _DF1S 0\r
+#define _EXCVT {0x80,0x81,0x82,0x82,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x80,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x8A,0x9B,0x8C,0x8D,0x8E,0x8F, \\r
+ 0xA0,0xA2,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB2,0xA5,0xB5,0xB6,0xB7,0xA8,0xB9,0xAA,0xBB,0xA3,0xBD,0xBD,0xAF, \\r
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \\r
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF}\r
+\r
+#elif _CODE_PAGE == 1252 /* Latin 1 (Windows) */\r
+#define _DF1S 0\r
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0xAd,0x9B,0x8C,0x9D,0xAE,0x9F, \\r
+ 0xA0,0x21,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \\r
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \\r
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0x9F}\r
+\r
+#elif _CODE_PAGE == 1253 /* Greek (Windows) */\r
+#define _DF1S 0\r
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \\r
+ 0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \\r
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xA2,0xB8,0xB9,0xBA, \\r
+ 0xE0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xF2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xFB,0xBC,0xFD,0xBF,0xFF}\r
+\r
+#elif _CODE_PAGE == 1254 /* Turkish (Windows) */\r
+#define _DF1S 0\r
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x8A,0x9B,0x8C,0x9D,0x9E,0x9F, \\r
+ 0xA0,0x21,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \\r
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \\r
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0x9F}\r
+\r
+#elif _CODE_PAGE == 1255 /* Hebrew (Windows) */\r
+#define _DF1S 0\r
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \\r
+ 0xA0,0x21,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \\r
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \\r
+ 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}\r
+\r
+#elif _CODE_PAGE == 1256 /* Arabic (Windows) */\r
+#define _DF1S 0\r
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x8C,0x9D,0x9E,0x9F, \\r
+ 0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \\r
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \\r
+ 0x41,0xE1,0x41,0xE3,0xE4,0xE5,0xE6,0x43,0x45,0x45,0x45,0x45,0xEC,0xED,0x49,0x49,0xF0,0xF1,0xF2,0xF3,0x4F,0xF5,0xF6,0xF7,0xF8,0x55,0xFA,0x55,0x55,0xFD,0xFE,0xFF}\r
+\r
+#elif _CODE_PAGE == 1257 /* Baltic (Windows) */\r
+#define _DF1S 0\r
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \\r
+ 0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xA8,0xB9,0xAA,0xBB,0xBC,0xBD,0xBE,0xAF, \\r
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \\r
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF}\r
+\r
+#elif _CODE_PAGE == 1258 /* Vietnam (OEM, Windows) */\r
+#define _DF1S 0\r
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0xAC,0x9D,0x9E,0x9F, \\r
+ 0xA0,0x21,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \\r
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \\r
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xEC,0xCD,0xCE,0xCF,0xD0,0xD1,0xF2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xFE,0x9F}\r
+\r
+#elif _CODE_PAGE == 1 /* ASCII (for only non-LFN cfg) */\r
+#define _DF1S 0\r
+\r
+#else\r
+#error Unknown code page\r
+\r
+#endif\r
+\r
+\r
+\r
+/* Character code support macros */\r
+\r
+#define IsUpper(c) (((c)>='A')&&((c)<='Z'))\r
+#define IsLower(c) (((c)>='a')&&((c)<='z'))\r
+\r
+#if _DF1S /* DBCS configuration */\r
+\r
+#ifdef _DF2S /* Two 1st byte areas */\r
+#define IsDBCS1(c) (((BYTE)(c) >= _DF1S && (BYTE)(c) <= _DF1E) || ((BYTE)(c) >= _DF2S && (BYTE)(c) <= _DF2E))\r
+#else /* One 1st byte area */\r
+#define IsDBCS1(c) ((BYTE)(c) >= _DF1S && (BYTE)(c) <= _DF1E)\r
+#endif\r
+\r
+#ifdef _DS3S /* Three 2nd byte areas */\r
+#define IsDBCS2(c) (((BYTE)(c) >= _DS1S && (BYTE)(c) <= _DS1E) || ((BYTE)(c) >= _DS2S && (BYTE)(c) <= _DS2E) || ((BYTE)(c) >= _DS3S && (BYTE)(c) <= _DS3E))\r
+#else /* Two 2nd byte areas */\r
+#define IsDBCS2(c) (((BYTE)(c) >= _DS1S && (BYTE)(c) <= _DS1E) || ((BYTE)(c) >= _DS2S && (BYTE)(c) <= _DS2E))\r
+#endif\r
+\r
+#else /* SBCS configuration */\r
+\r
+#define IsDBCS1(c) 0\r
+#define IsDBCS2(c) 0\r
+\r
+#endif /* _DF1S */\r
+\r
+\r
+\r
+/* Definitions corresponds to multi partition */\r
+\r
+#if _MULTI_PARTITION /* Multiple partition configuration */\r
+\r
+typedef struct _PARTITION {\r
+ BYTE pd; /* Physical drive# */\r
+ BYTE pt; /* Partition # (0-3) */\r
+} PARTITION;\r
+\r
+extern\r
+const PARTITION Drives[]; /* Logical drive# to physical location conversion table */\r
+#define LD2PD(drv) (Drives[drv].pd) /* Get physical drive# */\r
+#define LD2PT(drv) (Drives[drv].pt) /* Get partition# */\r
+\r
+#else /* Single partition configuration */\r
+\r
+#define LD2PD(drv) (drv) /* Physical drive# is equal to the logical drive# */\r
+#define LD2PT(drv) 0 /* Always mounts the 1st partition */\r
+\r
+#endif\r
+\r
+\r
+\r
+/* Definitions corresponds to multiple sector size */\r
+\r
+#if _MAX_SS == 512 /* Single sector size */\r
+#define SS(fs) 512U\r
+\r
+#elif _MAX_SS == 1024 || _MAX_SS == 2048 || _MAX_SS == 4096 /* Multiple sector size */\r
+#define SS(fs) ((fs)->s_size)\r
+\r
+#else\r
+#error Sector size must be 512, 1024, 2048 or 4096.\r
+\r
+#endif\r
+\r
+\r
+\r
+/* Type of file name on FatFs API */\r
+\r
+#if _LFN_UNICODE && _USE_LFN\r
+typedef WCHAR XCHAR; /* Unicode */\r
+#else\r
+typedef char XCHAR; /* SBCS, DBCS */\r
+#endif\r
+\r
+\r
+\r
+/* File system object structure */\r
+\r
+typedef struct _FATFS_ {\r
+ BYTE fs_type; /* FAT sub type */\r
+ BYTE drive; /* Physical drive number */\r
+ BYTE csize; /* Number of sectors per cluster */\r
+ BYTE n_fats; /* Number of FAT copies */\r
+ BYTE wflag; /* win[] dirty flag (1:must be written back) */\r
+ BYTE fsi_flag; /* fsinfo dirty flag (1:must be written back) */\r
+ WORD id; /* File system mount ID */\r
+ WORD n_rootdir; /* Number of root directory entries (0 on FAT32) */\r
+#if _FS_REENTRANT\r
+ _SYNC_t sobj; /* Identifier of sync object */\r
+#endif\r
+#if _MAX_SS != 512\r
+ WORD s_size; /* Sector size */\r
+#endif\r
+#if !_FS_READONLY\r
+ DWORD last_clust; /* Last allocated cluster */\r
+ DWORD free_clust; /* Number of free clusters */\r
+ DWORD fsi_sector; /* fsinfo sector */\r
+#endif\r
+#if _FS_RPATH\r
+ DWORD cdir; /* Current directory (0:root)*/\r
+#endif\r
+ DWORD sects_fat; /* Sectors per fat */\r
+ DWORD max_clust; /* Maximum cluster# + 1. Number of clusters is max_clust - 2 */\r
+ DWORD fatbase; /* FAT start sector */\r
+ DWORD dirbase; /* Root directory start sector (Cluster# on FAT32) */\r
+ DWORD database; /* Data start sector */\r
+ DWORD winsect; /* Current sector appearing in the win[] */\r
+ BYTE win[_MAX_SS];/* Disk access window for Directory/FAT */\r
+} FATFS;\r
+\r
+\r
+\r
+/* Directory object structure */\r
+\r
+typedef struct _DIR_ {\r
+ FATFS* fs; /* Pointer to the owner file system object */\r
+ WORD id; /* Owner file system mount ID */\r
+ WORD index; /* Current read/write index number */\r
+ DWORD sclust; /* Table start cluster (0:Static table) */\r
+ DWORD clust; /* Current cluster */\r
+ DWORD sect; /* Current sector */\r
+ BYTE* dir; /* Pointer to the current SFN entry in the win[] */\r
+ BYTE* fn; /* Pointer to the SFN (in/out) {file[8],ext[3],status[1]} */\r
+#if _USE_LFN\r
+ WCHAR* lfn; /* Pointer to the LFN working buffer */\r
+ WORD lfn_idx; /* Last matched LFN index number (0xFFFF:No LFN) */\r
+#endif\r
+} DIR;\r
+\r
+\r
+\r
+/* File object structure */\r
+\r
+typedef struct _FIL_ {\r
+ FATFS* fs; /* Pointer to the owner file system object */\r
+ WORD id; /* Owner file system mount ID */\r
+ BYTE flag; /* File status flags */\r
+ BYTE csect; /* Sector address in the cluster */\r
+ DWORD fptr; /* File R/W pointer */\r
+ DWORD fsize; /* File size */\r
+ DWORD org_clust; /* File start cluster */\r
+ DWORD curr_clust; /* Current cluster */\r
+ DWORD dsect; /* Current data sector */\r
+#if !_FS_READONLY\r
+ DWORD dir_sect; /* Sector containing the directory entry */\r
+ BYTE* dir_ptr; /* Ponter to the directory entry in the window */\r
+#endif\r
+#if !_FS_TINY\r
+ BYTE buf[_MAX_SS];/* File R/W buffer */\r
+#endif\r
+} FIL;\r
+\r
+\r
+\r
+/* File status structure */\r
+\r
+typedef struct _FILINFO_ {\r
+ DWORD fsize; /* File size */\r
+ WORD fdate; /* Last modified date */\r
+ WORD ftime; /* Last modified time */\r
+ BYTE fattrib; /* Attribute */\r
+ char fname[13]; /* Short file name (8.3 format) */\r
+#if _USE_LFN\r
+ XCHAR* lfname; /* Pointer to the LFN buffer */\r
+ int lfsize; /* Size of LFN buffer [chrs] */\r
+#endif\r
+} FILINFO;\r
+\r
+\r
+\r
+/* File function return code (FRESULT) */\r
+\r
+typedef enum {\r
+ FR_OK = 0, /* 0 */\r
+ FR_DISK_ERR, /* 1 */\r
+ FR_INT_ERR, /* 2 */\r
+ FR_NOT_READY, /* 3 */\r
+ FR_NO_FILE, /* 4 */\r
+ FR_NO_PATH, /* 5 */\r
+ FR_INVALID_NAME, /* 6 */\r
+ FR_DENIED, /* 7 */\r
+ FR_EXIST, /* 8 */\r
+ FR_INVALID_OBJECT, /* 9 */\r
+ FR_WRITE_PROTECTED, /* 10 */\r
+ FR_INVALID_DRIVE, /* 11 */\r
+ FR_NOT_ENABLED, /* 12 */\r
+ FR_NO_FILESYSTEM, /* 13 */\r
+ FR_MKFS_ABORTED, /* 14 */\r
+ FR_TIMEOUT /* 15 */\r
+} FRESULT;\r
+\r
+\r
+\r
+/*--------------------------------------------------------------*/\r
+/* FatFs module application interface */\r
+\r
+FRESULT f_mount (BYTE, FATFS*); /* Mount/Unmount a logical drive */\r
+FRESULT f_open (FIL*, const XCHAR*, BYTE); /* Open or create a file */\r
+FRESULT f_read (FIL*, void*, UINT, UINT*); /* Read data from a file */\r
+FRESULT f_write (FIL*, const void*, UINT, UINT*); /* Write data to a file */\r
+FRESULT f_lseek (FIL*, DWORD); /* Move file pointer of a file object */\r
+FRESULT f_close (FIL*); /* Close an open file object */\r
+FRESULT f_opendir (DIR*, const XCHAR*); /* Open an existing directory */\r
+FRESULT f_readdir (DIR*, FILINFO*); /* Read a directory item */\r
+FRESULT f_stat (const XCHAR*, FILINFO*); /* Get file status */\r
+FRESULT f_getfree (const XCHAR*, DWORD*, FATFS**); /* Get number of free clusters on the drive */\r
+FRESULT f_truncate (FIL*); /* Truncate file */\r
+FRESULT f_sync (FIL*); /* Flush cached data of a writing file */\r
+FRESULT f_unlink (const XCHAR*); /* Delete an existing file or directory */\r
+FRESULT f_mkdir (const XCHAR*); /* Create a new directory */\r
+FRESULT f_chmod (const XCHAR*, BYTE, BYTE); /* Change attriburte of the file/dir */\r
+FRESULT f_utime (const XCHAR*, const FILINFO*); /* Change timestamp of the file/dir */\r
+FRESULT f_rename (const XCHAR*, const XCHAR*); /* Rename/Move a file or directory */\r
+FRESULT f_forward (FIL*, UINT(*)(const BYTE*,UINT), UINT, UINT*); /* Forward data to the stream */\r
+FRESULT f_mkfs (BYTE, BYTE, WORD); /* Create a file system on the drive */\r
+FRESULT f_chdir (const XCHAR*); /* Change current directory */\r
+FRESULT f_chdrive (BYTE); /* Change current drive */\r
+\r
+#if _USE_STRFUNC\r
+int f_putc (int, FIL*); /* Put a character to the file */\r
+int f_puts (const char*, FIL*); /* Put a string to the file */\r
+int f_printf (FIL*, const char*, ...); /* Put a formatted string to the file */\r
+char* f_gets (char*, int, FIL*); /* Get a string from the file */\r
+#define f_eof(fp) (((fp)->fptr == (fp)->fsize) ? 1 : 0)\r
+#define f_error(fp) (((fp)->flag & FA__ERROR) ? 1 : 0)\r
+#ifndef EOF\r
+#define EOF -1\r
+#endif\r
+#endif\r
+\r
+\r
+\r
+/*--------------------------------------------------------------*/\r
+/* User defined functions */\r
+\r
+/* Real time clock */\r
+#if !_FS_READONLY\r
+DWORD get_fattime (void); /* 31-25: Year(0-127 org.1980), 24-21: Month(1-12), 20-16: Day(1-31) */\r
+ /* 15-11: Hour(0-23), 10-5: Minute(0-59), 4-0: Second(0-29 *2) */\r
+#endif\r
+\r
+/* Unicode - OEM code conversion */\r
+#if _USE_LFN\r
+WCHAR ff_convert (WCHAR, UINT);\r
+WCHAR ff_wtoupper (WCHAR);\r
+#endif\r
+\r
+/* Sync functions */\r
+#if _FS_REENTRANT\r
+BOOL ff_cre_syncobj(BYTE, _SYNC_t*);\r
+BOOL ff_del_syncobj(_SYNC_t);\r
+BOOL ff_req_grant(_SYNC_t);\r
+void ff_rel_grant(_SYNC_t);\r
+#endif\r
+\r
+\r
+\r
+/*--------------------------------------------------------------*/\r
+/* Flags and offset address */\r
+\r
+\r
+/* File access control and file status flags (FIL.flag) */\r
+\r
+#define FA_READ 0x01\r
+#define FA_OPEN_EXISTING 0x00\r
+#if _FS_READONLY == 0\r
+#define FA_WRITE 0x02\r
+#define FA_CREATE_NEW 0x04\r
+#define FA_CREATE_ALWAYS 0x08\r
+#define FA_OPEN_ALWAYS 0x10\r
+#define FA__WRITTEN 0x20\r
+#define FA__DIRTY 0x40\r
+#endif\r
+#define FA__ERROR 0x80\r
+\r
+\r
+/* FAT sub type (FATFS.fs_type) */\r
+\r
+#define FS_FAT12 1\r
+#define FS_FAT16 2\r
+#define FS_FAT32 3\r
+\r
+\r
+/* File attribute bits for directory entry */\r
+\r
+#define AM_RDO 0x01 /* Read only */\r
+#define AM_HID 0x02 /* Hidden */\r
+#define AM_SYS 0x04 /* System */\r
+#define AM_VOL 0x08 /* Volume label */\r
+#define AM_LFN 0x0F /* LFN entry */\r
+#define AM_DIR 0x10 /* Directory */\r
+#define AM_ARC 0x20 /* Archive */\r
+#define AM_MASK 0x3F /* Mask of defined bits */\r
+\r
+\r
+/* FatFs refers the members in the FAT structures with byte offset instead\r
+/ of structure member because there are incompatibility of the packing option\r
+/ between various compilers. */\r
+\r
+#define BS_jmpBoot 0\r
+#define BS_OEMName 3\r
+#define BPB_BytsPerSec 11\r
+#define BPB_SecPerClus 13\r
+#define BPB_RsvdSecCnt 14\r
+#define BPB_NumFATs 16\r
+#define BPB_RootEntCnt 17\r
+#define BPB_TotSec16 19\r
+#define BPB_Media 21\r
+#define BPB_FATSz16 22\r
+#define BPB_SecPerTrk 24\r
+#define BPB_NumHeads 26\r
+#define BPB_HiddSec 28\r
+#define BPB_TotSec32 32\r
+#define BS_55AA 510\r
+\r
+#define BS_DrvNum 36\r
+#define BS_BootSig 38\r
+#define BS_VolID 39\r
+#define BS_VolLab 43\r
+#define BS_FilSysType 54\r
+\r
+#define BPB_FATSz32 36\r
+#define BPB_ExtFlags 40\r
+#define BPB_FSVer 42\r
+#define BPB_RootClus 44\r
+#define BPB_FSInfo 48\r
+#define BPB_BkBootSec 50\r
+#define BS_DrvNum32 64\r
+#define BS_BootSig32 66\r
+#define BS_VolID32 67\r
+#define BS_VolLab32 71\r
+#define BS_FilSysType32 82\r
+\r
+#define FSI_LeadSig 0\r
+#define FSI_StrucSig 484\r
+#define FSI_Free_Count 488\r
+#define FSI_Nxt_Free 492\r
+\r
+#define MBR_Table 446\r
+\r
+#define DIR_Name 0\r
+#define DIR_Attr 11\r
+#define DIR_NTres 12\r
+#define DIR_CrtTime 14\r
+#define DIR_CrtDate 16\r
+#define DIR_FstClusHI 20\r
+#define DIR_WrtTime 22\r
+#define DIR_WrtDate 24\r
+#define DIR_FstClusLO 26\r
+#define DIR_FileSize 28\r
+#define LDIR_Ord 0\r
+#define LDIR_Attr 11\r
+#define LDIR_Type 12\r
+#define LDIR_Chksum 13\r
+#define LDIR_FstClusLO 26\r
+\r
+\r
+\r
+/*--------------------------------*/\r
+/* Multi-byte word access macros */\r
+\r
+#if _WORD_ACCESS == 1 /* Enable word access to the FAT structure */\r
+#define LD_WORD(ptr) (WORD)(*(WORD*)(BYTE*)(ptr))\r
+#define LD_DWORD(ptr) (DWORD)(*(DWORD*)(BYTE*)(ptr))\r
+#define ST_WORD(ptr,val) *(WORD*)(BYTE*)(ptr)=(WORD)(val)\r
+#define ST_DWORD(ptr,val) *(DWORD*)(BYTE*)(ptr)=(DWORD)(val)\r
+#else /* Use byte-by-byte access to the FAT structure */\r
+#define LD_WORD(ptr) (WORD)(((WORD)*(BYTE*)((ptr)+1)<<8)|(WORD)*(BYTE*)(ptr))\r
+#define LD_DWORD(ptr) (DWORD)(((DWORD)*(BYTE*)((ptr)+3)<<24)|((DWORD)*(BYTE*)((ptr)+2)<<16)|((WORD)*(BYTE*)((ptr)+1)<<8)|*(BYTE*)(ptr))\r
+#define ST_WORD(ptr,val) *(BYTE*)(ptr)=(BYTE)(val); *(BYTE*)((ptr)+1)=(BYTE)((WORD)(val)>>8)\r
+#define ST_DWORD(ptr,val) *(BYTE*)(ptr)=(BYTE)(val); *(BYTE*)((ptr)+1)=(BYTE)((WORD)(val)>>8); *(BYTE*)((ptr)+2)=(BYTE)((DWORD)(val)>>16); *(BYTE*)((ptr)+3)=(BYTE)((DWORD)(val)>>24)\r
+#endif\r
+\r
+\r
+#endif /* _FATFS */\r
--- /dev/null
+ 1 .file "ff.c"\r
+ 2 __SREG__ = 0x3f\r
+ 3 __SP_H__ = 0x3e\r
+ 4 __SP_L__ = 0x3d\r
+ 5 __CCP__ = 0x34\r
+ 6 __tmp_reg__ = 0\r
+ 7 __zero_reg__ = 1\r
+ 15 .Ltext0:\r
+ 16 .section .text.mem_cpy,"ax",@progbits\r
+ 18 mem_cpy:\r
+ 19 .LFB52:\r
+ 20 .LSM0:\r
+ 21 .LVL0:\r
+ 22 0000 CF93 push r28\r
+ 23 0002 DF93 push r29\r
+ 24 /* prologue: function */\r
+ 25 /* frame size = 0 */\r
+ 26 0004 EC01 movw r28,r24\r
+ 27 .LSM1:\r
+ 28 0006 20E0 ldi r18,lo8(0)\r
+ 29 0008 30E0 ldi r19,hi8(0)\r
+ 30 000a 00C0 rjmp .L2\r
+ 31 .LVL1:\r
+ 32 .L3:\r
+ 33 .LSM2:\r
+ 34 000c FE01 movw r30,r28\r
+ 35 000e E20F add r30,r18\r
+ 36 0010 F31F adc r31,r19\r
+ 37 0012 DB01 movw r26,r22\r
+ 38 0014 A20F add r26,r18\r
+ 39 0016 B31F adc r27,r19\r
+ 40 0018 8C91 ld r24,X\r
+ 41 001a 8083 st Z,r24\r
+ 42 001c 2F5F subi r18,lo8(-(1))\r
+ 43 001e 3F4F sbci r19,hi8(-(1))\r
+ 44 .LVL2:\r
+ 45 .L2:\r
+ 46 0020 4150 subi r20,lo8(-(-1))\r
+ 47 0022 5040 sbci r21,hi8(-(-1))\r
+ 48 0024 8FEF ldi r24,hi8(-1)\r
+ 49 0026 4F3F cpi r20,lo8(-1)\r
+ 50 0028 5807 cpc r21,r24\r
+ 51 002a 01F4 brne .L3\r
+ 52 /* epilogue start */\r
+ 53 .LSM3:\r
+ 54 002c DF91 pop r29\r
+ 55 002e CF91 pop r28\r
+ 56 .LVL3:\r
+ 57 0030 0895 ret\r
+ 58 .LFE52:\r
+ 60 .section .text.mem_set,"ax",@progbits\r
+ 62 mem_set:\r
+ 63 .LFB53:\r
+ 64 .LSM4:\r
+ 65 .LVL4:\r
+ 66 /* prologue: function */\r
+ 67 /* frame size = 0 */\r
+ 68 .LSM5:\r
+ 69 0000 FC01 movw r30,r24\r
+ 70 .LVL5:\r
+ 71 0002 00C0 rjmp .L6\r
+ 72 .LVL6:\r
+ 73 .L7:\r
+ 74 .LSM6:\r
+ 75 0004 6193 st Z+,r22\r
+ 76 .LVL7:\r
+ 77 .L6:\r
+ 78 0006 4150 subi r20,lo8(-(-1))\r
+ 79 0008 5040 sbci r21,hi8(-(-1))\r
+ 80 000a 8FEF ldi r24,hi8(-1)\r
+ 81 000c 4F3F cpi r20,lo8(-1)\r
+ 82 000e 5807 cpc r21,r24\r
+ 83 .LVL8:\r
+ 84 0010 01F4 brne .L7\r
+ 85 /* epilogue start */\r
+ 86 .LSM7:\r
+ 87 0012 0895 ret\r
+ 88 .LFE53:\r
+ 90 .section .text.clust2sect,"ax",@progbits\r
+ 91 .global clust2sect\r
+ 93 clust2sect:\r
+ 94 .LFB62:\r
+ 95 .LSM8:\r
+ 96 .LVL9:\r
+ 97 0000 EF92 push r14\r
+ 98 0002 FF92 push r15\r
+ 99 0004 0F93 push r16\r
+ 100 0006 1F93 push r17\r
+ 101 0008 CF93 push r28\r
+ 102 000a DF93 push r29\r
+ 103 /* prologue: function */\r
+ 104 /* frame size = 0 */\r
+ 105 000c EC01 movw r28,r24\r
+ 106 000e 7A01 movw r14,r20\r
+ 107 0010 8B01 movw r16,r22\r
+ 108 .LSM9:\r
+ 109 0012 8EEF ldi r24,lo8(-2)\r
+ 110 0014 9FEF ldi r25,hi8(-2)\r
+ 111 0016 AFEF ldi r26,hlo8(-2)\r
+ 112 0018 BFEF ldi r27,hhi8(-2)\r
+ 113 .LVL10:\r
+ 114 001a E80E add r14,r24\r
+ 115 001c F91E adc r15,r25\r
+ 116 001e 0A1F adc r16,r26\r
+ 117 0020 1B1F adc r17,r27\r
+ 118 .LVL11:\r
+ 119 .LSM10:\r
+ 120 0022 8A8D ldd r24,Y+26\r
+ 121 0024 9B8D ldd r25,Y+27\r
+ 122 0026 AC8D ldd r26,Y+28\r
+ 123 0028 BD8D ldd r27,Y+29\r
+ 124 002a 0297 sbiw r24,2\r
+ 125 002c A109 sbc r26,__zero_reg__\r
+ 126 002e B109 sbc r27,__zero_reg__\r
+ 127 0030 E816 cp r14,r24\r
+ 128 0032 F906 cpc r15,r25\r
+ 129 0034 0A07 cpc r16,r26\r
+ 130 0036 1B07 cpc r17,r27\r
+ 131 0038 00F0 brlo .L10\r
+ 132 003a 20E0 ldi r18,lo8(0)\r
+ 133 003c 30E0 ldi r19,hi8(0)\r
+ 134 003e 40E0 ldi r20,hlo8(0)\r
+ 135 0040 50E0 ldi r21,hhi8(0)\r
+ 136 0042 00C0 rjmp .L11\r
+ 137 .L10:\r
+ 138 .LSM11:\r
+ 139 0044 2A81 ldd r18,Y+2\r
+ 140 0046 30E0 ldi r19,lo8(0)\r
+ 141 0048 40E0 ldi r20,lo8(0)\r
+ 142 004a 50E0 ldi r21,hi8(0)\r
+ 143 004c C801 movw r24,r16\r
+ 144 004e B701 movw r22,r14\r
+ 145 0050 0E94 0000 call __mulsi3\r
+ 146 0054 9B01 movw r18,r22\r
+ 147 0056 AC01 movw r20,r24\r
+ 148 0058 8EA1 ldd r24,Y+38\r
+ 149 005a 9FA1 ldd r25,Y+39\r
+ 150 005c A8A5 ldd r26,Y+40\r
+ 151 005e B9A5 ldd r27,Y+41\r
+ 152 0060 280F add r18,r24\r
+ 153 0062 391F adc r19,r25\r
+ 154 0064 4A1F adc r20,r26\r
+ 155 0066 5B1F adc r21,r27\r
+ 156 .L11:\r
+ 157 .LSM12:\r
+ 158 0068 B901 movw r22,r18\r
+ 159 006a CA01 movw r24,r20\r
+ 160 /* epilogue start */\r
+ 161 006c DF91 pop r29\r
+ 162 006e CF91 pop r28\r
+ 163 .LVL12:\r
+ 164 0070 1F91 pop r17\r
+ 165 0072 0F91 pop r16\r
+ 166 0074 FF90 pop r15\r
+ 167 0076 EF90 pop r14\r
+ 168 .LVL13:\r
+ 169 0078 0895 ret\r
+ 170 .LFE62:\r
+ 172 .section .text.f_mount,"ax",@progbits\r
+ 173 .global f_mount\r
+ 175 f_mount:\r
+ 176 .LFB72:\r
+ 177 .LSM13:\r
+ 178 .LVL14:\r
+ 179 /* prologue: function */\r
+ 180 /* frame size = 0 */\r
+ 181 0000 DB01 movw r26,r22\r
+ 182 .LSM14:\r
+ 183 0002 8823 tst r24\r
+ 184 0004 01F0 breq .L14\r
+ 185 .LVL15:\r
+ 186 0006 8BE0 ldi r24,lo8(11)\r
+ 187 .LVL16:\r
+ 188 0008 0895 ret\r
+ 189 .LVL17:\r
+ 190 .L14:\r
+ 191 .LSM15:\r
+ 192 000a E091 0000 lds r30,FatFs\r
+ 193 000e F091 0000 lds r31,(FatFs)+1\r
+ 194 .LVL18:\r
+ 195 .LSM16:\r
+ 196 0012 3097 sbiw r30,0\r
+ 197 0014 01F0 breq .L16\r
+ 198 .LSM17:\r
+ 199 0016 1082 st Z,__zero_reg__\r
+ 200 .L16:\r
+ 201 .LSM18:\r
+ 202 0018 1097 sbiw r26,0\r
+ 203 001a 01F0 breq .L17\r
+ 204 .LSM19:\r
+ 205 001c 1C92 st X,__zero_reg__\r
+ 206 .L17:\r
+ 207 .LSM20:\r
+ 208 001e B093 0000 sts (FatFs)+1,r27\r
+ 209 0022 A093 0000 sts FatFs,r26\r
+ 210 0026 80E0 ldi r24,lo8(0)\r
+ 211 .LVL19:\r
+ 212 .LSM21:\r
+ 213 0028 0895 ret\r
+ 214 .LFE72:\r
+ 216 .section .text.validate,"ax",@progbits\r
+ 218 validate:\r
+ 219 .LFB71:\r
+ 220 .LSM22:\r
+ 221 .LVL20:\r
+ 222 /* prologue: function */\r
+ 223 /* frame size = 0 */\r
+ 224 0000 FC01 movw r30,r24\r
+ 225 .LSM23:\r
+ 226 0002 0097 sbiw r24,0\r
+ 227 0004 01F0 breq .L20\r
+ 228 0006 8081 ld r24,Z\r
+ 229 .LVL21:\r
+ 230 0008 8823 tst r24\r
+ 231 000a 01F0 breq .L20\r
+ 232 000c 8681 ldd r24,Z+6\r
+ 233 000e 9781 ldd r25,Z+7\r
+ 234 0010 8617 cp r24,r22\r
+ 235 0012 9707 cpc r25,r23\r
+ 236 0014 01F4 brne .L20\r
+ 237 .LSM24:\r
+ 238 0016 8181 ldd r24,Z+1\r
+ 239 0018 0E94 0000 call disk_status\r
+ 240 .LVL22:\r
+ 241 001c 80FD sbrc r24,0\r
+ 242 001e 00C0 rjmp .L21\r
+ 243 0020 80E0 ldi r24,lo8(0)\r
+ 244 0022 0895 ret\r
+ 245 .L21:\r
+ 246 0024 83E0 ldi r24,lo8(3)\r
+ 247 0026 0895 ret\r
+ 248 .LVL23:\r
+ 249 .L20:\r
+ 250 0028 89E0 ldi r24,lo8(9)\r
+ 251 .LSM25:\r
+ 252 002a 0895 ret\r
+ 253 .LFE71:\r
+ 255 .section .text.move_window,"ax",@progbits\r
+ 257 move_window:\r
+ 258 .LFB56:\r
+ 259 .LSM26:\r
+ 260 .LVL24:\r
+ 261 0000 6F92 push r6\r
+ 262 0002 7F92 push r7\r
+ 263 0004 8F92 push r8\r
+ 264 0006 9F92 push r9\r
+ 265 0008 AF92 push r10\r
+ 266 000a BF92 push r11\r
+ 267 000c CF92 push r12\r
+ 268 000e DF92 push r13\r
+ 269 0010 EF92 push r14\r
+ 270 0012 FF92 push r15\r
+ 271 0014 0F93 push r16\r
+ 272 0016 1F93 push r17\r
+ 273 0018 CF93 push r28\r
+ 274 001a DF93 push r29\r
+ 275 /* prologue: function */\r
+ 276 /* frame size = 0 */\r
+ 277 001c EC01 movw r28,r24\r
+ 278 001e 4A01 movw r8,r20\r
+ 279 0020 5B01 movw r10,r22\r
+ 280 .LSM27:\r
+ 281 0022 CAA4 ldd r12,Y+42\r
+ 282 0024 DBA4 ldd r13,Y+43\r
+ 283 0026 ECA4 ldd r14,Y+44\r
+ 284 0028 FDA4 ldd r15,Y+45\r
+ 285 .LVL25:\r
+ 286 .LSM28:\r
+ 287 002a C416 cp r12,r20\r
+ 288 002c D506 cpc r13,r21\r
+ 289 002e E606 cpc r14,r22\r
+ 290 0030 F706 cpc r15,r23\r
+ 291 0032 01F4 brne .+2\r
+ 292 0034 00C0 rjmp .L25\r
+ 293 .LVL26:\r
+ 294 .LSM29:\r
+ 295 0036 8C81 ldd r24,Y+4\r
+ 296 0038 8823 tst r24\r
+ 297 003a 01F0 breq .L26\r
+ 298 .LSM30:\r
+ 299 003c 8EE2 ldi r24,lo8(46)\r
+ 300 003e 682E mov r6,r24\r
+ 301 0040 712C mov r7,__zero_reg__\r
+ 302 0042 6C0E add r6,r28\r
+ 303 0044 7D1E adc r7,r29\r
+ 304 0046 8981 ldd r24,Y+1\r
+ 305 0048 B301 movw r22,r6\r
+ 306 004a A701 movw r20,r14\r
+ 307 004c 9601 movw r18,r12\r
+ 308 004e 01E0 ldi r16,lo8(1)\r
+ 309 0050 0E94 0000 call disk_write\r
+ 310 .LVL27:\r
+ 311 0054 8823 tst r24\r
+ 312 0056 01F4 brne .L27\r
+ 313 .LSM31:\r
+ 314 0058 1C82 std Y+4,__zero_reg__\r
+ 315 .LSM32:\r
+ 316 005a 8E89 ldd r24,Y+22\r
+ 317 005c 9F89 ldd r25,Y+23\r
+ 318 005e A88D ldd r26,Y+24\r
+ 319 0060 B98D ldd r27,Y+25\r
+ 320 0062 2E8D ldd r18,Y+30\r
+ 321 0064 3F8D ldd r19,Y+31\r
+ 322 0066 48A1 ldd r20,Y+32\r
+ 323 0068 59A1 ldd r21,Y+33\r
+ 324 006a 820F add r24,r18\r
+ 325 006c 931F adc r25,r19\r
+ 326 006e A41F adc r26,r20\r
+ 327 0070 B51F adc r27,r21\r
+ 328 0072 C816 cp r12,r24\r
+ 329 0074 D906 cpc r13,r25\r
+ 330 0076 EA06 cpc r14,r26\r
+ 331 0078 FB06 cpc r15,r27\r
+ 332 007a 00F4 brsh .L26\r
+ 333 .LBB2:\r
+ 334 .LSM33:\r
+ 335 007c 1B81 ldd r17,Y+3\r
+ 336 .LVL28:\r
+ 337 007e 00C0 rjmp .L28\r
+ 338 .L29:\r
+ 339 .LSM34:\r
+ 340 0080 8E89 ldd r24,Y+22\r
+ 341 0082 9F89 ldd r25,Y+23\r
+ 342 0084 A88D ldd r26,Y+24\r
+ 343 0086 B98D ldd r27,Y+25\r
+ 344 0088 C80E add r12,r24\r
+ 345 008a D91E adc r13,r25\r
+ 346 008c EA1E adc r14,r26\r
+ 347 008e FB1E adc r15,r27\r
+ 348 .LSM35:\r
+ 349 0090 8981 ldd r24,Y+1\r
+ 350 0092 B301 movw r22,r6\r
+ 351 0094 A701 movw r20,r14\r
+ 352 0096 9601 movw r18,r12\r
+ 353 0098 01E0 ldi r16,lo8(1)\r
+ 354 009a 0E94 0000 call disk_write\r
+ 355 .LSM36:\r
+ 356 009e 1150 subi r17,lo8(-(-1))\r
+ 357 .L28:\r
+ 358 00a0 1230 cpi r17,lo8(2)\r
+ 359 00a2 00F4 brsh .L29\r
+ 360 .LVL29:\r
+ 361 .L26:\r
+ 362 .LBE2:\r
+ 363 .LSM37:\r
+ 364 00a4 8114 cp r8,__zero_reg__\r
+ 365 00a6 9104 cpc r9,__zero_reg__\r
+ 366 00a8 A104 cpc r10,__zero_reg__\r
+ 367 00aa B104 cpc r11,__zero_reg__\r
+ 368 00ac 01F0 breq .L25\r
+ 369 .LSM38:\r
+ 370 00ae BE01 movw r22,r28\r
+ 371 00b0 625D subi r22,lo8(-(46))\r
+ 372 00b2 7F4F sbci r23,hi8(-(46))\r
+ 373 00b4 8981 ldd r24,Y+1\r
+ 374 00b6 A501 movw r20,r10\r
+ 375 00b8 9401 movw r18,r8\r
+ 376 00ba 01E0 ldi r16,lo8(1)\r
+ 377 00bc 0E94 0000 call disk_read\r
+ 378 00c0 8823 tst r24\r
+ 379 00c2 01F4 brne .L27\r
+ 380 .LSM39:\r
+ 381 00c4 8AA6 std Y+42,r8\r
+ 382 00c6 9BA6 std Y+43,r9\r
+ 383 00c8 ACA6 std Y+44,r10\r
+ 384 00ca BDA6 std Y+45,r11\r
+ 385 00cc 00C0 rjmp .L30\r
+ 386 .L27:\r
+ 387 00ce 81E0 ldi r24,lo8(1)\r
+ 388 00d0 00C0 rjmp .L30\r
+ 389 .LVL30:\r
+ 390 .L25:\r
+ 391 00d2 80E0 ldi r24,lo8(0)\r
+ 392 .LVL31:\r
+ 393 .L30:\r
+ 394 /* epilogue start */\r
+ 395 .LSM40:\r
+ 396 00d4 DF91 pop r29\r
+ 397 00d6 CF91 pop r28\r
+ 398 .LVL32:\r
+ 399 00d8 1F91 pop r17\r
+ 400 .LVL33:\r
+ 401 00da 0F91 pop r16\r
+ 402 00dc FF90 pop r15\r
+ 403 00de EF90 pop r14\r
+ 404 00e0 DF90 pop r13\r
+ 405 00e2 CF90 pop r12\r
+ 406 .LVL34:\r
+ 407 00e4 BF90 pop r11\r
+ 408 00e6 AF90 pop r10\r
+ 409 00e8 9F90 pop r9\r
+ 410 00ea 8F90 pop r8\r
+ 411 .LVL35:\r
+ 412 00ec 7F90 pop r7\r
+ 413 00ee 6F90 pop r6\r
+ 414 00f0 0895 ret\r
+ 415 .LFE56:\r
+ 417 .section .text.put_fat,"ax",@progbits\r
+ 418 .global put_fat\r
+ 420 put_fat:\r
+ 421 .LFB59:\r
+ 422 .LSM41:\r
+ 423 .LVL36:\r
+ 424 0000 2F92 push r2\r
+ 425 0002 3F92 push r3\r
+ 426 0004 4F92 push r4\r
+ 427 0006 5F92 push r5\r
+ 428 0008 6F92 push r6\r
+ 429 000a 7F92 push r7\r
+ 430 000c 8F92 push r8\r
+ 431 000e 9F92 push r9\r
+ 432 0010 AF92 push r10\r
+ 433 0012 BF92 push r11\r
+ 434 0014 CF92 push r12\r
+ 435 0016 DF92 push r13\r
+ 436 0018 EF92 push r14\r
+ 437 001a FF92 push r15\r
+ 438 001c 0F93 push r16\r
+ 439 .LVL37:\r
+ 440 001e 1F93 push r17\r
+ 441 0020 CF93 push r28\r
+ 442 0022 DF93 push r29\r
+ 443 /* prologue: function */\r
+ 444 /* frame size = 0 */\r
+ 445 0024 3C01 movw r6,r24\r
+ 446 0026 6A01 movw r12,r20\r
+ 447 0028 7B01 movw r14,r22\r
+ 448 002a 4801 movw r8,r16\r
+ 449 002c 5901 movw r10,r18\r
+ 450 .LVL38:\r
+ 451 .LSM42:\r
+ 452 002e 4230 cpi r20,lo8(2)\r
+ 453 0030 5105 cpc r21,__zero_reg__\r
+ 454 0032 6105 cpc r22,__zero_reg__\r
+ 455 0034 7105 cpc r23,__zero_reg__\r
+ 456 .LVL39:\r
+ 457 0036 00F4 brsh .+2\r
+ 458 0038 00C0 rjmp .L33\r
+ 459 .LVL40:\r
+ 460 003a F301 movw r30,r6\r
+ 461 003c 828D ldd r24,Z+26\r
+ 462 003e 938D ldd r25,Z+27\r
+ 463 0040 A48D ldd r26,Z+28\r
+ 464 0042 B58D ldd r27,Z+29\r
+ 465 0044 4817 cp r20,r24\r
+ 466 0046 5907 cpc r21,r25\r
+ 467 0048 6A07 cpc r22,r26\r
+ 468 004a 7B07 cpc r23,r27\r
+ 469 004c 00F0 brlo .+2\r
+ 470 004e 00C0 rjmp .L33\r
+ 471 .LSM43:\r
+ 472 0050 268C ldd r2,Z+30\r
+ 473 0052 378C ldd r3,Z+31\r
+ 474 0054 40A0 ldd r4,Z+32\r
+ 475 0056 51A0 ldd r5,Z+33\r
+ 476 .LVL41:\r
+ 477 .LSM44:\r
+ 478 0058 8081 ld r24,Z\r
+ 479 005a 8230 cpi r24,lo8(2)\r
+ 480 005c 01F4 brne .+2\r
+ 481 005e 00C0 rjmp .L36\r
+ 482 0060 8330 cpi r24,lo8(3)\r
+ 483 0062 01F4 brne .+2\r
+ 484 0064 00C0 rjmp .L37\r
+ 485 0066 8130 cpi r24,lo8(1)\r
+ 486 0068 01F0 breq .L35\r
+ 487 006a 22E0 ldi r18,lo8(2)\r
+ 488 .LVL42:\r
+ 489 006c 00C0 rjmp .L38\r
+ 490 .LVL43:\r
+ 491 .L35:\r
+ 492 .LSM45:\r
+ 493 006e EA01 movw r28,r20\r
+ 494 .LVL44:\r
+ 495 0070 D695 lsr r29\r
+ 496 0072 C795 ror r28\r
+ 497 .LVL45:\r
+ 498 0074 C40F add r28,r20\r
+ 499 0076 D51F adc r29,r21\r
+ 500 .LSM46:\r
+ 501 0078 AE01 movw r20,r28\r
+ 502 .LVL46:\r
+ 503 007a 452F mov r20,r21\r
+ 504 007c 5527 clr r21\r
+ 505 007e 4695 lsr r20\r
+ 506 0080 60E0 ldi r22,lo8(0)\r
+ 507 0082 70E0 ldi r23,hi8(0)\r
+ 508 0084 420D add r20,r2\r
+ 509 0086 531D adc r21,r3\r
+ 510 0088 641D adc r22,r4\r
+ 511 008a 751D adc r23,r5\r
+ 512 008c C301 movw r24,r6\r
+ 513 008e 0E94 0000 call move_window\r
+ 514 0092 282F mov r18,r24\r
+ 515 .LVL47:\r
+ 516 .LSM47:\r
+ 517 0094 8823 tst r24\r
+ 518 0096 01F0 breq .+2\r
+ 519 0098 00C0 rjmp .L38\r
+ 520 .LVL48:\r
+ 521 .LSM48:\r
+ 522 009a DE01 movw r26,r28\r
+ 523 009c B170 andi r27,hi8(511)\r
+ 524 .LSM49:\r
+ 525 009e 8601 movw r16,r12\r
+ 526 .LVL49:\r
+ 527 00a0 0170 andi r16,lo8(1)\r
+ 528 00a2 1070 andi r17,hi8(1)\r
+ 529 00a4 0115 cp r16,__zero_reg__\r
+ 530 00a6 1105 cpc r17,__zero_reg__\r
+ 531 00a8 01F0 breq .L39\r
+ 532 00aa F301 movw r30,r6\r
+ 533 00ac EA0F add r30,r26\r
+ 534 00ae FB1F adc r31,r27\r
+ 535 00b0 86A5 ldd r24,Z+46\r
+ 536 .LVL50:\r
+ 537 00b2 8F70 andi r24,lo8(15)\r
+ 538 00b4 982D mov r25,r8\r
+ 539 .LVL51:\r
+ 540 00b6 9295 swap r25\r
+ 541 00b8 907F andi r25,lo8(-16)\r
+ 542 00ba 982B or r25,r24\r
+ 543 00bc 00C0 rjmp .L40\r
+ 544 .LVL52:\r
+ 545 .L39:\r
+ 546 00be 982D mov r25,r8\r
+ 547 .LVL53:\r
+ 548 .L40:\r
+ 549 00c0 A60D add r26,r6\r
+ 550 00c2 B71D adc r27,r7\r
+ 551 00c4 9E96 adiw r26,46\r
+ 552 00c6 9C93 st X,r25\r
+ 553 .LSM50:\r
+ 554 00c8 2196 adiw r28,1\r
+ 555 .LVL54:\r
+ 556 .LSM51:\r
+ 557 00ca 81E0 ldi r24,lo8(1)\r
+ 558 00cc F301 movw r30,r6\r
+ 559 00ce 8483 std Z+4,r24\r
+ 560 .LSM52:\r
+ 561 00d0 AE01 movw r20,r28\r
+ 562 00d2 452F mov r20,r21\r
+ 563 00d4 5527 clr r21\r
+ 564 00d6 4695 lsr r20\r
+ 565 00d8 60E0 ldi r22,lo8(0)\r
+ 566 00da 70E0 ldi r23,hi8(0)\r
+ 567 00dc 420D add r20,r2\r
+ 568 00de 531D adc r21,r3\r
+ 569 00e0 641D adc r22,r4\r
+ 570 00e2 751D adc r23,r5\r
+ 571 00e4 C301 movw r24,r6\r
+ 572 00e6 0E94 0000 call move_window\r
+ 573 .LVL55:\r
+ 574 00ea 282F mov r18,r24\r
+ 575 .LVL56:\r
+ 576 .LSM53:\r
+ 577 00ec 8823 tst r24\r
+ 578 00ee 01F0 breq .+2\r
+ 579 00f0 00C0 rjmp .L38\r
+ 580 .LVL57:\r
+ 581 .LSM54:\r
+ 582 00f2 D170 andi r29,hi8(511)\r
+ 583 .LVL58:\r
+ 584 .LSM55:\r
+ 585 00f4 012B or r16,r17\r
+ 586 00f6 01F0 breq .L41\r
+ 587 00f8 84E0 ldi r24,4\r
+ 588 00fa B694 1: lsr r11\r
+ 589 00fc A794 ror r10\r
+ 590 00fe 9794 ror r9\r
+ 591 0100 8794 ror r8\r
+ 592 0102 8A95 dec r24\r
+ 593 0104 01F4 brne 1b\r
+ 594 .LVL59:\r
+ 595 0106 482D mov r20,r8\r
+ 596 0108 00C0 rjmp .L42\r
+ 597 .LVL60:\r
+ 598 .L41:\r
+ 599 010a F301 movw r30,r6\r
+ 600 010c EC0F add r30,r28\r
+ 601 010e FD1F adc r31,r29\r
+ 602 0110 46A5 ldd r20,Z+46\r
+ 603 0112 407F andi r20,lo8(-16)\r
+ 604 0114 BB27 clr r27\r
+ 605 0116 AB2D mov r26,r11\r
+ 606 0118 9A2D mov r25,r10\r
+ 607 011a 892D mov r24,r9\r
+ 608 .LVL61:\r
+ 609 011c 8F70 andi r24,lo8(15)\r
+ 610 011e 482B or r20,r24\r
+ 611 .L42:\r
+ 612 0120 C60D add r28,r6\r
+ 613 0122 D71D adc r29,r7\r
+ 614 0124 4EA7 std Y+46,r20\r
+ 615 0126 00C0 rjmp .L38\r
+ 616 .LVL62:\r
+ 617 .L36:\r
+ 618 .LSM56:\r
+ 619 0128 452F mov r20,r21\r
+ 620 012a 562F mov r21,r22\r
+ 621 012c 672F mov r22,r23\r
+ 622 012e 7727 clr r23\r
+ 623 .LVL63:\r
+ 624 0130 420D add r20,r2\r
+ 625 0132 531D adc r21,r3\r
+ 626 0134 641D adc r22,r4\r
+ 627 0136 751D adc r23,r5\r
+ 628 0138 C301 movw r24,r6\r
+ 629 013a 0E94 0000 call move_window\r
+ 630 013e 282F mov r18,r24\r
+ 631 .LVL64:\r
+ 632 .LSM57:\r
+ 633 0140 8823 tst r24\r
+ 634 0142 01F4 brne .L38\r
+ 635 .LVL65:\r
+ 636 .LSM58:\r
+ 637 0144 F601 movw r30,r12\r
+ 638 .LVL66:\r
+ 639 0146 EE0F lsl r30\r
+ 640 0148 FF1F rol r31\r
+ 641 014a F170 andi r31,hi8(511)\r
+ 642 014c E60D add r30,r6\r
+ 643 014e F71D adc r31,r7\r
+ 644 0150 86A6 std Z+46,r8\r
+ 645 0152 892D mov r24,r9\r
+ 646 0154 9927 clr r25\r
+ 647 .LVL67:\r
+ 648 0156 87A7 std Z+47,r24\r
+ 649 0158 00C0 rjmp .L38\r
+ 650 .LVL68:\r
+ 651 .L37:\r
+ 652 .LSM59:\r
+ 653 015a E7E0 ldi r30,7\r
+ 654 015c 7695 1: lsr r23\r
+ 655 015e 6795 ror r22\r
+ 656 0160 5795 ror r21\r
+ 657 0162 4795 ror r20\r
+ 658 0164 EA95 dec r30\r
+ 659 0166 01F4 brne 1b\r
+ 660 .LVL69:\r
+ 661 0168 420D add r20,r2\r
+ 662 016a 531D adc r21,r3\r
+ 663 016c 641D adc r22,r4\r
+ 664 016e 751D adc r23,r5\r
+ 665 0170 C301 movw r24,r6\r
+ 666 0172 0E94 0000 call move_window\r
+ 667 0176 282F mov r18,r24\r
+ 668 .LVL70:\r
+ 669 .LSM60:\r
+ 670 0178 8823 tst r24\r
+ 671 017a 01F4 brne .L38\r
+ 672 .LVL71:\r
+ 673 .LSM61:\r
+ 674 017c F601 movw r30,r12\r
+ 675 .LVL72:\r
+ 676 017e EE0F lsl r30\r
+ 677 0180 FF1F rol r31\r
+ 678 0182 EE0F lsl r30\r
+ 679 0184 FF1F rol r31\r
+ 680 0186 F170 andi r31,hi8(511)\r
+ 681 0188 E60D add r30,r6\r
+ 682 018a F71D adc r31,r7\r
+ 683 018c 86A6 std Z+46,r8\r
+ 684 018e 892D mov r24,r9\r
+ 685 0190 9927 clr r25\r
+ 686 .LVL73:\r
+ 687 0192 87A7 std Z+47,r24\r
+ 688 0194 C501 movw r24,r10\r
+ 689 0196 AA27 clr r26\r
+ 690 0198 BB27 clr r27\r
+ 691 019a 80AB std Z+48,r24\r
+ 692 019c 8B2D mov r24,r11\r
+ 693 019e 9927 clr r25\r
+ 694 01a0 AA27 clr r26\r
+ 695 01a2 BB27 clr r27\r
+ 696 01a4 81AB std Z+49,r24\r
+ 697 .LVL74:\r
+ 698 .L38:\r
+ 699 .LSM62:\r
+ 700 01a6 81E0 ldi r24,lo8(1)\r
+ 701 01a8 F301 movw r30,r6\r
+ 702 01aa 8483 std Z+4,r24\r
+ 703 01ac 00C0 rjmp .L43\r
+ 704 .LVL75:\r
+ 705 .L33:\r
+ 706 01ae 22E0 ldi r18,lo8(2)\r
+ 707 .LVL76:\r
+ 708 .L43:\r
+ 709 .LSM63:\r
+ 710 01b0 822F mov r24,r18\r
+ 711 /* epilogue start */\r
+ 712 01b2 DF91 pop r29\r
+ 713 01b4 CF91 pop r28\r
+ 714 .LVL77:\r
+ 715 01b6 1F91 pop r17\r
+ 716 01b8 0F91 pop r16\r
+ 717 01ba FF90 pop r15\r
+ 718 01bc EF90 pop r14\r
+ 719 01be DF90 pop r13\r
+ 720 01c0 CF90 pop r12\r
+ 721 01c2 BF90 pop r11\r
+ 722 01c4 AF90 pop r10\r
+ 723 01c6 9F90 pop r9\r
+ 724 01c8 8F90 pop r8\r
+ 725 .LVL78:\r
+ 726 01ca 7F90 pop r7\r
+ 727 01cc 6F90 pop r6\r
+ 728 .LVL79:\r
+ 729 01ce 5F90 pop r5\r
+ 730 01d0 4F90 pop r4\r
+ 731 01d2 3F90 pop r3\r
+ 732 01d4 2F90 pop r2\r
+ 733 .LVL80:\r
+ 734 01d6 0895 ret\r
+ 735 .LFE59:\r
+ 737 .section .text.get_fat,"ax",@progbits\r
+ 738 .global get_fat\r
+ 740 get_fat:\r
+ 741 .LFB58:\r
+ 742 .LSM64:\r
+ 743 .LVL81:\r
+ 744 0000 7F92 push r7\r
+ 745 0002 8F92 push r8\r
+ 746 0004 9F92 push r9\r
+ 747 0006 AF92 push r10\r
+ 748 0008 BF92 push r11\r
+ 749 000a CF92 push r12\r
+ 750 000c DF92 push r13\r
+ 751 000e EF92 push r14\r
+ 752 0010 FF92 push r15\r
+ 753 0012 0F93 push r16\r
+ 754 0014 1F93 push r17\r
+ 755 0016 CF93 push r28\r
+ 756 0018 DF93 push r29\r
+ 757 /* prologue: function */\r
+ 758 /* frame size = 0 */\r
+ 759 001a 4C01 movw r8,r24\r
+ 760 001c 7A01 movw r14,r20\r
+ 761 001e 8B01 movw r16,r22\r
+ 762 .LSM65:\r
+ 763 0020 4230 cpi r20,lo8(2)\r
+ 764 0022 5105 cpc r21,__zero_reg__\r
+ 765 0024 6105 cpc r22,__zero_reg__\r
+ 766 0026 7105 cpc r23,__zero_reg__\r
+ 767 .LVL82:\r
+ 768 0028 00F4 brsh .+2\r
+ 769 002a 00C0 rjmp .L46\r
+ 770 002c F401 movw r30,r8\r
+ 771 002e 828D ldd r24,Z+26\r
+ 772 0030 938D ldd r25,Z+27\r
+ 773 0032 A48D ldd r26,Z+28\r
+ 774 0034 B58D ldd r27,Z+29\r
+ 775 0036 4817 cp r20,r24\r
+ 776 0038 5907 cpc r21,r25\r
+ 777 003a 6A07 cpc r22,r26\r
+ 778 003c 7B07 cpc r23,r27\r
+ 779 003e 00F0 brlo .+2\r
+ 780 0040 00C0 rjmp .L46\r
+ 781 .LSM66:\r
+ 782 0042 A68C ldd r10,Z+30\r
+ 783 0044 B78C ldd r11,Z+31\r
+ 784 0046 C0A0 ldd r12,Z+32\r
+ 785 0048 D1A0 ldd r13,Z+33\r
+ 786 .LVL83:\r
+ 787 .LSM67:\r
+ 788 004a 8081 ld r24,Z\r
+ 789 004c 8230 cpi r24,lo8(2)\r
+ 790 004e 01F4 brne .+2\r
+ 791 0050 00C0 rjmp .L49\r
+ 792 0052 8330 cpi r24,lo8(3)\r
+ 793 0054 01F4 brne .+2\r
+ 794 0056 00C0 rjmp .L50\r
+ 795 0058 8130 cpi r24,lo8(1)\r
+ 796 005a 01F0 breq .+2\r
+ 797 005c 00C0 rjmp .L47\r
+ 798 .LSM68:\r
+ 799 005e EA01 movw r28,r20\r
+ 800 .LVL84:\r
+ 801 0060 D695 lsr r29\r
+ 802 0062 C795 ror r28\r
+ 803 .LVL85:\r
+ 804 0064 CE0D add r28,r14\r
+ 805 0066 DF1D adc r29,r15\r
+ 806 .LSM69:\r
+ 807 0068 AE01 movw r20,r28\r
+ 808 006a 452F mov r20,r21\r
+ 809 006c 5527 clr r21\r
+ 810 006e 4695 lsr r20\r
+ 811 0070 60E0 ldi r22,lo8(0)\r
+ 812 0072 70E0 ldi r23,hi8(0)\r
+ 813 0074 4A0D add r20,r10\r
+ 814 0076 5B1D adc r21,r11\r
+ 815 0078 6C1D adc r22,r12\r
+ 816 007a 7D1D adc r23,r13\r
+ 817 007c C401 movw r24,r8\r
+ 818 007e 0E94 0000 call move_window\r
+ 819 0082 8823 tst r24\r
+ 820 0084 01F0 breq .+2\r
+ 821 0086 00C0 rjmp .L47\r
+ 822 .LSM70:\r
+ 823 0088 FE01 movw r30,r28\r
+ 824 008a F170 andi r31,hi8(511)\r
+ 825 008c E80D add r30,r8\r
+ 826 008e F91D adc r31,r9\r
+ 827 0090 76A4 ldd r7,Z+46\r
+ 828 0092 2196 adiw r28,1\r
+ 829 .LVL86:\r
+ 830 .LSM71:\r
+ 831 0094 AE01 movw r20,r28\r
+ 832 0096 452F mov r20,r21\r
+ 833 0098 5527 clr r21\r
+ 834 009a 4695 lsr r20\r
+ 835 009c 60E0 ldi r22,lo8(0)\r
+ 836 009e 70E0 ldi r23,hi8(0)\r
+ 837 00a0 4A0D add r20,r10\r
+ 838 00a2 5B1D adc r21,r11\r
+ 839 00a4 6C1D adc r22,r12\r
+ 840 00a6 7D1D adc r23,r13\r
+ 841 00a8 C401 movw r24,r8\r
+ 842 00aa 0E94 0000 call move_window\r
+ 843 00ae 8823 tst r24\r
+ 844 00b0 01F0 breq .+2\r
+ 845 00b2 00C0 rjmp .L47\r
+ 846 .LSM72:\r
+ 847 00b4 672D mov r22,r7\r
+ 848 .LVL87:\r
+ 849 00b6 70E0 ldi r23,lo8(0)\r
+ 850 .LVL88:\r
+ 851 .LSM73:\r
+ 852 00b8 D170 andi r29,hi8(511)\r
+ 853 00ba C80D add r28,r8\r
+ 854 00bc D91D adc r29,r9\r
+ 855 00be 9EA5 ldd r25,Y+46\r
+ 856 00c0 80E0 ldi r24,lo8(0)\r
+ 857 00c2 682B or r22,r24\r
+ 858 00c4 792B or r23,r25\r
+ 859 .LVL89:\r
+ 860 .LSM74:\r
+ 861 00c6 C701 movw r24,r14\r
+ 862 .LVL90:\r
+ 863 00c8 8170 andi r24,lo8(1)\r
+ 864 00ca 9070 andi r25,hi8(1)\r
+ 865 00cc 892B or r24,r25\r
+ 866 00ce 01F0 breq .L51\r
+ 867 00d0 94E0 ldi r25,4\r
+ 868 00d2 7695 1: lsr r23\r
+ 869 00d4 6795 ror r22\r
+ 870 00d6 9A95 dec r25\r
+ 871 00d8 01F4 brne 1b\r
+ 872 00da 9B01 movw r18,r22\r
+ 873 00dc 00C0 rjmp .L54\r
+ 874 .L51:\r
+ 875 00de 9B01 movw r18,r22\r
+ 876 00e0 40E0 ldi r20,lo8(0)\r
+ 877 00e2 50E0 ldi r21,hi8(0)\r
+ 878 00e4 3F70 andi r19,hi8(4095)\r
+ 879 00e6 4070 andi r20,hlo8(4095)\r
+ 880 00e8 5070 andi r21,hhi8(4095)\r
+ 881 00ea 00C0 rjmp .L52\r
+ 882 .LVL91:\r
+ 883 .L49:\r
+ 884 .LSM75:\r
+ 885 00ec 452F mov r20,r21\r
+ 886 00ee 562F mov r21,r22\r
+ 887 00f0 672F mov r22,r23\r
+ 888 00f2 7727 clr r23\r
+ 889 .LVL92:\r
+ 890 00f4 4A0D add r20,r10\r
+ 891 00f6 5B1D adc r21,r11\r
+ 892 00f8 6C1D adc r22,r12\r
+ 893 00fa 7D1D adc r23,r13\r
+ 894 00fc C401 movw r24,r8\r
+ 895 00fe 0E94 0000 call move_window\r
+ 896 0102 8823 tst r24\r
+ 897 0104 01F0 breq .+2\r
+ 898 0106 00C0 rjmp .L47\r
+ 899 .LSM76:\r
+ 900 0108 F701 movw r30,r14\r
+ 901 .LVL93:\r
+ 902 010a EE0F lsl r30\r
+ 903 010c FF1F rol r31\r
+ 904 010e F170 andi r31,hi8(511)\r
+ 905 0110 E80D add r30,r8\r
+ 906 0112 F91D adc r31,r9\r
+ 907 0114 97A5 ldd r25,Z+47\r
+ 908 0116 80E0 ldi r24,lo8(0)\r
+ 909 0118 26A5 ldd r18,Z+46\r
+ 910 011a 30E0 ldi r19,lo8(0)\r
+ 911 011c 822B or r24,r18\r
+ 912 011e 932B or r25,r19\r
+ 913 0120 9C01 movw r18,r24\r
+ 914 .LVL94:\r
+ 915 .L54:\r
+ 916 0122 40E0 ldi r20,lo8(0)\r
+ 917 0124 50E0 ldi r21,hi8(0)\r
+ 918 0126 00C0 rjmp .L52\r
+ 919 .LVL95:\r
+ 920 .L50:\r
+ 921 .LSM77:\r
+ 922 0128 B7E0 ldi r27,7\r
+ 923 012a 7695 1: lsr r23\r
+ 924 012c 6795 ror r22\r
+ 925 012e 5795 ror r21\r
+ 926 0130 4795 ror r20\r
+ 927 0132 BA95 dec r27\r
+ 928 0134 01F4 brne 1b\r
+ 929 .LVL96:\r
+ 930 0136 4A0D add r20,r10\r
+ 931 0138 5B1D adc r21,r11\r
+ 932 013a 6C1D adc r22,r12\r
+ 933 013c 7D1D adc r23,r13\r
+ 934 013e C401 movw r24,r8\r
+ 935 0140 0E94 0000 call move_window\r
+ 936 0144 8823 tst r24\r
+ 937 0146 01F4 brne .L47\r
+ 938 .LSM78:\r
+ 939 0148 F701 movw r30,r14\r
+ 940 .LVL97:\r
+ 941 014a EE0F lsl r30\r
+ 942 014c FF1F rol r31\r
+ 943 014e EE0F lsl r30\r
+ 944 0150 FF1F rol r31\r
+ 945 0152 F170 andi r31,hi8(511)\r
+ 946 0154 E80D add r30,r8\r
+ 947 0156 F91D adc r31,r9\r
+ 948 0158 81A9 ldd r24,Z+49\r
+ 949 015a 90E0 ldi r25,lo8(0)\r
+ 950 015c A0E0 ldi r26,lo8(0)\r
+ 951 015e B0E0 ldi r27,hi8(0)\r
+ 952 0160 582F mov r21,r24\r
+ 953 0162 4427 clr r20\r
+ 954 0164 3327 clr r19\r
+ 955 0166 2227 clr r18\r
+ 956 0168 80A9 ldd r24,Z+48\r
+ 957 016a 90E0 ldi r25,lo8(0)\r
+ 958 016c A0E0 ldi r26,lo8(0)\r
+ 959 016e B0E0 ldi r27,hi8(0)\r
+ 960 0170 DC01 movw r26,r24\r
+ 961 0172 9927 clr r25\r
+ 962 0174 8827 clr r24\r
+ 963 0176 282B or r18,r24\r
+ 964 0178 392B or r19,r25\r
+ 965 017a 4A2B or r20,r26\r
+ 966 017c 5B2B or r21,r27\r
+ 967 017e 86A5 ldd r24,Z+46\r
+ 968 0180 90E0 ldi r25,lo8(0)\r
+ 969 0182 A0E0 ldi r26,lo8(0)\r
+ 970 0184 B0E0 ldi r27,hi8(0)\r
+ 971 0186 282B or r18,r24\r
+ 972 0188 392B or r19,r25\r
+ 973 018a 4A2B or r20,r26\r
+ 974 018c 5B2B or r21,r27\r
+ 975 018e 97A5 ldd r25,Z+47\r
+ 976 0190 80E0 ldi r24,lo8(0)\r
+ 977 0192 A0E0 ldi r26,lo8(0)\r
+ 978 0194 B0E0 ldi r27,hi8(0)\r
+ 979 0196 282B or r18,r24\r
+ 980 0198 392B or r19,r25\r
+ 981 019a 4A2B or r20,r26\r
+ 982 019c 5B2B or r21,r27\r
+ 983 019e 5F70 andi r21,hhi8(268435455)\r
+ 984 01a0 00C0 rjmp .L52\r
+ 985 .LVL98:\r
+ 986 .L46:\r
+ 987 01a2 21E0 ldi r18,lo8(1)\r
+ 988 01a4 30E0 ldi r19,hi8(1)\r
+ 989 01a6 40E0 ldi r20,hlo8(1)\r
+ 990 01a8 50E0 ldi r21,hhi8(1)\r
+ 991 01aa 00C0 rjmp .L52\r
+ 992 .LVL99:\r
+ 993 .L47:\r
+ 994 01ac 2FEF ldi r18,lo8(-1)\r
+ 995 01ae 3FEF ldi r19,hi8(-1)\r
+ 996 01b0 4FEF ldi r20,hlo8(-1)\r
+ 997 01b2 5FEF ldi r21,hhi8(-1)\r
+ 998 .LVL100:\r
+ 999 .L52:\r
+ 1000 .LSM79:\r
+ 1001 01b4 B901 movw r22,r18\r
+ 1002 .LVL101:\r
+ 1003 01b6 CA01 movw r24,r20\r
+ 1004 /* epilogue start */\r
+ 1005 01b8 DF91 pop r29\r
+ 1006 01ba CF91 pop r28\r
+ 1007 .LVL102:\r
+ 1008 01bc 1F91 pop r17\r
+ 1009 01be 0F91 pop r16\r
+ 1010 01c0 FF90 pop r15\r
+ 1011 01c2 EF90 pop r14\r
+ 1012 .LVL103:\r
+ 1013 01c4 DF90 pop r13\r
+ 1014 01c6 CF90 pop r12\r
+ 1015 01c8 BF90 pop r11\r
+ 1016 01ca AF90 pop r10\r
+ 1017 .LVL104:\r
+ 1018 01cc 9F90 pop r9\r
+ 1019 01ce 8F90 pop r8\r
+ 1020 .LVL105:\r
+ 1021 01d0 7F90 pop r7\r
+ 1022 01d2 0895 ret\r
+ 1023 .LFE58:\r
+ 1025 .section .text.create_chain,"ax",@progbits\r
+ 1027 create_chain:\r
+ 1028 .LFB61:\r
+ 1029 .LSM80:\r
+ 1030 .LVL106:\r
+ 1031 0000 2F92 push r2\r
+ 1032 0002 3F92 push r3\r
+ 1033 0004 4F92 push r4\r
+ 1034 0006 5F92 push r5\r
+ 1035 0008 6F92 push r6\r
+ 1036 000a 7F92 push r7\r
+ 1037 000c 8F92 push r8\r
+ 1038 000e 9F92 push r9\r
+ 1039 0010 AF92 push r10\r
+ 1040 0012 BF92 push r11\r
+ 1041 0014 CF92 push r12\r
+ 1042 0016 DF92 push r13\r
+ 1043 0018 EF92 push r14\r
+ 1044 001a FF92 push r15\r
+ 1045 001c 0F93 push r16\r
+ 1046 001e 1F93 push r17\r
+ 1047 0020 DF93 push r29\r
+ 1048 0022 CF93 push r28\r
+ 1049 0024 00D0 rcall .\r
+ 1050 0026 00D0 rcall .\r
+ 1051 0028 CDB7 in r28,__SP_L__\r
+ 1052 002a DEB7 in r29,__SP_H__\r
+ 1053 /* prologue: function */\r
+ 1054 /* frame size = 4 */\r
+ 1055 002c 1C01 movw r2,r24\r
+ 1056 002e 2A01 movw r4,r20\r
+ 1057 0030 3B01 movw r6,r22\r
+ 1058 .LSM81:\r
+ 1059 0032 DC01 movw r26,r24\r
+ 1060 0034 5A96 adiw r26,26\r
+ 1061 0036 8D91 ld r24,X+\r
+ 1062 0038 9D91 ld r25,X+\r
+ 1063 003a 0D90 ld __tmp_reg__,X+\r
+ 1064 003c BC91 ld r27,X\r
+ 1065 003e A02D mov r26,__tmp_reg__\r
+ 1066 .LVL107:\r
+ 1067 0040 8983 std Y+1,r24\r
+ 1068 0042 9A83 std Y+2,r25\r
+ 1069 0044 AB83 std Y+3,r26\r
+ 1070 0046 BC83 std Y+4,r27\r
+ 1071 .LVL108:\r
+ 1072 .LSM82:\r
+ 1073 0048 4115 cp r20,__zero_reg__\r
+ 1074 004a 5105 cpc r21,__zero_reg__\r
+ 1075 004c 6105 cpc r22,__zero_reg__\r
+ 1076 004e 7105 cpc r23,__zero_reg__\r
+ 1077 0050 01F4 brne .L56\r
+ 1078 .LSM83:\r
+ 1079 0052 F101 movw r30,r2\r
+ 1080 0054 8284 ldd r8,Z+10\r
+ 1081 0056 9384 ldd r9,Z+11\r
+ 1082 0058 A484 ldd r10,Z+12\r
+ 1083 005a B584 ldd r11,Z+13\r
+ 1084 .LVL109:\r
+ 1085 .LSM84:\r
+ 1086 005c 8114 cp r8,__zero_reg__\r
+ 1087 005e 9104 cpc r9,__zero_reg__\r
+ 1088 0060 A104 cpc r10,__zero_reg__\r
+ 1089 0062 B104 cpc r11,__zero_reg__\r
+ 1090 0064 01F0 breq .L57\r
+ 1091 0066 8816 cp r8,r24\r
+ 1092 0068 9906 cpc r9,r25\r
+ 1093 006a AA06 cpc r10,r26\r
+ 1094 006c BB06 cpc r11,r27\r
+ 1095 006e 00F4 brsh .L57\r
+ 1096 0070 00C0 rjmp .L58\r
+ 1097 .LVL110:\r
+ 1098 .L56:\r
+ 1099 .LSM85:\r
+ 1100 0072 C101 movw r24,r2\r
+ 1101 0074 0E94 0000 call get_fat\r
+ 1102 .LVL111:\r
+ 1103 0078 9B01 movw r18,r22\r
+ 1104 007a AC01 movw r20,r24\r
+ 1105 .LVL112:\r
+ 1106 .LSM86:\r
+ 1107 007c 6230 cpi r22,lo8(2)\r
+ 1108 007e 7105 cpc r23,__zero_reg__\r
+ 1109 0080 8105 cpc r24,__zero_reg__\r
+ 1110 0082 9105 cpc r25,__zero_reg__\r
+ 1111 0084 00F4 brsh .L59\r
+ 1112 .LVL113:\r
+ 1113 0086 21E0 ldi r18,lo8(1)\r
+ 1114 0088 30E0 ldi r19,hi8(1)\r
+ 1115 008a 40E0 ldi r20,hlo8(1)\r
+ 1116 008c 50E0 ldi r21,hhi8(1)\r
+ 1117 .LVL114:\r
+ 1118 008e 00C0 rjmp .L60\r
+ 1119 .LVL115:\r
+ 1120 .L59:\r
+ 1121 .LSM87:\r
+ 1122 0090 8981 ldd r24,Y+1\r
+ 1123 0092 9A81 ldd r25,Y+2\r
+ 1124 0094 AB81 ldd r26,Y+3\r
+ 1125 0096 BC81 ldd r27,Y+4\r
+ 1126 0098 2817 cp r18,r24\r
+ 1127 009a 3907 cpc r19,r25\r
+ 1128 009c 4A07 cpc r20,r26\r
+ 1129 009e 5B07 cpc r21,r27\r
+ 1130 00a0 00F4 brsh .+2\r
+ 1131 00a2 00C0 rjmp .L60\r
+ 1132 .LVL116:\r
+ 1133 00a4 5301 movw r10,r6\r
+ 1134 00a6 4201 movw r8,r4\r
+ 1135 .LVL117:\r
+ 1136 00a8 00C0 rjmp .L58\r
+ 1137 .LVL118:\r
+ 1138 .L57:\r
+ 1139 00aa 61E0 ldi r22,lo8(1)\r
+ 1140 00ac 862E mov r8,r22\r
+ 1141 00ae 912C mov r9,__zero_reg__\r
+ 1142 00b0 A12C mov r10,__zero_reg__\r
+ 1143 00b2 B12C mov r11,__zero_reg__\r
+ 1144 .LVL119:\r
+ 1145 .L58:\r
+ 1146 00b4 7501 movw r14,r10\r
+ 1147 00b6 6401 movw r12,r8\r
+ 1148 .LVL120:\r
+ 1149 .L64:\r
+ 1150 .LSM88:\r
+ 1151 00b8 0894 sec\r
+ 1152 00ba C11C adc r12,__zero_reg__\r
+ 1153 00bc D11C adc r13,__zero_reg__\r
+ 1154 00be E11C adc r14,__zero_reg__\r
+ 1155 00c0 F11C adc r15,__zero_reg__\r
+ 1156 .LSM89:\r
+ 1157 00c2 8981 ldd r24,Y+1\r
+ 1158 00c4 9A81 ldd r25,Y+2\r
+ 1159 00c6 AB81 ldd r26,Y+3\r
+ 1160 00c8 BC81 ldd r27,Y+4\r
+ 1161 00ca C816 cp r12,r24\r
+ 1162 00cc D906 cpc r13,r25\r
+ 1163 00ce EA06 cpc r14,r26\r
+ 1164 00d0 FB06 cpc r15,r27\r
+ 1165 00d2 00F0 brlo .L61\r
+ 1166 .LSM90:\r
+ 1167 00d4 92E0 ldi r25,lo8(2)\r
+ 1168 00d6 8916 cp r8,r25\r
+ 1169 00d8 9104 cpc r9,__zero_reg__\r
+ 1170 00da A104 cpc r10,__zero_reg__\r
+ 1171 00dc B104 cpc r11,__zero_reg__\r
+ 1172 00de 00F4 brsh .+2\r
+ 1173 00e0 00C0 rjmp .L62\r
+ 1174 00e2 52E0 ldi r21,lo8(2)\r
+ 1175 00e4 C52E mov r12,r21\r
+ 1176 00e6 D12C mov r13,__zero_reg__\r
+ 1177 00e8 E12C mov r14,__zero_reg__\r
+ 1178 00ea F12C mov r15,__zero_reg__\r
+ 1179 .L61:\r
+ 1180 .LSM91:\r
+ 1181 00ec C101 movw r24,r2\r
+ 1182 00ee B701 movw r22,r14\r
+ 1183 00f0 A601 movw r20,r12\r
+ 1184 00f2 0E94 0000 call get_fat\r
+ 1185 .LVL121:\r
+ 1186 00f6 9B01 movw r18,r22\r
+ 1187 00f8 AC01 movw r20,r24\r
+ 1188 .LVL122:\r
+ 1189 .LSM92:\r
+ 1190 00fa 6115 cp r22,__zero_reg__\r
+ 1191 00fc 7105 cpc r23,__zero_reg__\r
+ 1192 00fe 8105 cpc r24,__zero_reg__\r
+ 1193 0100 9105 cpc r25,__zero_reg__\r
+ 1194 0102 01F0 breq .L63\r
+ 1195 .LVL123:\r
+ 1196 .LSM93:\r
+ 1197 0104 6F3F cpi r22,lo8(-1)\r
+ 1198 0106 AFEF ldi r26,hi8(-1)\r
+ 1199 0108 7A07 cpc r23,r26\r
+ 1200 010a AFEF ldi r26,hlo8(-1)\r
+ 1201 010c 8A07 cpc r24,r26\r
+ 1202 010e AFEF ldi r26,hhi8(-1)\r
+ 1203 0110 9A07 cpc r25,r26\r
+ 1204 0112 01F4 brne .+2\r
+ 1205 0114 00C0 rjmp .L60\r
+ 1206 0116 6130 cpi r22,lo8(1)\r
+ 1207 0118 7105 cpc r23,__zero_reg__\r
+ 1208 011a 8105 cpc r24,__zero_reg__\r
+ 1209 011c 9105 cpc r25,__zero_reg__\r
+ 1210 011e 01F4 brne .+2\r
+ 1211 0120 00C0 rjmp .L60\r
+ 1212 .LSM94:\r
+ 1213 0122 C814 cp r12,r8\r
+ 1214 0124 D904 cpc r13,r9\r
+ 1215 0126 EA04 cpc r14,r10\r
+ 1216 0128 FB04 cpc r15,r11\r
+ 1217 012a 01F4 brne .L64\r
+ 1218 012c 00C0 rjmp .L62\r
+ 1219 .L63:\r
+ 1220 012e BC2C mov r11,r12\r
+ 1221 0130 AD2C mov r10,r13\r
+ 1222 .LVL124:\r
+ 1223 0132 9E2C mov r9,r14\r
+ 1224 .LVL125:\r
+ 1225 0134 8F2C mov r8,r15\r
+ 1226 .LVL126:\r
+ 1227 .LSM95:\r
+ 1228 0136 C101 movw r24,r2\r
+ 1229 0138 A601 movw r20,r12\r
+ 1230 .LVL127:\r
+ 1231 013a B701 movw r22,r14\r
+ 1232 .LVL128:\r
+ 1233 013c 0FEF ldi r16,lo8(268435455)\r
+ 1234 013e 1FEF ldi r17,hi8(268435455)\r
+ 1235 0140 2FEF ldi r18,hlo8(268435455)\r
+ 1236 0142 3FE0 ldi r19,hhi8(268435455)\r
+ 1237 0144 0E94 0000 call put_fat\r
+ 1238 .LVL129:\r
+ 1239 0148 8823 tst r24\r
+ 1240 014a 01F4 brne .L65\r
+ 1241 .LVL130:\r
+ 1242 .LSM96:\r
+ 1243 014c 4114 cp r4,__zero_reg__\r
+ 1244 014e 5104 cpc r5,__zero_reg__\r
+ 1245 0150 6104 cpc r6,__zero_reg__\r
+ 1246 0152 7104 cpc r7,__zero_reg__\r
+ 1247 0154 01F0 breq .L66\r
+ 1248 .LSM97:\r
+ 1249 0156 C101 movw r24,r2\r
+ 1250 0158 B301 movw r22,r6\r
+ 1251 015a A201 movw r20,r4\r
+ 1252 015c 8601 movw r16,r12\r
+ 1253 015e 9701 movw r18,r14\r
+ 1254 0160 0E94 0000 call put_fat\r
+ 1255 0164 8823 tst r24\r
+ 1256 0166 01F4 brne .L65\r
+ 1257 .L66:\r
+ 1258 .LSM98:\r
+ 1259 0168 F101 movw r30,r2\r
+ 1260 016a B286 std Z+10,r11\r
+ 1261 016c A386 std Z+11,r10\r
+ 1262 016e 9486 std Z+12,r9\r
+ 1263 0170 8586 std Z+13,r8\r
+ 1264 .LSM99:\r
+ 1265 0172 8685 ldd r24,Z+14\r
+ 1266 0174 9785 ldd r25,Z+15\r
+ 1267 0176 A089 ldd r26,Z+16\r
+ 1268 0178 B189 ldd r27,Z+17\r
+ 1269 017a 8F3F cpi r24,lo8(-1)\r
+ 1270 017c FFEF ldi r31,hi8(-1)\r
+ 1271 017e 9F07 cpc r25,r31\r
+ 1272 0180 FFEF ldi r31,hlo8(-1)\r
+ 1273 0182 AF07 cpc r26,r31\r
+ 1274 0184 FFEF ldi r31,hhi8(-1)\r
+ 1275 0186 BF07 cpc r27,r31\r
+ 1276 0188 01F0 breq .L69\r
+ 1277 .L67:\r
+ 1278 .LSM100:\r
+ 1279 018a 0197 sbiw r24,1\r
+ 1280 018c A109 sbc r26,__zero_reg__\r
+ 1281 018e B109 sbc r27,__zero_reg__\r
+ 1282 0190 F101 movw r30,r2\r
+ 1283 0192 8687 std Z+14,r24\r
+ 1284 0194 9787 std Z+15,r25\r
+ 1285 0196 A08B std Z+16,r26\r
+ 1286 0198 B18B std Z+17,r27\r
+ 1287 .LSM101:\r
+ 1288 019a 81E0 ldi r24,lo8(1)\r
+ 1289 019c 8583 std Z+5,r24\r
+ 1290 .L69:\r
+ 1291 019e A701 movw r20,r14\r
+ 1292 01a0 9601 movw r18,r12\r
+ 1293 .LVL131:\r
+ 1294 01a2 00C0 rjmp .L60\r
+ 1295 .LVL132:\r
+ 1296 .L62:\r
+ 1297 01a4 20E0 ldi r18,lo8(0)\r
+ 1298 01a6 30E0 ldi r19,hi8(0)\r
+ 1299 01a8 40E0 ldi r20,hlo8(0)\r
+ 1300 01aa 50E0 ldi r21,hhi8(0)\r
+ 1301 01ac 00C0 rjmp .L60\r
+ 1302 .LVL133:\r
+ 1303 .L65:\r
+ 1304 01ae 2FEF ldi r18,lo8(-1)\r
+ 1305 01b0 3FEF ldi r19,hi8(-1)\r
+ 1306 01b2 4FEF ldi r20,hlo8(-1)\r
+ 1307 01b4 5FEF ldi r21,hhi8(-1)\r
+ 1308 .LVL134:\r
+ 1309 .L60:\r
+ 1310 .LSM102:\r
+ 1311 01b6 B901 movw r22,r18\r
+ 1312 .LVL135:\r
+ 1313 01b8 CA01 movw r24,r20\r
+ 1314 /* epilogue start */\r
+ 1315 01ba 0F90 pop __tmp_reg__\r
+ 1316 01bc 0F90 pop __tmp_reg__\r
+ 1317 01be 0F90 pop __tmp_reg__\r
+ 1318 01c0 0F90 pop __tmp_reg__\r
+ 1319 01c2 CF91 pop r28\r
+ 1320 01c4 DF91 pop r29\r
+ 1321 01c6 1F91 pop r17\r
+ 1322 01c8 0F91 pop r16\r
+ 1323 01ca FF90 pop r15\r
+ 1324 01cc EF90 pop r14\r
+ 1325 01ce DF90 pop r13\r
+ 1326 01d0 CF90 pop r12\r
+ 1327 .LVL136:\r
+ 1328 01d2 BF90 pop r11\r
+ 1329 .LVL137:\r
+ 1330 01d4 AF90 pop r10\r
+ 1331 .LVL138:\r
+ 1332 01d6 9F90 pop r9\r
+ 1333 .LVL139:\r
+ 1334 01d8 8F90 pop r8\r
+ 1335 .LVL140:\r
+ 1336 01da 7F90 pop r7\r
+ 1337 01dc 6F90 pop r6\r
+ 1338 01de 5F90 pop r5\r
+ 1339 01e0 4F90 pop r4\r
+ 1340 .LVL141:\r
+ 1341 01e2 3F90 pop r3\r
+ 1342 01e4 2F90 pop r2\r
+ 1343 .LVL142:\r
+ 1344 01e6 0895 ret\r
+ 1345 .LFE61:\r
+ 1347 .section .text.f_lseek,"ax",@progbits\r
+ 1348 .global f_lseek\r
+ 1350 f_lseek:\r
+ 1351 .LFB78:\r
+ 1352 .LSM103:\r
+ 1353 .LVL143:\r
+ 1354 0000 2F92 push r2\r
+ 1355 0002 3F92 push r3\r
+ 1356 0004 4F92 push r4\r
+ 1357 0006 5F92 push r5\r
+ 1358 0008 6F92 push r6\r
+ 1359 000a 7F92 push r7\r
+ 1360 000c 8F92 push r8\r
+ 1361 000e 9F92 push r9\r
+ 1362 0010 AF92 push r10\r
+ 1363 0012 BF92 push r11\r
+ 1364 0014 CF92 push r12\r
+ 1365 0016 DF92 push r13\r
+ 1366 0018 EF92 push r14\r
+ 1367 001a FF92 push r15\r
+ 1368 001c 0F93 push r16\r
+ 1369 001e 1F93 push r17\r
+ 1370 0020 DF93 push r29\r
+ 1371 0022 CF93 push r28\r
+ 1372 0024 00D0 rcall .\r
+ 1373 0026 00D0 rcall .\r
+ 1374 0028 0F92 push __tmp_reg__\r
+ 1375 002a CDB7 in r28,__SP_L__\r
+ 1376 002c DEB7 in r29,__SP_H__\r
+ 1377 /* prologue: function */\r
+ 1378 /* frame size = 5 */\r
+ 1379 002e 9D83 std Y+5,r25\r
+ 1380 0030 8C83 std Y+4,r24\r
+ 1381 0032 3A01 movw r6,r20\r
+ 1382 0034 4B01 movw r8,r22\r
+ 1383 .LSM104:\r
+ 1384 0036 DC01 movw r26,r24\r
+ 1385 0038 1296 adiw r26,2\r
+ 1386 003a 6D91 ld r22,X+\r
+ 1387 003c 7C91 ld r23,X\r
+ 1388 003e 1397 sbiw r26,2+1\r
+ 1389 0040 8D91 ld r24,X+\r
+ 1390 0042 9C91 ld r25,X\r
+ 1391 .LVL144:\r
+ 1392 0044 0E94 0000 call validate\r
+ 1393 .LVL145:\r
+ 1394 0048 8B83 std Y+3,r24\r
+ 1395 .LVL146:\r
+ 1396 .LSM105:\r
+ 1397 004a 8823 tst r24\r
+ 1398 004c 01F0 breq .+2\r
+ 1399 004e 00C0 rjmp .L71\r
+ 1400 .LSM106:\r
+ 1401 0050 EC81 ldd r30,Y+4\r
+ 1402 0052 FD81 ldd r31,Y+5\r
+ 1403 0054 8481 ldd r24,Z+4\r
+ 1404 0056 87FD sbrc r24,7\r
+ 1405 0058 00C0 rjmp .L94\r
+ 1406 .L72:\r
+ 1407 .LSM107:\r
+ 1408 005a AC81 ldd r26,Y+4\r
+ 1409 005c BD81 ldd r27,Y+5\r
+ 1410 005e 1A96 adiw r26,10\r
+ 1411 0060 AD90 ld r10,X+\r
+ 1412 0062 BD90 ld r11,X+\r
+ 1413 0064 CD90 ld r12,X+\r
+ 1414 0066 DC90 ld r13,X\r
+ 1415 0068 1D97 sbiw r26,10+3\r
+ 1416 .LVL147:\r
+ 1417 006a A614 cp r10,r6\r
+ 1418 006c B704 cpc r11,r7\r
+ 1419 006e C804 cpc r12,r8\r
+ 1420 0070 D904 cpc r13,r9\r
+ 1421 0072 00F4 brsh .L73\r
+ 1422 0074 81FF sbrs r24,1\r
+ 1423 0076 00C0 rjmp .L74\r
+ 1424 .L73:\r
+ 1425 0078 6401 movw r12,r8\r
+ 1426 007a 5301 movw r10,r6\r
+ 1427 .L74:\r
+ 1428 .LSM108:\r
+ 1429 007c EC81 ldd r30,Y+4\r
+ 1430 007e FD81 ldd r31,Y+5\r
+ 1431 0080 2681 ldd r18,Z+6\r
+ 1432 0082 3781 ldd r19,Z+7\r
+ 1433 0084 4085 ldd r20,Z+8\r
+ 1434 0086 5185 ldd r21,Z+9\r
+ 1435 .LVL148:\r
+ 1436 .LSM109:\r
+ 1437 0088 1682 std Z+6,__zero_reg__\r
+ 1438 008a 1782 std Z+7,__zero_reg__\r
+ 1439 008c 1086 std Z+8,__zero_reg__\r
+ 1440 008e 1186 std Z+9,__zero_reg__\r
+ 1441 0090 8FEF ldi r24,lo8(-1)\r
+ 1442 0092 8583 std Z+5,r24\r
+ 1443 .LSM110:\r
+ 1444 0094 A114 cp r10,__zero_reg__\r
+ 1445 0096 B104 cpc r11,__zero_reg__\r
+ 1446 0098 C104 cpc r12,__zero_reg__\r
+ 1447 009a D104 cpc r13,__zero_reg__\r
+ 1448 009c 01F4 brne .+2\r
+ 1449 009e 00C0 rjmp .L75\r
+ 1450 .LSM111:\r
+ 1451 00a0 0190 ld __tmp_reg__,Z+\r
+ 1452 00a2 F081 ld r31,Z\r
+ 1453 00a4 E02D mov r30,__tmp_reg__\r
+ 1454 00a6 FA83 std Y+2,r31\r
+ 1455 00a8 E983 std Y+1,r30\r
+ 1456 00aa 8281 ldd r24,Z+2\r
+ 1457 00ac 682E mov r6,r24\r
+ 1458 .LVL149:\r
+ 1459 00ae 7724 clr r7\r
+ 1460 .LVL150:\r
+ 1461 00b0 8824 clr r8\r
+ 1462 00b2 9924 clr r9\r
+ 1463 .LVL151:\r
+ 1464 00b4 09E0 ldi r16,9\r
+ 1465 00b6 660C 1: lsl r6\r
+ 1466 00b8 771C rol r7\r
+ 1467 00ba 881C rol r8\r
+ 1468 00bc 991C rol r9\r
+ 1469 00be 0A95 dec r16\r
+ 1470 00c0 01F4 brne 1b\r
+ 1471 .LVL152:\r
+ 1472 .LSM112:\r
+ 1473 00c2 2115 cp r18,__zero_reg__\r
+ 1474 00c4 3105 cpc r19,__zero_reg__\r
+ 1475 00c6 4105 cpc r20,__zero_reg__\r
+ 1476 00c8 5105 cpc r21,__zero_reg__\r
+ 1477 00ca 01F0 breq .L76\r
+ 1478 00cc 1901 movw r2,r18\r
+ 1479 00ce 2A01 movw r4,r20\r
+ 1480 00d0 0894 sec\r
+ 1481 00d2 2108 sbc r2,__zero_reg__\r
+ 1482 00d4 3108 sbc r3,__zero_reg__\r
+ 1483 00d6 4108 sbc r4,__zero_reg__\r
+ 1484 00d8 5108 sbc r5,__zero_reg__\r
+ 1485 00da C601 movw r24,r12\r
+ 1486 00dc B501 movw r22,r10\r
+ 1487 00de 6150 subi r22,lo8(-(-1))\r
+ 1488 00e0 7040 sbci r23,hi8(-(-1))\r
+ 1489 00e2 8040 sbci r24,hlo8(-(-1))\r
+ 1490 00e4 9040 sbci r25,hhi8(-(-1))\r
+ 1491 00e6 A401 movw r20,r8\r
+ 1492 00e8 9301 movw r18,r6\r
+ 1493 .LVL153:\r
+ 1494 00ea 0E94 0000 call __udivmodsi4\r
+ 1495 00ee 7901 movw r14,r18\r
+ 1496 00f0 8A01 movw r16,r20\r
+ 1497 00f2 C201 movw r24,r4\r
+ 1498 00f4 B101 movw r22,r2\r
+ 1499 00f6 A401 movw r20,r8\r
+ 1500 00f8 9301 movw r18,r6\r
+ 1501 00fa 0E94 0000 call __udivmodsi4\r
+ 1502 00fe E216 cp r14,r18\r
+ 1503 0100 F306 cpc r15,r19\r
+ 1504 0102 0407 cpc r16,r20\r
+ 1505 0104 1507 cpc r17,r21\r
+ 1506 0106 00F0 brlo .L76\r
+ 1507 .LSM113:\r
+ 1508 0108 8827 clr r24\r
+ 1509 010a 9927 clr r25\r
+ 1510 010c DC01 movw r26,r24\r
+ 1511 010e 8619 sub r24,r6\r
+ 1512 0110 9709 sbc r25,r7\r
+ 1513 0112 A809 sbc r26,r8\r
+ 1514 0114 B909 sbc r27,r9\r
+ 1515 0116 8221 and r24,r2\r
+ 1516 0118 9321 and r25,r3\r
+ 1517 011a A421 and r26,r4\r
+ 1518 011c B521 and r27,r5\r
+ 1519 011e EC81 ldd r30,Y+4\r
+ 1520 0120 FD81 ldd r31,Y+5\r
+ 1521 0122 8683 std Z+6,r24\r
+ 1522 0124 9783 std Z+7,r25\r
+ 1523 0126 A087 std Z+8,r26\r
+ 1524 0128 B187 std Z+9,r27\r
+ 1525 .LSM114:\r
+ 1526 012a A81A sub r10,r24\r
+ 1527 012c B90A sbc r11,r25\r
+ 1528 012e CA0A sbc r12,r26\r
+ 1529 0130 DB0A sbc r13,r27\r
+ 1530 .LSM115:\r
+ 1531 0132 4289 ldd r20,Z+18\r
+ 1532 0134 5389 ldd r21,Z+19\r
+ 1533 0136 6489 ldd r22,Z+20\r
+ 1534 0138 7589 ldd r23,Z+21\r
+ 1535 .LVL154:\r
+ 1536 013a 00C0 rjmp .L77\r
+ 1537 .LVL155:\r
+ 1538 .L76:\r
+ 1539 .LSM116:\r
+ 1540 013c AC81 ldd r26,Y+4\r
+ 1541 013e BD81 ldd r27,Y+5\r
+ 1542 0140 1E96 adiw r26,14\r
+ 1543 0142 4D91 ld r20,X+\r
+ 1544 0144 5D91 ld r21,X+\r
+ 1545 0146 6D91 ld r22,X+\r
+ 1546 0148 7C91 ld r23,X\r
+ 1547 014a 5197 sbiw r26,14+3\r
+ 1548 .LVL156:\r
+ 1549 .LSM117:\r
+ 1550 014c 4115 cp r20,__zero_reg__\r
+ 1551 014e 5105 cpc r21,__zero_reg__\r
+ 1552 0150 6105 cpc r22,__zero_reg__\r
+ 1553 0152 7105 cpc r23,__zero_reg__\r
+ 1554 0154 01F4 brne .L78\r
+ 1555 .LSM118:\r
+ 1556 0156 8981 ldd r24,Y+1\r
+ 1557 0158 9A81 ldd r25,Y+2\r
+ 1558 015a 40E0 ldi r20,lo8(0)\r
+ 1559 015c 50E0 ldi r21,hi8(0)\r
+ 1560 015e 60E0 ldi r22,hlo8(0)\r
+ 1561 0160 70E0 ldi r23,hhi8(0)\r
+ 1562 .LVL157:\r
+ 1563 0162 0E94 0000 call create_chain\r
+ 1564 .LVL158:\r
+ 1565 0166 AB01 movw r20,r22\r
+ 1566 0168 BC01 movw r22,r24\r
+ 1567 .LVL159:\r
+ 1568 .LSM119:\r
+ 1569 016a 4130 cpi r20,lo8(1)\r
+ 1570 016c 5105 cpc r21,__zero_reg__\r
+ 1571 016e 6105 cpc r22,__zero_reg__\r
+ 1572 0170 7105 cpc r23,__zero_reg__\r
+ 1573 0172 01F4 brne .L79\r
+ 1574 .L96:\r
+ 1575 0174 EC81 ldd r30,Y+4\r
+ 1576 0176 FD81 ldd r31,Y+5\r
+ 1577 0178 8481 ldd r24,Z+4\r
+ 1578 017a 8068 ori r24,lo8(-128)\r
+ 1579 017c 8483 std Z+4,r24\r
+ 1580 .LVL160:\r
+ 1581 .L94:\r
+ 1582 017e F2E0 ldi r31,lo8(2)\r
+ 1583 0180 FB83 std Y+3,r31\r
+ 1584 .LVL161:\r
+ 1585 0182 00C0 rjmp .L71\r
+ 1586 .LVL162:\r
+ 1587 .L79:\r
+ 1588 .LSM120:\r
+ 1589 0184 4F3F cpi r20,lo8(-1)\r
+ 1590 0186 8FEF ldi r24,hi8(-1)\r
+ 1591 0188 5807 cpc r21,r24\r
+ 1592 018a 8FEF ldi r24,hlo8(-1)\r
+ 1593 018c 6807 cpc r22,r24\r
+ 1594 018e 8FEF ldi r24,hhi8(-1)\r
+ 1595 0190 7807 cpc r23,r24\r
+ 1596 0192 01F0 breq .L97\r
+ 1597 .L80:\r
+ 1598 .LSM121:\r
+ 1599 0194 EC81 ldd r30,Y+4\r
+ 1600 0196 FD81 ldd r31,Y+5\r
+ 1601 0198 4687 std Z+14,r20\r
+ 1602 019a 5787 std Z+15,r21\r
+ 1603 019c 608B std Z+16,r22\r
+ 1604 019e 718B std Z+17,r23\r
+ 1605 .LVL163:\r
+ 1606 .L78:\r
+ 1607 .LSM122:\r
+ 1608 01a0 AC81 ldd r26,Y+4\r
+ 1609 01a2 BD81 ldd r27,Y+5\r
+ 1610 01a4 5296 adiw r26,18\r
+ 1611 01a6 4D93 st X+,r20\r
+ 1612 01a8 5D93 st X+,r21\r
+ 1613 01aa 6D93 st X+,r22\r
+ 1614 01ac 7C93 st X,r23\r
+ 1615 01ae 5597 sbiw r26,18+3\r
+ 1616 .L77:\r
+ 1617 .LSM123:\r
+ 1618 01b0 4115 cp r20,__zero_reg__\r
+ 1619 01b2 5105 cpc r21,__zero_reg__\r
+ 1620 01b4 6105 cpc r22,__zero_reg__\r
+ 1621 01b6 7105 cpc r23,__zero_reg__\r
+ 1622 01b8 01F0 breq .+2\r
+ 1623 01ba 00C0 rjmp .L93\r
+ 1624 01bc 00C0 rjmp .L75\r
+ 1625 .L88:\r
+ 1626 .LSM124:\r
+ 1627 01be EC81 ldd r30,Y+4\r
+ 1628 01c0 FD81 ldd r31,Y+5\r
+ 1629 01c2 8481 ldd r24,Z+4\r
+ 1630 01c4 2081 ld r18,Z\r
+ 1631 01c6 3181 ldd r19,Z+1\r
+ 1632 .LVL164:\r
+ 1633 01c8 81FF sbrs r24,1\r
+ 1634 01ca 00C0 rjmp .L82\r
+ 1635 .LSM125:\r
+ 1636 01cc C901 movw r24,r18\r
+ 1637 01ce 0E94 0000 call create_chain\r
+ 1638 .LVL165:\r
+ 1639 01d2 AB01 movw r20,r22\r
+ 1640 01d4 BC01 movw r22,r24\r
+ 1641 .LVL166:\r
+ 1642 .LSM126:\r
+ 1643 01d6 4115 cp r20,__zero_reg__\r
+ 1644 01d8 5105 cpc r21,__zero_reg__\r
+ 1645 01da 6105 cpc r22,__zero_reg__\r
+ 1646 01dc 7105 cpc r23,__zero_reg__\r
+ 1647 01de 01F4 brne .L83\r
+ 1648 01e0 6401 movw r12,r8\r
+ 1649 01e2 5301 movw r10,r6\r
+ 1650 01e4 00C0 rjmp .L84\r
+ 1651 .L82:\r
+ 1652 .LSM127:\r
+ 1653 01e6 C901 movw r24,r18\r
+ 1654 01e8 0E94 0000 call get_fat\r
+ 1655 .LVL167:\r
+ 1656 01ec AB01 movw r20,r22\r
+ 1657 01ee BC01 movw r22,r24\r
+ 1658 .LVL168:\r
+ 1659 .L83:\r
+ 1660 .LSM128:\r
+ 1661 01f0 4F3F cpi r20,lo8(-1)\r
+ 1662 01f2 FFEF ldi r31,hi8(-1)\r
+ 1663 01f4 5F07 cpc r21,r31\r
+ 1664 01f6 FFEF ldi r31,hlo8(-1)\r
+ 1665 01f8 6F07 cpc r22,r31\r
+ 1666 01fa FFEF ldi r31,hhi8(-1)\r
+ 1667 01fc 7F07 cpc r23,r31\r
+ 1668 01fe 01F4 brne .L85\r
+ 1669 .L97:\r
+ 1670 0200 AC81 ldd r26,Y+4\r
+ 1671 0202 BD81 ldd r27,Y+5\r
+ 1672 0204 1496 adiw r26,4\r
+ 1673 0206 8C91 ld r24,X\r
+ 1674 0208 1497 sbiw r26,4\r
+ 1675 020a 8068 ori r24,lo8(-128)\r
+ 1676 020c 1496 adiw r26,4\r
+ 1677 020e 8C93 st X,r24\r
+ 1678 0210 B1E0 ldi r27,lo8(1)\r
+ 1679 0212 00C0 rjmp .L95\r
+ 1680 .L85:\r
+ 1681 .LSM129:\r
+ 1682 0214 4230 cpi r20,lo8(2)\r
+ 1683 0216 5105 cpc r21,__zero_reg__\r
+ 1684 0218 6105 cpc r22,__zero_reg__\r
+ 1685 021a 7105 cpc r23,__zero_reg__\r
+ 1686 021c 00F4 brsh .+2\r
+ 1687 021e 00C0 rjmp .L96\r
+ 1688 0220 AC81 ldd r26,Y+4\r
+ 1689 0222 BD81 ldd r27,Y+5\r
+ 1690 0224 ED91 ld r30,X+\r
+ 1691 0226 FC91 ld r31,X\r
+ 1692 0228 828D ldd r24,Z+26\r
+ 1693 022a 938D ldd r25,Z+27\r
+ 1694 022c A48D ldd r26,Z+28\r
+ 1695 022e B58D ldd r27,Z+29\r
+ 1696 0230 4817 cp r20,r24\r
+ 1697 0232 5907 cpc r21,r25\r
+ 1698 0234 6A07 cpc r22,r26\r
+ 1699 0236 7B07 cpc r23,r27\r
+ 1700 0238 00F0 brlo .+2\r
+ 1701 023a 00C0 rjmp .L96\r
+ 1702 .L87:\r
+ 1703 .LSM130:\r
+ 1704 023c AC81 ldd r26,Y+4\r
+ 1705 023e BD81 ldd r27,Y+5\r
+ 1706 0240 5296 adiw r26,18\r
+ 1707 0242 4D93 st X+,r20\r
+ 1708 0244 5D93 st X+,r21\r
+ 1709 0246 6D93 st X+,r22\r
+ 1710 0248 7C93 st X,r23\r
+ 1711 024a 5597 sbiw r26,18+3\r
+ 1712 .LSM131:\r
+ 1713 024c FD01 movw r30,r26\r
+ 1714 024e 8681 ldd r24,Z+6\r
+ 1715 0250 9781 ldd r25,Z+7\r
+ 1716 0252 A085 ldd r26,Z+8\r
+ 1717 0254 B185 ldd r27,Z+9\r
+ 1718 0256 860D add r24,r6\r
+ 1719 0258 971D adc r25,r7\r
+ 1720 025a A81D adc r26,r8\r
+ 1721 025c B91D adc r27,r9\r
+ 1722 025e 8683 std Z+6,r24\r
+ 1723 0260 9783 std Z+7,r25\r
+ 1724 0262 A087 std Z+8,r26\r
+ 1725 0264 B187 std Z+9,r27\r
+ 1726 .LSM132:\r
+ 1727 0266 A618 sub r10,r6\r
+ 1728 0268 B708 sbc r11,r7\r
+ 1729 026a C808 sbc r12,r8\r
+ 1730 026c D908 sbc r13,r9\r
+ 1731 .LVL169:\r
+ 1732 .L93:\r
+ 1733 .LSM133:\r
+ 1734 026e 6A14 cp r6,r10\r
+ 1735 0270 7B04 cpc r7,r11\r
+ 1736 0272 8C04 cpc r8,r12\r
+ 1737 0274 9D04 cpc r9,r13\r
+ 1738 0276 00F4 brsh .+2\r
+ 1739 0278 00C0 rjmp .L88\r
+ 1740 .L84:\r
+ 1741 .LSM134:\r
+ 1742 027a EC81 ldd r30,Y+4\r
+ 1743 027c FD81 ldd r31,Y+5\r
+ 1744 027e 8681 ldd r24,Z+6\r
+ 1745 0280 9781 ldd r25,Z+7\r
+ 1746 0282 A085 ldd r26,Z+8\r
+ 1747 0284 B185 ldd r27,Z+9\r
+ 1748 0286 8A0D add r24,r10\r
+ 1749 0288 9B1D adc r25,r11\r
+ 1750 028a AC1D adc r26,r12\r
+ 1751 028c BD1D adc r27,r13\r
+ 1752 028e 8683 std Z+6,r24\r
+ 1753 0290 9783 std Z+7,r25\r
+ 1754 0292 A087 std Z+8,r26\r
+ 1755 0294 B187 std Z+9,r27\r
+ 1756 .LSM135:\r
+ 1757 0296 D601 movw r26,r12\r
+ 1758 0298 C501 movw r24,r10\r
+ 1759 029a 19E0 ldi r17,9\r
+ 1760 029c B695 1: lsr r27\r
+ 1761 029e A795 ror r26\r
+ 1762 02a0 9795 ror r25\r
+ 1763 02a2 8795 ror r24\r
+ 1764 02a4 1A95 dec r17\r
+ 1765 02a6 01F4 brne 1b\r
+ 1766 02a8 E82E mov r14,r24\r
+ 1767 02aa 8583 std Z+5,r24\r
+ 1768 .LSM136:\r
+ 1769 02ac 8FEF ldi r24,lo8(511)\r
+ 1770 02ae 91E0 ldi r25,hi8(511)\r
+ 1771 02b0 A0E0 ldi r26,hlo8(511)\r
+ 1772 02b2 B0E0 ldi r27,hhi8(511)\r
+ 1773 02b4 A822 and r10,r24\r
+ 1774 02b6 B922 and r11,r25\r
+ 1775 02b8 CA22 and r12,r26\r
+ 1776 02ba DB22 and r13,r27\r
+ 1777 02bc A114 cp r10,__zero_reg__\r
+ 1778 02be B104 cpc r11,__zero_reg__\r
+ 1779 02c0 C104 cpc r12,__zero_reg__\r
+ 1780 02c2 D104 cpc r13,__zero_reg__\r
+ 1781 02c4 01F0 breq .L75\r
+ 1782 .LSM137:\r
+ 1783 02c6 8081 ld r24,Z\r
+ 1784 02c8 9181 ldd r25,Z+1\r
+ 1785 02ca 0E94 0000 call clust2sect\r
+ 1786 .LVL170:\r
+ 1787 .LSM138:\r
+ 1788 02ce 6115 cp r22,__zero_reg__\r
+ 1789 02d0 7105 cpc r23,__zero_reg__\r
+ 1790 02d2 8105 cpc r24,__zero_reg__\r
+ 1791 02d4 9105 cpc r25,__zero_reg__\r
+ 1792 .LVL171:\r
+ 1793 02d6 01F4 brne .L89\r
+ 1794 02d8 AC81 ldd r26,Y+4\r
+ 1795 02da BD81 ldd r27,Y+5\r
+ 1796 02dc 1496 adiw r26,4\r
+ 1797 02de 8C91 ld r24,X\r
+ 1798 02e0 1497 sbiw r26,4\r
+ 1799 02e2 8068 ori r24,lo8(-128)\r
+ 1800 02e4 1496 adiw r26,4\r
+ 1801 02e6 8C93 st X,r24\r
+ 1802 02e8 B2E0 ldi r27,lo8(2)\r
+ 1803 .LVL172:\r
+ 1804 .L95:\r
+ 1805 02ea BB83 std Y+3,r27\r
+ 1806 .LVL173:\r
+ 1807 02ec 00C0 rjmp .L71\r
+ 1808 .LVL174:\r
+ 1809 .L89:\r
+ 1810 .LSM139:\r
+ 1811 02ee 9B01 movw r18,r22\r
+ 1812 02f0 AC01 movw r20,r24\r
+ 1813 02f2 2E0D add r18,r14\r
+ 1814 02f4 311D adc r19,__zero_reg__\r
+ 1815 02f6 411D adc r20,__zero_reg__\r
+ 1816 02f8 511D adc r21,__zero_reg__\r
+ 1817 .LVL175:\r
+ 1818 .LSM140:\r
+ 1819 02fa E394 inc r14\r
+ 1820 02fc EC81 ldd r30,Y+4\r
+ 1821 02fe FD81 ldd r31,Y+5\r
+ 1822 0300 E582 std Z+5,r14\r
+ 1823 0302 00C0 rjmp .L90\r
+ 1824 .LVL176:\r
+ 1825 .L75:\r
+ 1826 0304 20E0 ldi r18,lo8(0)\r
+ 1827 0306 30E0 ldi r19,hi8(0)\r
+ 1828 0308 40E0 ldi r20,hlo8(0)\r
+ 1829 030a 50E0 ldi r21,hhi8(0)\r
+ 1830 .LVL177:\r
+ 1831 .L90:\r
+ 1832 .LSM141:\r
+ 1833 030c EC81 ldd r30,Y+4\r
+ 1834 030e FD81 ldd r31,Y+5\r
+ 1835 0310 8681 ldd r24,Z+6\r
+ 1836 0312 9781 ldd r25,Z+7\r
+ 1837 0314 A085 ldd r26,Z+8\r
+ 1838 0316 B185 ldd r27,Z+9\r
+ 1839 0318 9170 andi r25,hi8(511)\r
+ 1840 031a A070 andi r26,hlo8(511)\r
+ 1841 031c B070 andi r27,hhi8(511)\r
+ 1842 031e 0097 sbiw r24,0\r
+ 1843 0320 A105 cpc r26,__zero_reg__\r
+ 1844 0322 B105 cpc r27,__zero_reg__\r
+ 1845 0324 01F0 breq .L91\r
+ 1846 0326 8689 ldd r24,Z+22\r
+ 1847 0328 9789 ldd r25,Z+23\r
+ 1848 032a A08D ldd r26,Z+24\r
+ 1849 032c B18D ldd r27,Z+25\r
+ 1850 032e 2817 cp r18,r24\r
+ 1851 0330 3907 cpc r19,r25\r
+ 1852 0332 4A07 cpc r20,r26\r
+ 1853 0334 5B07 cpc r21,r27\r
+ 1854 0336 01F0 breq .L91\r
+ 1855 .LSM142:\r
+ 1856 0338 268B std Z+22,r18\r
+ 1857 033a 378B std Z+23,r19\r
+ 1858 033c 408F std Z+24,r20\r
+ 1859 033e 518F std Z+25,r21\r
+ 1860 .L91:\r
+ 1861 .LSM143:\r
+ 1862 0340 EC81 ldd r30,Y+4\r
+ 1863 0342 FD81 ldd r31,Y+5\r
+ 1864 0344 2681 ldd r18,Z+6\r
+ 1865 0346 3781 ldd r19,Z+7\r
+ 1866 0348 4085 ldd r20,Z+8\r
+ 1867 034a 5185 ldd r21,Z+9\r
+ 1868 .LVL178:\r
+ 1869 034c 8285 ldd r24,Z+10\r
+ 1870 034e 9385 ldd r25,Z+11\r
+ 1871 0350 A485 ldd r26,Z+12\r
+ 1872 0352 B585 ldd r27,Z+13\r
+ 1873 0354 8217 cp r24,r18\r
+ 1874 0356 9307 cpc r25,r19\r
+ 1875 0358 A407 cpc r26,r20\r
+ 1876 035a B507 cpc r27,r21\r
+ 1877 035c 00F4 brsh .L71\r
+ 1878 .LSM144:\r
+ 1879 035e 2287 std Z+10,r18\r
+ 1880 0360 3387 std Z+11,r19\r
+ 1881 0362 4487 std Z+12,r20\r
+ 1882 0364 5587 std Z+13,r21\r
+ 1883 .LSM145:\r
+ 1884 0366 8481 ldd r24,Z+4\r
+ 1885 0368 8062 ori r24,lo8(32)\r
+ 1886 036a 8483 std Z+4,r24\r
+ 1887 .LVL179:\r
+ 1888 .L71:\r
+ 1889 .LSM146:\r
+ 1890 036c 8B81 ldd r24,Y+3\r
+ 1891 /* epilogue start */\r
+ 1892 036e 0F90 pop __tmp_reg__\r
+ 1893 0370 0F90 pop __tmp_reg__\r
+ 1894 0372 0F90 pop __tmp_reg__\r
+ 1895 0374 0F90 pop __tmp_reg__\r
+ 1896 0376 0F90 pop __tmp_reg__\r
+ 1897 0378 CF91 pop r28\r
+ 1898 037a DF91 pop r29\r
+ 1899 037c 1F91 pop r17\r
+ 1900 037e 0F91 pop r16\r
+ 1901 0380 FF90 pop r15\r
+ 1902 0382 EF90 pop r14\r
+ 1903 0384 DF90 pop r13\r
+ 1904 0386 CF90 pop r12\r
+ 1905 0388 BF90 pop r11\r
+ 1906 038a AF90 pop r10\r
+ 1907 .LVL180:\r
+ 1908 038c 9F90 pop r9\r
+ 1909 038e 8F90 pop r8\r
+ 1910 .LVL181:\r
+ 1911 0390 7F90 pop r7\r
+ 1912 .LVL182:\r
+ 1913 0392 6F90 pop r6\r
+ 1914 .LVL183:\r
+ 1915 0394 5F90 pop r5\r
+ 1916 0396 4F90 pop r4\r
+ 1917 0398 3F90 pop r3\r
+ 1918 039a 2F90 pop r2\r
+ 1919 039c 0895 ret\r
+ 1920 .LFE78:\r
+ 1922 .section .text.dir_seek,"ax",@progbits\r
+ 1924 dir_seek:\r
+ 1925 .LFB63:\r
+ 1926 .LSM147:\r
+ 1927 .LVL184:\r
+ 1928 0000 EF92 push r14\r
+ 1929 0002 FF92 push r15\r
+ 1930 0004 0F93 push r16\r
+ 1931 0006 1F93 push r17\r
+ 1932 0008 CF93 push r28\r
+ 1933 000a DF93 push r29\r
+ 1934 /* prologue: function */\r
+ 1935 /* frame size = 0 */\r
+ 1936 000c 8C01 movw r16,r24\r
+ 1937 000e EB01 movw r28,r22\r
+ 1938 .LSM148:\r
+ 1939 0010 DC01 movw r26,r24\r
+ 1940 0012 1596 adiw r26,4+1\r
+ 1941 0014 7C93 st X,r23\r
+ 1942 0016 6E93 st -X,r22\r
+ 1943 0018 1497 sbiw r26,4\r
+ 1944 .LSM149:\r
+ 1945 001a 1696 adiw r26,6\r
+ 1946 001c 4D91 ld r20,X+\r
+ 1947 001e 5D91 ld r21,X+\r
+ 1948 0020 6D91 ld r22,X+\r
+ 1949 0022 7C91 ld r23,X\r
+ 1950 0024 1997 sbiw r26,6+3\r
+ 1951 .LVL185:\r
+ 1952 .LSM150:\r
+ 1953 0026 4130 cpi r20,lo8(1)\r
+ 1954 0028 5105 cpc r21,__zero_reg__\r
+ 1955 002a 6105 cpc r22,__zero_reg__\r
+ 1956 002c 7105 cpc r23,__zero_reg__\r
+ 1957 002e 01F4 brne .+2\r
+ 1958 0030 00C0 rjmp .L99\r
+ 1959 0032 ED91 ld r30,X+\r
+ 1960 0034 FC91 ld r31,X\r
+ 1961 0036 828D ldd r24,Z+26\r
+ 1962 0038 938D ldd r25,Z+27\r
+ 1963 003a A48D ldd r26,Z+28\r
+ 1964 003c B58D ldd r27,Z+29\r
+ 1965 .LVL186:\r
+ 1966 003e 4817 cp r20,r24\r
+ 1967 0040 5907 cpc r21,r25\r
+ 1968 0042 6A07 cpc r22,r26\r
+ 1969 0044 7B07 cpc r23,r27\r
+ 1970 0046 00F0 brlo .+2\r
+ 1971 0048 00C0 rjmp .L99\r
+ 1972 .LSM151:\r
+ 1973 004a 4115 cp r20,__zero_reg__\r
+ 1974 004c 5105 cpc r21,__zero_reg__\r
+ 1975 004e 6105 cpc r22,__zero_reg__\r
+ 1976 0050 7105 cpc r23,__zero_reg__\r
+ 1977 0052 01F4 brne .L100\r
+ 1978 0054 8081 ld r24,Z\r
+ 1979 0056 8330 cpi r24,lo8(3)\r
+ 1980 0058 01F4 brne .L101\r
+ 1981 .LSM152:\r
+ 1982 005a 42A1 ldd r20,Z+34\r
+ 1983 005c 53A1 ldd r21,Z+35\r
+ 1984 005e 64A1 ldd r22,Z+36\r
+ 1985 0060 75A1 ldd r23,Z+37\r
+ 1986 .LSM153:\r
+ 1987 0062 4115 cp r20,__zero_reg__\r
+ 1988 0064 5105 cpc r21,__zero_reg__\r
+ 1989 0066 6105 cpc r22,__zero_reg__\r
+ 1990 0068 7105 cpc r23,__zero_reg__\r
+ 1991 006a 01F4 brne .L100\r
+ 1992 .L101:\r
+ 1993 .LSM154:\r
+ 1994 006c F801 movw r30,r16\r
+ 1995 006e 1286 std Z+10,__zero_reg__\r
+ 1996 0070 1386 std Z+11,__zero_reg__\r
+ 1997 0072 1486 std Z+12,__zero_reg__\r
+ 1998 0074 1586 std Z+13,__zero_reg__\r
+ 1999 .LSM155:\r
+ 2000 0076 0190 ld __tmp_reg__,Z+\r
+ 2001 0078 F081 ld r31,Z\r
+ 2002 007a E02D mov r30,__tmp_reg__\r
+ 2003 007c 8085 ldd r24,Z+8\r
+ 2004 007e 9185 ldd r25,Z+9\r
+ 2005 0080 C817 cp r28,r24\r
+ 2006 0082 D907 cpc r29,r25\r
+ 2007 0084 00F0 brlo .+2\r
+ 2008 0086 00C0 rjmp .L99\r
+ 2009 .LVL187:\r
+ 2010 .LSM156:\r
+ 2011 0088 CE01 movw r24,r28\r
+ 2012 008a A4E0 ldi r26,4\r
+ 2013 008c 9695 1: lsr r25\r
+ 2014 008e 8795 ror r24\r
+ 2015 0090 AA95 dec r26\r
+ 2016 0092 01F4 brne 1b\r
+ 2017 0094 A0E0 ldi r26,lo8(0)\r
+ 2018 0096 B0E0 ldi r27,hi8(0)\r
+ 2019 0098 22A1 ldd r18,Z+34\r
+ 2020 009a 33A1 ldd r19,Z+35\r
+ 2021 009c 44A1 ldd r20,Z+36\r
+ 2022 009e 55A1 ldd r21,Z+37\r
+ 2023 00a0 820F add r24,r18\r
+ 2024 00a2 931F adc r25,r19\r
+ 2025 00a4 A41F adc r26,r20\r
+ 2026 00a6 B51F adc r27,r21\r
+ 2027 00a8 F801 movw r30,r16\r
+ 2028 00aa 8687 std Z+14,r24\r
+ 2029 00ac 9787 std Z+15,r25\r
+ 2030 00ae A08B std Z+16,r26\r
+ 2031 00b0 B18B std Z+17,r27\r
+ 2032 00b2 00C0 rjmp .L102\r
+ 2033 .LVL188:\r
+ 2034 .L100:\r
+ 2035 .LSM157:\r
+ 2036 00b4 8281 ldd r24,Z+2\r
+ 2037 00b6 E82E mov r14,r24\r
+ 2038 .LVL189:\r
+ 2039 00b8 FF24 clr r15\r
+ 2040 .LVL190:\r
+ 2041 00ba E4E0 ldi r30,4\r
+ 2042 00bc EE0C 1: lsl r14\r
+ 2043 00be FF1C rol r15\r
+ 2044 00c0 EA95 dec r30\r
+ 2045 00c2 01F4 brne 1b\r
+ 2046 .LVL191:\r
+ 2047 00c4 00C0 rjmp .L103\r
+ 2048 .LVL192:\r
+ 2049 .L106:\r
+ 2050 .LSM158:\r
+ 2051 00c6 0E94 0000 call get_fat\r
+ 2052 .LVL193:\r
+ 2053 00ca AB01 movw r20,r22\r
+ 2054 00cc BC01 movw r22,r24\r
+ 2055 .LVL194:\r
+ 2056 .LSM159:\r
+ 2057 00ce 4F3F cpi r20,lo8(-1)\r
+ 2058 00d0 FFEF ldi r31,hi8(-1)\r
+ 2059 00d2 5F07 cpc r21,r31\r
+ 2060 00d4 FFEF ldi r31,hlo8(-1)\r
+ 2061 00d6 6F07 cpc r22,r31\r
+ 2062 00d8 FFEF ldi r31,hhi8(-1)\r
+ 2063 00da 7F07 cpc r23,r31\r
+ 2064 00dc 01F4 brne .L104\r
+ 2065 00de 81E0 ldi r24,lo8(1)\r
+ 2066 00e0 00C0 rjmp .L105\r
+ 2067 .L104:\r
+ 2068 .LSM160:\r
+ 2069 00e2 4230 cpi r20,lo8(2)\r
+ 2070 00e4 5105 cpc r21,__zero_reg__\r
+ 2071 00e6 6105 cpc r22,__zero_reg__\r
+ 2072 00e8 7105 cpc r23,__zero_reg__\r
+ 2073 00ea 00F4 brsh .+2\r
+ 2074 00ec 00C0 rjmp .L99\r
+ 2075 00ee D801 movw r26,r16\r
+ 2076 00f0 ED91 ld r30,X+\r
+ 2077 00f2 FC91 ld r31,X\r
+ 2078 00f4 828D ldd r24,Z+26\r
+ 2079 00f6 938D ldd r25,Z+27\r
+ 2080 00f8 A48D ldd r26,Z+28\r
+ 2081 00fa B58D ldd r27,Z+29\r
+ 2082 00fc 4817 cp r20,r24\r
+ 2083 00fe 5907 cpc r21,r25\r
+ 2084 0100 6A07 cpc r22,r26\r
+ 2085 0102 7B07 cpc r23,r27\r
+ 2086 0104 00F4 brsh .L99\r
+ 2087 .LSM161:\r
+ 2088 0106 CE19 sub r28,r14\r
+ 2089 0108 DF09 sbc r29,r15\r
+ 2090 .LVL195:\r
+ 2091 .L103:\r
+ 2092 010a F801 movw r30,r16\r
+ 2093 010c 8081 ld r24,Z\r
+ 2094 010e 9181 ldd r25,Z+1\r
+ 2095 .LSM162:\r
+ 2096 0110 CE15 cp r28,r14\r
+ 2097 0112 DF05 cpc r29,r15\r
+ 2098 0114 00F4 brsh .L106\r
+ 2099 .LSM163:\r
+ 2100 0116 D801 movw r26,r16\r
+ 2101 0118 1A96 adiw r26,10\r
+ 2102 011a 4D93 st X+,r20\r
+ 2103 011c 5D93 st X+,r21\r
+ 2104 011e 6D93 st X+,r22\r
+ 2105 0120 7C93 st X,r23\r
+ 2106 0122 1D97 sbiw r26,10+3\r
+ 2107 .LSM164:\r
+ 2108 0124 0E94 0000 call clust2sect\r
+ 2109 .LVL196:\r
+ 2110 0128 9E01 movw r18,r28\r
+ 2111 012a 44E0 ldi r20,4\r
+ 2112 012c 3695 1: lsr r19\r
+ 2113 012e 2795 ror r18\r
+ 2114 0130 4A95 dec r20\r
+ 2115 0132 01F4 brne 1b\r
+ 2116 0134 40E0 ldi r20,lo8(0)\r
+ 2117 0136 50E0 ldi r21,hi8(0)\r
+ 2118 0138 260F add r18,r22\r
+ 2119 013a 371F adc r19,r23\r
+ 2120 013c 481F adc r20,r24\r
+ 2121 013e 591F adc r21,r25\r
+ 2122 0140 F801 movw r30,r16\r
+ 2123 0142 2687 std Z+14,r18\r
+ 2124 0144 3787 std Z+15,r19\r
+ 2125 0146 408B std Z+16,r20\r
+ 2126 0148 518B std Z+17,r21\r
+ 2127 .LVL197:\r
+ 2128 .L102:\r
+ 2129 .LSM165:\r
+ 2130 014a CF70 andi r28,lo8(15)\r
+ 2131 014c D070 andi r29,hi8(15)\r
+ 2132 014e 85E0 ldi r24,5\r
+ 2133 0150 CC0F 1: lsl r28\r
+ 2134 0152 DD1F rol r29\r
+ 2135 0154 8A95 dec r24\r
+ 2136 0156 01F4 brne 1b\r
+ 2137 0158 AE96 adiw r28,46\r
+ 2138 015a D801 movw r26,r16\r
+ 2139 015c 8D91 ld r24,X+\r
+ 2140 015e 9C91 ld r25,X\r
+ 2141 0160 1197 sbiw r26,1\r
+ 2142 0162 8C0F add r24,r28\r
+ 2143 0164 9D1F adc r25,r29\r
+ 2144 0166 5396 adiw r26,18+1\r
+ 2145 0168 9C93 st X,r25\r
+ 2146 016a 8E93 st -X,r24\r
+ 2147 016c 5297 sbiw r26,18\r
+ 2148 016e 80E0 ldi r24,lo8(0)\r
+ 2149 0170 00C0 rjmp .L105\r
+ 2150 .LVL198:\r
+ 2151 .L99:\r
+ 2152 .LSM166:\r
+ 2153 0172 82E0 ldi r24,lo8(2)\r
+ 2154 .L105:\r
+ 2155 /* epilogue start */\r
+ 2156 .LSM167:\r
+ 2157 0174 DF91 pop r29\r
+ 2158 0176 CF91 pop r28\r
+ 2159 .LVL199:\r
+ 2160 0178 1F91 pop r17\r
+ 2161 017a 0F91 pop r16\r
+ 2162 .LVL200:\r
+ 2163 017c FF90 pop r15\r
+ 2164 .LVL201:\r
+ 2165 017e EF90 pop r14\r
+ 2166 .LVL202:\r
+ 2167 0180 0895 ret\r
+ 2168 .LFE63:\r
+ 2170 .section .text.f_write,"ax",@progbits\r
+ 2171 .global f_write\r
+ 2173 f_write:\r
+ 2174 .LFB75:\r
+ 2175 .LSM168:\r
+ 2176 .LVL203:\r
+ 2177 0000 2F92 push r2\r
+ 2178 0002 3F92 push r3\r
+ 2179 0004 4F92 push r4\r
+ 2180 0006 5F92 push r5\r
+ 2181 0008 6F92 push r6\r
+ 2182 000a 7F92 push r7\r
+ 2183 000c 8F92 push r8\r
+ 2184 000e 9F92 push r9\r
+ 2185 0010 AF92 push r10\r
+ 2186 0012 BF92 push r11\r
+ 2187 0014 CF92 push r12\r
+ 2188 0016 DF92 push r13\r
+ 2189 0018 EF92 push r14\r
+ 2190 001a FF92 push r15\r
+ 2191 001c 0F93 push r16\r
+ 2192 001e 1F93 push r17\r
+ 2193 0020 CF93 push r28\r
+ 2194 0022 DF93 push r29\r
+ 2195 /* prologue: function */\r
+ 2196 /* frame size = 0 */\r
+ 2197 0024 EC01 movw r28,r24\r
+ 2198 0026 162F mov r17,r22\r
+ 2199 0028 072F mov r16,r23\r
+ 2200 .LVL204:\r
+ 2201 002a 4A01 movw r8,r20\r
+ 2202 002c 1901 movw r2,r18\r
+ 2203 .LSM169:\r
+ 2204 002e F901 movw r30,r18\r
+ 2205 0030 1182 std Z+1,__zero_reg__\r
+ 2206 0032 1082 st Z,__zero_reg__\r
+ 2207 .LSM170:\r
+ 2208 0034 6A81 ldd r22,Y+2\r
+ 2209 0036 7B81 ldd r23,Y+3\r
+ 2210 .LVL205:\r
+ 2211 0038 8881 ld r24,Y\r
+ 2212 003a 9981 ldd r25,Y+1\r
+ 2213 .LVL206:\r
+ 2214 003c 0E94 0000 call validate\r
+ 2215 .LVL207:\r
+ 2216 0040 782E mov r7,r24\r
+ 2217 .LVL208:\r
+ 2218 .LSM171:\r
+ 2219 0042 8823 tst r24\r
+ 2220 0044 01F0 breq .+2\r
+ 2221 0046 00C0 rjmp .L109\r
+ 2222 .LVL209:\r
+ 2223 .LSM172:\r
+ 2224 0048 8C81 ldd r24,Y+4\r
+ 2225 .LVL210:\r
+ 2226 004a 87FD sbrc r24,7\r
+ 2227 004c 00C0 rjmp .L136\r
+ 2228 .L110:\r
+ 2229 .LSM173:\r
+ 2230 004e 81FD sbrc r24,1\r
+ 2231 0050 00C0 rjmp .L111\r
+ 2232 0052 27E0 ldi r18,lo8(7)\r
+ 2233 0054 722E mov r7,r18\r
+ 2234 0056 00C0 rjmp .L109\r
+ 2235 .L111:\r
+ 2236 .LSM174:\r
+ 2237 0058 2A85 ldd r18,Y+10\r
+ 2238 005a 3B85 ldd r19,Y+11\r
+ 2239 005c 4C85 ldd r20,Y+12\r
+ 2240 005e 5D85 ldd r21,Y+13\r
+ 2241 0060 C401 movw r24,r8\r
+ 2242 0062 A0E0 ldi r26,lo8(0)\r
+ 2243 0064 B0E0 ldi r27,hi8(0)\r
+ 2244 .LVL211:\r
+ 2245 0066 820F add r24,r18\r
+ 2246 0068 931F adc r25,r19\r
+ 2247 006a A41F adc r26,r20\r
+ 2248 006c B51F adc r27,r21\r
+ 2249 .LVL212:\r
+ 2250 006e 8217 cp r24,r18\r
+ 2251 0070 9307 cpc r25,r19\r
+ 2252 0072 A407 cpc r26,r20\r
+ 2253 0074 B507 cpc r27,r21\r
+ 2254 0076 00F4 brsh .L112\r
+ 2255 0078 8824 clr r8\r
+ 2256 007a 9924 clr r9\r
+ 2257 .LVL213:\r
+ 2258 .L112:\r
+ 2259 .LSM175:\r
+ 2260 007c 812F mov r24,r17\r
+ 2261 .LVL214:\r
+ 2262 007e 902F mov r25,r16\r
+ 2263 .LVL215:\r
+ 2264 0080 9C01 movw r18,r24\r
+ 2265 .LVL216:\r
+ 2266 0082 2901 movw r4,r18\r
+ 2267 .LVL217:\r
+ 2268 .LSM176:\r
+ 2269 0084 6624 clr r6\r
+ 2270 0086 6394 inc r6\r
+ 2271 0088 00C0 rjmp .L113\r
+ 2272 .LVL218:\r
+ 2273 .L133:\r
+ 2274 .LSM177:\r
+ 2275 008a 2E81 ldd r18,Y+6\r
+ 2276 008c 3F81 ldd r19,Y+7\r
+ 2277 008e 4885 ldd r20,Y+8\r
+ 2278 0090 5985 ldd r21,Y+9\r
+ 2279 0092 DA01 movw r26,r20\r
+ 2280 0094 C901 movw r24,r18\r
+ 2281 0096 9170 andi r25,hi8(511)\r
+ 2282 0098 A070 andi r26,hlo8(511)\r
+ 2283 009a B070 andi r27,hhi8(511)\r
+ 2284 009c 0097 sbiw r24,0\r
+ 2285 009e A105 cpc r26,__zero_reg__\r
+ 2286 00a0 B105 cpc r27,__zero_reg__\r
+ 2287 00a2 01F0 breq .+2\r
+ 2288 00a4 00C0 rjmp .L114\r
+ 2289 .LSM178:\r
+ 2290 00a6 E881 ld r30,Y\r
+ 2291 00a8 F981 ldd r31,Y+1\r
+ 2292 00aa 9D81 ldd r25,Y+5\r
+ 2293 .LVL219:\r
+ 2294 00ac 8281 ldd r24,Z+2\r
+ 2295 00ae 9817 cp r25,r24\r
+ 2296 00b0 00F4 brsh .+2\r
+ 2297 00b2 00C0 rjmp .L115\r
+ 2298 .LSM179:\r
+ 2299 00b4 2115 cp r18,__zero_reg__\r
+ 2300 00b6 3105 cpc r19,__zero_reg__\r
+ 2301 00b8 4105 cpc r20,__zero_reg__\r
+ 2302 00ba 5105 cpc r21,__zero_reg__\r
+ 2303 00bc 01F4 brne .L116\r
+ 2304 .LSM180:\r
+ 2305 00be 6E85 ldd r22,Y+14\r
+ 2306 00c0 7F85 ldd r23,Y+15\r
+ 2307 00c2 8889 ldd r24,Y+16\r
+ 2308 00c4 9989 ldd r25,Y+17\r
+ 2309 .LVL220:\r
+ 2310 .LSM181:\r
+ 2311 00c6 6115 cp r22,__zero_reg__\r
+ 2312 00c8 7105 cpc r23,__zero_reg__\r
+ 2313 00ca 8105 cpc r24,__zero_reg__\r
+ 2314 00cc 9105 cpc r25,__zero_reg__\r
+ 2315 00ce 01F4 brne .L117\r
+ 2316 .LSM182:\r
+ 2317 00d0 CF01 movw r24,r30\r
+ 2318 00d2 40E0 ldi r20,lo8(0)\r
+ 2319 00d4 50E0 ldi r21,hi8(0)\r
+ 2320 00d6 60E0 ldi r22,hlo8(0)\r
+ 2321 00d8 70E0 ldi r23,hhi8(0)\r
+ 2322 00da 0E94 0000 call create_chain\r
+ 2323 .LVL221:\r
+ 2324 00de 6E87 std Y+14,r22\r
+ 2325 00e0 7F87 std Y+15,r23\r
+ 2326 00e2 888B std Y+16,r24\r
+ 2327 00e4 998B std Y+17,r25\r
+ 2328 .LVL222:\r
+ 2329 00e6 00C0 rjmp .L118\r
+ 2330 .LVL223:\r
+ 2331 .L116:\r
+ 2332 .LSM183:\r
+ 2333 00e8 4A89 ldd r20,Y+18\r
+ 2334 00ea 5B89 ldd r21,Y+19\r
+ 2335 00ec 6C89 ldd r22,Y+20\r
+ 2336 00ee 7D89 ldd r23,Y+21\r
+ 2337 00f0 CF01 movw r24,r30\r
+ 2338 00f2 0E94 0000 call create_chain\r
+ 2339 .LVL224:\r
+ 2340 .L118:\r
+ 2341 .LSM184:\r
+ 2342 00f6 6115 cp r22,__zero_reg__\r
+ 2343 00f8 7105 cpc r23,__zero_reg__\r
+ 2344 00fa 8105 cpc r24,__zero_reg__\r
+ 2345 00fc 9105 cpc r25,__zero_reg__\r
+ 2346 00fe 01F4 brne .+2\r
+ 2347 0100 00C0 rjmp .L119\r
+ 2348 .LVL225:\r
+ 2349 .L117:\r
+ 2350 .LSM185:\r
+ 2351 0102 6130 cpi r22,lo8(1)\r
+ 2352 0104 7105 cpc r23,__zero_reg__\r
+ 2353 0106 8105 cpc r24,__zero_reg__\r
+ 2354 0108 9105 cpc r25,__zero_reg__\r
+ 2355 010a 01F4 brne .L120\r
+ 2356 .LVL226:\r
+ 2357 .L138:\r
+ 2358 010c 8C81 ldd r24,Y+4\r
+ 2359 010e 8068 ori r24,lo8(-128)\r
+ 2360 0110 8C83 std Y+4,r24\r
+ 2361 .L136:\r
+ 2362 0112 92E0 ldi r25,lo8(2)\r
+ 2363 0114 792E mov r7,r25\r
+ 2364 0116 00C0 rjmp .L109\r
+ 2365 .LVL227:\r
+ 2366 .L120:\r
+ 2367 .LSM186:\r
+ 2368 0118 6F3F cpi r22,lo8(-1)\r
+ 2369 011a FFEF ldi r31,hi8(-1)\r
+ 2370 011c 7F07 cpc r23,r31\r
+ 2371 011e FFEF ldi r31,hlo8(-1)\r
+ 2372 0120 8F07 cpc r24,r31\r
+ 2373 0122 FFEF ldi r31,hhi8(-1)\r
+ 2374 0124 9F07 cpc r25,r31\r
+ 2375 0126 01F4 brne .+2\r
+ 2376 0128 00C0 rjmp .L137\r
+ 2377 .L121:\r
+ 2378 .LSM187:\r
+ 2379 012a 6A8B std Y+18,r22\r
+ 2380 012c 7B8B std Y+19,r23\r
+ 2381 012e 8C8B std Y+20,r24\r
+ 2382 0130 9D8B std Y+21,r25\r
+ 2383 .LSM188:\r
+ 2384 0132 1D82 std Y+5,__zero_reg__\r
+ 2385 .L115:\r
+ 2386 .LSM189:\r
+ 2387 0134 E881 ld r30,Y\r
+ 2388 0136 F981 ldd r31,Y+1\r
+ 2389 0138 22A5 ldd r18,Z+42\r
+ 2390 013a 33A5 ldd r19,Z+43\r
+ 2391 013c 44A5 ldd r20,Z+44\r
+ 2392 013e 55A5 ldd r21,Z+45\r
+ 2393 0140 8E89 ldd r24,Y+22\r
+ 2394 0142 9F89 ldd r25,Y+23\r
+ 2395 0144 A88D ldd r26,Y+24\r
+ 2396 0146 B98D ldd r27,Y+25\r
+ 2397 0148 2817 cp r18,r24\r
+ 2398 014a 3907 cpc r19,r25\r
+ 2399 014c 4A07 cpc r20,r26\r
+ 2400 014e 5B07 cpc r21,r27\r
+ 2401 0150 01F4 brne .L122\r
+ 2402 0152 CF01 movw r24,r30\r
+ 2403 0154 40E0 ldi r20,lo8(0)\r
+ 2404 0156 50E0 ldi r21,hi8(0)\r
+ 2405 0158 60E0 ldi r22,hlo8(0)\r
+ 2406 015a 70E0 ldi r23,hhi8(0)\r
+ 2407 015c 0E94 0000 call move_window\r
+ 2408 .LVL228:\r
+ 2409 0160 8823 tst r24\r
+ 2410 0162 01F0 breq .+2\r
+ 2411 0164 00C0 rjmp .L137\r
+ 2412 .LVL229:\r
+ 2413 .L122:\r
+ 2414 .LSM190:\r
+ 2415 0166 0881 ld r16,Y\r
+ 2416 0168 1981 ldd r17,Y+1\r
+ 2417 .LVL230:\r
+ 2418 016a 4A89 ldd r20,Y+18\r
+ 2419 016c 5B89 ldd r21,Y+19\r
+ 2420 016e 6C89 ldd r22,Y+20\r
+ 2421 0170 7D89 ldd r23,Y+21\r
+ 2422 0172 C801 movw r24,r16\r
+ 2423 0174 0E94 0000 call clust2sect\r
+ 2424 .LVL231:\r
+ 2425 .LSM191:\r
+ 2426 0178 6115 cp r22,__zero_reg__\r
+ 2427 017a 7105 cpc r23,__zero_reg__\r
+ 2428 017c 8105 cpc r24,__zero_reg__\r
+ 2429 017e 9105 cpc r25,__zero_reg__\r
+ 2430 0180 01F0 breq .L138\r
+ 2431 .LVL232:\r
+ 2432 .L123:\r
+ 2433 .LSM192:\r
+ 2434 0182 3D81 ldd r19,Y+5\r
+ 2435 0184 5B01 movw r10,r22\r
+ 2436 0186 6C01 movw r12,r24\r
+ 2437 0188 A30E add r10,r19\r
+ 2438 018a B11C adc r11,__zero_reg__\r
+ 2439 018c C11C adc r12,__zero_reg__\r
+ 2440 018e D11C adc r13,__zero_reg__\r
+ 2441 .LVL233:\r
+ 2442 .LSM193:\r
+ 2443 0190 7401 movw r14,r8\r
+ 2444 0192 EF2C mov r14,r15\r
+ 2445 0194 FF24 clr r15\r
+ 2446 0196 E694 lsr r14\r
+ 2447 .LSM194:\r
+ 2448 0198 E114 cp r14,__zero_reg__\r
+ 2449 019a F104 cpc r15,__zero_reg__\r
+ 2450 019c 01F4 brne .+2\r
+ 2451 019e 00C0 rjmp .L124\r
+ 2452 .LSM195:\r
+ 2453 01a0 F801 movw r30,r16\r
+ 2454 01a2 2281 ldd r18,Z+2\r
+ 2455 01a4 432F mov r20,r19\r
+ 2456 01a6 50E0 ldi r21,lo8(0)\r
+ 2457 01a8 C701 movw r24,r14\r
+ 2458 01aa 840F add r24,r20\r
+ 2459 01ac 951F adc r25,r21\r
+ 2460 01ae 30E0 ldi r19,lo8(0)\r
+ 2461 01b0 2817 cp r18,r24\r
+ 2462 01b2 3907 cpc r19,r25\r
+ 2463 01b4 00F4 brsh .L125\r
+ 2464 .LSM196:\r
+ 2465 01b6 7901 movw r14,r18\r
+ 2466 01b8 E41A sub r14,r20\r
+ 2467 01ba F50A sbc r15,r21\r
+ 2468 .L125:\r
+ 2469 .LSM197:\r
+ 2470 01bc F801 movw r30,r16\r
+ 2471 01be 8181 ldd r24,Z+1\r
+ 2472 01c0 B201 movw r22,r4\r
+ 2473 01c2 A601 movw r20,r12\r
+ 2474 01c4 9501 movw r18,r10\r
+ 2475 01c6 0E2D mov r16,r14\r
+ 2476 01c8 0E94 0000 call disk_write\r
+ 2477 01cc 8823 tst r24\r
+ 2478 01ce 01F0 breq .+2\r
+ 2479 01d0 00C0 rjmp .L137\r
+ 2480 .L126:\r
+ 2481 .LSM198:\r
+ 2482 01d2 E881 ld r30,Y\r
+ 2483 01d4 F981 ldd r31,Y+1\r
+ 2484 01d6 22A5 ldd r18,Z+42\r
+ 2485 01d8 33A5 ldd r19,Z+43\r
+ 2486 01da 44A5 ldd r20,Z+44\r
+ 2487 01dc 55A5 ldd r21,Z+45\r
+ 2488 01de 2A19 sub r18,r10\r
+ 2489 01e0 3B09 sbc r19,r11\r
+ 2490 01e2 4C09 sbc r20,r12\r
+ 2491 01e4 5D09 sbc r21,r13\r
+ 2492 01e6 C701 movw r24,r14\r
+ 2493 01e8 A0E0 ldi r26,lo8(0)\r
+ 2494 01ea B0E0 ldi r27,hi8(0)\r
+ 2495 .LVL234:\r
+ 2496 01ec 2817 cp r18,r24\r
+ 2497 01ee 3907 cpc r19,r25\r
+ 2498 01f0 4A07 cpc r20,r26\r
+ 2499 01f2 5B07 cpc r21,r27\r
+ 2500 01f4 00F4 brsh .L127\r
+ 2501 .LVL235:\r
+ 2502 .LSM199:\r
+ 2503 01f6 19E0 ldi r17,9\r
+ 2504 01f8 220F 1: lsl r18\r
+ 2505 01fa 331F rol r19\r
+ 2506 01fc 441F rol r20\r
+ 2507 01fe 551F rol r21\r
+ 2508 0200 1A95 dec r17\r
+ 2509 0202 01F4 brne 1b\r
+ 2510 .LVL236:\r
+ 2511 0204 B201 movw r22,r4\r
+ 2512 0206 620F add r22,r18\r
+ 2513 0208 731F adc r23,r19\r
+ 2514 020a CF01 movw r24,r30\r
+ 2515 .LVL237:\r
+ 2516 020c 8E96 adiw r24,46\r
+ 2517 020e 40E0 ldi r20,lo8(512)\r
+ 2518 0210 52E0 ldi r21,hi8(512)\r
+ 2519 0212 0E94 0000 call mem_cpy\r
+ 2520 .LVL238:\r
+ 2521 .LSM200:\r
+ 2522 0216 E881 ld r30,Y\r
+ 2523 0218 F981 ldd r31,Y+1\r
+ 2524 021a 1482 std Z+4,__zero_reg__\r
+ 2525 .LVL239:\r
+ 2526 .L127:\r
+ 2527 .LSM201:\r
+ 2528 021c 8D81 ldd r24,Y+5\r
+ 2529 021e 8E0D add r24,r14\r
+ 2530 0220 8D83 std Y+5,r24\r
+ 2531 .LSM202:\r
+ 2532 0222 8701 movw r16,r14\r
+ 2533 .LVL240:\r
+ 2534 0224 102F mov r17,r16\r
+ 2535 0226 0027 clr r16\r
+ 2536 0228 110F lsl r17\r
+ 2537 022a 00C0 rjmp .L128\r
+ 2538 .LVL241:\r
+ 2539 .L124:\r
+ 2540 .LSM203:\r
+ 2541 022c 2E81 ldd r18,Y+6\r
+ 2542 022e 3F81 ldd r19,Y+7\r
+ 2543 0230 4885 ldd r20,Y+8\r
+ 2544 0232 5985 ldd r21,Y+9\r
+ 2545 0234 8A85 ldd r24,Y+10\r
+ 2546 0236 9B85 ldd r25,Y+11\r
+ 2547 0238 AC85 ldd r26,Y+12\r
+ 2548 023a BD85 ldd r27,Y+13\r
+ 2549 023c 2817 cp r18,r24\r
+ 2550 023e 3907 cpc r19,r25\r
+ 2551 0240 4A07 cpc r20,r26\r
+ 2552 0242 5B07 cpc r21,r27\r
+ 2553 0244 00F0 brlo .L129\r
+ 2554 .LSM204:\r
+ 2555 0246 C801 movw r24,r16\r
+ 2556 0248 40E0 ldi r20,lo8(0)\r
+ 2557 024a 50E0 ldi r21,hi8(0)\r
+ 2558 024c 60E0 ldi r22,hlo8(0)\r
+ 2559 024e 70E0 ldi r23,hhi8(0)\r
+ 2560 0250 0E94 0000 call move_window\r
+ 2561 0254 8823 tst r24\r
+ 2562 0256 01F4 brne .L137\r
+ 2563 .L130:\r
+ 2564 .LSM205:\r
+ 2565 0258 E881 ld r30,Y\r
+ 2566 025a F981 ldd r31,Y+1\r
+ 2567 025c A2A6 std Z+42,r10\r
+ 2568 025e B3A6 std Z+43,r11\r
+ 2569 0260 C4A6 std Z+44,r12\r
+ 2570 0262 D5A6 std Z+45,r13\r
+ 2571 .L129:\r
+ 2572 .LSM206:\r
+ 2573 0264 AE8A std Y+22,r10\r
+ 2574 0266 BF8A std Y+23,r11\r
+ 2575 0268 C88E std Y+24,r12\r
+ 2576 026a D98E std Y+25,r13\r
+ 2577 .LSM207:\r
+ 2578 026c 8D81 ldd r24,Y+5\r
+ 2579 026e 8F5F subi r24,lo8(-(1))\r
+ 2580 0270 8D83 std Y+5,r24\r
+ 2581 .LVL242:\r
+ 2582 .L114:\r
+ 2583 .LSM208:\r
+ 2584 0272 EE80 ldd r14,Y+6\r
+ 2585 0274 FF80 ldd r15,Y+7\r
+ 2586 0276 0885 ldd r16,Y+8\r
+ 2587 0278 1985 ldd r17,Y+9\r
+ 2588 .LVL243:\r
+ 2589 .LSM209:\r
+ 2590 027a 4E89 ldd r20,Y+22\r
+ 2591 027c 5F89 ldd r21,Y+23\r
+ 2592 027e 688D ldd r22,Y+24\r
+ 2593 0280 798D ldd r23,Y+25\r
+ 2594 0282 8881 ld r24,Y\r
+ 2595 0284 9981 ldd r25,Y+1\r
+ 2596 0286 0E94 0000 call move_window\r
+ 2597 .LVL244:\r
+ 2598 028a 8823 tst r24\r
+ 2599 028c 01F0 breq .L131\r
+ 2600 .LVL245:\r
+ 2601 .L137:\r
+ 2602 .LSM210:\r
+ 2603 028e 8C81 ldd r24,Y+4\r
+ 2604 0290 8068 ori r24,lo8(-128)\r
+ 2605 0292 8C83 std Y+4,r24\r
+ 2606 0294 7724 clr r7\r
+ 2607 0296 7394 inc r7\r
+ 2608 0298 00C0 rjmp .L109\r
+ 2609 .LVL246:\r
+ 2610 .L131:\r
+ 2611 .LSM211:\r
+ 2612 029a C701 movw r24,r14\r
+ 2613 029c 9170 andi r25,hi8(511)\r
+ 2614 029e 20E0 ldi r18,lo8(512)\r
+ 2615 02a0 32E0 ldi r19,hi8(512)\r
+ 2616 02a2 281B sub r18,r24\r
+ 2617 02a4 390B sbc r19,r25\r
+ 2618 02a6 8401 movw r16,r8\r
+ 2619 .LVL247:\r
+ 2620 02a8 2815 cp r18,r8\r
+ 2621 02aa 3905 cpc r19,r9\r
+ 2622 02ac 00F4 brsh .L132\r
+ 2623 .LVL248:\r
+ 2624 02ae 8901 movw r16,r18\r
+ 2625 .L132:\r
+ 2626 .LSM212:\r
+ 2627 02b0 2E81 ldd r18,Y+6\r
+ 2628 02b2 3F81 ldd r19,Y+7\r
+ 2629 .LVL249:\r
+ 2630 02b4 3170 andi r19,hi8(511)\r
+ 2631 02b6 225D subi r18,lo8(-(46))\r
+ 2632 02b8 3F4F sbci r19,hi8(-(46))\r
+ 2633 02ba 8881 ld r24,Y\r
+ 2634 02bc 9981 ldd r25,Y+1\r
+ 2635 02be 820F add r24,r18\r
+ 2636 02c0 931F adc r25,r19\r
+ 2637 02c2 B201 movw r22,r4\r
+ 2638 02c4 A801 movw r20,r16\r
+ 2639 02c6 0E94 0000 call mem_cpy\r
+ 2640 .LSM213:\r
+ 2641 02ca E881 ld r30,Y\r
+ 2642 02cc F981 ldd r31,Y+1\r
+ 2643 02ce 6482 std Z+4,r6\r
+ 2644 .LVL250:\r
+ 2645 .L128:\r
+ 2646 .LSM214:\r
+ 2647 02d0 400E add r4,r16\r
+ 2648 02d2 511E adc r5,r17\r
+ 2649 02d4 C801 movw r24,r16\r
+ 2650 02d6 A0E0 ldi r26,lo8(0)\r
+ 2651 02d8 B0E0 ldi r27,hi8(0)\r
+ 2652 .LVL251:\r
+ 2653 02da 2E81 ldd r18,Y+6\r
+ 2654 02dc 3F81 ldd r19,Y+7\r
+ 2655 02de 4885 ldd r20,Y+8\r
+ 2656 02e0 5985 ldd r21,Y+9\r
+ 2657 02e2 280F add r18,r24\r
+ 2658 02e4 391F adc r19,r25\r
+ 2659 02e6 4A1F adc r20,r26\r
+ 2660 02e8 5B1F adc r21,r27\r
+ 2661 02ea 2E83 std Y+6,r18\r
+ 2662 02ec 3F83 std Y+7,r19\r
+ 2663 02ee 4887 std Y+8,r20\r
+ 2664 02f0 5987 std Y+9,r21\r
+ 2665 02f2 F101 movw r30,r2\r
+ 2666 02f4 8081 ld r24,Z\r
+ 2667 02f6 9181 ldd r25,Z+1\r
+ 2668 02f8 800F add r24,r16\r
+ 2669 02fa 911F adc r25,r17\r
+ 2670 02fc 9183 std Z+1,r25\r
+ 2671 02fe 8083 st Z,r24\r
+ 2672 0300 801A sub r8,r16\r
+ 2673 0302 910A sbc r9,r17\r
+ 2674 .LVL252:\r
+ 2675 .L113:\r
+ 2676 .LSM215:\r
+ 2677 0304 8114 cp r8,__zero_reg__\r
+ 2678 0306 9104 cpc r9,__zero_reg__\r
+ 2679 0308 01F0 breq .+2\r
+ 2680 030a 00C0 rjmp .L133\r
+ 2681 .LVL253:\r
+ 2682 .L119:\r
+ 2683 .LSM216:\r
+ 2684 030c 2E81 ldd r18,Y+6\r
+ 2685 030e 3F81 ldd r19,Y+7\r
+ 2686 0310 4885 ldd r20,Y+8\r
+ 2687 0312 5985 ldd r21,Y+9\r
+ 2688 0314 8A85 ldd r24,Y+10\r
+ 2689 0316 9B85 ldd r25,Y+11\r
+ 2690 0318 AC85 ldd r26,Y+12\r
+ 2691 031a BD85 ldd r27,Y+13\r
+ 2692 031c 8217 cp r24,r18\r
+ 2693 031e 9307 cpc r25,r19\r
+ 2694 0320 A407 cpc r26,r20\r
+ 2695 0322 B507 cpc r27,r21\r
+ 2696 0324 00F4 brsh .L134\r
+ 2697 0326 2A87 std Y+10,r18\r
+ 2698 0328 3B87 std Y+11,r19\r
+ 2699 032a 4C87 std Y+12,r20\r
+ 2700 032c 5D87 std Y+13,r21\r
+ 2701 .L134:\r
+ 2702 .LSM217:\r
+ 2703 032e 8C81 ldd r24,Y+4\r
+ 2704 0330 8062 ori r24,lo8(32)\r
+ 2705 0332 8C83 std Y+4,r24\r
+ 2706 .LVL254:\r
+ 2707 .L109:\r
+ 2708 .LSM218:\r
+ 2709 0334 872D mov r24,r7\r
+ 2710 /* epilogue start */\r
+ 2711 0336 DF91 pop r29\r
+ 2712 0338 CF91 pop r28\r
+ 2713 .LVL255:\r
+ 2714 033a 1F91 pop r17\r
+ 2715 .LVL256:\r
+ 2716 033c 0F91 pop r16\r
+ 2717 .LVL257:\r
+ 2718 033e FF90 pop r15\r
+ 2719 0340 EF90 pop r14\r
+ 2720 .LVL258:\r
+ 2721 0342 DF90 pop r13\r
+ 2722 0344 CF90 pop r12\r
+ 2723 0346 BF90 pop r11\r
+ 2724 0348 AF90 pop r10\r
+ 2725 .LVL259:\r
+ 2726 034a 9F90 pop r9\r
+ 2727 034c 8F90 pop r8\r
+ 2728 .LVL260:\r
+ 2729 034e 7F90 pop r7\r
+ 2730 .LVL261:\r
+ 2731 0350 6F90 pop r6\r
+ 2732 0352 5F90 pop r5\r
+ 2733 0354 4F90 pop r4\r
+ 2734 .LVL262:\r
+ 2735 0356 3F90 pop r3\r
+ 2736 0358 2F90 pop r2\r
+ 2737 .LVL263:\r
+ 2738 035a 0895 ret\r
+ 2739 .LFE75:\r
+ 2741 .section .text.f_putc,"ax",@progbits\r
+ 2742 .global f_putc\r
+ 2744 f_putc:\r
+ 2745 .LFB80:\r
+ 2746 .LSM219:\r
+ 2747 .LVL264:\r
+ 2748 0000 0F93 push r16\r
+ 2749 0002 1F93 push r17\r
+ 2750 0004 DF93 push r29\r
+ 2751 0006 CF93 push r28\r
+ 2752 0008 00D0 rcall .\r
+ 2753 000a 0F92 push __tmp_reg__\r
+ 2754 000c CDB7 in r28,__SP_L__\r
+ 2755 000e DEB7 in r29,__SP_H__\r
+ 2756 /* prologue: function */\r
+ 2757 /* frame size = 3 */\r
+ 2758 0010 8C01 movw r16,r24\r
+ 2759 .LSM220:\r
+ 2760 0012 6115 cp r22,__zero_reg__\r
+ 2761 0014 7105 cpc r23,__zero_reg__\r
+ 2762 0016 01F0 breq .L140\r
+ 2763 .LVL265:\r
+ 2764 .LSM221:\r
+ 2765 0018 8983 std Y+1,r24\r
+ 2766 .LVL266:\r
+ 2767 .LSM222:\r
+ 2768 001a CB01 movw r24,r22\r
+ 2769 001c BE01 movw r22,r28\r
+ 2770 .LVL267:\r
+ 2771 001e 6F5F subi r22,lo8(-(1))\r
+ 2772 0020 7F4F sbci r23,hi8(-(1))\r
+ 2773 0022 41E0 ldi r20,lo8(1)\r
+ 2774 0024 50E0 ldi r21,hi8(1)\r
+ 2775 0026 9E01 movw r18,r28\r
+ 2776 0028 2E5F subi r18,lo8(-(2))\r
+ 2777 002a 3F4F sbci r19,hi8(-(2))\r
+ 2778 002c 0E94 0000 call f_write\r
+ 2779 .LSM223:\r
+ 2780 0030 8A81 ldd r24,Y+2\r
+ 2781 0032 9B81 ldd r25,Y+3\r
+ 2782 .LVL268:\r
+ 2783 0034 892B or r24,r25\r
+ 2784 0036 01F4 brne .L140\r
+ 2785 .LVL269:\r
+ 2786 0038 0FEF ldi r16,lo8(-1)\r
+ 2787 003a 1FEF ldi r17,hi8(-1)\r
+ 2788 .LVL270:\r
+ 2789 .L140:\r
+ 2790 .LSM224:\r
+ 2791 003c C801 movw r24,r16\r
+ 2792 .LVL271:\r
+ 2793 /* epilogue start */\r
+ 2794 003e 0F90 pop __tmp_reg__\r
+ 2795 0040 0F90 pop __tmp_reg__\r
+ 2796 0042 0F90 pop __tmp_reg__\r
+ 2797 0044 CF91 pop r28\r
+ 2798 0046 DF91 pop r29\r
+ 2799 0048 1F91 pop r17\r
+ 2800 004a 0F91 pop r16\r
+ 2801 004c 0895 ret\r
+ 2802 .LFE80:\r
+ 2804 .section .text.f_puts,"ax",@progbits\r
+ 2805 .global f_puts\r
+ 2807 f_puts:\r
+ 2808 .LFB81:\r
+ 2809 .LSM225:\r
+ 2810 .LVL272:\r
+ 2811 0000 EF92 push r14\r
+ 2812 0002 FF92 push r15\r
+ 2813 0004 0F93 push r16\r
+ 2814 0006 1F93 push r17\r
+ 2815 0008 CF93 push r28\r
+ 2816 000a DF93 push r29\r
+ 2817 /* prologue: function */\r
+ 2818 /* frame size = 0 */\r
+ 2819 000c 8C01 movw r16,r24\r
+ 2820 000e 7B01 movw r14,r22\r
+ 2821 .LSM226:\r
+ 2822 0010 C0E0 ldi r28,lo8(0)\r
+ 2823 0012 D0E0 ldi r29,hi8(0)\r
+ 2824 .LVL273:\r
+ 2825 0014 00C0 rjmp .L143\r
+ 2826 .LVL274:\r
+ 2827 .L146:\r
+ 2828 .LSM227:\r
+ 2829 0016 90E0 ldi r25,lo8(0)\r
+ 2830 0018 B701 movw r22,r14\r
+ 2831 001a 0E94 0000 call f_putc\r
+ 2832 001e 8F5F subi r24,lo8(-1)\r
+ 2833 0020 9F4F sbci r25,hi8(-1)\r
+ 2834 0022 01F4 brne .L144\r
+ 2835 0024 CFEF ldi r28,lo8(-1)\r
+ 2836 0026 DFEF ldi r29,hi8(-1)\r
+ 2837 0028 00C0 rjmp .L145\r
+ 2838 .L144:\r
+ 2839 .LSM228:\r
+ 2840 002a 0F5F subi r16,lo8(-(1))\r
+ 2841 002c 1F4F sbci r17,hi8(-(1))\r
+ 2842 002e 2196 adiw r28,1\r
+ 2843 .LVL275:\r
+ 2844 .L143:\r
+ 2845 0030 F801 movw r30,r16\r
+ 2846 0032 8081 ld r24,Z\r
+ 2847 0034 8823 tst r24\r
+ 2848 0036 01F4 brne .L146\r
+ 2849 .L145:\r
+ 2850 .LSM229:\r
+ 2851 0038 CE01 movw r24,r28\r
+ 2852 .LVL276:\r
+ 2853 /* epilogue start */\r
+ 2854 003a DF91 pop r29\r
+ 2855 003c CF91 pop r28\r
+ 2856 003e 1F91 pop r17\r
+ 2857 0040 0F91 pop r16\r
+ 2858 .LVL277:\r
+ 2859 0042 FF90 pop r15\r
+ 2860 0044 EF90 pop r14\r
+ 2861 .LVL278:\r
+ 2862 0046 0895 ret\r
+ 2863 .LFE81:\r
+ 2865 .section .text.f_printf,"ax",@progbits\r
+ 2866 .global f_printf\r
+ 2868 f_printf:\r
+ 2869 .LFB82:\r
+ 2870 .LSM230:\r
+ 2871 .LVL279:\r
+ 2872 0000 2F92 push r2\r
+ 2873 0002 3F92 push r3\r
+ 2874 0004 4F92 push r4\r
+ 2875 0006 5F92 push r5\r
+ 2876 0008 6F92 push r6\r
+ 2877 000a 7F92 push r7\r
+ 2878 000c 8F92 push r8\r
+ 2879 000e 9F92 push r9\r
+ 2880 0010 AF92 push r10\r
+ 2881 0012 BF92 push r11\r
+ 2882 0014 CF92 push r12\r
+ 2883 0016 DF92 push r13\r
+ 2884 0018 EF92 push r14\r
+ 2885 001a FF92 push r15\r
+ 2886 001c 0F93 push r16\r
+ 2887 001e 1F93 push r17\r
+ 2888 0020 DF93 push r29\r
+ 2889 0022 CF93 push r28\r
+ 2890 0024 CDB7 in r28,__SP_L__\r
+ 2891 0026 DEB7 in r29,__SP_H__\r
+ 2892 0028 6397 sbiw r28,19\r
+ 2893 002a 0FB6 in __tmp_reg__,__SREG__\r
+ 2894 002c F894 cli\r
+ 2895 002e DEBF out __SP_H__,r29\r
+ 2896 0030 0FBE out __SREG__,__tmp_reg__\r
+ 2897 0032 CDBF out __SP_L__,r28\r
+ 2898 /* prologue: function */\r
+ 2899 /* frame size = 19 */\r
+ 2900 0034 6AA4 ldd r6,Y+42\r
+ 2901 0036 7BA4 ldd r7,Y+43\r
+ 2902 .LSM231:\r
+ 2903 0038 8E01 movw r16,r28\r
+ 2904 .LVL280:\r
+ 2905 003a 045D subi r16,lo8(-(44))\r
+ 2906 003c 1F4F sbci r17,hi8(-(44))\r
+ 2907 003e 1A8A std Y+18,__zero_reg__\r
+ 2908 0040 198A std Y+17,__zero_reg__\r
+ 2909 .LVL281:\r
+ 2910 0042 20E0 ldi r18,lo8(0)\r
+ 2911 0044 30E0 ldi r19,hi8(0)\r
+ 2912 .LVL282:\r
+ 2913 .LVL283:\r
+ 2914 .L176:\r
+ 2915 .LSM232:\r
+ 2916 0046 D301 movw r26,r6\r
+ 2917 0048 8C91 ld r24,X\r
+ 2918 .LVL284:\r
+ 2919 .LSM233:\r
+ 2920 004a 8823 tst r24\r
+ 2921 004c 01F4 brne .+2\r
+ 2922 004e 00C0 rjmp .L149\r
+ 2923 .LSM234:\r
+ 2924 0050 0894 sec\r
+ 2925 0052 611C adc r6,__zero_reg__\r
+ 2926 0054 711C adc r7,__zero_reg__\r
+ 2927 .LSM235:\r
+ 2928 0056 8532 cpi r24,lo8(37)\r
+ 2929 0058 01F0 breq .L150\r
+ 2930 .LSM236:\r
+ 2931 005a 90E0 ldi r25,lo8(0)\r
+ 2932 005c 68A5 ldd r22,Y+40\r
+ 2933 005e 79A5 ldd r23,Y+41\r
+ 2934 0060 0E94 0000 call f_putc\r
+ 2935 .LVL285:\r
+ 2936 0064 9C01 movw r18,r24\r
+ 2937 .LVL286:\r
+ 2938 .LSM237:\r
+ 2939 0066 BFEF ldi r27,hi8(-1)\r
+ 2940 0068 8F3F cpi r24,lo8(-1)\r
+ 2941 006a 9B07 cpc r25,r27\r
+ 2942 006c 01F4 brne .L151\r
+ 2943 .LVL287:\r
+ 2944 006e 4801 movw r8,r16\r
+ 2945 0070 00C0 rjmp .L152\r
+ 2946 .L151:\r
+ 2947 0072 4801 movw r8,r16\r
+ 2948 0074 00C0 rjmp .L179\r
+ 2949 .LVL288:\r
+ 2950 .L150:\r
+ 2951 .LSM238:\r
+ 2952 0076 D301 movw r26,r6\r
+ 2953 0078 ED91 ld r30,X+\r
+ 2954 .LVL289:\r
+ 2955 007a 3D01 movw r6,r26\r
+ 2956 .LSM239:\r
+ 2957 007c E033 cpi r30,lo8(48)\r
+ 2958 007e 01F0 breq .L153\r
+ 2959 0080 1B8A std Y+19,__zero_reg__\r
+ 2960 .LVL290:\r
+ 2961 0082 00C0 rjmp .L154\r
+ 2962 .L153:\r
+ 2963 .LSM240:\r
+ 2964 0084 ED91 ld r30,X+\r
+ 2965 0086 3D01 movw r6,r26\r
+ 2966 0088 B1E0 ldi r27,lo8(1)\r
+ 2967 008a BB8B std Y+19,r27\r
+ 2968 .LVL291:\r
+ 2969 .L154:\r
+ 2970 008c AA24 clr r10\r
+ 2971 008e BB24 clr r11\r
+ 2972 0090 00C0 rjmp .L155\r
+ 2973 .L156:\r
+ 2974 .LSM241:\r
+ 2975 0092 C501 movw r24,r10\r
+ 2976 0094 F3E0 ldi r31,3\r
+ 2977 0096 880F 1: lsl r24\r
+ 2978 0098 991F rol r25\r
+ 2979 009a FA95 dec r31\r
+ 2980 009c 01F4 brne 1b\r
+ 2981 009e AA0C lsl r10\r
+ 2982 00a0 BB1C rol r11\r
+ 2983 00a2 A80E add r10,r24\r
+ 2984 00a4 B91E adc r11,r25\r
+ 2985 00a6 AE0E add r10,r30\r
+ 2986 00a8 B11C adc r11,__zero_reg__\r
+ 2987 00aa E0ED ldi r30,lo8(-48)\r
+ 2988 00ac FFEF ldi r31,hi8(-48)\r
+ 2989 .LVL292:\r
+ 2990 00ae AE0E add r10,r30\r
+ 2991 00b0 BF1E adc r11,r31\r
+ 2992 .LSM242:\r
+ 2993 00b2 D301 movw r26,r6\r
+ 2994 00b4 ED91 ld r30,X+\r
+ 2995 .LVL293:\r
+ 2996 00b6 3D01 movw r6,r26\r
+ 2997 .L155:\r
+ 2998 .LSM243:\r
+ 2999 00b8 8E2F mov r24,r30\r
+ 3000 00ba 8053 subi r24,lo8(-(-48))\r
+ 3001 00bc 8A30 cpi r24,lo8(10)\r
+ 3002 00be 00F0 brlo .L156\r
+ 3003 .LSM244:\r
+ 3004 00c0 EC36 cpi r30,lo8(108)\r
+ 3005 00c2 01F4 brne .L157\r
+ 3006 .LSM245:\r
+ 3007 00c4 BB89 ldd r27,Y+19\r
+ 3008 00c6 B260 ori r27,lo8(2)\r
+ 3009 00c8 BB8B std Y+19,r27\r
+ 3010 .LVL294:\r
+ 3011 00ca D301 movw r26,r6\r
+ 3012 00cc ED91 ld r30,X+\r
+ 3013 00ce 3D01 movw r6,r26\r
+ 3014 .L157:\r
+ 3015 .LSM246:\r
+ 3016 00d0 E337 cpi r30,lo8(115)\r
+ 3017 00d2 01F4 brne .L158\r
+ 3018 .LSM247:\r
+ 3019 00d4 62E0 ldi r22,lo8(2)\r
+ 3020 00d6 862E mov r8,r22\r
+ 3021 00d8 912C mov r9,__zero_reg__\r
+ 3022 .LVL295:\r
+ 3023 00da 800E add r8,r16\r
+ 3024 00dc 911E adc r9,r17\r
+ 3025 00de F801 movw r30,r16\r
+ 3026 .LVL296:\r
+ 3027 00e0 8081 ld r24,Z\r
+ 3028 00e2 9181 ldd r25,Z+1\r
+ 3029 00e4 00C0 rjmp .L180\r
+ 3030 .LVL297:\r
+ 3031 .L158:\r
+ 3032 .LSM248:\r
+ 3033 00e6 E336 cpi r30,lo8(99)\r
+ 3034 00e8 01F4 brne .L159\r
+ 3035 .LSM249:\r
+ 3036 00ea 52E0 ldi r21,lo8(2)\r
+ 3037 00ec 852E mov r8,r21\r
+ 3038 00ee 912C mov r9,__zero_reg__\r
+ 3039 .LVL298:\r
+ 3040 00f0 800E add r8,r16\r
+ 3041 00f2 911E adc r9,r17\r
+ 3042 00f4 D801 movw r26,r16\r
+ 3043 00f6 8D91 ld r24,X+\r
+ 3044 00f8 9C91 ld r25,X\r
+ 3045 00fa 68A5 ldd r22,Y+40\r
+ 3046 00fc 79A5 ldd r23,Y+41\r
+ 3047 00fe 0E94 0000 call f_putc\r
+ 3048 .LVL299:\r
+ 3049 0102 9C01 movw r18,r24\r
+ 3050 .LVL300:\r
+ 3051 .LSM250:\r
+ 3052 0104 BFEF ldi r27,hi8(-1)\r
+ 3053 0106 8F3F cpi r24,lo8(-1)\r
+ 3054 0108 9B07 cpc r25,r27\r
+ 3055 010a 01F4 brne .+2\r
+ 3056 010c 00C0 rjmp .L152\r
+ 3057 .LVL301:\r
+ 3058 .L179:\r
+ 3059 010e 21E0 ldi r18,lo8(1)\r
+ 3060 0110 30E0 ldi r19,hi8(1)\r
+ 3061 .LVL302:\r
+ 3062 0112 00C0 rjmp .L152\r
+ 3063 .LVL303:\r
+ 3064 .L159:\r
+ 3065 .LSM251:\r
+ 3066 0114 E436 cpi r30,lo8(100)\r
+ 3067 0116 01F0 breq .L160\r
+ 3068 .LSM252:\r
+ 3069 0118 E537 cpi r30,lo8(117)\r
+ 3070 011a 01F0 breq .L160\r
+ 3071 .LSM253:\r
+ 3072 011c E835 cpi r30,lo8(88)\r
+ 3073 011e 01F0 breq .+2\r
+ 3074 0120 00C0 rjmp .L149\r
+ 3075 0122 20E1 ldi r18,lo8(16)\r
+ 3076 .LVL304:\r
+ 3077 0124 00C0 rjmp .L161\r
+ 3078 .LVL305:\r
+ 3079 .L160:\r
+ 3080 0126 2AE0 ldi r18,lo8(10)\r
+ 3081 .LVL306:\r
+ 3082 .L161:\r
+ 3083 .LSM254:\r
+ 3084 0128 FB89 ldd r31,Y+19\r
+ 3085 012a F1FF sbrs r31,1\r
+ 3086 012c 00C0 rjmp .L162\r
+ 3087 .LSM255:\r
+ 3088 012e 44E0 ldi r20,lo8(4)\r
+ 3089 0130 842E mov r8,r20\r
+ 3090 0132 912C mov r9,__zero_reg__\r
+ 3091 .LVL307:\r
+ 3092 0134 800E add r8,r16\r
+ 3093 0136 911E adc r9,r17\r
+ 3094 0138 D801 movw r26,r16\r
+ 3095 013a ED90 ld r14,X+\r
+ 3096 013c FD90 ld r15,X+\r
+ 3097 013e 0D91 ld r16,X+\r
+ 3098 0140 1C91 ld r17,X\r
+ 3099 .LSM256:\r
+ 3100 0142 E436 cpi r30,lo8(100)\r
+ 3101 0144 01F4 brne .L164\r
+ 3102 .LVL308:\r
+ 3103 0146 00C0 rjmp .L163\r
+ 3104 .L162:\r
+ 3105 0148 C801 movw r24,r16\r
+ 3106 014a 0296 adiw r24,2\r
+ 3107 .LVL309:\r
+ 3108 014c D801 movw r26,r16\r
+ 3109 014e 6D91 ld r22,X+\r
+ 3110 0150 7C91 ld r23,X\r
+ 3111 .LSM257:\r
+ 3112 0152 E436 cpi r30,lo8(100)\r
+ 3113 0154 01F4 brne .L165\r
+ 3114 .LVL310:\r
+ 3115 0156 4C01 movw r8,r24\r
+ 3116 0158 7B01 movw r14,r22\r
+ 3117 015a 0027 clr r16\r
+ 3118 015c F7FC sbrc r15,7\r
+ 3119 015e 0095 com r16\r
+ 3120 0160 102F mov r17,r16\r
+ 3121 0162 00C0 rjmp .L163\r
+ 3122 .LVL311:\r
+ 3123 .L165:\r
+ 3124 0164 4C01 movw r8,r24\r
+ 3125 0166 7B01 movw r14,r22\r
+ 3126 .LVL312:\r
+ 3127 0168 00E0 ldi r16,lo8(0)\r
+ 3128 016a 10E0 ldi r17,hi8(0)\r
+ 3129 .LVL313:\r
+ 3130 016c 00C0 rjmp .L164\r
+ 3131 .LVL314:\r
+ 3132 .L163:\r
+ 3133 .LSM258:\r
+ 3134 016e 17FF sbrs r17,7\r
+ 3135 0170 00C0 rjmp .L164\r
+ 3136 .LSM259:\r
+ 3137 0172 1095 com r17\r
+ 3138 0174 0095 com r16\r
+ 3139 0176 F094 com r15\r
+ 3140 0178 E094 com r14\r
+ 3141 017a E11C adc r14,__zero_reg__\r
+ 3142 017c F11C adc r15,__zero_reg__\r
+ 3143 017e 011D adc r16,__zero_reg__\r
+ 3144 0180 111D adc r17,__zero_reg__\r
+ 3145 .LSM260:\r
+ 3146 0182 BB89 ldd r27,Y+19\r
+ 3147 0184 B460 ori r27,lo8(4)\r
+ 3148 0186 BB8B std Y+19,r27\r
+ 3149 .LVL315:\r
+ 3150 .L164:\r
+ 3151 .LSM261:\r
+ 3152 0188 188A std Y+16,__zero_reg__\r
+ 3153 018a 3FE0 ldi r19,lo8(15)\r
+ 3154 018c C32E mov r12,r19\r
+ 3155 018e D12C mov r13,__zero_reg__\r
+ 3156 .LSM262:\r
+ 3157 0190 222E mov r2,r18\r
+ 3158 0192 3324 clr r3\r
+ 3159 0194 4424 clr r4\r
+ 3160 0196 5524 clr r5\r
+ 3161 .LVL316:\r
+ 3162 .L169:\r
+ 3163 0198 C801 movw r24,r16\r
+ 3164 019a B701 movw r22,r14\r
+ 3165 019c A201 movw r20,r4\r
+ 3166 019e 9101 movw r18,r2\r
+ 3167 .LVL317:\r
+ 3168 01a0 0E94 0000 call __udivmodsi4\r
+ 3169 .LVL318:\r
+ 3170 01a4 862F mov r24,r22\r
+ 3171 .LVL319:\r
+ 3172 01a6 805D subi r24,lo8(-(48))\r
+ 3173 .LSM263:\r
+ 3174 01a8 8A33 cpi r24,lo8(58)\r
+ 3175 01aa 00F0 brlo .L166\r
+ 3176 01ac 895F subi r24,lo8(-(7))\r
+ 3177 .L166:\r
+ 3178 .LSM264:\r
+ 3179 01ae 0894 sec\r
+ 3180 01b0 C108 sbc r12,__zero_reg__\r
+ 3181 01b2 D108 sbc r13,__zero_reg__\r
+ 3182 01b4 E1E0 ldi r30,lo8(1)\r
+ 3183 01b6 F0E0 ldi r31,hi8(1)\r
+ 3184 01b8 EC0F add r30,r28\r
+ 3185 01ba FD1F adc r31,r29\r
+ 3186 01bc EC0D add r30,r12\r
+ 3187 01be FD1D adc r31,r13\r
+ 3188 01c0 8083 st Z,r24\r
+ 3189 .LSM265:\r
+ 3190 01c2 C114 cp r12,__zero_reg__\r
+ 3191 01c4 D104 cpc r13,__zero_reg__\r
+ 3192 01c6 01F0 breq .L168\r
+ 3193 .LSM266:\r
+ 3194 01c8 C801 movw r24,r16\r
+ 3195 01ca B701 movw r22,r14\r
+ 3196 01cc A201 movw r20,r4\r
+ 3197 01ce 9101 movw r18,r2\r
+ 3198 01d0 0E94 0000 call __udivmodsi4\r
+ 3199 01d4 C901 movw r24,r18\r
+ 3200 .LVL320:\r
+ 3201 01d6 DA01 movw r26,r20\r
+ 3202 01d8 7C01 movw r14,r24\r
+ 3203 01da 8D01 movw r16,r26\r
+ 3204 .LSM267:\r
+ 3205 01dc E114 cp r14,__zero_reg__\r
+ 3206 01de F104 cpc r15,__zero_reg__\r
+ 3207 01e0 0105 cpc r16,__zero_reg__\r
+ 3208 01e2 1105 cpc r17,__zero_reg__\r
+ 3209 01e4 01F4 brne .L169\r
+ 3210 .LSM268:\r
+ 3211 01e6 EB89 ldd r30,Y+19\r
+ 3212 01e8 E2FF sbrs r30,2\r
+ 3213 01ea 00C0 rjmp .L168\r
+ 3214 01ec 0894 sec\r
+ 3215 01ee C108 sbc r12,__zero_reg__\r
+ 3216 01f0 D108 sbc r13,__zero_reg__\r
+ 3217 01f2 E1E0 ldi r30,lo8(1)\r
+ 3218 01f4 F0E0 ldi r31,hi8(1)\r
+ 3219 01f6 EC0F add r30,r28\r
+ 3220 01f8 FD1F adc r31,r29\r
+ 3221 01fa EC0D add r30,r12\r
+ 3222 01fc FD1D adc r31,r13\r
+ 3223 01fe 4DE2 ldi r20,lo8(45)\r
+ 3224 0200 4083 st Z,r20\r
+ 3225 .LVL321:\r
+ 3226 .L168:\r
+ 3227 .LSM269:\r
+ 3228 0202 8FE0 ldi r24,lo8(15)\r
+ 3229 0204 90E0 ldi r25,hi8(15)\r
+ 3230 .LVL322:\r
+ 3231 0206 8A19 sub r24,r10\r
+ 3232 0208 9B09 sbc r25,r11\r
+ 3233 020a 0894 sec\r
+ 3234 020c C108 sbc r12,__zero_reg__\r
+ 3235 020e D108 sbc r13,__zero_reg__\r
+ 3236 0210 E1E0 ldi r30,lo8(1)\r
+ 3237 0212 F0E0 ldi r31,hi8(1)\r
+ 3238 0214 EC0F add r30,r28\r
+ 3239 0216 FD1F adc r31,r29\r
+ 3240 0218 EC0D add r30,r12\r
+ 3241 021a FD1D adc r31,r13\r
+ 3242 021c 0894 sec\r
+ 3243 021e C11C adc r12,__zero_reg__\r
+ 3244 0220 D11C adc r13,__zero_reg__\r
+ 3245 .LSM270:\r
+ 3246 0222 AB89 ldd r26,Y+19\r
+ 3247 0224 2A2F mov r18,r26\r
+ 3248 0226 30E0 ldi r19,lo8(0)\r
+ 3249 0228 2170 andi r18,lo8(1)\r
+ 3250 022a 3070 andi r19,hi8(1)\r
+ 3251 022c 00C0 rjmp .L170\r
+ 3252 .L174:\r
+ 3253 022e 0894 sec\r
+ 3254 0230 C108 sbc r12,__zero_reg__\r
+ 3255 0232 D108 sbc r13,__zero_reg__\r
+ 3256 0234 2115 cp r18,__zero_reg__\r
+ 3257 0236 3105 cpc r19,__zero_reg__\r
+ 3258 0238 01F4 brne .L171\r
+ 3259 023a 40E2 ldi r20,lo8(32)\r
+ 3260 023c 00C0 rjmp .L172\r
+ 3261 .L171:\r
+ 3262 023e 40E3 ldi r20,lo8(48)\r
+ 3263 .L172:\r
+ 3264 0240 4083 st Z,r20\r
+ 3265 0242 3197 sbiw r30,1\r
+ 3266 .L170:\r
+ 3267 0244 C114 cp r12,__zero_reg__\r
+ 3268 0246 D104 cpc r13,__zero_reg__\r
+ 3269 0248 01F0 breq .L173\r
+ 3270 024a 8C15 cp r24,r12\r
+ 3271 024c 9D05 cpc r25,r13\r
+ 3272 024e 04F0 brlt .L174\r
+ 3273 .L173:\r
+ 3274 .LSM271:\r
+ 3275 0250 81E0 ldi r24,lo8(1)\r
+ 3276 0252 90E0 ldi r25,hi8(1)\r
+ 3277 .LVL323:\r
+ 3278 0254 8C0F add r24,r28\r
+ 3279 0256 9D1F adc r25,r29\r
+ 3280 0258 8C0D add r24,r12\r
+ 3281 025a 9D1D adc r25,r13\r
+ 3282 .LVL324:\r
+ 3283 .L180:\r
+ 3284 025c 68A5 ldd r22,Y+40\r
+ 3285 025e 79A5 ldd r23,Y+41\r
+ 3286 0260 0E94 0000 call f_puts\r
+ 3287 .LVL325:\r
+ 3288 0264 9C01 movw r18,r24\r
+ 3289 .LVL326:\r
+ 3290 .L152:\r
+ 3291 .LSM272:\r
+ 3292 0266 E989 ldd r30,Y+17\r
+ 3293 0268 FA89 ldd r31,Y+18\r
+ 3294 026a E20F add r30,r18\r
+ 3295 026c F31F adc r31,r19\r
+ 3296 026e FA8B std Y+18,r31\r
+ 3297 0270 E98B std Y+17,r30\r
+ 3298 .LVL327:\r
+ 3299 0272 FFEF ldi r31,hi8(-1)\r
+ 3300 0274 2F3F cpi r18,lo8(-1)\r
+ 3301 0276 3F07 cpc r19,r31\r
+ 3302 0278 01F0 breq .L175\r
+ 3303 027a 8401 movw r16,r8\r
+ 3304 .LVL328:\r
+ 3305 027c 00C0 rjmp .L176\r
+ 3306 .LVL329:\r
+ 3307 .L149:\r
+ 3308 .LSM273:\r
+ 3309 027e 4FEF ldi r20,hi8(-1)\r
+ 3310 0280 2F3F cpi r18,lo8(-1)\r
+ 3311 0282 3407 cpc r19,r20\r
+ 3312 0284 01F0 breq .L175\r
+ 3313 0286 2989 ldd r18,Y+17\r
+ 3314 0288 3A89 ldd r19,Y+18\r
+ 3315 .LVL330:\r
+ 3316 .L175:\r
+ 3317 .LSM274:\r
+ 3318 028a C901 movw r24,r18\r
+ 3319 .LVL331:\r
+ 3320 /* epilogue start */\r
+ 3321 028c 6396 adiw r28,19\r
+ 3322 028e 0FB6 in __tmp_reg__,__SREG__\r
+ 3323 0290 F894 cli\r
+ 3324 0292 DEBF out __SP_H__,r29\r
+ 3325 0294 0FBE out __SREG__,__tmp_reg__\r
+ 3326 0296 CDBF out __SP_L__,r28\r
+ 3327 0298 CF91 pop r28\r
+ 3328 029a DF91 pop r29\r
+ 3329 029c 1F91 pop r17\r
+ 3330 029e 0F91 pop r16\r
+ 3331 .LVL332:\r
+ 3332 02a0 FF90 pop r15\r
+ 3333 02a2 EF90 pop r14\r
+ 3334 .LVL333:\r
+ 3335 02a4 DF90 pop r13\r
+ 3336 02a6 CF90 pop r12\r
+ 3337 .LVL334:\r
+ 3338 02a8 BF90 pop r11\r
+ 3339 02aa AF90 pop r10\r
+ 3340 .LVL335:\r
+ 3341 02ac 9F90 pop r9\r
+ 3342 02ae 8F90 pop r8\r
+ 3343 .LVL336:\r
+ 3344 02b0 7F90 pop r7\r
+ 3345 02b2 6F90 pop r6\r
+ 3346 .LVL337:\r
+ 3347 02b4 5F90 pop r5\r
+ 3348 02b6 4F90 pop r4\r
+ 3349 02b8 3F90 pop r3\r
+ 3350 02ba 2F90 pop r2\r
+ 3351 02bc 0895 ret\r
+ 3352 .LFE82:\r
+ 3354 .section .text.dir_next,"ax",@progbits\r
+ 3356 dir_next:\r
+ 3357 .LFB64:\r
+ 3358 .LSM275:\r
+ 3359 .LVL338:\r
+ 3360 0000 8F92 push r8\r
+ 3361 0002 9F92 push r9\r
+ 3362 0004 AF92 push r10\r
+ 3363 0006 BF92 push r11\r
+ 3364 0008 CF92 push r12\r
+ 3365 000a DF92 push r13\r
+ 3366 000c EF92 push r14\r
+ 3367 000e FF92 push r15\r
+ 3368 0010 0F93 push r16\r
+ 3369 0012 1F93 push r17\r
+ 3370 0014 CF93 push r28\r
+ 3371 0016 DF93 push r29\r
+ 3372 /* prologue: function */\r
+ 3373 /* frame size = 0 */\r
+ 3374 0018 EC01 movw r28,r24\r
+ 3375 001a 162F mov r17,r22\r
+ 3376 .LSM276:\r
+ 3377 001c AC80 ldd r10,Y+4\r
+ 3378 001e BD80 ldd r11,Y+5\r
+ 3379 .LVL339:\r
+ 3380 0020 0894 sec\r
+ 3381 0022 A11C adc r10,__zero_reg__\r
+ 3382 0024 B11C adc r11,__zero_reg__\r
+ 3383 .LSM277:\r
+ 3384 0026 A114 cp r10,__zero_reg__\r
+ 3385 0028 B104 cpc r11,__zero_reg__\r
+ 3386 002a 01F4 brne .+2\r
+ 3387 002c 00C0 rjmp .L182\r
+ 3388 .LVL340:\r
+ 3389 002e 8E85 ldd r24,Y+14\r
+ 3390 0030 9F85 ldd r25,Y+15\r
+ 3391 0032 A889 ldd r26,Y+16\r
+ 3392 0034 B989 ldd r27,Y+17\r
+ 3393 0036 0097 sbiw r24,0\r
+ 3394 0038 A105 cpc r26,__zero_reg__\r
+ 3395 003a B105 cpc r27,__zero_reg__\r
+ 3396 003c 01F4 brne .+2\r
+ 3397 003e 00C0 rjmp .L182\r
+ 3398 .LSM278:\r
+ 3399 0040 0FE0 ldi r16,lo8(15)\r
+ 3400 0042 802E mov r8,r16\r
+ 3401 0044 912C mov r9,__zero_reg__\r
+ 3402 0046 8A20 and r8,r10\r
+ 3403 0048 9B20 and r9,r11\r
+ 3404 004a 8114 cp r8,__zero_reg__\r
+ 3405 004c 9104 cpc r9,__zero_reg__\r
+ 3406 004e 01F0 breq .+2\r
+ 3407 0050 00C0 rjmp .L183\r
+ 3408 .LSM279:\r
+ 3409 0052 0196 adiw r24,1\r
+ 3410 0054 A11D adc r26,__zero_reg__\r
+ 3411 0056 B11D adc r27,__zero_reg__\r
+ 3412 0058 8E87 std Y+14,r24\r
+ 3413 005a 9F87 std Y+15,r25\r
+ 3414 005c A88B std Y+16,r26\r
+ 3415 005e B98B std Y+17,r27\r
+ 3416 .LSM280:\r
+ 3417 0060 4A85 ldd r20,Y+10\r
+ 3418 0062 5B85 ldd r21,Y+11\r
+ 3419 0064 6C85 ldd r22,Y+12\r
+ 3420 0066 7D85 ldd r23,Y+13\r
+ 3421 0068 E881 ld r30,Y\r
+ 3422 006a F981 ldd r31,Y+1\r
+ 3423 006c 4115 cp r20,__zero_reg__\r
+ 3424 006e 5105 cpc r21,__zero_reg__\r
+ 3425 0070 6105 cpc r22,__zero_reg__\r
+ 3426 0072 7105 cpc r23,__zero_reg__\r
+ 3427 0074 01F4 brne .L184\r
+ 3428 .LSM281:\r
+ 3429 0076 8085 ldd r24,Z+8\r
+ 3430 0078 9185 ldd r25,Z+9\r
+ 3431 007a A816 cp r10,r24\r
+ 3432 007c B906 cpc r11,r25\r
+ 3433 007e 00F4 brsh .+2\r
+ 3434 0080 00C0 rjmp .L183\r
+ 3435 0082 00C0 rjmp .L182\r
+ 3436 .L184:\r
+ 3437 .LSM282:\r
+ 3438 0084 8281 ldd r24,Z+2\r
+ 3439 0086 90E0 ldi r25,lo8(0)\r
+ 3440 0088 0197 sbiw r24,1\r
+ 3441 008a 9501 movw r18,r10\r
+ 3442 008c B4E0 ldi r27,4\r
+ 3443 008e 3695 1: lsr r19\r
+ 3444 0090 2795 ror r18\r
+ 3445 0092 BA95 dec r27\r
+ 3446 0094 01F4 brne 1b\r
+ 3447 0096 8223 and r24,r18\r
+ 3448 0098 9323 and r25,r19\r
+ 3449 009a 892B or r24,r25\r
+ 3450 009c 01F0 breq .+2\r
+ 3451 009e 00C0 rjmp .L183\r
+ 3452 .LSM283:\r
+ 3453 00a0 CF01 movw r24,r30\r
+ 3454 00a2 0E94 0000 call get_fat\r
+ 3455 00a6 6B01 movw r12,r22\r
+ 3456 00a8 7C01 movw r14,r24\r
+ 3457 .LVL341:\r
+ 3458 .LSM284:\r
+ 3459 00aa 82E0 ldi r24,lo8(2)\r
+ 3460 00ac C816 cp r12,r24\r
+ 3461 00ae D104 cpc r13,__zero_reg__\r
+ 3462 00b0 E104 cpc r14,__zero_reg__\r
+ 3463 00b2 F104 cpc r15,__zero_reg__\r
+ 3464 00b4 00F4 brsh .+2\r
+ 3465 00b6 00C0 rjmp .L185\r
+ 3466 .LSM285:\r
+ 3467 00b8 9FEF ldi r25,lo8(-1)\r
+ 3468 00ba C916 cp r12,r25\r
+ 3469 00bc 9FEF ldi r25,hi8(-1)\r
+ 3470 00be D906 cpc r13,r25\r
+ 3471 00c0 9FEF ldi r25,hlo8(-1)\r
+ 3472 00c2 E906 cpc r14,r25\r
+ 3473 00c4 9FEF ldi r25,hhi8(-1)\r
+ 3474 00c6 F906 cpc r15,r25\r
+ 3475 00c8 01F4 brne .+2\r
+ 3476 00ca 00C0 rjmp .L186\r
+ 3477 .LSM286:\r
+ 3478 00cc E881 ld r30,Y\r
+ 3479 00ce F981 ldd r31,Y+1\r
+ 3480 00d0 828D ldd r24,Z+26\r
+ 3481 00d2 938D ldd r25,Z+27\r
+ 3482 00d4 A48D ldd r26,Z+28\r
+ 3483 00d6 B58D ldd r27,Z+29\r
+ 3484 00d8 C816 cp r12,r24\r
+ 3485 00da D906 cpc r13,r25\r
+ 3486 00dc EA06 cpc r14,r26\r
+ 3487 00de FB06 cpc r15,r27\r
+ 3488 00e0 00F4 brsh .+2\r
+ 3489 00e2 00C0 rjmp .L187\r
+ 3490 .LBB3:\r
+ 3491 .LSM287:\r
+ 3492 00e4 1123 tst r17\r
+ 3493 00e6 01F4 brne .+2\r
+ 3494 00e8 00C0 rjmp .L182\r
+ 3495 .LSM288:\r
+ 3496 00ea 4A85 ldd r20,Y+10\r
+ 3497 00ec 5B85 ldd r21,Y+11\r
+ 3498 00ee 6C85 ldd r22,Y+12\r
+ 3499 00f0 7D85 ldd r23,Y+13\r
+ 3500 00f2 CF01 movw r24,r30\r
+ 3501 00f4 0E94 0000 call create_chain\r
+ 3502 00f8 6B01 movw r12,r22\r
+ 3503 00fa 7C01 movw r14,r24\r
+ 3504 .LSM289:\r
+ 3505 00fc 6115 cp r22,__zero_reg__\r
+ 3506 00fe 7105 cpc r23,__zero_reg__\r
+ 3507 0100 8105 cpc r24,__zero_reg__\r
+ 3508 0102 9105 cpc r25,__zero_reg__\r
+ 3509 0104 01F4 brne .L188\r
+ 3510 .LVL342:\r
+ 3511 0106 87E0 ldi r24,lo8(7)\r
+ 3512 0108 00C0 rjmp .L189\r
+ 3513 .L188:\r
+ 3514 .LSM290:\r
+ 3515 010a 6130 cpi r22,lo8(1)\r
+ 3516 010c 7105 cpc r23,__zero_reg__\r
+ 3517 010e 8105 cpc r24,__zero_reg__\r
+ 3518 0110 9105 cpc r25,__zero_reg__\r
+ 3519 0112 01F4 brne .+2\r
+ 3520 0114 00C0 rjmp .L185\r
+ 3521 .LSM291:\r
+ 3522 0116 6F3F cpi r22,lo8(-1)\r
+ 3523 0118 FFEF ldi r31,hi8(-1)\r
+ 3524 011a 7F07 cpc r23,r31\r
+ 3525 011c FFEF ldi r31,hlo8(-1)\r
+ 3526 011e 8F07 cpc r24,r31\r
+ 3527 0120 FFEF ldi r31,hhi8(-1)\r
+ 3528 0122 9F07 cpc r25,r31\r
+ 3529 0124 01F4 brne .+2\r
+ 3530 0126 00C0 rjmp .L186\r
+ 3531 .LSM292:\r
+ 3532 0128 8881 ld r24,Y\r
+ 3533 012a 9981 ldd r25,Y+1\r
+ 3534 012c 40E0 ldi r20,lo8(0)\r
+ 3535 012e 50E0 ldi r21,hi8(0)\r
+ 3536 0130 60E0 ldi r22,hlo8(0)\r
+ 3537 0132 70E0 ldi r23,hhi8(0)\r
+ 3538 0134 0E94 0000 call move_window\r
+ 3539 .LVL343:\r
+ 3540 0138 8823 tst r24\r
+ 3541 013a 01F0 breq .+2\r
+ 3542 013c 00C0 rjmp .L186\r
+ 3543 .LSM293:\r
+ 3544 013e 8881 ld r24,Y\r
+ 3545 0140 9981 ldd r25,Y+1\r
+ 3546 0142 8E96 adiw r24,46\r
+ 3547 0144 60E0 ldi r22,lo8(0)\r
+ 3548 0146 70E0 ldi r23,hi8(0)\r
+ 3549 0148 40E0 ldi r20,lo8(512)\r
+ 3550 014a 52E0 ldi r21,hi8(512)\r
+ 3551 014c 0E94 0000 call mem_set\r
+ 3552 .LSM294:\r
+ 3553 0150 0881 ld r16,Y\r
+ 3554 0152 1981 ldd r17,Y+1\r
+ 3555 0154 C801 movw r24,r16\r
+ 3556 0156 B701 movw r22,r14\r
+ 3557 0158 A601 movw r20,r12\r
+ 3558 015a 0E94 0000 call clust2sect\r
+ 3559 015e F801 movw r30,r16\r
+ 3560 0160 62A7 std Z+42,r22\r
+ 3561 0162 73A7 std Z+43,r23\r
+ 3562 0164 84A7 std Z+44,r24\r
+ 3563 0166 95A7 std Z+45,r25\r
+ 3564 0168 00E0 ldi r16,lo8(0)\r
+ 3565 .LVL344:\r
+ 3566 .LSM295:\r
+ 3567 016a 11E0 ldi r17,lo8(1)\r
+ 3568 .LVL345:\r
+ 3569 016c 00C0 rjmp .L190\r
+ 3570 .L191:\r
+ 3571 016e 1483 std Z+4,r17\r
+ 3572 .LSM296:\r
+ 3573 0170 8881 ld r24,Y\r
+ 3574 0172 9981 ldd r25,Y+1\r
+ 3575 0174 40E0 ldi r20,lo8(0)\r
+ 3576 0176 50E0 ldi r21,hi8(0)\r
+ 3577 0178 60E0 ldi r22,hlo8(0)\r
+ 3578 017a 70E0 ldi r23,hhi8(0)\r
+ 3579 017c 0E94 0000 call move_window\r
+ 3580 0180 8823 tst r24\r
+ 3581 0182 01F0 breq .+2\r
+ 3582 0184 00C0 rjmp .L186\r
+ 3583 .LSM297:\r
+ 3584 0186 E881 ld r30,Y\r
+ 3585 0188 F981 ldd r31,Y+1\r
+ 3586 018a 82A5 ldd r24,Z+42\r
+ 3587 018c 93A5 ldd r25,Z+43\r
+ 3588 018e A4A5 ldd r26,Z+44\r
+ 3589 0190 B5A5 ldd r27,Z+45\r
+ 3590 0192 0196 adiw r24,1\r
+ 3591 0194 A11D adc r26,__zero_reg__\r
+ 3592 0196 B11D adc r27,__zero_reg__\r
+ 3593 0198 82A7 std Z+42,r24\r
+ 3594 019a 93A7 std Z+43,r25\r
+ 3595 019c A4A7 std Z+44,r26\r
+ 3596 019e B5A7 std Z+45,r27\r
+ 3597 .LSM298:\r
+ 3598 01a0 0F5F subi r16,lo8(-(1))\r
+ 3599 .L190:\r
+ 3600 01a2 E881 ld r30,Y\r
+ 3601 01a4 F981 ldd r31,Y+1\r
+ 3602 01a6 8281 ldd r24,Z+2\r
+ 3603 01a8 0817 cp r16,r24\r
+ 3604 01aa 00F0 brlo .L191\r
+ 3605 .LSM299:\r
+ 3606 01ac 82A5 ldd r24,Z+42\r
+ 3607 01ae 93A5 ldd r25,Z+43\r
+ 3608 01b0 A4A5 ldd r26,Z+44\r
+ 3609 01b2 B5A5 ldd r27,Z+45\r
+ 3610 01b4 801B sub r24,r16\r
+ 3611 01b6 9109 sbc r25,__zero_reg__\r
+ 3612 01b8 A109 sbc r26,__zero_reg__\r
+ 3613 01ba B109 sbc r27,__zero_reg__\r
+ 3614 01bc 82A7 std Z+42,r24\r
+ 3615 01be 93A7 std Z+43,r25\r
+ 3616 01c0 A4A7 std Z+44,r26\r
+ 3617 01c2 B5A7 std Z+45,r27\r
+ 3618 .LVL346:\r
+ 3619 .L187:\r
+ 3620 .LBE3:\r
+ 3621 .LSM300:\r
+ 3622 01c4 CA86 std Y+10,r12\r
+ 3623 01c6 DB86 std Y+11,r13\r
+ 3624 01c8 EC86 std Y+12,r14\r
+ 3625 01ca FD86 std Y+13,r15\r
+ 3626 .LSM301:\r
+ 3627 01cc 8881 ld r24,Y\r
+ 3628 01ce 9981 ldd r25,Y+1\r
+ 3629 01d0 B701 movw r22,r14\r
+ 3630 01d2 A601 movw r20,r12\r
+ 3631 01d4 0E94 0000 call clust2sect\r
+ 3632 01d8 6E87 std Y+14,r22\r
+ 3633 01da 7F87 std Y+15,r23\r
+ 3634 01dc 888B std Y+16,r24\r
+ 3635 01de 998B std Y+17,r25\r
+ 3636 .LVL347:\r
+ 3637 .L183:\r
+ 3638 .LSM302:\r
+ 3639 01e0 BD82 std Y+5,r11\r
+ 3640 01e2 AC82 std Y+4,r10\r
+ 3641 .LSM303:\r
+ 3642 01e4 A5E0 ldi r26,5\r
+ 3643 01e6 880C 1: lsl r8\r
+ 3644 01e8 991C rol r9\r
+ 3645 01ea AA95 dec r26\r
+ 3646 01ec 01F4 brne 1b\r
+ 3647 01ee 8EE2 ldi r24,lo8(46)\r
+ 3648 01f0 90E0 ldi r25,hi8(46)\r
+ 3649 01f2 880E add r8,r24\r
+ 3650 01f4 991E adc r9,r25\r
+ 3651 01f6 8881 ld r24,Y\r
+ 3652 01f8 9981 ldd r25,Y+1\r
+ 3653 01fa 880D add r24,r8\r
+ 3654 01fc 991D adc r25,r9\r
+ 3655 01fe 9B8B std Y+19,r25\r
+ 3656 0200 8A8B std Y+18,r24\r
+ 3657 0202 80E0 ldi r24,lo8(0)\r
+ 3658 0204 00C0 rjmp .L189\r
+ 3659 .LVL348:\r
+ 3660 .L182:\r
+ 3661 .LSM304:\r
+ 3662 0206 84E0 ldi r24,lo8(4)\r
+ 3663 0208 00C0 rjmp .L189\r
+ 3664 .LVL349:\r
+ 3665 .L185:\r
+ 3666 020a 82E0 ldi r24,lo8(2)\r
+ 3667 020c 00C0 rjmp .L189\r
+ 3668 .LVL350:\r
+ 3669 .L186:\r
+ 3670 020e 81E0 ldi r24,lo8(1)\r
+ 3671 .LVL351:\r
+ 3672 .L189:\r
+ 3673 /* epilogue start */\r
+ 3674 .LSM305:\r
+ 3675 0210 DF91 pop r29\r
+ 3676 0212 CF91 pop r28\r
+ 3677 .LVL352:\r
+ 3678 0214 1F91 pop r17\r
+ 3679 .LVL353:\r
+ 3680 0216 0F91 pop r16\r
+ 3681 .LVL354:\r
+ 3682 0218 FF90 pop r15\r
+ 3683 021a EF90 pop r14\r
+ 3684 021c DF90 pop r13\r
+ 3685 021e CF90 pop r12\r
+ 3686 .LVL355:\r
+ 3687 0220 BF90 pop r11\r
+ 3688 0222 AF90 pop r10\r
+ 3689 .LVL356:\r
+ 3690 0224 9F90 pop r9\r
+ 3691 0226 8F90 pop r8\r
+ 3692 0228 0895 ret\r
+ 3693 .LFE64:\r
+ 3695 .section .text.f_read,"ax",@progbits\r
+ 3696 .global f_read\r
+ 3698 f_read:\r
+ 3699 .LFB74:\r
+ 3700 .LSM306:\r
+ 3701 .LVL357:\r
+ 3702 0000 2F92 push r2\r
+ 3703 0002 3F92 push r3\r
+ 3704 0004 5F92 push r5\r
+ 3705 0006 6F92 push r6\r
+ 3706 0008 7F92 push r7\r
+ 3707 000a 8F92 push r8\r
+ 3708 000c 9F92 push r9\r
+ 3709 000e AF92 push r10\r
+ 3710 0010 BF92 push r11\r
+ 3711 0012 CF92 push r12\r
+ 3712 0014 DF92 push r13\r
+ 3713 0016 EF92 push r14\r
+ 3714 0018 FF92 push r15\r
+ 3715 001a 0F93 push r16\r
+ 3716 001c 1F93 push r17\r
+ 3717 001e CF93 push r28\r
+ 3718 0020 DF93 push r29\r
+ 3719 /* prologue: function */\r
+ 3720 /* frame size = 0 */\r
+ 3721 0022 EC01 movw r28,r24\r
+ 3722 0024 162F mov r17,r22\r
+ 3723 0026 072F mov r16,r23\r
+ 3724 .LVL358:\r
+ 3725 0028 4A01 movw r8,r20\r
+ 3726 002a 1901 movw r2,r18\r
+ 3727 .LSM307:\r
+ 3728 002c F901 movw r30,r18\r
+ 3729 002e 1182 std Z+1,__zero_reg__\r
+ 3730 0030 1082 st Z,__zero_reg__\r
+ 3731 .LSM308:\r
+ 3732 0032 6A81 ldd r22,Y+2\r
+ 3733 0034 7B81 ldd r23,Y+3\r
+ 3734 .LVL359:\r
+ 3735 0036 8881 ld r24,Y\r
+ 3736 0038 9981 ldd r25,Y+1\r
+ 3737 .LVL360:\r
+ 3738 003a 0E94 0000 call validate\r
+ 3739 .LVL361:\r
+ 3740 003e 582E mov r5,r24\r
+ 3741 .LVL362:\r
+ 3742 .LSM309:\r
+ 3743 0040 8823 tst r24\r
+ 3744 0042 01F0 breq .+2\r
+ 3745 0044 00C0 rjmp .L194\r
+ 3746 .LVL363:\r
+ 3747 .LSM310:\r
+ 3748 0046 8C81 ldd r24,Y+4\r
+ 3749 .LVL364:\r
+ 3750 0048 87FD sbrc r24,7\r
+ 3751 004a 00C0 rjmp .L215\r
+ 3752 .L195:\r
+ 3753 .LSM311:\r
+ 3754 004c 80FD sbrc r24,0\r
+ 3755 004e 00C0 rjmp .L196\r
+ 3756 0050 47E0 ldi r20,lo8(7)\r
+ 3757 0052 542E mov r5,r20\r
+ 3758 0054 00C0 rjmp .L194\r
+ 3759 .L196:\r
+ 3760 .LSM312:\r
+ 3761 0056 2A85 ldd r18,Y+10\r
+ 3762 0058 3B85 ldd r19,Y+11\r
+ 3763 005a 4C85 ldd r20,Y+12\r
+ 3764 005c 5D85 ldd r21,Y+13\r
+ 3765 .LVL365:\r
+ 3766 005e 8E81 ldd r24,Y+6\r
+ 3767 0060 9F81 ldd r25,Y+7\r
+ 3768 0062 A885 ldd r26,Y+8\r
+ 3769 0064 B985 ldd r27,Y+9\r
+ 3770 0066 281B sub r18,r24\r
+ 3771 0068 390B sbc r19,r25\r
+ 3772 006a 4A0B sbc r20,r26\r
+ 3773 006c 5B0B sbc r21,r27\r
+ 3774 .LSM313:\r
+ 3775 006e C401 movw r24,r8\r
+ 3776 0070 A0E0 ldi r26,lo8(0)\r
+ 3777 0072 B0E0 ldi r27,hi8(0)\r
+ 3778 .LVL366:\r
+ 3779 0074 2817 cp r18,r24\r
+ 3780 0076 3907 cpc r19,r25\r
+ 3781 0078 4A07 cpc r20,r26\r
+ 3782 007a 5B07 cpc r21,r27\r
+ 3783 007c 00F4 brsh .L197\r
+ 3784 .LVL367:\r
+ 3785 007e 4901 movw r8,r18\r
+ 3786 .LVL368:\r
+ 3787 .L197:\r
+ 3788 .LSM314:\r
+ 3789 0080 812F mov r24,r17\r
+ 3790 .LVL369:\r
+ 3791 0082 902F mov r25,r16\r
+ 3792 .LVL370:\r
+ 3793 0084 9C01 movw r18,r24\r
+ 3794 .LVL371:\r
+ 3795 0086 3901 movw r6,r18\r
+ 3796 .LVL372:\r
+ 3797 0088 00C0 rjmp .L198\r
+ 3798 .LVL373:\r
+ 3799 .L213:\r
+ 3800 .LSM315:\r
+ 3801 008a 2E81 ldd r18,Y+6\r
+ 3802 008c 3F81 ldd r19,Y+7\r
+ 3803 008e 4885 ldd r20,Y+8\r
+ 3804 0090 5985 ldd r21,Y+9\r
+ 3805 0092 DA01 movw r26,r20\r
+ 3806 0094 C901 movw r24,r18\r
+ 3807 0096 9170 andi r25,hi8(511)\r
+ 3808 0098 A070 andi r26,hlo8(511)\r
+ 3809 009a B070 andi r27,hhi8(511)\r
+ 3810 009c 0097 sbiw r24,0\r
+ 3811 009e A105 cpc r26,__zero_reg__\r
+ 3812 00a0 B105 cpc r27,__zero_reg__\r
+ 3813 00a2 01F0 breq .+2\r
+ 3814 00a4 00C0 rjmp .L199\r
+ 3815 .LSM316:\r
+ 3816 00a6 E881 ld r30,Y\r
+ 3817 00a8 F981 ldd r31,Y+1\r
+ 3818 00aa 9D81 ldd r25,Y+5\r
+ 3819 .LVL374:\r
+ 3820 00ac 8281 ldd r24,Z+2\r
+ 3821 00ae 9817 cp r25,r24\r
+ 3822 00b0 00F0 brlo .L200\r
+ 3823 .LSM317:\r
+ 3824 00b2 2115 cp r18,__zero_reg__\r
+ 3825 00b4 3105 cpc r19,__zero_reg__\r
+ 3826 00b6 4105 cpc r20,__zero_reg__\r
+ 3827 00b8 5105 cpc r21,__zero_reg__\r
+ 3828 00ba 01F4 brne .L201\r
+ 3829 00bc 6E85 ldd r22,Y+14\r
+ 3830 00be 7F85 ldd r23,Y+15\r
+ 3831 00c0 8889 ldd r24,Y+16\r
+ 3832 00c2 9989 ldd r25,Y+17\r
+ 3833 .LVL375:\r
+ 3834 00c4 00C0 rjmp .L202\r
+ 3835 .LVL376:\r
+ 3836 .L201:\r
+ 3837 00c6 4A89 ldd r20,Y+18\r
+ 3838 00c8 5B89 ldd r21,Y+19\r
+ 3839 00ca 6C89 ldd r22,Y+20\r
+ 3840 00cc 7D89 ldd r23,Y+21\r
+ 3841 00ce CF01 movw r24,r30\r
+ 3842 00d0 0E94 0000 call get_fat\r
+ 3843 .LVL377:\r
+ 3844 .L202:\r
+ 3845 .LSM318:\r
+ 3846 00d4 6230 cpi r22,lo8(2)\r
+ 3847 00d6 7105 cpc r23,__zero_reg__\r
+ 3848 00d8 8105 cpc r24,__zero_reg__\r
+ 3849 00da 9105 cpc r25,__zero_reg__\r
+ 3850 00dc 00F4 brsh .L203\r
+ 3851 .LVL378:\r
+ 3852 .L217:\r
+ 3853 00de 8C81 ldd r24,Y+4\r
+ 3854 00e0 8068 ori r24,lo8(-128)\r
+ 3855 00e2 8C83 std Y+4,r24\r
+ 3856 .L215:\r
+ 3857 00e4 32E0 ldi r19,lo8(2)\r
+ 3858 00e6 532E mov r5,r19\r
+ 3859 00e8 00C0 rjmp .L194\r
+ 3860 .LVL379:\r
+ 3861 .L203:\r
+ 3862 .LSM319:\r
+ 3863 00ea 6F3F cpi r22,lo8(-1)\r
+ 3864 00ec FFEF ldi r31,hi8(-1)\r
+ 3865 00ee 7F07 cpc r23,r31\r
+ 3866 00f0 FFEF ldi r31,hlo8(-1)\r
+ 3867 00f2 8F07 cpc r24,r31\r
+ 3868 00f4 FFEF ldi r31,hhi8(-1)\r
+ 3869 00f6 9F07 cpc r25,r31\r
+ 3870 00f8 01F4 brne .+2\r
+ 3871 00fa 00C0 rjmp .L216\r
+ 3872 .L204:\r
+ 3873 .LSM320:\r
+ 3874 00fc 6A8B std Y+18,r22\r
+ 3875 00fe 7B8B std Y+19,r23\r
+ 3876 0100 8C8B std Y+20,r24\r
+ 3877 0102 9D8B std Y+21,r25\r
+ 3878 .LSM321:\r
+ 3879 0104 1D82 std Y+5,__zero_reg__\r
+ 3880 .L200:\r
+ 3881 .LSM322:\r
+ 3882 0106 0881 ld r16,Y\r
+ 3883 0108 1981 ldd r17,Y+1\r
+ 3884 .LVL380:\r
+ 3885 010a 4A89 ldd r20,Y+18\r
+ 3886 010c 5B89 ldd r21,Y+19\r
+ 3887 010e 6C89 ldd r22,Y+20\r
+ 3888 0110 7D89 ldd r23,Y+21\r
+ 3889 0112 C801 movw r24,r16\r
+ 3890 0114 0E94 0000 call clust2sect\r
+ 3891 .LVL381:\r
+ 3892 .LSM323:\r
+ 3893 0118 6115 cp r22,__zero_reg__\r
+ 3894 011a 7105 cpc r23,__zero_reg__\r
+ 3895 011c 8105 cpc r24,__zero_reg__\r
+ 3896 011e 9105 cpc r25,__zero_reg__\r
+ 3897 0120 01F0 breq .L217\r
+ 3898 .LVL382:\r
+ 3899 .L205:\r
+ 3900 .LSM324:\r
+ 3901 0122 3D81 ldd r19,Y+5\r
+ 3902 0124 5B01 movw r10,r22\r
+ 3903 0126 6C01 movw r12,r24\r
+ 3904 0128 A30E add r10,r19\r
+ 3905 012a B11C adc r11,__zero_reg__\r
+ 3906 012c C11C adc r12,__zero_reg__\r
+ 3907 012e D11C adc r13,__zero_reg__\r
+ 3908 .LVL383:\r
+ 3909 .LSM325:\r
+ 3910 0130 7401 movw r14,r8\r
+ 3911 0132 EF2C mov r14,r15\r
+ 3912 0134 FF24 clr r15\r
+ 3913 0136 E694 lsr r14\r
+ 3914 .LSM326:\r
+ 3915 0138 E114 cp r14,__zero_reg__\r
+ 3916 013a F104 cpc r15,__zero_reg__\r
+ 3917 013c 01F4 brne .+2\r
+ 3918 013e 00C0 rjmp .L206\r
+ 3919 .LSM327:\r
+ 3920 0140 F801 movw r30,r16\r
+ 3921 0142 2281 ldd r18,Z+2\r
+ 3922 0144 432F mov r20,r19\r
+ 3923 0146 50E0 ldi r21,lo8(0)\r
+ 3924 0148 C701 movw r24,r14\r
+ 3925 014a 840F add r24,r20\r
+ 3926 014c 951F adc r25,r21\r
+ 3927 014e 30E0 ldi r19,lo8(0)\r
+ 3928 0150 2817 cp r18,r24\r
+ 3929 0152 3907 cpc r19,r25\r
+ 3930 0154 00F4 brsh .L207\r
+ 3931 .LSM328:\r
+ 3932 0156 7901 movw r14,r18\r
+ 3933 0158 E41A sub r14,r20\r
+ 3934 015a F50A sbc r15,r21\r
+ 3935 .L207:\r
+ 3936 .LSM329:\r
+ 3937 015c F801 movw r30,r16\r
+ 3938 015e 8181 ldd r24,Z+1\r
+ 3939 0160 B301 movw r22,r6\r
+ 3940 0162 A601 movw r20,r12\r
+ 3941 0164 9501 movw r18,r10\r
+ 3942 0166 0E2D mov r16,r14\r
+ 3943 0168 0E94 0000 call disk_read\r
+ 3944 016c 8823 tst r24\r
+ 3945 016e 01F0 breq .+2\r
+ 3946 0170 00C0 rjmp .L216\r
+ 3947 .L208:\r
+ 3948 .LSM330:\r
+ 3949 0172 E881 ld r30,Y\r
+ 3950 0174 F981 ldd r31,Y+1\r
+ 3951 0176 8481 ldd r24,Z+4\r
+ 3952 0178 8823 tst r24\r
+ 3953 017a 01F0 breq .L209\r
+ 3954 017c 22A5 ldd r18,Z+42\r
+ 3955 017e 33A5 ldd r19,Z+43\r
+ 3956 0180 44A5 ldd r20,Z+44\r
+ 3957 0182 55A5 ldd r21,Z+45\r
+ 3958 0184 2A19 sub r18,r10\r
+ 3959 0186 3B09 sbc r19,r11\r
+ 3960 0188 4C09 sbc r20,r12\r
+ 3961 018a 5D09 sbc r21,r13\r
+ 3962 018c C701 movw r24,r14\r
+ 3963 018e A0E0 ldi r26,lo8(0)\r
+ 3964 0190 B0E0 ldi r27,hi8(0)\r
+ 3965 .LVL384:\r
+ 3966 0192 2817 cp r18,r24\r
+ 3967 0194 3907 cpc r19,r25\r
+ 3968 0196 4A07 cpc r20,r26\r
+ 3969 0198 5B07 cpc r21,r27\r
+ 3970 019a 00F4 brsh .L209\r
+ 3971 .LVL385:\r
+ 3972 .LSM331:\r
+ 3973 019c 99E0 ldi r25,9\r
+ 3974 019e 220F 1: lsl r18\r
+ 3975 01a0 331F rol r19\r
+ 3976 01a2 441F rol r20\r
+ 3977 01a4 551F rol r21\r
+ 3978 01a6 9A95 dec r25\r
+ 3979 01a8 01F4 brne 1b\r
+ 3980 01aa C301 movw r24,r6\r
+ 3981 .LVL386:\r
+ 3982 01ac 820F add r24,r18\r
+ 3983 01ae 931F adc r25,r19\r
+ 3984 01b0 BE96 adiw r30,46\r
+ 3985 01b2 BF01 movw r22,r30\r
+ 3986 01b4 40E0 ldi r20,lo8(512)\r
+ 3987 01b6 52E0 ldi r21,hi8(512)\r
+ 3988 01b8 0E94 0000 call mem_cpy\r
+ 3989 .LVL387:\r
+ 3990 .L209:\r
+ 3991 .LSM332:\r
+ 3992 01bc 8D81 ldd r24,Y+5\r
+ 3993 01be 8E0D add r24,r14\r
+ 3994 01c0 8D83 std Y+5,r24\r
+ 3995 .LSM333:\r
+ 3996 01c2 8701 movw r16,r14\r
+ 3997 .LVL388:\r
+ 3998 01c4 102F mov r17,r16\r
+ 3999 01c6 0027 clr r16\r
+ 4000 01c8 110F lsl r17\r
+ 4001 01ca 00C0 rjmp .L210\r
+ 4002 .LVL389:\r
+ 4003 .L206:\r
+ 4004 .LSM334:\r
+ 4005 01cc AE8A std Y+22,r10\r
+ 4006 01ce BF8A std Y+23,r11\r
+ 4007 01d0 C88E std Y+24,r12\r
+ 4008 01d2 D98E std Y+25,r13\r
+ 4009 .LSM335:\r
+ 4010 01d4 3F5F subi r19,lo8(-(1))\r
+ 4011 01d6 3D83 std Y+5,r19\r
+ 4012 .LVL390:\r
+ 4013 .L199:\r
+ 4014 .LSM336:\r
+ 4015 01d8 EE80 ldd r14,Y+6\r
+ 4016 01da FF80 ldd r15,Y+7\r
+ 4017 01dc 0885 ldd r16,Y+8\r
+ 4018 01de 1985 ldd r17,Y+9\r
+ 4019 .LVL391:\r
+ 4020 .LSM337:\r
+ 4021 01e0 4E89 ldd r20,Y+22\r
+ 4022 01e2 5F89 ldd r21,Y+23\r
+ 4023 01e4 688D ldd r22,Y+24\r
+ 4024 01e6 798D ldd r23,Y+25\r
+ 4025 01e8 8881 ld r24,Y\r
+ 4026 01ea 9981 ldd r25,Y+1\r
+ 4027 01ec 0E94 0000 call move_window\r
+ 4028 .LVL392:\r
+ 4029 01f0 8823 tst r24\r
+ 4030 01f2 01F0 breq .L211\r
+ 4031 .LVL393:\r
+ 4032 .L216:\r
+ 4033 .LSM338:\r
+ 4034 01f4 8C81 ldd r24,Y+4\r
+ 4035 01f6 8068 ori r24,lo8(-128)\r
+ 4036 01f8 8C83 std Y+4,r24\r
+ 4037 01fa 5524 clr r5\r
+ 4038 01fc 5394 inc r5\r
+ 4039 01fe 00C0 rjmp .L194\r
+ 4040 .LVL394:\r
+ 4041 .L211:\r
+ 4042 .LSM339:\r
+ 4043 0200 C701 movw r24,r14\r
+ 4044 0202 9170 andi r25,hi8(511)\r
+ 4045 0204 20E0 ldi r18,lo8(512)\r
+ 4046 0206 32E0 ldi r19,hi8(512)\r
+ 4047 0208 281B sub r18,r24\r
+ 4048 020a 390B sbc r19,r25\r
+ 4049 020c 8401 movw r16,r8\r
+ 4050 .LVL395:\r
+ 4051 020e 2815 cp r18,r8\r
+ 4052 0210 3905 cpc r19,r9\r
+ 4053 0212 00F4 brsh .L212\r
+ 4054 .LVL396:\r
+ 4055 0214 8901 movw r16,r18\r
+ 4056 .L212:\r
+ 4057 .LSM340:\r
+ 4058 0216 8E81 ldd r24,Y+6\r
+ 4059 0218 9F81 ldd r25,Y+7\r
+ 4060 021a 9170 andi r25,hi8(511)\r
+ 4061 021c 8E96 adiw r24,46\r
+ 4062 021e 6881 ld r22,Y\r
+ 4063 0220 7981 ldd r23,Y+1\r
+ 4064 0222 680F add r22,r24\r
+ 4065 0224 791F adc r23,r25\r
+ 4066 0226 C301 movw r24,r6\r
+ 4067 0228 A801 movw r20,r16\r
+ 4068 022a 0E94 0000 call mem_cpy\r
+ 4069 .LVL397:\r
+ 4070 .L210:\r
+ 4071 .LSM341:\r
+ 4072 022e 600E add r6,r16\r
+ 4073 0230 711E adc r7,r17\r
+ 4074 0232 C801 movw r24,r16\r
+ 4075 0234 A0E0 ldi r26,lo8(0)\r
+ 4076 0236 B0E0 ldi r27,hi8(0)\r
+ 4077 .LVL398:\r
+ 4078 0238 2E81 ldd r18,Y+6\r
+ 4079 023a 3F81 ldd r19,Y+7\r
+ 4080 023c 4885 ldd r20,Y+8\r
+ 4081 023e 5985 ldd r21,Y+9\r
+ 4082 0240 280F add r18,r24\r
+ 4083 0242 391F adc r19,r25\r
+ 4084 0244 4A1F adc r20,r26\r
+ 4085 0246 5B1F adc r21,r27\r
+ 4086 0248 2E83 std Y+6,r18\r
+ 4087 024a 3F83 std Y+7,r19\r
+ 4088 024c 4887 std Y+8,r20\r
+ 4089 024e 5987 std Y+9,r21\r
+ 4090 0250 F101 movw r30,r2\r
+ 4091 0252 8081 ld r24,Z\r
+ 4092 0254 9181 ldd r25,Z+1\r
+ 4093 0256 800F add r24,r16\r
+ 4094 0258 911F adc r25,r17\r
+ 4095 025a 9183 std Z+1,r25\r
+ 4096 025c 8083 st Z,r24\r
+ 4097 025e 801A sub r8,r16\r
+ 4098 0260 910A sbc r9,r17\r
+ 4099 .LVL399:\r
+ 4100 .L198:\r
+ 4101 .LSM342:\r
+ 4102 0262 8114 cp r8,__zero_reg__\r
+ 4103 0264 9104 cpc r9,__zero_reg__\r
+ 4104 0266 01F0 breq .+2\r
+ 4105 0268 00C0 rjmp .L213\r
+ 4106 .LVL400:\r
+ 4107 .L194:\r
+ 4108 .LSM343:\r
+ 4109 026a 852D mov r24,r5\r
+ 4110 /* epilogue start */\r
+ 4111 026c DF91 pop r29\r
+ 4112 026e CF91 pop r28\r
+ 4113 .LVL401:\r
+ 4114 0270 1F91 pop r17\r
+ 4115 .LVL402:\r
+ 4116 0272 0F91 pop r16\r
+ 4117 .LVL403:\r
+ 4118 0274 FF90 pop r15\r
+ 4119 0276 EF90 pop r14\r
+ 4120 .LVL404:\r
+ 4121 0278 DF90 pop r13\r
+ 4122 027a CF90 pop r12\r
+ 4123 027c BF90 pop r11\r
+ 4124 027e AF90 pop r10\r
+ 4125 .LVL405:\r
+ 4126 0280 9F90 pop r9\r
+ 4127 0282 8F90 pop r8\r
+ 4128 .LVL406:\r
+ 4129 0284 7F90 pop r7\r
+ 4130 0286 6F90 pop r6\r
+ 4131 .LVL407:\r
+ 4132 0288 5F90 pop r5\r
+ 4133 .LVL408:\r
+ 4134 028a 3F90 pop r3\r
+ 4135 028c 2F90 pop r2\r
+ 4136 .LVL409:\r
+ 4137 028e 0895 ret\r
+ 4138 .LFE74:\r
+ 4140 .section .text.f_gets,"ax",@progbits\r
+ 4141 .global f_gets\r
+ 4143 f_gets:\r
+ 4144 .LFB79:\r
+ 4145 .LSM344:\r
+ 4146 .LVL410:\r
+ 4147 0000 6F92 push r6\r
+ 4148 0002 7F92 push r7\r
+ 4149 0004 8F92 push r8\r
+ 4150 0006 9F92 push r9\r
+ 4151 0008 AF92 push r10\r
+ 4152 000a BF92 push r11\r
+ 4153 000c CF92 push r12\r
+ 4154 000e DF92 push r13\r
+ 4155 0010 EF92 push r14\r
+ 4156 0012 FF92 push r15\r
+ 4157 0014 0F93 push r16\r
+ 4158 0016 1F93 push r17\r
+ 4159 0018 DF93 push r29\r
+ 4160 001a CF93 push r28\r
+ 4161 001c 00D0 rcall .\r
+ 4162 001e CDB7 in r28,__SP_L__\r
+ 4163 0020 DEB7 in r29,__SP_H__\r
+ 4164 /* prologue: function */\r
+ 4165 /* frame size = 2 */\r
+ 4166 0022 5C01 movw r10,r24\r
+ 4167 0024 6B01 movw r12,r22\r
+ 4168 0026 4A01 movw r8,r20\r
+ 4169 .LSM345:\r
+ 4170 0028 8C01 movw r16,r24\r
+ 4171 .LVL411:\r
+ 4172 002a EE24 clr r14\r
+ 4173 002c FF24 clr r15\r
+ 4174 .LVL412:\r
+ 4175 .LSM346:\r
+ 4176 002e 0894 sec\r
+ 4177 0030 C108 sbc r12,__zero_reg__\r
+ 4178 0032 D108 sbc r13,__zero_reg__\r
+ 4179 .LSM347:\r
+ 4180 0034 3E01 movw r6,r28\r
+ 4181 0036 0894 sec\r
+ 4182 0038 611C adc r6,__zero_reg__\r
+ 4183 003a 711C adc r7,__zero_reg__\r
+ 4184 003c 00C0 rjmp .L219\r
+ 4185 .LVL413:\r
+ 4186 .L221:\r
+ 4187 003e C401 movw r24,r8\r
+ 4188 0040 B801 movw r22,r16\r
+ 4189 .LVL414:\r
+ 4190 0042 41E0 ldi r20,lo8(1)\r
+ 4191 0044 50E0 ldi r21,hi8(1)\r
+ 4192 0046 9301 movw r18,r6\r
+ 4193 0048 0E94 0000 call f_read\r
+ 4194 .LSM348:\r
+ 4195 004c 8981 ldd r24,Y+1\r
+ 4196 004e 9A81 ldd r25,Y+2\r
+ 4197 0050 0197 sbiw r24,1\r
+ 4198 0052 01F4 brne .L220\r
+ 4199 .LVL415:\r
+ 4200 .LSM349:\r
+ 4201 0054 0894 sec\r
+ 4202 0056 E11C adc r14,__zero_reg__\r
+ 4203 0058 F11C adc r15,__zero_reg__\r
+ 4204 .LSM350:\r
+ 4205 005a F801 movw r30,r16\r
+ 4206 005c 8191 ld r24,Z+\r
+ 4207 .LVL416:\r
+ 4208 005e 8F01 movw r16,r30\r
+ 4209 0060 8A30 cpi r24,lo8(10)\r
+ 4210 0062 01F0 breq .L220\r
+ 4211 .LVL417:\r
+ 4212 .L219:\r
+ 4213 .LSM351:\r
+ 4214 0064 EC14 cp r14,r12\r
+ 4215 0066 FD04 cpc r15,r13\r
+ 4216 0068 04F0 brlt .L221\r
+ 4217 .LVL418:\r
+ 4218 .L220:\r
+ 4219 .LSM352:\r
+ 4220 006a F801 movw r30,r16\r
+ 4221 006c 1082 st Z,__zero_reg__\r
+ 4222 .LSM353:\r
+ 4223 006e EF28 or r14,r15\r
+ 4224 0070 01F4 brne .L222\r
+ 4225 0072 AA24 clr r10\r
+ 4226 0074 BB24 clr r11\r
+ 4227 .LVL419:\r
+ 4228 .L222:\r
+ 4229 .LSM354:\r
+ 4230 0076 C501 movw r24,r10\r
+ 4231 .LVL420:\r
+ 4232 /* epilogue start */\r
+ 4233 0078 0F90 pop __tmp_reg__\r
+ 4234 007a 0F90 pop __tmp_reg__\r
+ 4235 007c CF91 pop r28\r
+ 4236 007e DF91 pop r29\r
+ 4237 0080 1F91 pop r17\r
+ 4238 0082 0F91 pop r16\r
+ 4239 .LVL421:\r
+ 4240 0084 FF90 pop r15\r
+ 4241 0086 EF90 pop r14\r
+ 4242 .LVL422:\r
+ 4243 0088 DF90 pop r13\r
+ 4244 008a CF90 pop r12\r
+ 4245 008c BF90 pop r11\r
+ 4246 008e AF90 pop r10\r
+ 4247 0090 9F90 pop r9\r
+ 4248 0092 8F90 pop r8\r
+ 4249 .LVL423:\r
+ 4250 0094 7F90 pop r7\r
+ 4251 0096 6F90 pop r6\r
+ 4252 0098 0895 ret\r
+ 4253 .LFE79:\r
+ 4255 .section .text.check_fs,"ax",@progbits\r
+ 4257 check_fs:\r
+ 4258 .LFB69:\r
+ 4259 .LSM355:\r
+ 4260 .LVL424:\r
+ 4261 0000 0F93 push r16\r
+ 4262 0002 CF93 push r28\r
+ 4263 0004 DF93 push r29\r
+ 4264 /* prologue: function */\r
+ 4265 /* frame size = 0 */\r
+ 4266 0006 EC01 movw r28,r24\r
+ 4267 0008 9A01 movw r18,r20\r
+ 4268 000a AB01 movw r20,r22\r
+ 4269 .LSM356:\r
+ 4270 000c BC01 movw r22,r24\r
+ 4271 000e 625D subi r22,lo8(-(46))\r
+ 4272 0010 7F4F sbci r23,hi8(-(46))\r
+ 4273 0012 8981 ldd r24,Y+1\r
+ 4274 .LVL425:\r
+ 4275 0014 01E0 ldi r16,lo8(1)\r
+ 4276 0016 0E94 0000 call disk_read\r
+ 4277 .LVL426:\r
+ 4278 001a 8823 tst r24\r
+ 4279 001c 01F0 breq .L225\r
+ 4280 001e 63E0 ldi r22,lo8(3)\r
+ 4281 0020 00C0 rjmp .L226\r
+ 4282 .L225:\r
+ 4283 .LSM357:\r
+ 4284 0022 C35D subi r28,lo8(-(557))\r
+ 4285 0024 DD4F sbci r29,hi8(-(557))\r
+ 4286 0026 9881 ld r25,Y\r
+ 4287 0028 80E0 ldi r24,lo8(0)\r
+ 4288 002a 2A91 ld r18,-Y\r
+ 4289 002c CC52 subi r28,lo8(-(-556))\r
+ 4290 002e D240 sbci r29,hi8(-(-556))\r
+ 4291 0030 30E0 ldi r19,lo8(0)\r
+ 4292 0032 822B or r24,r18\r
+ 4293 0034 932B or r25,r19\r
+ 4294 0036 8555 subi r24,lo8(-21931)\r
+ 4295 0038 9A4A sbci r25,hi8(-21931)\r
+ 4296 003a 01F0 breq .L227\r
+ 4297 003c 62E0 ldi r22,lo8(2)\r
+ 4298 003e 00C0 rjmp .L226\r
+ 4299 .L227:\r
+ 4300 .LSM358:\r
+ 4301 0040 C959 subi r28,lo8(-(103))\r
+ 4302 0042 DF4F sbci r29,hi8(-(103))\r
+ 4303 0044 2881 ld r18,Y\r
+ 4304 0046 30E0 ldi r19,lo8(0)\r
+ 4305 0048 40E0 ldi r20,lo8(0)\r
+ 4306 004a 50E0 ldi r21,hi8(0)\r
+ 4307 004c 522F mov r21,r18\r
+ 4308 004e 4427 clr r20\r
+ 4309 0050 3327 clr r19\r
+ 4310 0052 2227 clr r18\r
+ 4311 0054 8A91 ld r24,-Y\r
+ 4312 0056 90E0 ldi r25,lo8(0)\r
+ 4313 0058 A0E0 ldi r26,lo8(0)\r
+ 4314 005a B0E0 ldi r27,hi8(0)\r
+ 4315 005c DC01 movw r26,r24\r
+ 4316 005e 9927 clr r25\r
+ 4317 0060 8827 clr r24\r
+ 4318 0062 282B or r18,r24\r
+ 4319 0064 392B or r19,r25\r
+ 4320 0066 4A2B or r20,r26\r
+ 4321 0068 5B2B or r21,r27\r
+ 4322 006a 2297 sbiw r28,2\r
+ 4323 006c 8991 ld r24,Y+\r
+ 4324 006e 90E0 ldi r25,lo8(0)\r
+ 4325 0070 A0E0 ldi r26,lo8(0)\r
+ 4326 0072 B0E0 ldi r27,hi8(0)\r
+ 4327 0074 282B or r18,r24\r
+ 4328 0076 392B or r19,r25\r
+ 4329 0078 4A2B or r20,r26\r
+ 4330 007a 5B2B or r21,r27\r
+ 4331 007c 9881 ld r25,Y\r
+ 4332 007e C556 subi r28,lo8(-(-101))\r
+ 4333 0080 D040 sbci r29,hi8(-(-101))\r
+ 4334 0082 80E0 ldi r24,lo8(0)\r
+ 4335 0084 A0E0 ldi r26,lo8(0)\r
+ 4336 0086 B0E0 ldi r27,hi8(0)\r
+ 4337 0088 282B or r18,r24\r
+ 4338 008a 392B or r19,r25\r
+ 4339 008c 4A2B or r20,r26\r
+ 4340 008e 5B2B or r21,r27\r
+ 4341 0090 5070 andi r21,hhi8(16777215)\r
+ 4342 0092 2654 subi r18,lo8(5521734)\r
+ 4343 0094 3144 sbci r19,hi8(5521734)\r
+ 4344 0096 4445 sbci r20,hlo8(5521734)\r
+ 4345 0098 5040 sbci r21,hhi8(5521734)\r
+ 4346 009a 01F4 brne .L228\r
+ 4347 009c 60E0 ldi r22,lo8(0)\r
+ 4348 009e 00C0 rjmp .L226\r
+ 4349 .L228:\r
+ 4350 00a0 60E0 ldi r22,lo8(0)\r
+ 4351 00a2 CD57 subi r28,lo8(-(131))\r
+ 4352 00a4 DF4F sbci r29,hi8(-(131))\r
+ 4353 00a6 2881 ld r18,Y\r
+ 4354 00a8 30E0 ldi r19,lo8(0)\r
+ 4355 00aa 40E0 ldi r20,lo8(0)\r
+ 4356 00ac 50E0 ldi r21,hi8(0)\r
+ 4357 00ae 522F mov r21,r18\r
+ 4358 00b0 4427 clr r20\r
+ 4359 00b2 3327 clr r19\r
+ 4360 00b4 2227 clr r18\r
+ 4361 00b6 8A91 ld r24,-Y\r
+ 4362 00b8 90E0 ldi r25,lo8(0)\r
+ 4363 00ba A0E0 ldi r26,lo8(0)\r
+ 4364 00bc B0E0 ldi r27,hi8(0)\r
+ 4365 00be DC01 movw r26,r24\r
+ 4366 00c0 9927 clr r25\r
+ 4367 00c2 8827 clr r24\r
+ 4368 00c4 282B or r18,r24\r
+ 4369 00c6 392B or r19,r25\r
+ 4370 00c8 4A2B or r20,r26\r
+ 4371 00ca 5B2B or r21,r27\r
+ 4372 00cc 2297 sbiw r28,2\r
+ 4373 00ce 8991 ld r24,Y+\r
+ 4374 00d0 90E0 ldi r25,lo8(0)\r
+ 4375 00d2 A0E0 ldi r26,lo8(0)\r
+ 4376 00d4 B0E0 ldi r27,hi8(0)\r
+ 4377 00d6 282B or r18,r24\r
+ 4378 00d8 392B or r19,r25\r
+ 4379 00da 4A2B or r20,r26\r
+ 4380 00dc 5B2B or r21,r27\r
+ 4381 00de 9881 ld r25,Y\r
+ 4382 .LVL427:\r
+ 4383 00e0 80E0 ldi r24,lo8(0)\r
+ 4384 00e2 A0E0 ldi r26,lo8(0)\r
+ 4385 00e4 B0E0 ldi r27,hi8(0)\r
+ 4386 00e6 282B or r18,r24\r
+ 4387 00e8 392B or r19,r25\r
+ 4388 00ea 4A2B or r20,r26\r
+ 4389 00ec 5B2B or r21,r27\r
+ 4390 00ee 5070 andi r21,hhi8(16777215)\r
+ 4391 00f0 2654 subi r18,lo8(5521734)\r
+ 4392 00f2 3144 sbci r19,hi8(5521734)\r
+ 4393 00f4 4445 sbci r20,hlo8(5521734)\r
+ 4394 00f6 5040 sbci r21,hhi8(5521734)\r
+ 4395 00f8 01F0 breq .L226\r
+ 4396 00fa 61E0 ldi r22,lo8(1)\r
+ 4397 .LVL428:\r
+ 4398 .L226:\r
+ 4399 .LSM359:\r
+ 4400 00fc 862F mov r24,r22\r
+ 4401 /* epilogue start */\r
+ 4402 00fe DF91 pop r29\r
+ 4403 0100 CF91 pop r28\r
+ 4404 .LVL429:\r
+ 4405 0102 0F91 pop r16\r
+ 4406 0104 0895 ret\r
+ 4407 .LFE69:\r
+ 4409 .section .text.f_sync,"ax",@progbits\r
+ 4410 .global f_sync\r
+ 4412 f_sync:\r
+ 4413 .LFB76:\r
+ 4414 .LSM360:\r
+ 4415 .LVL430:\r
+ 4416 0000 0F93 push r16\r
+ 4417 0002 1F93 push r17\r
+ 4418 0004 CF93 push r28\r
+ 4419 0006 DF93 push r29\r
+ 4420 /* prologue: function */\r
+ 4421 /* frame size = 0 */\r
+ 4422 0008 EC01 movw r28,r24\r
+ 4423 .LSM361:\r
+ 4424 000a 6A81 ldd r22,Y+2\r
+ 4425 000c 7B81 ldd r23,Y+3\r
+ 4426 000e 8881 ld r24,Y\r
+ 4427 0010 9981 ldd r25,Y+1\r
+ 4428 .LVL431:\r
+ 4429 0012 0E94 0000 call validate\r
+ 4430 0016 982F mov r25,r24\r
+ 4431 .LVL432:\r
+ 4432 .LSM362:\r
+ 4433 0018 8823 tst r24\r
+ 4434 001a 01F0 breq .+2\r
+ 4435 001c 00C0 rjmp .L232\r
+ 4436 .LVL433:\r
+ 4437 .LSM363:\r
+ 4438 001e 8C81 ldd r24,Y+4\r
+ 4439 .LVL434:\r
+ 4440 0020 85FF sbrs r24,5\r
+ 4441 0022 00C0 rjmp .L232\r
+ 4442 .LSM364:\r
+ 4443 0024 4A8D ldd r20,Y+26\r
+ 4444 0026 5B8D ldd r21,Y+27\r
+ 4445 0028 6C8D ldd r22,Y+28\r
+ 4446 002a 7D8D ldd r23,Y+29\r
+ 4447 002c 8881 ld r24,Y\r
+ 4448 002e 9981 ldd r25,Y+1\r
+ 4449 0030 0E94 0000 call move_window\r
+ 4450 .LVL435:\r
+ 4451 0034 982F mov r25,r24\r
+ 4452 .LVL436:\r
+ 4453 .LSM365:\r
+ 4454 0036 8823 tst r24\r
+ 4455 0038 01F0 breq .+2\r
+ 4456 003a 00C0 rjmp .L232\r
+ 4457 .LVL437:\r
+ 4458 .LSM366:\r
+ 4459 003c 0E8D ldd r16,Y+30\r
+ 4460 003e 1F8D ldd r17,Y+31\r
+ 4461 .LVL438:\r
+ 4462 .LSM367:\r
+ 4463 0040 F801 movw r30,r16\r
+ 4464 0042 8385 ldd r24,Z+11\r
+ 4465 .LVL439:\r
+ 4466 0044 8062 ori r24,lo8(32)\r
+ 4467 0046 8387 std Z+11,r24\r
+ 4468 .LSM368:\r
+ 4469 0048 8A85 ldd r24,Y+10\r
+ 4470 004a 848F std Z+28,r24\r
+ 4471 004c 8B85 ldd r24,Y+11\r
+ 4472 004e 858F std Z+29,r24\r
+ 4473 0050 8A85 ldd r24,Y+10\r
+ 4474 0052 9B85 ldd r25,Y+11\r
+ 4475 0054 AC85 ldd r26,Y+12\r
+ 4476 0056 BD85 ldd r27,Y+13\r
+ 4477 0058 CD01 movw r24,r26\r
+ 4478 005a AA27 clr r26\r
+ 4479 005c BB27 clr r27\r
+ 4480 005e 868F std Z+30,r24\r
+ 4481 0060 8A85 ldd r24,Y+10\r
+ 4482 0062 9B85 ldd r25,Y+11\r
+ 4483 0064 AC85 ldd r26,Y+12\r
+ 4484 0066 BD85 ldd r27,Y+13\r
+ 4485 0068 8B2F mov r24,r27\r
+ 4486 006a 9927 clr r25\r
+ 4487 006c AA27 clr r26\r
+ 4488 006e BB27 clr r27\r
+ 4489 0070 878F std Z+31,r24\r
+ 4490 .LSM369:\r
+ 4491 0072 8E85 ldd r24,Y+14\r
+ 4492 0074 828F std Z+26,r24\r
+ 4493 0076 8F85 ldd r24,Y+15\r
+ 4494 0078 838F std Z+27,r24\r
+ 4495 .LSM370:\r
+ 4496 007a 8E85 ldd r24,Y+14\r
+ 4497 007c 9F85 ldd r25,Y+15\r
+ 4498 007e A889 ldd r26,Y+16\r
+ 4499 0080 B989 ldd r27,Y+17\r
+ 4500 0082 CD01 movw r24,r26\r
+ 4501 0084 AA27 clr r26\r
+ 4502 0086 BB27 clr r27\r
+ 4503 0088 848B std Z+20,r24\r
+ 4504 008a 8E85 ldd r24,Y+14\r
+ 4505 008c 9F85 ldd r25,Y+15\r
+ 4506 008e A889 ldd r26,Y+16\r
+ 4507 0090 B989 ldd r27,Y+17\r
+ 4508 0092 CD01 movw r24,r26\r
+ 4509 0094 AA27 clr r26\r
+ 4510 0096 BB27 clr r27\r
+ 4511 0098 892F mov r24,r25\r
+ 4512 009a 9927 clr r25\r
+ 4513 009c 858B std Z+21,r24\r
+ 4514 .LSM371:\r
+ 4515 009e 0E94 0000 call get_fattime\r
+ 4516 .LVL440:\r
+ 4517 .LSM372:\r
+ 4518 00a2 F801 movw r30,r16\r
+ 4519 00a4 668B std Z+22,r22\r
+ 4520 .LVL441:\r
+ 4521 00a6 272F mov r18,r23\r
+ 4522 00a8 3327 clr r19\r
+ 4523 00aa 278B std Z+23,r18\r
+ 4524 00ac 9C01 movw r18,r24\r
+ 4525 00ae 4427 clr r20\r
+ 4526 00b0 5527 clr r21\r
+ 4527 00b2 208F std Z+24,r18\r
+ 4528 00b4 692F mov r22,r25\r
+ 4529 00b6 7727 clr r23\r
+ 4530 00b8 8827 clr r24\r
+ 4531 00ba 9927 clr r25\r
+ 4532 .LVL442:\r
+ 4533 00bc 618F std Z+25,r22\r
+ 4534 .LSM373:\r
+ 4535 00be 8C81 ldd r24,Y+4\r
+ 4536 00c0 8F7D andi r24,lo8(-33)\r
+ 4537 00c2 8C83 std Y+4,r24\r
+ 4538 .LSM374:\r
+ 4539 00c4 E881 ld r30,Y\r
+ 4540 00c6 F981 ldd r31,Y+1\r
+ 4541 00c8 81E0 ldi r24,lo8(1)\r
+ 4542 00ca 8483 std Z+4,r24\r
+ 4543 .LSM375:\r
+ 4544 00cc 0990 ld __tmp_reg__,Y+\r
+ 4545 00ce D881 ld r29,Y\r
+ 4546 00d0 C02D mov r28,__tmp_reg__\r
+ 4547 .LVL443:\r
+ 4548 .LBB6:\r
+ 4549 .LSM376:\r
+ 4550 00d2 CE01 movw r24,r28\r
+ 4551 00d4 40E0 ldi r20,lo8(0)\r
+ 4552 00d6 50E0 ldi r21,hi8(0)\r
+ 4553 00d8 60E0 ldi r22,hlo8(0)\r
+ 4554 00da 70E0 ldi r23,hhi8(0)\r
+ 4555 00dc 0E94 0000 call move_window\r
+ 4556 00e0 982F mov r25,r24\r
+ 4557 .LVL444:\r
+ 4558 .LBB7:\r
+ 4559 .LSM377:\r
+ 4560 00e2 8823 tst r24\r
+ 4561 00e4 01F0 breq .+2\r
+ 4562 00e6 00C0 rjmp .L232\r
+ 4563 .LVL445:\r
+ 4564 .LSM378:\r
+ 4565 00e8 8881 ld r24,Y\r
+ 4566 .LVL446:\r
+ 4567 00ea 8330 cpi r24,lo8(3)\r
+ 4568 00ec 01F0 breq .+2\r
+ 4569 00ee 00C0 rjmp .L233\r
+ 4570 00f0 8D81 ldd r24,Y+5\r
+ 4571 00f2 8823 tst r24\r
+ 4572 00f4 01F4 brne .+2\r
+ 4573 00f6 00C0 rjmp .L233\r
+ 4574 .LSM379:\r
+ 4575 00f8 1AA6 std Y+42,__zero_reg__\r
+ 4576 00fa 1BA6 std Y+43,__zero_reg__\r
+ 4577 00fc 1CA6 std Y+44,__zero_reg__\r
+ 4578 00fe 1DA6 std Y+45,__zero_reg__\r
+ 4579 .LSM380:\r
+ 4580 0100 8E01 movw r16,r28\r
+ 4581 .LVL447:\r
+ 4582 0102 025D subi r16,lo8(-(46))\r
+ 4583 0104 1F4F sbci r17,hi8(-(46))\r
+ 4584 0106 C801 movw r24,r16\r
+ 4585 0108 60E0 ldi r22,lo8(0)\r
+ 4586 010a 70E0 ldi r23,hi8(0)\r
+ 4587 010c 40E0 ldi r20,lo8(512)\r
+ 4588 010e 52E0 ldi r21,hi8(512)\r
+ 4589 0110 0E94 0000 call mem_set\r
+ 4590 .LVL448:\r
+ 4591 .LSM381:\r
+ 4592 0114 C45D subi r28,lo8(-(556))\r
+ 4593 0116 DD4F sbci r29,hi8(-(556))\r
+ 4594 0118 85E5 ldi r24,lo8(85)\r
+ 4595 011a 8993 st Y+,r24\r
+ 4596 011c 8AEA ldi r24,lo8(-86)\r
+ 4597 011e 8883 st Y,r24\r
+ 4598 0120 CD52 subi r28,lo8(-(-557))\r
+ 4599 0122 D240 sbci r29,hi8(-(-557))\r
+ 4600 .LSM382:\r
+ 4601 0124 82E5 ldi r24,lo8(82)\r
+ 4602 0126 8EA7 std Y+46,r24\r
+ 4603 0128 8FA7 std Y+47,r24\r
+ 4604 012a 21E6 ldi r18,lo8(97)\r
+ 4605 012c 28AB std Y+48,r18\r
+ 4606 012e 91E4 ldi r25,lo8(65)\r
+ 4607 0130 99AB std Y+49,r25\r
+ 4608 .LSM383:\r
+ 4609 0132 CE5E subi r28,lo8(-(530))\r
+ 4610 0134 DD4F sbci r29,hi8(-(530))\r
+ 4611 0136 82E7 ldi r24,lo8(114)\r
+ 4612 0138 8993 st Y+,r24\r
+ 4613 013a 8993 st Y+,r24\r
+ 4614 013c 9993 st Y+,r25\r
+ 4615 013e 2883 st Y,r18\r
+ 4616 0140 C551 subi r28,lo8(-(-533))\r
+ 4617 0142 D240 sbci r29,hi8(-(-533))\r
+ 4618 .LSM384:\r
+ 4619 0144 8E85 ldd r24,Y+14\r
+ 4620 0146 CA5E subi r28,lo8(-(534))\r
+ 4621 0148 DD4F sbci r29,hi8(-(534))\r
+ 4622 014a 8883 st Y,r24\r
+ 4623 014c C651 subi r28,lo8(-(-534))\r
+ 4624 014e D240 sbci r29,hi8(-(-534))\r
+ 4625 0150 8F85 ldd r24,Y+15\r
+ 4626 0152 C95E subi r28,lo8(-(535))\r
+ 4627 0154 DD4F sbci r29,hi8(-(535))\r
+ 4628 0156 8883 st Y,r24\r
+ 4629 0158 C751 subi r28,lo8(-(-535))\r
+ 4630 015a D240 sbci r29,hi8(-(-535))\r
+ 4631 015c 8E85 ldd r24,Y+14\r
+ 4632 015e 9F85 ldd r25,Y+15\r
+ 4633 0160 A889 ldd r26,Y+16\r
+ 4634 0162 B989 ldd r27,Y+17\r
+ 4635 0164 9D01 movw r18,r26\r
+ 4636 0166 4427 clr r20\r
+ 4637 0168 5527 clr r21\r
+ 4638 016a C85E subi r28,lo8(-(536))\r
+ 4639 016c DD4F sbci r29,hi8(-(536))\r
+ 4640 016e 2883 st Y,r18\r
+ 4641 0170 2196 adiw r28,1\r
+ 4642 0172 8B2F mov r24,r27\r
+ 4643 0174 9927 clr r25\r
+ 4644 0176 AA27 clr r26\r
+ 4645 0178 BB27 clr r27\r
+ 4646 017a 8883 st Y,r24\r
+ 4647 017c C951 subi r28,lo8(-(-537))\r
+ 4648 017e D240 sbci r29,hi8(-(-537))\r
+ 4649 .LSM385:\r
+ 4650 0180 8A85 ldd r24,Y+10\r
+ 4651 0182 C65E subi r28,lo8(-(538))\r
+ 4652 0184 DD4F sbci r29,hi8(-(538))\r
+ 4653 0186 8883 st Y,r24\r
+ 4654 0188 CA51 subi r28,lo8(-(-538))\r
+ 4655 018a D240 sbci r29,hi8(-(-538))\r
+ 4656 018c 8B85 ldd r24,Y+11\r
+ 4657 018e C55E subi r28,lo8(-(539))\r
+ 4658 0190 DD4F sbci r29,hi8(-(539))\r
+ 4659 0192 8883 st Y,r24\r
+ 4660 0194 CB51 subi r28,lo8(-(-539))\r
+ 4661 0196 D240 sbci r29,hi8(-(-539))\r
+ 4662 0198 8A85 ldd r24,Y+10\r
+ 4663 019a 9B85 ldd r25,Y+11\r
+ 4664 019c AC85 ldd r26,Y+12\r
+ 4665 019e BD85 ldd r27,Y+13\r
+ 4666 01a0 9D01 movw r18,r26\r
+ 4667 01a2 4427 clr r20\r
+ 4668 01a4 5527 clr r21\r
+ 4669 01a6 C45E subi r28,lo8(-(540))\r
+ 4670 01a8 DD4F sbci r29,hi8(-(540))\r
+ 4671 01aa 2883 st Y,r18\r
+ 4672 01ac 2196 adiw r28,1\r
+ 4673 01ae 8B2F mov r24,r27\r
+ 4674 01b0 9927 clr r25\r
+ 4675 01b2 AA27 clr r26\r
+ 4676 01b4 BB27 clr r27\r
+ 4677 01b6 8883 st Y,r24\r
+ 4678 01b8 CD51 subi r28,lo8(-(-541))\r
+ 4679 01ba D240 sbci r29,hi8(-(-541))\r
+ 4680 .LSM386:\r
+ 4681 01bc 2A89 ldd r18,Y+18\r
+ 4682 01be 3B89 ldd r19,Y+19\r
+ 4683 01c0 4C89 ldd r20,Y+20\r
+ 4684 01c2 5D89 ldd r21,Y+21\r
+ 4685 01c4 8981 ldd r24,Y+1\r
+ 4686 01c6 B801 movw r22,r16\r
+ 4687 01c8 01E0 ldi r16,lo8(1)\r
+ 4688 01ca 0E94 0000 call disk_write\r
+ 4689 .LSM387:\r
+ 4690 01ce 1D82 std Y+5,__zero_reg__\r
+ 4691 .LVL449:\r
+ 4692 .L233:\r
+ 4693 .LBE7:\r
+ 4694 .LSM388:\r
+ 4695 01d0 8981 ldd r24,Y+1\r
+ 4696 01d2 60E0 ldi r22,lo8(0)\r
+ 4697 01d4 40E0 ldi r20,lo8(0)\r
+ 4698 01d6 50E0 ldi r21,hi8(0)\r
+ 4699 01d8 0E94 0000 call disk_ioctl\r
+ 4700 .LVL450:\r
+ 4701 01dc 8111 cpse r24,__zero_reg__\r
+ 4702 01de 81E0 ldi r24,lo8(1)\r
+ 4703 .L234:\r
+ 4704 01e0 982F mov r25,r24\r
+ 4705 .LVL451:\r
+ 4706 .L232:\r
+ 4707 .LBE6:\r
+ 4708 .LSM389:\r
+ 4709 01e2 892F mov r24,r25\r
+ 4710 /* epilogue start */\r
+ 4711 01e4 DF91 pop r29\r
+ 4712 01e6 CF91 pop r28\r
+ 4713 .LVL452:\r
+ 4714 01e8 1F91 pop r17\r
+ 4715 01ea 0F91 pop r16\r
+ 4716 .LVL453:\r
+ 4717 01ec 0895 ret\r
+ 4718 .LFE76:\r
+ 4720 .section .text.f_close,"ax",@progbits\r
+ 4721 .global f_close\r
+ 4723 f_close:\r
+ 4724 .LFB77:\r
+ 4725 .LSM390:\r
+ 4726 .LVL454:\r
+ 4727 0000 CF93 push r28\r
+ 4728 0002 DF93 push r29\r
+ 4729 /* prologue: function */\r
+ 4730 /* frame size = 0 */\r
+ 4731 0004 EC01 movw r28,r24\r
+ 4732 .LSM391:\r
+ 4733 0006 0E94 0000 call f_sync\r
+ 4734 .LVL455:\r
+ 4735 .LSM392:\r
+ 4736 000a 8823 tst r24\r
+ 4737 .LVL456:\r
+ 4738 000c 01F4 brne .L237\r
+ 4739 000e 1982 std Y+1,__zero_reg__\r
+ 4740 0010 1882 st Y,__zero_reg__\r
+ 4741 .L237:\r
+ 4742 .LVL457:\r
+ 4743 /* epilogue start */\r
+ 4744 .LSM393:\r
+ 4745 0012 DF91 pop r29\r
+ 4746 0014 CF91 pop r28\r
+ 4747 .LVL458:\r
+ 4748 0016 0895 ret\r
+ 4749 .LFE77:\r
+ 4751 .section .text.chk_mounted,"ax",@progbits\r
+ 4752 .global chk_mounted\r
+ 4754 chk_mounted:\r
+ 4755 .LFB70:\r
+ 4756 .LSM394:\r
+ 4757 .LVL459:\r
+ 4758 0000 6F92 push r6\r
+ 4759 0002 7F92 push r7\r
+ 4760 0004 8F92 push r8\r
+ 4761 0006 9F92 push r9\r
+ 4762 0008 AF92 push r10\r
+ 4763 000a BF92 push r11\r
+ 4764 000c CF92 push r12\r
+ 4765 000e DF92 push r13\r
+ 4766 0010 EF92 push r14\r
+ 4767 0012 FF92 push r15\r
+ 4768 0014 0F93 push r16\r
+ 4769 0016 1F93 push r17\r
+ 4770 0018 CF93 push r28\r
+ 4771 001a DF93 push r29\r
+ 4772 /* prologue: function */\r
+ 4773 /* frame size = 0 */\r
+ 4774 001c DC01 movw r26,r24\r
+ 4775 001e 142F mov r17,r20\r
+ 4776 .LSM395:\r
+ 4777 0020 ED91 ld r30,X+\r
+ 4778 0022 FC91 ld r31,X\r
+ 4779 0024 1197 sbiw r26,1\r
+ 4780 .LVL460:\r
+ 4781 .LSM396:\r
+ 4782 0026 8081 ld r24,Z\r
+ 4783 .LVL461:\r
+ 4784 0028 282F mov r18,r24\r
+ 4785 .LVL462:\r
+ 4786 002a 30E0 ldi r19,lo8(0)\r
+ 4787 .LVL463:\r
+ 4788 002c 2053 subi r18,lo8(-(-48))\r
+ 4789 002e 3040 sbci r19,hi8(-(-48))\r
+ 4790 .LVL464:\r
+ 4791 .LSM397:\r
+ 4792 0030 2A30 cpi r18,10\r
+ 4793 0032 3105 cpc r19,__zero_reg__\r
+ 4794 0034 00F4 brsh .L240\r
+ 4795 .LVL465:\r
+ 4796 0036 8181 ldd r24,Z+1\r
+ 4797 0038 8A33 cpi r24,lo8(58)\r
+ 4798 003a 01F4 brne .L240\r
+ 4799 .LSM398:\r
+ 4800 003c 3296 adiw r30,2\r
+ 4801 003e ED93 st X+,r30\r
+ 4802 0040 FC93 st X,r31\r
+ 4803 .LSM399:\r
+ 4804 0042 232B or r18,r19\r
+ 4805 0044 01F0 breq .L240\r
+ 4806 0046 8BE0 ldi r24,lo8(11)\r
+ 4807 0048 00C0 rjmp .L241\r
+ 4808 .L240:\r
+ 4809 .LSM400:\r
+ 4810 004a C091 0000 lds r28,FatFs\r
+ 4811 004e D091 0000 lds r29,(FatFs)+1\r
+ 4812 .LVL466:\r
+ 4813 0052 FB01 movw r30,r22\r
+ 4814 .LVL467:\r
+ 4815 0054 D183 std Z+1,r29\r
+ 4816 0056 C083 st Z,r28\r
+ 4817 .LSM401:\r
+ 4818 0058 2097 sbiw r28,0\r
+ 4819 005a 01F4 brne .L242\r
+ 4820 005c 8CE0 ldi r24,lo8(12)\r
+ 4821 005e 00C0 rjmp .L241\r
+ 4822 .L242:\r
+ 4823 .LSM402:\r
+ 4824 0060 8881 ld r24,Y\r
+ 4825 0062 8823 tst r24\r
+ 4826 0064 01F0 breq .L243\r
+ 4827 .LSM403:\r
+ 4828 0066 8981 ldd r24,Y+1\r
+ 4829 0068 0E94 0000 call disk_status\r
+ 4830 .LVL468:\r
+ 4831 .LSM404:\r
+ 4832 006c 80FD sbrc r24,0\r
+ 4833 006e 00C0 rjmp .L243\r
+ 4834 .LSM405:\r
+ 4835 0070 1123 tst r17\r
+ 4836 0072 01F4 brne .+2\r
+ 4837 0074 00C0 rjmp .L244\r
+ 4838 0076 82FD sbrc r24,2\r
+ 4839 0078 00C0 rjmp .L245\r
+ 4840 007a 00C0 rjmp .L244\r
+ 4841 .LVL469:\r
+ 4842 .L243:\r
+ 4843 .LSM406:\r
+ 4844 007c 1882 st Y,__zero_reg__\r
+ 4845 .LSM407:\r
+ 4846 007e 1982 std Y+1,__zero_reg__\r
+ 4847 .LSM408:\r
+ 4848 0080 80E0 ldi r24,lo8(0)\r
+ 4849 0082 0E94 0000 call disk_initialize\r
+ 4850 .LVL470:\r
+ 4851 .LSM409:\r
+ 4852 0086 80FF sbrs r24,0\r
+ 4853 0088 00C0 rjmp .L246\r
+ 4854 008a 83E0 ldi r24,lo8(3)\r
+ 4855 008c 00C0 rjmp .L241\r
+ 4856 .L246:\r
+ 4857 .LSM410:\r
+ 4858 008e 1123 tst r17\r
+ 4859 0090 01F0 breq .L247\r
+ 4860 0092 82FD sbrc r24,2\r
+ 4861 0094 00C0 rjmp .L245\r
+ 4862 .L247:\r
+ 4863 .LSM411:\r
+ 4864 0096 CE01 movw r24,r28\r
+ 4865 0098 40E0 ldi r20,lo8(0)\r
+ 4866 009a 50E0 ldi r21,hi8(0)\r
+ 4867 009c 60E0 ldi r22,hlo8(0)\r
+ 4868 009e 70E0 ldi r23,hhi8(0)\r
+ 4869 00a0 0E94 0000 call check_fs\r
+ 4870 .LSM412:\r
+ 4871 00a4 8130 cpi r24,lo8(1)\r
+ 4872 .LVL471:\r
+ 4873 00a6 01F0 breq .L248\r
+ 4874 00a8 AA24 clr r10\r
+ 4875 00aa BB24 clr r11\r
+ 4876 00ac 6501 movw r12,r10\r
+ 4877 .LVL472:\r
+ 4878 00ae 00C0 rjmp .L249\r
+ 4879 .LVL473:\r
+ 4880 .L248:\r
+ 4881 .LSM413:\r
+ 4882 00b0 FE01 movw r30,r28\r
+ 4883 .LVL474:\r
+ 4884 00b2 E451 subi r30,lo8(-(492))\r
+ 4885 00b4 FE4F sbci r31,hi8(-(492))\r
+ 4886 .LSM414:\r
+ 4887 00b6 8481 ldd r24,Z+4\r
+ 4888 .LVL475:\r
+ 4889 00b8 8823 tst r24\r
+ 4890 00ba 01F4 brne .+2\r
+ 4891 00bc 00C0 rjmp .L250\r
+ 4892 .LSM415:\r
+ 4893 00be 8385 ldd r24,Z+11\r
+ 4894 00c0 90E0 ldi r25,lo8(0)\r
+ 4895 00c2 A0E0 ldi r26,lo8(0)\r
+ 4896 00c4 B0E0 ldi r27,hi8(0)\r
+ 4897 00c6 D82E mov r13,r24\r
+ 4898 00c8 CC24 clr r12\r
+ 4899 00ca BB24 clr r11\r
+ 4900 00cc AA24 clr r10\r
+ 4901 .LVL476:\r
+ 4902 00ce 8285 ldd r24,Z+10\r
+ 4903 00d0 90E0 ldi r25,lo8(0)\r
+ 4904 00d2 A0E0 ldi r26,lo8(0)\r
+ 4905 00d4 B0E0 ldi r27,hi8(0)\r
+ 4906 00d6 DC01 movw r26,r24\r
+ 4907 00d8 9927 clr r25\r
+ 4908 00da 8827 clr r24\r
+ 4909 00dc A82A or r10,r24\r
+ 4910 00de B92A or r11,r25\r
+ 4911 00e0 CA2A or r12,r26\r
+ 4912 00e2 DB2A or r13,r27\r
+ 4913 00e4 8085 ldd r24,Z+8\r
+ 4914 00e6 90E0 ldi r25,lo8(0)\r
+ 4915 00e8 A0E0 ldi r26,lo8(0)\r
+ 4916 00ea B0E0 ldi r27,hi8(0)\r
+ 4917 00ec A82A or r10,r24\r
+ 4918 00ee B92A or r11,r25\r
+ 4919 00f0 CA2A or r12,r26\r
+ 4920 00f2 DB2A or r13,r27\r
+ 4921 00f4 9185 ldd r25,Z+9\r
+ 4922 00f6 80E0 ldi r24,lo8(0)\r
+ 4923 00f8 A0E0 ldi r26,lo8(0)\r
+ 4924 00fa B0E0 ldi r27,hi8(0)\r
+ 4925 00fc A82A or r10,r24\r
+ 4926 00fe B92A or r11,r25\r
+ 4927 0100 CA2A or r12,r26\r
+ 4928 0102 DB2A or r13,r27\r
+ 4929 .LSM416:\r
+ 4930 0104 CE01 movw r24,r28\r
+ 4931 0106 B601 movw r22,r12\r
+ 4932 0108 A501 movw r20,r10\r
+ 4933 010a 0E94 0000 call check_fs\r
+ 4934 .LVL477:\r
+ 4935 .L249:\r
+ 4936 .LSM417:\r
+ 4937 010e 8330 cpi r24,lo8(3)\r
+ 4938 0110 01F4 brne .L251\r
+ 4939 0112 81E0 ldi r24,lo8(1)\r
+ 4940 .LVL478:\r
+ 4941 0114 00C0 rjmp .L241\r
+ 4942 .LVL479:\r
+ 4943 .L251:\r
+ 4944 .LSM418:\r
+ 4945 0116 8823 tst r24\r
+ 4946 0118 01F0 breq .+2\r
+ 4947 011a 00C0 rjmp .L250\r
+ 4948 011c 9AAD ldd r25,Y+58\r
+ 4949 011e 80E0 ldi r24,lo8(0)\r
+ 4950 .LVL480:\r
+ 4951 0120 29AD ldd r18,Y+57\r
+ 4952 0122 30E0 ldi r19,lo8(0)\r
+ 4953 0124 822B or r24,r18\r
+ 4954 0126 932B or r25,r19\r
+ 4955 0128 8050 subi r24,lo8(512)\r
+ 4956 012a 9240 sbci r25,hi8(512)\r
+ 4957 012c 01F0 breq .+2\r
+ 4958 012e 00C0 rjmp .L250\r
+ 4959 .LSM419:\r
+ 4960 0130 CB5B subi r28,lo8(-(69))\r
+ 4961 0132 DF4F sbci r29,hi8(-(69))\r
+ 4962 0134 9881 ld r25,Y\r
+ 4963 0136 80E0 ldi r24,lo8(0)\r
+ 4964 0138 2A91 ld r18,-Y\r
+ 4965 013a C454 subi r28,lo8(-(-68))\r
+ 4966 013c D040 sbci r29,hi8(-(-68))\r
+ 4967 013e 30E0 ldi r19,lo8(0)\r
+ 4968 0140 822B or r24,r18\r
+ 4969 0142 932B or r25,r19\r
+ 4970 0144 7C01 movw r14,r24\r
+ 4971 .LVL481:\r
+ 4972 0146 00E0 ldi r16,lo8(0)\r
+ 4973 0148 10E0 ldi r17,hi8(0)\r
+ 4974 .LVL482:\r
+ 4975 .LSM420:\r
+ 4976 014a E114 cp r14,__zero_reg__\r
+ 4977 014c F104 cpc r15,__zero_reg__\r
+ 4978 014e 0105 cpc r16,__zero_reg__\r
+ 4979 0150 1105 cpc r17,__zero_reg__\r
+ 4980 0152 01F4 brne .L252\r
+ 4981 0154 CB5A subi r28,lo8(-(85))\r
+ 4982 0156 DF4F sbci r29,hi8(-(85))\r
+ 4983 0158 8881 ld r24,Y\r
+ 4984 015a 90E0 ldi r25,lo8(0)\r
+ 4985 015c A0E0 ldi r26,lo8(0)\r
+ 4986 015e B0E0 ldi r27,hi8(0)\r
+ 4987 0160 182F mov r17,r24\r
+ 4988 0162 0027 clr r16\r
+ 4989 0164 FF24 clr r15\r
+ 4990 0166 EE24 clr r14\r
+ 4991 .LVL483:\r
+ 4992 0168 8A91 ld r24,-Y\r
+ 4993 016a 90E0 ldi r25,lo8(0)\r
+ 4994 016c A0E0 ldi r26,lo8(0)\r
+ 4995 016e B0E0 ldi r27,hi8(0)\r
+ 4996 0170 DC01 movw r26,r24\r
+ 4997 0172 9927 clr r25\r
+ 4998 0174 8827 clr r24\r
+ 4999 0176 E82A or r14,r24\r
+ 5000 0178 F92A or r15,r25\r
+ 5001 017a 0A2B or r16,r26\r
+ 5002 017c 1B2B or r17,r27\r
+ 5003 017e 2297 sbiw r28,2\r
+ 5004 0180 8991 ld r24,Y+\r
+ 5005 0182 90E0 ldi r25,lo8(0)\r
+ 5006 0184 A0E0 ldi r26,lo8(0)\r
+ 5007 0186 B0E0 ldi r27,hi8(0)\r
+ 5008 0188 E82A or r14,r24\r
+ 5009 018a F92A or r15,r25\r
+ 5010 018c 0A2B or r16,r26\r
+ 5011 018e 1B2B or r17,r27\r
+ 5012 0190 9881 ld r25,Y\r
+ 5013 0192 C355 subi r28,lo8(-(-83))\r
+ 5014 0194 D040 sbci r29,hi8(-(-83))\r
+ 5015 0196 80E0 ldi r24,lo8(0)\r
+ 5016 0198 A0E0 ldi r26,lo8(0)\r
+ 5017 019a B0E0 ldi r27,hi8(0)\r
+ 5018 019c E82A or r14,r24\r
+ 5019 019e F92A or r15,r25\r
+ 5020 01a0 0A2B or r16,r26\r
+ 5021 01a2 1B2B or r17,r27\r
+ 5022 .L252:\r
+ 5023 .LSM421:\r
+ 5024 01a4 EE8A std Y+22,r14\r
+ 5025 01a6 FF8A std Y+23,r15\r
+ 5026 01a8 088F std Y+24,r16\r
+ 5027 01aa 198F std Y+25,r17\r
+ 5028 .LSM422:\r
+ 5029 01ac 2EAD ldd r18,Y+62\r
+ 5030 01ae 2B83 std Y+3,r18\r
+ 5031 .LSM423:\r
+ 5032 01b0 30E0 ldi r19,lo8(0)\r
+ 5033 01b2 40E0 ldi r20,lo8(0)\r
+ 5034 01b4 50E0 ldi r21,hi8(0)\r
+ 5035 01b6 C801 movw r24,r16\r
+ 5036 01b8 B701 movw r22,r14\r
+ 5037 01ba 0E94 0000 call __mulsi3\r
+ 5038 01be 3B01 movw r6,r22\r
+ 5039 01c0 4C01 movw r8,r24\r
+ 5040 .LVL484:\r
+ 5041 .LSM424:\r
+ 5042 01c2 9DAD ldd r25,Y+61\r
+ 5043 01c4 80E0 ldi r24,lo8(0)\r
+ 5044 01c6 2CAD ldd r18,Y+60\r
+ 5045 01c8 30E0 ldi r19,lo8(0)\r
+ 5046 01ca 822B or r24,r18\r
+ 5047 01cc 932B or r25,r19\r
+ 5048 01ce A0E0 ldi r26,lo8(0)\r
+ 5049 01d0 B0E0 ldi r27,hi8(0)\r
+ 5050 01d2 8A0D add r24,r10\r
+ 5051 01d4 9B1D adc r25,r11\r
+ 5052 01d6 AC1D adc r26,r12\r
+ 5053 01d8 BD1D adc r27,r13\r
+ 5054 01da 8E8F std Y+30,r24\r
+ 5055 01dc 9F8F std Y+31,r25\r
+ 5056 01de A8A3 std Y+32,r26\r
+ 5057 01e0 B9A3 std Y+33,r27\r
+ 5058 .LSM425:\r
+ 5059 01e2 8BAD ldd r24,Y+59\r
+ 5060 01e4 8A83 std Y+2,r24\r
+ 5061 .LSM426:\r
+ 5062 01e6 C05C subi r28,lo8(-(64))\r
+ 5063 01e8 DF4F sbci r29,hi8(-(64))\r
+ 5064 01ea 9881 ld r25,Y\r
+ 5065 01ec C054 subi r28,lo8(-(-64))\r
+ 5066 01ee D040 sbci r29,hi8(-(-64))\r
+ 5067 01f0 80E0 ldi r24,lo8(0)\r
+ 5068 01f2 2FAD ldd r18,Y+63\r
+ 5069 01f4 422F mov r20,r18\r
+ 5070 01f6 50E0 ldi r21,lo8(0)\r
+ 5071 01f8 482B or r20,r24\r
+ 5072 01fa 592B or r21,r25\r
+ 5073 01fc 5987 std Y+9,r21\r
+ 5074 01fe 4887 std Y+8,r20\r
+ 5075 .LSM427:\r
+ 5076 0200 CE5B subi r28,lo8(-(66))\r
+ 5077 0202 DF4F sbci r29,hi8(-(66))\r
+ 5078 0204 9881 ld r25,Y\r
+ 5079 0206 80E0 ldi r24,lo8(0)\r
+ 5080 0208 2A91 ld r18,-Y\r
+ 5081 020a C154 subi r28,lo8(-(-65))\r
+ 5082 020c D040 sbci r29,hi8(-(-65))\r
+ 5083 020e 30E0 ldi r19,lo8(0)\r
+ 5084 0210 822B or r24,r18\r
+ 5085 0212 932B or r25,r19\r
+ 5086 0214 7C01 movw r14,r24\r
+ 5087 .LVL485:\r
+ 5088 0216 00E0 ldi r16,lo8(0)\r
+ 5089 0218 10E0 ldi r17,hi8(0)\r
+ 5090 .LVL486:\r
+ 5091 .LSM428:\r
+ 5092 021a E114 cp r14,__zero_reg__\r
+ 5093 021c F104 cpc r15,__zero_reg__\r
+ 5094 021e 0105 cpc r16,__zero_reg__\r
+ 5095 0220 1105 cpc r17,__zero_reg__\r
+ 5096 0222 01F4 brne .L253\r
+ 5097 0224 CF5A subi r28,lo8(-(81))\r
+ 5098 0226 DF4F sbci r29,hi8(-(81))\r
+ 5099 0228 8881 ld r24,Y\r
+ 5100 022a 90E0 ldi r25,lo8(0)\r
+ 5101 022c A0E0 ldi r26,lo8(0)\r
+ 5102 022e B0E0 ldi r27,hi8(0)\r
+ 5103 0230 182F mov r17,r24\r
+ 5104 0232 0027 clr r16\r
+ 5105 0234 FF24 clr r15\r
+ 5106 0236 EE24 clr r14\r
+ 5107 .LVL487:\r
+ 5108 0238 8A91 ld r24,-Y\r
+ 5109 023a 90E0 ldi r25,lo8(0)\r
+ 5110 023c A0E0 ldi r26,lo8(0)\r
+ 5111 023e B0E0 ldi r27,hi8(0)\r
+ 5112 0240 DC01 movw r26,r24\r
+ 5113 0242 9927 clr r25\r
+ 5114 0244 8827 clr r24\r
+ 5115 0246 E82A or r14,r24\r
+ 5116 0248 F92A or r15,r25\r
+ 5117 024a 0A2B or r16,r26\r
+ 5118 024c 1B2B or r17,r27\r
+ 5119 024e 2297 sbiw r28,2\r
+ 5120 0250 8991 ld r24,Y+\r
+ 5121 0252 90E0 ldi r25,lo8(0)\r
+ 5122 0254 A0E0 ldi r26,lo8(0)\r
+ 5123 0256 B0E0 ldi r27,hi8(0)\r
+ 5124 0258 E82A or r14,r24\r
+ 5125 025a F92A or r15,r25\r
+ 5126 025c 0A2B or r16,r26\r
+ 5127 025e 1B2B or r17,r27\r
+ 5128 0260 9881 ld r25,Y\r
+ 5129 0262 CF54 subi r28,lo8(-(-79))\r
+ 5130 0264 D040 sbci r29,hi8(-(-79))\r
+ 5131 0266 80E0 ldi r24,lo8(0)\r
+ 5132 0268 A0E0 ldi r26,lo8(0)\r
+ 5133 026a B0E0 ldi r27,hi8(0)\r
+ 5134 026c E82A or r14,r24\r
+ 5135 026e F92A or r15,r25\r
+ 5136 0270 0A2B or r16,r26\r
+ 5137 0272 1B2B or r17,r27\r
+ 5138 .L253:\r
+ 5139 .LSM429:\r
+ 5140 0274 9DAD ldd r25,Y+61\r
+ 5141 0276 80E0 ldi r24,lo8(0)\r
+ 5142 0278 2CAD ldd r18,Y+60\r
+ 5143 027a 30E0 ldi r19,lo8(0)\r
+ 5144 027c 822B or r24,r18\r
+ 5145 027e 932B or r25,r19\r
+ 5146 0280 A0E0 ldi r26,lo8(0)\r
+ 5147 0282 B0E0 ldi r27,hi8(0)\r
+ 5148 0284 E81A sub r14,r24\r
+ 5149 0286 F90A sbc r15,r25\r
+ 5150 0288 0A0B sbc r16,r26\r
+ 5151 028a 1B0B sbc r17,r27\r
+ 5152 .LVL488:\r
+ 5153 028c E618 sub r14,r6\r
+ 5154 028e F708 sbc r15,r7\r
+ 5155 0290 0809 sbc r16,r8\r
+ 5156 0292 1909 sbc r17,r9\r
+ 5157 0294 B4E0 ldi r27,4\r
+ 5158 0296 5695 1: lsr r21\r
+ 5159 0298 4795 ror r20\r
+ 5160 029a BA95 dec r27\r
+ 5161 029c 01F4 brne 1b\r
+ 5162 029e CA01 movw r24,r20\r
+ 5163 02a0 A0E0 ldi r26,lo8(0)\r
+ 5164 02a2 B0E0 ldi r27,hi8(0)\r
+ 5165 02a4 E81A sub r14,r24\r
+ 5166 02a6 F90A sbc r15,r25\r
+ 5167 02a8 0A0B sbc r16,r26\r
+ 5168 02aa 1B0B sbc r17,r27\r
+ 5169 02ac 2A81 ldd r18,Y+2\r
+ 5170 02ae 30E0 ldi r19,lo8(0)\r
+ 5171 02b0 40E0 ldi r20,lo8(0)\r
+ 5172 02b2 50E0 ldi r21,hi8(0)\r
+ 5173 02b4 C801 movw r24,r16\r
+ 5174 02b6 B701 movw r22,r14\r
+ 5175 02b8 0E94 0000 call __udivmodsi4\r
+ 5176 02bc 2E5F subi r18,lo8(-(2))\r
+ 5177 02be 3F4F sbci r19,hi8(-(2))\r
+ 5178 02c0 4F4F sbci r20,hlo8(-(2))\r
+ 5179 02c2 5F4F sbci r21,hhi8(-(2))\r
+ 5180 .LVL489:\r
+ 5181 02c4 2A8F std Y+26,r18\r
+ 5182 02c6 3B8F std Y+27,r19\r
+ 5183 02c8 4C8F std Y+28,r20\r
+ 5184 02ca 5D8F std Y+29,r21\r
+ 5185 .LSM430:\r
+ 5186 02cc 273F cpi r18,lo8(4087)\r
+ 5187 02ce 8FE0 ldi r24,hi8(4087)\r
+ 5188 02d0 3807 cpc r19,r24\r
+ 5189 02d2 80E0 ldi r24,hlo8(4087)\r
+ 5190 02d4 4807 cpc r20,r24\r
+ 5191 02d6 80E0 ldi r24,hhi8(4087)\r
+ 5192 02d8 5807 cpc r21,r24\r
+ 5193 02da 00F4 brsh .L254\r
+ 5194 02dc 11E0 ldi r17,lo8(1)\r
+ 5195 .LVL490:\r
+ 5196 02de 00C0 rjmp .L255\r
+ 5197 .LVL491:\r
+ 5198 .L254:\r
+ 5199 .LSM431:\r
+ 5200 02e0 275F subi r18,lo8(65527)\r
+ 5201 02e2 3F4F sbci r19,hi8(65527)\r
+ 5202 02e4 4040 sbci r20,hlo8(65527)\r
+ 5203 02e6 5040 sbci r21,hhi8(65527)\r
+ 5204 02e8 00F0 brlo .+2\r
+ 5205 02ea 00C0 rjmp .L256\r
+ 5206 02ec 12E0 ldi r17,lo8(2)\r
+ 5207 .LVL492:\r
+ 5208 .L255:\r
+ 5209 .LSM432:\r
+ 5210 02ee 8E8D ldd r24,Y+30\r
+ 5211 02f0 9F8D ldd r25,Y+31\r
+ 5212 02f2 A8A1 ldd r26,Y+32\r
+ 5213 02f4 B9A1 ldd r27,Y+33\r
+ 5214 02f6 860D add r24,r6\r
+ 5215 02f8 971D adc r25,r7\r
+ 5216 02fa A81D adc r26,r8\r
+ 5217 02fc B91D adc r27,r9\r
+ 5218 02fe 8AA3 std Y+34,r24\r
+ 5219 0300 9BA3 std Y+35,r25\r
+ 5220 0302 ACA3 std Y+36,r26\r
+ 5221 0304 BDA3 std Y+37,r27\r
+ 5222 .L258:\r
+ 5223 .LSM433:\r
+ 5224 0306 8885 ldd r24,Y+8\r
+ 5225 0308 9985 ldd r25,Y+9\r
+ 5226 030a A4E0 ldi r26,4\r
+ 5227 030c 9695 1: lsr r25\r
+ 5228 030e 8795 ror r24\r
+ 5229 0310 AA95 dec r26\r
+ 5230 0312 01F4 brne 1b\r
+ 5231 0314 A0E0 ldi r26,lo8(0)\r
+ 5232 0316 B0E0 ldi r27,hi8(0)\r
+ 5233 0318 2E8D ldd r18,Y+30\r
+ 5234 031a 3F8D ldd r19,Y+31\r
+ 5235 031c 48A1 ldd r20,Y+32\r
+ 5236 031e 59A1 ldd r21,Y+33\r
+ 5237 .LVL493:\r
+ 5238 0320 820F add r24,r18\r
+ 5239 0322 931F adc r25,r19\r
+ 5240 0324 A41F adc r26,r20\r
+ 5241 0326 B51F adc r27,r21\r
+ 5242 0328 860D add r24,r6\r
+ 5243 032a 971D adc r25,r7\r
+ 5244 032c A81D adc r26,r8\r
+ 5245 032e B91D adc r27,r9\r
+ 5246 0330 8EA3 std Y+38,r24\r
+ 5247 0332 9FA3 std Y+39,r25\r
+ 5248 0334 A8A7 std Y+40,r26\r
+ 5249 0336 B9A7 std Y+41,r27\r
+ 5250 .LSM434:\r
+ 5251 0338 8FEF ldi r24,lo8(-1)\r
+ 5252 033a 9FEF ldi r25,hi8(-1)\r
+ 5253 033c AFEF ldi r26,hlo8(-1)\r
+ 5254 033e BFEF ldi r27,hhi8(-1)\r
+ 5255 0340 8E87 std Y+14,r24\r
+ 5256 0342 9F87 std Y+15,r25\r
+ 5257 0344 A88B std Y+16,r26\r
+ 5258 0346 B98B std Y+17,r27\r
+ 5259 .LSM435:\r
+ 5260 0348 1C82 std Y+4,__zero_reg__\r
+ 5261 .LSM436:\r
+ 5262 034a 1330 cpi r17,lo8(3)\r
+ 5263 034c 01F0 breq .+2\r
+ 5264 034e 00C0 rjmp .L257\r
+ 5265 .LSM437:\r
+ 5266 0350 1D82 std Y+5,__zero_reg__\r
+ 5267 .LSM438:\r
+ 5268 0352 C15A subi r28,lo8(-(95))\r
+ 5269 0354 DF4F sbci r29,hi8(-(95))\r
+ 5270 0356 3881 ld r19,Y\r
+ 5271 0358 20E0 ldi r18,lo8(0)\r
+ 5272 035a 8A91 ld r24,-Y\r
+ 5273 035c CE55 subi r28,lo8(-(-94))\r
+ 5274 035e D040 sbci r29,hi8(-(-94))\r
+ 5275 0360 90E0 ldi r25,lo8(0)\r
+ 5276 0362 282B or r18,r24\r
+ 5277 0364 392B or r19,r25\r
+ 5278 0366 40E0 ldi r20,lo8(0)\r
+ 5279 0368 50E0 ldi r21,hi8(0)\r
+ 5280 036a 2A0D add r18,r10\r
+ 5281 036c 3B1D adc r19,r11\r
+ 5282 036e 4C1D adc r20,r12\r
+ 5283 0370 5D1D adc r21,r13\r
+ 5284 0372 2A8B std Y+18,r18\r
+ 5285 0374 3B8B std Y+19,r19\r
+ 5286 0376 4C8B std Y+20,r20\r
+ 5287 0378 5D8B std Y+21,r21\r
+ 5288 .LSM439:\r
+ 5289 037a BE01 movw r22,r28\r
+ 5290 037c 625D subi r22,lo8(-(46))\r
+ 5291 037e 7F4F sbci r23,hi8(-(46))\r
+ 5292 0380 8981 ldd r24,Y+1\r
+ 5293 0382 01E0 ldi r16,lo8(1)\r
+ 5294 .LVL494:\r
+ 5295 0384 0E94 0000 call disk_read\r
+ 5296 0388 8823 tst r24\r
+ 5297 038a 01F0 breq .+2\r
+ 5298 038c 00C0 rjmp .L257\r
+ 5299 038e C35D subi r28,lo8(-(557))\r
+ 5300 0390 DD4F sbci r29,hi8(-(557))\r
+ 5301 0392 9881 ld r25,Y\r
+ 5302 0394 80E0 ldi r24,lo8(0)\r
+ 5303 0396 2A91 ld r18,-Y\r
+ 5304 0398 CC52 subi r28,lo8(-(-556))\r
+ 5305 039a D240 sbci r29,hi8(-(-556))\r
+ 5306 039c 30E0 ldi r19,lo8(0)\r
+ 5307 039e 822B or r24,r18\r
+ 5308 03a0 932B or r25,r19\r
+ 5309 03a2 8555 subi r24,lo8(-21931)\r
+ 5310 03a4 9A4A sbci r25,hi8(-21931)\r
+ 5311 03a6 01F0 breq .+2\r
+ 5312 03a8 00C0 rjmp .L257\r
+ 5313 03aa 29A9 ldd r18,Y+49\r
+ 5314 03ac 30E0 ldi r19,lo8(0)\r
+ 5315 03ae 40E0 ldi r20,lo8(0)\r
+ 5316 03b0 50E0 ldi r21,hi8(0)\r
+ 5317 03b2 522F mov r21,r18\r
+ 5318 03b4 4427 clr r20\r
+ 5319 03b6 3327 clr r19\r
+ 5320 03b8 2227 clr r18\r
+ 5321 03ba 88A9 ldd r24,Y+48\r
+ 5322 03bc 90E0 ldi r25,lo8(0)\r
+ 5323 03be A0E0 ldi r26,lo8(0)\r
+ 5324 03c0 B0E0 ldi r27,hi8(0)\r
+ 5325 03c2 DC01 movw r26,r24\r
+ 5326 03c4 9927 clr r25\r
+ 5327 03c6 8827 clr r24\r
+ 5328 03c8 282B or r18,r24\r
+ 5329 03ca 392B or r19,r25\r
+ 5330 03cc 4A2B or r20,r26\r
+ 5331 03ce 5B2B or r21,r27\r
+ 5332 03d0 8EA5 ldd r24,Y+46\r
+ 5333 03d2 90E0 ldi r25,lo8(0)\r
+ 5334 03d4 A0E0 ldi r26,lo8(0)\r
+ 5335 03d6 B0E0 ldi r27,hi8(0)\r
+ 5336 03d8 282B or r18,r24\r
+ 5337 03da 392B or r19,r25\r
+ 5338 03dc 4A2B or r20,r26\r
+ 5339 03de 5B2B or r21,r27\r
+ 5340 03e0 9FA5 ldd r25,Y+47\r
+ 5341 03e2 80E0 ldi r24,lo8(0)\r
+ 5342 03e4 A0E0 ldi r26,lo8(0)\r
+ 5343 03e6 B0E0 ldi r27,hi8(0)\r
+ 5344 03e8 282B or r18,r24\r
+ 5345 03ea 392B or r19,r25\r
+ 5346 03ec 4A2B or r20,r26\r
+ 5347 03ee 5B2B or r21,r27\r
+ 5348 03f0 2255 subi r18,lo8(1096897106)\r
+ 5349 03f2 3245 sbci r19,hi8(1096897106)\r
+ 5350 03f4 4146 sbci r20,hlo8(1096897106)\r
+ 5351 03f6 5144 sbci r21,hhi8(1096897106)\r
+ 5352 03f8 01F0 breq .+2\r
+ 5353 03fa 00C0 rjmp .L257\r
+ 5354 03fc CB5E subi r28,lo8(-(533))\r
+ 5355 03fe DD4F sbci r29,hi8(-(533))\r
+ 5356 0400 2881 ld r18,Y\r
+ 5357 0402 30E0 ldi r19,lo8(0)\r
+ 5358 0404 40E0 ldi r20,lo8(0)\r
+ 5359 0406 50E0 ldi r21,hi8(0)\r
+ 5360 0408 522F mov r21,r18\r
+ 5361 040a 4427 clr r20\r
+ 5362 040c 3327 clr r19\r
+ 5363 040e 2227 clr r18\r
+ 5364 0410 8A91 ld r24,-Y\r
+ 5365 0412 90E0 ldi r25,lo8(0)\r
+ 5366 0414 A0E0 ldi r26,lo8(0)\r
+ 5367 0416 B0E0 ldi r27,hi8(0)\r
+ 5368 0418 DC01 movw r26,r24\r
+ 5369 041a 9927 clr r25\r
+ 5370 041c 8827 clr r24\r
+ 5371 041e 282B or r18,r24\r
+ 5372 0420 392B or r19,r25\r
+ 5373 0422 4A2B or r20,r26\r
+ 5374 0424 5B2B or r21,r27\r
+ 5375 0426 2297 sbiw r28,2\r
+ 5376 0428 8991 ld r24,Y+\r
+ 5377 042a 90E0 ldi r25,lo8(0)\r
+ 5378 042c A0E0 ldi r26,lo8(0)\r
+ 5379 042e B0E0 ldi r27,hi8(0)\r
+ 5380 0430 282B or r18,r24\r
+ 5381 0432 392B or r19,r25\r
+ 5382 0434 4A2B or r20,r26\r
+ 5383 0436 5B2B or r21,r27\r
+ 5384 0438 9881 ld r25,Y\r
+ 5385 043a C351 subi r28,lo8(-(-531))\r
+ 5386 043c D240 sbci r29,hi8(-(-531))\r
+ 5387 043e 80E0 ldi r24,lo8(0)\r
+ 5388 0440 A0E0 ldi r26,lo8(0)\r
+ 5389 0442 B0E0 ldi r27,hi8(0)\r
+ 5390 0444 282B or r18,r24\r
+ 5391 0446 392B or r19,r25\r
+ 5392 0448 4A2B or r20,r26\r
+ 5393 044a 5B2B or r21,r27\r
+ 5394 044c 2257 subi r18,lo8(1631679090)\r
+ 5395 044e 3247 sbci r19,hi8(1631679090)\r
+ 5396 0450 4144 sbci r20,hlo8(1631679090)\r
+ 5397 0452 5146 sbci r21,hhi8(1631679090)\r
+ 5398 0454 01F0 breq .+2\r
+ 5399 0456 00C0 rjmp .L257\r
+ 5400 .LSM440:\r
+ 5401 0458 C35E subi r28,lo8(-(541))\r
+ 5402 045a DD4F sbci r29,hi8(-(541))\r
+ 5403 045c 2881 ld r18,Y\r
+ 5404 045e 30E0 ldi r19,lo8(0)\r
+ 5405 0460 40E0 ldi r20,lo8(0)\r
+ 5406 0462 50E0 ldi r21,hi8(0)\r
+ 5407 0464 522F mov r21,r18\r
+ 5408 0466 4427 clr r20\r
+ 5409 0468 3327 clr r19\r
+ 5410 046a 2227 clr r18\r
+ 5411 046c 8A91 ld r24,-Y\r
+ 5412 046e 90E0 ldi r25,lo8(0)\r
+ 5413 0470 A0E0 ldi r26,lo8(0)\r
+ 5414 0472 B0E0 ldi r27,hi8(0)\r
+ 5415 0474 DC01 movw r26,r24\r
+ 5416 0476 9927 clr r25\r
+ 5417 0478 8827 clr r24\r
+ 5418 047a 282B or r18,r24\r
+ 5419 047c 392B or r19,r25\r
+ 5420 047e 4A2B or r20,r26\r
+ 5421 0480 5B2B or r21,r27\r
+ 5422 0482 2297 sbiw r28,2\r
+ 5423 0484 8991 ld r24,Y+\r
+ 5424 0486 90E0 ldi r25,lo8(0)\r
+ 5425 0488 A0E0 ldi r26,lo8(0)\r
+ 5426 048a B0E0 ldi r27,hi8(0)\r
+ 5427 048c 282B or r18,r24\r
+ 5428 048e 392B or r19,r25\r
+ 5429 0490 4A2B or r20,r26\r
+ 5430 0492 5B2B or r21,r27\r
+ 5431 0494 9881 ld r25,Y\r
+ 5432 0496 CB51 subi r28,lo8(-(-539))\r
+ 5433 0498 D240 sbci r29,hi8(-(-539))\r
+ 5434 049a 80E0 ldi r24,lo8(0)\r
+ 5435 049c A0E0 ldi r26,lo8(0)\r
+ 5436 049e B0E0 ldi r27,hi8(0)\r
+ 5437 04a0 282B or r18,r24\r
+ 5438 04a2 392B or r19,r25\r
+ 5439 04a4 4A2B or r20,r26\r
+ 5440 04a6 5B2B or r21,r27\r
+ 5441 04a8 2A87 std Y+10,r18\r
+ 5442 04aa 3B87 std Y+11,r19\r
+ 5443 04ac 4C87 std Y+12,r20\r
+ 5444 04ae 5D87 std Y+13,r21\r
+ 5445 .LSM441:\r
+ 5446 04b0 C75E subi r28,lo8(-(537))\r
+ 5447 04b2 DD4F sbci r29,hi8(-(537))\r
+ 5448 04b4 2881 ld r18,Y\r
+ 5449 04b6 30E0 ldi r19,lo8(0)\r
+ 5450 04b8 40E0 ldi r20,lo8(0)\r
+ 5451 04ba 50E0 ldi r21,hi8(0)\r
+ 5452 04bc 522F mov r21,r18\r
+ 5453 04be 4427 clr r20\r
+ 5454 04c0 3327 clr r19\r
+ 5455 04c2 2227 clr r18\r
+ 5456 04c4 8A91 ld r24,-Y\r
+ 5457 04c6 90E0 ldi r25,lo8(0)\r
+ 5458 04c8 A0E0 ldi r26,lo8(0)\r
+ 5459 04ca B0E0 ldi r27,hi8(0)\r
+ 5460 04cc DC01 movw r26,r24\r
+ 5461 04ce 9927 clr r25\r
+ 5462 04d0 8827 clr r24\r
+ 5463 04d2 282B or r18,r24\r
+ 5464 04d4 392B or r19,r25\r
+ 5465 04d6 4A2B or r20,r26\r
+ 5466 04d8 5B2B or r21,r27\r
+ 5467 04da 2297 sbiw r28,2\r
+ 5468 04dc 8991 ld r24,Y+\r
+ 5469 04de 90E0 ldi r25,lo8(0)\r
+ 5470 04e0 A0E0 ldi r26,lo8(0)\r
+ 5471 04e2 B0E0 ldi r27,hi8(0)\r
+ 5472 04e4 282B or r18,r24\r
+ 5473 04e6 392B or r19,r25\r
+ 5474 04e8 4A2B or r20,r26\r
+ 5475 04ea 5B2B or r21,r27\r
+ 5476 04ec 9881 ld r25,Y\r
+ 5477 04ee C751 subi r28,lo8(-(-535))\r
+ 5478 04f0 D240 sbci r29,hi8(-(-535))\r
+ 5479 04f2 80E0 ldi r24,lo8(0)\r
+ 5480 04f4 A0E0 ldi r26,lo8(0)\r
+ 5481 04f6 B0E0 ldi r27,hi8(0)\r
+ 5482 04f8 282B or r18,r24\r
+ 5483 04fa 392B or r19,r25\r
+ 5484 04fc 4A2B or r20,r26\r
+ 5485 04fe 5B2B or r21,r27\r
+ 5486 0500 2E87 std Y+14,r18\r
+ 5487 0502 3F87 std Y+15,r19\r
+ 5488 0504 488B std Y+16,r20\r
+ 5489 0506 598B std Y+17,r21\r
+ 5490 .LVL495:\r
+ 5491 .L257:\r
+ 5492 .LSM442:\r
+ 5493 0508 1883 st Y,r17\r
+ 5494 .LSM443:\r
+ 5495 050a 1AA6 std Y+42,__zero_reg__\r
+ 5496 050c 1BA6 std Y+43,__zero_reg__\r
+ 5497 050e 1CA6 std Y+44,__zero_reg__\r
+ 5498 0510 1DA6 std Y+45,__zero_reg__\r
+ 5499 .LSM444:\r
+ 5500 0512 8091 0000 lds r24,Fsid\r
+ 5501 0516 9091 0000 lds r25,(Fsid)+1\r
+ 5502 051a 0196 adiw r24,1\r
+ 5503 051c 9093 0000 sts (Fsid)+1,r25\r
+ 5504 0520 8093 0000 sts Fsid,r24\r
+ 5505 0524 9F83 std Y+7,r25\r
+ 5506 0526 8E83 std Y+6,r24\r
+ 5507 0528 00C0 rjmp .L244\r
+ 5508 .LVL496:\r
+ 5509 .L245:\r
+ 5510 .LSM445:\r
+ 5511 052a 8AE0 ldi r24,lo8(10)\r
+ 5512 052c 00C0 rjmp .L241\r
+ 5513 .LVL497:\r
+ 5514 .L244:\r
+ 5515 052e 80E0 ldi r24,lo8(0)\r
+ 5516 0530 00C0 rjmp .L241\r
+ 5517 .LVL498:\r
+ 5518 .L250:\r
+ 5519 0532 8DE0 ldi r24,lo8(13)\r
+ 5520 .LVL499:\r
+ 5521 .L241:\r
+ 5522 /* epilogue start */\r
+ 5523 .LSM446:\r
+ 5524 0534 DF91 pop r29\r
+ 5525 0536 CF91 pop r28\r
+ 5526 .LVL500:\r
+ 5527 0538 1F91 pop r17\r
+ 5528 .LVL501:\r
+ 5529 053a 0F91 pop r16\r
+ 5530 .LVL502:\r
+ 5531 053c FF90 pop r15\r
+ 5532 053e EF90 pop r14\r
+ 5533 .LVL503:\r
+ 5534 0540 DF90 pop r13\r
+ 5535 0542 CF90 pop r12\r
+ 5536 0544 BF90 pop r11\r
+ 5537 0546 AF90 pop r10\r
+ 5538 .LVL504:\r
+ 5539 0548 9F90 pop r9\r
+ 5540 054a 8F90 pop r8\r
+ 5541 054c 7F90 pop r7\r
+ 5542 054e 6F90 pop r6\r
+ 5543 .LVL505:\r
+ 5544 0550 0895 ret\r
+ 5545 .LVL506:\r
+ 5546 .L256:\r
+ 5547 .LSM447:\r
+ 5548 0552 C35A subi r28,lo8(-(93))\r
+ 5549 0554 DF4F sbci r29,hi8(-(93))\r
+ 5550 0556 2881 ld r18,Y\r
+ 5551 .LVL507:\r
+ 5552 0558 30E0 ldi r19,lo8(0)\r
+ 5553 055a 40E0 ldi r20,lo8(0)\r
+ 5554 055c 50E0 ldi r21,hi8(0)\r
+ 5555 055e 522F mov r21,r18\r
+ 5556 0560 4427 clr r20\r
+ 5557 0562 3327 clr r19\r
+ 5558 0564 2227 clr r18\r
+ 5559 0566 8A91 ld r24,-Y\r
+ 5560 0568 90E0 ldi r25,lo8(0)\r
+ 5561 056a A0E0 ldi r26,lo8(0)\r
+ 5562 056c B0E0 ldi r27,hi8(0)\r
+ 5563 056e DC01 movw r26,r24\r
+ 5564 0570 9927 clr r25\r
+ 5565 0572 8827 clr r24\r
+ 5566 0574 282B or r18,r24\r
+ 5567 0576 392B or r19,r25\r
+ 5568 0578 4A2B or r20,r26\r
+ 5569 057a 5B2B or r21,r27\r
+ 5570 057c 2297 sbiw r28,2\r
+ 5571 057e 8991 ld r24,Y+\r
+ 5572 0580 90E0 ldi r25,lo8(0)\r
+ 5573 0582 A0E0 ldi r26,lo8(0)\r
+ 5574 0584 B0E0 ldi r27,hi8(0)\r
+ 5575 0586 282B or r18,r24\r
+ 5576 0588 392B or r19,r25\r
+ 5577 058a 4A2B or r20,r26\r
+ 5578 058c 5B2B or r21,r27\r
+ 5579 058e 9881 ld r25,Y\r
+ 5580 0590 CB55 subi r28,lo8(-(-91))\r
+ 5581 0592 D040 sbci r29,hi8(-(-91))\r
+ 5582 0594 80E0 ldi r24,lo8(0)\r
+ 5583 0596 A0E0 ldi r26,lo8(0)\r
+ 5584 0598 B0E0 ldi r27,hi8(0)\r
+ 5585 059a 282B or r18,r24\r
+ 5586 059c 392B or r19,r25\r
+ 5587 059e 4A2B or r20,r26\r
+ 5588 05a0 5B2B or r21,r27\r
+ 5589 05a2 2AA3 std Y+34,r18\r
+ 5590 05a4 3BA3 std Y+35,r19\r
+ 5591 05a6 4CA3 std Y+36,r20\r
+ 5592 05a8 5DA3 std Y+37,r21\r
+ 5593 05aa 13E0 ldi r17,lo8(3)\r
+ 5594 .LVL508:\r
+ 5595 05ac 00C0 rjmp .L258\r
+ 5596 .LFE70:\r
+ 5598 .data\r
+ 5599 .LC0:\r
+ 5600 0000 2022 2A2B .string " \"*+,[=]|\177"\r
+ 5600 2C5B 3D5D \r
+ 5600 7C7F 00\r
+ 5601 .section .text.f_open,"ax",@progbits\r
+ 5602 .global f_open\r
+ 5604 f_open:\r
+ 5605 .LFB73:\r
+ 5606 .LSM448:\r
+ 5607 .LVL509:\r
+ 5608 0000 2F92 push r2\r
+ 5609 0002 3F92 push r3\r
+ 5610 0004 4F92 push r4\r
+ 5611 0006 5F92 push r5\r
+ 5612 0008 6F92 push r6\r
+ 5613 000a 7F92 push r7\r
+ 5614 000c 8F92 push r8\r
+ 5615 000e 9F92 push r9\r
+ 5616 0010 AF92 push r10\r
+ 5617 0012 BF92 push r11\r
+ 5618 0014 CF92 push r12\r
+ 5619 0016 DF92 push r13\r
+ 5620 0018 EF92 push r14\r
+ 5621 001a FF92 push r15\r
+ 5622 001c 0F93 push r16\r
+ 5623 001e 1F93 push r17\r
+ 5624 0020 DF93 push r29\r
+ 5625 0022 CF93 push r28\r
+ 5626 0024 CDB7 in r28,__SP_L__\r
+ 5627 0026 DEB7 in r29,__SP_H__\r
+ 5628 0028 AD97 sbiw r28,45\r
+ 5629 002a 0FB6 in __tmp_reg__,__SREG__\r
+ 5630 002c F894 cli\r
+ 5631 002e DEBF out __SP_H__,r29\r
+ 5632 0030 0FBE out __SREG__,__tmp_reg__\r
+ 5633 0032 CDBF out __SP_L__,r28\r
+ 5634 /* prologue: function */\r
+ 5635 /* frame size = 45 */\r
+ 5636 0034 9DA7 std Y+45,r25\r
+ 5637 0036 8CA7 std Y+44,r24\r
+ 5638 0038 7CA3 std Y+36,r23\r
+ 5639 003a 6BA3 std Y+35,r22\r
+ 5640 .LSM449:\r
+ 5641 003c DC01 movw r26,r24\r
+ 5642 003e 1D92 st X+,__zero_reg__\r
+ 5643 0040 1C92 st X,__zero_reg__\r
+ 5644 .LSM450:\r
+ 5645 0042 B42F mov r27,r20\r
+ 5646 0044 BF71 andi r27,lo8(31)\r
+ 5647 0046 BDA3 std Y+37,r27\r
+ 5648 .LVL510:\r
+ 5649 .LSM451:\r
+ 5650 0048 4E71 andi r20,lo8(30)\r
+ 5651 .LVL511:\r
+ 5652 004a CE01 movw r24,r28\r
+ 5653 .LVL512:\r
+ 5654 004c 8396 adiw r24,35\r
+ 5655 004e BE01 movw r22,r28\r
+ 5656 .LVL513:\r
+ 5657 0050 635F subi r22,lo8(-(13))\r
+ 5658 0052 7F4F sbci r23,hi8(-(13))\r
+ 5659 0054 0E94 0000 call chk_mounted\r
+ 5660 .LVL514:\r
+ 5661 .LSM452:\r
+ 5662 0058 8823 tst r24\r
+ 5663 .LVL515:\r
+ 5664 005a 01F0 breq .L261\r
+ 5665 005c 282F mov r18,r24\r
+ 5666 005e 00C0 rjmp .L262\r
+ 5667 .LVL516:\r
+ 5668 .L261:\r
+ 5669 .LSM453:\r
+ 5670 0060 CE01 movw r24,r28\r
+ 5671 .LVL517:\r
+ 5672 0062 0196 adiw r24,1\r
+ 5673 0064 9AA3 std Y+34,r25\r
+ 5674 0066 89A3 std Y+33,r24\r
+ 5675 .LSM454:\r
+ 5676 0068 EBA0 ldd r14,Y+35\r
+ 5677 006a FCA0 ldd r15,Y+36\r
+ 5678 .LVL518:\r
+ 5679 006c 00C0 rjmp .L263\r
+ 5680 .L264:\r
+ 5681 .LBB23:\r
+ 5682 .LBB24:\r
+ 5683 .LSM455:\r
+ 5684 006e 0894 sec\r
+ 5685 0070 E11C adc r14,__zero_reg__\r
+ 5686 0072 F11C adc r15,__zero_reg__\r
+ 5687 .L263:\r
+ 5688 0074 F701 movw r30,r14\r
+ 5689 0076 8081 ld r24,Z\r
+ 5690 0078 8032 cpi r24,lo8(32)\r
+ 5691 007a 01F0 breq .L264\r
+ 5692 .LSM456:\r
+ 5693 007c 8F32 cpi r24,lo8(47)\r
+ 5694 007e 01F0 breq .L265\r
+ 5695 0080 8C35 cpi r24,lo8(92)\r
+ 5696 0082 01F4 brne .L266\r
+ 5697 .L265:\r
+ 5698 .LSM457:\r
+ 5699 0084 0894 sec\r
+ 5700 0086 E11C adc r14,__zero_reg__\r
+ 5701 0088 F11C adc r15,__zero_reg__\r
+ 5702 .L266:\r
+ 5703 .LSM458:\r
+ 5704 008a 1B8A std Y+19,__zero_reg__\r
+ 5705 008c 1C8A std Y+20,__zero_reg__\r
+ 5706 008e 1D8A std Y+21,__zero_reg__\r
+ 5707 0090 1E8A std Y+22,__zero_reg__\r
+ 5708 .LSM459:\r
+ 5709 0092 D701 movw r26,r14\r
+ 5710 0094 8C91 ld r24,X\r
+ 5711 0096 8032 cpi r24,lo8(32)\r
+ 5712 0098 00F4 brsh .L267\r
+ 5713 .LBE24:\r
+ 5714 .LSM460:\r
+ 5715 009a CE01 movw r24,r28\r
+ 5716 009c 0D96 adiw r24,13\r
+ 5717 009e 60E0 ldi r22,lo8(0)\r
+ 5718 00a0 70E0 ldi r23,hi8(0)\r
+ 5719 00a2 0E94 0000 call dir_seek\r
+ 5720 00a6 282F mov r18,r24\r
+ 5721 .LVL519:\r
+ 5722 .LBB39:\r
+ 5723 .LSM461:\r
+ 5724 00a8 18A2 std Y+32,__zero_reg__\r
+ 5725 00aa 1F8E std Y+31,__zero_reg__\r
+ 5726 00ac 00C0 rjmp .L268\r
+ 5727 .LVL520:\r
+ 5728 .L267:\r
+ 5729 .LBB25:\r
+ 5730 .LBB27:\r
+ 5731 .LSM462:\r
+ 5732 00ae A5E0 ldi r26,lo8(5)\r
+ 5733 00b0 3A2E mov r3,r26\r
+ 5734 .LBE27:\r
+ 5735 .LBE25:\r
+ 5736 .LBB31:\r
+ 5737 .LSM463:\r
+ 5738 00b2 FDE0 ldi r31,lo8(13)\r
+ 5739 00b4 4F2E mov r4,r31\r
+ 5740 00b6 512C mov r5,__zero_reg__\r
+ 5741 00b8 4C0E add r4,r28\r
+ 5742 00ba 5D1E adc r5,r29\r
+ 5743 .LVL521:\r
+ 5744 .L320:\r
+ 5745 .LBE31:\r
+ 5746 .LBB36:\r
+ 5747 .LBB26:\r
+ 5748 .LSM464:\r
+ 5749 00bc 09A1 ldd r16,Y+33\r
+ 5750 00be 1AA1 ldd r17,Y+34\r
+ 5751 .LSM465:\r
+ 5752 00c0 C801 movw r24,r16\r
+ 5753 00c2 60E2 ldi r22,lo8(32)\r
+ 5754 00c4 70E0 ldi r23,hi8(32)\r
+ 5755 00c6 4BE0 ldi r20,lo8(11)\r
+ 5756 00c8 50E0 ldi r21,hi8(11)\r
+ 5757 00ca 0E94 0000 call mem_set\r
+ 5758 .LVL522:\r
+ 5759 00ce 40E0 ldi r20,lo8(0)\r
+ 5760 00d0 50E0 ldi r21,hi8(0)\r
+ 5761 .LVL523:\r
+ 5762 00d2 CC24 clr r12\r
+ 5763 00d4 DD24 clr r13\r
+ 5764 00d6 E8E0 ldi r30,lo8(8)\r
+ 5765 00d8 AE2E mov r10,r30\r
+ 5766 00da B12C mov r11,__zero_reg__\r
+ 5767 00dc A0E0 ldi r26,lo8(0)\r
+ 5768 .LVL524:\r
+ 5769 .L319:\r
+ 5770 .LSM466:\r
+ 5771 00de F701 movw r30,r14\r
+ 5772 00e0 EC0D add r30,r12\r
+ 5773 00e2 FD1D adc r31,r13\r
+ 5774 00e4 2081 ld r18,Z\r
+ 5775 00e6 0894 sec\r
+ 5776 00e8 C11C adc r12,__zero_reg__\r
+ 5777 00ea D11C adc r13,__zero_reg__\r
+ 5778 .LSM467:\r
+ 5779 00ec 2132 cpi r18,lo8(33)\r
+ 5780 00ee 00F4 brsh .+2\r
+ 5781 00f0 00C0 rjmp .L269\r
+ 5782 00f2 2F32 cpi r18,lo8(47)\r
+ 5783 00f4 01F4 brne .+2\r
+ 5784 00f6 00C0 rjmp .L270\r
+ 5785 00f8 2C35 cpi r18,lo8(92)\r
+ 5786 00fa 01F4 brne .+2\r
+ 5787 00fc 00C0 rjmp .L270\r
+ 5788 .LSM468:\r
+ 5789 00fe 2E32 cpi r18,lo8(46)\r
+ 5790 0100 01F0 breq .L271\r
+ 5791 0102 4A15 cp r20,r10\r
+ 5792 0104 5B05 cpc r21,r11\r
+ 5793 0106 04F0 brlt .L272\r
+ 5794 .L271:\r
+ 5795 .LSM469:\r
+ 5796 0108 B8E0 ldi r27,lo8(8)\r
+ 5797 010a AB16 cp r10,r27\r
+ 5798 010c B104 cpc r11,__zero_reg__\r
+ 5799 010e 01F0 breq .+2\r
+ 5800 0110 00C0 rjmp .L273\r
+ 5801 0112 2E32 cpi r18,lo8(46)\r
+ 5802 0114 01F0 breq .+2\r
+ 5803 0116 00C0 rjmp .L273\r
+ 5804 .LSM470:\r
+ 5805 0118 AA0F lsl r26\r
+ 5806 011a AA0F lsl r26\r
+ 5807 011c 48E0 ldi r20,lo8(8)\r
+ 5808 011e 50E0 ldi r21,hi8(8)\r
+ 5809 0120 7BE0 ldi r23,lo8(11)\r
+ 5810 0122 A72E mov r10,r23\r
+ 5811 0124 B12C mov r11,__zero_reg__\r
+ 5812 0126 00C0 rjmp .L319\r
+ 5813 .L272:\r
+ 5814 .LSM471:\r
+ 5815 0128 27FD sbrc r18,7\r
+ 5816 .LSM472:\r
+ 5817 012a A360 ori r26,lo8(3)\r
+ 5818 .L275:\r
+ 5819 .LSM473:\r
+ 5820 012c 822F mov r24,r18\r
+ 5821 012e 8158 subi r24,lo8(-(127))\r
+ 5822 0130 8F31 cpi r24,lo8(31)\r
+ 5823 0132 00F0 brlo .L276\r
+ 5824 0134 8F55 subi r24,lo8(-(-95))\r
+ 5825 0136 8D31 cpi r24,lo8(29)\r
+ 5826 0138 00F4 brsh .L277\r
+ 5827 .L276:\r
+ 5828 .LSM474:\r
+ 5829 013a F701 movw r30,r14\r
+ 5830 013c EC0D add r30,r12\r
+ 5831 013e FD1D adc r31,r13\r
+ 5832 0140 3081 ld r19,Z\r
+ 5833 .LSM475:\r
+ 5834 0142 832F mov r24,r19\r
+ 5835 0144 8054 subi r24,lo8(-(-64))\r
+ 5836 0146 8F33 cpi r24,lo8(63)\r
+ 5837 0148 00F0 brlo .L278\r
+ 5838 014a 8054 subi r24,lo8(-(-64))\r
+ 5839 014c 8D37 cpi r24,lo8(125)\r
+ 5840 014e 00F0 brlo .+2\r
+ 5841 0150 00C0 rjmp .L273\r
+ 5842 .L278:\r
+ 5843 0152 C501 movw r24,r10\r
+ 5844 0154 0197 sbiw r24,1\r
+ 5845 0156 4817 cp r20,r24\r
+ 5846 0158 5907 cpc r21,r25\r
+ 5847 015a 04F0 brlt .+2\r
+ 5848 015c 00C0 rjmp .L273\r
+ 5849 .LSM476:\r
+ 5850 015e 0894 sec\r
+ 5851 0160 C11C adc r12,__zero_reg__\r
+ 5852 0162 D11C adc r13,__zero_reg__\r
+ 5853 .LSM477:\r
+ 5854 0164 F801 movw r30,r16\r
+ 5855 0166 E40F add r30,r20\r
+ 5856 0168 F51F adc r31,r21\r
+ 5857 016a 2083 st Z,r18\r
+ 5858 016c CA01 movw r24,r20\r
+ 5859 016e 0196 adiw r24,1\r
+ 5860 .LVL525:\r
+ 5861 .LSM478:\r
+ 5862 0170 F801 movw r30,r16\r
+ 5863 0172 E80F add r30,r24\r
+ 5864 0174 F91F adc r31,r25\r
+ 5865 0176 3083 st Z,r19\r
+ 5866 0178 AC01 movw r20,r24\r
+ 5867 017a 00C0 rjmp .L321\r
+ 5868 .LVL526:\r
+ 5869 .L277:\r
+ 5870 .LSM479:\r
+ 5871 017c 622F mov r22,r18\r
+ 5872 017e 70E0 ldi r23,lo8(0)\r
+ 5873 0180 E0E0 ldi r30,lo8(.LC0)\r
+ 5874 0182 F0E0 ldi r31,hi8(.LC0)\r
+ 5875 .LVL527:\r
+ 5876 0184 00C0 rjmp .L279\r
+ 5877 .L281:\r
+ 5878 .LBB28:\r
+ 5879 .LBB29:\r
+ 5880 .LSM480:\r
+ 5881 0186 3196 adiw r30,1\r
+ 5882 .L279:\r
+ 5883 0188 8081 ld r24,Z\r
+ 5884 018a 8823 tst r24\r
+ 5885 018c 01F0 breq .L280\r
+ 5886 018e 90E0 ldi r25,lo8(0)\r
+ 5887 0190 8617 cp r24,r22\r
+ 5888 0192 9707 cpc r25,r23\r
+ 5889 0194 01F4 brne .L281\r
+ 5890 0196 00C0 rjmp .L273\r
+ 5891 .L280:\r
+ 5892 .LBE29:\r
+ 5893 .LBE28:\r
+ 5894 .LSM481:\r
+ 5895 0198 822F mov r24,r18\r
+ 5896 019a 8154 subi r24,lo8(-(-65))\r
+ 5897 019c 8A31 cpi r24,lo8(26)\r
+ 5898 019e 00F4 brsh .L282\r
+ 5899 .LSM482:\r
+ 5900 01a0 A260 ori r26,lo8(2)\r
+ 5901 01a2 00C0 rjmp .L283\r
+ 5902 .L282:\r
+ 5903 .LSM483:\r
+ 5904 01a4 822F mov r24,r18\r
+ 5905 01a6 8156 subi r24,lo8(-(-97))\r
+ 5906 01a8 8A31 cpi r24,lo8(26)\r
+ 5907 01aa 00F4 brsh .L283\r
+ 5908 .LSM484:\r
+ 5909 01ac A160 ori r26,lo8(1)\r
+ 5910 01ae 2052 subi r18,lo8(-(-32))\r
+ 5911 .L283:\r
+ 5912 .LSM485:\r
+ 5913 01b0 F801 movw r30,r16\r
+ 5914 .LVL528:\r
+ 5915 01b2 E40F add r30,r20\r
+ 5916 01b4 F51F adc r31,r21\r
+ 5917 01b6 2083 st Z,r18\r
+ 5918 .LVL529:\r
+ 5919 .L321:\r
+ 5920 01b8 4F5F subi r20,lo8(-(1))\r
+ 5921 01ba 5F4F sbci r21,hi8(-(1))\r
+ 5922 01bc 00C0 rjmp .L319\r
+ 5923 .L269:\r
+ 5924 01be 9A2F mov r25,r26\r
+ 5925 01c0 64E0 ldi r22,lo8(4)\r
+ 5926 .LVL530:\r
+ 5927 .L313:\r
+ 5928 .LSM486:\r
+ 5929 01c2 452B or r20,r21\r
+ 5930 01c4 01F4 brne .+2\r
+ 5931 01c6 00C0 rjmp .L273\r
+ 5932 .LSM487:\r
+ 5933 01c8 F801 movw r30,r16\r
+ 5934 01ca 8081 ld r24,Z\r
+ 5935 01cc 853E cpi r24,lo8(-27)\r
+ 5936 01ce 01F4 brne .L284\r
+ 5937 01d0 3082 st Z,r3\r
+ 5938 .L284:\r
+ 5939 .LSM488:\r
+ 5940 01d2 F8E0 ldi r31,lo8(8)\r
+ 5941 01d4 AF16 cp r10,r31\r
+ 5942 01d6 B104 cpc r11,__zero_reg__\r
+ 5943 01d8 01F4 brne .L285\r
+ 5944 01da 9A2F mov r25,r26\r
+ 5945 01dc 990F lsl r25\r
+ 5946 01de 990F lsl r25\r
+ 5947 .LVL531:\r
+ 5948 .L285:\r
+ 5949 .LSM489:\r
+ 5950 01e0 292F mov r18,r25\r
+ 5951 01e2 30E0 ldi r19,lo8(0)\r
+ 5952 .LVL532:\r
+ 5953 01e4 C901 movw r24,r18\r
+ 5954 01e6 8370 andi r24,lo8(3)\r
+ 5955 01e8 9070 andi r25,hi8(3)\r
+ 5956 01ea 0197 sbiw r24,1\r
+ 5957 01ec 01F4 brne .L286\r
+ 5958 01ee 6061 ori r22,lo8(16)\r
+ 5959 .L286:\r
+ 5960 .LSM490:\r
+ 5961 01f0 2C70 andi r18,lo8(12)\r
+ 5962 01f2 3070 andi r19,hi8(12)\r
+ 5963 01f4 2430 cpi r18,4\r
+ 5964 01f6 3105 cpc r19,__zero_reg__\r
+ 5965 01f8 01F4 brne .L287\r
+ 5966 01fa 6860 ori r22,lo8(8)\r
+ 5967 .L287:\r
+ 5968 .LSM491:\r
+ 5969 01fc D801 movw r26,r16\r
+ 5970 01fe 1B96 adiw r26,11\r
+ 5971 0200 6C93 st X,r22\r
+ 5972 .LBE26:\r
+ 5973 .LBE36:\r
+ 5974 .LBB37:\r
+ 5975 .LSM492:\r
+ 5976 0202 C201 movw r24,r4\r
+ 5977 0204 60E0 ldi r22,lo8(0)\r
+ 5978 0206 70E0 ldi r23,hi8(0)\r
+ 5979 .LVL533:\r
+ 5980 0208 0E94 0000 call dir_seek\r
+ 5981 .LVL534:\r
+ 5982 .L322:\r
+ 5983 020c 482F mov r20,r24\r
+ 5984 .LVL535:\r
+ 5985 .LBB32:\r
+ 5986 .LSM493:\r
+ 5987 020e 8823 tst r24\r
+ 5988 0210 01F4 brne .L288\r
+ 5989 .LVL536:\r
+ 5990 .LBE32:\r
+ 5991 .LSM494:\r
+ 5992 0212 4B8D ldd r20,Y+27\r
+ 5993 0214 5C8D ldd r21,Y+28\r
+ 5994 0216 6D8D ldd r22,Y+29\r
+ 5995 0218 7E8D ldd r23,Y+30\r
+ 5996 021a 8D85 ldd r24,Y+13\r
+ 5997 021c 9E85 ldd r25,Y+14\r
+ 5998 .LVL537:\r
+ 5999 021e 0E94 0000 call move_window\r
+ 6000 0222 482F mov r20,r24\r
+ 6001 .LVL538:\r
+ 6002 .LBB35:\r
+ 6003 .LSM495:\r
+ 6004 0224 8823 tst r24\r
+ 6005 0226 01F4 brne .L288\r
+ 6006 .LVL539:\r
+ 6007 .LSM496:\r
+ 6008 0228 EF8D ldd r30,Y+31\r
+ 6009 022a F8A1 ldd r31,Y+32\r
+ 6010 .LVL540:\r
+ 6011 .LSM497:\r
+ 6012 022c 8081 ld r24,Z\r
+ 6013 .LVL541:\r
+ 6014 022e 8823 tst r24\r
+ 6015 0230 01F4 brne .L289\r
+ 6016 0232 44E0 ldi r20,lo8(4)\r
+ 6017 0234 00C0 rjmp .L288\r
+ 6018 .L289:\r
+ 6019 .LSM498:\r
+ 6020 0236 8385 ldd r24,Z+11\r
+ 6021 0238 83FD sbrc r24,3\r
+ 6022 023a 00C0 rjmp .L290\r
+ 6023 023c 89A1 ldd r24,Y+33\r
+ 6024 .LVL542:\r
+ 6025 023e 9AA1 ldd r25,Y+34\r
+ 6026 .LVL543:\r
+ 6027 0240 9C01 movw r18,r24\r
+ 6028 .LVL544:\r
+ 6029 0242 D901 movw r26,r18\r
+ 6030 .LVL545:\r
+ 6031 0244 2BE0 ldi r18,lo8(11)\r
+ 6032 0246 30E0 ldi r19,hi8(11)\r
+ 6033 .LVL546:\r
+ 6034 .L291:\r
+ 6035 .LBB33:\r
+ 6036 .LBB34:\r
+ 6037 .LSM499:\r
+ 6038 0248 2150 subi r18,lo8(-(-1))\r
+ 6039 024a 3040 sbci r19,hi8(-(-1))\r
+ 6040 024c 8FEF ldi r24,hi8(-1)\r
+ 6041 024e 2F3F cpi r18,lo8(-1)\r
+ 6042 0250 3807 cpc r19,r24\r
+ 6043 0252 01F0 breq .L288\r
+ 6044 0254 9081 ld r25,Z\r
+ 6045 .LVL547:\r
+ 6046 0256 8C91 ld r24,X\r
+ 6047 0258 9817 cp r25,r24\r
+ 6048 025a 01F4 brne .L290\r
+ 6049 025c 3196 adiw r30,1\r
+ 6050 .LVL548:\r
+ 6051 025e 1196 adiw r26,1\r
+ 6052 0260 00C0 rjmp .L291\r
+ 6053 .LVL549:\r
+ 6054 .L290:\r
+ 6055 .LBE34:\r
+ 6056 .LBE33:\r
+ 6057 .LBE35:\r
+ 6058 .LSM500:\r
+ 6059 0262 C201 movw r24,r4\r
+ 6060 0264 60E0 ldi r22,lo8(0)\r
+ 6061 0266 0E94 0000 call dir_next\r
+ 6062 .LVL550:\r
+ 6063 026a 00C0 rjmp .L322\r
+ 6064 .LVL551:\r
+ 6065 .L288:\r
+ 6066 .LBE37:\r
+ 6067 .LSM501:\r
+ 6068 026c E9A1 ldd r30,Y+33\r
+ 6069 026e FAA1 ldd r31,Y+34\r
+ 6070 .LVL552:\r
+ 6071 0270 8385 ldd r24,Z+11\r
+ 6072 .LVL553:\r
+ 6073 0272 8470 andi r24,lo8(4)\r
+ 6074 .LSM502:\r
+ 6075 0274 4423 tst r20\r
+ 6076 0276 01F0 breq .L293\r
+ 6077 0278 242F mov r18,r20\r
+ 6078 .LVL554:\r
+ 6079 .LSM503:\r
+ 6080 027a 4430 cpi r20,lo8(4)\r
+ 6081 027c 01F4 brne .L294\r
+ 6082 027e 8823 tst r24\r
+ 6083 0280 01F0 breq .L295\r
+ 6084 0282 00C0 rjmp .L268\r
+ 6085 .LVL555:\r
+ 6086 .L293:\r
+ 6087 .LSM504:\r
+ 6088 0284 8823 tst r24\r
+ 6089 0286 01F4 brne .L294\r
+ 6090 .LSM505:\r
+ 6091 0288 EF8D ldd r30,Y+31\r
+ 6092 028a F8A1 ldd r31,Y+32\r
+ 6093 .LVL556:\r
+ 6094 .LSM506:\r
+ 6095 028c 8385 ldd r24,Z+11\r
+ 6096 .LVL557:\r
+ 6097 028e 84FF sbrs r24,4\r
+ 6098 0290 00C0 rjmp .L295\r
+ 6099 .LBB38:\r
+ 6100 .LBB30:\r
+ 6101 .LSM507:\r
+ 6102 0292 EC0C add r14,r12\r
+ 6103 0294 FD1C adc r15,r13\r
+ 6104 .LBE30:\r
+ 6105 .LBE38:\r
+ 6106 .LSM508:\r
+ 6107 0296 7588 ldd r7,Z+21\r
+ 6108 0298 6624 clr r6\r
+ 6109 029a 2489 ldd r18,Z+20\r
+ 6110 .LVL558:\r
+ 6111 029c 30E0 ldi r19,lo8(0)\r
+ 6112 029e 2629 or r18,r6\r
+ 6113 02a0 3729 or r19,r7\r
+ 6114 02a2 40E0 ldi r20,lo8(0)\r
+ 6115 02a4 50E0 ldi r21,hi8(0)\r
+ 6116 .LVL559:\r
+ 6117 02a6 A901 movw r20,r18\r
+ 6118 02a8 3327 clr r19\r
+ 6119 02aa 2227 clr r18\r
+ 6120 02ac 938C ldd r9,Z+27\r
+ 6121 02ae 8824 clr r8\r
+ 6122 02b0 828D ldd r24,Z+26\r
+ 6123 02b2 90E0 ldi r25,lo8(0)\r
+ 6124 .LVL560:\r
+ 6125 02b4 8829 or r24,r8\r
+ 6126 02b6 9929 or r25,r9\r
+ 6127 02b8 A0E0 ldi r26,lo8(0)\r
+ 6128 02ba B0E0 ldi r27,hi8(0)\r
+ 6129 .LVL561:\r
+ 6130 02bc 282B or r18,r24\r
+ 6131 02be 392B or r19,r25\r
+ 6132 02c0 4A2B or r20,r26\r
+ 6133 02c2 5B2B or r21,r27\r
+ 6134 02c4 2B8B std Y+19,r18\r
+ 6135 02c6 3C8B std Y+20,r19\r
+ 6136 02c8 4D8B std Y+21,r20\r
+ 6137 02ca 5E8B std Y+22,r21\r
+ 6138 02cc 00C0 rjmp .L320\r
+ 6139 .LVL562:\r
+ 6140 .L273:\r
+ 6141 02ce 26E0 ldi r18,lo8(6)\r
+ 6142 .LVL563:\r
+ 6143 02d0 00C0 rjmp .L268\r
+ 6144 .LVL564:\r
+ 6145 .L294:\r
+ 6146 02d2 242F mov r18,r20\r
+ 6147 .LVL565:\r
+ 6148 02d4 00C0 rjmp .L268\r
+ 6149 .LVL566:\r
+ 6150 .L295:\r
+ 6151 02d6 25E0 ldi r18,lo8(5)\r
+ 6152 .LVL567:\r
+ 6153 .L268:\r
+ 6154 .LBE39:\r
+ 6155 .LBE23:\r
+ 6156 .LSM509:\r
+ 6157 02d8 9DA1 ldd r25,Y+37\r
+ 6158 .LVL568:\r
+ 6159 02da 492F mov r20,r25\r
+ 6160 .LVL569:\r
+ 6161 02dc 50E0 ldi r21,lo8(0)\r
+ 6162 02de CA01 movw r24,r20\r
+ 6163 .LVL570:\r
+ 6164 02e0 8C71 andi r24,lo8(28)\r
+ 6165 02e2 9070 andi r25,hi8(28)\r
+ 6166 02e4 892B or r24,r25\r
+ 6167 02e6 01F4 brne .+2\r
+ 6168 02e8 00C0 rjmp .L296\r
+ 6169 .LBB40:\r
+ 6170 .LSM510:\r
+ 6171 02ea 2223 tst r18\r
+ 6172 02ec 01F4 brne .+2\r
+ 6173 02ee 00C0 rjmp .L297\r
+ 6174 .LSM511:\r
+ 6175 02f0 2430 cpi r18,lo8(4)\r
+ 6176 02f2 01F0 breq .+2\r
+ 6177 02f4 00C0 rjmp .L262\r
+ 6178 .LBB45:\r
+ 6179 .LSM512:\r
+ 6180 02f6 8E01 movw r16,r28\r
+ 6181 .LVL571:\r
+ 6182 02f8 035F subi r16,lo8(-(13))\r
+ 6183 02fa 1F4F sbci r17,hi8(-(13))\r
+ 6184 02fc C801 movw r24,r16\r
+ 6185 02fe 60E0 ldi r22,lo8(0)\r
+ 6186 0300 70E0 ldi r23,hi8(0)\r
+ 6187 .LVL572:\r
+ 6188 0302 0E94 0000 call dir_seek\r
+ 6189 .LVL573:\r
+ 6190 0306 282F mov r18,r24\r
+ 6191 .LVL574:\r
+ 6192 .LBB48:\r
+ 6193 .LSM513:\r
+ 6194 0308 8823 tst r24\r
+ 6195 030a 01F0 breq .+2\r
+ 6196 030c 00C0 rjmp .L262\r
+ 6197 .LVL575:\r
+ 6198 .L315:\r
+ 6199 .LBE48:\r
+ 6200 .LSM514:\r
+ 6201 030e 4B8D ldd r20,Y+27\r
+ 6202 0310 5C8D ldd r21,Y+28\r
+ 6203 0312 6D8D ldd r22,Y+29\r
+ 6204 0314 7E8D ldd r23,Y+30\r
+ 6205 0316 8D85 ldd r24,Y+13\r
+ 6206 0318 9E85 ldd r25,Y+14\r
+ 6207 .LVL576:\r
+ 6208 031a 0E94 0000 call move_window\r
+ 6209 .LVL577:\r
+ 6210 031e 282F mov r18,r24\r
+ 6211 .LVL578:\r
+ 6212 .LBB47:\r
+ 6213 .LSM515:\r
+ 6214 0320 8823 tst r24\r
+ 6215 0322 01F0 breq .+2\r
+ 6216 0324 00C0 rjmp .L262\r
+ 6217 .LVL579:\r
+ 6218 .LSM516:\r
+ 6219 0326 EF8D ldd r30,Y+31\r
+ 6220 0328 F8A1 ldd r31,Y+32\r
+ 6221 032a E081 ld r30,Z\r
+ 6222 .LVL580:\r
+ 6223 .LSM517:\r
+ 6224 032c E53E cpi r30,lo8(-27)\r
+ 6225 032e 01F4 brne .+2\r
+ 6226 0330 00C0 rjmp .L298\r
+ 6227 0332 EE23 tst r30\r
+ 6228 0334 01F4 brne .+2\r
+ 6229 0336 00C0 rjmp .L298\r
+ 6230 .LBE47:\r
+ 6231 .LSM518:\r
+ 6232 0338 C801 movw r24,r16\r
+ 6233 .LVL581:\r
+ 6234 033a 61E0 ldi r22,lo8(1)\r
+ 6235 033c 0E94 0000 call dir_next\r
+ 6236 .LVL582:\r
+ 6237 0340 282F mov r18,r24\r
+ 6238 .LVL583:\r
+ 6239 .LBB46:\r
+ 6240 .LSM519:\r
+ 6241 0342 8823 tst r24\r
+ 6242 0344 01F0 breq .L315\r
+ 6243 .LVL584:\r
+ 6244 0346 00C0 rjmp .L262\r
+ 6245 .L323:\r
+ 6246 .LSM520:\r
+ 6247 0348 0F8D ldd r16,Y+31\r
+ 6248 034a 18A1 ldd r17,Y+32\r
+ 6249 .LVL585:\r
+ 6250 .LSM521:\r
+ 6251 034c C801 movw r24,r16\r
+ 6252 .LVL586:\r
+ 6253 034e 60E0 ldi r22,lo8(0)\r
+ 6254 0350 70E0 ldi r23,hi8(0)\r
+ 6255 0352 40E2 ldi r20,lo8(32)\r
+ 6256 0354 50E0 ldi r21,hi8(32)\r
+ 6257 0356 0E94 0000 call mem_set\r
+ 6258 .LVL587:\r
+ 6259 .LSM522:\r
+ 6260 035a 69A1 ldd r22,Y+33\r
+ 6261 035c 7AA1 ldd r23,Y+34\r
+ 6262 035e C801 movw r24,r16\r
+ 6263 0360 4BE0 ldi r20,lo8(11)\r
+ 6264 0362 50E0 ldi r21,hi8(11)\r
+ 6265 0364 0E94 0000 call mem_cpy\r
+ 6266 .LSM523:\r
+ 6267 0368 E9A1 ldd r30,Y+33\r
+ 6268 036a FAA1 ldd r31,Y+34\r
+ 6269 036c 8385 ldd r24,Z+11\r
+ 6270 036e 8871 andi r24,lo8(24)\r
+ 6271 0370 D801 movw r26,r16\r
+ 6272 0372 1C96 adiw r26,12\r
+ 6273 0374 8C93 st X,r24\r
+ 6274 .LSM524:\r
+ 6275 0376 ED85 ldd r30,Y+13\r
+ 6276 0378 FE85 ldd r31,Y+14\r
+ 6277 037a 81E0 ldi r24,lo8(1)\r
+ 6278 037c 8483 std Z+4,r24\r
+ 6279 .LBE46:\r
+ 6280 .LBE45:\r
+ 6281 .LSM525:\r
+ 6282 037e BDA1 ldd r27,Y+37\r
+ 6283 0380 B860 ori r27,lo8(8)\r
+ 6284 0382 BDA3 std Y+37,r27\r
+ 6285 .LVL588:\r
+ 6286 .LSM526:\r
+ 6287 0384 EF8C ldd r14,Y+31\r
+ 6288 0386 F8A0 ldd r15,Y+32\r
+ 6289 .LVL589:\r
+ 6290 0388 00C0 rjmp .L300\r
+ 6291 .LVL590:\r
+ 6292 .L297:\r
+ 6293 .LSM527:\r
+ 6294 038a 42FF sbrs r20,2\r
+ 6295 038c 00C0 rjmp .L301\r
+ 6296 038e 28E0 ldi r18,lo8(8)\r
+ 6297 0390 00C0 rjmp .L262\r
+ 6298 .L301:\r
+ 6299 .LSM528:\r
+ 6300 0392 EF8C ldd r14,Y+31\r
+ 6301 0394 F8A0 ldd r15,Y+32\r
+ 6302 .LVL591:\r
+ 6303 .LSM529:\r
+ 6304 0396 E114 cp r14,__zero_reg__\r
+ 6305 0398 F104 cpc r15,__zero_reg__\r
+ 6306 039a 01F4 brne .+2\r
+ 6307 039c 00C0 rjmp .L302\r
+ 6308 039e F701 movw r30,r14\r
+ 6309 .LVL592:\r
+ 6310 03a0 8385 ldd r24,Z+11\r
+ 6311 03a2 8171 andi r24,lo8(17)\r
+ 6312 03a4 01F0 breq .+2\r
+ 6313 03a6 00C0 rjmp .L302\r
+ 6314 .LSM530:\r
+ 6315 03a8 43FF sbrs r20,3\r
+ 6316 03aa 00C0 rjmp .L300\r
+ 6317 .LSM531:\r
+ 6318 03ac 9589 ldd r25,Z+21\r
+ 6319 03ae 80E0 ldi r24,lo8(0)\r
+ 6320 03b0 2489 ldd r18,Z+20\r
+ 6321 .LVL593:\r
+ 6322 03b2 30E0 ldi r19,lo8(0)\r
+ 6323 .LVL594:\r
+ 6324 03b4 822B or r24,r18\r
+ 6325 03b6 932B or r25,r19\r
+ 6326 03b8 A0E0 ldi r26,lo8(0)\r
+ 6327 03ba B0E0 ldi r27,hi8(0)\r
+ 6328 .LVL595:\r
+ 6329 03bc 2C01 movw r4,r24\r
+ 6330 03be 3324 clr r3\r
+ 6331 03c0 2224 clr r2\r
+ 6332 .LVL596:\r
+ 6333 03c2 938D ldd r25,Z+27\r
+ 6334 03c4 80E0 ldi r24,lo8(0)\r
+ 6335 03c6 228D ldd r18,Z+26\r
+ 6336 03c8 30E0 ldi r19,lo8(0)\r
+ 6337 03ca 822B or r24,r18\r
+ 6338 03cc 932B or r25,r19\r
+ 6339 03ce A0E0 ldi r26,lo8(0)\r
+ 6340 03d0 B0E0 ldi r27,hi8(0)\r
+ 6341 03d2 282A or r2,r24\r
+ 6342 03d4 392A or r3,r25\r
+ 6343 03d6 4A2A or r4,r26\r
+ 6344 03d8 5B2A or r5,r27\r
+ 6345 .LSM532:\r
+ 6346 03da 148A std Z+20,__zero_reg__\r
+ 6347 03dc 158A std Z+21,__zero_reg__\r
+ 6348 .LSM533:\r
+ 6349 03de 128E std Z+26,__zero_reg__\r
+ 6350 03e0 138E std Z+27,__zero_reg__\r
+ 6351 .LSM534:\r
+ 6352 03e2 148E std Z+28,__zero_reg__\r
+ 6353 03e4 158E std Z+29,__zero_reg__\r
+ 6354 03e6 168E std Z+30,__zero_reg__\r
+ 6355 03e8 178E std Z+31,__zero_reg__\r
+ 6356 .LSM535:\r
+ 6357 03ea 8D85 ldd r24,Y+13\r
+ 6358 03ec 9E85 ldd r25,Y+14\r
+ 6359 03ee 9BA7 std Y+43,r25\r
+ 6360 03f0 8AA7 std Y+42,r24\r
+ 6361 03f2 81E0 ldi r24,lo8(1)\r
+ 6362 03f4 AAA5 ldd r26,Y+42\r
+ 6363 03f6 BBA5 ldd r27,Y+43\r
+ 6364 03f8 1496 adiw r26,4\r
+ 6365 03fa 8C93 st X,r24\r
+ 6366 .LSM536:\r
+ 6367 03fc AAA5 ldd r26,Y+42\r
+ 6368 03fe BBA5 ldd r27,Y+43\r
+ 6369 0400 9A96 adiw r26,42\r
+ 6370 0402 8D91 ld r24,X+\r
+ 6371 0404 9D91 ld r25,X+\r
+ 6372 0406 0D90 ld __tmp_reg__,X+\r
+ 6373 0408 BC91 ld r27,X\r
+ 6374 040a A02D mov r26,__tmp_reg__\r
+ 6375 040c 8EA3 std Y+38,r24\r
+ 6376 040e 9FA3 std Y+39,r25\r
+ 6377 0410 A8A7 std Y+40,r26\r
+ 6378 0412 B9A7 std Y+41,r27\r
+ 6379 .LVL597:\r
+ 6380 .LSM537:\r
+ 6381 0414 2114 cp r2,__zero_reg__\r
+ 6382 0416 3104 cpc r3,__zero_reg__\r
+ 6383 0418 4104 cpc r4,__zero_reg__\r
+ 6384 041a 5104 cpc r5,__zero_reg__\r
+ 6385 041c 01F4 brne .+2\r
+ 6386 041e 00C0 rjmp .L303\r
+ 6387 .LBB41:\r
+ 6388 .LBB42:\r
+ 6389 .LSM538:\r
+ 6390 0420 B1E0 ldi r27,lo8(1)\r
+ 6391 0422 2B16 cp r2,r27\r
+ 6392 0424 3104 cpc r3,__zero_reg__\r
+ 6393 0426 4104 cpc r4,__zero_reg__\r
+ 6394 0428 5104 cpc r5,__zero_reg__\r
+ 6395 042a 01F4 brne .+2\r
+ 6396 042c 00C0 rjmp .L304\r
+ 6397 042e EAA5 ldd r30,Y+42\r
+ 6398 0430 FBA5 ldd r31,Y+43\r
+ 6399 0432 828D ldd r24,Z+26\r
+ 6400 0434 938D ldd r25,Z+27\r
+ 6401 0436 A48D ldd r26,Z+28\r
+ 6402 0438 B58D ldd r27,Z+29\r
+ 6403 043a 2816 cp r2,r24\r
+ 6404 043c 3906 cpc r3,r25\r
+ 6405 043e 4A06 cpc r4,r26\r
+ 6406 0440 5B06 cpc r5,r27\r
+ 6407 0442 00F0 brlo .+2\r
+ 6408 0444 00C0 rjmp .L304\r
+ 6409 0446 6201 movw r12,r4\r
+ 6410 0448 5101 movw r10,r2\r
+ 6411 .LVL598:\r
+ 6412 044a 00C0 rjmp .L305\r
+ 6413 .LVL599:\r
+ 6414 .L309:\r
+ 6415 .LBE42:\r
+ 6416 .LSM539:\r
+ 6417 044c 8AA5 ldd r24,Y+42\r
+ 6418 044e 9BA5 ldd r25,Y+43\r
+ 6419 0450 B601 movw r22,r12\r
+ 6420 0452 A501 movw r20,r10\r
+ 6421 0454 0E94 0000 call get_fat\r
+ 6422 .LVL600:\r
+ 6423 0458 3B01 movw r6,r22\r
+ 6424 045a 4C01 movw r8,r24\r
+ 6425 .LVL601:\r
+ 6426 .LBB43:\r
+ 6427 .LSM540:\r
+ 6428 045c 6115 cp r22,__zero_reg__\r
+ 6429 045e 7105 cpc r23,__zero_reg__\r
+ 6430 0460 8105 cpc r24,__zero_reg__\r
+ 6431 0462 9105 cpc r25,__zero_reg__\r
+ 6432 0464 01F4 brne .+2\r
+ 6433 0466 00C0 rjmp .L306\r
+ 6434 .LVL602:\r
+ 6435 .LSM541:\r
+ 6436 0468 6130 cpi r22,lo8(1)\r
+ 6437 046a 7105 cpc r23,__zero_reg__\r
+ 6438 046c 8105 cpc r24,__zero_reg__\r
+ 6439 046e 9105 cpc r25,__zero_reg__\r
+ 6440 0470 01F4 brne .+2\r
+ 6441 0472 00C0 rjmp .L304\r
+ 6442 .LSM542:\r
+ 6443 0474 6F3F cpi r22,lo8(-1)\r
+ 6444 0476 2FEF ldi r18,hi8(-1)\r
+ 6445 0478 7207 cpc r23,r18\r
+ 6446 047a 2FEF ldi r18,hlo8(-1)\r
+ 6447 047c 8207 cpc r24,r18\r
+ 6448 047e 2FEF ldi r18,hhi8(-1)\r
+ 6449 0480 9207 cpc r25,r18\r
+ 6450 0482 01F4 brne .L307\r
+ 6451 0484 21E0 ldi r18,lo8(1)\r
+ 6452 .LVL603:\r
+ 6453 0486 00C0 rjmp .L262\r
+ 6454 .LVL604:\r
+ 6455 .L307:\r
+ 6456 .LBE43:\r
+ 6457 .LSM543:\r
+ 6458 0488 8AA5 ldd r24,Y+42\r
+ 6459 048a 9BA5 ldd r25,Y+43\r
+ 6460 048c B601 movw r22,r12\r
+ 6461 048e A501 movw r20,r10\r
+ 6462 0490 00E0 ldi r16,lo8(0)\r
+ 6463 0492 10E0 ldi r17,hi8(0)\r
+ 6464 0494 20E0 ldi r18,hlo8(0)\r
+ 6465 0496 30E0 ldi r19,hhi8(0)\r
+ 6466 .LVL605:\r
+ 6467 0498 0E94 0000 call put_fat\r
+ 6468 .LVL606:\r
+ 6469 049c 282F mov r18,r24\r
+ 6470 .LVL607:\r
+ 6471 .LBB44:\r
+ 6472 .LSM544:\r
+ 6473 049e 8823 tst r24\r
+ 6474 04a0 01F0 breq .+2\r
+ 6475 04a2 00C0 rjmp .L262\r
+ 6476 .LVL608:\r
+ 6477 .LSM545:\r
+ 6478 04a4 EAA5 ldd r30,Y+42\r
+ 6479 04a6 FBA5 ldd r31,Y+43\r
+ 6480 04a8 8685 ldd r24,Z+14\r
+ 6481 04aa 9785 ldd r25,Z+15\r
+ 6482 04ac A089 ldd r26,Z+16\r
+ 6483 04ae B189 ldd r27,Z+17\r
+ 6484 .LVL609:\r
+ 6485 04b0 8F3F cpi r24,lo8(-1)\r
+ 6486 04b2 FFEF ldi r31,hi8(-1)\r
+ 6487 04b4 9F07 cpc r25,r31\r
+ 6488 04b6 FFEF ldi r31,hlo8(-1)\r
+ 6489 04b8 AF07 cpc r26,r31\r
+ 6490 04ba FFEF ldi r31,hhi8(-1)\r
+ 6491 04bc BF07 cpc r27,r31\r
+ 6492 04be 01F0 breq .L308\r
+ 6493 .LSM546:\r
+ 6494 04c0 0196 adiw r24,1\r
+ 6495 04c2 A11D adc r26,__zero_reg__\r
+ 6496 04c4 B11D adc r27,__zero_reg__\r
+ 6497 04c6 EAA5 ldd r30,Y+42\r
+ 6498 04c8 FBA5 ldd r31,Y+43\r
+ 6499 04ca 8687 std Z+14,r24\r
+ 6500 04cc 9787 std Z+15,r25\r
+ 6501 04ce A08B std Z+16,r26\r
+ 6502 04d0 B18B std Z+17,r27\r
+ 6503 .LSM547:\r
+ 6504 04d2 21E0 ldi r18,lo8(1)\r
+ 6505 .LVL610:\r
+ 6506 04d4 2583 std Z+5,r18\r
+ 6507 .LVL611:\r
+ 6508 .L308:\r
+ 6509 04d6 6401 movw r12,r8\r
+ 6510 04d8 5301 movw r10,r6\r
+ 6511 .LVL612:\r
+ 6512 .L305:\r
+ 6513 .LSM548:\r
+ 6514 04da EAA5 ldd r30,Y+42\r
+ 6515 04dc FBA5 ldd r31,Y+43\r
+ 6516 04de 828D ldd r24,Z+26\r
+ 6517 04e0 938D ldd r25,Z+27\r
+ 6518 04e2 A48D ldd r26,Z+28\r
+ 6519 04e4 B58D ldd r27,Z+29\r
+ 6520 04e6 A816 cp r10,r24\r
+ 6521 04e8 B906 cpc r11,r25\r
+ 6522 04ea CA06 cpc r12,r26\r
+ 6523 04ec DB06 cpc r13,r27\r
+ 6524 04ee 00F4 brsh .+2\r
+ 6525 04f0 00C0 rjmp .L309\r
+ 6526 04f2 00C0 rjmp .L306\r
+ 6527 .LVL613:\r
+ 6528 .L304:\r
+ 6529 04f4 22E0 ldi r18,lo8(2)\r
+ 6530 .LVL614:\r
+ 6531 04f6 00C0 rjmp .L262\r
+ 6532 .LVL615:\r
+ 6533 .L303:\r
+ 6534 .LBE44:\r
+ 6535 .LBE41:\r
+ 6536 .LSM549:\r
+ 6537 04f8 8D85 ldd r24,Y+13\r
+ 6538 04fa 9E85 ldd r25,Y+14\r
+ 6539 04fc 4EA1 ldd r20,Y+38\r
+ 6540 04fe 5FA1 ldd r21,Y+39\r
+ 6541 0500 68A5 ldd r22,Y+40\r
+ 6542 0502 79A5 ldd r23,Y+41\r
+ 6543 0504 0E94 0000 call move_window\r
+ 6544 .LVL616:\r
+ 6545 0508 282F mov r18,r24\r
+ 6546 .LVL617:\r
+ 6547 .LSM550:\r
+ 6548 050a 8823 tst r24\r
+ 6549 050c 01F0 breq .+2\r
+ 6550 050e 00C0 rjmp .L262\r
+ 6551 .LVL618:\r
+ 6552 .L300:\r
+ 6553 .LSM551:\r
+ 6554 0510 FDA1 ldd r31,Y+37\r
+ 6555 0512 F3FF sbrs r31,3\r
+ 6556 0514 00C0 rjmp .L310\r
+ 6557 .LSM552:\r
+ 6558 0516 D701 movw r26,r14\r
+ 6559 .LVL619:\r
+ 6560 0518 1B96 adiw r26,11\r
+ 6561 051a 1C92 st X,__zero_reg__\r
+ 6562 .LSM553:\r
+ 6563 051c 0E94 0000 call get_fattime\r
+ 6564 .LVL620:\r
+ 6565 .LSM554:\r
+ 6566 0520 F701 movw r30,r14\r
+ 6567 0522 6687 std Z+14,r22\r
+ 6568 0524 272F mov r18,r23\r
+ 6569 0526 3327 clr r19\r
+ 6570 0528 2787 std Z+15,r18\r
+ 6571 052a 9C01 movw r18,r24\r
+ 6572 052c 4427 clr r20\r
+ 6573 052e 5527 clr r21\r
+ 6574 0530 208B std Z+16,r18\r
+ 6575 0532 692F mov r22,r25\r
+ 6576 0534 7727 clr r23\r
+ 6577 0536 8827 clr r24\r
+ 6578 0538 9927 clr r25\r
+ 6579 053a 618B std Z+17,r22\r
+ 6580 .LSM555:\r
+ 6581 053c ED85 ldd r30,Y+13\r
+ 6582 053e FE85 ldd r31,Y+14\r
+ 6583 0540 81E0 ldi r24,lo8(1)\r
+ 6584 0542 8483 std Z+4,r24\r
+ 6585 .LSM556:\r
+ 6586 0544 FDA1 ldd r31,Y+37\r
+ 6587 0546 F062 ori r31,lo8(32)\r
+ 6588 0548 FDA3 std Y+37,r31\r
+ 6589 .LVL621:\r
+ 6590 054a 00C0 rjmp .L310\r
+ 6591 .LVL622:\r
+ 6592 .L296:\r
+ 6593 .LBE40:\r
+ 6594 .LSM557:\r
+ 6595 054c 2223 tst r18\r
+ 6596 054e 01F0 breq .+2\r
+ 6597 0550 00C0 rjmp .L262\r
+ 6598 .LSM558:\r
+ 6599 0552 EF8C ldd r14,Y+31\r
+ 6600 0554 F8A0 ldd r15,Y+32\r
+ 6601 .LVL623:\r
+ 6602 .LSM559:\r
+ 6603 0556 E114 cp r14,__zero_reg__\r
+ 6604 0558 F104 cpc r15,__zero_reg__\r
+ 6605 055a 01F4 brne .+2\r
+ 6606 055c 00C0 rjmp .L311\r
+ 6607 055e D701 movw r26,r14\r
+ 6608 .LVL624:\r
+ 6609 0560 1B96 adiw r26,11\r
+ 6610 0562 8C91 ld r24,X\r
+ 6611 0564 84FD sbrc r24,4\r
+ 6612 0566 00C0 rjmp .L311\r
+ 6613 .LSM560:\r
+ 6614 0568 41FF sbrs r20,1\r
+ 6615 056a 00C0 rjmp .L310\r
+ 6616 056c 80FD sbrc r24,0\r
+ 6617 056e 00C0 rjmp .L302\r
+ 6618 .LVL625:\r
+ 6619 .L310:\r
+ 6620 .LSM561:\r
+ 6621 0570 ED85 ldd r30,Y+13\r
+ 6622 0572 FE85 ldd r31,Y+14\r
+ 6623 .LVL626:\r
+ 6624 0574 22A5 ldd r18,Z+42\r
+ 6625 0576 33A5 ldd r19,Z+43\r
+ 6626 0578 44A5 ldd r20,Z+44\r
+ 6627 057a 55A5 ldd r21,Z+45\r
+ 6628 .LVL627:\r
+ 6629 057c ACA5 ldd r26,Y+44\r
+ 6630 057e BDA5 ldd r27,Y+45\r
+ 6631 .LVL628:\r
+ 6632 0580 5A96 adiw r26,26\r
+ 6633 0582 2D93 st X+,r18\r
+ 6634 0584 3D93 st X+,r19\r
+ 6635 0586 4D93 st X+,r20\r
+ 6636 0588 5C93 st X,r21\r
+ 6637 058a 5D97 sbiw r26,26+3\r
+ 6638 .LSM562:\r
+ 6639 058c 8F8D ldd r24,Y+31\r
+ 6640 058e 98A1 ldd r25,Y+32\r
+ 6641 .LVL629:\r
+ 6642 0590 5F96 adiw r26,30+1\r
+ 6643 0592 9C93 st X,r25\r
+ 6644 0594 8E93 st -X,r24\r
+ 6645 0596 5E97 sbiw r26,30\r
+ 6646 .LSM563:\r
+ 6647 0598 2DA1 ldd r18,Y+37\r
+ 6648 059a 1496 adiw r26,4\r
+ 6649 059c 2C93 st X,r18\r
+ 6650 .LSM564:\r
+ 6651 059e D701 movw r26,r14\r
+ 6652 05a0 5596 adiw r26,21\r
+ 6653 05a2 3C91 ld r19,X\r
+ 6654 05a4 5597 sbiw r26,21\r
+ 6655 .LVL630:\r
+ 6656 05a6 20E0 ldi r18,lo8(0)\r
+ 6657 05a8 5496 adiw r26,20\r
+ 6658 05aa 8C91 ld r24,X\r
+ 6659 05ac 5497 sbiw r26,20\r
+ 6660 05ae 90E0 ldi r25,lo8(0)\r
+ 6661 05b0 282B or r18,r24\r
+ 6662 05b2 392B or r19,r25\r
+ 6663 05b4 40E0 ldi r20,lo8(0)\r
+ 6664 05b6 50E0 ldi r21,hi8(0)\r
+ 6665 05b8 A901 movw r20,r18\r
+ 6666 05ba 3327 clr r19\r
+ 6667 05bc 2227 clr r18\r
+ 6668 05be 5B96 adiw r26,27\r
+ 6669 05c0 9C91 ld r25,X\r
+ 6670 05c2 5B97 sbiw r26,27\r
+ 6671 05c4 80E0 ldi r24,lo8(0)\r
+ 6672 05c6 5A96 adiw r26,26\r
+ 6673 05c8 6C91 ld r22,X\r
+ 6674 .LVL631:\r
+ 6675 05ca 70E0 ldi r23,lo8(0)\r
+ 6676 05cc 862B or r24,r22\r
+ 6677 05ce 972B or r25,r23\r
+ 6678 05d0 A0E0 ldi r26,lo8(0)\r
+ 6679 05d2 B0E0 ldi r27,hi8(0)\r
+ 6680 05d4 282B or r18,r24\r
+ 6681 05d6 392B or r19,r25\r
+ 6682 05d8 4A2B or r20,r26\r
+ 6683 05da 5B2B or r21,r27\r
+ 6684 05dc ACA5 ldd r26,Y+44\r
+ 6685 05de BDA5 ldd r27,Y+45\r
+ 6686 05e0 1E96 adiw r26,14\r
+ 6687 05e2 2D93 st X+,r18\r
+ 6688 05e4 3D93 st X+,r19\r
+ 6689 05e6 4D93 st X+,r20\r
+ 6690 05e8 5C93 st X,r21\r
+ 6691 05ea 5197 sbiw r26,14+3\r
+ 6692 .LSM565:\r
+ 6693 05ec D701 movw r26,r14\r
+ 6694 05ee 5F96 adiw r26,31\r
+ 6695 05f0 2C91 ld r18,X\r
+ 6696 05f2 5F97 sbiw r26,31\r
+ 6697 05f4 30E0 ldi r19,lo8(0)\r
+ 6698 05f6 40E0 ldi r20,lo8(0)\r
+ 6699 05f8 50E0 ldi r21,hi8(0)\r
+ 6700 05fa 522F mov r21,r18\r
+ 6701 05fc 4427 clr r20\r
+ 6702 05fe 3327 clr r19\r
+ 6703 0600 2227 clr r18\r
+ 6704 .LVL632:\r
+ 6705 0602 5E96 adiw r26,30\r
+ 6706 0604 8C91 ld r24,X\r
+ 6707 0606 90E0 ldi r25,lo8(0)\r
+ 6708 0608 A0E0 ldi r26,lo8(0)\r
+ 6709 060a B0E0 ldi r27,hi8(0)\r
+ 6710 060c DC01 movw r26,r24\r
+ 6711 060e 9927 clr r25\r
+ 6712 0610 8827 clr r24\r
+ 6713 0612 282B or r18,r24\r
+ 6714 0614 392B or r19,r25\r
+ 6715 0616 4A2B or r20,r26\r
+ 6716 0618 5B2B or r21,r27\r
+ 6717 061a D701 movw r26,r14\r
+ 6718 061c 5C96 adiw r26,28\r
+ 6719 061e 8C91 ld r24,X\r
+ 6720 0620 90E0 ldi r25,lo8(0)\r
+ 6721 0622 A0E0 ldi r26,lo8(0)\r
+ 6722 0624 B0E0 ldi r27,hi8(0)\r
+ 6723 0626 282B or r18,r24\r
+ 6724 0628 392B or r19,r25\r
+ 6725 062a 4A2B or r20,r26\r
+ 6726 062c 5B2B or r21,r27\r
+ 6727 062e D701 movw r26,r14\r
+ 6728 0630 5D96 adiw r26,29\r
+ 6729 0632 9C91 ld r25,X\r
+ 6730 0634 80E0 ldi r24,lo8(0)\r
+ 6731 0636 A0E0 ldi r26,lo8(0)\r
+ 6732 0638 B0E0 ldi r27,hi8(0)\r
+ 6733 063a 282B or r18,r24\r
+ 6734 063c 392B or r19,r25\r
+ 6735 063e 4A2B or r20,r26\r
+ 6736 0640 5B2B or r21,r27\r
+ 6737 0642 ACA5 ldd r26,Y+44\r
+ 6738 0644 BDA5 ldd r27,Y+45\r
+ 6739 0646 1A96 adiw r26,10\r
+ 6740 0648 2D93 st X+,r18\r
+ 6741 064a 3D93 st X+,r19\r
+ 6742 064c 4D93 st X+,r20\r
+ 6743 064e 5C93 st X,r21\r
+ 6744 0650 1D97 sbiw r26,10+3\r
+ 6745 .LSM566:\r
+ 6746 0652 1696 adiw r26,6\r
+ 6747 0654 1D92 st X+,__zero_reg__\r
+ 6748 0656 1D92 st X+,__zero_reg__\r
+ 6749 0658 1D92 st X+,__zero_reg__\r
+ 6750 065a 1C92 st X,__zero_reg__\r
+ 6751 065c 1997 sbiw r26,6+3\r
+ 6752 065e 8FEF ldi r24,lo8(-1)\r
+ 6753 0660 1596 adiw r26,5\r
+ 6754 0662 8C93 st X,r24\r
+ 6755 .LSM567:\r
+ 6756 0664 ACA5 ldd r26,Y+44\r
+ 6757 0666 BDA5 ldd r27,Y+45\r
+ 6758 0668 5696 adiw r26,22\r
+ 6759 066a 1D92 st X+,__zero_reg__\r
+ 6760 066c 1D92 st X+,__zero_reg__\r
+ 6761 066e 1D92 st X+,__zero_reg__\r
+ 6762 0670 1C92 st X,__zero_reg__\r
+ 6763 0672 5997 sbiw r26,22+3\r
+ 6764 .LSM568:\r
+ 6765 0674 1196 adiw r26,1\r
+ 6766 0676 FC93 st X,r31\r
+ 6767 0678 EE93 st -X,r30\r
+ 6768 067a 8681 ldd r24,Z+6\r
+ 6769 067c 9781 ldd r25,Z+7\r
+ 6770 067e 1396 adiw r26,2+1\r
+ 6771 0680 9C93 st X,r25\r
+ 6772 0682 8E93 st -X,r24\r
+ 6773 0684 1297 sbiw r26,2\r
+ 6774 0686 20E0 ldi r18,lo8(0)\r
+ 6775 .LVL633:\r
+ 6776 0688 00C0 rjmp .L262\r
+ 6777 .LVL634:\r
+ 6778 .L302:\r
+ 6779 .LSM569:\r
+ 6780 068a 27E0 ldi r18,lo8(7)\r
+ 6781 068c 00C0 rjmp .L262\r
+ 6782 .L311:\r
+ 6783 068e 24E0 ldi r18,lo8(4)\r
+ 6784 .LVL635:\r
+ 6785 .L262:\r
+ 6786 .LSM570:\r
+ 6787 0690 822F mov r24,r18\r
+ 6788 /* epilogue start */\r
+ 6789 0692 AD96 adiw r28,45\r
+ 6790 0694 0FB6 in __tmp_reg__,__SREG__\r
+ 6791 0696 F894 cli\r
+ 6792 0698 DEBF out __SP_H__,r29\r
+ 6793 069a 0FBE out __SREG__,__tmp_reg__\r
+ 6794 069c CDBF out __SP_L__,r28\r
+ 6795 069e CF91 pop r28\r
+ 6796 06a0 DF91 pop r29\r
+ 6797 06a2 1F91 pop r17\r
+ 6798 06a4 0F91 pop r16\r
+ 6799 .LVL636:\r
+ 6800 06a6 FF90 pop r15\r
+ 6801 06a8 EF90 pop r14\r
+ 6802 .LVL637:\r
+ 6803 06aa DF90 pop r13\r
+ 6804 06ac CF90 pop r12\r
+ 6805 .LVL638:\r
+ 6806 06ae BF90 pop r11\r
+ 6807 06b0 AF90 pop r10\r
+ 6808 .LVL639:\r
+ 6809 06b2 9F90 pop r9\r
+ 6810 06b4 8F90 pop r8\r
+ 6811 06b6 7F90 pop r7\r
+ 6812 06b8 6F90 pop r6\r
+ 6813 06ba 5F90 pop r5\r
+ 6814 06bc 4F90 pop r4\r
+ 6815 06be 3F90 pop r3\r
+ 6816 06c0 2F90 pop r2\r
+ 6817 .LVL640:\r
+ 6818 06c2 0895 ret\r
+ 6819 .LVL641:\r
+ 6820 .L298:\r
+ 6821 .LBB51:\r
+ 6822 .LBB50:\r
+ 6823 .LSM571:\r
+ 6824 06c4 4B8D ldd r20,Y+27\r
+ 6825 06c6 5C8D ldd r21,Y+28\r
+ 6826 06c8 6D8D ldd r22,Y+29\r
+ 6827 06ca 7E8D ldd r23,Y+30\r
+ 6828 06cc 8D85 ldd r24,Y+13\r
+ 6829 06ce 9E85 ldd r25,Y+14\r
+ 6830 .LVL642:\r
+ 6831 06d0 0E94 0000 call move_window\r
+ 6832 .LVL643:\r
+ 6833 06d4 282F mov r18,r24\r
+ 6834 .LVL644:\r
+ 6835 .LBB49:\r
+ 6836 .LSM572:\r
+ 6837 06d6 8823 tst r24\r
+ 6838 06d8 01F4 brne .L262\r
+ 6839 .LVL645:\r
+ 6840 06da 00C0 rjmp .L323\r
+ 6841 .LVL646:\r
+ 6842 .L306:\r
+ 6843 .LBE49:\r
+ 6844 .LBE50:\r
+ 6845 .LSM573:\r
+ 6846 06dc ED85 ldd r30,Y+13\r
+ 6847 06de FE85 ldd r31,Y+14\r
+ 6848 06e0 0894 sec\r
+ 6849 06e2 2108 sbc r2,__zero_reg__\r
+ 6850 06e4 3108 sbc r3,__zero_reg__\r
+ 6851 06e6 4108 sbc r4,__zero_reg__\r
+ 6852 06e8 5108 sbc r5,__zero_reg__\r
+ 6853 .LVL647:\r
+ 6854 06ea 2286 std Z+10,r2\r
+ 6855 06ec 3386 std Z+11,r3\r
+ 6856 06ee 4486 std Z+12,r4\r
+ 6857 06f0 5586 std Z+13,r5\r
+ 6858 06f2 00C0 rjmp .L303\r
+ 6859 .LVL648:\r
+ 6860 .L270:\r
+ 6861 06f4 9A2F mov r25,r26\r
+ 6862 06f6 60E0 ldi r22,lo8(0)\r
+ 6863 .LVL649:\r
+ 6864 06f8 00C0 rjmp .L313\r
+ 6865 .LBE51:\r
+ 6866 .LFE73:\r
+ 6868 .lcomm FatFs,2\r
+ 6869 .lcomm Fsid,2\r
+ 7070 .Letext0:\r
+DEFINED SYMBOLS\r
+ *ABS*:00000000 ff.c\r
+C:\Users\Dean\AppData\Local\Temp/ccGlxtj5.s:2 *ABS*:0000003f __SREG__\r
+C:\Users\Dean\AppData\Local\Temp/ccGlxtj5.s:3 *ABS*:0000003e __SP_H__\r
+C:\Users\Dean\AppData\Local\Temp/ccGlxtj5.s:4 *ABS*:0000003d __SP_L__\r
+C:\Users\Dean\AppData\Local\Temp/ccGlxtj5.s:5 *ABS*:00000034 __CCP__\r
+C:\Users\Dean\AppData\Local\Temp/ccGlxtj5.s:6 *ABS*:00000000 __tmp_reg__\r
+C:\Users\Dean\AppData\Local\Temp/ccGlxtj5.s:7 *ABS*:00000001 __zero_reg__\r
+C:\Users\Dean\AppData\Local\Temp/ccGlxtj5.s:18 .text.mem_cpy:00000000 mem_cpy\r
+C:\Users\Dean\AppData\Local\Temp/ccGlxtj5.s:62 .text.mem_set:00000000 mem_set\r
+C:\Users\Dean\AppData\Local\Temp/ccGlxtj5.s:93 .text.clust2sect:00000000 clust2sect\r
+C:\Users\Dean\AppData\Local\Temp/ccGlxtj5.s:175 .text.f_mount:00000000 f_mount\r
+ .bss:00000000 FatFs\r
+C:\Users\Dean\AppData\Local\Temp/ccGlxtj5.s:218 .text.validate:00000000 validate\r
+C:\Users\Dean\AppData\Local\Temp/ccGlxtj5.s:257 .text.move_window:00000000 move_window\r
+C:\Users\Dean\AppData\Local\Temp/ccGlxtj5.s:420 .text.put_fat:00000000 put_fat\r
+C:\Users\Dean\AppData\Local\Temp/ccGlxtj5.s:740 .text.get_fat:00000000 get_fat\r
+C:\Users\Dean\AppData\Local\Temp/ccGlxtj5.s:1027 .text.create_chain:00000000 create_chain\r
+C:\Users\Dean\AppData\Local\Temp/ccGlxtj5.s:1350 .text.f_lseek:00000000 f_lseek\r
+C:\Users\Dean\AppData\Local\Temp/ccGlxtj5.s:1924 .text.dir_seek:00000000 dir_seek\r
+C:\Users\Dean\AppData\Local\Temp/ccGlxtj5.s:2173 .text.f_write:00000000 f_write\r
+C:\Users\Dean\AppData\Local\Temp/ccGlxtj5.s:2744 .text.f_putc:00000000 f_putc\r
+C:\Users\Dean\AppData\Local\Temp/ccGlxtj5.s:2807 .text.f_puts:00000000 f_puts\r
+C:\Users\Dean\AppData\Local\Temp/ccGlxtj5.s:2868 .text.f_printf:00000000 f_printf\r
+C:\Users\Dean\AppData\Local\Temp/ccGlxtj5.s:3356 .text.dir_next:00000000 dir_next\r
+C:\Users\Dean\AppData\Local\Temp/ccGlxtj5.s:3698 .text.f_read:00000000 f_read\r
+C:\Users\Dean\AppData\Local\Temp/ccGlxtj5.s:4143 .text.f_gets:00000000 f_gets\r
+C:\Users\Dean\AppData\Local\Temp/ccGlxtj5.s:4257 .text.check_fs:00000000 check_fs\r
+C:\Users\Dean\AppData\Local\Temp/ccGlxtj5.s:4412 .text.f_sync:00000000 f_sync\r
+C:\Users\Dean\AppData\Local\Temp/ccGlxtj5.s:4723 .text.f_close:00000000 f_close\r
+C:\Users\Dean\AppData\Local\Temp/ccGlxtj5.s:4754 .text.chk_mounted:00000000 chk_mounted\r
+C:\Users\Dean\AppData\Local\Temp/ccGlxtj5.s:6868 .bss:00000002 Fsid\r
+C:\Users\Dean\AppData\Local\Temp/ccGlxtj5.s:5604 .text.f_open:00000000 f_open\r
+\r
+UNDEFINED SYMBOLS\r
+__mulsi3\r
+disk_status\r
+disk_write\r
+disk_read\r
+__udivmodsi4\r
+get_fattime\r
+disk_ioctl\r
+disk_initialize\r
+__do_copy_data\r
+__do_clear_bss\r
--- /dev/null
+/*---------------------------------------------------------------------------/\r
+/ FatFs - FAT file system module configuration file R0.07e (C)ChaN, 2009\r
+/----------------------------------------------------------------------------/\r
+/\r
+/ CAUTION! Do not forget to make clean the project after any changes to\r
+/ the configuration options.\r
+/\r
+/----------------------------------------------------------------------------*/\r
+#ifndef _FFCONFIG\r
+#define _FFCONFIG 0x007E\r
+\r
+\r
+/*---------------------------------------------------------------------------/\r
+/ Function and Buffer Configurations\r
+/----------------------------------------------------------------------------*/\r
+\r
+#define _FS_TINY 1 /* 0 or 1 */\r
+/* When _FS_TINY is set to 1, FatFs uses the sector buffer in the file system\r
+/ object instead of the sector buffer in the individual file object for file\r
+/ data transfer. This reduces memory consumption 512 bytes each file object. */\r
+\r
+\r
+#define _FS_READONLY 0 /* 0 or 1 */\r
+/* Setting _FS_READONLY to 1 defines read only configuration. This removes\r
+/ writing functions, f_write, f_sync, f_unlink, f_mkdir, f_chmod, f_rename,\r
+/ f_truncate and useless f_getfree. */\r
+\r
+\r
+#define _FS_MINIMIZE 2 /* 0, 1, 2 or 3 */\r
+/* The _FS_MINIMIZE option defines minimization level to remove some functions.\r
+/\r
+/ 0: Full function.\r
+/ 1: f_stat, f_getfree, f_unlink, f_mkdir, f_chmod, f_truncate and f_rename\r
+/ are removed.\r
+/ 2: f_opendir and f_readdir are removed in addition to level 1.\r
+/ 3: f_lseek is removed in addition to level 2. */\r
+\r
+\r
+#define _USE_STRFUNC 1 /* 0, 1 or 2 */\r
+/* To enable string functions, set _USE_STRFUNC to 1 or 2. */\r
+\r
+\r
+#define _USE_MKFS 0 /* 0 or 1 */\r
+/* To enable f_mkfs function, set _USE_MKFS to 1 and set _FS_READONLY to 0 */\r
+\r
+\r
+#define _USE_FORWARD 0 /* 0 or 1 */\r
+/* To enable f_forward function, set _USE_FORWARD to 1 and set _FS_TINY to 1. */\r
+\r
+\r
+\r
+/*---------------------------------------------------------------------------/\r
+/ Locale and Namespace Configurations\r
+/----------------------------------------------------------------------------*/\r
+\r
+#define _CODE_PAGE 932\r
+/* The _CODE_PAGE specifies the OEM code page to be used on the target system.\r
+/ Incorrect setting of the code page can cause a file open failure.\r
+/\r
+/ 932 - Japanese Shift-JIS (DBCS, OEM, Windows)\r
+/ 936 - Simplified Chinese GBK (DBCS, OEM, Windows)\r
+/ 949 - Korean (DBCS, OEM, Windows)\r
+/ 950 - Traditional Chinese Big5 (DBCS, OEM, Windows)\r
+/ 1250 - Central Europe (Windows)\r
+/ 1251 - Cyrillic (Windows)\r
+/ 1252 - Latin 1 (Windows)\r
+/ 1253 - Greek (Windows)\r
+/ 1254 - Turkish (Windows)\r
+/ 1255 - Hebrew (Windows)\r
+/ 1256 - Arabic (Windows)\r
+/ 1257 - Baltic (Windows)\r
+/ 1258 - Vietnam (OEM, Windows)\r
+/ 437 - U.S. (OEM)\r
+/ 720 - Arabic (OEM)\r
+/ 737 - Greek (OEM)\r
+/ 775 - Baltic (OEM)\r
+/ 850 - Multilingual Latin 1 (OEM)\r
+/ 858 - Multilingual Latin 1 + Euro (OEM)\r
+/ 852 - Latin 2 (OEM)\r
+/ 855 - Cyrillic (OEM)\r
+/ 866 - Russian (OEM)\r
+/ 857 - Turkish (OEM)\r
+/ 862 - Hebrew (OEM)\r
+/ 874 - Thai (OEM, Windows)\r
+/ 1 - ASCII only (Valid for non LFN cfg.)\r
+*/\r
+\r
+\r
+#define _USE_LFN 0 /* 0, 1 or 2 */\r
+#define _MAX_LFN 255 /* Maximum LFN length to handle (12 to 255) */\r
+/* The _USE_LFN option switches the LFN support.\r
+/\r
+/ 0: Disable LFN. _MAX_LFN and _LFN_UNICODE have no effect.\r
+/ 1: Enable LFN with static working buffer on the bss. NOT REENTRANT.\r
+/ 2: Enable LFN with dynamic working buffer on the STACK.\r
+/\r
+/ The LFN working buffer occupies (_MAX_LFN + 1) * 2 bytes. When enable LFN,\r
+/ two Unicode handling functions ff_convert() and ff_wtoupper() must be added\r
+/ to the project. */\r
+\r
+\r
+#define _LFN_UNICODE 0 /* 0 or 1 */\r
+/* To switch the character code set on FatFs API to Unicode,\r
+/ enable LFN feature and set _LFN_UNICODE to 1.\r
+*/\r
+\r
+\r
+#define _FS_RPATH 0 /* 0 or 1 */\r
+/* When _FS_RPATH is set to 1, relative path feature is enabled and f_chdir,\r
+/ f_chdrive function are available.\r
+/ Note that output of the f_readdir fnction is affected by this option. */\r
+\r
+\r
+\r
+/*---------------------------------------------------------------------------/\r
+/ Physical Drive Configurations\r
+/----------------------------------------------------------------------------*/\r
+\r
+#define _DRIVES 1\r
+/* Number of volumes (logical drives) to be used. */\r
+\r
+\r
+#define _MAX_SS 512 /* 512, 1024, 2048 or 4096 */\r
+/* Maximum sector size to be handled.\r
+/ Always set 512 for memory card and hard disk but a larger value may be\r
+/ required for floppy disk (512/1024) and optical disk (512/2048).\r
+/ When _MAX_SS is larger than 512, GET_SECTOR_SIZE command must be implememted\r
+/ to the disk_ioctl function. */\r
+\r
+\r
+#define _MULTI_PARTITION 0 /* 0 or 1 */\r
+/* When _MULTI_PARTITION is set to 0, each volume is bound to the same physical\r
+/ drive number and can mount only first primaly partition. When it is set to 1,\r
+/ each volume is tied to the partitions listed in Drives[]. */\r
+\r
+\r
+\r
+/*---------------------------------------------------------------------------/\r
+/ System Configurations\r
+/----------------------------------------------------------------------------*/\r
+\r
+#define _WORD_ACCESS 0 /* 0 or 1 */\r
+/* The _WORD_ACCESS option defines which access method is used to the word\r
+/ data on the FAT volume.\r
+/\r
+/ 0: Byte-by-byte access. Always compatible with all platforms.\r
+/ 1: Word access. Do not choose this unless following condition is met.\r
+/\r
+/ When the byte order on the memory is big-endian or address miss-aligned\r
+/ word access results incorrect behavior, the _WORD_ACCESS must be set to 0.\r
+/ If it is not the case, the value can also be set to 1 to improve the\r
+/ performance and code size. */\r
+\r
+\r
+#define _FS_REENTRANT 0 /* 0 or 1 */\r
+#define _FS_TIMEOUT 1000 /* Timeout period in unit of time ticks */\r
+#define _SYNC_t HANDLE /* O/S dependent type of sync object. e.g. HANDLE, OS_EVENT*, ID and etc.. */\r
+/* The _FS_REENTRANT option switches the reentrancy of the FatFs module.\r
+/\r
+/ 0: Disable reentrancy. _SYNC_t and _FS_TIMEOUT have no effect.\r
+/ 1: Enable reentrancy. Also user provided synchronization handlers,\r
+/ ff_req_grant, ff_rel_grant, ff_del_syncobj and ff_cre_syncobj\r
+/ function must be added to the project. */\r
+\r
+\r
+#endif /* _FFCONFIG */\r
--- /dev/null
+/*-------------------------------------------*/\r
+/* Integer type definitions for FatFs module */\r
+/*-------------------------------------------*/\r
+\r
+#ifndef _INTEGER\r
+\r
+#if 0\r
+#include <windows.h>\r
+#else\r
+\r
+/* These types must be 16-bit, 32-bit or larger integer */\r
+typedef int INT;\r
+typedef unsigned int UINT;\r
+\r
+/* These types must be 8-bit integer */\r
+typedef signed char CHAR;\r
+typedef unsigned char UCHAR;\r
+typedef unsigned char BYTE;\r
+\r
+/* These types must be 16-bit integer */\r
+typedef short SHORT;\r
+typedef unsigned short USHORT;\r
+typedef unsigned short WORD;\r
+typedef unsigned short WCHAR;\r
+\r
+/* These types must be 32-bit integer */\r
+typedef long LONG;\r
+typedef unsigned long ULONG;\r
+typedef unsigned long DWORD;\r
+\r
+/* Boolean type */\r
+typedef enum { FALSE = 0, TRUE } BOOL;\r
+\r
+#endif\r
+\r
+#define _INTEGER\r
+#endif\r
--- /dev/null
+/*\r
+ LUFA Library\r
+ Copyright (C) Dean Camera, 2009.\r
+ \r
+ dean [at] fourwalledcubicle [dot] com\r
+ www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+ Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+ Permission to use, copy, modify, distribute, and sell this \r
+ software and its documentation for any purpose is hereby granted\r
+ without fee, provided that the above copyright notice appear in \r
+ all copies and that both that the copyright notice and this\r
+ permission notice and warranty disclaimer appear in supporting \r
+ documentation, and that the name of the author not be used in \r
+ advertising or publicity pertaining to distribution of the \r
+ software without specific, written prior permission.\r
+\r
+ The author disclaim all warranties with regard to this\r
+ software, including all implied warranties of merchantability\r
+ and fitness. In no event shall the author be liable for any\r
+ special, indirect or consequential damages or any damages\r
+ whatsoever resulting from loss of use, data or profits, whether\r
+ in an action of contract, negligence or other tortious action,\r
+ arising out of or in connection with the use or performance of\r
+ this software.\r
+*/\r
+\r
+/** \file\r
+ *\r
+ * SCSI command processing routines, for SCSI commands issued by the host. Mass Storage\r
+ * devices use a thin "Bulk-Only Transport" protocol for issuing commands and status information,\r
+ * which wrap around standard SCSI device commands for controlling the actual storage medium.\r
+ */\r
+ \r
+#define INCLUDE_FROM_SCSI_C\r
+#include "SCSI.h"\r
+\r
+/** Structure to hold the SCSI response data to a SCSI INQUIRY command. This gives information about the device's\r
+ * features and capabilities.\r
+ */\r
+SCSI_Inquiry_Response_t InquiryData = \r
+ {\r
+ .DeviceType = DEVICE_TYPE_BLOCK,\r
+ .PeripheralQualifier = 0,\r
+ \r
+ .Removable = true,\r
+ \r
+ .Version = 0,\r
+ \r
+ .ResponseDataFormat = 2,\r
+ .NormACA = false,\r
+ .TrmTsk = false,\r
+ .AERC = false,\r
+\r
+ .AdditionalLength = 0x1F,\r
+ \r
+ .SoftReset = false,\r
+ .CmdQue = false,\r
+ .Linked = false,\r
+ .Sync = false,\r
+ .WideBus16Bit = false,\r
+ .WideBus32Bit = false,\r
+ .RelAddr = false,\r
+ \r
+ .VendorID = "LUFA",\r
+ .ProductID = "Dataflash Disk",\r
+ .RevisionID = {'0','.','0','0'},\r
+ };\r
+\r
+/** Structure to hold the sense data for the last issued SCSI command, which is returned to the host after a SCSI REQUEST SENSE\r
+ * command is issued. This gives information on exactly why the last command failed to complete.\r
+ */\r
+SCSI_Request_Sense_Response_t SenseData =\r
+ {\r
+ .ResponseCode = 0x70,\r
+ .AdditionalLength = 0x0A,\r
+ };\r
+\r
+\r
+/** Main routine to process the SCSI command located in the Command Block Wrapper read from the host. This dispatches\r
+ * to the appropriate SCSI command handling routine if the issued command is supported by the device, else it returns\r
+ * a command failure due to a ILLEGAL REQUEST.\r
+ *\r
+ * \param[in] MSInterfaceInfo Pointer to the Mass Storage class interface structure that the command is associated with\r
+ */\r
+bool SCSI_DecodeSCSICommand(USB_ClassInfo_MS_Device_t* MSInterfaceInfo)\r
+{\r
+ /* Set initial sense data, before the requested command is processed */\r
+ SCSI_SET_SENSE(SCSI_SENSE_KEY_GOOD,\r
+ SCSI_ASENSE_NO_ADDITIONAL_INFORMATION,\r
+ SCSI_ASENSEQ_NO_QUALIFIER);\r
+ \r
+ /* Run the appropriate SCSI command hander function based on the passed command */\r
+ switch (MSInterfaceInfo->State.CommandBlock.SCSICommandData[0])\r
+ {\r
+ case SCSI_CMD_INQUIRY:\r
+ SCSI_Command_Inquiry(MSInterfaceInfo); \r
+ break;\r
+ case SCSI_CMD_REQUEST_SENSE:\r
+ SCSI_Command_Request_Sense(MSInterfaceInfo);\r
+ break;\r
+ case SCSI_CMD_READ_CAPACITY_10:\r
+ SCSI_Command_Read_Capacity_10(MSInterfaceInfo); \r
+ break;\r
+ case SCSI_CMD_SEND_DIAGNOSTIC:\r
+ SCSI_Command_Send_Diagnostic(MSInterfaceInfo);\r
+ break;\r
+ case SCSI_CMD_WRITE_10:\r
+ SCSI_Command_ReadWrite_10(MSInterfaceInfo, DATA_WRITE);\r
+ break;\r
+ case SCSI_CMD_READ_10:\r
+ SCSI_Command_ReadWrite_10(MSInterfaceInfo, DATA_READ);\r
+ break;\r
+ case SCSI_CMD_TEST_UNIT_READY:\r
+ case SCSI_CMD_PREVENT_ALLOW_MEDIUM_REMOVAL:\r
+ case SCSI_CMD_VERIFY_10:\r
+ /* These commands should just succeed, no handling required */\r
+ MSInterfaceInfo->State.CommandBlock.DataTransferLength = 0;\r
+ break;\r
+ default:\r
+ /* Update the SENSE key to reflect the invalid command */\r
+ SCSI_SET_SENSE(SCSI_SENSE_KEY_ILLEGAL_REQUEST,\r
+ SCSI_ASENSE_INVALID_COMMAND,\r
+ SCSI_ASENSEQ_NO_QUALIFIER);\r
+ break;\r
+ }\r
+\r
+ return (SenseData.SenseKey == SCSI_SENSE_KEY_GOOD);\r
+}\r
+\r
+/** Command processing for an issued SCSI INQUIRY command. This command returns information about the device's features\r
+ * and capabilities to the host.\r
+ *\r
+ * \param[in] MSInterfaceInfo Pointer to the Mass Storage class interface structure that the command is associated with\r
+ */\r
+static void SCSI_Command_Inquiry(USB_ClassInfo_MS_Device_t* MSInterfaceInfo)\r
+{\r
+ uint16_t AllocationLength = (((uint16_t)MSInterfaceInfo->State.CommandBlock.SCSICommandData[3] << 8) |\r
+ MSInterfaceInfo->State.CommandBlock.SCSICommandData[4]);\r
+ uint16_t BytesTransferred = (AllocationLength < sizeof(InquiryData))? AllocationLength :\r
+ sizeof(InquiryData);\r
+\r
+ /* Only the standard INQUIRY data is supported, check if any optional INQUIRY bits set */\r
+ if ((MSInterfaceInfo->State.CommandBlock.SCSICommandData[1] & ((1 << 0) | (1 << 1))) ||\r
+ MSInterfaceInfo->State.CommandBlock.SCSICommandData[2])\r
+ {\r
+ /* Optional but unsupported bits set - update the SENSE key and fail the request */\r
+ SCSI_SET_SENSE(SCSI_SENSE_KEY_ILLEGAL_REQUEST,\r
+ SCSI_ASENSE_INVALID_FIELD_IN_CDB,\r
+ SCSI_ASENSEQ_NO_QUALIFIER);\r
+\r
+ return;\r
+ }\r
+ \r
+ Endpoint_Write_Stream_LE(&InquiryData, BytesTransferred, NO_STREAM_CALLBACK);\r
+\r
+ uint8_t PadBytes[AllocationLength - BytesTransferred];\r
+ \r
+ /* Pad out remaining bytes with 0x00 */\r
+ Endpoint_Write_Stream_LE(&PadBytes, (AllocationLength - BytesTransferred), NO_STREAM_CALLBACK);\r
+\r
+ /* Finalize the stream transfer to send the last packet */\r
+ Endpoint_ClearIN();\r
+\r
+ /* Succeed the command and update the bytes transferred counter */\r
+ MSInterfaceInfo->State.CommandBlock.DataTransferLength -= BytesTransferred;\r
+}\r
+\r
+/** Command processing for an issued SCSI REQUEST SENSE command. This command returns information about the last issued command,\r
+ * including the error code and additional error information so that the host can determine why a command failed to complete.\r
+ *\r
+ * \param[in] MSInterfaceInfo Pointer to the Mass Storage class interface structure that the command is associated with\r
+ */\r
+static void SCSI_Command_Request_Sense(USB_ClassInfo_MS_Device_t* MSInterfaceInfo)\r
+{\r
+ uint8_t AllocationLength = MSInterfaceInfo->State.CommandBlock.SCSICommandData[4];\r
+ uint8_t BytesTransferred = (AllocationLength < sizeof(SenseData))? AllocationLength : sizeof(SenseData);\r
+ \r
+ uint8_t PadBytes[AllocationLength - BytesTransferred];\r
+\r
+ Endpoint_Write_Stream_LE(&SenseData, BytesTransferred, NO_STREAM_CALLBACK);\r
+ Endpoint_Write_Stream_LE(&PadBytes, (AllocationLength - BytesTransferred), NO_STREAM_CALLBACK);\r
+ Endpoint_ClearIN();\r
+\r
+ /* Succeed the command and update the bytes transferred counter */\r
+ MSInterfaceInfo->State.CommandBlock.DataTransferLength -= BytesTransferred;\r
+}\r
+\r
+/** Command processing for an issued SCSI READ CAPACITY (10) command. This command returns information about the device's capacity\r
+ * on the selected Logical Unit (drive), as a number of OS-sized blocks.\r
+ *\r
+ * \param[in] MSInterfaceInfo Pointer to the Mass Storage class interface structure that the command is associated with\r
+ */\r
+static void SCSI_Command_Read_Capacity_10(USB_ClassInfo_MS_Device_t* MSInterfaceInfo)\r
+{\r
+ uint32_t LastBlockAddressInLUN = (VIRTUAL_MEMORY_BLOCKS - 1);\r
+ uint32_t MediaBlockSize = VIRTUAL_MEMORY_BLOCK_SIZE;\r
+\r
+ Endpoint_Write_Stream_BE(&LastBlockAddressInLUN, sizeof(LastBlockAddressInLUN), NO_STREAM_CALLBACK);\r
+ Endpoint_Write_Stream_BE(&MediaBlockSize, sizeof(MediaBlockSize), NO_STREAM_CALLBACK);\r
+ Endpoint_ClearIN();\r
+ \r
+ /* Succeed the command and update the bytes transferred counter */\r
+ MSInterfaceInfo->State.CommandBlock.DataTransferLength -= 8;\r
+}\r
+\r
+/** Command processing for an issued SCSI SEND DIAGNOSTIC command. This command performs a quick check of the Dataflash ICs on the\r
+ * board, and indicates if they are present and functioning correctly. Only the Self-Test portion of the diagnostic command is\r
+ * supported.\r
+ *\r
+ * \param[in] MSInterfaceInfo Pointer to the Mass Storage class interface structure that the command is associated with\r
+ */\r
+static void SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_Device_t* MSInterfaceInfo)\r
+{\r
+ /* Check to see if the SELF TEST bit is not set */\r
+ if (!(MSInterfaceInfo->State.CommandBlock.SCSICommandData[1] & (1 << 2)))\r
+ {\r
+ /* Only self-test supported - update SENSE key and fail the command */\r
+ SCSI_SET_SENSE(SCSI_SENSE_KEY_ILLEGAL_REQUEST,\r
+ SCSI_ASENSE_INVALID_FIELD_IN_CDB,\r
+ SCSI_ASENSEQ_NO_QUALIFIER);\r
+\r
+ return;\r
+ }\r
+ \r
+ /* Check to see if all attached Dataflash ICs are functional */\r
+ if (!(DataflashManager_CheckDataflashOperation()))\r
+ {\r
+ /* Update SENSE key with a hardware error condition and return command fail */\r
+ SCSI_SET_SENSE(SCSI_SENSE_KEY_HARDWARE_ERROR,\r
+ SCSI_ASENSE_NO_ADDITIONAL_INFORMATION,\r
+ SCSI_ASENSEQ_NO_QUALIFIER); \r
+ \r
+ return;\r
+ }\r
+ \r
+ /* Succeed the command and update the bytes transferred counter */\r
+ MSInterfaceInfo->State.CommandBlock.DataTransferLength = 0;\r
+}\r
+\r
+/** Command processing for an issued SCSI READ (10) or WRITE (10) command. This command reads in the block start address\r
+ * and total number of blocks to process, then calls the appropriate low-level dataflash routine to handle the actual\r
+ * reading and writing of the data.\r
+ *\r
+ * \param[in] MSInterfaceInfo Pointer to the Mass Storage class interface structure that the command is associated with\r
+ * \param[in] IsDataRead Indicates if the command is a READ (10) command or WRITE (10) command (DATA_READ or DATA_WRITE)\r
+ */\r
+static void SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* MSInterfaceInfo, const bool IsDataRead)\r
+{\r
+ uint32_t BlockAddress;\r
+ uint16_t TotalBlocks;\r
+ \r
+ /* Load in the 32-bit block address (SCSI uses big-endian, so have to reverse the byte order) */\r
+ BlockAddress = SwapEndian_32(*(uint32_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[2]);\r
+\r
+ /* Load in the 16-bit total blocks (SCSI uses big-endian, so have to reverse the byte order) */\r
+ TotalBlocks = SwapEndian_16(*(uint32_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[7]);\r
+ \r
+ /* Check if the block address is outside the maximum allowable value for the LUN */\r
+ if (BlockAddress >= VIRTUAL_MEMORY_BLOCKS)\r
+ {\r
+ /* Block address is invalid, update SENSE key and return command fail */\r
+ SCSI_SET_SENSE(SCSI_SENSE_KEY_ILLEGAL_REQUEST,\r
+ SCSI_ASENSE_LOGICAL_BLOCK_ADDRESS_OUT_OF_RANGE,\r
+ SCSI_ASENSEQ_NO_QUALIFIER);\r
+\r
+ return;\r
+ }\r
+ \r
+ /* Determine if the packet is a READ (10) or WRITE (10) command, call appropriate function */\r
+ if (IsDataRead == DATA_READ)\r
+ DataflashManager_ReadBlocks(MSInterfaceInfo, BlockAddress, TotalBlocks);\r
+ else\r
+ DataflashManager_WriteBlocks(MSInterfaceInfo, BlockAddress, TotalBlocks);\r
+\r
+ /* Update the bytes transferred counter and succeed the command */\r
+ MSInterfaceInfo->State.CommandBlock.DataTransferLength -= ((uint32_t)TotalBlocks * VIRTUAL_MEMORY_BLOCK_SIZE);\r
+}\r
--- /dev/null
+/*\r
+ LUFA Library\r
+ Copyright (C) Dean Camera, 2009.\r
+ \r
+ dean [at] fourwalledcubicle [dot] com\r
+ www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+ Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+ Permission to use, copy, modify, distribute, and sell this \r
+ software and its documentation for any purpose is hereby granted\r
+ without fee, provided that the above copyright notice appear in \r
+ all copies and that both that the copyright notice and this\r
+ permission notice and warranty disclaimer appear in supporting \r
+ documentation, and that the name of the author not be used in \r
+ advertising or publicity pertaining to distribution of the \r
+ software without specific, written prior permission.\r
+\r
+ The author disclaim all warranties with regard to this\r
+ software, including all implied warranties of merchantability\r
+ and fitness. In no event shall the author be liable for any\r
+ special, indirect or consequential damages or any damages\r
+ whatsoever resulting from loss of use, data or profits, whether\r
+ in an action of contract, negligence or other tortious action,\r
+ arising out of or in connection with the use or performance of\r
+ this software.\r
+*/\r
+\r
+/** \file\r
+ *\r
+ * Header file for SCSI.c.\r
+ */\r
+ \r
+#ifndef _SCSI_H_\r
+#define _SCSI_H_\r
+\r
+ /* Includes: */\r
+ #include <avr/io.h>\r
+ #include <avr/pgmspace.h>\r
+\r
+ #include <LUFA/Drivers/USB/USB.h>\r
+ #include <LUFA/Drivers/USB/Class/MassStorage.h>\r
+\r
+ #include "../TempDataLogger.h"\r
+ #include "../Descriptors.h"\r
+ #include "DataflashManager.h"\r
+ \r
+ /* Macros: */\r
+ /** Macro to set the current SCSI sense data to the given key, additional sense code and additional sense qualifier. This\r
+ * is for convenience, as it allows for all three sense values (returned upon request to the host to give information about\r
+ * the last command failure) in a quick and easy manner.\r
+ *\r
+ * \param[in] key New SCSI sense key to set the sense code to\r
+ * \param[in] acode New SCSI additional sense key to set the additional sense code to\r
+ * \param[in] aqual New SCSI additional sense key qualifier to set the additional sense qualifier code to\r
+ */\r
+ #define SCSI_SET_SENSE(key, acode, aqual) MACROS{ SenseData.SenseKey = (key); \\r
+ SenseData.AdditionalSenseCode = (acode); \\r
+ SenseData.AdditionalSenseQualifier = (aqual); }MACROE\r
+\r
+ /** Macro for the SCSI_Command_ReadWrite_10() function, to indicate that data is to be read from the storage medium. */\r
+ #define DATA_READ true\r
+\r
+ /** Macro for the SCSI_Command_ReadWrite_10() function, to indicate that data is to be written to the storage medium. */\r
+ #define DATA_WRITE false\r
+\r
+ /** Value for the DeviceType entry in the SCSI_Inquiry_Response_t enum, indicating a Block Media device. */\r
+ #define DEVICE_TYPE_BLOCK 0x00\r
+ \r
+ /** Value for the DeviceType entry in the SCSI_Inquiry_Response_t enum, indicating a CD-ROM device. */\r
+ #define DEVICE_TYPE_CDROM 0x05\r
+ \r
+ /* Function Prototypes: */\r
+ bool SCSI_DecodeSCSICommand(USB_ClassInfo_MS_Device_t* MSInterfaceInfo);\r
+ \r
+ #if defined(INCLUDE_FROM_SCSI_C)\r
+ static void SCSI_Command_Inquiry(USB_ClassInfo_MS_Device_t* MSInterfaceInfo);\r
+ static void SCSI_Command_Request_Sense(USB_ClassInfo_MS_Device_t* MSInterfaceInfo);\r
+ static void SCSI_Command_Read_Capacity_10(USB_ClassInfo_MS_Device_t* MSInterfaceInfo);\r
+ static void SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_Device_t* MSInterfaceInfo);\r
+ static void SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* MSInterfaceInfo, const bool IsDataRead);\r
+ #endif\r
+ \r
+#endif\r
--- /dev/null
+ 1 .file "SCSI.c"\r
+ 2 __SREG__ = 0x3f\r
+ 3 __SP_H__ = 0x3e\r
+ 4 __SP_L__ = 0x3d\r
+ 5 __CCP__ = 0x34\r
+ 6 __tmp_reg__ = 0\r
+ 7 __zero_reg__ = 1\r
+ 15 .Ltext0:\r
+ 16 .section .text.SCSI_Command_Inquiry,"ax",@progbits\r
+ 18 SCSI_Command_Inquiry:\r
+ 19 .LFB53:\r
+ 20 .LSM0:\r
+ 21 .LVL0:\r
+ 22 0000 8F92 push r8\r
+ 23 0002 9F92 push r9\r
+ 24 0004 AF92 push r10\r
+ 25 0006 BF92 push r11\r
+ 26 0008 CF92 push r12\r
+ 27 000a DF92 push r13\r
+ 28 000c EF92 push r14\r
+ 29 000e FF92 push r15\r
+ 30 0010 0F93 push r16\r
+ 31 0012 1F93 push r17\r
+ 32 0014 DF93 push r29\r
+ 33 0016 CF93 push r28\r
+ 34 0018 CDB7 in r28,__SP_L__\r
+ 35 001a DEB7 in r29,__SP_H__\r
+ 36 /* prologue: function */\r
+ 37 /* frame size = 0 */\r
+ 38 001c 6C01 movw r12,r24\r
+ 39 .LSM1:\r
+ 40 001e ADB6 in r10,__SP_L__\r
+ 41 0020 BEB6 in r11,__SP_H__\r
+ 42 .LSM2:\r
+ 43 0022 9DB6 in r9,__SP_L__\r
+ 44 0024 8EB6 in r8,__SP_H__\r
+ 45 .LSM3:\r
+ 46 0026 FC01 movw r30,r24\r
+ 47 0028 248D ldd r18,Z+28\r
+ 48 002a 658D ldd r22,Z+29\r
+ 49 .LSM4:\r
+ 50 002c 828D ldd r24,Z+26\r
+ 51 .LVL1:\r
+ 52 002e 90E0 ldi r25,lo8(0)\r
+ 53 0030 8370 andi r24,lo8(3)\r
+ 54 0032 9070 andi r25,hi8(3)\r
+ 55 0034 892B or r24,r25\r
+ 56 0036 01F4 brne .L2\r
+ 57 0038 838D ldd r24,Z+27\r
+ 58 003a 8823 tst r24\r
+ 59 003c 01F0 breq .L3\r
+ 60 .L2:\r
+ 61 .LSM5:\r
+ 62 003e 8091 0000 lds r24,SenseData+2\r
+ 63 0042 807F andi r24,lo8(-16)\r
+ 64 0044 8560 ori r24,lo8(5)\r
+ 65 0046 8093 0000 sts SenseData+2,r24\r
+ 66 004a 84E2 ldi r24,lo8(36)\r
+ 67 004c 8093 0000 sts SenseData+12,r24\r
+ 68 0050 1092 0000 sts SenseData+13,__zero_reg__\r
+ 69 0054 00C0 rjmp .L7\r
+ 70 .L3:\r
+ 71 .LSM6:\r
+ 72 0056 922F mov r25,r18\r
+ 73 0058 80E0 ldi r24,lo8(0)\r
+ 74 005a 062F mov r16,r22\r
+ 75 .LVL2:\r
+ 76 005c 10E0 ldi r17,lo8(0)\r
+ 77 .LVL3:\r
+ 78 005e 082B or r16,r24\r
+ 79 0060 192B or r17,r25\r
+ 80 .LVL4:\r
+ 81 .LSM7:\r
+ 82 0062 7801 movw r14,r16\r
+ 83 .LVL5:\r
+ 84 0064 0532 cpi r16,37\r
+ 85 0066 1105 cpc r17,__zero_reg__\r
+ 86 0068 00F0 brlo .L5\r
+ 87 006a 84E2 ldi r24,lo8(36)\r
+ 88 006c E82E mov r14,r24\r
+ 89 006e F12C mov r15,__zero_reg__\r
+ 90 .L5:\r
+ 91 .LSM8:\r
+ 92 0070 80E0 ldi r24,lo8(InquiryData)\r
+ 93 0072 90E0 ldi r25,hi8(InquiryData)\r
+ 94 0074 B701 movw r22,r14\r
+ 95 0076 40E0 ldi r20,lo8(0)\r
+ 96 0078 50E0 ldi r21,hi8(0)\r
+ 97 007a 0E94 0000 call Endpoint_Write_Stream_LE\r
+ 98 .LSM9:\r
+ 99 007e B801 movw r22,r16\r
+ 100 0080 6E19 sub r22,r14\r
+ 101 0082 7F09 sbc r23,r15\r
+ 102 0084 8DB7 in r24,__SP_L__\r
+ 103 0086 9EB7 in r25,__SP_H__\r
+ 104 0088 861B sub r24,r22\r
+ 105 008a 970B sbc r25,r23\r
+ 106 008c 0FB6 in __tmp_reg__,__SREG__\r
+ 107 008e F894 cli\r
+ 108 0090 9EBF out __SP_H__,r25\r
+ 109 0092 0FBE out __SREG__,__tmp_reg__\r
+ 110 0094 8DBF out __SP_L__,r24\r
+ 111 .LSM10:\r
+ 112 0096 0196 adiw r24,1\r
+ 113 0098 40E0 ldi r20,lo8(0)\r
+ 114 009a 50E0 ldi r21,hi8(0)\r
+ 115 009c 0E94 0000 call Endpoint_Write_Stream_LE\r
+ 116 .LBB6:\r
+ 117 .LSM11:\r
+ 118 00a0 8091 E800 lds r24,232\r
+ 119 .LVL6:\r
+ 120 00a4 982F mov r25,r24\r
+ 121 00a6 9E7F andi r25,lo8(-2)\r
+ 122 00a8 9093 E800 sts 232,r25\r
+ 123 00ac 8F77 andi r24,lo8(127)\r
+ 124 00ae 8093 E800 sts 232,r24\r
+ 125 .LBE6:\r
+ 126 .LSM12:\r
+ 127 00b2 9701 movw r18,r14\r
+ 128 00b4 40E0 ldi r20,lo8(0)\r
+ 129 00b6 50E0 ldi r21,hi8(0)\r
+ 130 .LVL7:\r
+ 131 00b8 F601 movw r30,r12\r
+ 132 00ba 8289 ldd r24,Z+18\r
+ 133 00bc 9389 ldd r25,Z+19\r
+ 134 00be A489 ldd r26,Z+20\r
+ 135 00c0 B589 ldd r27,Z+21\r
+ 136 .LVL8:\r
+ 137 00c2 821B sub r24,r18\r
+ 138 00c4 930B sbc r25,r19\r
+ 139 00c6 A40B sbc r26,r20\r
+ 140 00c8 B50B sbc r27,r21\r
+ 141 00ca 828B std Z+18,r24\r
+ 142 00cc 938B std Z+19,r25\r
+ 143 00ce A48B std Z+20,r26\r
+ 144 00d0 B58B std Z+21,r27\r
+ 145 .LVL9:\r
+ 146 .L7:\r
+ 147 00d2 292D mov r18,r9\r
+ 148 .LVL10:\r
+ 149 00d4 382D mov r19,r8\r
+ 150 00d6 C901 movw r24,r18\r
+ 151 00d8 0FB6 in __tmp_reg__,__SREG__\r
+ 152 00da F894 cli\r
+ 153 00dc 9EBF out __SP_H__,r25\r
+ 154 00de 0FBE out __SREG__,__tmp_reg__\r
+ 155 00e0 8DBF out __SP_L__,r24\r
+ 156 .LSM13:\r
+ 157 00e2 0FB6 in __tmp_reg__,__SREG__\r
+ 158 00e4 F894 cli\r
+ 159 00e6 BEBE out __SP_H__,r11\r
+ 160 00e8 0FBE out __SREG__,__tmp_reg__\r
+ 161 00ea ADBE out __SP_L__,r10\r
+ 162 /* epilogue start */\r
+ 163 00ec CF91 pop r28\r
+ 164 00ee DF91 pop r29\r
+ 165 00f0 1F91 pop r17\r
+ 166 .LVL11:\r
+ 167 00f2 0F91 pop r16\r
+ 168 .LVL12:\r
+ 169 00f4 FF90 pop r15\r
+ 170 00f6 EF90 pop r14\r
+ 171 .LVL13:\r
+ 172 00f8 DF90 pop r13\r
+ 173 00fa CF90 pop r12\r
+ 174 .LVL14:\r
+ 175 00fc BF90 pop r11\r
+ 176 00fe AF90 pop r10\r
+ 177 0100 9F90 pop r9\r
+ 178 0102 8F90 pop r8\r
+ 179 0104 0895 ret\r
+ 180 .LFE53:\r
+ 182 .section .text.SCSI_Command_Request_Sense,"ax",@progbits\r
+ 184 SCSI_Command_Request_Sense:\r
+ 185 .LFB54:\r
+ 186 .LSM14:\r
+ 187 .LVL15:\r
+ 188 0000 8F92 push r8\r
+ 189 0002 9F92 push r9\r
+ 190 0004 BF92 push r11\r
+ 191 0006 CF92 push r12\r
+ 192 0008 DF92 push r13\r
+ 193 000a EF92 push r14\r
+ 194 000c FF92 push r15\r
+ 195 000e 0F93 push r16\r
+ 196 0010 1F93 push r17\r
+ 197 0012 DF93 push r29\r
+ 198 0014 CF93 push r28\r
+ 199 0016 CDB7 in r28,__SP_L__\r
+ 200 0018 DEB7 in r29,__SP_H__\r
+ 201 /* prologue: function */\r
+ 202 /* frame size = 0 */\r
+ 203 001a 6C01 movw r12,r24\r
+ 204 .LSM15:\r
+ 205 001c 8DB6 in r8,__SP_L__\r
+ 206 001e 9EB6 in r9,__SP_H__\r
+ 207 .LSM16:\r
+ 208 0020 FC01 movw r30,r24\r
+ 209 0022 058D ldd r16,Z+29\r
+ 210 .LVL16:\r
+ 211 .LSM17:\r
+ 212 0024 B02E mov r11,r16\r
+ 213 .LVL17:\r
+ 214 0026 0331 cpi r16,lo8(19)\r
+ 215 0028 00F0 brlo .L9\r
+ 216 002a 92E1 ldi r25,lo8(18)\r
+ 217 002c B92E mov r11,r25\r
+ 218 .L9:\r
+ 219 .LSM18:\r
+ 220 002e 10E0 ldi r17,lo8(0)\r
+ 221 0030 0B19 sub r16,r11\r
+ 222 0032 1109 sbc r17,__zero_reg__\r
+ 223 .LVL18:\r
+ 224 0034 8DB7 in r24,__SP_L__\r
+ 225 0036 9EB7 in r25,__SP_H__\r
+ 226 .LVL19:\r
+ 227 0038 801B sub r24,r16\r
+ 228 003a 910B sbc r25,r17\r
+ 229 003c 0FB6 in __tmp_reg__,__SREG__\r
+ 230 003e F894 cli\r
+ 231 0040 9EBF out __SP_H__,r25\r
+ 232 0042 0FBE out __SREG__,__tmp_reg__\r
+ 233 0044 8DBF out __SP_L__,r24\r
+ 234 0046 EDB6 in r14,__SP_L__\r
+ 235 0048 FEB6 in r15,__SP_H__\r
+ 236 004a 0894 sec\r
+ 237 004c E11C adc r14,__zero_reg__\r
+ 238 004e F11C adc r15,__zero_reg__\r
+ 239 .LSM19:\r
+ 240 0050 80E0 ldi r24,lo8(SenseData)\r
+ 241 0052 90E0 ldi r25,hi8(SenseData)\r
+ 242 0054 6B2D mov r22,r11\r
+ 243 0056 70E0 ldi r23,lo8(0)\r
+ 244 0058 40E0 ldi r20,lo8(0)\r
+ 245 005a 50E0 ldi r21,hi8(0)\r
+ 246 005c 0E94 0000 call Endpoint_Write_Stream_LE\r
+ 247 .LSM20:\r
+ 248 0060 C701 movw r24,r14\r
+ 249 0062 B801 movw r22,r16\r
+ 250 0064 40E0 ldi r20,lo8(0)\r
+ 251 0066 50E0 ldi r21,hi8(0)\r
+ 252 0068 0E94 0000 call Endpoint_Write_Stream_LE\r
+ 253 .LBB7:\r
+ 254 .LSM21:\r
+ 255 006c 8091 E800 lds r24,232\r
+ 256 .LVL20:\r
+ 257 0070 982F mov r25,r24\r
+ 258 0072 9E7F andi r25,lo8(-2)\r
+ 259 0074 9093 E800 sts 232,r25\r
+ 260 0078 8F77 andi r24,lo8(127)\r
+ 261 007a 8093 E800 sts 232,r24\r
+ 262 .LBE7:\r
+ 263 .LSM22:\r
+ 264 007e F601 movw r30,r12\r
+ 265 0080 8289 ldd r24,Z+18\r
+ 266 0082 9389 ldd r25,Z+19\r
+ 267 0084 A489 ldd r26,Z+20\r
+ 268 0086 B589 ldd r27,Z+21\r
+ 269 .LVL21:\r
+ 270 0088 8B19 sub r24,r11\r
+ 271 008a 9109 sbc r25,__zero_reg__\r
+ 272 008c A109 sbc r26,__zero_reg__\r
+ 273 008e B109 sbc r27,__zero_reg__\r
+ 274 0090 828B std Z+18,r24\r
+ 275 0092 938B std Z+19,r25\r
+ 276 0094 A48B std Z+20,r26\r
+ 277 0096 B58B std Z+21,r27\r
+ 278 .LSM23:\r
+ 279 0098 0FB6 in __tmp_reg__,__SREG__\r
+ 280 009a F894 cli\r
+ 281 009c 9EBE out __SP_H__,r9\r
+ 282 009e 0FBE out __SREG__,__tmp_reg__\r
+ 283 00a0 8DBE out __SP_L__,r8\r
+ 284 /* epilogue start */\r
+ 285 00a2 CF91 pop r28\r
+ 286 00a4 DF91 pop r29\r
+ 287 00a6 1F91 pop r17\r
+ 288 00a8 0F91 pop r16\r
+ 289 00aa FF90 pop r15\r
+ 290 00ac EF90 pop r14\r
+ 291 00ae DF90 pop r13\r
+ 292 00b0 CF90 pop r12\r
+ 293 .LVL22:\r
+ 294 00b2 BF90 pop r11\r
+ 295 .LVL23:\r
+ 296 00b4 9F90 pop r9\r
+ 297 00b6 8F90 pop r8\r
+ 298 00b8 0895 ret\r
+ 299 .LFE54:\r
+ 301 .section .text.SCSI_Command_ReadWrite_10,"ax",@progbits\r
+ 303 SCSI_Command_ReadWrite_10:\r
+ 304 .LFB57:\r
+ 305 .LSM24:\r
+ 306 .LVL24:\r
+ 307 0000 CF92 push r12\r
+ 308 0002 DF92 push r13\r
+ 309 0004 EF92 push r14\r
+ 310 0006 FF92 push r15\r
+ 311 0008 0F93 push r16\r
+ 312 000a 1F93 push r17\r
+ 313 000c CF93 push r28\r
+ 314 000e DF93 push r29\r
+ 315 /* prologue: function */\r
+ 316 /* frame size = 0 */\r
+ 317 0010 6C01 movw r12,r24\r
+ 318 .LSM25:\r
+ 319 0012 FC01 movw r30,r24\r
+ 320 0014 838D ldd r24,Z+27\r
+ 321 0016 948D ldd r25,Z+28\r
+ 322 0018 A58D ldd r26,Z+29\r
+ 323 001a B68D ldd r27,Z+30\r
+ 324 .LVL25:\r
+ 325 .LBB8:\r
+ 326 .LBB9:\r
+ 327 .LSM26:\r
+ 328 001c 182F mov r17,r24\r
+ 329 001e 0027 clr r16\r
+ 330 0020 FF24 clr r15\r
+ 331 0022 EE24 clr r14\r
+ 332 .LVL26:\r
+ 333 0024 2B2F mov r18,r27\r
+ 334 0026 3327 clr r19\r
+ 335 0028 4427 clr r20\r
+ 336 002a 5527 clr r21\r
+ 337 002c E22A or r14,r18\r
+ 338 002e F32A or r15,r19\r
+ 339 0030 042B or r16,r20\r
+ 340 0032 152B or r17,r21\r
+ 341 0034 9C01 movw r18,r24\r
+ 342 0036 AD01 movw r20,r26\r
+ 343 0038 2070 andi r18,lo8(16711680)\r
+ 344 003a 3070 andi r19,hi8(16711680)\r
+ 345 003c 5070 andi r21,hhi8(16711680)\r
+ 346 003e 232F mov r18,r19\r
+ 347 0040 342F mov r19,r20\r
+ 348 0042 452F mov r20,r21\r
+ 349 0044 5527 clr r21\r
+ 350 0046 E22A or r14,r18\r
+ 351 0048 F32A or r15,r19\r
+ 352 004a 042B or r16,r20\r
+ 353 004c 152B or r17,r21\r
+ 354 004e 8070 andi r24,lo8(65280)\r
+ 355 0050 A070 andi r26,hlo8(65280)\r
+ 356 0052 B070 andi r27,hhi8(65280)\r
+ 357 0054 BA2F mov r27,r26\r
+ 358 0056 A92F mov r26,r25\r
+ 359 0058 982F mov r25,r24\r
+ 360 005a 8827 clr r24\r
+ 361 005c E82A or r14,r24\r
+ 362 005e F92A or r15,r25\r
+ 363 0060 0A2B or r16,r26\r
+ 364 0062 1B2B or r17,r27\r
+ 365 .LBE9:\r
+ 366 .LBE8:\r
+ 367 .LSM27:\r
+ 368 0064 80A1 ldd r24,Z+32\r
+ 369 0066 91A1 ldd r25,Z+33\r
+ 370 .LSM28:\r
+ 371 0068 F0E0 ldi r31,lo8(32768)\r
+ 372 006a EF16 cp r14,r31\r
+ 373 006c F0E8 ldi r31,hi8(32768)\r
+ 374 006e FF06 cpc r15,r31\r
+ 375 0070 F0E0 ldi r31,hlo8(32768)\r
+ 376 0072 0F07 cpc r16,r31\r
+ 377 0074 F0E0 ldi r31,hhi8(32768)\r
+ 378 0076 1F07 cpc r17,r31\r
+ 379 0078 00F0 brlo .L12\r
+ 380 .LSM29:\r
+ 381 007a 8091 0000 lds r24,SenseData+2\r
+ 382 007e 807F andi r24,lo8(-16)\r
+ 383 0080 8560 ori r24,lo8(5)\r
+ 384 0082 8093 0000 sts SenseData+2,r24\r
+ 385 0086 81E2 ldi r24,lo8(33)\r
+ 386 0088 8093 0000 sts SenseData+12,r24\r
+ 387 008c 1092 0000 sts SenseData+13,__zero_reg__\r
+ 388 0090 00C0 rjmp .L16\r
+ 389 .L12:\r
+ 390 .LBB10:\r
+ 391 .LBB11:\r
+ 392 .LSM30:\r
+ 393 0092 D82F mov r29,r24\r
+ 394 .LVL27:\r
+ 395 0094 C92F mov r28,r25\r
+ 396 .LVL28:\r
+ 397 .LBE11:\r
+ 398 .LBE10:\r
+ 399 .LSM31:\r
+ 400 0096 6623 tst r22\r
+ 401 0098 01F0 breq .L14\r
+ 402 .LSM32:\r
+ 403 009a C601 movw r24,r12\r
+ 404 009c B801 movw r22,r16\r
+ 405 009e A701 movw r20,r14\r
+ 406 00a0 9E01 movw r18,r28\r
+ 407 00a2 0E94 0000 call DataflashManager_ReadBlocks\r
+ 408 .LVL29:\r
+ 409 00a6 00C0 rjmp .L15\r
+ 410 .LVL30:\r
+ 411 .L14:\r
+ 412 .LSM33:\r
+ 413 00a8 C601 movw r24,r12\r
+ 414 00aa B801 movw r22,r16\r
+ 415 00ac A701 movw r20,r14\r
+ 416 00ae 9E01 movw r18,r28\r
+ 417 00b0 0E94 0000 call DataflashManager_WriteBlocks\r
+ 418 .LVL31:\r
+ 419 .L15:\r
+ 420 .LSM34:\r
+ 421 00b4 9E01 movw r18,r28\r
+ 422 00b6 40E0 ldi r20,lo8(0)\r
+ 423 00b8 50E0 ldi r21,hi8(0)\r
+ 424 .LVL32:\r
+ 425 00ba 69E0 ldi r22,9\r
+ 426 00bc 220F 1: lsl r18\r
+ 427 00be 331F rol r19\r
+ 428 00c0 441F rol r20\r
+ 429 00c2 551F rol r21\r
+ 430 00c4 6A95 dec r22\r
+ 431 00c6 01F4 brne 1b\r
+ 432 .LVL33:\r
+ 433 00c8 F601 movw r30,r12\r
+ 434 00ca 8289 ldd r24,Z+18\r
+ 435 00cc 9389 ldd r25,Z+19\r
+ 436 00ce A489 ldd r26,Z+20\r
+ 437 00d0 B589 ldd r27,Z+21\r
+ 438 00d2 821B sub r24,r18\r
+ 439 00d4 930B sbc r25,r19\r
+ 440 00d6 A40B sbc r26,r20\r
+ 441 00d8 B50B sbc r27,r21\r
+ 442 00da 828B std Z+18,r24\r
+ 443 00dc 938B std Z+19,r25\r
+ 444 00de A48B std Z+20,r26\r
+ 445 00e0 B58B std Z+21,r27\r
+ 446 .LVL34:\r
+ 447 .L16:\r
+ 448 /* epilogue start */\r
+ 449 .LSM35:\r
+ 450 00e2 DF91 pop r29\r
+ 451 .LVL35:\r
+ 452 00e4 CF91 pop r28\r
+ 453 00e6 1F91 pop r17\r
+ 454 00e8 0F91 pop r16\r
+ 455 00ea FF90 pop r15\r
+ 456 00ec EF90 pop r14\r
+ 457 .LVL36:\r
+ 458 00ee DF90 pop r13\r
+ 459 00f0 CF90 pop r12\r
+ 460 .LVL37:\r
+ 461 00f2 0895 ret\r
+ 462 .LFE57:\r
+ 464 .section .text.SCSI_DecodeSCSICommand,"ax",@progbits\r
+ 465 .global SCSI_DecodeSCSICommand\r
+ 467 SCSI_DecodeSCSICommand:\r
+ 468 .LFB52:\r
+ 469 .LSM36:\r
+ 470 .LVL38:\r
+ 471 0000 0F93 push r16\r
+ 472 0002 1F93 push r17\r
+ 473 0004 DF93 push r29\r
+ 474 0006 CF93 push r28\r
+ 475 0008 CDB7 in r28,__SP_L__\r
+ 476 000a DEB7 in r29,__SP_H__\r
+ 477 000c 2897 sbiw r28,8\r
+ 478 000e 0FB6 in __tmp_reg__,__SREG__\r
+ 479 0010 F894 cli\r
+ 480 0012 DEBF out __SP_H__,r29\r
+ 481 0014 0FBE out __SREG__,__tmp_reg__\r
+ 482 0016 CDBF out __SP_L__,r28\r
+ 483 /* prologue: function */\r
+ 484 /* frame size = 8 */\r
+ 485 0018 8C01 movw r16,r24\r
+ 486 .LSM37:\r
+ 487 001a 9091 0000 lds r25,SenseData+2\r
+ 488 001e 907F andi r25,lo8(-16)\r
+ 489 0020 9093 0000 sts SenseData+2,r25\r
+ 490 0024 1092 0000 sts SenseData+12,__zero_reg__\r
+ 491 0028 1092 0000 sts SenseData+13,__zero_reg__\r
+ 492 .LSM38:\r
+ 493 002c F801 movw r30,r16\r
+ 494 002e 818D ldd r24,Z+25\r
+ 495 .LVL39:\r
+ 496 0030 8E31 cpi r24,lo8(30)\r
+ 497 0032 01F4 brne .+2\r
+ 498 0034 00C0 rjmp .L19\r
+ 499 0036 8F31 cpi r24,lo8(31)\r
+ 500 0038 00F4 brsh .L26\r
+ 501 003a 8330 cpi r24,lo8(3)\r
+ 502 003c 01F0 breq .L20\r
+ 503 003e 8430 cpi r24,lo8(4)\r
+ 504 0040 00F4 brsh .L27\r
+ 505 0042 8823 tst r24\r
+ 506 0044 01F4 brne .+2\r
+ 507 0046 00C0 rjmp .L19\r
+ 508 0048 00C0 rjmp .L18\r
+ 509 .L27:\r
+ 510 004a 8231 cpi r24,lo8(18)\r
+ 511 004c 01F0 breq .L21\r
+ 512 004e 8D31 cpi r24,lo8(29)\r
+ 513 0050 01F0 breq .+2\r
+ 514 0052 00C0 rjmp .L18\r
+ 515 0054 00C0 rjmp .L37\r
+ 516 .L26:\r
+ 517 0056 8832 cpi r24,lo8(40)\r
+ 518 0058 01F4 brne .+2\r
+ 519 005a 00C0 rjmp .L24\r
+ 520 005c 8932 cpi r24,lo8(41)\r
+ 521 005e 00F4 brsh .L28\r
+ 522 0060 8532 cpi r24,lo8(37)\r
+ 523 0062 01F0 breq .+2\r
+ 524 0064 00C0 rjmp .L18\r
+ 525 0066 00C0 rjmp .L38\r
+ 526 .L28:\r
+ 527 0068 8A32 cpi r24,lo8(42)\r
+ 528 006a 01F4 brne .+2\r
+ 529 006c 00C0 rjmp .L25\r
+ 530 006e 8F32 cpi r24,lo8(47)\r
+ 531 0070 01F0 breq .+2\r
+ 532 0072 00C0 rjmp .L18\r
+ 533 0074 00C0 rjmp .L19\r
+ 534 .L21:\r
+ 535 .LSM39:\r
+ 536 0076 C801 movw r24,r16\r
+ 537 0078 0E94 0000 call SCSI_Command_Inquiry\r
+ 538 007c 00C0 rjmp .L29\r
+ 539 .L20:\r
+ 540 .LSM40:\r
+ 541 007e C801 movw r24,r16\r
+ 542 0080 0E94 0000 call SCSI_Command_Request_Sense\r
+ 543 0084 00C0 rjmp .L29\r
+ 544 .L38:\r
+ 545 .LBB17:\r
+ 546 .LBB18:\r
+ 547 .LSM41:\r
+ 548 0086 8FEF ldi r24,lo8(32767)\r
+ 549 0088 9FE7 ldi r25,hi8(32767)\r
+ 550 008a A0E0 ldi r26,hlo8(32767)\r
+ 551 008c B0E0 ldi r27,hhi8(32767)\r
+ 552 008e 8983 std Y+1,r24\r
+ 553 0090 9A83 std Y+2,r25\r
+ 554 0092 AB83 std Y+3,r26\r
+ 555 0094 BC83 std Y+4,r27\r
+ 556 .LVL40:\r
+ 557 .LSM42:\r
+ 558 0096 80E0 ldi r24,lo8(512)\r
+ 559 0098 92E0 ldi r25,hi8(512)\r
+ 560 009a A0E0 ldi r26,hlo8(512)\r
+ 561 009c B0E0 ldi r27,hhi8(512)\r
+ 562 009e 8D83 std Y+5,r24\r
+ 563 00a0 9E83 std Y+6,r25\r
+ 564 00a2 AF83 std Y+7,r26\r
+ 565 00a4 B887 std Y+8,r27\r
+ 566 .LVL41:\r
+ 567 .LSM43:\r
+ 568 00a6 CE01 movw r24,r28\r
+ 569 00a8 0196 adiw r24,1\r
+ 570 00aa 64E0 ldi r22,lo8(4)\r
+ 571 00ac 70E0 ldi r23,hi8(4)\r
+ 572 00ae 40E0 ldi r20,lo8(0)\r
+ 573 00b0 50E0 ldi r21,hi8(0)\r
+ 574 00b2 0E94 0000 call Endpoint_Write_Stream_BE\r
+ 575 .LSM44:\r
+ 576 00b6 CE01 movw r24,r28\r
+ 577 00b8 0596 adiw r24,5\r
+ 578 00ba 64E0 ldi r22,lo8(4)\r
+ 579 00bc 70E0 ldi r23,hi8(4)\r
+ 580 00be 40E0 ldi r20,lo8(0)\r
+ 581 00c0 50E0 ldi r21,hi8(0)\r
+ 582 00c2 0E94 0000 call Endpoint_Write_Stream_BE\r
+ 583 .LBB19:\r
+ 584 .LSM45:\r
+ 585 00c6 8091 E800 lds r24,232\r
+ 586 .LVL42:\r
+ 587 00ca 982F mov r25,r24\r
+ 588 00cc 9E7F andi r25,lo8(-2)\r
+ 589 00ce 9093 E800 sts 232,r25\r
+ 590 00d2 8F77 andi r24,lo8(127)\r
+ 591 00d4 8093 E800 sts 232,r24\r
+ 592 .LBE19:\r
+ 593 .LSM46:\r
+ 594 00d8 F801 movw r30,r16\r
+ 595 00da 8289 ldd r24,Z+18\r
+ 596 00dc 9389 ldd r25,Z+19\r
+ 597 00de A489 ldd r26,Z+20\r
+ 598 00e0 B589 ldd r27,Z+21\r
+ 599 .LVL43:\r
+ 600 00e2 0897 sbiw r24,8\r
+ 601 00e4 A109 sbc r26,__zero_reg__\r
+ 602 00e6 B109 sbc r27,__zero_reg__\r
+ 603 00e8 828B std Z+18,r24\r
+ 604 00ea 938B std Z+19,r25\r
+ 605 00ec A48B std Z+20,r26\r
+ 606 00ee B58B std Z+21,r27\r
+ 607 00f0 00C0 rjmp .L29\r
+ 608 .LVL44:\r
+ 609 .L37:\r
+ 610 .LBE18:\r
+ 611 .LBE17:\r
+ 612 .LBB20:\r
+ 613 .LBB21:\r
+ 614 .LSM47:\r
+ 615 00f2 F801 movw r30,r16\r
+ 616 00f4 828D ldd r24,Z+26\r
+ 617 00f6 82FD sbrc r24,2\r
+ 618 00f8 00C0 rjmp .L30\r
+ 619 .LSM48:\r
+ 620 00fa 9560 ori r25,lo8(5)\r
+ 621 00fc 9093 0000 sts SenseData+2,r25\r
+ 622 0100 84E2 ldi r24,lo8(36)\r
+ 623 0102 00C0 rjmp .L36\r
+ 624 .L30:\r
+ 625 .LBE21:\r
+ 626 .LSM49:\r
+ 627 0104 0E94 0000 call DataflashManager_CheckDataflashOperation\r
+ 628 .LBB22:\r
+ 629 0108 8823 tst r24\r
+ 630 010a 01F4 brne .L19\r
+ 631 .LSM50:\r
+ 632 010c 8091 0000 lds r24,SenseData+2\r
+ 633 0110 807F andi r24,lo8(-16)\r
+ 634 0112 8460 ori r24,lo8(4)\r
+ 635 0114 8093 0000 sts SenseData+2,r24\r
+ 636 0118 1092 0000 sts SenseData+12,__zero_reg__\r
+ 637 011c 00C0 rjmp .L34\r
+ 638 .L25:\r
+ 639 .LBE22:\r
+ 640 .LBE20:\r
+ 641 .LSM51:\r
+ 642 011e C801 movw r24,r16\r
+ 643 0120 60E0 ldi r22,lo8(0)\r
+ 644 0122 00C0 rjmp .L35\r
+ 645 .L24:\r
+ 646 .LSM52:\r
+ 647 0124 C801 movw r24,r16\r
+ 648 0126 61E0 ldi r22,lo8(1)\r
+ 649 .L35:\r
+ 650 0128 0E94 0000 call SCSI_Command_ReadWrite_10\r
+ 651 012c 00C0 rjmp .L29\r
+ 652 .L19:\r
+ 653 .LSM53:\r
+ 654 012e F801 movw r30,r16\r
+ 655 0130 128A std Z+18,__zero_reg__\r
+ 656 0132 138A std Z+19,__zero_reg__\r
+ 657 0134 148A std Z+20,__zero_reg__\r
+ 658 0136 158A std Z+21,__zero_reg__\r
+ 659 0138 00C0 rjmp .L29\r
+ 660 .L18:\r
+ 661 .LSM54:\r
+ 662 013a 8091 0000 lds r24,SenseData+2\r
+ 663 013e 807F andi r24,lo8(-16)\r
+ 664 0140 8560 ori r24,lo8(5)\r
+ 665 0142 8093 0000 sts SenseData+2,r24\r
+ 666 0146 80E2 ldi r24,lo8(32)\r
+ 667 .L36:\r
+ 668 0148 8093 0000 sts SenseData+12,r24\r
+ 669 .L34:\r
+ 670 014c 1092 0000 sts SenseData+13,__zero_reg__\r
+ 671 .LVL45:\r
+ 672 .L29:\r
+ 673 0150 90E0 ldi r25,lo8(0)\r
+ 674 0152 8091 0000 lds r24,SenseData+2\r
+ 675 0156 8F70 andi r24,lo8(15)\r
+ 676 0158 01F4 brne .L32\r
+ 677 015a 91E0 ldi r25,lo8(1)\r
+ 678 .L32:\r
+ 679 .LSM55:\r
+ 680 015c 892F mov r24,r25\r
+ 681 /* epilogue start */\r
+ 682 015e 2896 adiw r28,8\r
+ 683 0160 0FB6 in __tmp_reg__,__SREG__\r
+ 684 0162 F894 cli\r
+ 685 0164 DEBF out __SP_H__,r29\r
+ 686 0166 0FBE out __SREG__,__tmp_reg__\r
+ 687 0168 CDBF out __SP_L__,r28\r
+ 688 016a CF91 pop r28\r
+ 689 016c DF91 pop r29\r
+ 690 016e 1F91 pop r17\r
+ 691 0170 0F91 pop r16\r
+ 692 .LVL46:\r
+ 693 0172 0895 ret\r
+ 694 .LFE52:\r
+ 696 .global InquiryData\r
+ 697 .data\r
+ 700 InquiryData:\r
+ 701 0000 00 .byte 0\r
+ 702 0001 80 .byte 128\r
+ 703 0002 00 .byte 0\r
+ 704 0003 02 .byte 2\r
+ 705 0004 1F .byte 31\r
+ 706 0005 0000 .skip 2,0\r
+ 707 0007 00 .byte 0\r
+ 708 0008 4C55 4641 .string "LUFA"\r
+ 708 00\r
+ 709 000d 0000 00 .skip 3,0\r
+ 710 0010 4461 7461 .string "Dataflash Disk"\r
+ 710 666C 6173 \r
+ 710 6820 4469 \r
+ 710 736B 00\r
+ 711 001f 00 .skip 1,0\r
+ 712 0020 30 .byte 48\r
+ 713 0021 2E .byte 46\r
+ 714 0022 30 .byte 48\r
+ 715 0023 30 .byte 48\r
+ 716 .global SenseData\r
+ 719 SenseData:\r
+ 720 0024 70 .byte 112\r
+ 721 0025 0000 0000 .skip 6,0\r
+ 721 0000 \r
+ 722 002b 0A .byte 10\r
+ 723 002c 0000 0000 .skip 10,0\r
+ 723 0000 0000 \r
+ 723 0000 \r
+ 772 .Letext0:\r
+DEFINED SYMBOLS\r
+ *ABS*:00000000 SCSI.c\r
+C:\Users\Dean\AppData\Local\Temp/ccIi4Dyn.s:2 *ABS*:0000003f __SREG__\r
+C:\Users\Dean\AppData\Local\Temp/ccIi4Dyn.s:3 *ABS*:0000003e __SP_H__\r
+C:\Users\Dean\AppData\Local\Temp/ccIi4Dyn.s:4 *ABS*:0000003d __SP_L__\r
+C:\Users\Dean\AppData\Local\Temp/ccIi4Dyn.s:5 *ABS*:00000034 __CCP__\r
+C:\Users\Dean\AppData\Local\Temp/ccIi4Dyn.s:6 *ABS*:00000000 __tmp_reg__\r
+C:\Users\Dean\AppData\Local\Temp/ccIi4Dyn.s:7 *ABS*:00000001 __zero_reg__\r
+C:\Users\Dean\AppData\Local\Temp/ccIi4Dyn.s:18 .text.SCSI_Command_Inquiry:00000000 SCSI_Command_Inquiry\r
+C:\Users\Dean\AppData\Local\Temp/ccIi4Dyn.s:719 .data:00000024 SenseData\r
+C:\Users\Dean\AppData\Local\Temp/ccIi4Dyn.s:700 .data:00000000 InquiryData\r
+C:\Users\Dean\AppData\Local\Temp/ccIi4Dyn.s:184 .text.SCSI_Command_Request_Sense:00000000 SCSI_Command_Request_Sense\r
+C:\Users\Dean\AppData\Local\Temp/ccIi4Dyn.s:303 .text.SCSI_Command_ReadWrite_10:00000000 SCSI_Command_ReadWrite_10\r
+C:\Users\Dean\AppData\Local\Temp/ccIi4Dyn.s:467 .text.SCSI_DecodeSCSICommand:00000000 SCSI_DecodeSCSICommand\r
+\r
+UNDEFINED SYMBOLS\r
+Endpoint_Write_Stream_LE\r
+DataflashManager_ReadBlocks\r
+DataflashManager_WriteBlocks\r
+Endpoint_Write_Stream_BE\r
+DataflashManager_CheckDataflashOperation\r
+__do_copy_data\r
--- /dev/null
+/*\r
+ LUFA Library\r
+ Copyright (C) Dean Camera, 2009.\r
+ \r
+ dean [at] fourwalledcubicle [dot] com\r
+ www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+ Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+ Permission to use, copy, modify, distribute, and sell this \r
+ software and its documentation for any purpose is hereby granted\r
+ without fee, provided that the above copyright notice appear in \r
+ all copies and that both that the copyright notice and this\r
+ permission notice and warranty disclaimer appear in supporting \r
+ documentation, and that the name of the author not be used in \r
+ advertising or publicity pertaining to distribution of the \r
+ software without specific, written prior permission.\r
+\r
+ The author disclaim all warranties with regard to this\r
+ software, including all implied warranties of merchantability\r
+ and fitness. In no event shall the author be liable for any\r
+ special, indirect or consequential damages or any damages\r
+ whatsoever resulting from loss of use, data or profits, whether\r
+ in an action of contract, negligence or other tortious action,\r
+ arising out of or in connection with the use or performance of\r
+ this software.\r
+*/\r
+\r
+/** \file\r
+ *\r
+ * Main source file for the TemperatureDataLogger project. This file contains the main tasks of\r
+ * the project and is responsible for the initial application hardware configuration.\r
+ */\r
+\r
+#include "TempDataLogger.h"\r
+\r
+/** LUFA Mass Storage Class driver interface configuration and state information. This structure is\r
+ * passed to all Mass Storage Class driver functions, so that multiple instances of the same class\r
+ * within a device can be differentiated from one another.\r
+ */\r
+USB_ClassInfo_MS_Device_t Disk_MS_Interface =\r
+ {\r
+ .Config =\r
+ {\r
+ .InterfaceNumber = 0,\r
+\r
+ .DataINEndpointNumber = MASS_STORAGE_IN_EPNUM,\r
+ .DataINEndpointSize = MASS_STORAGE_IO_EPSIZE,\r
+ .DataINEndpointDoubleBank = false,\r
+\r
+ .DataOUTEndpointNumber = MASS_STORAGE_OUT_EPNUM,\r
+ .DataOUTEndpointSize = MASS_STORAGE_IO_EPSIZE,\r
+ .DataOUTEndpointDoubleBank = false,\r
+\r
+ .TotalLUNs = 1,\r
+ },\r
+ };\r
+\r
+/** FAT Fs structure to hold the internal state of the FAT driver for the dataflash contents. */\r
+FATFS DiskFATState;\r
+\r
+/** FAT Fs structure to hold a FAT file handle for the log data write destination. */\r
+FIL TempLogFile;\r
+\r
+/** Counter to count the number of 10 millisecond tick that has elapsed since the last sample */\r
+uint16_t CurrentLogTick;\r
+\r
+\r
+ISR(TIMER1_COMPA_vect, ISR_BLOCK)\r
+{\r
+ if (CurrentLogTick++ != LOG_INTERVAL_10MS)\r
+ return;\r
+ \r
+ CurrentLogTick = 0;\r
+\r
+ if (USB_DeviceState == DEVICE_STATE_Unattached)\r
+ {\r
+ f_printf(&TempLogFile, "%d Degrees\r\n", Temperature_GetTemperature());\r
+ f_sync(&TempLogFile);\r
+ }\r
+}\r
+\r
+\r
+/** Main program entry point. This routine contains the overall program flow, including initial\r
+ * setup of all components and the main program loop.\r
+ */\r
+int main(void)\r
+{\r
+ SetupHardware();\r
+\r
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
+\r
+ /* Mount and open the log file on the dataflash FAT partition */\r
+ f_mount(0, &DiskFATState);\r
+ f_open(&TempLogFile, LOG_FILENAME, FA_OPEN_ALWAYS | FA_WRITE);\r
+ f_lseek(&TempLogFile, TempLogFile.fsize);\r
+\r
+ /* Write out the log seperator line */\r
+ f_printf(&TempLogFile, "===========================\r\n");\r
+ Temperature_GetTemperature(); // Discard first temperature reading to ensure accuracy\r
+\r
+ for (;;)\r
+ {\r
+ MS_Device_USBTask(&Disk_MS_Interface);\r
+ USB_USBTask();\r
+ }\r
+}\r
+\r
+/** Configures the board hardware and chip peripherals for the demo's functionality. */\r
+void SetupHardware(void)\r
+{\r
+ /* Disable watchdog if enabled by bootloader/fuses */\r
+ MCUSR &= ~(1 << WDRF);\r
+ wdt_disable();\r
+\r
+ /* Disable clock division */\r
+ clock_prescale_set(clock_div_1);\r
+\r
+ /* Hardware Initialization */\r
+ LEDs_Init();\r
+ SPI_Init(SPI_SPEED_FCPU_DIV_2 | SPI_SCK_LEAD_FALLING | SPI_SAMPLE_TRAILING | SPI_MODE_MASTER);\r
+ Dataflash_Init();\r
+ USB_Init();\r
+ ADC_Init(ADC_REFERENCE_AVCC | ADC_FREE_RUNNING | ADC_PRESCALE_128);\r
+ Temperature_Init();\r
+ \r
+ /* 10ms interval timer configuration */\r
+ OCR1A = (((F_CPU / 1024) / 100) - 1);\r
+ TCCR1A = (1 << WGM01); // CTC mode\r
+ TCCR1B = (1 << CS12) | (1 << CS10); // Fcpu/1024 speed\r
+ TIMSK1 = (1 << OCIE1A);\r
+\r
+ /* Clear Dataflash sector protections, if enabled */\r
+ DataflashManager_ResetDataflashProtections();\r
+}\r
+\r
+/** Event handler for the library USB Connection event. */\r
+void EVENT_USB_Device_Connect(void)\r
+{\r
+ LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);\r
+\r
+ /* Close the log file so that the host has exclusive filesystem access */\r
+ f_close(&TempLogFile);\r
+}\r
+\r
+/** Event handler for the library USB Disconnection event. */\r
+void EVENT_USB_Device_Disconnect(void)\r
+{\r
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
+ \r
+ /* When disconnected from the host, re-open log file so we can resume logging */\r
+ f_mount(0, &DiskFATState);\r
+ f_open(&TempLogFile, LOG_FILENAME, FA_OPEN_ALWAYS | FA_WRITE);\r
+ f_lseek(&TempLogFile, TempLogFile.fsize);\r
+}\r
+\r
+/** Event handler for the library USB Configuration Changed event. */\r
+void EVENT_USB_Device_ConfigurationChanged(void)\r
+{\r
+ LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
+\r
+ if (!(MS_Device_ConfigureEndpoints(&Disk_MS_Interface)))\r
+ LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
+}\r
+\r
+/** Event handler for the library USB Unhandled Control Request event. */\r
+void EVENT_USB_Device_UnhandledControlRequest(void)\r
+{\r
+ MS_Device_ProcessControlRequest(&Disk_MS_Interface);\r
+}\r
+\r
+/** Mass Storage class driver callback function the reception of SCSI commands from the host, which must be processed.\r
+ *\r
+ * \param[in] MSInterfaceInfo Pointer to the Mass Storage class interface configuration structure being referenced\r
+ */\r
+bool CALLBACK_MS_Device_SCSICommandReceived(USB_ClassInfo_MS_Device_t* MSInterfaceInfo)\r
+{\r
+ bool CommandSuccess;\r
+ \r
+ LEDs_SetAllLEDs(LEDMASK_USB_BUSY);\r
+ CommandSuccess = SCSI_DecodeSCSICommand(MSInterfaceInfo);\r
+ LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
+ \r
+ return CommandSuccess;\r
+}\r
--- /dev/null
+/*\r
+ LUFA Library\r
+ Copyright (C) Dean Camera, 2009.\r
+ \r
+ dean [at] fourwalledcubicle [dot] com\r
+ www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+ Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+ Permission to use, copy, modify, distribute, and sell this \r
+ software and its documentation for any purpose is hereby granted\r
+ without fee, provided that the above copyright notice appear in \r
+ all copies and that both that the copyright notice and this\r
+ permission notice and warranty disclaimer appear in supporting \r
+ documentation, and that the name of the author not be used in \r
+ advertising or publicity pertaining to distribution of the \r
+ software without specific, written prior permission.\r
+\r
+ The author disclaim all warranties with regard to this\r
+ software, including all implied warranties of merchantability\r
+ and fitness. In no event shall the author be liable for any\r
+ special, indirect or consequential damages or any damages\r
+ whatsoever resulting from loss of use, data or profits, whether\r
+ in an action of contract, negligence or other tortious action,\r
+ arising out of or in connection with the use or performance of\r
+ this software.\r
+*/\r
+\r
+/** \file\r
+ *\r
+ * Header file for TempDataLogger.c.\r
+ */\r
+\r
+#ifndef _TEMP_DATALOGGER_H_\r
+#define _TEMP_DATALOGGER_H_\r
+\r
+ /* Includes: */\r
+ #include <avr/io.h>\r
+ #include <avr/wdt.h>\r
+ #include <avr/power.h>\r
+\r
+ #include "Descriptors.h"\r
+\r
+ #include "Lib/SCSI.h"\r
+ #include "Lib/DataflashManager.h"\r
+ #include "Lib/FatFs/ff.h"\r
+\r
+ #include <LUFA/Version.h>\r
+ #include <LUFA/Drivers/Board/LEDs.h>\r
+ #include <LUFA/Drivers/Board/Temperature.h>\r
+ #include <LUFA/Drivers/Peripheral/ADC.h>\r
+ #include <LUFA/Drivers/USB/USB.h>\r
+ #include <LUFA/Drivers/USB/Class/MassStorage.h>\r
+\r
+ /* Macros: */\r
+ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */\r
+ #define LEDMASK_USB_NOTREADY LEDS_LED1\r
+\r
+ /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */\r
+ #define LEDMASK_USB_ENUMERATING (LEDS_LED2 | LEDS_LED3)\r
+\r
+ /** LED mask for the library LED driver, to indicate that the USB interface is ready. */\r
+ #define LEDMASK_USB_READY (LEDS_LED2 | LEDS_LED4)\r
+\r
+ /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */\r
+ #define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3)\r
+\r
+ /** LED mask for the library LED driver, to indicate that the USB interface is busy. */\r
+ #define LEDMASK_USB_BUSY LEDS_LED2\r
+ \r
+ /** Filename for the log data when written to the dataflash FAT filesystem. */\r
+ #define LOG_FILENAME "TEMPLOG.txt"\r
+ \r
+ /** Data log interval between samples, in tens of milliseconds */\r
+ #define LOG_INTERVAL_10MS 1000\r
+ \r
+ /* Function Prototypes: */\r
+ void SetupHardware(void);\r
+\r
+ void EVENT_USB_Device_Connect(void);\r
+ void EVENT_USB_Device_Disconnect(void);\r
+ void EVENT_USB_Device_ConfigurationChanged(void);\r
+ void EVENT_USB_Device_UnhandledControlRequest(void);\r
+\r
+ bool CALLBACK_MS_Device_SCSICommandReceived(USB_ClassInfo_MS_Device_t* MSInterfaceInfo);\r
+\r
+#endif\r
--- /dev/null
+/** \file\r
+ *\r
+ * This file contains special DoxyGen information for the generation of the main page and other special\r
+ * documentation pages. It is not a project source file.\r
+ */\r
+ \r
+/** \mainpage Temperature Datalogger Project\r
+ *\r
+ * \section SSec_Compat Demo Compatibility:\r
+ *\r
+ * The following list indicates what microcontrollers are compatible with this demo.\r
+ *\r
+ * - Series 7 USB AVRs\r
+ * - Series 6 USB AVRs\r
+ * - Series 4 USB AVRs (with >16KB of FLASH)\r
+ *\r
+ * \section SSec_Info USB Information:\r
+ *\r
+ * The following table gives a rundown of the USB utilization of this demo.\r
+ *\r
+ * <table>\r
+ * <tr>\r
+ * <td><b>USB Mode:</b></td>\r
+ * <td>Device</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td><b>USB Class:</b></td>\r
+ * <td>Mass Storage Device</td>\r
+ * </tr>\r
+ * <tr> \r
+ * <td><b>USB Subclass:</b></td>\r
+ * <td>Bulk-Only Transport</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td><b>Relevant Standards:</b></td>\r
+ * <td>USBIF Mass Storage Standard</td>\r
+ * <td>USB Bulk-Only Transport Standard</td>\r
+ * <td>SCSI Primary Commands Specification</td>\r
+ * <td>SCSI Block Commands Specification</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td><b>Usable Speeds:</b></td>\r
+ * <td>Full Speed Mode</td>\r
+ * </tr>\r
+ * </table>\r
+ *\r
+ * \section SSec_Description Project Description: \r
+ *\r
+ * Temperature Data Logger project. This project is a very basic USB data logger for the current temperature as reported by\r
+ * the board's temperature sensor, writing the temperature to a file stored on the board's Dataflash in a FAT filesystem\r
+ * each time a specified interval elapses. When inserted into a PC, the datalogger will appear as a standard USB Mass Storage\r
+ * device with a single text file, which contains the logged data.\r
+ *\r
+ * Currently there is no timestamp associated with the logged data; this project can be extended by the addition of a Real\r
+ * Time Clock chip to retain the current time/date which could be stored along with each sample.\r
+ *\r
+ * Due to the host's need for exclusive access to the filesystem, the device will not log samples while connected to a host.\r
+ * For the logger to store data, the Dataflash must first be formatted by the host so that it contains a valid FAT filesystem.\r
+ *\r
+ * \section SSec_Options Project Options\r
+ *\r
+ * The following defines can be found in this demo, which can control the demo behaviour when defined, or changed in value.\r
+ *\r
+ * <table>\r
+ * <tr>\r
+ * <td><b>Define Name:</b></td>\r
+ * <td><b>Location:</b></td>\r
+ * <td><b>Description:</b></td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td>LOG_FILENAME</td>\r
+ * <td>TempDataLogger.h</td>\r
+ * <td>Filename of the log file to write to on the device's FAT filesystem.</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td>LOG_INTERVAL_10MS</td>\r
+ * <td>TempDataLogger.h</td>\r
+ * <td>Time between each data sample, in tens of milliseconds. Each time this period elapses, a\r
+ * temperature sample is taken and the result stored to the Dataflash's FAT filesystem.\r
+ * </td>\r
+ * </tr>\r
+ * </table>\r
+ */\r
--- /dev/null
+# Hey Emacs, this is a -*- makefile -*-\r
+#----------------------------------------------------------------------------\r
+# WinAVR Makefile Template written by Eric B. Weddington, Jörg Wunsch, et al.\r
+# >> Modified for use with the LUFA project. <<\r
+#\r
+# Released to the Public Domain\r
+#\r
+# Additional material for this makefile was written by:\r
+# Peter Fleury\r
+# Tim Henigan\r
+# Colin O'Flynn\r
+# Reiner Patommel\r
+# Markus Pfaff\r
+# Sander Pool\r
+# Frederik Rouleau\r
+# Carlos Lamas\r
+# Dean Camera\r
+# Opendous Inc.\r
+# Denver Gingerich\r
+#\r
+#----------------------------------------------------------------------------\r
+# On command line:\r
+#\r
+# make all = Make software.\r
+#\r
+# make clean = Clean out built project files.\r
+#\r
+# make coff = Convert ELF to AVR COFF.\r
+#\r
+# make extcoff = Convert ELF to AVR Extended COFF.\r
+#\r
+# make program = Download the hex file to the device, using avrdude.\r
+# Please customize the avrdude settings below first!\r
+#\r
+# make dfu = Download the hex file to the device, using dfu-programmer (must\r
+# have dfu-programmer installed).\r
+#\r
+# make flip = Download the hex file to the device, using Atmel FLIP (must\r
+# have Atmel FLIP installed).\r
+#\r
+# make dfu-ee = Download the eeprom file to the device, using dfu-programmer\r
+# (must have dfu-programmer installed).\r
+#\r
+# make flip-ee = Download the eeprom file to the device, using Atmel FLIP\r
+# (must have Atmel FLIP installed).\r
+#\r
+# make doxygen = Generate DoxyGen documentation for the project (must have\r
+# DoxyGen installed)\r
+#\r
+# make debug = Start either simulavr or avarice as specified for debugging, \r
+# with avr-gdb or avr-insight as the front end for debugging.\r
+#\r
+# make filename.s = Just compile filename.c into the assembler code only.\r
+#\r
+# make filename.i = Create a preprocessed source file for use in submitting\r
+# bug reports to the GCC project.\r
+#\r
+# To rebuild project do "make clean" then "make all".\r
+#----------------------------------------------------------------------------\r
+\r
+\r
+# MCU name\r
+MCU = at90usb1287\r
+\r
+\r
+# Target board (see library "Board Types" documentation, USER or blank for projects not requiring\r
+# LUFA board drivers). If USER is selected, put custom board drivers in a directory called \r
+# "Board" inside the application directory.\r
+BOARD = USBKEY\r
+\r
+\r
+# Processor frequency.\r
+# This will define a symbol, F_CPU, in all source code files equal to the \r
+# processor frequency in Hz. You can then use this symbol in your source code to \r
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done\r
+# automatically to create a 32-bit value in your source code.\r
+#\r
+# This will be an integer division of F_CLOCK below, as it is sourced by\r
+# F_CLOCK after it has run through any CPU prescalers. Note that this value\r
+# does not *change* the processor frequency - it should merely be updated to\r
+# reflect the processor speed set externally so that the code can use accurate\r
+# software delays.\r
+F_CPU = 8000000\r
+\r
+\r
+# Input clock frequency.\r
+# This will define a symbol, F_CLOCK, in all source code files equal to the \r
+# input clock frequency (before any prescaling is performed) in Hz. This value may\r
+# differ from F_CPU if prescaling is used on the latter, and is required as the\r
+# raw input clock is fed directly to the PLL sections of the AVR for high speed\r
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'\r
+# at the end, this will be done automatically to create a 32-bit value in your\r
+# source code.\r
+#\r
+# If no clock division is performed on the input clock inside the AVR (via the\r
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
+F_CLOCK = $(F_CPU)\r
+\r
+\r
+# Output format. (can be srec, ihex, binary)\r
+FORMAT = ihex\r
+\r
+\r
+# Target file name (without extension).\r
+TARGET = TempDataLogger\r
+\r
+\r
+# Object files directory\r
+# To put object files in current directory, use a dot (.), do NOT make\r
+# this an empty or blank macro!\r
+OBJDIR = .\r
+\r
+\r
+# Path to the LUFA library\r
+LUFA_PATH = ../../\r
+\r
+\r
+# LUFA library compile-time options\r
+LUFA_OPTS = -D USB_DEVICE_ONLY\r
+LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8\r
+LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1\r
+LUFA_OPTS += -D USE_FLASH_DESCRIPTORS\r
+LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"\r
+\r
+\r
+# List C source files here. (C dependencies are automatically generated.)\r
+SRC = $(TARGET).c \\r
+ Descriptors.c \\r
+ Lib/DataflashManager.c \\r
+ Lib/SCSI.c \\r
+ Lib/FATFs/diskio.c \\r
+ Lib/FATFs/ff.c \\r
+ $(LUFA_PATH)/LUFA/Drivers/Board/Temperature.c \\r
+ $(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/DevChapter9.c \\r
+ $(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Endpoint.c \\r
+ $(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Host.c \\r
+ $(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/HostChapter9.c \\r
+ $(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/LowLevel.c \\r
+ $(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Pipe.c \\r
+ $(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/Events.c \\r
+ $(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBInterrupt.c \\r
+ $(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBTask.c \\r
+ $(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c \\r
+ $(LUFA_PATH)/LUFA/Drivers/USB/Class/Device/MassStorage.c \\r
+ $(LUFA_PATH)/LUFA/Drivers/USB/Class/Host/MassStorage.c \\r
+\r
+\r
+# List C++ source files here. (C dependencies are automatically generated.)\r
+CPPSRC = \r
+\r
+\r
+# List Assembler source files here.\r
+# Make them always end in a capital .S. Files ending in a lowercase .s\r
+# will not be considered source files but generated files (assembler\r
+# output from the compiler), and will be deleted upon "make clean"!\r
+# Even though the DOS/Win* filesystem matches both .s and .S the same,\r
+# it will preserve the spelling of the filenames, and gcc itself does\r
+# care about how the name is spelled on its command-line.\r
+ASRC =\r
+\r
+\r
+# Optimization level, can be [0, 1, 2, 3, s]. \r
+# 0 = turn off optimization. s = optimize for size.\r
+# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)\r
+OPT = s\r
+\r
+\r
+# Debugging format.\r
+# Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs.\r
+# AVR Studio 4.10 requires dwarf-2.\r
+# AVR [Extended] COFF format requires stabs, plus an avr-objcopy run.\r
+DEBUG = dwarf-2\r
+\r
+\r
+# List any extra directories to look for include files here.\r
+# Each directory must be seperated by a space.\r
+# Use forward slashes for directory separators.\r
+# For a directory that has spaces, enclose it in quotes.\r
+EXTRAINCDIRS = $(LUFA_PATH)/\r
+\r
+\r
+# Compiler flag to set the C Standard level.\r
+# c89 = "ANSI" C\r
+# gnu89 = c89 plus GCC extensions\r
+# c99 = ISO C99 standard (not yet fully implemented)\r
+# gnu99 = c99 plus GCC extensions\r
+CSTANDARD = -std=gnu99\r
+\r
+\r
+# Place -D or -U options here for C sources\r
+CDEFS = -DF_CPU=$(F_CPU)UL -DF_CLOCK=$(F_CLOCK)UL -DBOARD=BOARD_$(BOARD) $(LUFA_OPTS)\r
+CDEFS += -DAVR_RESET_LINE_PORT="PORTD"\r
+CDEFS += -DAVR_RESET_LINE_DDR="DDRD"\r
+CDEFS += -DAVR_RESET_LINE_MASK="(1 << 4)"\r
+CDEFS += -DAVR_RESET_PULSE_MS=10\r
+CDEFS += -DTX_RX_LED_PULSE_MS=30\r
+CDEFS += -DPING_PONG_LED_PULSE_MS=100\r
+\r
+# Place -D or -U options here for ASM sources\r
+ADEFS = -DF_CPU=$(F_CPU)\r
+\r
+\r
+# Place -D or -U options here for C++ sources\r
+CPPDEFS = -DF_CPU=$(F_CPU)UL\r
+#CPPDEFS += -D__STDC_LIMIT_MACROS\r
+#CPPDEFS += -D__STDC_CONSTANT_MACROS\r
+\r
+\r
+\r
+#---------------- Compiler Options C ----------------\r
+# -g*: generate debugging information\r
+# -O*: optimization level\r
+# -f...: tuning, see GCC manual and avr-libc documentation\r
+# -Wall...: warning level\r
+# -Wa,...: tell GCC to pass this to the assembler.\r
+# -adhlns...: create assembler listing\r
+CFLAGS = -g$(DEBUG)\r
+CFLAGS += $(CDEFS)\r
+CFLAGS += -O$(OPT)\r
+CFLAGS += -funsigned-char\r
+CFLAGS += -funsigned-bitfields\r
+CFLAGS += -ffunction-sections\r
+CFLAGS += -fno-inline-small-functions\r
+CFLAGS += -fpack-struct\r
+CFLAGS += -fshort-enums\r
+CFLAGS += -Wall\r
+CFLAGS += -Wstrict-prototypes\r
+CFLAGS += -Wundef\r
+#CFLAGS += -fno-unit-at-a-time\r
+#CFLAGS += -Wunreachable-code\r
+#CFLAGS += -Wsign-compare\r
+CFLAGS += -Wa,-adhlns=$(<:%.c=$(OBJDIR)/%.lst)\r
+CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
+CFLAGS += $(CSTANDARD)\r
+\r
+\r
+#---------------- Compiler Options C++ ----------------\r
+# -g*: generate debugging information\r
+# -O*: optimization level\r
+# -f...: tuning, see GCC manual and avr-libc documentation\r
+# -Wall...: warning level\r
+# -Wa,...: tell GCC to pass this to the assembler.\r
+# -adhlns...: create assembler listing\r
+CPPFLAGS = -g$(DEBUG)\r
+CPPFLAGS += $(CPPDEFS)\r
+CPPFLAGS += -O$(OPT)\r
+CPPFLAGS += -funsigned-char\r
+CPPFLAGS += -funsigned-bitfields\r
+CPPFLAGS += -fpack-struct\r
+CPPFLAGS += -fshort-enums\r
+CPPFLAGS += -fno-exceptions\r
+CPPFLAGS += -Wall\r
+CFLAGS += -Wundef\r
+#CPPFLAGS += -mshort-calls\r
+#CPPFLAGS += -fno-unit-at-a-time\r
+#CPPFLAGS += -Wstrict-prototypes\r
+#CPPFLAGS += -Wunreachable-code\r
+#CPPFLAGS += -Wsign-compare\r
+CPPFLAGS += -Wa,-adhlns=$(<:%.cpp=$(OBJDIR)/%.lst)\r
+CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
+#CPPFLAGS += $(CSTANDARD)\r
+\r
+\r
+#---------------- Assembler Options ----------------\r
+# -Wa,...: tell GCC to pass this to the assembler.\r
+# -adhlns: create listing\r
+# -gstabs: have the assembler create line number information; note that\r
+# for use in COFF files, additional information about filenames\r
+# and function names needs to be present in the assembler source\r
+# files -- see avr-libc docs [FIXME: not yet described there]\r
+# -listing-cont-lines: Sets the maximum number of continuation lines of hex \r
+# dump that will be displayed for a given single line of source input.\r
+ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:%.S=$(OBJDIR)/%.lst),-gstabs,--listing-cont-lines=100\r
+\r
+\r
+#---------------- Library Options ----------------\r
+# Minimalistic printf version\r
+PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min\r
+\r
+# Floating point printf version (requires MATH_LIB = -lm below)\r
+PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt\r
+\r
+# If this is left blank, then it will use the Standard printf version.\r
+PRINTF_LIB = \r
+#PRINTF_LIB = $(PRINTF_LIB_MIN)\r
+#PRINTF_LIB = $(PRINTF_LIB_FLOAT)\r
+\r
+\r
+# Minimalistic scanf version\r
+SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min\r
+\r
+# Floating point + %[ scanf version (requires MATH_LIB = -lm below)\r
+SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt\r
+\r
+# If this is left blank, then it will use the Standard scanf version.\r
+SCANF_LIB = \r
+#SCANF_LIB = $(SCANF_LIB_MIN)\r
+#SCANF_LIB = $(SCANF_LIB_FLOAT)\r
+\r
+\r
+MATH_LIB = -lm\r
+\r
+\r
+# List any extra directories to look for libraries here.\r
+# Each directory must be seperated by a space.\r
+# Use forward slashes for directory separators.\r
+# For a directory that has spaces, enclose it in quotes.\r
+EXTRALIBDIRS = \r
+\r
+\r
+\r
+#---------------- External Memory Options ----------------\r
+\r
+# 64 KB of external RAM, starting after internal RAM (ATmega128!),\r
+# used for variables (.data/.bss) and heap (malloc()).\r
+#EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff\r
+\r
+# 64 KB of external RAM, starting after internal RAM (ATmega128!),\r
+# only used for heap (malloc()).\r
+#EXTMEMOPTS = -Wl,--section-start,.data=0x801100,--defsym=__heap_end=0x80ffff\r
+\r
+EXTMEMOPTS =\r
+\r
+\r
+\r
+#---------------- Linker Options ----------------\r
+# -Wl,...: tell GCC to pass this to linker.\r
+# -Map: create map file\r
+# --cref: add cross reference to map file\r
+LDFLAGS = -Wl,-Map=$(TARGET).map,--cref\r
+LDFLAGS += -Wl,--relax \r
+LDFLAGS += -Wl,--gc-sections\r
+LDFLAGS += $(EXTMEMOPTS)\r
+LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS))\r
+LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)\r
+#LDFLAGS += -T linker_script.x\r
+\r
+\r
+\r
+#---------------- Programming Options (avrdude) ----------------\r
+\r
+# Programming hardware: alf avr910 avrisp bascom bsd \r
+# dt006 pavr picoweb pony-stk200 sp12 stk200 stk500\r
+#\r
+# Type: avrdude -c ?\r
+# to get a full listing.\r
+#\r
+AVRDUDE_PROGRAMMER = jtagmkII\r
+\r
+# com1 = serial port. Use lpt1 to connect to parallel port.\r
+AVRDUDE_PORT = usb\r
+\r
+AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex\r
+#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep\r
+\r
+\r
+# Uncomment the following if you want avrdude's erase cycle counter.\r
+# Note that this counter needs to be initialized first using -Yn,\r
+# see avrdude manual.\r
+#AVRDUDE_ERASE_COUNTER = -y\r
+\r
+# Uncomment the following if you do /not/ wish a verification to be\r
+# performed after programming the device.\r
+#AVRDUDE_NO_VERIFY = -V\r
+\r
+# Increase verbosity level. Please use this when submitting bug\r
+# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude> \r
+# to submit bug reports.\r
+#AVRDUDE_VERBOSE = -v -v\r
+\r
+AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)\r
+AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)\r
+AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)\r
+AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)\r
+\r
+\r
+\r
+#---------------- Debugging Options ----------------\r
+\r
+# For simulavr only - target MCU frequency.\r
+DEBUG_MFREQ = $(F_CPU)\r
+\r
+# Set the DEBUG_UI to either gdb or insight.\r
+# DEBUG_UI = gdb\r
+DEBUG_UI = insight\r
+\r
+# Set the debugging back-end to either avarice, simulavr.\r
+DEBUG_BACKEND = avarice\r
+#DEBUG_BACKEND = simulavr\r
+\r
+# GDB Init Filename.\r
+GDBINIT_FILE = __avr_gdbinit\r
+\r
+# When using avarice settings for the JTAG\r
+JTAG_DEV = /dev/com1\r
+\r
+# Debugging port used to communicate between GDB / avarice / simulavr.\r
+DEBUG_PORT = 4242\r
+\r
+# Debugging host used to communicate between GDB / avarice / simulavr, normally\r
+# just set to localhost unless doing some sort of crazy debugging when \r
+# avarice is running on a different computer.\r
+DEBUG_HOST = localhost\r
+\r
+\r
+\r
+#============================================================================\r
+\r
+\r
+# Define programs and commands.\r
+SHELL = sh\r
+CC = avr-gcc\r
+OBJCOPY = avr-objcopy\r
+OBJDUMP = avr-objdump\r
+SIZE = avr-size\r
+AR = avr-ar rcs\r
+NM = avr-nm\r
+AVRDUDE = avrdude\r
+REMOVE = rm -f\r
+REMOVEDIR = rm -rf\r
+COPY = cp\r
+WINSHELL = cmd\r
+\r
+# Define Messages\r
+# English\r
+MSG_ERRORS_NONE = Errors: none\r
+MSG_BEGIN = -------- begin --------\r
+MSG_END = -------- end --------\r
+MSG_SIZE_BEFORE = Size before: \r
+MSG_SIZE_AFTER = Size after:\r
+MSG_COFF = Converting to AVR COFF:\r
+MSG_EXTENDED_COFF = Converting to AVR Extended COFF:\r
+MSG_FLASH = Creating load file for Flash:\r
+MSG_EEPROM = Creating load file for EEPROM:\r
+MSG_EXTENDED_LISTING = Creating Extended Listing:\r
+MSG_SYMBOL_TABLE = Creating Symbol Table:\r
+MSG_LINKING = Linking:\r
+MSG_COMPILING = Compiling C:\r
+MSG_COMPILING_CPP = Compiling C++:\r
+MSG_ASSEMBLING = Assembling:\r
+MSG_CLEANING = Cleaning project:\r
+MSG_CREATING_LIBRARY = Creating library:\r
+\r
+\r
+\r
+\r
+# Define all object files.\r
+OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o) \r
+\r
+# Define all listing files.\r
+LST = $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst) \r
+\r
+\r
+# Compiler flags to generate dependency files.\r
+GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d\r
+\r
+\r
+# Combine all necessary flags and optional flags.\r
+# Add target processor to flags.\r
+ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)\r
+ALL_CPPFLAGS = -mmcu=$(MCU) -I. -x c++ $(CPPFLAGS) $(GENDEPFLAGS)\r
+ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)\r
+\r
+\r
+\r
+\r
+\r
+# Default target.\r
+all: begin gccversion sizebefore build checkinvalidevents showliboptions showtarget sizeafter end\r
+\r
+# Change the build target to build a HEX file or a library.\r
+build: elf hex eep lss sym\r
+#build: lib\r
+\r
+\r
+elf: $(TARGET).elf\r
+hex: $(TARGET).hex\r
+eep: $(TARGET).eep\r
+lss: $(TARGET).lss\r
+sym: $(TARGET).sym\r
+LIBNAME=lib$(TARGET).a\r
+lib: $(LIBNAME)\r
+\r
+\r
+\r
+# Eye candy.\r
+# AVR Studio 3.x does not check make's exit code but relies on\r
+# the following magic strings to be generated by the compile job.\r
+begin:\r
+ @echo\r
+ @echo $(MSG_BEGIN)\r
+\r
+end:\r
+ @echo $(MSG_END)\r
+ @echo\r
+\r
+\r
+# Display size of file.\r
+HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex\r
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf\r
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )\r
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )\r
+\r
+sizebefore:\r
+ @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \\r
+ 2>/dev/null; echo; fi\r
+\r
+sizeafter:\r
+ @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \\r
+ 2>/dev/null; echo; fi\r
+\r
+$(LUFA_PATH)/LUFA/LUFA_Events.lst:\r
+ @make -C $(LUFA_PATH)/LUFA/ LUFA_Events.lst\r
+\r
+checkinvalidevents: $(LUFA_PATH)/LUFA/LUFA_Events.lst\r
+ @echo\r
+ @echo Checking for invalid events...\r
+ @$(shell) avr-nm $(OBJ) | sed -n -e 's/^.*EVENT_/EVENT_/p' | \\r
+ grep -F -v --file=$(LUFA_PATH)/LUFA/LUFA_Events.lst > InvalidEvents.tmp || true\r
+ @sed -n -e 's/^/ WARNING - INVALID EVENT NAME: /p' InvalidEvents.tmp\r
+ @if test -s InvalidEvents.tmp; then exit 1; fi\r
+ \r
+showliboptions:\r
+ @echo\r
+ @echo ---- Compile Time Library Options ----\r
+ @for i in $(LUFA_OPTS:-D%=%); do \\r
+ echo $$i; \\r
+ done\r
+ @echo --------------------------------------\r
+\r
+showtarget:\r
+ @echo\r
+ @echo --------- Target Information ---------\r
+ @echo AVR Model: $(MCU)\r
+ @echo Board: $(BOARD)\r
+ @echo Clock: $(F_CPU)Hz CPU, $(F_CLOCK)Hz Master\r
+ @echo --------------------------------------\r
+ \r
+\r
+# Display compiler version information.\r
+gccversion : \r
+ @$(CC) --version\r
+\r
+\r
+# Program the device. \r
+program: $(TARGET).hex $(TARGET).eep\r
+ $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)\r
+\r
+flip: $(TARGET).hex\r
+ batchisp -hardware usb -device $(MCU) -operation erase f\r
+ batchisp -hardware usb -device $(MCU) -operation loadbuffer $(TARGET).hex program\r
+ batchisp -hardware usb -device $(MCU) -operation start reset 0\r
+\r
+dfu: $(TARGET).hex\r
+ dfu-programmer $(MCU) erase\r
+ dfu-programmer $(MCU) flash --debug 1 $(TARGET).hex\r
+ dfu-programmer $(MCU) reset\r
+\r
+flip-ee: $(TARGET).hex $(TARGET).eep\r
+ $(COPY) $(TARGET).eep $(TARGET)eep.hex\r
+ batchisp -hardware usb -device $(MCU) -operation memory EEPROM erase\r
+ batchisp -hardware usb -device $(MCU) -operation memory EEPROM loadbuffer $(TARGET)eep.hex program\r
+ batchisp -hardware usb -device $(MCU) -operation start reset 0\r
+ $(REMOVE) $(TARGET)eep.hex\r
+\r
+dfu-ee: $(TARGET).hex $(TARGET).eep\r
+ dfu-programmer $(MCU) flash-eeprom --debug 1 --suppress-bootloader-mem $(TARGET).eep\r
+ dfu-programmer $(MCU) reset\r
+\r
+\r
+# Generate avr-gdb config/init file which does the following:\r
+# define the reset signal, load the target file, connect to target, and set \r
+# a breakpoint at main().\r
+gdb-config: \r
+ @$(REMOVE) $(GDBINIT_FILE)\r
+ @echo define reset >> $(GDBINIT_FILE)\r
+ @echo SIGNAL SIGHUP >> $(GDBINIT_FILE)\r
+ @echo end >> $(GDBINIT_FILE)\r
+ @echo file $(TARGET).elf >> $(GDBINIT_FILE)\r
+ @echo target remote $(DEBUG_HOST):$(DEBUG_PORT) >> $(GDBINIT_FILE)\r
+ifeq ($(DEBUG_BACKEND),simulavr)\r
+ @echo load >> $(GDBINIT_FILE)\r
+endif\r
+ @echo break main >> $(GDBINIT_FILE)\r
+\r
+debug: gdb-config $(TARGET).elf\r
+ifeq ($(DEBUG_BACKEND), avarice)\r
+ @echo Starting AVaRICE - Press enter when "waiting to connect" message displays.\r
+ @$(WINSHELL) /c start avarice --jtag $(JTAG_DEV) --erase --program --file \\r
+ $(TARGET).elf $(DEBUG_HOST):$(DEBUG_PORT)\r
+ @$(WINSHELL) /c pause\r
+\r
+else\r
+ @$(WINSHELL) /c start simulavr --gdbserver --device $(MCU) --clock-freq \\r
+ $(DEBUG_MFREQ) --port $(DEBUG_PORT)\r
+endif\r
+ @$(WINSHELL) /c start avr-$(DEBUG_UI) --command=$(GDBINIT_FILE)\r
+\r
+\r
+\r
+\r
+# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.\r
+COFFCONVERT = $(OBJCOPY) --debugging\r
+COFFCONVERT += --change-section-address .data-0x800000\r
+COFFCONVERT += --change-section-address .bss-0x800000\r
+COFFCONVERT += --change-section-address .noinit-0x800000\r
+COFFCONVERT += --change-section-address .eeprom-0x810000\r
+\r
+\r
+\r
+coff: $(TARGET).elf\r
+ @echo\r
+ @echo $(MSG_COFF) $(TARGET).cof\r
+ $(COFFCONVERT) -O coff-avr $< $(TARGET).cof\r
+\r
+\r
+extcoff: $(TARGET).elf\r
+ @echo\r
+ @echo $(MSG_EXTENDED_COFF) $(TARGET).cof\r
+ $(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof\r
+\r
+\r
+\r
+# Create final output files (.hex, .eep) from ELF output file.\r
+%.hex: %.elf\r
+ @echo\r
+ @echo $(MSG_FLASH) $@\r
+ $(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@\r
+\r
+%.eep: %.elf\r
+ @echo\r
+ @echo $(MSG_EEPROM) $@\r
+ -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \\r
+ --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) $< $@ || exit 0\r
+\r
+# Create extended listing file from ELF output file.\r
+%.lss: %.elf\r
+ @echo\r
+ @echo $(MSG_EXTENDED_LISTING) $@\r
+ $(OBJDUMP) -h -z -S $< > $@\r
+\r
+# Create a symbol table from ELF output file.\r
+%.sym: %.elf\r
+ @echo\r
+ @echo $(MSG_SYMBOL_TABLE) $@\r
+ $(NM) -n $< > $@\r
+\r
+\r
+\r
+# Create library from object files.\r
+.SECONDARY : $(TARGET).a\r
+.PRECIOUS : $(OBJ)\r
+%.a: $(OBJ)\r
+ @echo\r
+ @echo $(MSG_CREATING_LIBRARY) $@\r
+ $(AR) $@ $(OBJ)\r
+\r
+\r
+# Link: create ELF output file from object files.\r
+.SECONDARY : $(TARGET).elf\r
+.PRECIOUS : $(OBJ)\r
+%.elf: $(OBJ)\r
+ @echo\r
+ @echo $(MSG_LINKING) $@\r
+ $(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS)\r
+\r
+\r
+# Compile: create object files from C source files.\r
+$(OBJDIR)/%.o : %.c\r
+ @echo\r
+ @echo $(MSG_COMPILING) $<\r
+ $(CC) -c $(ALL_CFLAGS) $< -o $@ \r
+\r
+\r
+# Compile: create object files from C++ source files.\r
+$(OBJDIR)/%.o : %.cpp\r
+ @echo\r
+ @echo $(MSG_COMPILING_CPP) $<\r
+ $(CC) -c $(ALL_CPPFLAGS) $< -o $@ \r
+\r
+\r
+# Compile: create assembler files from C source files.\r
+%.s : %.c\r
+ $(CC) -S $(ALL_CFLAGS) $< -o $@\r
+\r
+\r
+# Compile: create assembler files from C++ source files.\r
+%.s : %.cpp\r
+ $(CC) -S $(ALL_CPPFLAGS) $< -o $@\r
+\r
+\r
+# Assemble: create object files from assembler source files.\r
+$(OBJDIR)/%.o : %.S\r
+ @echo\r
+ @echo $(MSG_ASSEMBLING) $<\r
+ $(CC) -c $(ALL_ASFLAGS) $< -o $@\r
+\r
+\r
+# Create preprocessed source for use in sending a bug report.\r
+%.i : %.c\r
+ $(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@ \r
+ \r
+\r
+# Target: clean project.\r
+clean: begin clean_list clean_binary end\r
+\r
+clean_binary:\r
+ $(REMOVE) $(TARGET).hex\r
+ \r
+clean_list:\r
+ @echo $(MSG_CLEANING)\r
+ $(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET)eep.hex\r
+ $(REMOVE) $(TARGET).cof\r
+ $(REMOVE) $(TARGET).elf\r
+ $(REMOVE) $(TARGET).map\r
+ $(REMOVE) $(TARGET).sym\r
+ $(REMOVE) $(TARGET).lss\r
+ $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.o)\r
+ $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.lst)\r
+ $(REMOVE) $(SRC:.c=.s)\r
+ $(REMOVE) $(SRC:.c=.d)\r
+ $(REMOVE) $(SRC:.c=.i)\r
+ $(REMOVE) InvalidEvents.tmp\r
+ $(REMOVEDIR) .dep\r
+\r
+doxygen:\r
+ @echo Generating Project Documentation...\r
+ @doxygen Doxygen.conf\r
+ @echo Documentation Generation Complete.\r
+\r
+clean_doxygen:\r
+ rm -rf Documentation\r
+\r
+# Create object files directory\r
+$(shell mkdir $(OBJDIR) 2>/dev/null)\r
+\r
+\r
+# Include the dependency files.\r
+-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)\r
+\r
+\r
+# Listing of phony targets.\r
+.PHONY : all checkinvalidevents showliboptions \\r
+showtarget begin finish end sizebefore sizeafter \\r
+gccversion build elf hex eep lss sym coff extcoff \\r
+program dfu flip flip-ee dfu-ee clean debug \\r
+clean_list clean_binary gdb-config doxygen
\ No newline at end of file
make -C MissileLauncher clean
make -C MissileLauncher all
+ make -C TemperatureDataLogger clean
+ make -C TemperatureDataLogger all
+
make -C USBtoSerial clean
make -C USBtoSerial all
make -C LEDNotifier $@
make -C Magstripe $@
make -C MissileLauncher $@
+ make -C TemperatureDataLogger $@
make -C USBtoSerial $@
make -C XPLAINBridge $@