Add new (incomplete) StandaloneProgrammer project, using the ELM Petite FAT library to read files stored on the board's dataflash by the host.
#include "MassStorage.h"\r
#include "Descriptors.h"\r
\r
- #include <LUFA/Common/Common.h> // Function Attribute, Atomic, Debug and ISR Macros\r
- #include <LUFA/Drivers/USB/USB.h> // USB Functionality\r
- #include <LUFA/Drivers/Board/Dataflash.h> // Dataflash chip driver\r
+ #include <LUFA/Common/Common.h> // Function Attribute, Atomic, Debug and ISR Macros\r
+ #include <LUFA/Drivers/USB/USB.h> // USB Functionality\r
+ #include <LUFA/Drivers/USB/Class/MassStorage.h> // Mass Storage Class Driver\r
+ #include <LUFA/Drivers/Board/Dataflash.h> // Dataflash chip driver\r
\r
/* Preprocessor Checks: */\r
#if (DATAFLASH_PAGE_SIZE % 16)\r
#include "Lib/DataflashManager.h"\r
\r
#include <LUFA/Version.h>\r
- #include <LUFA/Drivers/Board/Joystick.h>\r
#include <LUFA/Drivers/Board/LEDs.h>\r
- #include <LUFA/Drivers/Board/Buttons.h>\r
#include <LUFA/Drivers/USB/USB.h>\r
#include <LUFA/Drivers/USB/Class/MassStorage.h>
\r
return USB_Host_SendControlRequest(Buffer);\r
}\r
\r
-uint8_t RNDIS_KeepAlive(void)\r
+uint8_t RNDIS_SendKeepAlive(void)\r
{\r
uint8_t ErrorCode;\r
\r
uint8_t RNDIS_SendEncapsulatedCommand(void* Buffer, uint16_t Length);\r
uint8_t RNDIS_GetEncapsulatedResponse(void* Buffer, uint16_t Length);\r
\r
- uint8_t RNDIS_KeepAlive(void);\r
+ uint8_t RNDIS_SendKeepAlive(void);\r
uint8_t RNDIS_InitializeDevice(uint16_t HostMaxPacketSize, uint16_t* DeviceMaxPacketSize);\r
uint8_t RNDIS_SetRNDISProperty(uint32_t Oid, void* Buffer, uint16_t Length);\r
uint8_t RNDIS_QueryRNDISProperty(uint32_t Oid, void* Buffer, uint16_t MaxLength);\r
break;\r
}\r
\r
+ uint32_t RetrievedPacketFilter;\r
+ if ((ErrorCode = RNDIS_QueryRNDISProperty(OID_GEN_CURRENT_PACKET_FILTER,\r
+ &RetrievedPacketFilter, sizeof(RetrievedPacketFilter))) != HOST_SENDCONTROL_Successful)\r
+ {\r
+ printf_P(PSTR(ESC_FG_RED "Error Getting Packet Filter.\r\n"\r
+ " -- Error Code: %d\r\n" ESC_FG_WHITE), ErrorCode);\r
+\r
+ /* Indicate error via status LEDs */\r
+ LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
+\r
+ /* Wait until USB device disconnected */\r
+ USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
+ break;\r
+ }\r
+ \r
+ if (RetrievedPacketFilter != PacketFilter)\r
+ printf("ERROR: Retrieved Packet Filter %08lx != Set Packet Filter %08lx!\r\n", RetrievedPacketFilter, PacketFilter);\r
+\r
uint32_t VendorID;\r
if ((ErrorCode = RNDIS_QueryRNDISProperty(OID_GEN_VENDOR_ID,\r
&VendorID, sizeof(VendorID))) != HOST_SENDCONTROL_Successful)\r
-<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="CDC"><File path="Demos\Device\ClassDriver\CDC\CDC.c"></File><File path="Demos\Device\ClassDriver\CDC\CDC.h"></File><File path="Demos\Device\ClassDriver\CDC\CDC.txt"></File><File path="Demos\Device\ClassDriver\CDC\Descriptors.c"></File><File path="Demos\Device\ClassDriver\CDC\Descriptors.h"></File><File path="Demos\Device\ClassDriver\CDC\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\CDC\LUFA CDC.inf"></File><File path="Demos\Device\ClassDriver\CDC\makefile"></File></Folder><Folder name="CDCMouse"><File path="Demos\Device\ClassDriver\CDCMouse\CDCMouse.c"></File><File path="Demos\Device\ClassDriver\CDCMouse\CDCMouse.h"></File><File path="Demos\Device\ClassDriver\CDCMouse\CDCMouse.txt"></File><File path="Demos\Device\ClassDriver\CDCMouse\Descriptors.c"></File><File path="Demos\Device\ClassDriver\CDCMouse\Descriptors.h"></File><File path="Demos\Device\ClassDriver\CDCMouse\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\CDCMouse\LUFA CDCMouse.inf"></File><File path="Demos\Device\ClassDriver\CDCMouse\makefile"></File></Folder><Folder name="DualCDC"><File path="Demos\Device\ClassDriver\DualCDC\Descriptors.c"></File><File path="Demos\Device\ClassDriver\DualCDC\Descriptors.h"></File><File path="Demos\Device\ClassDriver\DualCDC\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\DualCDC\DualCDC.c"></File><File path="Demos\Device\ClassDriver\DualCDC\DualCDC.h"></File><File path="Demos\Device\ClassDriver\DualCDC\DualCDC.txt"></File><File path="Demos\Device\ClassDriver\DualCDC\LUFA DualCDC.inf"></File><File path="Demos\Device\ClassDriver\DualCDC\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><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="CDC"><File path="Demos\Device\LowLevel\CDC\CDC.c"></File><File path="Demos\Device\LowLevel\CDC\CDC.h"></File><File path="Demos\Device\LowLevel\CDC\CDC.txt"></File><File path="Demos\Device\LowLevel\CDC\Descriptors.c"></File><File path="Demos\Device\LowLevel\CDC\Descriptors.h"></File><File path="Demos\Device\LowLevel\CDC\Doxygen.conf"></File><File path="Demos\Device\LowLevel\CDC\LUFA CDC.inf"></File><File path="Demos\Device\LowLevel\CDC\makefile"></File></Folder><Folder name="DualCDC"><File path="Demos\Device\LowLevel\DualCDC\Descriptors.c"></File><File path="Demos\Device\LowLevel\DualCDC\Descriptors.h"></File><File path="Demos\Device\LowLevel\DualCDC\Doxygen.conf"></File><File path="Demos\Device\LowLevel\DualCDC\DualCDC.c"></File><File path="Demos\Device\LowLevel\DualCDC\DualCDC.h"></File><File path="Demos\Device\LowLevel\DualCDC\DualCDC.txt"></File><File path="Demos\Device\LowLevel\DualCDC\LUFA DualCDC.inf"></File><File path="Demos\Device\LowLevel\DualCDC\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><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="CDCHost"><File path="Demos\Host\ClassDriver\CDCHost\CDCHost.c"></File><File path="Demos\Host\ClassDriver\CDCHost\CDCHost.h"></File><File path="Demos\Host\ClassDriver\CDCHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\CDCHost\makefile"></File><File path="Demos\Host\ClassDriver\CDCHost\CDCHost.txt"></File></Folder><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="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><File path="Demos\Host\ClassDriver\makefile"></File></Folder><Folder name="LowLevel"><Folder name="CDCHost"><File path="Demos\Host\LowLevel\CDCHost\CDCHost.c"></File><File path="Demos\Host\LowLevel\CDCHost\CDCHost.h"></File><File path="Demos\Host\LowLevel\CDCHost\CDCHost.txt"></File><File path="Demos\Host\LowLevel\CDCHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\CDCHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\CDCHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\CDCHost\makefile"></File></Folder><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="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><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 name="RNDISEthernetHost"><Folder name="Lib"><File path="Demos\Host\Incomplete\RNDISEthernetHost\Lib\RNDISCommands.c"></File><File path="Demos\Host\Incomplete\RNDISEthernetHost\Lib\RNDISCommands.h"></File><File path="Demos\Host\Incomplete\RNDISEthernetHost\Lib\RNDISConstants.h"></File></Folder><File path="Demos\Host\Incomplete\RNDISEthernetHost\ConfigDescriptor.c"></File><File path="Demos\Host\Incomplete\RNDISEthernetHost\ConfigDescriptor.h"></File><File path="Demos\Host\Incomplete\RNDISEthernetHost\makefile"></File><File path="Demos\Host\Incomplete\RNDISEthernetHost\RNDISEthernetHost.c"></File><File path="Demos\Host\Incomplete\RNDISEthernetHost\RNDISEthernetHost.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\RNDISConstants.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></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></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></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></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="Projects"><Folder name="AVRISP"><Folder name="Lib"><File path="Projects\AVRISP\Lib\V2Protocol.c"></File><File path="Projects\AVRISP\Lib\V2Protocol.h"></File><File path="Projects\AVRISP\Lib\V2ProtocolConstants.h"></File><File path="Projects\AVRISP\Lib\V2ProtocolParams.c"></File><File path="Projects\AVRISP\Lib\V2ProtocolParams.h"></File><File path="Projects\AVRISP\Lib\V2ProtocolTarget.c"></File><File path="Projects\AVRISP\Lib\V2ProtocolTarget.h"></File></Folder><File path="Projects\AVRISP\AVRISP.c"></File><File path="Projects\AVRISP\AVRISP.h"></File><File path="Projects\AVRISP\AVRISP.txt"></File><File path="Projects\AVRISP\Descriptors.c"></File><File path="Projects\AVRISP\Descriptors.h"></File><File path="Projects\AVRISP\Doxygen.conf"></File><File path="Projects\AVRISP\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="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><File path="Projects\makefile"></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><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="CDC"><File path="Demos\Device\ClassDriver\CDC\CDC.c"></File><File path="Demos\Device\ClassDriver\CDC\CDC.h"></File><File path="Demos\Device\ClassDriver\CDC\CDC.txt"></File><File path="Demos\Device\ClassDriver\CDC\Descriptors.c"></File><File path="Demos\Device\ClassDriver\CDC\Descriptors.h"></File><File path="Demos\Device\ClassDriver\CDC\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\CDC\LUFA CDC.inf"></File><File path="Demos\Device\ClassDriver\CDC\makefile"></File></Folder><Folder name="CDCMouse"><File path="Demos\Device\ClassDriver\CDCMouse\CDCMouse.c"></File><File path="Demos\Device\ClassDriver\CDCMouse\CDCMouse.h"></File><File path="Demos\Device\ClassDriver\CDCMouse\CDCMouse.txt"></File><File path="Demos\Device\ClassDriver\CDCMouse\Descriptors.c"></File><File path="Demos\Device\ClassDriver\CDCMouse\Descriptors.h"></File><File path="Demos\Device\ClassDriver\CDCMouse\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\CDCMouse\LUFA CDCMouse.inf"></File><File path="Demos\Device\ClassDriver\CDCMouse\makefile"></File></Folder><Folder name="DualCDC"><File path="Demos\Device\ClassDriver\DualCDC\Descriptors.c"></File><File path="Demos\Device\ClassDriver\DualCDC\Descriptors.h"></File><File path="Demos\Device\ClassDriver\DualCDC\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\DualCDC\DualCDC.c"></File><File path="Demos\Device\ClassDriver\DualCDC\DualCDC.h"></File><File path="Demos\Device\ClassDriver\DualCDC\DualCDC.txt"></File><File path="Demos\Device\ClassDriver\DualCDC\LUFA DualCDC.inf"></File><File path="Demos\Device\ClassDriver\DualCDC\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><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="CDC"><File path="Demos\Device\LowLevel\CDC\CDC.c"></File><File path="Demos\Device\LowLevel\CDC\CDC.h"></File><File path="Demos\Device\LowLevel\CDC\CDC.txt"></File><File path="Demos\Device\LowLevel\CDC\Descriptors.c"></File><File path="Demos\Device\LowLevel\CDC\Descriptors.h"></File><File path="Demos\Device\LowLevel\CDC\Doxygen.conf"></File><File path="Demos\Device\LowLevel\CDC\LUFA CDC.inf"></File><File path="Demos\Device\LowLevel\CDC\makefile"></File></Folder><Folder name="DualCDC"><File path="Demos\Device\LowLevel\DualCDC\Descriptors.c"></File><File path="Demos\Device\LowLevel\DualCDC\Descriptors.h"></File><File path="Demos\Device\LowLevel\DualCDC\Doxygen.conf"></File><File path="Demos\Device\LowLevel\DualCDC\DualCDC.c"></File><File path="Demos\Device\LowLevel\DualCDC\DualCDC.h"></File><File path="Demos\Device\LowLevel\DualCDC\DualCDC.txt"></File><File path="Demos\Device\LowLevel\DualCDC\LUFA DualCDC.inf"></File><File path="Demos\Device\LowLevel\DualCDC\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><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="CDCHost"><File path="Demos\Host\ClassDriver\CDCHost\CDCHost.c"></File><File path="Demos\Host\ClassDriver\CDCHost\CDCHost.h"></File><File path="Demos\Host\ClassDriver\CDCHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\CDCHost\makefile"></File><File path="Demos\Host\ClassDriver\CDCHost\CDCHost.txt"></File></Folder><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="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><File path="Demos\Host\ClassDriver\makefile"></File></Folder><Folder name="LowLevel"><Folder name="CDCHost"><File path="Demos\Host\LowLevel\CDCHost\CDCHost.c"></File><File path="Demos\Host\LowLevel\CDCHost\CDCHost.h"></File><File path="Demos\Host\LowLevel\CDCHost\CDCHost.txt"></File><File path="Demos\Host\LowLevel\CDCHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\CDCHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\CDCHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\CDCHost\makefile"></File></Folder><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="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><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 name="RNDISEthernetHost"><Folder name="Lib"><File path="Demos\Host\Incomplete\RNDISEthernetHost\Lib\RNDISCommands.c"></File><File path="Demos\Host\Incomplete\RNDISEthernetHost\Lib\RNDISCommands.h"></File><File path="Demos\Host\Incomplete\RNDISEthernetHost\Lib\RNDISConstants.h"></File></Folder><File path="Demos\Host\Incomplete\RNDISEthernetHost\ConfigDescriptor.c"></File><File path="Demos\Host\Incomplete\RNDISEthernetHost\ConfigDescriptor.h"></File><File path="Demos\Host\Incomplete\RNDISEthernetHost\makefile"></File><File path="Demos\Host\Incomplete\RNDISEthernetHost\RNDISEthernetHost.c"></File><File path="Demos\Host\Incomplete\RNDISEthernetHost\RNDISEthernetHost.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\RNDISConstants.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></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></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></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></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="Projects"><Folder name="AVRISP"><Folder name="Lib"><File path="Projects\AVRISP\Lib\V2Protocol.c"></File><File path="Projects\AVRISP\Lib\V2Protocol.h"></File><File path="Projects\AVRISP\Lib\V2ProtocolConstants.h"></File><File path="Projects\AVRISP\Lib\V2ProtocolParams.c"></File><File path="Projects\AVRISP\Lib\V2ProtocolParams.h"></File><File path="Projects\AVRISP\Lib\V2ProtocolTarget.c"></File><File path="Projects\AVRISP\Lib\V2ProtocolTarget.h"></File></Folder><File path="Projects\AVRISP\AVRISP.c"></File><File path="Projects\AVRISP\AVRISP.h"></File><File path="Projects\AVRISP\AVRISP.txt"></File><File path="Projects\AVRISP\Descriptors.c"></File><File path="Projects\AVRISP\Descriptors.h"></File><File path="Projects\AVRISP\Doxygen.conf"></File><File path="Projects\AVRISP\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="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="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></Folder></Folder><File path="Projects\makefile"></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><File path="makefile"></File><File path="README.txt"></File></Project>
\ No newline at end of file
#define HID_NON_BOOT_PROTOCOL 0x00\r
\r
/** Constant for the protocol value of a HID interface descriptor, indicating that the interface supports the\r
- * HID class Mouse boot protocol (see HID Class Specification).\r
- */\r
- #define HID_BOOT_MOUSE_PROTOCOL 0x02\r
- \r
- /** Constant for the protocol value of a HID interface descriptor, indicating that the interface supports the\r
* HID class Keyboard boot protocol (see HID Class Specification).\r
*/\r
#define HID_BOOT_KEYBOARD_PROTOCOL 0x01\r
\r
+ /** Constant for the protocol value of a HID interface descriptor, indicating that the interface supports the\r
+ * HID class Mouse boot protocol (see HID Class Specification).\r
+ */\r
+ #define HID_BOOT_MOUSE_PROTOCOL 0x02\r
+\r
/* Type Defines: */\r
/** Enum for the different types of HID reports. */\r
enum HID_ReportItemTypes_t\r
* - Make new demos\r
* -# Keyboard/Mouse Dual Class Host\r
* -# Multiple-Report HID device\r
+ * -# Device/Host bridge\r
* - Port LUFA codebase\r
* -# AVR32 UC3B series microcontrollers\r
* -# Atmel ARM7 series microcontrollers\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, and distribute this software\r
+ and its documentation for any purpose and without fee is hereby\r
+ granted, provided that the above copyright notice appear in all\r
+ 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 = 0xEF,\r
+ .SubClass = 0x02,\r
+ .Protocol = 0x01,\r
+ \r
+ .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,\r
+ \r
+ .VendorID = 0x03EB,\r
+ .ProductID = 0x2063,\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 = 3,\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
+ .CDC_IAD = \r
+ {\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_Association_t), .Type = DTYPE_InterfaceAssociation},\r
+\r
+ .FirstInterfaceIndex = 0,\r
+ .TotalInterfaces = 2,\r
+\r
+ .Class = 0x02,\r
+ .SubClass = 0x02,\r
+ .Protocol = 0x01,\r
+\r
+ .IADStrIndex = NO_DESCRIPTOR\r
+ },\r
+\r
+ .CCI_Interface = \r
+ {\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
+\r
+ .InterfaceNumber = 0,\r
+ .AlternateSetting = 0,\r
+ \r
+ .TotalEndpoints = 1,\r
+ \r
+ .Class = 0x02,\r
+ .SubClass = 0x02,\r
+ .Protocol = 0x01,\r
+ \r
+ .InterfaceStrIndex = NO_DESCRIPTOR\r
+ },\r
+\r
+ .CDC_Functional_IntHeader = \r
+ {\r
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},\r
+ .SubType = 0x00,\r
+ \r
+ .Data = {0x01, 0x10}\r
+ },\r
+\r
+ .CDC_Functional_CallManagement = \r
+ {\r
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},\r
+ .SubType = 0x01,\r
+ \r
+ .Data = {0x03, 0x01}\r
+ },\r
+\r
+ .CDC_Functional_AbstractControlManagement = \r
+ {\r
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), .Type = 0x24},\r
+ .SubType = 0x02,\r
+ \r
+ .Data = {0x06}\r
+ },\r
+ \r
+ .CDC_Functional_Union = \r
+ {\r
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},\r
+ .SubType = 0x06,\r
+ \r
+ .Data = {0x00, 0x01}\r
+ },\r
+\r
+ .ManagementEndpoint = \r
+ {\r
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
+ \r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_NOTIFICATION_EPNUM),\r
+ .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),\r
+ .EndpointSize = CDC_NOTIFICATION_EPSIZE,\r
+ .PollingIntervalMS = 0xFF\r
+ },\r
+\r
+ .DCI_Interface = \r
+ {\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
+\r
+ .InterfaceNumber = 1,\r
+ .AlternateSetting = 0,\r
+ \r
+ .TotalEndpoints = 2,\r
+ \r
+ .Class = 0x0A,\r
+ .SubClass = 0x00,\r
+ .Protocol = 0x00,\r
+ \r
+ .InterfaceStrIndex = NO_DESCRIPTOR\r
+ },\r
+\r
+ .DataOutEndpoint = \r
+ {\r
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
+ \r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | CDC_RX_EPNUM),\r
+ .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),\r
+ .EndpointSize = CDC_TXRX_EPSIZE,\r
+ .PollingIntervalMS = 0x00\r
+ },\r
+ \r
+ .DataInEndpoint = \r
+ {\r
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
+ \r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_TX_EPNUM),\r
+ .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),\r
+ .EndpointSize = CDC_TXRX_EPSIZE,\r
+ .PollingIntervalMS = 0x00\r
+ },\r
+\r
+ .MSInterface = \r
+ {\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
+\r
+ .InterfaceNumber = 2,\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
+ .MSDataInEndpoint = \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
+ .MSDataOutEndpoint = \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(26), .Type = DTYPE_String},\r
+ \r
+ .UnicodeString = L"LUFA Standalone Programmer"\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, and distribute this software\r
+ and its documentation for any purpose and without fee is hereby\r
+ granted, provided that the above copyright notice appear in all\r
+ 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
+ #include <LUFA/Drivers/USB/Class/CDC.h>\r
+\r
+ /* Macros: */\r
+ /** Endpoint number of the CDC device-to-host notification IN endpoint. */\r
+ #define CDC_NOTIFICATION_EPNUM 5\r
+\r
+ /** Endpoint number of the CDC device-to-host data IN endpoint. */\r
+ #define CDC_TX_EPNUM 1\r
+\r
+ /** Endpoint number of the CDC host-to-device data OUT endpoint. */\r
+ #define CDC_RX_EPNUM 2\r
+\r
+ /** Size in bytes of the CDC device-to-host notification IN endpoint. */\r
+ #define CDC_NOTIFICATION_EPSIZE 8\r
+\r
+ /** Size in bytes of the CDC data IN and OUT endpoints. */\r
+ #define CDC_TXRX_EPSIZE 16\r
+\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_Association_t CDC_IAD;\r
+ USB_Descriptor_Interface_t CCI_Interface;\r
+ CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_IntHeader;\r
+ CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_CallManagement;\r
+ CDC_FUNCTIONAL_DESCRIPTOR(1) CDC_Functional_AbstractControlManagement;\r
+ CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_Union;\r
+ USB_Descriptor_Endpoint_t ManagementEndpoint;\r
+ USB_Descriptor_Interface_t DCI_Interface;\r
+ USB_Descriptor_Endpoint_t DataOutEndpoint;\r
+ USB_Descriptor_Endpoint_t DataInEndpoint;\r
+ USB_Descriptor_Interface_t MSInterface;\r
+ USB_Descriptor_Endpoint_t MSDataInEndpoint;\r
+ USB_Descriptor_Endpoint_t MSDataOutEndpoint;\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
+/*\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, and distribute this software\r
+ and its documentation for any purpose and without fee is hereby\r
+ granted, provided that the above copyright notice appear in all\r
+ 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, 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, and distribute this software\r
+ and its documentation for any purpose and without fee is hereby\r
+ granted, provided that the above copyright notice appear in all\r
+ 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 "StandaloneProgrammer.h"\r
+ #include "Descriptors.h"\r
+\r
+ #include <LUFA/Common/Common.h> // Function Attribute, Atomic, Debug and ISR Macros\r
+ #include <LUFA/Drivers/USB/USB.h> // USB Functionality\r
+ #include <LUFA/Drivers/USB/Class/MassStorage.h> // Mass Storage Class Driver\r
+ #include <LUFA/Drivers/Board/Dataflash.h> // Dataflash chip driver\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
+ 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
+Petit FatFs Module Source Files R0.01a (C)ChaN, 2009\r
+\r
+\r
+FILES\r
+\r
+ pff.h Common include file for Petit FatFs and application module.\r
+ pff.c Petit FatFs module.\r
+ diskio.h Common include file for Petit 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
+\r
+ Low level disk I/O module is not included in this archive because the Petit\r
+ FatFs module is only a generic file system layer and not depend on any\r
+ specific storage device. You have to provide a low level disk I/O module that\r
+ written to control your storage device.\r
+\r
+\r
+\r
+AGREEMENTS\r
+\r
+ Petit 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 Petit 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 use UNDER YOUR RESPONSIBILITY.\r
+ * Redistributions of source code must retain the above copyright notice.\r
+\r
+\r
+\r
+REVISION HISTORY\r
+\r
+ Jun 15, 2009 R0.01a First release (Branched from FatFs R0.07b)\r
--- /dev/null
+/*-----------------------------------------------------------------------*/\r
+/* Low level disk I/O module skeleton for Petit FatFs (C)ChaN, 2009 */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+#include "diskio.h"\r
+\r
+#include <string.h>\r
+#include "../DataflashManager.h"\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Initialize Disk Drive */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+DSTATUS disk_initialize (void)\r
+{\r
+ DSTATUS stat;\r
+\r
+ stat = RES_OK;\r
+\r
+ return stat;\r
+}\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Read Partial Sector */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+DRESULT disk_readp (\r
+ void* dest, /* Pointer to the destination object */\r
+ DWORD sector, /* Sector number (LBA) */\r
+ WORD sofs, /* Offset in the sector */\r
+ WORD count /* Byte count (bit15:destination) */\r
+)\r
+{\r
+ DRESULT res;\r
+\r
+ uint8_t BlockTemp[512];\r
+ DataflashManager_ReadBlocks_RAM(sector, 1, BlockTemp);\r
+ memcpy(dest, &BlockTemp[sofs], count);\r
+\r
+ res = RES_OK;\r
+\r
+ return res;\r
+}\r
+\r
--- /dev/null
+/*-----------------------------------------------------------------------\r
+/ PFF - Low level disk interface modlue include file (C)ChaN, 2009\r
+/-----------------------------------------------------------------------*/\r
+\r
+#ifndef _DISKIO\r
+\r
+#include "integer.h"\r
+\r
+\r
+/* Status of Disk Functions */\r
+typedef BYTE DSTATUS;\r
+\r
+\r
+/* Results of Disk Functions */\r
+typedef enum {\r
+ RES_OK = 0, /* 0: Function succeeded */\r
+ RES_ERROR, /* 1: Disk error */\r
+ RES_STRERR, /* 2: Seream error */\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
+DSTATUS disk_initialize (void);\r
+DRESULT disk_readp (void*, DWORD, WORD, WORD);\r
+\r
+BOOL assign_drives (int argc, char *argv[]);\r
+\r
+#define STA_NOINIT 0x01 /* Drive not initialized */\r
+#define STA_NODISK 0x02 /* No medium in the drive */\r
+\r
+#define _DISKIO\r
+#endif\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
+/ Petit FatFs - FAT file system module R0.01a (C)ChaN, 2009\r
+/-----------------------------------------------------------------------------/\r
+/ Petit 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 Petit 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 use UNDER YOUR RESPONSIBILITY.\r
+/ * Redistributions of source code must retain the above copyright notice.\r
+/\r
+/-----------------------------------------------------------------------------/\r
+/ Jun 15,'09 R0.01a Branched from FatFs R0.07b\r
+/----------------------------------------------------------------------------*/\r
+\r
+#include "pff.h" /* Petit FatFs configurations and declarations */\r
+#include "diskio.h" /* Declarations of low level disk I/O functions */\r
+\r
+\r
+/*--------------------------------------------------------------------------\r
+\r
+ Private Work Area\r
+\r
+---------------------------------------------------------------------------*/\r
+\r
+static\r
+FATFS *FatFs; /* Pointer to the file system object (logical drive) */\r
+\r
+\r
+/*--------------------------------------------------------------------------\r
+\r
+ Private Functions\r
+\r
+---------------------------------------------------------------------------*/\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* String functions */\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
+/* FAT access - Read value of a FAT entry */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+static\r
+CLUST get_fat ( /* 1:IO error, Else:Cluster status */\r
+ CLUST clst /* Cluster# to get the link information */\r
+)\r
+{\r
+ WORD wc, bc, ofs;\r
+ BYTE buf[4];\r
+ FATFS *fs = FatFs;\r
+\r
+\r
+ if (clst < 2 || clst >= fs->max_clust) /* Range check */\r
+ return 1;\r
+\r
+ switch (fs->fs_type) {\r
+ case FS_FAT12 :\r
+ bc = (WORD)clst; bc += bc / 2;\r
+ ofs = bc % 512; bc /= 512;\r
+ if (ofs != 511) {\r
+ if (disk_readp(buf, fs->fatbase + bc, ofs, 2)) break;\r
+ } else {\r
+ if (disk_readp(buf, fs->fatbase + bc, 511, 1)) break;\r
+ if (disk_readp(buf+1, fs->fatbase + bc + 1, 0, 1)) break;\r
+ }\r
+ wc = LD_WORD(buf);\r
+ return (clst & 1) ? (wc >> 4) : (wc & 0xFFF);\r
+\r
+ case FS_FAT16 :\r
+ if (disk_readp(buf, fs->fatbase + clst / 256, (WORD)(((WORD)clst % 256) * 2), 2)) break;\r
+ return LD_WORD(buf);\r
+#if _FS_FAT32\r
+ case FS_FAT32 :\r
+ if (disk_readp(buf, fs->fatbase + clst / 128, (WORD)(((WORD)clst % 128) * 4), 4)) break;\r
+ return LD_DWORD(buf) & 0x0FFFFFFF;\r
+#endif\r
+ }\r
+\r
+ return 1; /* An error occured at the disk I/O layer */\r
+}\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Get sector# from cluster# */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+static\r
+DWORD clust2sect ( /* !=0: Sector number, 0: Failed - invalid cluster# */\r
+ CLUST clst /* Cluster# to be converted */\r
+)\r
+{\r
+ FATFS *fs = FatFs;\r
+\r
+\r
+ clst -= 2;\r
+ if (clst >= (fs->max_clust - 2)) return 0; /* Invalid cluster# */\r
+ return (DWORD)clst * fs->csize + fs->database;\r
+}\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Directory handling - Rewind directory index */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+static\r
+FRESULT dir_rewind (\r
+ DIR *dj /* Pointer to directory object */\r
+)\r
+{\r
+ CLUST clst;\r
+ FATFS *fs = FatFs;\r
+\r
+\r
+ dj->index = 0;\r
+ clst = dj->sclust;\r
+ if (clst == 1 || clst >= fs->max_clust) /* Check start cluster range */\r
+ return FR_DISK_ERR;\r
+#if _FS_FAT32\r
+ if (!clst && fs->fs_type == FS_FAT32) /* Replace cluster# 0 with root cluster# if in FAT32 */\r
+ clst = fs->dirbase;\r
+#endif\r
+ dj->clust = clst; /* Current cluster */\r
+ dj->sect = clst ? clust2sect(clst) : fs->dirbase; /* Current 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
+)\r
+{\r
+ CLUST clst;\r
+ WORD i;\r
+ FATFS *fs = FatFs;\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 & (16-1))) { /* Sector changed? */\r
+ dj->sect++; /* Next sector */\r
+\r
+ if (dj->clust == 0) { /* Static table */\r
+ if (i >= fs->n_rootdir) /* Report EOT when end of table */\r
+ return FR_NO_FILE;\r
+ }\r
+ else { /* Dynamic table */\r
+ if (((i / 16) & (fs->csize-1)) == 0) { /* Cluster changed? */\r
+ clst = get_fat(dj->clust); /* Get next cluster */\r
+ if (clst <= 1) return FR_DISK_ERR;\r
+ if (clst >= fs->max_clust) /* When it reached end of dynamic table */\r
+ return FR_NO_FILE; /* Report EOT */\r
+ dj->clust = clst; /* Initialize data for new cluster */\r
+ dj->sect = clust2sect(clst);\r
+ }\r
+ }\r
+ }\r
+\r
+ dj->index = i;\r
+\r
+ return FR_OK;\r
+}\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
+\r
+\r
+ res = dir_rewind(dj); /* Rewind directory object */\r
+ if (res != FR_OK) return res;\r
+\r
+ dir = FatFs->buf;\r
+ do {\r
+ res = disk_readp(dir, dj->sect, (WORD)((dj->index % 16) * 32), 32) /* Read an entry */\r
+ ? FR_DISK_ERR : FR_OK;\r
+ if (res != FR_OK) break;\r
+ c = dir[DIR_Name]; /* First character */\r
+ if (c == 0) { res = FR_NO_FILE; break; } /* Reached to end of table */\r
+ if (!(dir[DIR_Attr] & AM_VOL) && !mem_cmp(dir, dj->fn, 11)) /* Is it a valid entry? */\r
+ break;\r
+ res = dir_next(dj); /* 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 _USE_DIR\r
+static\r
+FRESULT dir_read (\r
+ DIR *dj /* Pointer to the directory object to store read object name */\r
+)\r
+{\r
+ FRESULT res;\r
+ BYTE a, c, *dir;\r
+\r
+\r
+ res = FR_NO_FILE;\r
+ while (dj->sect) {\r
+ dir = FatFs->buf;\r
+ res = disk_readp(dir, dj->sect, (WORD)((dj->index % 16) * 32), 32) /* Read an entry */\r
+ ? FR_DISK_ERR : FR_OK;\r
+ if (res != FR_OK) break;\r
+ c = dir[DIR_Name];\r
+ if (c == 0) { res = FR_NO_FILE; break; } /* Reached to end of table */\r
+ a = dir[DIR_Attr] & AM_MASK;\r
+ if (c != 0xE5 && c != '.' && !(a & AM_VOL)) /* Is it a valid entry? */\r
+ break;\r
+ res = dir_next(dj); /* 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
+/* Pick a segment and create the object name in directory form */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+\r
+static\r
+FRESULT create_name (\r
+ DIR *dj, /* Pointer to the directory object */\r
+ const char **path /* Pointer to pointer to the segment in the path string */\r
+)\r
+{\r
+ BYTE c, ni, si, i, *sfn;\r
+ const char *p;\r
+\r
+ /* Create file name in directory form */\r
+ sfn = dj->fn;\r
+ mem_set(sfn, ' ', 11);\r
+ si = i = 0; ni = 8;\r
+ p = *path;\r
+ for (;;) {\r
+ c = p[si++];\r
+ if (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
+ continue;\r
+ }\r
+ if (c >= 0x7F || chk_chr(" +,;[=\\]\"*:<>\?|", c)) /* Reject unallowable chrs for SFN */\r
+ return FR_INVALID_NAME;\r
+ if (c >='a' && c <= 'z') c -= 0x20;\r
+ sfn[i++] = c;\r
+ }\r
+ if (!i) return FR_INVALID_NAME; /* Reject null string */\r
+ *path = &p[si]; /* Rerurn pointer to the next segment */\r
+\r
+ sfn[11] = (c < ' ') ? 1 : 0; /* Set last segment flag if end of path */\r
+\r
+ return FR_OK;\r
+}\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Get file information from directory entry */\r
+/*-----------------------------------------------------------------------*/\r
+#if _USE_DIR\r
+static\r
+void get_fileinfo ( /* No return code */\r
+ DIR *dj, /* Pointer to the directory object */\r
+ FILINFO *fno /* Pointer to store the file information */\r
+)\r
+{\r
+ BYTE i, c, *dir;\r
+ char *p;\r
+\r
+\r
+ p = fno->fname;\r
+ if (dj->sect) {\r
+ dir = FatFs->buf;\r
+ for (i = 0; i < 8; i++) { /* Copy file name body */\r
+ c = dir[i];\r
+ if (c == ' ') break;\r
+ if (c == 0x05) c = 0xE5;\r
+ *p++ = c;\r
+ }\r
+ if (dir[8] != ' ') { /* Copy file name extension */\r
+ *p++ = '.';\r
+ for (i = 8; i < 11; i++) {\r
+ c = dir[i];\r
+ if (c == ' ') break;\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
+#endif /* _USE_DIR */\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 char *path /* Full-path string to find a file or directory */\r
+)\r
+{\r
+ FRESULT res;\r
+ BYTE *dir;\r
+\r
+\r
+ if (*path == '/') path++; /* Strip heading separator */\r
+ dj->sclust = 0; /* Set start directory (always root dir) */\r
+\r
+ if ((BYTE)*path < ' ') { /* Null path means the root directory */\r
+ res = dir_rewind(dj);\r
+ FatFs->buf[0] = 0;\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
+ if (res != FR_OK) { /* Could not find the object */\r
+ if (res == FR_NO_FILE && !*(dj->fn+11))\r
+ res = FR_NO_PATH;\r
+ break;\r
+ }\r
+ if (*(dj->fn+11)) break; /* Last segment match. Function completed. */\r
+ dir = FatFs->buf; /* 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 =\r
+#if _FS_FAT32\r
+ ((DWORD)LD_WORD(dir+DIR_FstClusHI) << 16) | \r
+#endif\r
+ LD_WORD(dir+DIR_FstClusLO);\r
+ }\r
+ }\r
+\r
+ return res;\r
+}\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Check a sector 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
+ BYTE *buf, /* Working buffer */\r
+ DWORD sect /* Sector# (lba) to check if it is an FAT boot record or not */\r
+)\r
+{\r
+ if (disk_readp(buf, sect, 510, 2)) /* Read the boot sector */\r
+ return 3;\r
+ if (LD_WORD(buf) != 0xAA55) /* Check record signature */\r
+ return 2;\r
+\r
+ if (!disk_readp(buf, sect, BS_FilSysType, 2) && LD_WORD(buf) == 0x4146) /* Check FAT12/16 */\r
+ return 0;\r
+#if _FS_FAT32\r
+ if (!disk_readp(buf, sect, BS_FilSysType32, 2) && LD_WORD(buf) == 0x4146) /* Check FAT32 */\r
+ return 0;\r
+#endif\r
+ return 1;\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 pf_mount (\r
+ FATFS *fs /* Pointer to new file system object (NULL: Unmount) */\r
+)\r
+{\r
+ BYTE fmt, buf[36];\r
+ DWORD bsect, fsize, tsect, mclst;\r
+\r
+\r
+ FatFs = 0;\r
+ if (!fs) return FR_OK; /* Unregister fs object */\r
+\r
+ if (disk_initialize() & STA_NOINIT) /* Check if the drive is ready or not */\r
+ return FR_NOT_READY;\r
+\r
+ /* Search FAT partition on the drive */\r
+ bsect = 0;\r
+ fmt = check_fs(buf, bsect); /* Check sector 0 as an SFD format */\r
+ if (fmt == 1) { /* Not an FAT boot record, it may be FDISK format */\r
+ /* Check a partition listed in top of the partition table */\r
+ if (disk_readp(buf, bsect, MBR_Table, 16)) { /* 1st partition entry */\r
+ fmt = 3;\r
+ } else {\r
+ if (buf[4]) { /* Is the partition existing? */\r
+ bsect = LD_DWORD(&buf[8]); /* Partition offset in LBA */\r
+ fmt = check_fs(buf, bsect); /* Check the partition */\r
+ }\r
+ }\r
+ }\r
+ if (fmt == 3) return FR_DISK_ERR;\r
+ if (fmt) return FR_NO_FILESYSTEM; /* No valid FAT patition is found */\r
+\r
+ /* Initialize the file system object */\r
+ if (disk_readp(buf, bsect, 13, sizeof(buf))) return FR_DISK_ERR;\r
+\r
+ fsize = LD_WORD(buf+BPB_FATSz16-13); /* Number of sectors per FAT */\r
+ if (!fsize) fsize = LD_DWORD(buf+BPB_FATSz32-13);\r
+\r
+ fsize *= buf[BPB_NumFATs-13]; /* Number of sectors in FAT area */\r
+ fs->fatbase = bsect + LD_WORD(buf+BPB_RsvdSecCnt-13); /* FAT start sector (lba) */\r
+ fs->csize = buf[BPB_SecPerClus-13]; /* Number of sectors per cluster */\r
+ fs->n_rootdir = LD_WORD(buf+BPB_RootEntCnt-13); /* Nmuber of root directory entries */\r
+ tsect = LD_WORD(buf+BPB_TotSec16-13); /* Number of sectors on the file system */\r
+ if (!tsect) tsect = LD_DWORD(buf+BPB_TotSec32-13);\r
+ mclst = (tsect /* Last cluster# + 1 */\r
+ - LD_WORD(buf+BPB_RsvdSecCnt-13) - fsize - fs->n_rootdir / 16\r
+ ) / fs->csize + 2;\r
+ fs->max_clust = (CLUST)mclst;\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) /* Number of clusters >= 0xFFF5 */\r
+#if _FS_FAT32\r
+ fmt = FS_FAT32;\r
+#else\r
+ return FR_NO_FILESYSTEM;\r
+#endif\r
+\r
+ fs->fs_type = fmt; /* FAT sub-type */\r
+#if _FS_FAT32\r
+ if (fmt == FS_FAT32)\r
+ fs->dirbase = LD_DWORD(buf+(BPB_RootClus-13)); /* Root directory start cluster */\r
+ else\r
+#endif\r
+ fs->dirbase = fs->fatbase + fsize; /* Root directory start sector (lba) */\r
+ fs->database = fs->fatbase + fsize + fs->n_rootdir / 16; /* Data start sector (lba) */\r
+\r
+ fs->flag = 0;\r
+ FatFs = fs;\r
+\r
+ return FR_OK;\r
+}\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Open or Create a File */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+FRESULT pf_open (\r
+ const char *path /* Pointer to the file name */\r
+)\r
+{\r
+ FRESULT res;\r
+ DIR dj;\r
+ BYTE sp[12], dir[32];\r
+ FATFS *fs = FatFs;\r
+\r
+\r
+ if (!fs) /* Check file system */\r
+ return FR_NOT_ENABLED;\r
+\r
+ fs->flag = 0;\r
+ fs->buf = dir;\r
+ dj.fn = sp;\r
+ res = follow_path(&dj, path); /* Follow the file path */\r
+ if (res != FR_OK) return res; /* Follow failed */\r
+ if (!dir[0] || (dir[DIR_Attr] & AM_DIR)) /* It is a directory */\r
+ return FR_NO_FILE;\r
+\r
+ fs->org_clust = /* File start cluster */\r
+#if _FS_FAT32\r
+ ((DWORD)LD_WORD(dir+DIR_FstClusHI) << 16) |\r
+#endif\r
+ LD_WORD(dir+DIR_FstClusLO);\r
+ fs->fsize = LD_DWORD(dir+DIR_FileSize); /* File size */\r
+ fs->fptr = 0; /* File pointer */\r
+ fs->flag = FA_READ;\r
+\r
+ return FR_OK;\r
+}\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Read File */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+FRESULT pf_read (\r
+ void* dest, /* Pointer to the destination object */\r
+ WORD btr, /* Number of bytes to read (bit15:destination) */\r
+ WORD* br /* Pointer to number of bytes read */\r
+)\r
+{\r
+ DRESULT dr;\r
+ CLUST clst;\r
+ DWORD sect, remain;\r
+ WORD rcnt;\r
+ BYTE *rbuff = dest;\r
+ FATFS *fs = FatFs;\r
+\r
+\r
+ *br = 0;\r
+ if (!fs) return FR_NOT_ENABLED; /* Check file system */\r
+ if (!(fs->flag & FA_READ))\r
+ return FR_INVALID_OBJECT;\r
+\r
+ remain = fs->fsize - fs->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, fs->fptr += rcnt, *br += rcnt, btr -= rcnt) {\r
+ if ((fs->fptr % 512) == 0) { /* On the sector boundary? */\r
+ if ((fs->fptr / 512 % fs->csize) == 0) { /* On the cluster boundary? */\r
+ clst = (fs->fptr == 0) ? /* On the top of the file? */\r
+ fs->org_clust : get_fat(fs->curr_clust);\r
+ if (clst <= 1) {\r
+ fs->flag = 0; return FR_DISK_ERR;\r
+ }\r
+ fs->curr_clust = clst; /* Update current cluster */\r
+ fs->csect = 0; /* Reset sector offset in the cluster */\r
+ }\r
+ sect = clust2sect(fs->curr_clust); /* Get current sector */\r
+ if (!sect) {\r
+ fs->flag = 0; return FR_DISK_ERR;\r
+ }\r
+ sect += fs->csect;\r
+ fs->dsect = sect;\r
+ fs->csect++; /* Next sector address in the cluster */\r
+ }\r
+ rcnt = 512 - ((WORD)fs->fptr % 512); /* Get partial sector data from sector buffer */\r
+ if (rcnt > btr) rcnt = btr;\r
+ if (fs->flag & FA_STREAM) {\r
+ dr = disk_readp(dest, fs->dsect, (WORD)(fs->fptr % 512), (WORD)(rcnt | 0x8000));\r
+ } else {\r
+ dr = disk_readp(rbuff, fs->dsect, (WORD)(fs->fptr % 512), rcnt);\r
+ }\r
+ if (dr) {\r
+ fs->flag = 0;\r
+ return (dr == RES_STRERR) ? FR_STREAM_ERR : FR_DISK_ERR;\r
+ }\r
+ }\r
+\r
+ return FR_OK;\r
+}\r
+\r
+\r
+\r
+\r
+#if _USE_LSEEK\r
+/*-----------------------------------------------------------------------*/\r
+/* Seek File R/W Pointer */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+FRESULT pf_lseek (\r
+ DWORD ofs /* File pointer from top of file */\r
+)\r
+{\r
+ CLUST clst;\r
+ DWORD bcs, nsect, ifptr;\r
+ FATFS *fs = FatFs;\r
+\r
+\r
+ if (!fs) return FR_NOT_ENABLED; /* Check file system */\r
+ if (!(fs->flag & FA_READ))\r
+ return FR_INVALID_OBJECT;\r
+\r
+ if (ofs > fs->fsize) ofs = fs->fsize; /* Clip offset with the file size */\r
+ ifptr = fs->fptr;\r
+ fs->fptr = 0;\r
+ if (ofs > 0) {\r
+ bcs = (DWORD)fs->csize * 512; /* Cluster size (byte) */\r
+ if (ifptr > 0 &&\r
+ (ofs - 1) / bcs >= (ifptr - 1) / bcs) { /* When seek to same or following cluster, */\r
+ fs->fptr = (ifptr - 1) & ~(bcs - 1); /* start from the current cluster */\r
+ ofs -= fs->fptr;\r
+ clst = fs->curr_clust;\r
+ } else { /* When seek to back cluster, */\r
+ clst = fs->org_clust; /* start from the first cluster */\r
+ fs->curr_clust = clst;\r
+ }\r
+ while (ofs > bcs) { /* Cluster following loop */\r
+ clst = get_fat(clst); /* Follow cluster chain if not in write mode */\r
+ if (clst <= 1 || clst >= fs->max_clust) {\r
+ fs->flag = 0; return FR_DISK_ERR;\r
+ }\r
+ fs->curr_clust = clst;\r
+ fs->fptr += bcs;\r
+ ofs -= bcs;\r
+ }\r
+ fs->fptr += ofs;\r
+ fs->csect = (BYTE)(ofs / 512) + 1; /* Sector offset in the cluster */\r
+ nsect = clust2sect(clst); /* Current sector */\r
+ if (!nsect) {\r
+ fs->flag = 0; return FR_DISK_ERR;\r
+ }\r
+ fs->dsect = nsect + fs->csect - 1;\r
+ }\r
+\r
+ return FR_OK;\r
+}\r
+#endif\r
+\r
+\r
+#if _USE_DIR\r
+/*-----------------------------------------------------------------------*/\r
+/* Create a Directroy Object */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+FRESULT pf_opendir (\r
+ DIR *dj, /* Pointer to directory object to create */\r
+ const char *path /* Pointer to the directory path */\r
+)\r
+{\r
+ FRESULT res;\r
+ BYTE sp[12], dir[32];\r
+ FATFS *fs = FatFs;\r
+\r
+\r
+ if (!fs) { /* Check file system */\r
+ res = FR_NOT_ENABLED;\r
+ } else {\r
+ fs->buf = dir;\r
+ dj->fn = sp;\r
+ res = follow_path(dj, path); /* Follow the path to the directory */\r
+ if (res == FR_OK) { /* Follow completed */\r
+ if (dir[0]) { /* It is not the root dir */\r
+ if (dir[DIR_Attr] & AM_DIR) { /* The object is a directory */\r
+ dj->sclust =\r
+#if _FS_FAT32\r
+ ((DWORD)LD_WORD(dir+DIR_FstClusHI) << 16) |\r
+#endif\r
+ 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
+ res = dir_rewind(dj); /* Rewind dir */\r
+ }\r
+ }\r
+ if (res == FR_NO_FILE) res = FR_NO_PATH;\r
+ }\r
+\r
+ return res;\r
+}\r
+\r
+\r
+\r
+\r
+/*-----------------------------------------------------------------------*/\r
+/* Read Directory Entry in Sequense */\r
+/*-----------------------------------------------------------------------*/\r
+\r
+FRESULT pf_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
+ BYTE sp[12], dir[32];\r
+ FATFS *fs = FatFs;\r
+\r
+\r
+ if (!fs) { /* Check file system */\r
+ res = FR_NOT_ENABLED;\r
+ } else {\r
+ fs->buf = dir;\r
+ dj->fn = sp;\r
+ if (!fno) {\r
+ res = dir_rewind(dj);\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); /* Increment index for next */\r
+ if (res == FR_NO_FILE) {\r
+ dj->sect = 0;\r
+ res = FR_OK;\r
+ }\r
+ }\r
+ }\r
+ }\r
+\r
+ return res;\r
+}\r
+\r
+#endif /* _FS_DIR */\r
+\r
--- /dev/null
+/*---------------------------------------------------------------------------/\r
+/ Petit FatFs - FAT file system module include file R0.01a (C)ChaN, 2009\r
+/----------------------------------------------------------------------------/\r
+/ Petit 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 Petit 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 use UNDER YOUR RESPONSIBILITY.\r
+/ * Redistributions of source code must retain the above copyright notice.\r
+/----------------------------------------------------------------------------*/\r
+\r
+#include "integer.h"\r
+\r
+/*---------------------------------------------------------------------------/\r
+/ Petit FatFs Configuration Options\r
+/\r
+/ CAUTION! Do not forget to make clean the project after any changes to\r
+/ the configuration options.\r
+/\r
+/----------------------------------------------------------------------------*/\r
+#ifndef _FATFS\r
+#define _FATFS\r
+\r
+#define _WORD_ACCESS 0\r
+/* The _WORD_ACCESS option defines which access method is used to the word\r
+/ data in the FAT structure.\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 efficiency. */\r
+\r
+\r
+#define _USE_DIR 0\r
+/* To enable pf_opendir and pf_readdir function, set _USE_DIR to 1. */\r
+\r
+\r
+#define _USE_LSEEK 0\r
+/* To enable pf_lseek function, set _USE_LSEEK to 1. */\r
+\r
+\r
+#define _FS_FAT32 0\r
+/* To enable FAT32 support, set _FS_FAT32 to 1. */\r
+\r
+\r
+/* End of configuration options. Do not change followings without care. */\r
+/*--------------------------------------------------------------------------*/\r
+\r
+\r
+#if _FS_FAT32\r
+#define CLUST DWORD\r
+#else\r
+#define CLUST WORD\r
+#endif\r
+\r
+\r
+/* File system object structure */\r
+\r
+typedef struct _FATFS_ {\r
+ BYTE fs_type; /* FAT sub type */\r
+ BYTE csize; /* Number of sectors per cluster */\r
+ BYTE flag; /* File status flags */\r
+ BYTE csect; /* File sector address in the cluster */\r
+ WORD n_rootdir; /* Number of root directory entries (0 on FAT32) */\r
+ BYTE* buf; /* Pointer to the disk access buffer */\r
+ CLUST 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 fptr; /* File R/W pointer */\r
+ DWORD fsize; /* File size */\r
+ CLUST org_clust; /* File start cluster */\r
+ CLUST curr_clust; /* File current cluster */\r
+ DWORD dsect; /* File current data sector */\r
+} FATFS;\r
+\r
+\r
+\r
+/* Directory object structure */\r
+\r
+typedef struct _DIR_ {\r
+ WORD index; /* Current read/write index number */\r
+ BYTE* fn; /* Pointer to the SFN (in/out) {file[8],ext[3],status[1]} */\r
+ CLUST sclust; /* Table start cluster (0:Static table) */\r
+ CLUST clust; /* Current cluster */\r
+ DWORD sect; /* Current sector */\r
+} DIR;\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]; /* File name */\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_NOT_READY, /* 2 */\r
+ FR_NO_FILE, /* 3 */\r
+ FR_NO_PATH, /* 4 */\r
+ FR_INVALID_NAME, /* 5 */\r
+ FR_STREAM_ERR, /* 6 */\r
+ FR_INVALID_OBJECT, /* 7 */\r
+ FR_NOT_ENABLED, /* 8 */\r
+ FR_NO_FILESYSTEM /* 9 */\r
+} FRESULT;\r
+\r
+\r
+\r
+/*--------------------------------------------------------------*/\r
+/* Petit FatFs module application interface */\r
+\r
+FRESULT pf_mount (FATFS*); /* Mount/Unmount a logical drive */\r
+FRESULT pf_open (const char*); /* Open a file */\r
+FRESULT pf_read (void*, WORD, WORD*); /* Read data from a file */\r
+FRESULT pf_lseek (DWORD); /* Move file pointer of a file object */\r
+FRESULT pf_opendir (DIR*, const char*); /* Open an existing directory */\r
+FRESULT pf_readdir (DIR*, FILINFO*); /* Read a directory item */\r
+\r
+\r
+\r
+/*--------------------------------------------------------------*/\r
+/* Flags and offset address */\r
+\r
+/* File status flag (FATFS.flag) */\r
+\r
+#define FA_READ 0x01\r
+#define FA_STREAM 0x40\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 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
+\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
+/*\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, and distribute this software\r
+ and its documentation for any purpose and without fee is hereby\r
+ granted, provided that the above copyright notice appear in all\r
+ 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
+#include "ProgrammerConfig.h"\r
+\r
+struct\r
+{\r
+ uint16_t SigBytes[4];\r
+ bool EnforceSigBytes;\r
+ \r
+ uint32_t ProgrammingSpeed;\r
+} ProgrammerConfig;\r
+\r
+bool ProgrammerConfig_ProcessConfiguration(void)\r
+{\r
+ memset(&ProgrammerConfig, sizeof(ProgrammerConfig), 0x00);\r
+\r
+ if (!(pf_open("CONF.txt") == FR_OK))\r
+ {\r
+ fputs(" >> ERROR: CONF.txt File Not Found.\r\n", &USBSerialStream);\r
+ return false;\r
+ }\r
+ \r
+ char LineBuff[100];\r
+ char* CurrentLine;\r
+ \r
+ do\r
+ {\r
+ CurrentLine = fgets(LineBuff, sizeof(LineBuff), &DataflashStream);\r
+ \r
+ if (CurrentLine)\r
+ {\r
+ sscanf(CurrentLine, "SIGNATURE = %02x %02x %02x %02x", &ProgrammerConfig.SigBytes[0],\r
+ &ProgrammerConfig.SigBytes[1],\r
+ &ProgrammerConfig.SigBytes[2],\r
+ &ProgrammerConfig.SigBytes[3]);\r
+\r
+ sscanf(CurrentLine, "SPEED = %lu", &ProgrammerConfig.ProgrammingSpeed);\r
+ }\r
+ } while (CurrentLine);\r
+ \r
+ fprintf(&USBSerialStream, " >> *** Configuration: ***\r\n");\r
+ fprintf(&USBSerialStream, " >> Device Signature: 0x%02x 0x%02x 0x%02x 0x%02x\r\n", ProgrammerConfig.SigBytes[0],\r
+ ProgrammerConfig.SigBytes[1],\r
+ ProgrammerConfig.SigBytes[2],\r
+ ProgrammerConfig.SigBytes[3]);\r
+ fprintf(&USBSerialStream, " >> Programming Speed: %lu Hz\r\n", ProgrammerConfig.ProgrammingSpeed);\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, and distribute this software\r
+ and its documentation for any purpose and without fee is hereby\r
+ granted, provided that the above copyright notice appear in all\r
+ 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
+#ifndef _PROGRAMMER_CONFIG_H_\r
+#define _PROGRAMMER_CONFIG_H_\r
+\r
+ /* Includes: */\r
+ #include <stdio.h>\r
+ #include <string.h>\r
+ #include <stdbool.h>\r
+ \r
+ #include "../StandaloneProgrammer.h"\r
+\r
+ /* Function Prototypes: */\r
+ bool ProgrammerConfig_ProcessConfiguration(void);\r
+\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, and distribute this software\r
+ and its documentation for any purpose and without fee is hereby\r
+ granted, provided that the above copyright notice appear in all\r
+ 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, and distribute this software\r
+ and its documentation for any purpose and without fee is hereby\r
+ granted, provided that the above copyright notice appear in all\r
+ 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 "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
+ /* Type Defines: */\r
+ /** Type define for a SCSI response structure to a SCSI INQUIRY command. For details of the\r
+ * structure contents, refer to the SCSI specifications.\r
+ */\r
+ typedef struct\r
+ {\r
+ unsigned char DeviceType : 5;\r
+ unsigned char PeripheralQualifier : 3;\r
+ \r
+ unsigned char _RESERVED1 : 7;\r
+ unsigned char Removable : 1;\r
+ \r
+ uint8_t Version;\r
+ \r
+ unsigned char ResponseDataFormat : 4;\r
+ unsigned char _RESERVED2 : 1;\r
+ unsigned char NormACA : 1;\r
+ unsigned char TrmTsk : 1;\r
+ unsigned char AERC : 1;\r
+\r
+ uint8_t AdditionalLength;\r
+ uint8_t _RESERVED3[2];\r
+\r
+ unsigned char SoftReset : 1;\r
+ unsigned char CmdQue : 1;\r
+ unsigned char _RESERVED4 : 1;\r
+ unsigned char Linked : 1;\r
+ unsigned char Sync : 1;\r
+ unsigned char WideBus16Bit : 1;\r
+ unsigned char WideBus32Bit : 1;\r
+ unsigned char RelAddr : 1;\r
+ \r
+ uint8_t VendorID[8];\r
+ uint8_t ProductID[16];\r
+ uint8_t RevisionID[4];\r
+ } SCSI_Inquiry_Response_t;\r
+ \r
+ /** Type define for a SCSI sense structure to a SCSI REQUEST SENSE command. For details of the\r
+ * structure contents, refer to the SCSI specifications.\r
+ */\r
+ typedef struct\r
+ {\r
+ uint8_t ResponseCode;\r
+ \r
+ uint8_t SegmentNumber;\r
+ \r
+ unsigned char SenseKey : 4;\r
+ unsigned char _RESERVED1 : 1;\r
+ unsigned char ILI : 1;\r
+ unsigned char EOM : 1;\r
+ unsigned char FileMark : 1;\r
+ \r
+ uint8_t Information[4];\r
+ uint8_t AdditionalLength;\r
+ uint8_t CmdSpecificInformation[4];\r
+ uint8_t AdditionalSenseCode;\r
+ uint8_t AdditionalSenseQualifier;\r
+ uint8_t FieldReplaceableUnitCode;\r
+ uint8_t SenseKeySpecific[3];\r
+ } SCSI_Request_Sense_Response_t;\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
+;************************************************************\r
+; Windows USB CDC ACM Setup File\r
+; Copyright (c) 2000 Microsoft Corporation\r
+\r
+\r
+[Version]\r
+Signature="$Windows NT$"\r
+Class=Ports\r
+ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}\r
+Provider=%MFGNAME%\r
+LayoutFile=layout.inf\r
+CatalogFile=%MFGFILENAME%.cat\r
+DriverVer=11/15/2007,5.1.2600.0\r
+\r
+[Manufacturer]\r
+%MFGNAME%=DeviceList, NTamd64\r
+\r
+[DestinationDirs]\r
+DefaultDestDir=12\r
+\r
+\r
+;------------------------------------------------------------------------------\r
+; Windows 2000/XP/Vista-32bit Sections\r
+;------------------------------------------------------------------------------\r
+\r
+[DriverInstall.nt]\r
+include=mdmcpq.inf\r
+CopyFiles=DriverCopyFiles.nt\r
+AddReg=DriverInstall.nt.AddReg\r
+\r
+[DriverCopyFiles.nt]\r
+usbser.sys,,,0x20\r
+\r
+[DriverInstall.nt.AddReg]\r
+HKR,,DevLoader,,*ntkern\r
+HKR,,NTMPDriver,,%DRIVERFILENAME%.sys\r
+HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"\r
+\r
+[DriverInstall.nt.Services]\r
+AddService=usbser, 0x00000002, DriverService.nt\r
+\r
+[DriverService.nt]\r
+DisplayName=%SERVICE%\r
+ServiceType=1\r
+StartType=3\r
+ErrorControl=1\r
+ServiceBinary=%12%\%DRIVERFILENAME%.sys\r
+\r
+;------------------------------------------------------------------------------\r
+; Vista-64bit Sections\r
+;------------------------------------------------------------------------------\r
+\r
+[DriverInstall.NTamd64]\r
+include=mdmcpq.inf\r
+CopyFiles=DriverCopyFiles.NTamd64\r
+AddReg=DriverInstall.NTamd64.AddReg\r
+\r
+[DriverCopyFiles.NTamd64]\r
+%DRIVERFILENAME%.sys,,,0x20\r
+\r
+[DriverInstall.NTamd64.AddReg]\r
+HKR,,DevLoader,,*ntkern\r
+HKR,,NTMPDriver,,%DRIVERFILENAME%.sys\r
+HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"\r
+\r
+[DriverInstall.NTamd64.Services]\r
+AddService=usbser, 0x00000002, DriverService.NTamd64\r
+\r
+[DriverService.NTamd64]\r
+DisplayName=%SERVICE%\r
+ServiceType=1\r
+StartType=3\r
+ErrorControl=1\r
+ServiceBinary=%12%\%DRIVERFILENAME%.sys\r
+\r
+\r
+;------------------------------------------------------------------------------\r
+; Vendor and Product ID Definitions\r
+;------------------------------------------------------------------------------\r
+; When developing your USB device, the VID and PID used in the PC side\r
+; application program and the firmware on the microcontroller must match.\r
+; Modify the below line to use your VID and PID. Use the format as shown below.\r
+; Note: One INF file can be used for multiple devices with different VID and PIDs.\r
+; For each supported device, append ",USB\VID_xxxx&PID_yyyy" to the end of the line.\r
+;------------------------------------------------------------------------------\r
+[SourceDisksFiles]\r
+[SourceDisksNames]\r
+[DeviceList]\r
+%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_2063&MI_00\r
+\r
+[DeviceList.NTamd64]\r
+%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_2063&MI_00\r
+\r
+\r
+;------------------------------------------------------------------------------\r
+; String Definitions\r
+;------------------------------------------------------------------------------\r
+;Modify these strings to customize your device\r
+;------------------------------------------------------------------------------\r
+[Strings]\r
+MFGFILENAME="CDC_vista"\r
+DRIVERFILENAME ="usbser"\r
+MFGNAME="CCS, Inc."\r
+INSTDISK="LUFA Benito Programmer Driver Installer"\r
+DESCRIPTION="Communications Port"\r
+SERVICE="USB RS-232 Emulation Driver"
\ No newline at end of file
--- /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, and distribute this software\r
+ and its documentation for any purpose and without fee is hereby\r
+ granted, provided that the above copyright notice appear in all\r
+ 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 Standalone Programmer project. This file contains the main tasks of\r
+ * the demo and is responsible for the initial application hardware configuration.\r
+ */\r
+\r
+#define INCLUDE_FROM_STANDALONEPROG_C\r
+#include "StandaloneProgrammer.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
+/** LUFA CDC Class driver interface configuration and state information. This structure is\r
+ * passed to all CDC 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_CDC_Device_t VirtualSerial_CDC_Interface =\r
+ {\r
+ .Config =\r
+ {\r
+ .ControlInterfaceNumber = 0,\r
+\r
+ .DataINEndpointNumber = CDC_TX_EPNUM,\r
+ .DataINEndpointSize = CDC_TXRX_EPSIZE,\r
+ .DataINEndpointDoubleBank = false,\r
+\r
+ .DataOUTEndpointNumber = CDC_RX_EPNUM,\r
+ .DataOUTEndpointSize = CDC_TXRX_EPSIZE,\r
+ .DataOUTEndpointDoubleBank = false,\r
+\r
+ .NotificationEndpointNumber = CDC_NOTIFICATION_EPNUM,\r
+ .NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE,\r
+ .NotificationEndpointDoubleBank = false,\r
+ },\r
+ };\r
+\r
+/** Standard file stream for the CDC interface when set up, so that the virtual CDC COM port can be\r
+ * used like any regular character stream in the C APIs\r
+ */\r
+FILE USBSerialStream;\r
+\r
+/** Standard file stream for the currently open file on the dataflash disk. */\r
+FILE DataflashStream = FDEV_SETUP_STREAM(NULL, Dataflash_getchar, _FDEV_SETUP_READ);\r
+\r
+/** Petite FAT Fs structure to hold the internal state of the FAT driver for the dataflash contents. */\r
+FATFS DataflashData;\r
+\r
+\r
+/** Stream character fetching routine for the FAT driver so that characters from the currently open file can be\r
+ * readin sequence when applied to a stdio stream.\r
+ */\r
+static int Dataflash_getchar(FILE* Stream)\r
+{\r
+ char ReadByte;\r
+ WORD ByteWasRead;\r
+\r
+ if (pf_read(&ReadByte, 1, &ByteWasRead) != FR_OK)\r
+ return _FDEV_ERR;\r
+\r
+ return (ByteWasRead ? ReadByte : _FDEV_EOF);\r
+}\r
+\r
+/** Task to determine if the user is wishes to start the programming sequence, and if so executes the \r
+ * required functions to program the attached target (if any) with the files loaded to the dataflash.\r
+ */\r
+void Programmer_Task(void)\r
+{\r
+ static bool HasAttempted = false;\r
+\r
+ if (Buttons_GetStatus() & BUTTONS_BUTTON1)\r
+ {\r
+ if (!(HasAttempted))\r
+ HasAttempted = true;\r
+ else\r
+ return;\r
+ \r
+ fputs("==== PROGRAMMING CYCLE STARTED ====\r\n", &USBSerialStream);\r
+\r
+ fputs("Reading Configuration File...\r\n", &USBSerialStream);\r
+ \r
+ if (!(ProgrammerConfig_ProcessConfiguration()))\r
+ goto EndOfProgCycle;\r
+\r
+ EndOfProgCycle:\r
+ fputs("==== PROGRAMMING CYCLE FINISHED ====\r\n", &USBSerialStream);\r
+ }\r
+ else\r
+ {\r
+ HasAttempted = false;\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
+ /* Create a regular character stream for the interface so that it can be used with the stdio.h functions */\r
+ CDC_Device_CreateStream(&VirtualSerial_CDC_Interface, &USBSerialStream);\r
+\r
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
+\r
+ for (;;)\r
+ {\r
+ Programmer_Task();\r
+ \r
+ /* Must throw away unused bytes from the host, or it will lock up while waiting for the device */\r
+ while (CDC_Device_BytesReceived(&VirtualSerial_CDC_Interface))\r
+ CDC_Device_ReceiveByte(&VirtualSerial_CDC_Interface);\r
+\r
+ CDC_Device_USBTask(&VirtualSerial_CDC_Interface);\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
+ Buttons_Init();\r
+ pf_mount(&DataflashData);\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
+\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
+\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
+ if (!(CDC_Device_ConfigureEndpoints(&VirtualSerial_CDC_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
+ CDC_Device_ProcessControlRequest(&VirtualSerial_CDC_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, and distribute this software\r
+ and its documentation for any purpose and without fee is hereby\r
+ granted, provided that the above copyright notice appear in all\r
+ 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 StandaloneProgrammer.c.\r
+ */\r
+\r
+#ifndef _STANDALONE_PROG_H_\r
+#define _STANDALONE_PROG_H_\r
+\r
+ /* Includes: */\r
+ #include <avr/io.h>\r
+ #include <avr/wdt.h>\r
+ #include <avr/power.h>\r
+ #include <stdio.h>\r
+\r
+ #include "Descriptors.h"\r
+\r
+ #include "Lib/SCSI.h"\r
+ #include "Lib/DataflashManager.h"\r
+ #include "Lib/ProgrammerConfig.h"\r
+ #include "Lib/PetiteFATFs/pff.h"\r
+\r
+ #include <LUFA/Version.h>\r
+ #include <LUFA/Drivers/Board/LEDs.h>\r
+ #include <LUFA/Drivers/Board/Buttons.h>\r
+ #include <LUFA/Drivers/USB/USB.h>\r
+ #include <LUFA/Drivers/USB/Class/MassStorage.h>
+ #include <LUFA/Drivers/USB/Class/CDC.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
+ /* External Variables: */\r
+ extern FILE USBSerialStream;\r
+ extern FILE DataflashStream;\r
+ \r
+ /* Function Prototypes: */\r
+ #if defined(INCLUDE_FROM_STANDALONEPROG_C)\r
+ static int Dataflash_getchar(FILE* Stream);\r
+ #endif\r
+ \r
+ void SetupHardware(void);\r
+ void Programmer_Task(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
+# 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 = StandaloneProgrammer\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
+LUFA_OPTS += -D INTERRUPT_CONTROL_ENDPOINT\r
+\r
+\r
+# List C source files here. (C dependencies are automatically generated.)\r
+SRC = $(TARGET).c \\r
+ Descriptors.c \\r
+ Lib/SCSI.c \\r
+ Lib/DataflashManager.c \\r
+ Lib/ProgrammerConfig.c \\r
+ Lib/PetiteFATFs/diskio.c \\r
+ Lib/PetiteFATFs/pff.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
+ $(LUFA_PATH)/LUFA/Drivers/USB/Class/Device/CDC.c \\r
+ $(LUFA_PATH)/LUFA/Drivers/USB/Class/Host/CDC.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
+\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