Combine AVRISP project TPI and PDI lib directories - these protocols use the same...
authorDean Camera <dean@fourwalledcubicle.com>
Thu, 24 Dec 2009 01:55:53 +0000 (01:55 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Thu, 24 Dec 2009 01:55:53 +0000 (01:55 +0000)
32 files changed:
LUFA.pnproj
LUFA/ManPages/FutureChanges.txt
Projects/AVRISP/AVRISP.c
Projects/AVRISP/AVRISP.h
Projects/AVRISP/AVRISP.txt
Projects/AVRISP/Lib/PDI/PDIProtocol.c [deleted file]
Projects/AVRISP/Lib/PDI/PDIProtocol.h [deleted file]
Projects/AVRISP/Lib/PDI/PDITarget.c [deleted file]
Projects/AVRISP/Lib/PDI/PDITarget.h [deleted file]
Projects/AVRISP/Lib/PDI/XMEGANVM.c [deleted file]
Projects/AVRISP/Lib/PDI/XMEGANVM.h [deleted file]
Projects/AVRISP/Lib/TPI/TINYNVM.c [deleted file]
Projects/AVRISP/Lib/TPI/TINYNVM.h [deleted file]
Projects/AVRISP/Lib/TPI/TPIProtocol.c [deleted file]
Projects/AVRISP/Lib/TPI/TPIProtocol.h [deleted file]
Projects/AVRISP/Lib/TPI/TPITarget.c [deleted file]
Projects/AVRISP/Lib/TPI/TPITarget.h [deleted file]
Projects/AVRISP/Lib/V2Protocol.c
Projects/AVRISP/Lib/V2Protocol.h
Projects/AVRISP/Lib/XPROG/PDIProtocol.c [new file with mode: 0644]
Projects/AVRISP/Lib/XPROG/PDIProtocol.h [new file with mode: 0644]
Projects/AVRISP/Lib/XPROG/PDITarget.c [new file with mode: 0644]
Projects/AVRISP/Lib/XPROG/PDITarget.h [new file with mode: 0644]
Projects/AVRISP/Lib/XPROG/TINYNVM.c [new file with mode: 0644]
Projects/AVRISP/Lib/XPROG/TINYNVM.h [new file with mode: 0644]
Projects/AVRISP/Lib/XPROG/TPIProtocol.c [new file with mode: 0644]
Projects/AVRISP/Lib/XPROG/TPIProtocol.h [new file with mode: 0644]
Projects/AVRISP/Lib/XPROG/TPITarget.c [new file with mode: 0644]
Projects/AVRISP/Lib/XPROG/TPITarget.h [new file with mode: 0644]
Projects/AVRISP/Lib/XPROG/XMEGANVM.c [new file with mode: 0644]
Projects/AVRISP/Lib/XPROG/XMEGANVM.h [new file with mode: 0644]
Projects/AVRISP/makefile

index 8cddbe4..126fba0 100644 (file)
@@ -1 +1 @@
-<Project name="LUFA"><Folder name="Demos"><Folder name="Device"><Folder name="ClassDriver"><Folder name="AudioInput"><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.c"></File><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.h"></File><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.txt"></File><File path="Demos\Device\ClassDriver\AudioInput\Descriptors.c"></File><File path="Demos\Device\ClassDriver\AudioInput\Descriptors.h"></File><File path="Demos\Device\ClassDriver\AudioInput\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\AudioInput\makefile"></File></Folder><Folder name="AudioOutput"><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.c"></File><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.h"></File><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.txt"></File><File path="Demos\Device\ClassDriver\AudioOutput\Descriptors.c"></File><File path="Demos\Device\ClassDriver\AudioOutput\Descriptors.h"></File><File path="Demos\Device\ClassDriver\AudioOutput\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\AudioOutput\makefile"></File></Folder><Folder name="DualVirtualSerial"><File path="Demos\Device\ClassDriver\DualVirtualSerial\Descriptors.c"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\Descriptors.h"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\DualVirtualSerial.c"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\DualVirtualSerial.h"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\DualVirtualSerial.txt"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\LUFA DualVirtualSerial.inf"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\makefile"></File></Folder><Folder name="GenericHID"><File path="Demos\Device\ClassDriver\GenericHID\Descriptors.c"></File><File path="Demos\Device\ClassDriver\GenericHID\Descriptors.h"></File><File path="Demos\Device\ClassDriver\GenericHID\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.c"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.h"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.txt"></File><File path="Demos\Device\ClassDriver\GenericHID\makefile"></File></Folder><Folder name="Joystick"><File path="Demos\Device\ClassDriver\Joystick\Descriptors.c"></File><File path="Demos\Device\ClassDriver\Joystick\Descriptors.h"></File><File path="Demos\Device\ClassDriver\Joystick\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.c"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.h"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.txt"></File><File path="Demos\Device\ClassDriver\Joystick\makefile"></File></Folder><Folder name="Keyboard"><File path="Demos\Device\ClassDriver\Keyboard\Descriptors.c"></File><File path="Demos\Device\ClassDriver\Keyboard\Descriptors.h"></File><File path="Demos\Device\ClassDriver\Keyboard\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.c"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.h"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.txt"></File><File path="Demos\Device\ClassDriver\Keyboard\makefile"></File></Folder><Folder name="KeyboardMouse"><File path="Demos\Device\ClassDriver\KeyboardMouse\Descriptors.c"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\Descriptors.h"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.c"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.h"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.txt"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\makefile"></File></Folder><Folder name="MassStorage"><Folder name="Lib"><File path="Demos\Device\ClassDriver\MassStorage\Lib\DataflashManager.c"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\DataflashManager.h"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\SCSI.c"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\SCSI.h"></File></Folder><File path="Demos\Device\ClassDriver\MassStorage\Descriptors.c"></File><File path="Demos\Device\ClassDriver\MassStorage\Descriptors.h"></File><File path="Demos\Device\ClassDriver\MassStorage\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\MassStorage\makefile"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.c"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.h"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.txt"></File></Folder><Folder name="MassStorageKeyboard"><Folder name="Lib"><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\DataflashManager.c"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\DataflashManager.h"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\SCSI.c"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\SCSI.h"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\SCSI_Codes.h"></File></Folder><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Descriptors.c"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Descriptors.h"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\makefile"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\MassStorageKeyboard.c"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\MassStorageKeyboard.h"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\MassStorageKeyboard.txt"></File></Folder><Folder name="MIDI"><File path="Demos\Device\ClassDriver\MIDI\Descriptors.c"></File><File path="Demos\Device\ClassDriver\MIDI\Descriptors.h"></File><File path="Demos\Device\ClassDriver\MIDI\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\MIDI\makefile"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.c"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.h"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.txt"></File></Folder><Folder name="Mouse"><File path="Demos\Device\ClassDriver\Mouse\Descriptors.c"></File><File path="Demos\Device\ClassDriver\Mouse\Descriptors.h"></File><File path="Demos\Device\ClassDriver\Mouse\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\Mouse\makefile"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.c"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.h"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.txt"></File></Folder><Folder name="RNDISEthernet"><Folder name="Lib"><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Webserver.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ARP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ARP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\DHCP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\DHCP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Ethernet.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Ethernet.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\EthernetProtocols.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ICMP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ICMP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\IP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\IP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ProtocolDecoders.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ProtocolDecoders.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\TCP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\TCP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\UDP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\UDP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Webserver.c"></File></Folder><File path="Demos\Device\ClassDriver\RNDISEthernet\Descriptors.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Descriptors.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\LUFA RNDIS.inf"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\makefile"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.txt"></File></Folder><Folder name="VirtualSerial"><File path="Demos\Device\ClassDriver\VirtualSerial\Descriptors.c"></File><File path="Demos\Device\ClassDriver\VirtualSerial\Descriptors.h"></File><File path="Demos\Device\ClassDriver\VirtualSerial\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\VirtualSerial\LUFA VirtualSerial.inf"></File><File path="Demos\Device\ClassDriver\VirtualSerial\makefile"></File><File path="Demos\Device\ClassDriver\VirtualSerial\VirtualSerial.c"></File><File path="Demos\Device\ClassDriver\VirtualSerial\VirtualSerial.h"></File><File path="Demos\Device\ClassDriver\VirtualSerial\VirtualSerial.txt"></File></Folder><Folder name="VirtualSerialMouse"><File path="Demos\Device\ClassDriver\VirtualSerialMouse\Descriptors.c"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\Descriptors.h"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\LUFA VirtualSerialMouse.inf"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\makefile"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\VirtualSerialMouse.c"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\VirtualSerialMouse.h"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\VirtualSerialMouse.txt"></File></Folder><File path="Demos\Device\ClassDriver\makefile"></File></Folder><Folder name="LowLevel"><Folder name="AudioInput"><File path="Demos\Device\LowLevel\AudioInput\AudioInput.c"></File><File path="Demos\Device\LowLevel\AudioInput\AudioInput.h"></File><File path="Demos\Device\LowLevel\AudioInput\AudioInput.txt"></File><File path="Demos\Device\LowLevel\AudioInput\Descriptors.c"></File><File path="Demos\Device\LowLevel\AudioInput\Descriptors.h"></File><File path="Demos\Device\LowLevel\AudioInput\Doxygen.conf"></File><File path="Demos\Device\LowLevel\AudioInput\makefile"></File></Folder><Folder name="AudioOutput"><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.c"></File><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.h"></File><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.txt"></File><File path="Demos\Device\LowLevel\AudioOutput\Descriptors.c"></File><File path="Demos\Device\LowLevel\AudioOutput\Descriptors.h"></File><File path="Demos\Device\LowLevel\AudioOutput\Doxygen.conf"></File><File path="Demos\Device\LowLevel\AudioOutput\makefile"></File></Folder><Folder name="DualVirtualSerial"><File path="Demos\Device\LowLevel\DualVirtualSerial\Descriptors.c"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\Descriptors.h"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\Doxygen.conf"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\DualVirtualSerial.c"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\DualVirtualSerial.h"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\DualVirtualSerial.txt"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\LUFA DualVirtualSerial.inf"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\makefile"></File></Folder><Folder name="GenericHID"><File path="Demos\Device\LowLevel\GenericHID\Descriptors.c"></File><File path="Demos\Device\LowLevel\GenericHID\Descriptors.h"></File><File path="Demos\Device\LowLevel\GenericHID\Doxygen.conf"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.c"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.h"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.txt"></File><File path="Demos\Device\LowLevel\GenericHID\makefile"></File></Folder><Folder name="Joystick"><File path="Demos\Device\LowLevel\Joystick\Descriptors.c"></File><File path="Demos\Device\LowLevel\Joystick\Descriptors.h"></File><File path="Demos\Device\LowLevel\Joystick\Doxygen.conf"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.c"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.h"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.txt"></File><File path="Demos\Device\LowLevel\Joystick\makefile"></File></Folder><Folder name="Keyboard"><File path="Demos\Device\LowLevel\Keyboard\Descriptors.c"></File><File path="Demos\Device\LowLevel\Keyboard\Descriptors.h"></File><File path="Demos\Device\LowLevel\Keyboard\Doxygen.conf"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.c"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.h"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.txt"></File><File path="Demos\Device\LowLevel\Keyboard\makefile"></File></Folder><Folder name="KeyboardMouse"><File path="Demos\Device\LowLevel\KeyboardMouse\Descriptors.c"></File><File path="Demos\Device\LowLevel\KeyboardMouse\Descriptors.h"></File><File path="Demos\Device\LowLevel\KeyboardMouse\Doxygen.conf"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.c"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.h"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.txt"></File><File path="Demos\Device\LowLevel\KeyboardMouse\makefile"></File></Folder><Folder name="MassStorage"><Folder name="Lib"><File path="Demos\Device\LowLevel\MassStorage\Lib\DataflashManager.c"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\DataflashManager.h"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\SCSI.c"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\SCSI.h"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\SCSI_Codes.h"></File></Folder><File path="Demos\Device\LowLevel\MassStorage\Descriptors.c"></File><File path="Demos\Device\LowLevel\MassStorage\Descriptors.h"></File><File path="Demos\Device\LowLevel\MassStorage\Doxygen.conf"></File><File path="Demos\Device\LowLevel\MassStorage\makefile"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.c"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.h"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.txt"></File></Folder><Folder name="MIDI"><File path="Demos\Device\LowLevel\MIDI\Descriptors.c"></File><File path="Demos\Device\LowLevel\MIDI\Descriptors.h"></File><File path="Demos\Device\LowLevel\MIDI\Doxygen.conf"></File><File path="Demos\Device\LowLevel\MIDI\makefile"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.c"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.h"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.txt"></File></Folder><Folder name="Mouse"><File path="Demos\Device\LowLevel\Mouse\Descriptors.c"></File><File path="Demos\Device\LowLevel\Mouse\Descriptors.h"></File><File path="Demos\Device\LowLevel\Mouse\Doxygen.conf"></File><File path="Demos\Device\LowLevel\Mouse\makefile"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.c"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.h"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.txt"></File></Folder><Folder name="RNDISEthernet"><Folder name="Lib"><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Webserver.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ARP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ARP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\DHCP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\DHCP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Ethernet.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Ethernet.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\EthernetProtocols.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ICMP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ICMP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\IP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\IP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ProtocolDecoders.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ProtocolDecoders.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\RNDIS.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\RNDIS.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\RNDISConstants.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\TCP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\TCP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\UDP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\UDP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Webserver.c"></File></Folder><File path="Demos\Device\LowLevel\RNDISEthernet\Descriptors.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Descriptors.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Doxygen.conf"></File><File path="Demos\Device\LowLevel\RNDISEthernet\LUFA RNDIS.inf"></File><File path="Demos\Device\LowLevel\RNDISEthernet\makefile"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.txt"></File></Folder><Folder name="VirtualSerial"><File path="Demos\Device\LowLevel\VirtualSerial\Descriptors.c"></File><File path="Demos\Device\LowLevel\VirtualSerial\Descriptors.h"></File><File path="Demos\Device\LowLevel\VirtualSerial\Doxygen.conf"></File><File path="Demos\Device\LowLevel\VirtualSerial\LUFA VirtualSerial.inf"></File><File path="Demos\Device\LowLevel\VirtualSerial\makefile"></File><File path="Demos\Device\LowLevel\VirtualSerial\VirtualSerial.c"></File><File path="Demos\Device\LowLevel\VirtualSerial\VirtualSerial.h"></File><File path="Demos\Device\LowLevel\VirtualSerial\VirtualSerial.txt"></File></Folder><File path="Demos\Device\LowLevel\makefile"></File></Folder><Folder name="Incomplete"><Folder name="SideShow"><Folder name="Lib"><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowApplications.c"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowApplications.h"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowCommands.c"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowCommands.h"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowCommon.c"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowCommon.h"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowContent.c"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowContent.h"></File></Folder><File path="Demos\Device\Incomplete\Sideshow\Descriptors.c"></File><File path="Demos\Device\Incomplete\Sideshow\Descriptors.h"></File><File path="Demos\Device\Incomplete\Sideshow\makefile"></File><File path="Demos\Device\Incomplete\Sideshow\Sideshow.c"></File><File path="Demos\Device\Incomplete\Sideshow\Sideshow.h"></File></Folder></Folder><File path="Demos\Device\makefile"></File></Folder><Folder name="Host"><Folder name="ClassDriver"><Folder name="JoystickHostWithParser"><File path="Demos\Host\ClassDriver\JoystickHostWithParser\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\JoystickHostWithParser\JoystickHostWithParser.c"></File><File path="Demos\Host\ClassDriver\JoystickHostWithParser\JoystickHostWithParser.h"></File><File path="Demos\Host\ClassDriver\JoystickHostWithParser\JoystickHostWithParser.txt"></File><File path="Demos\Host\ClassDriver\JoystickHostWithParser\makefile"></File></Folder><Folder name="KeyboardHost"><File path="Demos\Host\ClassDriver\KeyboardHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\KeyboardHost\KeyboardHost.c"></File><File path="Demos\Host\ClassDriver\KeyboardHost\KeyboardHost.h"></File><File path="Demos\Host\ClassDriver\KeyboardHost\makefile"></File><File path="Demos\Host\ClassDriver\KeyboardHost\KeyboardHost.txt"></File></Folder><Folder name="KeyboardHostWithParser"><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\KeyboardHostWithParser.c"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\KeyboardHostWithParser.h"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\makefile"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\KeyboardHostWithParser.txt"></File></Folder><Folder name="MIDIHost"><File path="Demos\Host\ClassDriver\MIDIHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\MIDIHost\makefile"></File><File path="Demos\Host\ClassDriver\MIDIHost\MIDIHost.c"></File><File path="Demos\Host\ClassDriver\MIDIHost\MIDIHost.h"></File><File path="Demos\Host\ClassDriver\MIDIHost\MIDIHost.txt"></File></Folder><Folder name="MouseHost"><File path="Demos\Host\ClassDriver\MouseHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\MouseHost\makefile"></File><File path="Demos\Host\ClassDriver\MouseHost\MouseHost.c"></File><File path="Demos\Host\ClassDriver\MouseHost\MouseHost.h"></File><File path="Demos\Host\ClassDriver\MouseHost\MouseHost.txt"></File></Folder><Folder name="MouseHostWithParser"><File path="Demos\Host\ClassDriver\MouseHostWithParser\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\makefile"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\MouseHostWithParser.txt"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\MouseHostWithParser.c"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\MouseHostWithParser.h"></File></Folder><Folder name="MassStorageHost"><File path="Demos\Host\ClassDriver\MassStorageHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\MassStorageHost\makefile"></File><File path="Demos\Host\ClassDriver\MassStorageHost\MassStorageHost.c"></File><File path="Demos\Host\ClassDriver\MassStorageHost\MassStorageHost.h"></File><File path="Demos\Host\ClassDriver\MassStorageHost\MassStorageHost.txt"></File></Folder><Folder name="PrinterHost"><File path="Demos\Host\ClassDriver\PrinterHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\PrinterHost\makefile"></File><File path="Demos\Host\ClassDriver\PrinterHost\PrinterHost.c"></File><File path="Demos\Host\ClassDriver\PrinterHost\PrinterHost.h"></File><File path="Demos\Host\ClassDriver\PrinterHost\PrinterHost.txt"></File></Folder><Folder name="RNDISEthernetHost"><File path="Demos\Host\ClassDriver\RNDISEthernetHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\RNDISEthernetHost\makefile"></File><File path="Demos\Host\ClassDriver\RNDISEthernetHost\RNDISEthernetHost.c"></File><File path="Demos\Host\ClassDriver\RNDISEthernetHost\RNDISEthernetHost.h"></File><File path="Demos\Host\ClassDriver\RNDISEthernetHost\RNDISEthernetHost.txt"></File></Folder><Folder name="StillImageHost"><File path="Demos\Host\ClassDriver\StillImageHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\StillImageHost\makefile"></File><File path="Demos\Host\ClassDriver\StillImageHost\StillImageHost.c"></File><File path="Demos\Host\ClassDriver\StillImageHost\StillImageHost.h"></File><File path="Demos\Host\ClassDriver\StillImageHost\StillImageHost.txt"></File></Folder><Folder name="VirtualSerialHost"><File path="Demos\Host\ClassDriver\VirtualSerialHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\VirtualSerialHost\makefile"></File><File path="Demos\Host\ClassDriver\VirtualSerialHost\VirtualSerialHost.c"></File><File path="Demos\Host\ClassDriver\VirtualSerialHost\VirtualSerialHost.h"></File><File path="Demos\Host\ClassDriver\VirtualSerialHost\VirtualSerialHost.txt"></File></Folder><File path="Demos\Host\ClassDriver\makefile"></File></Folder><Folder name="LowLevel"><Folder name="GenericHIDHost"><File path="Demos\Host\LowLevel\GenericHIDHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\GenericHIDHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\GenericHIDHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\GenericHIDHost\GenericHIDHost.c"></File><File path="Demos\Host\LowLevel\GenericHIDHost\GenericHIDHost.h"></File><File path="Demos\Host\LowLevel\GenericHIDHost\GenericHIDHost.txt"></File><File path="Demos\Host\LowLevel\GenericHIDHost\makefile"></File></Folder><Folder name="JoystickHostWithParser"><File path="Demos\Host\LowLevel\JoystickHostWithParser\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\Doxygen.conf"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\HIDReport.c"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\HIDReport.h"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\JoystickHostWithParser.c"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\JoystickHostWithParser.h"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\JoystickHostWithParser.txt"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\makefile"></File></Folder><Folder name="KeyboardHost"><File path="Demos\Host\LowLevel\KeyboardHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\KeyboardHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\KeyboardHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\KeyboardHost\KeyboardHost.c"></File><File path="Demos\Host\LowLevel\KeyboardHost\KeyboardHost.h"></File><File path="Demos\Host\LowLevel\KeyboardHost\KeyboardHost.txt"></File><File path="Demos\Host\LowLevel\KeyboardHost\makefile"></File></Folder><Folder name="KeyboardHostWithParser"><File path="Demos\Host\LowLevel\KeyboardHostWithParser\makefile"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\Doxygen.conf"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\HIDReport.c"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\HIDReport.h"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\KeyboardHostWithParser.c"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\KeyboardHostWithParser.h"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\KeyboardHostWithParser.txt"></File></Folder><Folder name="MassStorageHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\MassStorageHost\Lib\MassStoreCommands.c"></File><File path="Demos\Host\LowLevel\MassStorageHost\Lib\MassStoreCommands.h"></File><File path="Demos\Host\LowLevel\MassStorageHost\Lib\SCSI_Codes.h"></File></Folder><File path="Demos\Host\LowLevel\MassStorageHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MassStorageHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MassStorageHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MassStorageHost\makefile"></File><File path="Demos\Host\LowLevel\MassStorageHost\MassStorageHost.c"></File><File path="Demos\Host\LowLevel\MassStorageHost\MassStorageHost.h"></File><File path="Demos\Host\LowLevel\MassStorageHost\MassStorageHost.txt"></File></Folder><Folder name="MIDIHost"><File path="Demos\Host\LowLevel\MIDIHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MIDIHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MIDIHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MIDIHost\makefile"></File><File path="Demos\Host\LowLevel\MIDIHost\MIDIHost.c"></File><File path="Demos\Host\LowLevel\MIDIHost\MIDIHost.h"></File><File path="Demos\Host\LowLevel\MIDIHost\MIDIHost.txt"></File></Folder><Folder name="MouseHost"><File path="Demos\Host\LowLevel\MouseHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MouseHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MouseHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MouseHost\makefile"></File><File path="Demos\Host\LowLevel\MouseHost\MouseHost.c"></File><File path="Demos\Host\LowLevel\MouseHost\MouseHost.h"></File><File path="Demos\Host\LowLevel\MouseHost\MouseHost.txt"></File></Folder><Folder name="MouseHostWithParser"><File path="Demos\Host\LowLevel\MouseHostWithParser\MouseHostWithParser.txt"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\HIDReport.c"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\HIDReport.h"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\makefile"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\MouseHostWithParser.c"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\MouseHostWithParser.h"></File></Folder><Folder name="PrinterHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\PrinterHost\Lib\PrinterCommands.c"></File><File path="Demos\Host\LowLevel\PrinterHost\Lib\PrinterCommands.h"></File></Folder><File path="Demos\Host\LowLevel\PrinterHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\PrinterHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\PrinterHost\makefile"></File><File path="Demos\Host\LowLevel\PrinterHost\PrinterHost.c"></File><File path="Demos\Host\LowLevel\PrinterHost\PrinterHost.h"></File><File path="Demos\Host\LowLevel\PrinterHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\PrinterHost\PrinterHost.txt"></File></Folder><Folder name="RNDISEthernetHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\RNDISEthernetHost\Lib\RNDISCommands.c"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\Lib\RNDISCommands.h"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\Lib\RNDISConstants.h"></File></Folder><File path="Demos\Host\LowLevel\RNDISEthernetHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\makefile"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\RNDISEthernetHost.c"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\RNDISEthernetHost.h"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\RNDISHost.txt"></File></Folder><Folder name="StillImageHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\StillImageHost\Lib\PIMACodes.h"></File><File path="Demos\Host\LowLevel\StillImageHost\Lib\StillImageCommands.c"></File><File path="Demos\Host\LowLevel\StillImageHost\Lib\StillImageCommands.h"></File></Folder><File path="Demos\Host\LowLevel\StillImageHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\StillImageHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\StillImageHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\StillImageHost\makefile"></File><File path="Demos\Host\LowLevel\StillImageHost\StillImageHost.c"></File><File path="Demos\Host\LowLevel\StillImageHost\StillImageHost.h"></File><File path="Demos\Host\LowLevel\StillImageHost\StillImageHost.txt"></File></Folder><Folder name="VirtualSerialHost"><File path="Demos\Host\LowLevel\VirtualSerialHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\makefile"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\VirtualSerialHost.c"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\VirtualSerialHost.h"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\VirtualSerialHost.txt"></File></Folder><File path="Demos\Host\LowLevel\makefile"></File></Folder><Folder name="Incomplete"><Folder name="BluetoothHost"><Folder name="Lib"><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothACLPackets.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothACLPackets.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothClassCodes.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothHCICommands.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothHCICommands.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothStack.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothStack.h"></File></Folder><File path="Demos\Host\Incomplete\BluetoothHost\makefile"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothHost.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothHost.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\ConfigDescriptor.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\ConfigDescriptor.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\DeviceDescriptor.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\DeviceDescriptor.h"></File></Folder></Folder><File path="Demos\Host\makefile"></File></Folder><Folder name="DualRole"><Folder name="ClassDriver"><Folder name="MouseHostDevice"><File path="Demos\DualRole\ClassDriver\MouseHostDevice\Doxygen.conf"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\makefile"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\MouseHostDevice.c"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\MouseHostDevice.h"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\Descriptors.c"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\Descriptors.h"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\DeviceFunctions.c"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\HostFunctions.c"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\HostFunctions.h"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\DeviceFunctions.h"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\MouseHostDevice.txt"></File></Folder><File path="Demos\DualRole\ClassDriver\makefile"></File></Folder><File path="Demos\DualRole\makefile"></File></Folder><File path="Demos\makefile"></File></Folder><Folder name="LUFA"><Folder name="Common"><File path="LUFA\Common\Common.h"></File><File path="LUFA\Common\FunctionAttributes.h"></File><File path="LUFA\Common\BoardTypes.h"></File></Folder><Folder name="Drivers"><Folder name="USB"><Folder name="LowLevel"><Folder name="Template"><File path="LUFA\Drivers\USB\LowLevel\Template\Template_Endpoint_RW.c"></File><File path="LUFA\Drivers\USB\LowLevel\Template\Template_Endpoint_Control_R.c"></File><File path="LUFA\Drivers\USB\LowLevel\Template\Template_Endpoint_Control_W.c"></File><File path="LUFA\Drivers\USB\LowLevel\Template\Template_Pipe_RW.c"></File></Folder><File path="LUFA\Drivers\USB\LowLevel\HostChapter9.h"></File><File path="LUFA\Drivers\USB\LowLevel\LowLevel.c"></File><File path="LUFA\Drivers\USB\LowLevel\LowLevel.h"></File><File path="LUFA\Drivers\USB\LowLevel\Pipe.c"></File><File path="LUFA\Drivers\USB\LowLevel\Pipe.h"></File><File path="LUFA\Drivers\USB\LowLevel\DevChapter9.c"></File><File path="LUFA\Drivers\USB\LowLevel\DevChapter9.h"></File><File path="LUFA\Drivers\USB\LowLevel\Device.h"></File><File path="LUFA\Drivers\USB\LowLevel\Endpoint.c"></File><File path="LUFA\Drivers\USB\LowLevel\Endpoint.h"></File><File path="LUFA\Drivers\USB\LowLevel\Host.c"></File><File path="LUFA\Drivers\USB\LowLevel\Host.h"></File><File path="LUFA\Drivers\USB\LowLevel\HostChapter9.c"></File><File path="LUFA\Drivers\USB\LowLevel\OTG.h"></File></Folder><Folder name="HighLevel"><File path="LUFA\Drivers\USB\HighLevel\USBTask.h"></File><File path="LUFA\Drivers\USB\HighLevel\Events.c"></File><File path="LUFA\Drivers\USB\HighLevel\Events.h"></File><File path="LUFA\Drivers\USB\HighLevel\USBInterrupt.c"></File><File path="LUFA\Drivers\USB\HighLevel\USBInterrupt.h"></File><File path="LUFA\Drivers\USB\HighLevel\USBTask.c"></File><File path="LUFA\Drivers\USB\HighLevel\StdDescriptors.h"></File><File path="LUFA\Drivers\USB\HighLevel\StdRequestType.h"></File><File path="LUFA\Drivers\USB\HighLevel\StreamCallbacks.h"></File><File path="LUFA\Drivers\USB\HighLevel\USBMode.h"></File><File path="LUFA\Drivers\USB\HighLevel\ConfigDescriptor.c"></File><File path="LUFA\Drivers\USB\HighLevel\ConfigDescriptor.h"></File></Folder><Folder name="Class"><Folder name="Device"><File path="LUFA\Drivers\USB\Class\Device\HID.c"></File><File path="LUFA\Drivers\USB\Class\Device\HID.h"></File><File path="LUFA\Drivers\USB\Class\Device\CDC.c"></File><File path="LUFA\Drivers\USB\Class\Device\CDC.h"></File><File path="LUFA\Drivers\USB\Class\Device\RNDIS.c"></File><File path="LUFA\Drivers\USB\Class\Device\RNDIS.h"></File><File path="LUFA\Drivers\USB\Class\Device\MassStorage.c"></File><File path="LUFA\Drivers\USB\Class\Device\MassStorage.h"></File><File path="LUFA\Drivers\USB\Class\Device\Audio.c"></File><File path="LUFA\Drivers\USB\Class\Device\Audio.h"></File><File path="LUFA\Drivers\USB\Class\Device\MIDI.c"></File><File path="LUFA\Drivers\USB\Class\Device\MIDI.h"></File></Folder><Folder name="Host"><File path="LUFA\Drivers\USB\Class\Host\HIDParser.c"></File><File path="LUFA\Drivers\USB\Class\Host\HIDParser.h"></File><File path="LUFA\Drivers\USB\Class\Host\HIDReportData.h"></File><File path="LUFA\Drivers\USB\Class\Host\CDC.c"></File><File path="LUFA\Drivers\USB\Class\Host\CDC.h"></File><File path="LUFA\Drivers\USB\Class\Host\HID.c"></File><File path="LUFA\Drivers\USB\Class\Host\HID.h"></File><File path="LUFA\Drivers\USB\Class\Host\MassStorage.c"></File><File path="LUFA\Drivers\USB\Class\Host\MassStorage.h"></File><File path="LUFA\Drivers\USB\Class\Host\StillImage.c"></File><File path="LUFA\Drivers\USB\Class\Host\StillImage.h"></File><File path="LUFA\Drivers\USB\Class\Host\MIDI.c"></File><File path="LUFA\Drivers\USB\Class\Host\MIDI.h"></File><File path="LUFA\Drivers\USB\Class\Host\Printer.c"></File><File path="LUFA\Drivers\USB\Class\Host\Printer.h"></File><File path="LUFA\Drivers\USB\Class\Host\RNDIS.h"></File><File path="LUFA\Drivers\USB\Class\Host\RNDIS.c"></File></Folder><Folder name="Common"><File path="LUFA\Drivers\USB\Class\Common\Audio.h"></File><File path="LUFA\Drivers\USB\Class\Common\CDC.h"></File><File path="LUFA\Drivers\USB\Class\Common\HID.h"></File><File path="LUFA\Drivers\USB\Class\Common\MassStorage.h"></File><File path="LUFA\Drivers\USB\Class\Common\MIDI.h"></File><File path="LUFA\Drivers\USB\Class\Common\RNDIS.h"></File><File path="LUFA\Drivers\USB\Class\Common\StillImage.h"></File><File path="LUFA\Drivers\USB\Class\Common\Printer.h"></File><File path="LUFA\Drivers\USB\Class\Common\RNDISConstants.h"></File></Folder><File path="LUFA\Drivers\USB\Class\Audio.h"></File><File path="LUFA\Drivers\USB\Class\CDC.h"></File><File path="LUFA\Drivers\USB\Class\HID.h"></File><File path="LUFA\Drivers\USB\Class\MassStorage.h"></File><File path="LUFA\Drivers\USB\Class\MIDI.h"></File><File path="LUFA\Drivers\USB\Class\RNDIS.h"></File><File path="LUFA\Drivers\USB\Class\StillImage.h"></File><File path="LUFA\Drivers\USB\Class\Printer.h"></File></Folder><File path="LUFA\Drivers\USB\USB.h"></File></Folder><Folder name="Misc"><File path="LUFA\Drivers\Misc\TerminalCodes.h"></File></Folder><Folder name="Board"><Folder name="USBKEY"><File path="LUFA\Drivers\Board\USBKEY\Dataflash.h"></File><File path="LUFA\Drivers\Board\USBKEY\Joystick.h"></File><File path="LUFA\Drivers\Board\USBKEY\AT45DB642D.h"></File><File path="LUFA\Drivers\Board\USBKEY\LEDs.h"></File><File path="LUFA\Drivers\Board\USBKEY\Buttons.h"></File></Folder><Folder name="STK526"><File path="LUFA\Drivers\Board\STK526\Dataflash.h"></File><File path="LUFA\Drivers\Board\STK526\Joystick.h"></File><File path="LUFA\Drivers\Board\STK526\AT45DB642D.h"></File><File path="LUFA\Drivers\Board\STK526\LEDs.h"></File><File path="LUFA\Drivers\Board\STK526\Buttons.h"></File></Folder><Folder name="STK525"><File path="LUFA\Drivers\Board\STK525\Dataflash.h"></File><File path="LUFA\Drivers\Board\STK525\Joystick.h"></File><File path="LUFA\Drivers\Board\STK525\AT45DB321C.h"></File><File path="LUFA\Drivers\Board\STK525\LEDs.h"></File><File path="LUFA\Drivers\Board\STK525\Buttons.h"></File></Folder><Folder name="RZUSBSTICK"><File path="LUFA\Drivers\Board\RZUSBSTICK\LEDs.h"></File></Folder><Folder name="ATAVRUSBRF01"><File path="LUFA\Drivers\Board\ATAVRUSBRF01\LEDs.h"></File><File path="LUFA\Drivers\Board\ATAVRUSBRF01\Buttons.h"></File></Folder><Folder name="BUMBLEB"><File path="LUFA\Drivers\Board\BUMBLEB\Buttons.h"></File><File path="LUFA\Drivers\Board\BUMBLEB\Joystick.h"></File><File path="LUFA\Drivers\Board\BUMBLEB\LEDs.h"></File></Folder><Folder name="XPLAIN"><File path="LUFA\Drivers\Board\XPLAIN\LEDs.h"></File><File path="LUFA\Drivers\Board\XPLAIN\AT45DB642D.h"></File><File path="LUFA\Drivers\Board\XPLAIN\Dataflash.h"></File></Folder><Folder name="EVK527"><File path="LUFA\Drivers\Board\EVK527\Buttons.h"></File><File path="LUFA\Drivers\Board\EVK527\LEDs.h"></File><File path="LUFA\Drivers\Board\EVK527\Joystick.h"></File><File path="LUFA\Drivers\Board\EVK527\AT45DB321C.h"></File><File path="LUFA\Drivers\Board\EVK527\Dataflash.h"></File></Folder><File path="LUFA\Drivers\Board\Temperature.h"></File><File path="LUFA\Drivers\Board\Dataflash.h"></File><File path="LUFA\Drivers\Board\Joystick.h"></File><File path="LUFA\Drivers\Board\Temperature.c"></File><File path="LUFA\Drivers\Board\LEDs.h"></File><File path="LUFA\Drivers\Board\Buttons.h"></File></Folder><Folder name="Peripheral"><Folder name="AVRU4U6U7"><File path="LUFA\Drivers\Peripheral\AVRU4U6U7\ADC.h"></File></Folder><File path="LUFA\Drivers\Peripheral\ADC.h"></File><File path="LUFA\Drivers\Peripheral\Serial.c"></File><File path="LUFA\Drivers\Peripheral\Serial.h"></File><File path="LUFA\Drivers\Peripheral\SPI.h"></File><File path="LUFA\Drivers\Peripheral\SerialStream.c"></File><File path="LUFA\Drivers\Peripheral\SerialStream.h"></File></Folder></Folder><Folder name="DriverStubs"><File path="LUFA\DriverStubs\Dataflash.h"></File><File path="LUFA\DriverStubs\Joystick.h"></File><File path="LUFA\DriverStubs\LEDs.h"></File><File path="LUFA\DriverStubs\Buttons.h"></File></Folder><Folder name="ManPages"><File path="LUFA\ManPages\AboutLUFA.txt"></File><File path="LUFA\ManPages\BuildingLinkableLibraries.txt"></File><File path="LUFA\ManPages\ChangeLog.txt"></File><File path="LUFA\ManPages\CompileTimeTokens.txt"></File><File path="LUFA\ManPages\DevelopingWithLUFA.txt"></File><File path="LUFA\ManPages\DeviceSupport.txt"></File><File path="LUFA\ManPages\DirectorySummaries.txt"></File><File path="LUFA\ManPages\Donating.txt"></File><File path="LUFA\ManPages\FutureChanges.txt"></File><File path="LUFA\ManPages\GettingStarted.txt"></File><File path="LUFA\ManPages\Groups.txt"></File><File path="LUFA\ManPages\LibraryResources.txt"></File><File path="LUFA\ManPages\LUFAPoweredProjects.txt"></File><File path="LUFA\ManPages\MainPage.txt"></File><File path="LUFA\ManPages\MigrationInformation.txt"></File><File path="LUFA\ManPages\VIDAndPIDValues.txt"></File><File path="LUFA\ManPages\WritingBoardDrivers.txt"></File><File path="LUFA\ManPages\ConfiguringApps.txt"></File><File path="LUFA\ManPages\CompilingApps.txt"></File><File path="LUFA\ManPages\ProgrammingApps.txt"></File><File path="LUFA\ManPages\LibraryApps.txt"></File><File path="LUFA\ManPages\Licence.txt"></File><File path="LUFA\ManPages\WhyUseLUFA.txt"></File><File path="LUFA\ManPages\LUFAvsAtmelStack.txt"></File><File path="LUFA\ManPages\AlternativeStacks.txt"></File></Folder><Folder name="Scheduler"><File path="LUFA\Scheduler\Scheduler.c"></File><File path="LUFA\Scheduler\Scheduler.h"></File></Folder><File path="LUFA\makefile"></File><File path="LUFA\Version.h"></File><File path="LUFA\Doxygen.conf"></File></Folder><Folder name="Bootloaders"><Folder name="DFU"><File path="Bootloaders\DFU\BootloaderDFU.c"></File><File path="Bootloaders\DFU\BootloaderDFU.h"></File><File path="Bootloaders\DFU\Descriptors.c"></File><File path="Bootloaders\DFU\Descriptors.h"></File><File path="Bootloaders\DFU\makefile"></File><File path="Bootloaders\DFU\BootloaderDFU.txt"></File><File path="Bootloaders\DFU\Doxygen.conf"></File></Folder><Folder name="CDC"><File path="Bootloaders\CDC\BootloaderCDC.c"></File><File path="Bootloaders\CDC\BootloaderCDC.h"></File><File path="Bootloaders\CDC\Descriptors.c"></File><File path="Bootloaders\CDC\Descriptors.h"></File><File path="Bootloaders\CDC\makefile"></File><File path="Bootloaders\CDC\LUFA CDC Bootloader.inf"></File><File path="Bootloaders\CDC\Doxygen.conf"></File><File path="Bootloaders\CDC\BootloaderCDC.txt"></File></Folder><Folder name="TeensyHID"><File path="Bootloaders\TeensyHID\Descriptors.c"></File><File path="Bootloaders\TeensyHID\Descriptors.h"></File><File path="Bootloaders\TeensyHID\makefile"></File><File path="Bootloaders\TeensyHID\TeensyHID.c"></File><File path="Bootloaders\TeensyHID\TeensyHID.h"></File><File path="Bootloaders\TeensyHID\TeensyHID.txt"></File></Folder><Folder name="Incomplete"><Folder name="MIDI"><Folder name="JavaHost"><File path="Bootloaders\Incomplete\MIDI\JavaHost\BIN2BOOT.java"></File><File path="Bootloaders\Incomplete\MIDI\JavaHost\MIDIMessageReceiver.java"></File></Folder><File path="Bootloaders\Incomplete\MIDI\BootloaderMIDI.c"></File><File path="Bootloaders\Incomplete\MIDI\BootloaderMIDI.h"></File><File path="Bootloaders\Incomplete\MIDI\Descriptors.c"></File><File path="Bootloaders\Incomplete\MIDI\Descriptors.h"></File><File path="Bootloaders\Incomplete\MIDI\Doxygen.conf"></File><File path="Bootloaders\Incomplete\MIDI\makefile"></File><File path="Bootloaders\Incomplete\MIDI\MIDI.c"></File></Folder></Folder><File path="Bootloaders\makefile"></File></Folder><Folder name="Projects"><Folder name="AVRISP"><Folder name="Lib"><Folder name="ISP"><File path="Projects\AVRISP\Lib\ISP\ISPProtocol.c"></File><File path="Projects\AVRISP\Lib\ISP\ISPProtocol.h"></File><File path="Projects\AVRISP\Lib\ISP\ISPTarget.c"></File><File path="Projects\AVRISP\Lib\ISP\ISPTarget.h"></File></Folder><Folder name="PDI"><File path="Projects\AVRISP\Lib\PDI\PDIProtocol.c"></File><File path="Projects\AVRISP\Lib\PDI\PDIProtocol.h"></File><File path="Projects\AVRISP\Lib\PDI\PDITarget.c"></File><File path="Projects\AVRISP\Lib\PDI\PDITarget.h"></File><File path="Projects\AVRISP\Lib\PDI\XMEGANVM.c"></File><File path="Projects\AVRISP\Lib\PDI\XMEGANVM.h"></File></Folder><Folder name="TPI"><File path="Projects\AVRISP\Lib\TPI\TINYNVM.c"></File><File path="Projects\AVRISP\Lib\TPI\TINYNVM.h"></File><File path="Projects\AVRISP\Lib\TPI\TPIProtocol.c"></File><File path="Projects\AVRISP\Lib\TPI\TPIProtocol.h"></File><File path="Projects\AVRISP\Lib\TPI\TPITarget.c"></File><File path="Projects\AVRISP\Lib\TPI\TPITarget.h"></File></Folder><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></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="LEDNotifier"><Folder name="Board"><File path="Projects\LEDNotifier\Board\LEDs.h"></File></Folder><Folder name="CPUUsageApp"><File path="Projects\LEDNotifier\CPUUsageApp\CPUMonitor.cs"></File><File path="Projects\LEDNotifier\CPUUsageApp\CPUMonitor.csproj"></File><File path="Projects\LEDNotifier\CPUUsageApp\CPUMonitor.Designer.cs"></File><File path="Projects\LEDNotifier\CPUUsageApp\CPUMonitor.resx"></File><File path="Projects\LEDNotifier\CPUUsageApp\Program.cs"></File></Folder><Folder name="HotmailNotifierApp"><File path="Projects\LEDNotifier\HotmailNotifierApp\MailNotifier.cs"></File><File path="Projects\LEDNotifier\HotmailNotifierApp\MailNotifier.csproj"></File><File path="Projects\LEDNotifier\HotmailNotifierApp\MailNotifier.Designer.cs"></File><File path="Projects\LEDNotifier\HotmailNotifierApp\MailNotifier.resx"></File><File path="Projects\LEDNotifier\HotmailNotifierApp\Program.cs"></File></Folder><Folder name="LEDMixerApp"><File path="Projects\LEDNotifier\LEDMixerApp\LEDMixer.cs"></File><File path="Projects\LEDNotifier\LEDMixerApp\LEDMixer.csproj"></File><File path="Projects\LEDNotifier\LEDMixerApp\LEDMixer.Designer.cs"></File><File path="Projects\LEDNotifier\LEDMixerApp\LEDMixer.resx"></File><File path="Projects\LEDNotifier\LEDMixerApp\Program.cs"></File></Folder><File path="Projects\LEDNotifier\Descriptors.c"></File><File path="Projects\LEDNotifier\Descriptors.h"></File><File path="Projects\LEDNotifier\Doxygen.conf"></File><File path="Projects\LEDNotifier\LEDNotifier.c"></File><File path="Projects\LEDNotifier\LEDNotifier.h"></File><File path="Projects\LEDNotifier\LEDNotifier.txt"></File><File path="Projects\LEDNotifier\LUFA LED Notifier.inf"></File><File path="Projects\LEDNotifier\makefile"></File></Folder><Folder name="MagStripe"><Folder name="Lib"><File path="Projects\Magstripe\Lib\CircularBitBuffer.c"></File><File path="Projects\Magstripe\Lib\CircularBitBuffer.h"></File><File path="Projects\Magstripe\Lib\MagstripeHW.h"></File></Folder><File path="Projects\Magstripe\Descriptors.c"></File><File path="Projects\Magstripe\Descriptors.h"></File><File path="Projects\Magstripe\Magstripe.c"></File><File path="Projects\Magstripe\Magstripe.h"></File><File path="Projects\Magstripe\makefile"></File><File path="Projects\Magstripe\Magstripe.txt"></File><File path="Projects\Magstripe\Doxygen.conf"></File></Folder><Folder name="MissileLauncher"><File path="Projects\MissileLauncher\ConfigDescriptor.c"></File><File path="Projects\MissileLauncher\ConfigDescriptor.h"></File><File path="Projects\MissileLauncher\Doxygen.conf"></File><File path="Projects\MissileLauncher\makefile"></File><File path="Projects\MissileLauncher\MissileLauncher.c"></File><File path="Projects\MissileLauncher\MissileLauncher.h"></File><File path="Projects\MissileLauncher\MissileLauncher.txt"></File></Folder><Folder name="USBtoSerial"><Folder name="Lib"><File path="Projects\USBtoSerial\Lib\RingBuff.c"></File><File path="Projects\USBtoSerial\Lib\RingBuff.h"></File></Folder><File path="Projects\USBtoSerial\Descriptors.c"></File><File path="Projects\USBtoSerial\Descriptors.h"></File><File path="Projects\USBtoSerial\Doxygen.conf"></File><File path="Projects\USBtoSerial\LUFA USBtoSerial.inf"></File><File path="Projects\USBtoSerial\makefile"></File><File path="Projects\USBtoSerial\USBtoSerial.c"></File><File path="Projects\USBtoSerial\USBtoSerial.h"></File><File path="Projects\USBtoSerial\USBtoSerial.txt"></File></Folder><Folder name="XPLAINBridge"><Folder name="Lib"><File path="Projects\XPLAINBridge\Lib\RingBuff.c"></File><File path="Projects\XPLAINBridge\Lib\RingBuff.h"></File><File path="Projects\XPLAINBridge\Lib\SoftUART.c"></File><File path="Projects\XPLAINBridge\Lib\SoftUART.h"></File></Folder><File path="Projects\XPLAINBridge\Descriptors.c"></File><File path="Projects\XPLAINBridge\Descriptors.h"></File><File path="Projects\XPLAINBridge\LUFA XPLAIN Bridge.inf"></File><File path="Projects\XPLAINBridge\makefile"></File><File path="Projects\XPLAINBridge\XPLAINBridge.c"></File><File path="Projects\XPLAINBridge\XPLAINBridge.h"></File><File path="Projects\XPLAINBridge\XPLAINBridge.txt"></File></Folder><Folder name="Incomplete"><Folder name="StandaloneProgrammer"><Folder name="Lib"><Folder name="PetiteFATFs"><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\diskio.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\diskio.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\integer.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\pff.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\pff.h"></File></Folder><File path="Projects\Incomplete\StandaloneProgrammer\Lib\DataflashManager.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\DataflashManager.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\SCSI.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\SCSI.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\ProgrammerConfig.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\ProgrammerConfig.h"></File></Folder><File path="Projects\Incomplete\StandaloneProgrammer\Descriptors.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Descriptors.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\makefile"></File><File path="Projects\Incomplete\StandaloneProgrammer\StandaloneProgrammer.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\StandaloneProgrammer.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\DiskDevice.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\DiskDevice.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\DiskHost.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\DiskHost.h"></File></Folder></Folder><File path="Projects\makefile"></File></Folder><File path="makefile"></File><File path="README.txt"></File></Project>
\ No newline at end of file
+<Project name="LUFA"><Folder name="Demos"><Folder name="Device"><Folder name="ClassDriver"><Folder name="AudioInput"><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.c"></File><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.h"></File><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.txt"></File><File path="Demos\Device\ClassDriver\AudioInput\Descriptors.c"></File><File path="Demos\Device\ClassDriver\AudioInput\Descriptors.h"></File><File path="Demos\Device\ClassDriver\AudioInput\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\AudioInput\makefile"></File></Folder><Folder name="AudioOutput"><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.c"></File><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.h"></File><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.txt"></File><File path="Demos\Device\ClassDriver\AudioOutput\Descriptors.c"></File><File path="Demos\Device\ClassDriver\AudioOutput\Descriptors.h"></File><File path="Demos\Device\ClassDriver\AudioOutput\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\AudioOutput\makefile"></File></Folder><Folder name="DualVirtualSerial"><File path="Demos\Device\ClassDriver\DualVirtualSerial\Descriptors.c"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\Descriptors.h"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\DualVirtualSerial.c"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\DualVirtualSerial.h"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\DualVirtualSerial.txt"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\LUFA DualVirtualSerial.inf"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\makefile"></File></Folder><Folder name="GenericHID"><File path="Demos\Device\ClassDriver\GenericHID\Descriptors.c"></File><File path="Demos\Device\ClassDriver\GenericHID\Descriptors.h"></File><File path="Demos\Device\ClassDriver\GenericHID\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.c"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.h"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.txt"></File><File path="Demos\Device\ClassDriver\GenericHID\makefile"></File></Folder><Folder name="Joystick"><File path="Demos\Device\ClassDriver\Joystick\Descriptors.c"></File><File path="Demos\Device\ClassDriver\Joystick\Descriptors.h"></File><File path="Demos\Device\ClassDriver\Joystick\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.c"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.h"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.txt"></File><File path="Demos\Device\ClassDriver\Joystick\makefile"></File></Folder><Folder name="Keyboard"><File path="Demos\Device\ClassDriver\Keyboard\Descriptors.c"></File><File path="Demos\Device\ClassDriver\Keyboard\Descriptors.h"></File><File path="Demos\Device\ClassDriver\Keyboard\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.c"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.h"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.txt"></File><File path="Demos\Device\ClassDriver\Keyboard\makefile"></File></Folder><Folder name="KeyboardMouse"><File path="Demos\Device\ClassDriver\KeyboardMouse\Descriptors.c"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\Descriptors.h"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.c"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.h"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.txt"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\makefile"></File></Folder><Folder name="MassStorage"><Folder name="Lib"><File path="Demos\Device\ClassDriver\MassStorage\Lib\DataflashManager.c"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\DataflashManager.h"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\SCSI.c"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\SCSI.h"></File></Folder><File path="Demos\Device\ClassDriver\MassStorage\Descriptors.c"></File><File path="Demos\Device\ClassDriver\MassStorage\Descriptors.h"></File><File path="Demos\Device\ClassDriver\MassStorage\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\MassStorage\makefile"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.c"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.h"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.txt"></File></Folder><Folder name="MassStorageKeyboard"><Folder name="Lib"><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\DataflashManager.c"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\DataflashManager.h"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\SCSI.c"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\SCSI.h"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\SCSI_Codes.h"></File></Folder><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Descriptors.c"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Descriptors.h"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\makefile"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\MassStorageKeyboard.c"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\MassStorageKeyboard.h"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\MassStorageKeyboard.txt"></File></Folder><Folder name="MIDI"><File path="Demos\Device\ClassDriver\MIDI\Descriptors.c"></File><File path="Demos\Device\ClassDriver\MIDI\Descriptors.h"></File><File path="Demos\Device\ClassDriver\MIDI\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\MIDI\makefile"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.c"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.h"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.txt"></File></Folder><Folder name="Mouse"><File path="Demos\Device\ClassDriver\Mouse\Descriptors.c"></File><File path="Demos\Device\ClassDriver\Mouse\Descriptors.h"></File><File path="Demos\Device\ClassDriver\Mouse\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\Mouse\makefile"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.c"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.h"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.txt"></File></Folder><Folder name="RNDISEthernet"><Folder name="Lib"><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Webserver.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ARP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ARP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\DHCP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\DHCP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Ethernet.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Ethernet.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\EthernetProtocols.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ICMP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ICMP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\IP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\IP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ProtocolDecoders.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ProtocolDecoders.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\TCP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\TCP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\UDP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\UDP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Webserver.c"></File></Folder><File path="Demos\Device\ClassDriver\RNDISEthernet\Descriptors.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Descriptors.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\LUFA RNDIS.inf"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\makefile"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.txt"></File></Folder><Folder name="VirtualSerial"><File path="Demos\Device\ClassDriver\VirtualSerial\Descriptors.c"></File><File path="Demos\Device\ClassDriver\VirtualSerial\Descriptors.h"></File><File path="Demos\Device\ClassDriver\VirtualSerial\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\VirtualSerial\LUFA VirtualSerial.inf"></File><File path="Demos\Device\ClassDriver\VirtualSerial\makefile"></File><File path="Demos\Device\ClassDriver\VirtualSerial\VirtualSerial.c"></File><File path="Demos\Device\ClassDriver\VirtualSerial\VirtualSerial.h"></File><File path="Demos\Device\ClassDriver\VirtualSerial\VirtualSerial.txt"></File></Folder><Folder name="VirtualSerialMouse"><File path="Demos\Device\ClassDriver\VirtualSerialMouse\Descriptors.c"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\Descriptors.h"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\LUFA VirtualSerialMouse.inf"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\makefile"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\VirtualSerialMouse.c"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\VirtualSerialMouse.h"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\VirtualSerialMouse.txt"></File></Folder><File path="Demos\Device\ClassDriver\makefile"></File></Folder><Folder name="LowLevel"><Folder name="AudioInput"><File path="Demos\Device\LowLevel\AudioInput\AudioInput.c"></File><File path="Demos\Device\LowLevel\AudioInput\AudioInput.h"></File><File path="Demos\Device\LowLevel\AudioInput\AudioInput.txt"></File><File path="Demos\Device\LowLevel\AudioInput\Descriptors.c"></File><File path="Demos\Device\LowLevel\AudioInput\Descriptors.h"></File><File path="Demos\Device\LowLevel\AudioInput\Doxygen.conf"></File><File path="Demos\Device\LowLevel\AudioInput\makefile"></File></Folder><Folder name="AudioOutput"><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.c"></File><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.h"></File><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.txt"></File><File path="Demos\Device\LowLevel\AudioOutput\Descriptors.c"></File><File path="Demos\Device\LowLevel\AudioOutput\Descriptors.h"></File><File path="Demos\Device\LowLevel\AudioOutput\Doxygen.conf"></File><File path="Demos\Device\LowLevel\AudioOutput\makefile"></File></Folder><Folder name="DualVirtualSerial"><File path="Demos\Device\LowLevel\DualVirtualSerial\Descriptors.c"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\Descriptors.h"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\Doxygen.conf"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\DualVirtualSerial.c"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\DualVirtualSerial.h"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\DualVirtualSerial.txt"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\LUFA DualVirtualSerial.inf"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\makefile"></File></Folder><Folder name="GenericHID"><File path="Demos\Device\LowLevel\GenericHID\Descriptors.c"></File><File path="Demos\Device\LowLevel\GenericHID\Descriptors.h"></File><File path="Demos\Device\LowLevel\GenericHID\Doxygen.conf"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.c"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.h"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.txt"></File><File path="Demos\Device\LowLevel\GenericHID\makefile"></File></Folder><Folder name="Joystick"><File path="Demos\Device\LowLevel\Joystick\Descriptors.c"></File><File path="Demos\Device\LowLevel\Joystick\Descriptors.h"></File><File path="Demos\Device\LowLevel\Joystick\Doxygen.conf"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.c"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.h"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.txt"></File><File path="Demos\Device\LowLevel\Joystick\makefile"></File></Folder><Folder name="Keyboard"><File path="Demos\Device\LowLevel\Keyboard\Descriptors.c"></File><File path="Demos\Device\LowLevel\Keyboard\Descriptors.h"></File><File path="Demos\Device\LowLevel\Keyboard\Doxygen.conf"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.c"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.h"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.txt"></File><File path="Demos\Device\LowLevel\Keyboard\makefile"></File></Folder><Folder name="KeyboardMouse"><File path="Demos\Device\LowLevel\KeyboardMouse\Descriptors.c"></File><File path="Demos\Device\LowLevel\KeyboardMouse\Descriptors.h"></File><File path="Demos\Device\LowLevel\KeyboardMouse\Doxygen.conf"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.c"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.h"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.txt"></File><File path="Demos\Device\LowLevel\KeyboardMouse\makefile"></File></Folder><Folder name="MassStorage"><Folder name="Lib"><File path="Demos\Device\LowLevel\MassStorage\Lib\DataflashManager.c"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\DataflashManager.h"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\SCSI.c"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\SCSI.h"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\SCSI_Codes.h"></File></Folder><File path="Demos\Device\LowLevel\MassStorage\Descriptors.c"></File><File path="Demos\Device\LowLevel\MassStorage\Descriptors.h"></File><File path="Demos\Device\LowLevel\MassStorage\Doxygen.conf"></File><File path="Demos\Device\LowLevel\MassStorage\makefile"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.c"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.h"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.txt"></File></Folder><Folder name="MIDI"><File path="Demos\Device\LowLevel\MIDI\Descriptors.c"></File><File path="Demos\Device\LowLevel\MIDI\Descriptors.h"></File><File path="Demos\Device\LowLevel\MIDI\Doxygen.conf"></File><File path="Demos\Device\LowLevel\MIDI\makefile"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.c"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.h"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.txt"></File></Folder><Folder name="Mouse"><File path="Demos\Device\LowLevel\Mouse\Descriptors.c"></File><File path="Demos\Device\LowLevel\Mouse\Descriptors.h"></File><File path="Demos\Device\LowLevel\Mouse\Doxygen.conf"></File><File path="Demos\Device\LowLevel\Mouse\makefile"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.c"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.h"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.txt"></File></Folder><Folder name="RNDISEthernet"><Folder name="Lib"><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Webserver.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ARP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ARP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\DHCP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\DHCP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Ethernet.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Ethernet.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\EthernetProtocols.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ICMP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ICMP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\IP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\IP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ProtocolDecoders.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ProtocolDecoders.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\RNDIS.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\RNDIS.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\RNDISConstants.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\TCP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\TCP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\UDP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\UDP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Webserver.c"></File></Folder><File path="Demos\Device\LowLevel\RNDISEthernet\Descriptors.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Descriptors.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Doxygen.conf"></File><File path="Demos\Device\LowLevel\RNDISEthernet\LUFA RNDIS.inf"></File><File path="Demos\Device\LowLevel\RNDISEthernet\makefile"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.txt"></File></Folder><Folder name="VirtualSerial"><File path="Demos\Device\LowLevel\VirtualSerial\Descriptors.c"></File><File path="Demos\Device\LowLevel\VirtualSerial\Descriptors.h"></File><File path="Demos\Device\LowLevel\VirtualSerial\Doxygen.conf"></File><File path="Demos\Device\LowLevel\VirtualSerial\LUFA VirtualSerial.inf"></File><File path="Demos\Device\LowLevel\VirtualSerial\makefile"></File><File path="Demos\Device\LowLevel\VirtualSerial\VirtualSerial.c"></File><File path="Demos\Device\LowLevel\VirtualSerial\VirtualSerial.h"></File><File path="Demos\Device\LowLevel\VirtualSerial\VirtualSerial.txt"></File></Folder><File path="Demos\Device\LowLevel\makefile"></File></Folder><Folder name="Incomplete"><Folder name="SideShow"><Folder name="Lib"><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowApplications.c"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowApplications.h"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowCommands.c"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowCommands.h"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowCommon.c"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowCommon.h"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowContent.c"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowContent.h"></File></Folder><File path="Demos\Device\Incomplete\Sideshow\Descriptors.c"></File><File path="Demos\Device\Incomplete\Sideshow\Descriptors.h"></File><File path="Demos\Device\Incomplete\Sideshow\makefile"></File><File path="Demos\Device\Incomplete\Sideshow\Sideshow.c"></File><File path="Demos\Device\Incomplete\Sideshow\Sideshow.h"></File></Folder></Folder><File path="Demos\Device\makefile"></File></Folder><Folder name="Host"><Folder name="ClassDriver"><Folder name="JoystickHostWithParser"><File path="Demos\Host\ClassDriver\JoystickHostWithParser\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\JoystickHostWithParser\JoystickHostWithParser.c"></File><File path="Demos\Host\ClassDriver\JoystickHostWithParser\JoystickHostWithParser.h"></File><File path="Demos\Host\ClassDriver\JoystickHostWithParser\JoystickHostWithParser.txt"></File><File path="Demos\Host\ClassDriver\JoystickHostWithParser\makefile"></File></Folder><Folder name="KeyboardHost"><File path="Demos\Host\ClassDriver\KeyboardHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\KeyboardHost\KeyboardHost.c"></File><File path="Demos\Host\ClassDriver\KeyboardHost\KeyboardHost.h"></File><File path="Demos\Host\ClassDriver\KeyboardHost\makefile"></File><File path="Demos\Host\ClassDriver\KeyboardHost\KeyboardHost.txt"></File></Folder><Folder name="KeyboardHostWithParser"><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\KeyboardHostWithParser.c"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\KeyboardHostWithParser.h"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\makefile"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\KeyboardHostWithParser.txt"></File></Folder><Folder name="MIDIHost"><File path="Demos\Host\ClassDriver\MIDIHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\MIDIHost\makefile"></File><File path="Demos\Host\ClassDriver\MIDIHost\MIDIHost.c"></File><File path="Demos\Host\ClassDriver\MIDIHost\MIDIHost.h"></File><File path="Demos\Host\ClassDriver\MIDIHost\MIDIHost.txt"></File></Folder><Folder name="MouseHost"><File path="Demos\Host\ClassDriver\MouseHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\MouseHost\makefile"></File><File path="Demos\Host\ClassDriver\MouseHost\MouseHost.c"></File><File path="Demos\Host\ClassDriver\MouseHost\MouseHost.h"></File><File path="Demos\Host\ClassDriver\MouseHost\MouseHost.txt"></File></Folder><Folder name="MouseHostWithParser"><File path="Demos\Host\ClassDriver\MouseHostWithParser\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\makefile"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\MouseHostWithParser.txt"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\MouseHostWithParser.c"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\MouseHostWithParser.h"></File></Folder><Folder name="MassStorageHost"><File path="Demos\Host\ClassDriver\MassStorageHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\MassStorageHost\makefile"></File><File path="Demos\Host\ClassDriver\MassStorageHost\MassStorageHost.c"></File><File path="Demos\Host\ClassDriver\MassStorageHost\MassStorageHost.h"></File><File path="Demos\Host\ClassDriver\MassStorageHost\MassStorageHost.txt"></File></Folder><Folder name="PrinterHost"><File path="Demos\Host\ClassDriver\PrinterHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\PrinterHost\makefile"></File><File path="Demos\Host\ClassDriver\PrinterHost\PrinterHost.c"></File><File path="Demos\Host\ClassDriver\PrinterHost\PrinterHost.h"></File><File path="Demos\Host\ClassDriver\PrinterHost\PrinterHost.txt"></File></Folder><Folder name="RNDISEthernetHost"><File path="Demos\Host\ClassDriver\RNDISEthernetHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\RNDISEthernetHost\makefile"></File><File path="Demos\Host\ClassDriver\RNDISEthernetHost\RNDISEthernetHost.c"></File><File path="Demos\Host\ClassDriver\RNDISEthernetHost\RNDISEthernetHost.h"></File><File path="Demos\Host\ClassDriver\RNDISEthernetHost\RNDISEthernetHost.txt"></File></Folder><Folder name="StillImageHost"><File path="Demos\Host\ClassDriver\StillImageHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\StillImageHost\makefile"></File><File path="Demos\Host\ClassDriver\StillImageHost\StillImageHost.c"></File><File path="Demos\Host\ClassDriver\StillImageHost\StillImageHost.h"></File><File path="Demos\Host\ClassDriver\StillImageHost\StillImageHost.txt"></File></Folder><Folder name="VirtualSerialHost"><File path="Demos\Host\ClassDriver\VirtualSerialHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\VirtualSerialHost\makefile"></File><File path="Demos\Host\ClassDriver\VirtualSerialHost\VirtualSerialHost.c"></File><File path="Demos\Host\ClassDriver\VirtualSerialHost\VirtualSerialHost.h"></File><File path="Demos\Host\ClassDriver\VirtualSerialHost\VirtualSerialHost.txt"></File></Folder><File path="Demos\Host\ClassDriver\makefile"></File></Folder><Folder name="LowLevel"><Folder name="GenericHIDHost"><File path="Demos\Host\LowLevel\GenericHIDHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\GenericHIDHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\GenericHIDHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\GenericHIDHost\GenericHIDHost.c"></File><File path="Demos\Host\LowLevel\GenericHIDHost\GenericHIDHost.h"></File><File path="Demos\Host\LowLevel\GenericHIDHost\GenericHIDHost.txt"></File><File path="Demos\Host\LowLevel\GenericHIDHost\makefile"></File></Folder><Folder name="JoystickHostWithParser"><File path="Demos\Host\LowLevel\JoystickHostWithParser\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\Doxygen.conf"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\HIDReport.c"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\HIDReport.h"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\JoystickHostWithParser.c"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\JoystickHostWithParser.h"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\JoystickHostWithParser.txt"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\makefile"></File></Folder><Folder name="KeyboardHost"><File path="Demos\Host\LowLevel\KeyboardHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\KeyboardHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\KeyboardHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\KeyboardHost\KeyboardHost.c"></File><File path="Demos\Host\LowLevel\KeyboardHost\KeyboardHost.h"></File><File path="Demos\Host\LowLevel\KeyboardHost\KeyboardHost.txt"></File><File path="Demos\Host\LowLevel\KeyboardHost\makefile"></File></Folder><Folder name="KeyboardHostWithParser"><File path="Demos\Host\LowLevel\KeyboardHostWithParser\makefile"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\Doxygen.conf"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\HIDReport.c"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\HIDReport.h"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\KeyboardHostWithParser.c"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\KeyboardHostWithParser.h"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\KeyboardHostWithParser.txt"></File></Folder><Folder name="MassStorageHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\MassStorageHost\Lib\MassStoreCommands.c"></File><File path="Demos\Host\LowLevel\MassStorageHost\Lib\MassStoreCommands.h"></File><File path="Demos\Host\LowLevel\MassStorageHost\Lib\SCSI_Codes.h"></File></Folder><File path="Demos\Host\LowLevel\MassStorageHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MassStorageHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MassStorageHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MassStorageHost\makefile"></File><File path="Demos\Host\LowLevel\MassStorageHost\MassStorageHost.c"></File><File path="Demos\Host\LowLevel\MassStorageHost\MassStorageHost.h"></File><File path="Demos\Host\LowLevel\MassStorageHost\MassStorageHost.txt"></File></Folder><Folder name="MIDIHost"><File path="Demos\Host\LowLevel\MIDIHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MIDIHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MIDIHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MIDIHost\makefile"></File><File path="Demos\Host\LowLevel\MIDIHost\MIDIHost.c"></File><File path="Demos\Host\LowLevel\MIDIHost\MIDIHost.h"></File><File path="Demos\Host\LowLevel\MIDIHost\MIDIHost.txt"></File></Folder><Folder name="MouseHost"><File path="Demos\Host\LowLevel\MouseHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MouseHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MouseHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MouseHost\makefile"></File><File path="Demos\Host\LowLevel\MouseHost\MouseHost.c"></File><File path="Demos\Host\LowLevel\MouseHost\MouseHost.h"></File><File path="Demos\Host\LowLevel\MouseHost\MouseHost.txt"></File></Folder><Folder name="MouseHostWithParser"><File path="Demos\Host\LowLevel\MouseHostWithParser\MouseHostWithParser.txt"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\HIDReport.c"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\HIDReport.h"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\makefile"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\MouseHostWithParser.c"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\MouseHostWithParser.h"></File></Folder><Folder name="PrinterHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\PrinterHost\Lib\PrinterCommands.c"></File><File path="Demos\Host\LowLevel\PrinterHost\Lib\PrinterCommands.h"></File></Folder><File path="Demos\Host\LowLevel\PrinterHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\PrinterHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\PrinterHost\makefile"></File><File path="Demos\Host\LowLevel\PrinterHost\PrinterHost.c"></File><File path="Demos\Host\LowLevel\PrinterHost\PrinterHost.h"></File><File path="Demos\Host\LowLevel\PrinterHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\PrinterHost\PrinterHost.txt"></File></Folder><Folder name="RNDISEthernetHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\RNDISEthernetHost\Lib\RNDISCommands.c"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\Lib\RNDISCommands.h"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\Lib\RNDISConstants.h"></File></Folder><File path="Demos\Host\LowLevel\RNDISEthernetHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\makefile"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\RNDISEthernetHost.c"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\RNDISEthernetHost.h"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\RNDISHost.txt"></File></Folder><Folder name="StillImageHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\StillImageHost\Lib\PIMACodes.h"></File><File path="Demos\Host\LowLevel\StillImageHost\Lib\StillImageCommands.c"></File><File path="Demos\Host\LowLevel\StillImageHost\Lib\StillImageCommands.h"></File></Folder><File path="Demos\Host\LowLevel\StillImageHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\StillImageHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\StillImageHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\StillImageHost\makefile"></File><File path="Demos\Host\LowLevel\StillImageHost\StillImageHost.c"></File><File path="Demos\Host\LowLevel\StillImageHost\StillImageHost.h"></File><File path="Demos\Host\LowLevel\StillImageHost\StillImageHost.txt"></File></Folder><Folder name="VirtualSerialHost"><File path="Demos\Host\LowLevel\VirtualSerialHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\makefile"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\VirtualSerialHost.c"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\VirtualSerialHost.h"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\VirtualSerialHost.txt"></File></Folder><File path="Demos\Host\LowLevel\makefile"></File></Folder><Folder name="Incomplete"><Folder name="BluetoothHost"><Folder name="Lib"><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothACLPackets.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothACLPackets.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothClassCodes.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothHCICommands.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothHCICommands.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothStack.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothStack.h"></File></Folder><File path="Demos\Host\Incomplete\BluetoothHost\makefile"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothHost.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothHost.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\ConfigDescriptor.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\ConfigDescriptor.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\DeviceDescriptor.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\DeviceDescriptor.h"></File></Folder></Folder><File path="Demos\Host\makefile"></File></Folder><Folder name="DualRole"><Folder name="ClassDriver"><Folder name="MouseHostDevice"><File path="Demos\DualRole\ClassDriver\MouseHostDevice\Doxygen.conf"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\makefile"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\MouseHostDevice.c"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\MouseHostDevice.h"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\Descriptors.c"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\Descriptors.h"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\DeviceFunctions.c"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\HostFunctions.c"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\HostFunctions.h"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\DeviceFunctions.h"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\MouseHostDevice.txt"></File></Folder><File path="Demos\DualRole\ClassDriver\makefile"></File></Folder><File path="Demos\DualRole\makefile"></File></Folder><File path="Demos\makefile"></File></Folder><Folder name="LUFA"><Folder name="Common"><File path="LUFA\Common\Common.h"></File><File path="LUFA\Common\FunctionAttributes.h"></File><File path="LUFA\Common\BoardTypes.h"></File></Folder><Folder name="Drivers"><Folder name="USB"><Folder name="LowLevel"><Folder name="Template"><File path="LUFA\Drivers\USB\LowLevel\Template\Template_Endpoint_RW.c"></File><File path="LUFA\Drivers\USB\LowLevel\Template\Template_Endpoint_Control_R.c"></File><File path="LUFA\Drivers\USB\LowLevel\Template\Template_Endpoint_Control_W.c"></File><File path="LUFA\Drivers\USB\LowLevel\Template\Template_Pipe_RW.c"></File></Folder><File path="LUFA\Drivers\USB\LowLevel\HostChapter9.h"></File><File path="LUFA\Drivers\USB\LowLevel\LowLevel.c"></File><File path="LUFA\Drivers\USB\LowLevel\LowLevel.h"></File><File path="LUFA\Drivers\USB\LowLevel\Pipe.c"></File><File path="LUFA\Drivers\USB\LowLevel\Pipe.h"></File><File path="LUFA\Drivers\USB\LowLevel\DevChapter9.c"></File><File path="LUFA\Drivers\USB\LowLevel\DevChapter9.h"></File><File path="LUFA\Drivers\USB\LowLevel\Device.h"></File><File path="LUFA\Drivers\USB\LowLevel\Endpoint.c"></File><File path="LUFA\Drivers\USB\LowLevel\Endpoint.h"></File><File path="LUFA\Drivers\USB\LowLevel\Host.c"></File><File path="LUFA\Drivers\USB\LowLevel\Host.h"></File><File path="LUFA\Drivers\USB\LowLevel\HostChapter9.c"></File><File path="LUFA\Drivers\USB\LowLevel\OTG.h"></File></Folder><Folder name="HighLevel"><File path="LUFA\Drivers\USB\HighLevel\USBTask.h"></File><File path="LUFA\Drivers\USB\HighLevel\Events.c"></File><File path="LUFA\Drivers\USB\HighLevel\Events.h"></File><File path="LUFA\Drivers\USB\HighLevel\USBInterrupt.c"></File><File path="LUFA\Drivers\USB\HighLevel\USBInterrupt.h"></File><File path="LUFA\Drivers\USB\HighLevel\USBTask.c"></File><File path="LUFA\Drivers\USB\HighLevel\StdDescriptors.h"></File><File path="LUFA\Drivers\USB\HighLevel\StdRequestType.h"></File><File path="LUFA\Drivers\USB\HighLevel\StreamCallbacks.h"></File><File path="LUFA\Drivers\USB\HighLevel\USBMode.h"></File><File path="LUFA\Drivers\USB\HighLevel\ConfigDescriptor.c"></File><File path="LUFA\Drivers\USB\HighLevel\ConfigDescriptor.h"></File></Folder><Folder name="Class"><Folder name="Device"><File path="LUFA\Drivers\USB\Class\Device\HID.c"></File><File path="LUFA\Drivers\USB\Class\Device\HID.h"></File><File path="LUFA\Drivers\USB\Class\Device\CDC.c"></File><File path="LUFA\Drivers\USB\Class\Device\CDC.h"></File><File path="LUFA\Drivers\USB\Class\Device\RNDIS.c"></File><File path="LUFA\Drivers\USB\Class\Device\RNDIS.h"></File><File path="LUFA\Drivers\USB\Class\Device\MassStorage.c"></File><File path="LUFA\Drivers\USB\Class\Device\MassStorage.h"></File><File path="LUFA\Drivers\USB\Class\Device\Audio.c"></File><File path="LUFA\Drivers\USB\Class\Device\Audio.h"></File><File path="LUFA\Drivers\USB\Class\Device\MIDI.c"></File><File path="LUFA\Drivers\USB\Class\Device\MIDI.h"></File></Folder><Folder name="Host"><File path="LUFA\Drivers\USB\Class\Host\HIDParser.c"></File><File path="LUFA\Drivers\USB\Class\Host\HIDParser.h"></File><File path="LUFA\Drivers\USB\Class\Host\HIDReportData.h"></File><File path="LUFA\Drivers\USB\Class\Host\CDC.c"></File><File path="LUFA\Drivers\USB\Class\Host\CDC.h"></File><File path="LUFA\Drivers\USB\Class\Host\HID.c"></File><File path="LUFA\Drivers\USB\Class\Host\HID.h"></File><File path="LUFA\Drivers\USB\Class\Host\MassStorage.c"></File><File path="LUFA\Drivers\USB\Class\Host\MassStorage.h"></File><File path="LUFA\Drivers\USB\Class\Host\StillImage.c"></File><File path="LUFA\Drivers\USB\Class\Host\StillImage.h"></File><File path="LUFA\Drivers\USB\Class\Host\MIDI.c"></File><File path="LUFA\Drivers\USB\Class\Host\MIDI.h"></File><File path="LUFA\Drivers\USB\Class\Host\Printer.c"></File><File path="LUFA\Drivers\USB\Class\Host\Printer.h"></File><File path="LUFA\Drivers\USB\Class\Host\RNDIS.h"></File><File path="LUFA\Drivers\USB\Class\Host\RNDIS.c"></File></Folder><Folder name="Common"><File path="LUFA\Drivers\USB\Class\Common\Audio.h"></File><File path="LUFA\Drivers\USB\Class\Common\CDC.h"></File><File path="LUFA\Drivers\USB\Class\Common\HID.h"></File><File path="LUFA\Drivers\USB\Class\Common\MassStorage.h"></File><File path="LUFA\Drivers\USB\Class\Common\MIDI.h"></File><File path="LUFA\Drivers\USB\Class\Common\RNDIS.h"></File><File path="LUFA\Drivers\USB\Class\Common\StillImage.h"></File><File path="LUFA\Drivers\USB\Class\Common\Printer.h"></File><File path="LUFA\Drivers\USB\Class\Common\RNDISConstants.h"></File></Folder><File path="LUFA\Drivers\USB\Class\Audio.h"></File><File path="LUFA\Drivers\USB\Class\CDC.h"></File><File path="LUFA\Drivers\USB\Class\HID.h"></File><File path="LUFA\Drivers\USB\Class\MassStorage.h"></File><File path="LUFA\Drivers\USB\Class\MIDI.h"></File><File path="LUFA\Drivers\USB\Class\RNDIS.h"></File><File path="LUFA\Drivers\USB\Class\StillImage.h"></File><File path="LUFA\Drivers\USB\Class\Printer.h"></File></Folder><File path="LUFA\Drivers\USB\USB.h"></File></Folder><Folder name="Misc"><File path="LUFA\Drivers\Misc\TerminalCodes.h"></File></Folder><Folder name="Board"><Folder name="USBKEY"><File path="LUFA\Drivers\Board\USBKEY\Dataflash.h"></File><File path="LUFA\Drivers\Board\USBKEY\Joystick.h"></File><File path="LUFA\Drivers\Board\USBKEY\AT45DB642D.h"></File><File path="LUFA\Drivers\Board\USBKEY\LEDs.h"></File><File path="LUFA\Drivers\Board\USBKEY\Buttons.h"></File></Folder><Folder name="STK526"><File path="LUFA\Drivers\Board\STK526\Dataflash.h"></File><File path="LUFA\Drivers\Board\STK526\Joystick.h"></File><File path="LUFA\Drivers\Board\STK526\AT45DB642D.h"></File><File path="LUFA\Drivers\Board\STK526\LEDs.h"></File><File path="LUFA\Drivers\Board\STK526\Buttons.h"></File></Folder><Folder name="STK525"><File path="LUFA\Drivers\Board\STK525\Dataflash.h"></File><File path="LUFA\Drivers\Board\STK525\Joystick.h"></File><File path="LUFA\Drivers\Board\STK525\AT45DB321C.h"></File><File path="LUFA\Drivers\Board\STK525\LEDs.h"></File><File path="LUFA\Drivers\Board\STK525\Buttons.h"></File></Folder><Folder name="RZUSBSTICK"><File path="LUFA\Drivers\Board\RZUSBSTICK\LEDs.h"></File></Folder><Folder name="ATAVRUSBRF01"><File path="LUFA\Drivers\Board\ATAVRUSBRF01\LEDs.h"></File><File path="LUFA\Drivers\Board\ATAVRUSBRF01\Buttons.h"></File></Folder><Folder name="BUMBLEB"><File path="LUFA\Drivers\Board\BUMBLEB\Buttons.h"></File><File path="LUFA\Drivers\Board\BUMBLEB\Joystick.h"></File><File path="LUFA\Drivers\Board\BUMBLEB\LEDs.h"></File></Folder><Folder name="XPLAIN"><File path="LUFA\Drivers\Board\XPLAIN\LEDs.h"></File><File path="LUFA\Drivers\Board\XPLAIN\AT45DB642D.h"></File><File path="LUFA\Drivers\Board\XPLAIN\Dataflash.h"></File></Folder><Folder name="EVK527"><File path="LUFA\Drivers\Board\EVK527\Buttons.h"></File><File path="LUFA\Drivers\Board\EVK527\LEDs.h"></File><File path="LUFA\Drivers\Board\EVK527\Joystick.h"></File><File path="LUFA\Drivers\Board\EVK527\AT45DB321C.h"></File><File path="LUFA\Drivers\Board\EVK527\Dataflash.h"></File></Folder><File path="LUFA\Drivers\Board\Temperature.h"></File><File path="LUFA\Drivers\Board\Dataflash.h"></File><File path="LUFA\Drivers\Board\Joystick.h"></File><File path="LUFA\Drivers\Board\Temperature.c"></File><File path="LUFA\Drivers\Board\LEDs.h"></File><File path="LUFA\Drivers\Board\Buttons.h"></File></Folder><Folder name="Peripheral"><Folder name="AVRU4U6U7"><File path="LUFA\Drivers\Peripheral\AVRU4U6U7\ADC.h"></File></Folder><File path="LUFA\Drivers\Peripheral\ADC.h"></File><File path="LUFA\Drivers\Peripheral\Serial.c"></File><File path="LUFA\Drivers\Peripheral\Serial.h"></File><File path="LUFA\Drivers\Peripheral\SPI.h"></File><File path="LUFA\Drivers\Peripheral\SerialStream.c"></File><File path="LUFA\Drivers\Peripheral\SerialStream.h"></File></Folder></Folder><Folder name="DriverStubs"><File path="LUFA\DriverStubs\Dataflash.h"></File><File path="LUFA\DriverStubs\Joystick.h"></File><File path="LUFA\DriverStubs\LEDs.h"></File><File path="LUFA\DriverStubs\Buttons.h"></File></Folder><Folder name="ManPages"><File path="LUFA\ManPages\AboutLUFA.txt"></File><File path="LUFA\ManPages\BuildingLinkableLibraries.txt"></File><File path="LUFA\ManPages\ChangeLog.txt"></File><File path="LUFA\ManPages\CompileTimeTokens.txt"></File><File path="LUFA\ManPages\DevelopingWithLUFA.txt"></File><File path="LUFA\ManPages\DeviceSupport.txt"></File><File path="LUFA\ManPages\DirectorySummaries.txt"></File><File path="LUFA\ManPages\Donating.txt"></File><File path="LUFA\ManPages\FutureChanges.txt"></File><File path="LUFA\ManPages\GettingStarted.txt"></File><File path="LUFA\ManPages\Groups.txt"></File><File path="LUFA\ManPages\LibraryResources.txt"></File><File path="LUFA\ManPages\LUFAPoweredProjects.txt"></File><File path="LUFA\ManPages\MainPage.txt"></File><File path="LUFA\ManPages\MigrationInformation.txt"></File><File path="LUFA\ManPages\VIDAndPIDValues.txt"></File><File path="LUFA\ManPages\WritingBoardDrivers.txt"></File><File path="LUFA\ManPages\ConfiguringApps.txt"></File><File path="LUFA\ManPages\CompilingApps.txt"></File><File path="LUFA\ManPages\ProgrammingApps.txt"></File><File path="LUFA\ManPages\LibraryApps.txt"></File><File path="LUFA\ManPages\Licence.txt"></File><File path="LUFA\ManPages\WhyUseLUFA.txt"></File><File path="LUFA\ManPages\LUFAvsAtmelStack.txt"></File><File path="LUFA\ManPages\AlternativeStacks.txt"></File></Folder><Folder name="Scheduler"><File path="LUFA\Scheduler\Scheduler.c"></File><File path="LUFA\Scheduler\Scheduler.h"></File></Folder><File path="LUFA\makefile"></File><File path="LUFA\Version.h"></File><File path="LUFA\Doxygen.conf"></File></Folder><Folder name="Bootloaders"><Folder name="DFU"><File path="Bootloaders\DFU\BootloaderDFU.c"></File><File path="Bootloaders\DFU\BootloaderDFU.h"></File><File path="Bootloaders\DFU\Descriptors.c"></File><File path="Bootloaders\DFU\Descriptors.h"></File><File path="Bootloaders\DFU\makefile"></File><File path="Bootloaders\DFU\BootloaderDFU.txt"></File><File path="Bootloaders\DFU\Doxygen.conf"></File></Folder><Folder name="CDC"><File path="Bootloaders\CDC\BootloaderCDC.c"></File><File path="Bootloaders\CDC\BootloaderCDC.h"></File><File path="Bootloaders\CDC\Descriptors.c"></File><File path="Bootloaders\CDC\Descriptors.h"></File><File path="Bootloaders\CDC\makefile"></File><File path="Bootloaders\CDC\LUFA CDC Bootloader.inf"></File><File path="Bootloaders\CDC\Doxygen.conf"></File><File path="Bootloaders\CDC\BootloaderCDC.txt"></File></Folder><Folder name="TeensyHID"><File path="Bootloaders\TeensyHID\Descriptors.c"></File><File path="Bootloaders\TeensyHID\Descriptors.h"></File><File path="Bootloaders\TeensyHID\makefile"></File><File path="Bootloaders\TeensyHID\TeensyHID.c"></File><File path="Bootloaders\TeensyHID\TeensyHID.h"></File><File path="Bootloaders\TeensyHID\TeensyHID.txt"></File></Folder><Folder name="Incomplete"><Folder name="MIDI"><Folder name="JavaHost"><File path="Bootloaders\Incomplete\MIDI\JavaHost\BIN2BOOT.java"></File><File path="Bootloaders\Incomplete\MIDI\JavaHost\MIDIMessageReceiver.java"></File></Folder><File path="Bootloaders\Incomplete\MIDI\BootloaderMIDI.c"></File><File path="Bootloaders\Incomplete\MIDI\BootloaderMIDI.h"></File><File path="Bootloaders\Incomplete\MIDI\Descriptors.c"></File><File path="Bootloaders\Incomplete\MIDI\Descriptors.h"></File><File path="Bootloaders\Incomplete\MIDI\Doxygen.conf"></File><File path="Bootloaders\Incomplete\MIDI\makefile"></File><File path="Bootloaders\Incomplete\MIDI\MIDI.c"></File></Folder></Folder><File path="Bootloaders\makefile"></File></Folder><Folder name="Projects"><Folder name="AVRISP"><Folder name="Lib"><Folder name="ISP"><File path="Projects\AVRISP\Lib\ISP\ISPProtocol.c"></File><File path="Projects\AVRISP\Lib\ISP\ISPProtocol.h"></File><File path="Projects\AVRISP\Lib\ISP\ISPTarget.c"></File><File path="Projects\AVRISP\Lib\ISP\ISPTarget.h"></File></Folder><Folder name="XPROG"><File path="Projects\AVRISP\Lib\XPROG\PDIProtocol.c"></File><File path="Projects\AVRISP\Lib\XPROG\PDIProtocol.h"></File><File path="Projects\AVRISP\Lib\XPROG\PDITarget.c"></File><File path="Projects\AVRISP\Lib\XPROG\PDITarget.h"></File><File path="Projects\AVRISP\Lib\XPROG\TINYNVM.c"></File><File path="Projects\AVRISP\Lib\XPROG\TINYNVM.h"></File><File path="Projects\AVRISP\Lib\XPROG\TPIProtocol.c"></File><File path="Projects\AVRISP\Lib\XPROG\TPIProtocol.h"></File><File path="Projects\AVRISP\Lib\XPROG\TPITarget.c"></File><File path="Projects\AVRISP\Lib\XPROG\TPITarget.h"></File><File path="Projects\AVRISP\Lib\XPROG\XMEGANVM.c"></File><File path="Projects\AVRISP\Lib\XPROG\XMEGANVM.h"></File></Folder><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></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="LEDNotifier"><Folder name="Board"><File path="Projects\LEDNotifier\Board\LEDs.h"></File></Folder><Folder name="CPUUsageApp"><File path="Projects\LEDNotifier\CPUUsageApp\CPUMonitor.cs"></File><File path="Projects\LEDNotifier\CPUUsageApp\CPUMonitor.csproj"></File><File path="Projects\LEDNotifier\CPUUsageApp\CPUMonitor.Designer.cs"></File><File path="Projects\LEDNotifier\CPUUsageApp\CPUMonitor.resx"></File><File path="Projects\LEDNotifier\CPUUsageApp\Program.cs"></File></Folder><Folder name="HotmailNotifierApp"><File path="Projects\LEDNotifier\HotmailNotifierApp\MailNotifier.cs"></File><File path="Projects\LEDNotifier\HotmailNotifierApp\MailNotifier.csproj"></File><File path="Projects\LEDNotifier\HotmailNotifierApp\MailNotifier.Designer.cs"></File><File path="Projects\LEDNotifier\HotmailNotifierApp\MailNotifier.resx"></File><File path="Projects\LEDNotifier\HotmailNotifierApp\Program.cs"></File></Folder><Folder name="LEDMixerApp"><File path="Projects\LEDNotifier\LEDMixerApp\LEDMixer.cs"></File><File path="Projects\LEDNotifier\LEDMixerApp\LEDMixer.csproj"></File><File path="Projects\LEDNotifier\LEDMixerApp\LEDMixer.Designer.cs"></File><File path="Projects\LEDNotifier\LEDMixerApp\LEDMixer.resx"></File><File path="Projects\LEDNotifier\LEDMixerApp\Program.cs"></File></Folder><File path="Projects\LEDNotifier\Descriptors.c"></File><File path="Projects\LEDNotifier\Descriptors.h"></File><File path="Projects\LEDNotifier\Doxygen.conf"></File><File path="Projects\LEDNotifier\LEDNotifier.c"></File><File path="Projects\LEDNotifier\LEDNotifier.h"></File><File path="Projects\LEDNotifier\LEDNotifier.txt"></File><File path="Projects\LEDNotifier\LUFA LED Notifier.inf"></File><File path="Projects\LEDNotifier\makefile"></File></Folder><Folder name="MagStripe"><Folder name="Lib"><File path="Projects\Magstripe\Lib\CircularBitBuffer.c"></File><File path="Projects\Magstripe\Lib\CircularBitBuffer.h"></File><File path="Projects\Magstripe\Lib\MagstripeHW.h"></File></Folder><File path="Projects\Magstripe\Descriptors.c"></File><File path="Projects\Magstripe\Descriptors.h"></File><File path="Projects\Magstripe\Magstripe.c"></File><File path="Projects\Magstripe\Magstripe.h"></File><File path="Projects\Magstripe\makefile"></File><File path="Projects\Magstripe\Magstripe.txt"></File><File path="Projects\Magstripe\Doxygen.conf"></File></Folder><Folder name="MissileLauncher"><File path="Projects\MissileLauncher\ConfigDescriptor.c"></File><File path="Projects\MissileLauncher\ConfigDescriptor.h"></File><File path="Projects\MissileLauncher\Doxygen.conf"></File><File path="Projects\MissileLauncher\makefile"></File><File path="Projects\MissileLauncher\MissileLauncher.c"></File><File path="Projects\MissileLauncher\MissileLauncher.h"></File><File path="Projects\MissileLauncher\MissileLauncher.txt"></File></Folder><Folder name="USBtoSerial"><Folder name="Lib"><File path="Projects\USBtoSerial\Lib\RingBuff.c"></File><File path="Projects\USBtoSerial\Lib\RingBuff.h"></File></Folder><File path="Projects\USBtoSerial\Descriptors.c"></File><File path="Projects\USBtoSerial\Descriptors.h"></File><File path="Projects\USBtoSerial\Doxygen.conf"></File><File path="Projects\USBtoSerial\LUFA USBtoSerial.inf"></File><File path="Projects\USBtoSerial\makefile"></File><File path="Projects\USBtoSerial\USBtoSerial.c"></File><File path="Projects\USBtoSerial\USBtoSerial.h"></File><File path="Projects\USBtoSerial\USBtoSerial.txt"></File></Folder><Folder name="XPLAINBridge"><Folder name="Lib"><File path="Projects\XPLAINBridge\Lib\RingBuff.c"></File><File path="Projects\XPLAINBridge\Lib\RingBuff.h"></File><File path="Projects\XPLAINBridge\Lib\SoftUART.c"></File><File path="Projects\XPLAINBridge\Lib\SoftUART.h"></File></Folder><File path="Projects\XPLAINBridge\Descriptors.c"></File><File path="Projects\XPLAINBridge\Descriptors.h"></File><File path="Projects\XPLAINBridge\LUFA XPLAIN Bridge.inf"></File><File path="Projects\XPLAINBridge\makefile"></File><File path="Projects\XPLAINBridge\XPLAINBridge.c"></File><File path="Projects\XPLAINBridge\XPLAINBridge.h"></File><File path="Projects\XPLAINBridge\XPLAINBridge.txt"></File></Folder><Folder name="Incomplete"><Folder name="StandaloneProgrammer"><Folder name="Lib"><Folder name="PetiteFATFs"><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\diskio.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\diskio.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\integer.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\pff.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\pff.h"></File></Folder><File path="Projects\Incomplete\StandaloneProgrammer\Lib\DataflashManager.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\DataflashManager.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\SCSI.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\SCSI.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\ProgrammerConfig.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\ProgrammerConfig.h"></File></Folder><File path="Projects\Incomplete\StandaloneProgrammer\Descriptors.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Descriptors.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\makefile"></File><File path="Projects\Incomplete\StandaloneProgrammer\StandaloneProgrammer.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\StandaloneProgrammer.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\DiskDevice.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\DiskDevice.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\DiskHost.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\DiskHost.h"></File></Folder></Folder><File path="Projects\makefile"></File></Folder><File path="makefile"></File><File path="README.txt"></File></Project>
\ No newline at end of file
index 07b2f83..3267afc 100644 (file)
@@ -17,7 +17,6 @@
   *      -# Add ability to get number of bytes not written with pipe/endpoint write routines after an error\r
   *      -# Add standardized descriptor names to class driver structures\r
   *      -# Correct mishandling of error cases in Mass Storage demos\r
   *      -# Add ability to get number of bytes not written with pipe/endpoint write routines after an error\r
   *      -# Add standardized descriptor names to class driver structures\r
   *      -# Correct mishandling of error cases in Mass Storage demos\r
-  *      -# Add TPI programming support to the AVRISP project\r
   *  - Documentation/Support\r
   *      -# Remake AVRStudio project files\r
   *      -# Add detailed overviews of how each demo works\r
   *  - Documentation/Support\r
   *      -# Remake AVRStudio project files\r
   *      -# Add detailed overviews of how each demo works\r
index c0572fc..48a90e3 100644 (file)
@@ -70,6 +70,7 @@ void SetupHardware(void)
        /* Hardware Initialization */\r
        LEDs_Init();\r
        USB_Init();\r
        /* Hardware Initialization */\r
        LEDs_Init();\r
        USB_Init();\r
+       Serial_Init(9600, true);\r
 \r
        #if defined(ADC)\r
        /* Initialize the ADC converter for VTARGET level detection on supported AVR models */\r
 \r
        #if defined(ADC)\r
        /* Initialize the ADC converter for VTARGET level detection on supported AVR models */\r
index a0f4d5e..cdd5516 100644 (file)
@@ -45,6 +45,7 @@
                #include "Descriptors.h"\r
 \r
                #include <LUFA/Version.h>\r
                #include "Descriptors.h"\r
 \r
                #include <LUFA/Version.h>\r
+               #include <LUFA/Drivers/Peripheral/Serial.h>\r
                #include <LUFA/Drivers/Board/LEDs.h>\r
                #include <LUFA/Drivers/USB/USB.h>\r
                \r
                #include <LUFA/Drivers/Board/LEDs.h>\r
                #include <LUFA/Drivers/USB/USB.h>\r
                \r
index 20e0cce..10361ac 100644 (file)
  *   <tr>\r
  *    <td><b>Programmer Pin:</b></td>\r
  *    <td><b>Target Device Pin:</b></td>\r
  *   <tr>\r
  *    <td><b>Programmer Pin:</b></td>\r
  *    <td><b>Target Device Pin:</b></td>\r
- *    <td><b>PDI 6 Pin Layout:</b></td>\r
+ *    <td><b>TPI 6 Pin Layout:</b></td>\r
  *   </tr>\r
  *   <tr>\r
  *    <td>MISO</td>\r
  *   </tr>\r
  *   <tr>\r
  *    <td>MISO</td>\r
diff --git a/Projects/AVRISP/Lib/PDI/PDIProtocol.c b/Projects/AVRISP/Lib/PDI/PDIProtocol.c
deleted file mode 100644 (file)
index 16ac209..0000000
+++ /dev/null
@@ -1,376 +0,0 @@
-/*\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
- *  PDI Protocol handler, to process V2 Protocol wrapped PDI commands used in Atmel programmer devices.\r
- */\r
-\r
-#define  INCLUDE_FROM_PDIPROTOCOL_C\r
-#include "PDIProtocol.h"\r
-\r
-#if defined(ENABLE_PDI_PROTOCOL) || defined(__DOXYGEN__)\r
-/** Base absolute address for the target's NVM controller */\r
-uint32_t XPROG_Param_NVMBase = 0x010001C0;\r
-\r
-/** Size in bytes of the target's EEPROM page */\r
-uint32_t XPROG_Param_EEPageSize;\r
-\r
-/** Handler for the CMD_XPROG_SETMODE command, which sets the programmer-to-target protocol used for PDI\r
- *  XMEGA programming (either PDI or JTAG). Only PDI programming is supported.\r
- */\r
-void PDIProtocol_XPROG_SetMode(void)\r
-{\r
-       struct\r
-       {\r
-               uint8_t Protocol;\r
-       } SetMode_XPROG_Params;\r
-       \r
-       Endpoint_Read_Stream_LE(&SetMode_XPROG_Params, sizeof(SetMode_XPROG_Params));\r
-\r
-       Endpoint_ClearOUT();\r
-       Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);\r
-       \r
-       Endpoint_Write_Byte(CMD_XPROG_SETMODE);\r
-       Endpoint_Write_Byte((SetMode_XPROG_Params.Protocol == XPRG_PROTOCOL_PDI) ? STATUS_CMD_OK : STATUS_CMD_FAILED);\r
-       Endpoint_ClearIN();     \r
-}\r
-\r
-/** Handler for the CMD_XPROG command, which wraps up XPROG commands in a V2 wrapper which need to be\r
- *  removed and processed so that the underlying XPROG command can be handled.\r
- */\r
-void PDIProtocol_XPROG_Command(void)\r
-{\r
-       uint8_t XPROGCommand = Endpoint_Read_Byte();\r
-\r
-       switch (XPROGCommand)\r
-       {\r
-               case XPRG_CMD_ENTER_PROGMODE:\r
-                       PDIProtocol_EnterXPROGMode();\r
-                       break;\r
-               case XPRG_CMD_LEAVE_PROGMODE:\r
-                       PDIProtocol_LeaveXPROGMode();\r
-                       break;\r
-               case XPRG_CMD_ERASE:\r
-                       PDIProtocol_Erase();\r
-                       break;\r
-               case XPRG_CMD_WRITE_MEM:\r
-                       PDIProtocol_WriteMemory();\r
-                       break;\r
-               case XPRG_CMD_READ_MEM:\r
-                       PDIProtocol_ReadMemory();\r
-                       break;\r
-               case XPRG_CMD_CRC:\r
-                       PDIProtocol_ReadCRC();\r
-                       break;\r
-               case XPRG_CMD_SET_PARAM:\r
-                       PDIProtocol_SetParam();\r
-                       break;\r
-       }\r
-}\r
-\r
-/** Handler for the XPROG ENTER_PROGMODE command to establish a PDI connection with the attached device. */\r
-static void PDIProtocol_EnterXPROGMode(void)\r
-{\r
-       Endpoint_ClearOUT();\r
-       Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);\r
-       \r
-       /* Enable PDI programming mode with the attached target */\r
-       PDITarget_EnableTargetPDI();\r
-       \r
-       /* Store the RESET key into the RESET PDI register to keep the XMEGA in reset */\r
-       PDITarget_SendByte(PDI_CMD_STCS | PDI_RESET_REG);       \r
-       PDITarget_SendByte(PDI_RESET_KEY);\r
-\r
-       /* Enable access to the XPROG NVM bus by sending the documented NVM access key to the device */\r
-       PDITarget_SendByte(PDI_CMD_KEY);        \r
-       for (uint8_t i = sizeof(PDI_NVMENABLE_KEY); i > 0; i--)\r
-         PDITarget_SendByte(PDI_NVMENABLE_KEY[i - 1]);\r
-\r
-       /* Wait until the NVM bus becomes active */\r
-       bool NVMBusEnabled = PDITarget_WaitWhileNVMBusBusy();\r
-       \r
-       Endpoint_Write_Byte(CMD_XPROG);\r
-       Endpoint_Write_Byte(XPRG_CMD_ENTER_PROGMODE);\r
-       Endpoint_Write_Byte(NVMBusEnabled ? XPRG_ERR_OK : XPRG_ERR_FAILED);\r
-       Endpoint_ClearIN();\r
-}\r
-\r
-/** Handler for the XPROG LEAVE_PROGMODE command to terminate the PDI programming connection with\r
- *  the attached device.\r
- */\r
-static void PDIProtocol_LeaveXPROGMode(void)\r
-{\r
-       Endpoint_ClearOUT();\r
-       Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);\r
-       \r
-       /* Clear the RESET key in the RESET PDI register to allow the XMEGA to run */\r
-       PDITarget_SendByte(PDI_CMD_STCS | PDI_RESET_REG);       \r
-       PDITarget_SendByte(0x00);\r
-\r
-       PDITarget_DisableTargetPDI();\r
-\r
-       Endpoint_Write_Byte(CMD_XPROG);\r
-       Endpoint_Write_Byte(XPRG_CMD_LEAVE_PROGMODE);\r
-       Endpoint_Write_Byte(XPRG_ERR_OK);\r
-       Endpoint_ClearIN();\r
-}\r
-\r
-/** Handler for the XPRG ERASE command to erase a specific memory address space in the attached device. */\r
-static void PDIProtocol_Erase(void)\r
-{\r
-       uint8_t ReturnStatus = XPRG_ERR_OK;\r
-\r
-       struct\r
-       {\r
-               uint8_t  MemoryType;\r
-               uint32_t Address;\r
-       } Erase_XPROG_Params;\r
-\r
-       Endpoint_Read_Stream_LE(&Erase_XPROG_Params, sizeof(Erase_XPROG_Params));\r
-       Erase_XPROG_Params.Address = SwapEndian_32(Erase_XPROG_Params.Address);\r
-\r
-       Endpoint_ClearOUT();\r
-       Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);\r
-       \r
-       uint8_t EraseCommand = XMEGA_NVM_CMD_NOOP;\r
-       \r
-       /* Determine which NVM command to send to the device depending on the memory to erase */\r
-       if (Erase_XPROG_Params.MemoryType == XPRG_ERASE_CHIP)\r
-         EraseCommand = XMEGA_NVM_CMD_CHIPERASE;\r
-       else if (Erase_XPROG_Params.MemoryType == XPRG_ERASE_APP)\r
-         EraseCommand = XMEGA_NVM_CMD_ERASEAPPSEC;\r
-       else if (Erase_XPROG_Params.MemoryType == XPRG_ERASE_BOOT)\r
-         EraseCommand = XMEGA_NVM_CMD_ERASEBOOTSEC;\r
-       else if (Erase_XPROG_Params.MemoryType == XPRG_ERASE_EEPROM)\r
-         EraseCommand = XMEGA_NVM_CMD_ERASEEEPROM;\r
-       else if (Erase_XPROG_Params.MemoryType == XPRG_ERASE_APP_PAGE)\r
-         EraseCommand = XMEGA_NVM_CMD_ERASEAPPSECPAGE;\r
-       else if (Erase_XPROG_Params.MemoryType == XPRG_ERASE_BOOT_PAGE)\r
-         EraseCommand = XMEGA_NVM_CMD_ERASEBOOTSECPAGE;\r
-       else if (Erase_XPROG_Params.MemoryType == XPRG_ERASE_EEPROM_PAGE)\r
-         EraseCommand = XMEGA_NVM_CMD_ERASEEEPROMPAGE;\r
-       else if (Erase_XPROG_Params.MemoryType == XPRG_ERASE_USERSIG)\r
-         EraseCommand = XMEGA_NVM_CMD_ERASEUSERSIG;\r
-       \r
-       /* Erase the target memory, indicate timeout if ocurred */\r
-       if (!(XMEGANVM_EraseMemory(EraseCommand, Erase_XPROG_Params.Address)))\r
-         ReturnStatus = XPRG_ERR_TIMEOUT;\r
-       \r
-       Endpoint_Write_Byte(CMD_XPROG);\r
-       Endpoint_Write_Byte(XPRG_CMD_ERASE);\r
-       Endpoint_Write_Byte(ReturnStatus);\r
-       Endpoint_ClearIN();     \r
-}\r
-\r
-/** Handler for the XPROG WRITE_MEMORY command to write to a specific memory space within the attached device. */\r
-static void PDIProtocol_WriteMemory(void)\r
-{\r
-       uint8_t ReturnStatus = XPRG_ERR_OK;\r
-\r
-       struct\r
-       {\r
-               uint8_t  MemoryType;\r
-               uint8_t  PageMode;\r
-               uint32_t Address;\r
-               uint16_t Length;\r
-               uint8_t  ProgData[256];\r
-       } WriteMemory_XPROG_Params;\r
-       \r
-       Endpoint_Read_Stream_LE(&WriteMemory_XPROG_Params, (sizeof(WriteMemory_XPROG_Params) -\r
-                                                           sizeof(WriteMemory_XPROG_Params).ProgData));\r
-       WriteMemory_XPROG_Params.Address = SwapEndian_32(WriteMemory_XPROG_Params.Address);\r
-       WriteMemory_XPROG_Params.Length  = SwapEndian_16(WriteMemory_XPROG_Params.Length);\r
-       Endpoint_Read_Stream_LE(&WriteMemory_XPROG_Params.ProgData, WriteMemory_XPROG_Params.Length);\r
-\r
-       Endpoint_ClearOUT();\r
-       Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);\r
-\r
-       /* Assume FLASH page programming by default, as it is the common case */\r
-       uint8_t WriteCommand     = XMEGA_NVM_CMD_WRITEFLASHPAGE;\r
-       uint8_t WriteBuffCommand = XMEGA_NVM_CMD_LOADFLASHPAGEBUFF;\r
-       uint8_t EraseBuffCommand = XMEGA_NVM_CMD_ERASEFLASHPAGEBUFF;\r
-       bool    PagedMemory      = true;\r
-       \r
-       if (WriteMemory_XPROG_Params.MemoryType == XPRG_MEM_TYPE_APPL)\r
-       {\r
-               WriteCommand     = XMEGA_NVM_CMD_WRITEAPPSECPAGE;\r
-       }\r
-       else if (WriteMemory_XPROG_Params.MemoryType == XPRG_MEM_TYPE_BOOT)\r
-       {\r
-               WriteCommand     = XMEGA_NVM_CMD_WRITEBOOTSECPAGE;\r
-       }\r
-       else if (WriteMemory_XPROG_Params.MemoryType == XPRG_MEM_TYPE_EEPROM)\r
-       {\r
-               WriteCommand     = XMEGA_NVM_CMD_WRITEEEPROMPAGE;\r
-               WriteBuffCommand = XMEGA_NVM_CMD_LOADEEPROMPAGEBUFF;\r
-               EraseBuffCommand = XMEGA_NVM_CMD_ERASEEEPROMPAGEBUFF;\r
-       }\r
-       else if (WriteMemory_XPROG_Params.MemoryType == XPRG_MEM_TYPE_USERSIG)\r
-       {\r
-               /* User signature is paged, but needs us to manually indicate the mode bits since the host doesn't set them */\r
-               WriteMemory_XPROG_Params.PageMode = (XPRG_PAGEMODE_ERASE | XPRG_PAGEMODE_WRITE);\r
-               WriteCommand     = XMEGA_NVM_CMD_WRITEUSERSIG;\r
-       }\r
-       else if (WriteMemory_XPROG_Params.MemoryType == XPRG_MEM_TYPE_FUSE)\r
-       {\r
-               WriteCommand     = XMEGA_NVM_CMD_WRITEFUSE;\r
-               PagedMemory      = false;\r
-       }\r
-       else if (WriteMemory_XPROG_Params.MemoryType == XPRG_MEM_TYPE_LOCKBITS)\r
-       {\r
-               WriteCommand     = XMEGA_NVM_CMD_WRITELOCK;\r
-               PagedMemory      = false;\r
-       }\r
-       \r
-       /* Send the appropriate memory write commands to the device, indicate timeout if occurred */\r
-       if ((PagedMemory && !XMEGANVM_WritePageMemory(WriteBuffCommand, EraseBuffCommand, WriteCommand, \r
-                                                          WriteMemory_XPROG_Params.PageMode, WriteMemory_XPROG_Params.Address,\r
-                                                          WriteMemory_XPROG_Params.ProgData, WriteMemory_XPROG_Params.Length)) ||\r
-          (!PagedMemory && !XMEGANVM_WriteByteMemory(WriteCommand, WriteMemory_XPROG_Params.Address,\r
-                                                      WriteMemory_XPROG_Params.ProgData)))\r
-       {\r
-               ReturnStatus = XPRG_ERR_TIMEOUT;\r
-       }\r
-       \r
-       Endpoint_Write_Byte(CMD_XPROG);\r
-       Endpoint_Write_Byte(XPRG_CMD_WRITE_MEM);\r
-       Endpoint_Write_Byte(ReturnStatus);      \r
-       Endpoint_ClearIN();\r
-}\r
-\r
-/** Handler for the XPROG READ_MEMORY command to read data from a specific address space within the\r
- *  attached device.\r
- */\r
-static void PDIProtocol_ReadMemory(void)\r
-{\r
-       uint8_t ReturnStatus = XPRG_ERR_OK;\r
-\r
-       struct\r
-       {\r
-               uint8_t  MemoryType;\r
-               uint32_t Address;\r
-               uint16_t Length;\r
-       } ReadMemory_XPROG_Params;\r
-       \r
-       Endpoint_Read_Stream_LE(&ReadMemory_XPROG_Params, sizeof(ReadMemory_XPROG_Params));\r
-       ReadMemory_XPROG_Params.Address = SwapEndian_32(ReadMemory_XPROG_Params.Address);\r
-       ReadMemory_XPROG_Params.Length  = SwapEndian_16(ReadMemory_XPROG_Params.Length);\r
-\r
-       Endpoint_ClearOUT();\r
-       Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);\r
-\r
-       uint8_t ReadBuffer[256];\r
-       \r
-       /* Read the target's memory, indicate timeout if occurred */\r
-       if (!(XMEGANVM_ReadMemory(ReadMemory_XPROG_Params.Address, ReadBuffer, ReadMemory_XPROG_Params.Length)))\r
-         ReturnStatus = XPRG_ERR_TIMEOUT;\r
-\r
-       Endpoint_Write_Byte(CMD_XPROG);\r
-       Endpoint_Write_Byte(XPRG_CMD_READ_MEM);\r
-       Endpoint_Write_Byte(ReturnStatus);\r
-       \r
-       if (ReturnStatus == XPRG_ERR_OK)\r
-         Endpoint_Write_Stream_LE(ReadBuffer, ReadMemory_XPROG_Params.Length);\r
-       \r
-       Endpoint_ClearIN();\r
-}\r
-\r
-/** Handler for the XPROG CRC command to read a specific memory space's CRC value for comparison between the\r
- *  attached device's memory and a data set on the host.\r
- */\r
-static void PDIProtocol_ReadCRC(void)\r
-{\r
-       uint8_t ReturnStatus = XPRG_ERR_OK;\r
-       \r
-       struct\r
-       {\r
-               uint8_t CRCType;\r
-       } ReadCRC_XPROG_Params;\r
-       \r
-       Endpoint_Read_Stream_LE(&ReadCRC_XPROG_Params, sizeof(ReadCRC_XPROG_Params));\r
-       Endpoint_ClearOUT();\r
-       Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);\r
-       \r
-       uint8_t  CRCCommand = XMEGA_NVM_CMD_NOOP;\r
-       uint32_t MemoryCRC;\r
-\r
-       /* Determine which NVM command to send to the device depending on the memory to CRC */\r
-       if (ReadCRC_XPROG_Params.CRCType == XPRG_CRC_APP)\r
-         CRCCommand = XMEGA_NVM_CMD_APPCRC;\r
-       else if (ReadCRC_XPROG_Params.CRCType == XPRG_CRC_BOOT)\r
-         CRCCommand = XMEGA_NVM_CMD_BOOTCRC;\r
-       else\r
-         CRCCommand = XMEGA_NVM_CMD_FLASHCRC;\r
-       \r
-       /* Perform and retrieve the memory CRC, indicate timeout if occurred */\r
-       if (!(XMEGANVM_GetMemoryCRC(CRCCommand, &MemoryCRC)))\r
-         ReturnStatus = XPRG_ERR_TIMEOUT;\r
-       \r
-       Endpoint_Write_Byte(CMD_XPROG);\r
-       Endpoint_Write_Byte(XPRG_CMD_CRC);\r
-       Endpoint_Write_Byte(ReturnStatus);\r
-       \r
-       if (ReturnStatus == XPRG_ERR_OK)\r
-       {\r
-               Endpoint_Write_Byte(MemoryCRC >> 16);\r
-               Endpoint_Write_Word_LE(MemoryCRC & 0xFFFF);             \r
-       }\r
-       \r
-       Endpoint_ClearIN();     \r
-}\r
-\r
-/** Handler for the XPROG SET_PARAM command to set a PDI parameter for use when communicating with the\r
- *  attached device.\r
- */\r
-static void PDIProtocol_SetParam(void)\r
-{\r
-       uint8_t ReturnStatus = XPRG_ERR_OK;\r
-\r
-       uint8_t XPROGParam = Endpoint_Read_Byte();\r
-       \r
-       /* Determine which parameter is being set, store the new parameter value */\r
-       if (XPROGParam == XPRG_PARAM_NVMBASE)\r
-         XPROG_Param_NVMBase = Endpoint_Read_DWord_BE();\r
-       else if (XPROGParam == XPRG_PARAM_EEPPAGESIZE)\r
-         XPROG_Param_EEPageSize = Endpoint_Read_Word_BE();\r
-       else\r
-         ReturnStatus = XPRG_ERR_FAILED;\r
-       \r
-       Endpoint_ClearOUT();\r
-       Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);\r
-                 \r
-       Endpoint_Write_Byte(CMD_XPROG);\r
-       Endpoint_Write_Byte(XPRG_CMD_SET_PARAM);\r
-       Endpoint_Write_Byte(ReturnStatus);\r
-       Endpoint_ClearIN();\r
-}\r
-\r
-#endif\r
diff --git a/Projects/AVRISP/Lib/PDI/PDIProtocol.h b/Projects/AVRISP/Lib/PDI/PDIProtocol.h
deleted file mode 100644 (file)
index c3cafb4..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-/*\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 PDIProtocol.c.\r
- */\r
-\r
-#ifndef _PDI_PROTOCOL_\r
-#define _PDI_PROTOCOL_\r
-\r
-       /* Includes: */\r
-               #include <avr/io.h>\r
-               #include <util/delay.h>\r
-               #include <stdio.h>\r
-               \r
-               #include <LUFA/Drivers/USB/USB.h>\r
-       \r
-               #include "../V2Protocol.h"\r
-               #include "PDITarget.h"\r
-               #include "XMEGANVM.h"\r
-\r
-       /* Preprocessor Checks: */\r
-               #if ((BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1))\r
-                       #undef ENABLE_ISP_PROTOCOL\r
-                       #undef ENABLE_TPI_PROTOCOL\r
-                       \r
-                       #if !defined(ENABLE_PDI_PROTOCOL)\r
-                               #define ENABLE_PDI_PROTOCOL\r
-                       #endif\r
-               #endif\r
-       \r
-       /* Macros: */\r
-               #define XPRG_CMD_ENTER_PROGMODE             0x01\r
-               #define XPRG_CMD_LEAVE_PROGMODE             0x02\r
-               #define XPRG_CMD_ERASE                      0x03\r
-               #define XPRG_CMD_WRITE_MEM                  0x04\r
-               #define XPRG_CMD_READ_MEM                   0x05\r
-               #define XPRG_CMD_CRC                        0x06\r
-               #define XPRG_CMD_SET_PARAM                  0x07\r
-\r
-               #define XPRG_MEM_TYPE_APPL                  1\r
-               #define XPRG_MEM_TYPE_BOOT                  2\r
-               #define XPRG_MEM_TYPE_EEPROM                3\r
-               #define XPRG_MEM_TYPE_FUSE                  4\r
-               #define XPRG_MEM_TYPE_LOCKBITS              5\r
-               #define XPRG_MEM_TYPE_USERSIG               6\r
-               #define XPRG_MEM_TYPE_FACTORY_CALIBRATION   7\r
-\r
-               #define XPRG_ERASE_CHIP                     1\r
-               #define XPRG_ERASE_APP                      2\r
-               #define XPRG_ERASE_BOOT                     3\r
-               #define XPRG_ERASE_EEPROM                   4\r
-               #define XPRG_ERASE_APP_PAGE                 5\r
-               #define XPRG_ERASE_BOOT_PAGE                6\r
-               #define XPRG_ERASE_EEPROM_PAGE              7\r
-               #define XPRG_ERASE_USERSIG                  8\r
-\r
-               #define XPRG_MEM_WRITE_ERASE                0\r
-               #define XPRG_MEM_WRITE_WRITE                1\r
-\r
-               #define XPRG_CRC_APP                        1\r
-               #define XPRG_CRC_BOOT                       2\r
-               #define XPRG_CRC_FLASH                      3\r
-\r
-               #define XPRG_ERR_OK                         0\r
-               #define XPRG_ERR_FAILED                     1\r
-               #define XPRG_ERR_COLLISION                  2\r
-               #define XPRG_ERR_TIMEOUT                    3\r
-\r
-               #define XPRG_PARAM_NVMBASE                  0x01\r
-               #define XPRG_PARAM_EEPPAGESIZE              0x02\r
-               \r
-               #define XPRG_PROTOCOL_PDI                   0x00\r
-               #define XPRG_PROTOCOL_JTAG                  0x01\r
-               \r
-               #define XPRG_PAGEMODE_WRITE                 (1 << 1)\r
-               #define XPRG_PAGEMODE_ERASE                 (1 << 0)\r
-       \r
-       /* External Variables: */\r
-               extern uint32_t XPROG_Param_NVMBase;\r
-               \r
-       /* Function Prototypes: */\r
-               void PDIProtocol_XPROG_SetMode(void);\r
-               void PDIProtocol_XPROG_Command(void);\r
-               \r
-               #if defined(INCLUDE_FROM_PDIPROTOCOL_C)\r
-                       static void PDIProtocol_EnterXPROGMode(void);\r
-                       static void PDIProtocol_LeaveXPROGMode(void);\r
-                       static void PDIProtocol_SetParam(void);\r
-                       static void PDIProtocol_Erase(void);\r
-                       static void PDIProtocol_WriteMemory(void);\r
-                       static void PDIProtocol_ReadMemory(void);\r
-                       static void PDIProtocol_ReadCRC(void);\r
-               #endif\r
-               \r
-#endif\r
diff --git a/Projects/AVRISP/Lib/PDI/PDITarget.c b/Projects/AVRISP/Lib/PDI/PDITarget.c
deleted file mode 100644 (file)
index 2c6ffd9..0000000
+++ /dev/null
@@ -1,335 +0,0 @@
-/*\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
- *  Target-related functions for the PDI Protocol decoder.\r
- */\r
-\r
-#define  INCLUDE_FROM_PDITARGET_C\r
-#include "PDITarget.h"\r
-\r
-#if defined(ENABLE_PDI_PROTOCOL) || defined(__DOXYGEN__)\r
-\r
-/** Flag to indicate if the USART is currently in Tx or Rx mode. */\r
-volatile bool               IsSending;\r
-\r
-#if !defined(PDI_VIA_HARDWARE_USART)\r
-/** Software USART raw frame bits for transmission/reception. */\r
-volatile uint16_t           SoftUSART_Data;\r
-\r
-/** Bits remaining to be sent or received via the software USART - set as a GPIOR for speed. */\r
-#define SoftUSART_BitCount  GPIOR2\r
-\r
-\r
-/** ISR to manage the software USART when bit-banged USART mode is selected. */\r
-ISR(TIMER1_COMPA_vect, ISR_BLOCK)\r
-{\r
-       /* Toggle CLOCK pin in a single cycle (see AVR datasheet) */\r
-       BITBANG_PDICLOCK_PIN |= BITBANG_PDICLOCK_MASK;\r
-\r
-       /* If not sending or receiving, just exit */\r
-       if (!(SoftUSART_BitCount))\r
-         return;\r
-\r
-       /* Check to see if we are at a rising or falling edge of the clock */\r
-       if (BITBANG_PDICLOCK_PORT & BITBANG_PDICLOCK_MASK)\r
-       {\r
-               /* If at rising clock edge and we are in send mode, abort */\r
-               if (IsSending)\r
-                 return;\r
-                 \r
-               /* Wait for the start bit when receiving */\r
-               if ((SoftUSART_BitCount == BITS_IN_PDI_FRAME) && (BITBANG_PDIDATA_PIN & BITBANG_PDIDATA_MASK))\r
-                 return;\r
-       \r
-               /* Shift in the bit one less than the frame size in position, so that the start bit will eventually\r
-                * be discarded leaving the data to be byte-aligned for quick access */\r
-               if (BITBANG_PDIDATA_PIN & BITBANG_PDIDATA_MASK)\r
-                 SoftUSART_Data |= (1 << (BITS_IN_PDI_FRAME - 1));\r
-\r
-               SoftUSART_Data >>= 1;\r
-               SoftUSART_BitCount--;\r
-       }\r
-       else\r
-       {\r
-               /* If at falling clock edge and we are in receive mode, abort */\r
-               if (!IsSending)\r
-                 return;\r
-\r
-               /* Set the data line to the next bit value */\r
-               if (SoftUSART_Data & 0x01)\r
-                 BITBANG_PDIDATA_PORT |=  BITBANG_PDIDATA_MASK;\r
-               else\r
-                 BITBANG_PDIDATA_PORT &= ~BITBANG_PDIDATA_MASK;                  \r
-\r
-               SoftUSART_Data >>= 1;\r
-               SoftUSART_BitCount--;\r
-       }\r
-}\r
-#endif\r
-\r
-/** Enables the target's PDI interface, holding the target in reset until PDI mode is exited. */\r
-void PDITarget_EnableTargetPDI(void)\r
-{\r
-#if defined(PDI_VIA_HARDWARE_USART)\r
-       /* Set Tx and XCK as outputs, Rx as input */\r
-       DDRD |=  (1 << 5) | (1 << 3);\r
-       DDRD &= ~(1 << 2);\r
-       \r
-       /* Set DATA line high for at least 90ns to disable /RESET functionality */\r
-       PORTD |= (1 << 3);\r
-       asm volatile ("NOP"::);\r
-       asm volatile ("NOP"::);\r
-       \r
-       /* Set up the synchronous USART for XMEGA communications - \r
-          8 data bits, even parity, 2 stop bits */\r
-       UBRR1  = (F_CPU / 1000000UL);\r
-       UCSR1B = (1 << TXEN1);\r
-       UCSR1C = (1 << UMSEL10) | (1 << UPM11) | (1 << USBS1) | (1 << UCSZ11) | (1 << UCSZ10) | (1 << UCPOL1);\r
-\r
-       /* Send two BREAKs of 12 bits each to enable PDI interface (need at least 16 idle bits) */\r
-       PDITarget_SendBreak();\r
-       PDITarget_SendBreak();\r
-#else\r
-       /* Set DATA and CLOCK lines to outputs */\r
-       BITBANG_PDIDATA_DDR  |= BITBANG_PDIDATA_MASK;\r
-       BITBANG_PDICLOCK_DDR |= BITBANG_PDICLOCK_MASK;\r
-       \r
-       /* Set DATA line high for at least 90ns to disable /RESET functionality */\r
-       BITBANG_PDIDATA_PORT |= BITBANG_PDIDATA_MASK;\r
-       asm volatile ("NOP"::);\r
-       asm volatile ("NOP"::);\r
-\r
-       /* Fire timer compare ISR every 100 cycles to manage the software USART */\r
-       OCR1A   = 80;\r
-       TCCR1B  = (1 << WGM12) | (1 << CS10);\r
-       TIMSK1  = (1 << OCIE1A);\r
-       \r
-       /* Send two BREAKs of 12 bits each to enable TPI interface (need at least 16 idle bits) */\r
-       PDITarget_SendBreak();\r
-       PDITarget_SendBreak();\r
-#endif\r
-}\r
-\r
-/** Disables the target's PDI interface, exits programming mode and starts the target's application. */\r
-void PDITarget_DisableTargetPDI(void)\r
-{\r
-#if defined(PDI_VIA_HARDWARE_USART)\r
-       /* Turn off receiver and transmitter of the USART, clear settings */\r
-       UCSR1A |= (1 << TXC1) | (1 << RXC1);\r
-       UCSR1B  = 0;\r
-       UCSR1C  = 0;\r
-\r
-       /* Set all USART lines as input, tristate */\r
-       DDRD  &= ~((1 << 5) | (1 << 3));\r
-       PORTD &= ~((1 << 5) | (1 << 3) | (1 << 2));\r
-#else\r
-       /* Set DATA and CLOCK lines to inputs */\r
-       BITBANG_PDIDATA_DDR   &= ~BITBANG_PDIDATA_MASK;\r
-       BITBANG_PDICLOCK_DDR  &= ~BITBANG_PDICLOCK_MASK;\r
-       \r
-       /* Tristate DATA and CLOCK lines */\r
-       BITBANG_PDIDATA_PORT  &= ~BITBANG_PDIDATA_MASK;\r
-       BITBANG_PDICLOCK_PORT &= ~BITBANG_PDICLOCK_MASK;\r
-#endif\r
-}\r
-\r
-/** Sends a byte via the USART.\r
- *\r
- *  \param[in] Byte  Byte to send through the USART\r
- */\r
-void PDITarget_SendByte(const uint8_t Byte)\r
-{\r
-#if defined(PDI_VIA_HARDWARE_USART)\r
-       /* Switch to Tx mode if currently in Rx mode */\r
-       if (!(IsSending))\r
-       {\r
-               PORTD  |=  (1 << 3);\r
-               DDRD   |=  (1 << 3);\r
-\r
-               UCSR1B |=  (1 << TXEN1);\r
-               UCSR1B &= ~(1 << RXEN1);\r
-               \r
-               IsSending = true;\r
-       }\r
-       \r
-       /* Wait until there is space in the hardware Tx buffer before writing */\r
-       while (!(UCSR1A & (1 << UDRE1)));\r
-       UCSR1A |= (1 << TXC1);\r
-       UDR1    = Byte;\r
-#else\r
-       /* Switch to Tx mode if currently in Rx mode */\r
-       if (!(IsSending))\r
-       {\r
-               BITBANG_PDIDATA_PORT |= BITBANG_PDIDATA_MASK;\r
-               BITBANG_PDIDATA_DDR  |= BITBANG_PDIDATA_MASK;\r
-\r
-               IsSending = true;\r
-       }\r
-\r
-       /* Calculate the new USART frame data here while while we wait for a previous byte (if any) to finish sending */\r
-       uint16_t NewUSARTData = ((1 << 11) | (1 << 10) | (0 << 9) | ((uint16_t)Byte << 1) | (0 << 0));\r
-\r
-       /* Compute Even parity - while a bit is still set, chop off lowest bit and toggle parity bit */\r
-       uint8_t ParityData    = Byte;\r
-       while (ParityData)\r
-       {\r
-               NewUSARTData ^= (1 << 9);\r
-               ParityData   &= (ParityData - 1);\r
-       }\r
-\r
-       /* Wait until transmitter is idle before writing new data */\r
-       while (SoftUSART_BitCount);\r
-\r
-       /* Data shifted out LSB first, START DATA PARITY STOP STOP */\r
-       SoftUSART_Data     = NewUSARTData;\r
-       SoftUSART_BitCount = BITS_IN_PDI_FRAME;\r
-#endif\r
-}\r
-\r
-/** Receives a byte via the software USART, blocking until data is received.\r
- *\r
- *  \return Received byte from the USART\r
- */\r
-uint8_t PDITarget_ReceiveByte(void)\r
-{\r
-#if defined(PDI_VIA_HARDWARE_USART)\r
-       /* Switch to Rx mode if currently in Tx mode */\r
-       if (IsSending)\r
-       {\r
-               while (!(UCSR1A & (1 << TXC1)));\r
-               UCSR1A |=  (1 << TXC1);\r
-\r
-               UCSR1B &= ~(1 << TXEN1);\r
-               UCSR1B |=  (1 << RXEN1);\r
-\r
-               DDRD   &= ~(1 << 3);\r
-               PORTD  &= ~(1 << 3);\r
-               \r
-               IsSending = false;\r
-       }\r
-\r
-       /* Wait until a byte has been received before reading */\r
-       while (!(UCSR1A & (1 << RXC1)));\r
-       return UDR1;\r
-#else\r
-       /* Switch to Rx mode if currently in Tx mode */\r
-       if (IsSending)\r
-       {\r
-               while (SoftUSART_BitCount);\r
-\r
-               BITBANG_PDIDATA_DDR  &= ~BITBANG_PDIDATA_MASK;\r
-               BITBANG_PDIDATA_PORT &= ~BITBANG_PDIDATA_MASK;\r
-\r
-               IsSending = false;\r
-       }\r
-\r
-       /* Wait until a byte has been received before reading */\r
-       SoftUSART_BitCount = BITS_IN_PDI_FRAME;\r
-       while (SoftUSART_BitCount);\r
-       \r
-       /* Throw away the parity and stop bits to leave only the data (start bit is already discarded) */\r
-       return (uint8_t)SoftUSART_Data;\r
-#endif\r
-}\r
-\r
-/** Sends a BREAK via the USART to the attached target, consisting of a full frame of idle bits. */\r
-void PDITarget_SendBreak(void)\r
-{\r
-#if defined(PDI_VIA_HARDWARE_USART)\r
-       /* Switch to Tx mode if currently in Rx mode */\r
-       if (!(IsSending))\r
-       {\r
-               PORTD  |=  (1 << 3);\r
-               DDRD   |=  (1 << 3);\r
-\r
-               UCSR1B &= ~(1 << RXEN1);\r
-               UCSR1B |=  (1 << TXEN1);\r
-               \r
-               IsSending = true;\r
-       }\r
-\r
-       /* Need to do nothing for a full frame to send a BREAK */\r
-       for (uint8_t i = 0; i < BITS_IN_PDI_FRAME; i++)\r
-       {\r
-               /* Wait for a full cycle of the clock */\r
-               while (PIND & (1 << 5));\r
-               while (!(PIND & (1 << 5)));\r
-       }\r
-#else\r
-       /* Switch to Tx mode if currently in Rx mode */\r
-       if (!(IsSending))\r
-       {\r
-               BITBANG_PDIDATA_PORT |= BITBANG_PDIDATA_MASK;\r
-               BITBANG_PDIDATA_DDR  |= BITBANG_PDIDATA_MASK;\r
-\r
-               IsSending = true;\r
-       }\r
-       \r
-       while (SoftUSART_BitCount);\r
-\r
-       /* Need to do nothing for a full frame to send a BREAK */\r
-       SoftUSART_Data     = 0x0FFF;\r
-       SoftUSART_BitCount = BITS_IN_PDI_FRAME;\r
-#endif\r
-}\r
-\r
-/** Busy-waits while the NVM controller is busy performing a NVM operation, such as a FLASH page read or CRC\r
- *  calculation.\r
- *\r
- *  \return Boolean true if the NVM controller became ready within the timeout period, false otherwise\r
- */\r
-bool PDITarget_WaitWhileNVMBusBusy(void)\r
-{\r
-       TCNT0 = 0;\r
-       TIFR0 = (1 << OCF1A);\r
-                       \r
-       uint8_t TimeoutMS = PDI_NVM_TIMEOUT_MS;\r
-       \r
-       /* Poll the STATUS register to check to see if NVM access has been enabled */\r
-       while (TimeoutMS)\r
-       {\r
-               /* Send the LDCS command to read the PDI STATUS register to see the NVM bus is active */\r
-               PDITarget_SendByte(PDI_CMD_LDCS | PDI_STATUS_REG);\r
-               if (PDITarget_ReceiveByte() & PDI_STATUS_NVM)\r
-                 return true;\r
-\r
-               if (TIFR0 & (1 << OCF1A))\r
-               {\r
-                       TIFR0 = (1 << OCF1A);\r
-                       TimeoutMS--;\r
-               }\r
-       }\r
-       \r
-       return false;\r
-}\r
-\r
-#endif\r
diff --git a/Projects/AVRISP/Lib/PDI/PDITarget.h b/Projects/AVRISP/Lib/PDI/PDITarget.h
deleted file mode 100644 (file)
index cf7780c..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-/*\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 PDITarget.c.\r
- */\r
-\r
-#ifndef _PDI_TARGET_\r
-#define _PDI_TARGET_\r
-\r
-       /* Includes: */\r
-               #include <avr/io.h>\r
-               #include <avr/interrupt.h>\r
-               #include <stdbool.h>\r
-               \r
-               #include <LUFA/Common/Common.h>\r
-       \r
-       /* Preprocessor Checks: */\r
-               #if ((BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1))\r
-                       #undef ENABLE_ISP_PROTOCOL\r
-                       #undef ENABLE_TPI_PROTOCOL\r
-                       \r
-                       #if !defined(ENABLE_PDI_PROTOCOL)\r
-                               #define ENABLE_PDI_PROTOCOL\r
-                       #endif\r
-               #endif\r
-\r
-       /* Defines: */\r
-               #if ((BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1))\r
-                       #define PDI_VIA_HARDWARE_USART\r
-               #else\r
-                       #define BITBANG_PDIDATA_PORT     PORTB\r
-                       #define BITBANG_PDIDATA_DDR      DDRB\r
-                       #define BITBANG_PDIDATA_PIN      PINB\r
-                       #define BITBANG_PDIDATA_MASK     (1 << 3)\r
-                       \r
-                       #define BITBANG_PDICLOCK_PORT    RESET_LINE_PORT\r
-                       #define BITBANG_PDICLOCK_DDR     RESET_LINE_DDR\r
-                       #define BITBANG_PDICLOCK_PIN     RESET_LINE_PIN\r
-                       #define BITBANG_PDICLOCK_MASK    RESET_LINE_MASK\r
-               #endif\r
-               \r
-               /** Total number of bits in a single USART frame */\r
-               #define BITS_IN_PDI_FRAME        12\r
-               \r
-               /** Timeout in milliseconds of a PDI busy-wait command */\r
-               #define PDI_NVM_TIMEOUT_MS       100\r
-               \r
-               #define PDI_CMD_LDS              0x00\r
-               #define PDI_CMD_LD               0x20\r
-               #define PDI_CMD_STS              0x40\r
-               #define PDI_CMD_ST               0x60\r
-               #define PDI_CMD_LDCS             0x80\r
-               #define PDI_CMD_REPEAT           0xA0\r
-               #define PDI_CMD_STCS             0xC0\r
-               #define PDI_CMD_KEY              0xE0\r
-               \r
-               #define PDI_STATUS_REG           0\r
-               #define PDI_RESET_REG            1\r
-               #define PDI_CTRL_REG             2\r
-               \r
-               #define PDI_STATUS_NVM           (1 << 1)\r
-               #define PDI_RESET_KEY            0x59\r
-\r
-               #define PDI_NVMENABLE_KEY        (uint8_t[]){0x12, 0x89, 0xAB, 0x45, 0xCD, 0xD8, 0x88, 0xFF}\r
-\r
-               #define PDI_DATSIZE_1BYTE        0\r
-               #define PDI_DATSIZE_2BYTES       1\r
-               #define PDI_DATSIZE_3BYTES       2\r
-               #define PDI_DATSIZE_4BYTES       3\r
-               \r
-               #define PDI_POINTER_INDIRECT     0\r
-               #define PDI_POINTER_INDIRECT_PI  1\r
-               #define PDI_POINTER_DIRECT       2\r
-                               \r
-       /* Function Prototypes: */\r
-               void    PDITarget_EnableTargetPDI(void);\r
-               void    PDITarget_DisableTargetPDI(void);\r
-               void    PDITarget_SendByte(const uint8_t Byte);\r
-               uint8_t PDITarget_ReceiveByte(void);\r
-               void    PDITarget_SendBreak(void);\r
-               bool    PDITarget_WaitWhileNVMBusBusy(void);\r
-\r
-#endif\r
diff --git a/Projects/AVRISP/Lib/PDI/XMEGANVM.c b/Projects/AVRISP/Lib/PDI/XMEGANVM.c
deleted file mode 100644 (file)
index ed8719c..0000000
+++ /dev/null
@@ -1,332 +0,0 @@
-/*\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
- *  Target-related functions for the XMEGA target's NVM module.\r
- */\r
-\r
-#define  INCLUDE_FROM_XMEGA_NVM_C\r
-#include "XMEGANVM.h"\r
-\r
-#if defined(ENABLE_PDI_PROTOCOL) || defined(__DOXYGEN__)\r
-\r
-/** Sends the given NVM register address to the target.\r
- *\r
- *  \param[in] Register  NVM register whose absolute address is to be sent\r
- */\r
-void XMEGANVM_SendNVMRegAddress(const uint8_t Register)\r
-{\r
-       /* Determine the absolute register address from the NVM base memory address and the NVM register address */\r
-       uint32_t Address = XPROG_Param_NVMBase | Register;\r
-\r
-       /* Send the calculated 32-bit address to the target, LSB first */\r
-       XMEGANVM_SendAddress(Address);\r
-}\r
-\r
-/** Sends the given 32-bit absolute address to the target.\r
- *\r
- *  \param[in] AbsoluteAddress  Absolute address to send to the target\r
- */\r
-void XMEGANVM_SendAddress(const uint32_t AbsoluteAddress)\r
-{\r
-       /* Send the given 32-bit address to the target, LSB first */\r
-       PDITarget_SendByte(AbsoluteAddress &  0xFF);\r
-       PDITarget_SendByte(AbsoluteAddress >> 8);\r
-       PDITarget_SendByte(AbsoluteAddress >> 16);\r
-       PDITarget_SendByte(AbsoluteAddress >> 24);\r
-}\r
-\r
-/** Waits while the target's NVM controller is busy performing an operation, exiting if the\r
- *  timeout period expires.\r
- *\r
- *  \return Boolean true if the NVM controller became ready within the timeout period, false otherwise\r
- */\r
-bool XMEGANVM_WaitWhileNVMControllerBusy(void)\r
-{\r
-       TCNT0 = 0;\r
-       TIFR0 = (1 << OCF1A);\r
-                       \r
-       uint8_t TimeoutMS = XMEGA_NVM_BUSY_TIMEOUT_MS;\r
-       \r
-       /* Poll the NVM STATUS register while the NVM controller is busy */\r
-       while (TimeoutMS)\r
-       {\r
-               /* Send a LDS command to read the NVM STATUS register to check the BUSY flag */\r
-               PDITarget_SendByte(PDI_CMD_LDS | (PDI_DATSIZE_4BYTES << 2));\r
-               XMEGANVM_SendNVMRegAddress(XMEGA_NVM_REG_STATUS);\r
-               \r
-               /* Check to see if the BUSY flag is still set */\r
-               if (!(PDITarget_ReceiveByte() & (1 << 7)))\r
-                 return true;\r
-\r
-               if (TIFR0 & (1 << OCF1A))\r
-               {\r
-                       TIFR0 = (1 << OCF1A);\r
-                       TimeoutMS--;\r
-               }\r
-       }\r
-       \r
-       return false;\r
-}\r
-\r
-/** Retrieves the CRC value of the given memory space.\r
- *\r
- *  \param[in]  CRCCommand  NVM CRC command to issue to the target\r
- *  \param[out] CRCDest     CRC Destination when read from the target\r
- *\r
- *  \return Boolean true if the command sequence complete successfully\r
- */\r
-bool XMEGANVM_GetMemoryCRC(const uint8_t CRCCommand, uint32_t* const CRCDest)\r
-{\r
-       /* Wait until the NVM controller is no longer busy */\r
-       if (!(XMEGANVM_WaitWhileNVMControllerBusy()))\r
-         return false;\r
-         \r
-       /* Set the NVM command to the correct CRC read command */\r
-       PDITarget_SendByte(PDI_CMD_STS | (PDI_DATSIZE_4BYTES << 2));\r
-       XMEGANVM_SendNVMRegAddress(XMEGA_NVM_REG_CMD);\r
-       PDITarget_SendByte(CRCCommand);\r
-\r
-       /* Set CMDEX bit in NVM CTRLA register to start the CRC generation */\r
-       PDITarget_SendByte(PDI_CMD_STS | (PDI_DATSIZE_4BYTES << 2));\r
-       XMEGANVM_SendNVMRegAddress(XMEGA_NVM_REG_CTRLA);\r
-       PDITarget_SendByte(1 << 0);\r
-\r
-       /* Wait until the NVM bus is ready again */\r
-       if (!(PDITarget_WaitWhileNVMBusBusy()))\r
-         return false;\r
-\r
-       /* Wait until the NVM controller is no longer busy */\r
-       if (!(XMEGANVM_WaitWhileNVMControllerBusy()))\r
-         return false;\r
-       \r
-       *CRCDest = 0;\r
-       \r
-       /* Read the first generated CRC byte value */\r
-       PDITarget_SendByte(PDI_CMD_LDS | (PDI_DATSIZE_4BYTES << 2));\r
-       XMEGANVM_SendNVMRegAddress(XMEGA_NVM_REG_DAT0);\r
-       *CRCDest  = PDITarget_ReceiveByte();\r
-\r
-       /* Read the second generated CRC byte value */\r
-       PDITarget_SendByte(PDI_CMD_LDS | (PDI_DATSIZE_4BYTES << 2));\r
-       XMEGANVM_SendNVMRegAddress(XMEGA_NVM_REG_DAT1);\r
-       *CRCDest |= ((uint16_t)PDITarget_ReceiveByte() << 8);\r
-\r
-       /* Read the third generated CRC byte value */\r
-       PDITarget_SendByte(PDI_CMD_LDS | (PDI_DATSIZE_4BYTES << 2));\r
-       XMEGANVM_SendNVMRegAddress(XMEGA_NVM_REG_DAT2);\r
-       *CRCDest |= ((uint32_t)PDITarget_ReceiveByte() << 16);\r
-       \r
-       return true;\r
-}\r
-\r
-/** Reads memory from the target's memory spaces.\r
- *\r
- *  \param[in]  ReadAddress  Start address to read from within the target's address space\r
- *  \param[out] ReadBuffer   Buffer to store read data into\r
- *  \param[in]  ReadSize     Number of bytes to read\r
- *\r
- *  \return Boolean true if the command sequence complete successfully\r
- */\r
-bool XMEGANVM_ReadMemory(const uint32_t ReadAddress, uint8_t* ReadBuffer, const uint16_t ReadSize)\r
-{\r
-       /* Wait until the NVM controller is no longer busy */\r
-       if (!(XMEGANVM_WaitWhileNVMControllerBusy()))\r
-         return false;\r
-       \r
-       /* Send the READNVM command to the NVM controller for reading of an arbitrary location */\r
-       PDITarget_SendByte(PDI_CMD_STS | (PDI_DATSIZE_4BYTES << 2));\r
-       XMEGANVM_SendNVMRegAddress(XMEGA_NVM_REG_CMD);\r
-       PDITarget_SendByte(XMEGA_NVM_CMD_READNVM);\r
-\r
-       /* Load the PDI pointer register with the start address we want to read from */\r
-       PDITarget_SendByte(PDI_CMD_ST | (PDI_POINTER_DIRECT << 2) | PDI_DATSIZE_4BYTES);\r
-       XMEGANVM_SendAddress(ReadAddress);\r
-\r
-       /* Send the REPEAT command with the specified number of bytes to read */\r
-       PDITarget_SendByte(PDI_CMD_REPEAT | PDI_DATSIZE_1BYTE);\r
-       PDITarget_SendByte(ReadSize - 1);\r
-               \r
-       /* Send a LD command with indirect access and postincrement to read out the bytes */\r
-       PDITarget_SendByte(PDI_CMD_LD | (PDI_POINTER_INDIRECT_PI << 2) | PDI_DATSIZE_1BYTE);\r
-       for (uint16_t i = 0; i < ReadSize; i++)\r
-         *(ReadBuffer++) = PDITarget_ReceiveByte();\r
-       \r
-       return true;\r
-}\r
-\r
-/** Writes byte addressed memory to the target's memory spaces.\r
- *\r
- *  \param[in]  WriteCommand  Command to send to the device to write each memory byte\r
- *  \param[in]  WriteAddress  Start address to write to within the target's address space\r
- *  \param[in]  WriteBuffer   Buffer to source data from\r
- *\r
- *  \return Boolean true if the command sequence complete successfully\r
- */\r
-bool XMEGANVM_WriteByteMemory(const uint8_t WriteCommand, const uint32_t WriteAddress, const uint8_t* WriteBuffer)\r
-{\r
-       /* Wait until the NVM controller is no longer busy */\r
-       if (!(XMEGANVM_WaitWhileNVMControllerBusy()))\r
-         return false;\r
-\r
-       /* Send the memory write command to the target */\r
-       PDITarget_SendByte(PDI_CMD_STS | (PDI_DATSIZE_4BYTES << 2));\r
-       XMEGANVM_SendNVMRegAddress(XMEGA_NVM_REG_CMD);\r
-       PDITarget_SendByte(WriteCommand);\r
-       \r
-       /* Send new memory byte to the memory to the target */\r
-       PDITarget_SendByte(PDI_CMD_STS | (PDI_DATSIZE_4BYTES << 2));\r
-       XMEGANVM_SendAddress(WriteAddress);\r
-       PDITarget_SendByte(*(WriteBuffer++));\r
-       \r
-       return true;\r
-}\r
-\r
-/** Writes page addressed memory to the target's memory spaces.\r
- *\r
- *  \param[in]  WriteBuffCommand  Command to send to the device to write a byte to the memory page buffer\r
- *  \param[in]  EraseBuffCommand  Command to send to the device to erase the memory page buffer\r
- *  \param[in]  WritePageCommand  Command to send to the device to write the page buffer to the destination memory\r
- *  \param[in]  PageMode          Bitfield indicating what operations need to be executed on the specified page\r
- *  \param[in]  WriteAddress      Start address to write the page data to within the target's address space\r
- *  \param[in]  WriteBuffer       Buffer to source data from\r
- *  \param[in]  WriteSize         Number of bytes to write\r
- *\r
- *  \return Boolean true if the command sequence complete successfully\r
- */\r
-bool XMEGANVM_WritePageMemory(const uint8_t WriteBuffCommand, const uint8_t EraseBuffCommand,\r
-                               const uint8_t WritePageCommand, const uint8_t PageMode, const uint32_t WriteAddress,\r
-                               const uint8_t* WriteBuffer, const uint16_t WriteSize)\r
-{\r
-       if (PageMode & XPRG_PAGEMODE_ERASE)\r
-       {\r
-               /* Wait until the NVM controller is no longer busy */\r
-               if (!(XMEGANVM_WaitWhileNVMControllerBusy()))\r
-                 return false;\r
-\r
-               /* Send the memory buffer erase command to the target */\r
-               PDITarget_SendByte(PDI_CMD_STS | (PDI_DATSIZE_4BYTES << 2));\r
-               XMEGANVM_SendNVMRegAddress(XMEGA_NVM_REG_CMD);\r
-               PDITarget_SendByte(EraseBuffCommand);\r
-\r
-               /* Set CMDEX bit in NVM CTRLA register to start the buffer erase */\r
-               PDITarget_SendByte(PDI_CMD_STS | (PDI_DATSIZE_4BYTES << 2));\r
-               XMEGANVM_SendNVMRegAddress(XMEGA_NVM_REG_CTRLA);\r
-               PDITarget_SendByte(1 << 0);\r
-       }\r
-\r
-       if (WriteSize)\r
-       {\r
-               /* Wait until the NVM controller is no longer busy */\r
-               if (!(XMEGANVM_WaitWhileNVMControllerBusy()))\r
-                 return false;\r
-\r
-               /* Send the memory buffer write command to the target */\r
-               PDITarget_SendByte(PDI_CMD_STS | (PDI_DATSIZE_4BYTES << 2));\r
-               XMEGANVM_SendNVMRegAddress(XMEGA_NVM_REG_CMD);\r
-               PDITarget_SendByte(WriteBuffCommand);\r
-\r
-               /* Load the PDI pointer register with the start address we want to write to */\r
-               PDITarget_SendByte(PDI_CMD_ST | (PDI_POINTER_DIRECT << 2) | PDI_DATSIZE_4BYTES);\r
-               XMEGANVM_SendAddress(WriteAddress);\r
-\r
-               /* Send the REPEAT command with the specified number of bytes to write */\r
-               PDITarget_SendByte(PDI_CMD_REPEAT | PDI_DATSIZE_1BYTE);\r
-               PDITarget_SendByte(WriteSize - 1);\r
-                       \r
-               /* Send a ST command with indirect access and postincrement to write the bytes */\r
-               PDITarget_SendByte(PDI_CMD_ST | (PDI_POINTER_INDIRECT_PI << 2) | PDI_DATSIZE_1BYTE);\r
-               for (uint16_t i = 0; i < WriteSize; i++)\r
-                 PDITarget_SendByte(*(WriteBuffer++));\r
-       }\r
-       \r
-       if (PageMode & XPRG_PAGEMODE_WRITE)\r
-       {\r
-               /* Wait until the NVM controller is no longer busy */\r
-               if (!(XMEGANVM_WaitWhileNVMControllerBusy()))\r
-                 return false;\r
-\r
-               /* Send the memory write command to the target */\r
-               PDITarget_SendByte(PDI_CMD_STS | (PDI_DATSIZE_4BYTES << 2));\r
-               XMEGANVM_SendNVMRegAddress(XMEGA_NVM_REG_CMD);\r
-               PDITarget_SendByte(WritePageCommand);\r
-               \r
-               /* Send the address of the first page location to write the memory page */\r
-               PDITarget_SendByte(PDI_CMD_STS | (PDI_DATSIZE_4BYTES << 2));\r
-               XMEGANVM_SendAddress(WriteAddress);\r
-               PDITarget_SendByte(0x00);\r
-       }\r
-\r
-       return true;\r
-}\r
-\r
-/** Erases a specific memory space of the target.\r
- *\r
- *  \param[in] EraseCommand  NVM erase command to send to the device\r
- *  \param[in] Address  Address inside the memory space to erase\r
- *\r
- *  \return Boolean true if the command sequence complete successfully\r
- */\r
-bool XMEGANVM_EraseMemory(const uint8_t EraseCommand, const uint32_t Address)\r
-{\r
-       /* Wait until the NVM controller is no longer busy */\r
-       if (!(XMEGANVM_WaitWhileNVMControllerBusy()))\r
-         return false;\r
-         \r
-       /* Send the memory erase command to the target */\r
-       PDITarget_SendByte(PDI_CMD_STS | (PDI_DATSIZE_4BYTES << 2));\r
-       XMEGANVM_SendNVMRegAddress(XMEGA_NVM_REG_CMD);\r
-       PDITarget_SendByte(EraseCommand);\r
-       \r
-       /* Chip erase is handled separately, since it's procedure is different to other erase types */\r
-       if (EraseCommand == XMEGA_NVM_CMD_CHIPERASE)\r
-       {\r
-               /* Set CMDEX bit in NVM CTRLA register to start the chip erase */\r
-               PDITarget_SendByte(PDI_CMD_STS | (PDI_DATSIZE_4BYTES << 2));\r
-               XMEGANVM_SendNVMRegAddress(XMEGA_NVM_REG_CTRLA);\r
-               PDITarget_SendByte(1 << 0);             \r
-       }\r
-       else\r
-       {\r
-               /* Other erase modes just need us to address a byte within the target memory space */\r
-               PDITarget_SendByte(PDI_CMD_STS | (PDI_DATSIZE_4BYTES << 2));\r
-               XMEGANVM_SendAddress(Address);  \r
-               PDITarget_SendByte(0x00);\r
-       }\r
-       \r
-       /* Wait until the NVM bus is ready again */\r
-       if (!(PDITarget_WaitWhileNVMBusBusy()))\r
-         return false;\r
-         \r
-       return true;\r
-}\r
-\r
-#endif\r
diff --git a/Projects/AVRISP/Lib/PDI/XMEGANVM.h b/Projects/AVRISP/Lib/PDI/XMEGANVM.h
deleted file mode 100644 (file)
index c31c7e8..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-/*\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 XMEGANVM.c.\r
- */\r
-\r
-#ifndef _XMEGA_NVM__\r
-#define _XMEGA_NVM_\r
-\r
-       /* Includes: */\r
-               #include <avr/io.h>\r
-               #include <avr/interrupt.h>\r
-               #include <stdbool.h>\r
-               \r
-               #include <LUFA/Common/Common.h>\r
-               \r
-               #include "PDIProtocol.h"\r
-               #include "PDITarget.h"\r
-       \r
-       /* Preprocessor Checks: */\r
-               #if ((BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1))\r
-                       #undef ENABLE_ISP_PROTOCOL\r
-                       #undef ENABLE_TPI_PROTOCOL\r
-                       \r
-                       #if !defined(ENABLE_PDI_PROTOCOL)\r
-                               #define ENABLE_PDI_PROTOCOL\r
-                       #endif\r
-               #endif\r
-\r
-       /* Defines: */\r
-               #define XMEGA_NVM_BUSY_TIMEOUT_MS            200\r
-               \r
-               #define XMEGA_NVM_REG_ADDR0                  0x00\r
-               #define XMEGA_NVM_REG_ADDR1                  0x01\r
-               #define XMEGA_NVM_REG_ADDR2                  0x02\r
-               #define XMEGA_NVM_REG_DAT0                   0x04\r
-               #define XMEGA_NVM_REG_DAT1                   0x05\r
-               #define XMEGA_NVM_REG_DAT2                   0x06\r
-               #define XMEGA_NVM_REG_CMD                    0x0A\r
-               #define XMEGA_NVM_REG_CTRLA                  0x0B\r
-               #define XMEGA_NVM_REG_CTRLB                  0x0C\r
-               #define XMEGA_NVM_REG_INTCTRL                0x0D\r
-               #define XMEGA_NVM_REG_STATUS                 0x0F\r
-               #define XMEGA_NVM_REG_LOCKBITS               0x10\r
-               \r
-               #define XMEGA_NVM_CMD_NOOP                   0x00\r
-               #define XMEGA_NVM_CMD_CHIPERASE              0x40\r
-               #define XMEGA_NVM_CMD_READNVM                0x43\r
-               #define XMEGA_NVM_CMD_LOADFLASHPAGEBUFF      0x23\r
-               #define XMEGA_NVM_CMD_ERASEFLASHPAGEBUFF     0x26\r
-               #define XMEGA_NVM_CMD_ERASEFLASHPAGE         0x2B\r
-               #define XMEGA_NVM_CMD_WRITEFLASHPAGE         0x2E\r
-               #define XMEGA_NVM_CMD_ERASEWRITEFLASH        0x2F\r
-               #define XMEGA_NVM_CMD_FLASHCRC               0x78\r
-               #define XMEGA_NVM_CMD_ERASEAPPSEC            0x20\r
-               #define XMEGA_NVM_CMD_ERASEAPPSECPAGE        0x22\r
-               #define XMEGA_NVM_CMD_WRITEAPPSECPAGE        0x24\r
-               #define XMEGA_NVM_CMD_ERASEWRITEAPPSECPAGE   0x25\r
-               #define XMEGA_NVM_CMD_APPCRC                 0x38\r
-               #define XMEGA_NVM_CMD_ERASEBOOTSEC           0x68\r
-               #define XMEGA_NVM_CMD_ERASEBOOTSECPAGE       0x2A\r
-               #define XMEGA_NVM_CMD_WRITEBOOTSECPAGE       0x2C\r
-               #define XMEGA_NVM_CMD_ERASEWRITEBOOTSECPAGE  0x2D\r
-               #define XMEGA_NVM_CMD_BOOTCRC                0x39\r
-               #define XMEGA_NVM_CMD_READUSERSIG            0x03\r
-               #define XMEGA_NVM_CMD_ERASEUSERSIG           0x18\r
-               #define XMEGA_NVM_CMD_WRITEUSERSIG           0x1A\r
-               #define XMEGA_NVM_CMD_READCALIBRATION        0x02\r
-               #define XMEGA_NVM_CMD_READFUSE               0x07\r
-               #define XMEGA_NVM_CMD_WRITEFUSE              0x4C\r
-               #define XMEGA_NVM_CMD_WRITELOCK              0x08\r
-               #define XMEGA_NVM_CMD_LOADEEPROMPAGEBUFF     0x33\r
-               #define XMEGA_NVM_CMD_ERASEEEPROMPAGEBUFF    0x36\r
-               #define XMEGA_NVM_CMD_ERASEEEPROM            0x30\r
-               #define XMEGA_NVM_CMD_ERASEEEPROMPAGE        0x32\r
-               #define XMEGA_NVM_CMD_WRITEEEPROMPAGE        0x34\r
-               #define XMEGA_NVM_CMD_ERASEWRITEEEPROMPAGE   0x35\r
-               #define XMEGA_NVM_CMD_READEEPROM             0x06\r
-\r
-       /* Function Prototypes: */\r
-               void XMEGANVM_SendNVMRegAddress(const uint8_t Register);\r
-               void XMEGANVM_SendAddress(const uint32_t AbsoluteAddress);\r
-               bool XMEGANVM_WaitWhileNVMControllerBusy(void);\r
-               bool XMEGANVM_GetMemoryCRC(const uint8_t CRCCommand, uint32_t* const CRCDest);\r
-               bool XMEGANVM_ReadMemory(const uint32_t ReadAddress, uint8_t* ReadBuffer, const uint16_t ReadSize);\r
-               bool XMEGANVM_WriteByteMemory(const uint8_t WriteCommand, const uint32_t WriteAddress, const uint8_t* WriteBuffer);\r
-               bool XMEGANVM_WritePageMemory(const uint8_t WriteBuffCommand, const uint8_t EraseBuffCommand,\r
-                                             const uint8_t WritePageCommand, const uint8_t PageMode, const uint32_t WriteAddress,\r
-                                             const uint8_t* WriteBuffer, const uint16_t WriteSize);\r
-               bool XMEGANVM_EraseMemory(const uint8_t EraseCommand, const uint32_t Address);\r
-\r
-#endif\r
diff --git a/Projects/AVRISP/Lib/TPI/TINYNVM.c b/Projects/AVRISP/Lib/TPI/TINYNVM.c
deleted file mode 100644 (file)
index 206ea39..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*\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
- *  Target-related functions for the TINY target's NVM module.\r
- */\r
-\r
-#define  INCLUDE_FROM_TINYNVM_C\r
-#include "TINYNVM.h"\r
-\r
-#if defined(ENABLE_TPI_PROTOCOL) || defined(__DOXYGEN__)\r
-\r
-// TODO\r
-\r
-#endif\r
diff --git a/Projects/AVRISP/Lib/TPI/TINYNVM.h b/Projects/AVRISP/Lib/TPI/TINYNVM.h
deleted file mode 100644 (file)
index eca3c98..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*\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 TINYNVM.c.\r
- */\r
-\r
-#ifndef _TINY_NVM_\r
-#define _TINY_NVM_\r
-\r
-       /* Includes: */\r
-               #include <avr/io.h>\r
-               #include <avr/interrupt.h>\r
-               #include <stdbool.h>\r
-               \r
-               #include <LUFA/Common/Common.h>\r
-               \r
-               #include "TPIProtocol.h"\r
-               #include "TPITarget.h"\r
-       \r
-       /* Preprocessor Checks: */\r
-               #if ((BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1))\r
-                       #undef ENABLE_ISP_PROTOCOL\r
-                       #undef ENABLE_TPI_PROTOCOL\r
-                       \r
-                       #if !defined(ENABLE_PDI_PROTOCOL)\r
-                               #define ENABLE_PDI_PROTOCOL\r
-                       #endif\r
-               #endif\r
-\r
-       /* Defines: */\r
-               #define TINY_NVM_BUSY_TIMEOUT_MS       100\r
-\r
-#endif\r
diff --git a/Projects/AVRISP/Lib/TPI/TPIProtocol.c b/Projects/AVRISP/Lib/TPI/TPIProtocol.c
deleted file mode 100644 (file)
index a95e94b..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*\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
- *  TPI Protocol handler, to process V2 Protocol wrapped TPI commands used in Atmel programmer devices.\r
- */\r
-\r
-#define  INCLUDE_FROM_TPIPROTOCOL_C\r
-#include "TPIProtocol.h"\r
-\r
-#if defined(ENABLE_TPI_PROTOCOL) || defined(__DOXYGEN__)\r
-#warning TPI Programming Protocol is currently incomplete and is not suitable for general use.\r
-\r
-// TODO\r
-\r
-#endif\r
diff --git a/Projects/AVRISP/Lib/TPI/TPIProtocol.h b/Projects/AVRISP/Lib/TPI/TPIProtocol.h
deleted file mode 100644 (file)
index 11894a3..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/*\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 TPIProtocol.c.\r
- */\r
-\r
-#ifndef _TPI_PROTOCOL_\r
-#define _TPI_PROTOCOL_\r
-\r
-       /* Includes: */\r
-               #include <avr/io.h>\r
-               #include <util/delay.h>\r
-               #include <stdio.h>\r
-       
-               #include <LUFA/Drivers/USB/USB.h>\r
-\r
-               #include "TPITarget.h"\r
-               #include "TINYNVM.h"\r
-\r
-       /* Preprocessor Checks: */\r
-               #if ((BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1))\r
-                       #undef ENABLE_ISP_PROTOCOL\r
-                       #undef ENABLE_TPI_PROTOCOL\r
-                       \r
-                       #if !defined(ENABLE_PDI_PROTOCOL)\r
-                               #define ENABLE_PDI_PROTOCOL\r
-                       #endif\r
-               #endif\r
-               \r
-#endif\r
diff --git a/Projects/AVRISP/Lib/TPI/TPITarget.c b/Projects/AVRISP/Lib/TPI/TPITarget.c
deleted file mode 100644 (file)
index 464d403..0000000
+++ /dev/null
@@ -1,338 +0,0 @@
-/*\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
- *  Target-related functions for the TPI Protocol decoder.\r
- */\r
-\r
-#define  INCLUDE_FROM_TPITARGET_C\r
-#include "TPITarget.h"\r
-\r
-#if defined(ENABLE_TPI_PROTOCOL) || defined(__DOXYGEN__)\r
-\r
-/** Flag to indicate if the USART is currently in Tx or Rx mode. */\r
-volatile bool               IsSending;\r
-\r
-#if !defined(TPI_VIA_HARDWARE_USART)\r
-/** Software USART raw frame bits for transmission/reception. */\r
-volatile uint16_t           SoftUSART_Data;\r
-\r
-/** Bits remaining to be sent or received via the software USART - set as a GPIOR for speed. */\r
-#define SoftUSART_BitCount  GPIOR2\r
-\r
-\r
-/** ISR to manage the software USART when bit-banged USART mode is selected. */\r
-ISR(TIMER1_CAPT_vect, ISR_BLOCK)\r
-{\r
-       /* Toggle CLOCK pin in a single cycle (see AVR datasheet) */\r
-       BITBANG_TPICLOCK_PIN |= BITBANG_TPICLOCK_MASK;\r
-\r
-       /* If not sending or receiving, just exit */\r
-       if (!(SoftUSART_BitCount))\r
-         return;\r
-\r
-       /* Check to see if we are at a rising or falling edge of the clock */\r
-       if (BITBANG_TPICLOCK_PORT & BITBANG_TPICLOCK_MASK)\r
-       {\r
-               /* If at rising clock edge and we are in send mode, abort */\r
-               if (IsSending)\r
-                 return;\r
-                 \r
-               /* Wait for the start bit when receiving */\r
-               if ((SoftUSART_BitCount == BITS_IN_TPI_FRAME) && (BITBANG_TPIDATA_PIN & BITBANG_TPIDATA_MASK))\r
-                 return;\r
-       \r
-               /* Shift in the bit one less than the frame size in position, so that the start bit will eventually\r
-                * be discarded leaving the data to be byte-aligned for quick access */\r
-               if (BITBANG_TPIDATA_PIN & BITBANG_TPIDATA_MASK)\r
-                 SoftUSART_Data |= (1 << (BITS_IN_TPI_FRAME - 1));\r
-\r
-               SoftUSART_Data >>= 1;\r
-               SoftUSART_BitCount--;\r
-       }\r
-       else\r
-       {\r
-               /* If at falling clock edge and we are in receive mode, abort */\r
-               if (!IsSending)\r
-                 return;\r
-\r
-               /* Set the data line to the next bit value */\r
-               if (SoftUSART_Data & 0x01)\r
-                 BITBANG_TPIDATA_PORT |=  BITBANG_TPIDATA_MASK;\r
-               else\r
-                 BITBANG_TPIDATA_PORT &= ~BITBANG_TPIDATA_MASK;                  \r
-\r
-               SoftUSART_Data >>= 1;\r
-               SoftUSART_BitCount--;\r
-       }\r
-}\r
-#endif\r
-\r
-/** Enables the target's TPI interface, holding the target in reset until TPI mode is exited. */\r
-void TPITarget_EnableTargetTPI(void)\r
-{\r
-       /* Set /RESET line low for at least 90ns to enable TPI functionality */\r
-       RESET_LINE_DDR  |= RESET_LINE_MASK;\r
-       RESET_LINE_PORT &= ~RESET_LINE_MASK;\r
-       asm volatile ("NOP"::);\r
-       asm volatile ("NOP"::);\r
-\r
-#if defined(TPI_VIA_HARDWARE_USART)\r
-       /* Set Tx and XCK as outputs, Rx as input */\r
-       DDRD |=  (1 << 5) | (1 << 3);\r
-       DDRD &= ~(1 << 2);\r
-               \r
-       /* Set up the synchronous USART for XMEGA communications - \r
-          8 data bits, even parity, 2 stop bits */\r
-       UBRR1  = (F_CPU / 1000000UL);\r
-       UCSR1B = (1 << TXEN1);\r
-       UCSR1C = (1 << UMSEL10) | (1 << UPM11) | (1 << USBS1) | (1 << UCSZ11) | (1 << UCSZ10) | (1 << UCPOL1);\r
-\r
-       /* Send two BREAKs of 12 bits each to enable TPI interface (need at least 16 idle bits) */\r
-       TPITarget_SendBreak();\r
-       TPITarget_SendBreak();\r
-#else\r
-       /* Set DATA and CLOCK lines to outputs */\r
-       BITBANG_TPIDATA_DDR  |= BITBANG_TPIDATA_MASK;\r
-       BITBANG_TPICLOCK_DDR |= BITBANG_TPICLOCK_MASK;\r
-       \r
-       /* Set DATA line high for idle state */\r
-       BITBANG_TPIDATA_PORT |= BITBANG_TPIDATA_MASK;\r
-\r
-       /* Fire timer capture ISR every 100 cycles to manage the software USART */\r
-       OCR1A   = 80;\r
-       TCCR1B  = (1 << WGM13) | (1 << WGM12) | (1 << CS10);\r
-       TIMSK1  = (1 << ICIE1);\r
-       \r
-       /* Send two BREAKs of 12 bits each to enable TPI interface (need at least 16 idle bits) */\r
-       TPITarget_SendBreak();\r
-       TPITarget_SendBreak();\r
-#endif\r
-}\r
-\r
-/** Disables the target's TPI interface, exits programming mode and starts the target's application. */\r
-void TPITarget_DisableTargetTPI(void)\r
-{\r
-#if defined(TPI_VIA_HARDWARE_USART)\r
-       /* Turn off receiver and transmitter of the USART, clear settings */\r
-       UCSR1A |= (1 << TXC1) | (1 << RXC1);\r
-       UCSR1B  = 0;\r
-       UCSR1C  = 0;\r
-\r
-       /* Set all USART lines as input, tristate */\r
-       DDRD  &= ~((1 << 5) | (1 << 3));\r
-       PORTD &= ~((1 << 5) | (1 << 3) | (1 << 2));\r
-#else\r
-       /* Set DATA and CLOCK lines to inputs */\r
-       BITBANG_TPIDATA_DDR   &= ~BITBANG_TPIDATA_MASK;\r
-       BITBANG_TPICLOCK_DDR  &= ~BITBANG_TPICLOCK_MASK;\r
-       \r
-       /* Tristate DATA and CLOCK lines */\r
-       BITBANG_TPIDATA_PORT  &= ~BITBANG_TPIDATA_MASK;\r
-       BITBANG_TPICLOCK_PORT &= ~BITBANG_TPICLOCK_MASK;\r
-#endif\r
-\r
-       /* Tristate target /RESET line */\r
-       RESET_LINE_DDR  &= ~RESET_LINE_MASK;\r
-       RESET_LINE_PORT &= ~RESET_LINE_MASK;\r
-}\r
-\r
-/** Sends a byte via the USART.\r
- *\r
- *  \param[in] Byte  Byte to send through the USART\r
- */\r
-void TPITarget_SendByte(const uint8_t Byte)\r
-{\r
-#if defined(TPI_VIA_HARDWARE_USART)\r
-       /* Switch to Tx mode if currently in Rx mode */\r
-       if (!(IsSending))\r
-       {\r
-               PORTD  |=  (1 << 3);\r
-               DDRD   |=  (1 << 3);\r
-\r
-               UCSR1B |=  (1 << TXEN1);\r
-               UCSR1B &= ~(1 << RXEN1);\r
-               \r
-               IsSending = true;\r
-       }\r
-       \r
-       /* Wait until there is space in the hardware Tx buffer before writing */\r
-       while (!(UCSR1A & (1 << UDRE1)));\r
-       UCSR1A |= (1 << TXC1);\r
-       UDR1    = Byte;\r
-#else\r
-       /* Switch to Tx mode if currently in Rx mode */\r
-       if (!(IsSending))\r
-       {\r
-               BITBANG_TPIDATA_PORT |= BITBANG_TPIDATA_MASK;\r
-               BITBANG_TPIDATA_DDR  |= BITBANG_TPIDATA_MASK;\r
-\r
-               IsSending = true;\r
-       }\r
-\r
-       /* Calculate the new USART frame data here while while we wait for a previous byte (if any) to finish sending */\r
-       uint16_t NewUSARTData = ((1 << 11) | (1 << 10) | (0 << 9) | ((uint16_t)Byte << 1) | (0 << 0));\r
-\r
-       /* Compute Even parity - while a bit is still set, chop off lowest bit and toggle parity bit */\r
-       uint8_t ParityData    = Byte;\r
-       while (ParityData)\r
-       {\r
-               NewUSARTData ^= (1 << 9);\r
-               ParityData   &= (ParityData - 1);\r
-       }\r
-\r
-       /* Wait until transmitter is idle before writing new data */\r
-       while (SoftUSART_BitCount);\r
-\r
-       /* Data shifted out LSB first, START DATA PARITY STOP STOP */\r
-       SoftUSART_Data     = NewUSARTData;\r
-       SoftUSART_BitCount = BITS_IN_TPI_FRAME;\r
-#endif\r
-}\r
-\r
-/** Receives a byte via the software USART, blocking until data is received.\r
- *\r
- *  \return Received byte from the USART\r
- */\r
-uint8_t TPITarget_ReceiveByte(void)\r
-{\r
-#if defined(TPI_VIA_HARDWARE_USART)\r
-       /* Switch to Rx mode if currently in Tx mode */\r
-       if (IsSending)\r
-       {\r
-               while (!(UCSR1A & (1 << TXC1)));\r
-               UCSR1A |=  (1 << TXC1);\r
-\r
-               UCSR1B &= ~(1 << TXEN1);\r
-               UCSR1B |=  (1 << RXEN1);\r
-\r
-               DDRD   &= ~(1 << 3);\r
-               PORTD  &= ~(1 << 3);\r
-               \r
-               IsSending = false;\r
-       }\r
-\r
-       /* Wait until a byte has been received before reading */\r
-       while (!(UCSR1A & (1 << RXC1)));\r
-       return UDR1;\r
-#else\r
-       /* Switch to Rx mode if currently in Tx mode */\r
-       if (IsSending)\r
-       {\r
-               while (SoftUSART_BitCount);\r
-\r
-               BITBANG_TPIDATA_DDR  &= ~BITBANG_TPIDATA_MASK;\r
-               BITBANG_TPIDATA_PORT &= ~BITBANG_TPIDATA_MASK;\r
-\r
-               IsSending = false;\r
-       }\r
-\r
-       /* Wait until a byte has been received before reading */\r
-       SoftUSART_BitCount = BITS_IN_TPI_FRAME;\r
-       while (SoftUSART_BitCount);\r
-       \r
-       /* Throw away the parity and stop bits to leave only the data (start bit is already discarded) */\r
-       return (uint8_t)SoftUSART_Data;\r
-#endif\r
-}\r
-\r
-/** Sends a BREAK via the USART to the attached target, consisting of a full frame of idle bits. */\r
-void TPITarget_SendBreak(void)\r
-{\r
-#if defined(TPI_VIA_HARDWARE_USART)\r
-       /* Switch to Tx mode if currently in Rx mode */\r
-       if (!(IsSending))\r
-       {\r
-               PORTD  |=  (1 << 3);\r
-               DDRD   |=  (1 << 3);\r
-\r
-               UCSR1B &= ~(1 << RXEN1);\r
-               UCSR1B |=  (1 << TXEN1);\r
-               \r
-               IsSending = true;\r
-       }\r
-\r
-       /* Need to do nothing for a full frame to send a BREAK */\r
-       for (uint8_t i = 0; i < BITS_IN_TPI_FRAME; i++)\r
-       {\r
-               /* Wait for a full cycle of the clock */\r
-               while (PIND & (1 << 5));\r
-               while (!(PIND & (1 << 5)));\r
-       }\r
-#else\r
-       /* Switch to Tx mode if currently in Rx mode */\r
-       if (!(IsSending))\r
-       {\r
-               BITBANG_TPIDATA_PORT |= BITBANG_TPIDATA_MASK;\r
-               BITBANG_TPIDATA_DDR  |= BITBANG_TPIDATA_MASK;\r
-\r
-               IsSending = true;\r
-       }\r
-       \r
-       while (SoftUSART_BitCount);\r
-\r
-       /* Need to do nothing for a full frame to send a BREAK */\r
-       SoftUSART_Data     = 0x0FFF;\r
-       SoftUSART_BitCount = BITS_IN_TPI_FRAME;\r
-#endif\r
-}\r
-\r
-/** Busy-waits while the NVM controller is busy performing a NVM operation, such as a FLASH page read or CRC\r
- *  calculation.\r
- *\r
- *  \return Boolean true if the NVM controller became ready within the timeout period, false otherwise\r
- */\r
-bool TPITarget_WaitWhileNVMBusBusy(void)\r
-{\r
-       TCNT0 = 0;\r
-       TIFR0 = (1 << OCF1A);\r
-                       \r
-       uint8_t TimeoutMS = TPI_NVM_TIMEOUT_MS;\r
-       \r
-       /* Poll the STATUS register to check to see if NVM access has been enabled */\r
-       while (TimeoutMS)\r
-       {\r
-               /* Send the LDCS command to read the TPI STATUS register to see the NVM bus is active */\r
-               TPITarget_SendByte(TPI_CMD_SLDCS | TPI_STATUS_REG);\r
-               if (TPITarget_ReceiveByte() & TPI_STATUS_NVM)\r
-                 return true;\r
-\r
-               if (TIFR0 & (1 << OCF1A))\r
-               {\r
-                       TIFR0 = (1 << OCF1A);\r
-                       TimeoutMS--;\r
-               }\r
-       }\r
-       \r
-       return false;\r
-}\r
-\r
-#endif\r
diff --git a/Projects/AVRISP/Lib/TPI/TPITarget.h b/Projects/AVRISP/Lib/TPI/TPITarget.h
deleted file mode 100644 (file)
index 596bdce..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-/*\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 TPITarget.c.\r
- */\r
-\r
-#ifndef _TPI_TARGET_\r
-#define _TPI_TARGET_\r
-\r
-       /* Includes: */\r
-               #include <avr/io.h>\r
-               #include <avr/interrupt.h>\r
-               #include <stdbool.h>\r
-               \r
-               #include <LUFA/Common/Common.h>\r
-       \r
-       /* Preprocessor Checks: */\r
-               #if ((BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1))\r
-                       #undef ENABLE_ISP_PROTOCOL\r
-                       #undef ENABLE_TPI_PROTOCOL\r
-                       \r
-                       #if !defined(ENABLE_PDI_PROTOCOL)\r
-                               #define ENABLE_PDI_PROTOCOL\r
-                       #endif\r
-               #endif\r
-\r
-       /* Defines: */\r
-               #define BITBANG_TPIDATA_PORT     PORTB\r
-               #define BITBANG_TPIDATA_DDR      DDRB\r
-               #define BITBANG_TPIDATA_PIN      PINB\r
-               #define BITBANG_TPIDATA_MASK     (1 << 3)\r
-                       \r
-               #define BITBANG_TPICLOCK_PORT    PORTB\r
-               #define BITBANG_TPICLOCK_DDR     DDRB\r
-               #define BITBANG_TPICLOCK_PIN     PINB\r
-               #define BITBANG_TPICLOCK_MASK    (1 << 1)\r
-               \r
-               /** Total number of bits in a single USART frame */\r
-               #define BITS_IN_TPI_FRAME        12\r
-               \r
-               /** Timeout in milliseconds of a PDI busy-wait command */\r
-               #define TPI_NVM_TIMEOUT_MS       100\r
-\r
-               #define TPI_CMD_SLD              0x20\r
-               #define TPI_CMD_SST              0x60\r
-               #define TPI_CMD_SSTPR            0x68\r
-               #define TPI_CMD_SIN              0x10\r
-               #define TPI_CMD_SOUT             0x90\r
-               #define TPI_CMD_SLDCS            0x80\r
-               #define TPI_CMD_SSTCS            0xC0\r
-               #define TPI_CMD_SKEY             0xE0\r
-\r
-               #define TPI_STATUS_REG           0x00\r
-               #define TPI_CTRL_REG             0x02\r
-               #define TPI_ID_REG               0x0F\r
-               \r
-               #define TPI_STATUS_NVM           (1 << 1)\r
-\r
-               #define TPI_NVMENABLE_KEY        (uint8_t[]){0x12, 0x89, 0xAB, 0x45, 0xCD, 0xD8, 0x88, 0xFF}\r
-\r
-               #define TPI_POINTER_INDIRECT     0\r
-               #define TPI_POINTER_INDIRECT_PI  (1 << 2)\r
-                               \r
-       /* Function Prototypes: */\r
-               void    TPITarget_EnableTargetTPI(void);\r
-               void    TPITarget_DisableTargetTPI(void);\r
-               void    TPITarget_SendByte(const uint8_t Byte);\r
-               uint8_t TPITarget_ReceiveByte(void);\r
-               void    TPITarget_SendBreak(void);\r
-               bool    TPITarget_WaitWhileNVMBusBusy(void);\r
-\r
-#endif\r
index 3bfcc11..eae2e83 100644 (file)
@@ -50,7 +50,9 @@ bool MustSetAddress;
 void V2Protocol_ProcessCommand(void)\r
 {\r
        uint8_t V2Command = Endpoint_Read_Byte();\r
 void V2Protocol_ProcessCommand(void)\r
 {\r
        uint8_t V2Command = Endpoint_Read_Byte();\r
-                 \r
+       \r
+       Serial_TxByte(V2Command);\r
+       \r
        switch (V2Command)\r
        {\r
                case CMD_SIGN_ON:\r
        switch (V2Command)\r
        {\r
                case CMD_SIGN_ON:\r
index c7c1a73..02579a3 100644 (file)
@@ -39,6 +39,7 @@
        /* Includes: */
                #include <LUFA/Drivers/USB/USB.h>
                #include <LUFA/Drivers/Peripheral/SPI.h>\r
        /* Includes: */
                #include <LUFA/Drivers/USB/USB.h>
                #include <LUFA/Drivers/Peripheral/SPI.h>\r
+               #include <LUFA/Drivers/Peripheral/Serial.h>\r
                \r
                #include "../Descriptors.h"
                #include "V2ProtocolConstants.h"\r
                \r
                #include "../Descriptors.h"
                #include "V2ProtocolConstants.h"\r
diff --git a/Projects/AVRISP/Lib/XPROG/PDIProtocol.c b/Projects/AVRISP/Lib/XPROG/PDIProtocol.c
new file mode 100644 (file)
index 0000000..ed51460
--- /dev/null
@@ -0,0 +1,378 @@
+/*\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
+ *  PDI Protocol handler, to process V2 Protocol wrapped PDI commands used in Atmel programmer devices.\r
+ */\r
+\r
+#define  INCLUDE_FROM_PDIPROTOCOL_C\r
+#include "PDIProtocol.h"\r
+\r
+#if defined(ENABLE_PDI_PROTOCOL) || defined(__DOXYGEN__)\r
+/** Base absolute address for the target's NVM controller */\r
+uint32_t XPROG_Param_NVMBase = 0x010001C0;\r
+\r
+/** Size in bytes of the target's EEPROM page */\r
+uint32_t XPROG_Param_EEPageSize;\r
+\r
+/** Handler for the CMD_XPROG_SETMODE command, which sets the programmer-to-target protocol used for PDI\r
+ *  XMEGA programming (either PDI or JTAG). Only PDI programming is supported.\r
+ */\r
+void PDIProtocol_XPROG_SetMode(void)\r
+{\r
+       struct\r
+       {\r
+               uint8_t Protocol;\r
+       } SetMode_XPROG_Params;\r
+       \r
+       Endpoint_Read_Stream_LE(&SetMode_XPROG_Params, sizeof(SetMode_XPROG_Params));\r
+\r
+       Endpoint_ClearOUT();\r
+       Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);\r
+       \r
+       Serial_TxByte(SetMode_XPROG_Params.Protocol);\r
+       \r
+       Endpoint_Write_Byte(CMD_XPROG_SETMODE);\r
+       Endpoint_Write_Byte((SetMode_XPROG_Params.Protocol == XPRG_PROTOCOL_PDI) ? STATUS_CMD_OK : STATUS_CMD_FAILED);\r
+       Endpoint_ClearIN();     \r
+}\r
+\r
+/** Handler for the CMD_XPROG command, which wraps up XPROG commands in a V2 wrapper which need to be\r
+ *  removed and processed so that the underlying XPROG command can be handled.\r
+ */\r
+void PDIProtocol_XPROG_Command(void)\r
+{\r
+       uint8_t XPROGCommand = Endpoint_Read_Byte();\r
+\r
+       switch (XPROGCommand)\r
+       {\r
+               case XPRG_CMD_ENTER_PROGMODE:\r
+                       PDIProtocol_EnterXPROGMode();\r
+                       break;\r
+               case XPRG_CMD_LEAVE_PROGMODE:\r
+                       PDIProtocol_LeaveXPROGMode();\r
+                       break;\r
+               case XPRG_CMD_ERASE:\r
+                       PDIProtocol_Erase();\r
+                       break;\r
+               case XPRG_CMD_WRITE_MEM:\r
+                       PDIProtocol_WriteMemory();\r
+                       break;\r
+               case XPRG_CMD_READ_MEM:\r
+                       PDIProtocol_ReadMemory();\r
+                       break;\r
+               case XPRG_CMD_CRC:\r
+                       PDIProtocol_ReadCRC();\r
+                       break;\r
+               case XPRG_CMD_SET_PARAM:\r
+                       PDIProtocol_SetParam();\r
+                       break;\r
+       }\r
+}\r
+\r
+/** Handler for the XPROG ENTER_PROGMODE command to establish a PDI connection with the attached device. */\r
+static void PDIProtocol_EnterXPROGMode(void)\r
+{\r
+       Endpoint_ClearOUT();\r
+       Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);\r
+       \r
+       /* Enable PDI programming mode with the attached target */\r
+       PDITarget_EnableTargetPDI();\r
+       \r
+       /* Store the RESET key into the RESET PDI register to keep the XMEGA in reset */\r
+       PDITarget_SendByte(PDI_CMD_STCS | PDI_RESET_REG);       \r
+       PDITarget_SendByte(PDI_RESET_KEY);\r
+\r
+       /* Enable access to the XPROG NVM bus by sending the documented NVM access key to the device */\r
+       PDITarget_SendByte(PDI_CMD_KEY);        \r
+       for (uint8_t i = sizeof(PDI_NVMENABLE_KEY); i > 0; i--)\r
+         PDITarget_SendByte(PDI_NVMENABLE_KEY[i - 1]);\r
+\r
+       /* Wait until the NVM bus becomes active */\r
+       bool NVMBusEnabled = PDITarget_WaitWhileNVMBusBusy();\r
+       \r
+       Endpoint_Write_Byte(CMD_XPROG);\r
+       Endpoint_Write_Byte(XPRG_CMD_ENTER_PROGMODE);\r
+       Endpoint_Write_Byte(NVMBusEnabled ? XPRG_ERR_OK : XPRG_ERR_FAILED);\r
+       Endpoint_ClearIN();\r
+}\r
+\r
+/** Handler for the XPROG LEAVE_PROGMODE command to terminate the PDI programming connection with\r
+ *  the attached device.\r
+ */\r
+static void PDIProtocol_LeaveXPROGMode(void)\r
+{\r
+       Endpoint_ClearOUT();\r
+       Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);\r
+       \r
+       /* Clear the RESET key in the RESET PDI register to allow the XMEGA to run */\r
+       PDITarget_SendByte(PDI_CMD_STCS | PDI_RESET_REG);       \r
+       PDITarget_SendByte(0x00);\r
+\r
+       PDITarget_DisableTargetPDI();\r
+\r
+       Endpoint_Write_Byte(CMD_XPROG);\r
+       Endpoint_Write_Byte(XPRG_CMD_LEAVE_PROGMODE);\r
+       Endpoint_Write_Byte(XPRG_ERR_OK);\r
+       Endpoint_ClearIN();\r
+}\r
+\r
+/** Handler for the XPRG ERASE command to erase a specific memory address space in the attached device. */\r
+static void PDIProtocol_Erase(void)\r
+{\r
+       uint8_t ReturnStatus = XPRG_ERR_OK;\r
+\r
+       struct\r
+       {\r
+               uint8_t  MemoryType;\r
+               uint32_t Address;\r
+       } Erase_XPROG_Params;\r
+\r
+       Endpoint_Read_Stream_LE(&Erase_XPROG_Params, sizeof(Erase_XPROG_Params));\r
+       Erase_XPROG_Params.Address = SwapEndian_32(Erase_XPROG_Params.Address);\r
+\r
+       Endpoint_ClearOUT();\r
+       Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);\r
+       \r
+       uint8_t EraseCommand = XMEGA_NVM_CMD_NOOP;\r
+       \r
+       /* Determine which NVM command to send to the device depending on the memory to erase */\r
+       if (Erase_XPROG_Params.MemoryType == XPRG_ERASE_CHIP)\r
+         EraseCommand = XMEGA_NVM_CMD_CHIPERASE;\r
+       else if (Erase_XPROG_Params.MemoryType == XPRG_ERASE_APP)\r
+         EraseCommand = XMEGA_NVM_CMD_ERASEAPPSEC;\r
+       else if (Erase_XPROG_Params.MemoryType == XPRG_ERASE_BOOT)\r
+         EraseCommand = XMEGA_NVM_CMD_ERASEBOOTSEC;\r
+       else if (Erase_XPROG_Params.MemoryType == XPRG_ERASE_EEPROM)\r
+         EraseCommand = XMEGA_NVM_CMD_ERASEEEPROM;\r
+       else if (Erase_XPROG_Params.MemoryType == XPRG_ERASE_APP_PAGE)\r
+         EraseCommand = XMEGA_NVM_CMD_ERASEAPPSECPAGE;\r
+       else if (Erase_XPROG_Params.MemoryType == XPRG_ERASE_BOOT_PAGE)\r
+         EraseCommand = XMEGA_NVM_CMD_ERASEBOOTSECPAGE;\r
+       else if (Erase_XPROG_Params.MemoryType == XPRG_ERASE_EEPROM_PAGE)\r
+         EraseCommand = XMEGA_NVM_CMD_ERASEEEPROMPAGE;\r
+       else if (Erase_XPROG_Params.MemoryType == XPRG_ERASE_USERSIG)\r
+         EraseCommand = XMEGA_NVM_CMD_ERASEUSERSIG;\r
+       \r
+       /* Erase the target memory, indicate timeout if ocurred */\r
+       if (!(XMEGANVM_EraseMemory(EraseCommand, Erase_XPROG_Params.Address)))\r
+         ReturnStatus = XPRG_ERR_TIMEOUT;\r
+       \r
+       Endpoint_Write_Byte(CMD_XPROG);\r
+       Endpoint_Write_Byte(XPRG_CMD_ERASE);\r
+       Endpoint_Write_Byte(ReturnStatus);\r
+       Endpoint_ClearIN();     \r
+}\r
+\r
+/** Handler for the XPROG WRITE_MEMORY command to write to a specific memory space within the attached device. */\r
+static void PDIProtocol_WriteMemory(void)\r
+{\r
+       uint8_t ReturnStatus = XPRG_ERR_OK;\r
+\r
+       struct\r
+       {\r
+               uint8_t  MemoryType;\r
+               uint8_t  PageMode;\r
+               uint32_t Address;\r
+               uint16_t Length;\r
+               uint8_t  ProgData[256];\r
+       } WriteMemory_XPROG_Params;\r
+       \r
+       Endpoint_Read_Stream_LE(&WriteMemory_XPROG_Params, (sizeof(WriteMemory_XPROG_Params) -\r
+                                                           sizeof(WriteMemory_XPROG_Params).ProgData));\r
+       WriteMemory_XPROG_Params.Address = SwapEndian_32(WriteMemory_XPROG_Params.Address);\r
+       WriteMemory_XPROG_Params.Length  = SwapEndian_16(WriteMemory_XPROG_Params.Length);\r
+       Endpoint_Read_Stream_LE(&WriteMemory_XPROG_Params.ProgData, WriteMemory_XPROG_Params.Length);\r
+\r
+       Endpoint_ClearOUT();\r
+       Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);\r
+\r
+       /* Assume FLASH page programming by default, as it is the common case */\r
+       uint8_t WriteCommand     = XMEGA_NVM_CMD_WRITEFLASHPAGE;\r
+       uint8_t WriteBuffCommand = XMEGA_NVM_CMD_LOADFLASHPAGEBUFF;\r
+       uint8_t EraseBuffCommand = XMEGA_NVM_CMD_ERASEFLASHPAGEBUFF;\r
+       bool    PagedMemory      = true;\r
+       \r
+       if (WriteMemory_XPROG_Params.MemoryType == XPRG_MEM_TYPE_APPL)\r
+       {\r
+               WriteCommand     = XMEGA_NVM_CMD_WRITEAPPSECPAGE;\r
+       }\r
+       else if (WriteMemory_XPROG_Params.MemoryType == XPRG_MEM_TYPE_BOOT)\r
+       {\r
+               WriteCommand     = XMEGA_NVM_CMD_WRITEBOOTSECPAGE;\r
+       }\r
+       else if (WriteMemory_XPROG_Params.MemoryType == XPRG_MEM_TYPE_EEPROM)\r
+       {\r
+               WriteCommand     = XMEGA_NVM_CMD_WRITEEEPROMPAGE;\r
+               WriteBuffCommand = XMEGA_NVM_CMD_LOADEEPROMPAGEBUFF;\r
+               EraseBuffCommand = XMEGA_NVM_CMD_ERASEEEPROMPAGEBUFF;\r
+       }\r
+       else if (WriteMemory_XPROG_Params.MemoryType == XPRG_MEM_TYPE_USERSIG)\r
+       {\r
+               /* User signature is paged, but needs us to manually indicate the mode bits since the host doesn't set them */\r
+               WriteMemory_XPROG_Params.PageMode = (XPRG_PAGEMODE_ERASE | XPRG_PAGEMODE_WRITE);\r
+               WriteCommand     = XMEGA_NVM_CMD_WRITEUSERSIG;\r
+       }\r
+       else if (WriteMemory_XPROG_Params.MemoryType == XPRG_MEM_TYPE_FUSE)\r
+       {\r
+               WriteCommand     = XMEGA_NVM_CMD_WRITEFUSE;\r
+               PagedMemory      = false;\r
+       }\r
+       else if (WriteMemory_XPROG_Params.MemoryType == XPRG_MEM_TYPE_LOCKBITS)\r
+       {\r
+               WriteCommand     = XMEGA_NVM_CMD_WRITELOCK;\r
+               PagedMemory      = false;\r
+       }\r
+       \r
+       /* Send the appropriate memory write commands to the device, indicate timeout if occurred */\r
+       if ((PagedMemory && !XMEGANVM_WritePageMemory(WriteBuffCommand, EraseBuffCommand, WriteCommand, \r
+                                                          WriteMemory_XPROG_Params.PageMode, WriteMemory_XPROG_Params.Address,\r
+                                                          WriteMemory_XPROG_Params.ProgData, WriteMemory_XPROG_Params.Length)) ||\r
+          (!PagedMemory && !XMEGANVM_WriteByteMemory(WriteCommand, WriteMemory_XPROG_Params.Address,\r
+                                                      WriteMemory_XPROG_Params.ProgData)))\r
+       {\r
+               ReturnStatus = XPRG_ERR_TIMEOUT;\r
+       }\r
+       \r
+       Endpoint_Write_Byte(CMD_XPROG);\r
+       Endpoint_Write_Byte(XPRG_CMD_WRITE_MEM);\r
+       Endpoint_Write_Byte(ReturnStatus);      \r
+       Endpoint_ClearIN();\r
+}\r
+\r
+/** Handler for the XPROG READ_MEMORY command to read data from a specific address space within the\r
+ *  attached device.\r
+ */\r
+static void PDIProtocol_ReadMemory(void)\r
+{\r
+       uint8_t ReturnStatus = XPRG_ERR_OK;\r
+\r
+       struct\r
+       {\r
+               uint8_t  MemoryType;\r
+               uint32_t Address;\r
+               uint16_t Length;\r
+       } ReadMemory_XPROG_Params;\r
+       \r
+       Endpoint_Read_Stream_LE(&ReadMemory_XPROG_Params, sizeof(ReadMemory_XPROG_Params));\r
+       ReadMemory_XPROG_Params.Address = SwapEndian_32(ReadMemory_XPROG_Params.Address);\r
+       ReadMemory_XPROG_Params.Length  = SwapEndian_16(ReadMemory_XPROG_Params.Length);\r
+\r
+       Endpoint_ClearOUT();\r
+       Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);\r
+\r
+       uint8_t ReadBuffer[256];\r
+       \r
+       /* Read the target's memory, indicate timeout if occurred */\r
+       if (!(XMEGANVM_ReadMemory(ReadMemory_XPROG_Params.Address, ReadBuffer, ReadMemory_XPROG_Params.Length)))\r
+         ReturnStatus = XPRG_ERR_TIMEOUT;\r
+\r
+       Endpoint_Write_Byte(CMD_XPROG);\r
+       Endpoint_Write_Byte(XPRG_CMD_READ_MEM);\r
+       Endpoint_Write_Byte(ReturnStatus);\r
+       \r
+       if (ReturnStatus == XPRG_ERR_OK)\r
+         Endpoint_Write_Stream_LE(ReadBuffer, ReadMemory_XPROG_Params.Length);\r
+       \r
+       Endpoint_ClearIN();\r
+}\r
+\r
+/** Handler for the XPROG CRC command to read a specific memory space's CRC value for comparison between the\r
+ *  attached device's memory and a data set on the host.\r
+ */\r
+static void PDIProtocol_ReadCRC(void)\r
+{\r
+       uint8_t ReturnStatus = XPRG_ERR_OK;\r
+       \r
+       struct\r
+       {\r
+               uint8_t CRCType;\r
+       } ReadCRC_XPROG_Params;\r
+       \r
+       Endpoint_Read_Stream_LE(&ReadCRC_XPROG_Params, sizeof(ReadCRC_XPROG_Params));\r
+       Endpoint_ClearOUT();\r
+       Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);\r
+       \r
+       uint8_t  CRCCommand = XMEGA_NVM_CMD_NOOP;\r
+       uint32_t MemoryCRC;\r
+\r
+       /* Determine which NVM command to send to the device depending on the memory to CRC */\r
+       if (ReadCRC_XPROG_Params.CRCType == XPRG_CRC_APP)\r
+         CRCCommand = XMEGA_NVM_CMD_APPCRC;\r
+       else if (ReadCRC_XPROG_Params.CRCType == XPRG_CRC_BOOT)\r
+         CRCCommand = XMEGA_NVM_CMD_BOOTCRC;\r
+       else\r
+         CRCCommand = XMEGA_NVM_CMD_FLASHCRC;\r
+       \r
+       /* Perform and retrieve the memory CRC, indicate timeout if occurred */\r
+       if (!(XMEGANVM_GetMemoryCRC(CRCCommand, &MemoryCRC)))\r
+         ReturnStatus = XPRG_ERR_TIMEOUT;\r
+       \r
+       Endpoint_Write_Byte(CMD_XPROG);\r
+       Endpoint_Write_Byte(XPRG_CMD_CRC);\r
+       Endpoint_Write_Byte(ReturnStatus);\r
+       \r
+       if (ReturnStatus == XPRG_ERR_OK)\r
+       {\r
+               Endpoint_Write_Byte(MemoryCRC >> 16);\r
+               Endpoint_Write_Word_LE(MemoryCRC & 0xFFFF);             \r
+       }\r
+       \r
+       Endpoint_ClearIN();     \r
+}\r
+\r
+/** Handler for the XPROG SET_PARAM command to set a PDI parameter for use when communicating with the\r
+ *  attached device.\r
+ */\r
+static void PDIProtocol_SetParam(void)\r
+{\r
+       uint8_t ReturnStatus = XPRG_ERR_OK;\r
+\r
+       uint8_t XPROGParam = Endpoint_Read_Byte();\r
+       \r
+       /* Determine which parameter is being set, store the new parameter value */\r
+       if (XPROGParam == XPRG_PARAM_NVMBASE)\r
+         XPROG_Param_NVMBase = Endpoint_Read_DWord_BE();\r
+       else if (XPROGParam == XPRG_PARAM_EEPPAGESIZE)\r
+         XPROG_Param_EEPageSize = Endpoint_Read_Word_BE();\r
+       else\r
+         ReturnStatus = XPRG_ERR_FAILED;\r
+       \r
+       Endpoint_ClearOUT();\r
+       Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);\r
+                 \r
+       Endpoint_Write_Byte(CMD_XPROG);\r
+       Endpoint_Write_Byte(XPRG_CMD_SET_PARAM);\r
+       Endpoint_Write_Byte(ReturnStatus);\r
+       Endpoint_ClearIN();\r
+}\r
+\r
+#endif\r
diff --git a/Projects/AVRISP/Lib/XPROG/PDIProtocol.h b/Projects/AVRISP/Lib/XPROG/PDIProtocol.h
new file mode 100644 (file)
index 0000000..9a10abb
--- /dev/null
@@ -0,0 +1,125 @@
+/*\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 PDIProtocol.c.\r
+ */\r
+\r
+#ifndef _PDI_PROTOCOL_\r
+#define _PDI_PROTOCOL_\r
+\r
+       /* Includes: */\r
+               #include <avr/io.h>\r
+               #include <util/delay.h>\r
+               #include <stdio.h>\r
+               \r
+               #include <LUFA/Drivers/USB/USB.h>\r
+       \r
+               #include "../V2Protocol.h"\r
+               #include "PDITarget.h"\r
+               #include "XMEGANVM.h"\r
+\r
+       /* Preprocessor Checks: */\r
+               #if ((BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1))\r
+                       #undef ENABLE_ISP_PROTOCOL\r
+                       #undef ENABLE_TPI_PROTOCOL\r
+                       \r
+                       #if !defined(ENABLE_PDI_PROTOCOL)\r
+                               #define ENABLE_PDI_PROTOCOL\r
+                       #endif\r
+               #endif\r
+       \r
+       /* Macros: */\r
+               #define XPRG_CMD_ENTER_PROGMODE             0x01\r
+               #define XPRG_CMD_LEAVE_PROGMODE             0x02\r
+               #define XPRG_CMD_ERASE                      0x03\r
+               #define XPRG_CMD_WRITE_MEM                  0x04\r
+               #define XPRG_CMD_READ_MEM                   0x05\r
+               #define XPRG_CMD_CRC                        0x06\r
+               #define XPRG_CMD_SET_PARAM                  0x07\r
+\r
+               #define XPRG_MEM_TYPE_APPL                  1\r
+               #define XPRG_MEM_TYPE_BOOT                  2\r
+               #define XPRG_MEM_TYPE_EEPROM                3\r
+               #define XPRG_MEM_TYPE_FUSE                  4\r
+               #define XPRG_MEM_TYPE_LOCKBITS              5\r
+               #define XPRG_MEM_TYPE_USERSIG               6\r
+               #define XPRG_MEM_TYPE_FACTORY_CALIBRATION   7\r
+\r
+               #define XPRG_ERASE_CHIP                     1\r
+               #define XPRG_ERASE_APP                      2\r
+               #define XPRG_ERASE_BOOT                     3\r
+               #define XPRG_ERASE_EEPROM                   4\r
+               #define XPRG_ERASE_APP_PAGE                 5\r
+               #define XPRG_ERASE_BOOT_PAGE                6\r
+               #define XPRG_ERASE_EEPROM_PAGE              7\r
+               #define XPRG_ERASE_USERSIG                  8\r
+\r
+               #define XPRG_MEM_WRITE_ERASE                0\r
+               #define XPRG_MEM_WRITE_WRITE                1\r
+\r
+               #define XPRG_CRC_APP                        1\r
+               #define XPRG_CRC_BOOT                       2\r
+               #define XPRG_CRC_FLASH                      3\r
+\r
+               #define XPRG_ERR_OK                         0\r
+               #define XPRG_ERR_FAILED                     1\r
+               #define XPRG_ERR_COLLISION                  2\r
+               #define XPRG_ERR_TIMEOUT                    3\r
+\r
+               #define XPRG_PARAM_NVMBASE                  0x01\r
+               #define XPRG_PARAM_EEPPAGESIZE              0x02\r
+               \r
+               #define XPRG_PROTOCOL_PDI                   0x00\r
+               #define XPRG_PROTOCOL_JTAG                  0x01\r
+               #define XPRG_PROTOCOL_TPI                   0x02\r
+               \r
+               #define XPRG_PAGEMODE_WRITE                 (1 << 1)\r
+               #define XPRG_PAGEMODE_ERASE                 (1 << 0)\r
+       \r
+       /* External Variables: */\r
+               extern uint32_t XPROG_Param_NVMBase;\r
+               \r
+       /* Function Prototypes: */\r
+               void PDIProtocol_XPROG_SetMode(void);\r
+               void PDIProtocol_XPROG_Command(void);\r
+               \r
+               #if defined(INCLUDE_FROM_PDIPROTOCOL_C)\r
+                       static void PDIProtocol_EnterXPROGMode(void);\r
+                       static void PDIProtocol_LeaveXPROGMode(void);\r
+                       static void PDIProtocol_SetParam(void);\r
+                       static void PDIProtocol_Erase(void);\r
+                       static void PDIProtocol_WriteMemory(void);\r
+                       static void PDIProtocol_ReadMemory(void);\r
+                       static void PDIProtocol_ReadCRC(void);\r
+               #endif\r
+               \r
+#endif\r
diff --git a/Projects/AVRISP/Lib/XPROG/PDITarget.c b/Projects/AVRISP/Lib/XPROG/PDITarget.c
new file mode 100644 (file)
index 0000000..2c6ffd9
--- /dev/null
@@ -0,0 +1,335 @@
+/*\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
+ *  Target-related functions for the PDI Protocol decoder.\r
+ */\r
+\r
+#define  INCLUDE_FROM_PDITARGET_C\r
+#include "PDITarget.h"\r
+\r
+#if defined(ENABLE_PDI_PROTOCOL) || defined(__DOXYGEN__)\r
+\r
+/** Flag to indicate if the USART is currently in Tx or Rx mode. */\r
+volatile bool               IsSending;\r
+\r
+#if !defined(PDI_VIA_HARDWARE_USART)\r
+/** Software USART raw frame bits for transmission/reception. */\r
+volatile uint16_t           SoftUSART_Data;\r
+\r
+/** Bits remaining to be sent or received via the software USART - set as a GPIOR for speed. */\r
+#define SoftUSART_BitCount  GPIOR2\r
+\r
+\r
+/** ISR to manage the software USART when bit-banged USART mode is selected. */\r
+ISR(TIMER1_COMPA_vect, ISR_BLOCK)\r
+{\r
+       /* Toggle CLOCK pin in a single cycle (see AVR datasheet) */\r
+       BITBANG_PDICLOCK_PIN |= BITBANG_PDICLOCK_MASK;\r
+\r
+       /* If not sending or receiving, just exit */\r
+       if (!(SoftUSART_BitCount))\r
+         return;\r
+\r
+       /* Check to see if we are at a rising or falling edge of the clock */\r
+       if (BITBANG_PDICLOCK_PORT & BITBANG_PDICLOCK_MASK)\r
+       {\r
+               /* If at rising clock edge and we are in send mode, abort */\r
+               if (IsSending)\r
+                 return;\r
+                 \r
+               /* Wait for the start bit when receiving */\r
+               if ((SoftUSART_BitCount == BITS_IN_PDI_FRAME) && (BITBANG_PDIDATA_PIN & BITBANG_PDIDATA_MASK))\r
+                 return;\r
+       \r
+               /* Shift in the bit one less than the frame size in position, so that the start bit will eventually\r
+                * be discarded leaving the data to be byte-aligned for quick access */\r
+               if (BITBANG_PDIDATA_PIN & BITBANG_PDIDATA_MASK)\r
+                 SoftUSART_Data |= (1 << (BITS_IN_PDI_FRAME - 1));\r
+\r
+               SoftUSART_Data >>= 1;\r
+               SoftUSART_BitCount--;\r
+       }\r
+       else\r
+       {\r
+               /* If at falling clock edge and we are in receive mode, abort */\r
+               if (!IsSending)\r
+                 return;\r
+\r
+               /* Set the data line to the next bit value */\r
+               if (SoftUSART_Data & 0x01)\r
+                 BITBANG_PDIDATA_PORT |=  BITBANG_PDIDATA_MASK;\r
+               else\r
+                 BITBANG_PDIDATA_PORT &= ~BITBANG_PDIDATA_MASK;                  \r
+\r
+               SoftUSART_Data >>= 1;\r
+               SoftUSART_BitCount--;\r
+       }\r
+}\r
+#endif\r
+\r
+/** Enables the target's PDI interface, holding the target in reset until PDI mode is exited. */\r
+void PDITarget_EnableTargetPDI(void)\r
+{\r
+#if defined(PDI_VIA_HARDWARE_USART)\r
+       /* Set Tx and XCK as outputs, Rx as input */\r
+       DDRD |=  (1 << 5) | (1 << 3);\r
+       DDRD &= ~(1 << 2);\r
+       \r
+       /* Set DATA line high for at least 90ns to disable /RESET functionality */\r
+       PORTD |= (1 << 3);\r
+       asm volatile ("NOP"::);\r
+       asm volatile ("NOP"::);\r
+       \r
+       /* Set up the synchronous USART for XMEGA communications - \r
+          8 data bits, even parity, 2 stop bits */\r
+       UBRR1  = (F_CPU / 1000000UL);\r
+       UCSR1B = (1 << TXEN1);\r
+       UCSR1C = (1 << UMSEL10) | (1 << UPM11) | (1 << USBS1) | (1 << UCSZ11) | (1 << UCSZ10) | (1 << UCPOL1);\r
+\r
+       /* Send two BREAKs of 12 bits each to enable PDI interface (need at least 16 idle bits) */\r
+       PDITarget_SendBreak();\r
+       PDITarget_SendBreak();\r
+#else\r
+       /* Set DATA and CLOCK lines to outputs */\r
+       BITBANG_PDIDATA_DDR  |= BITBANG_PDIDATA_MASK;\r
+       BITBANG_PDICLOCK_DDR |= BITBANG_PDICLOCK_MASK;\r
+       \r
+       /* Set DATA line high for at least 90ns to disable /RESET functionality */\r
+       BITBANG_PDIDATA_PORT |= BITBANG_PDIDATA_MASK;\r
+       asm volatile ("NOP"::);\r
+       asm volatile ("NOP"::);\r
+\r
+       /* Fire timer compare ISR every 100 cycles to manage the software USART */\r
+       OCR1A   = 80;\r
+       TCCR1B  = (1 << WGM12) | (1 << CS10);\r
+       TIMSK1  = (1 << OCIE1A);\r
+       \r
+       /* Send two BREAKs of 12 bits each to enable TPI interface (need at least 16 idle bits) */\r
+       PDITarget_SendBreak();\r
+       PDITarget_SendBreak();\r
+#endif\r
+}\r
+\r
+/** Disables the target's PDI interface, exits programming mode and starts the target's application. */\r
+void PDITarget_DisableTargetPDI(void)\r
+{\r
+#if defined(PDI_VIA_HARDWARE_USART)\r
+       /* Turn off receiver and transmitter of the USART, clear settings */\r
+       UCSR1A |= (1 << TXC1) | (1 << RXC1);\r
+       UCSR1B  = 0;\r
+       UCSR1C  = 0;\r
+\r
+       /* Set all USART lines as input, tristate */\r
+       DDRD  &= ~((1 << 5) | (1 << 3));\r
+       PORTD &= ~((1 << 5) | (1 << 3) | (1 << 2));\r
+#else\r
+       /* Set DATA and CLOCK lines to inputs */\r
+       BITBANG_PDIDATA_DDR   &= ~BITBANG_PDIDATA_MASK;\r
+       BITBANG_PDICLOCK_DDR  &= ~BITBANG_PDICLOCK_MASK;\r
+       \r
+       /* Tristate DATA and CLOCK lines */\r
+       BITBANG_PDIDATA_PORT  &= ~BITBANG_PDIDATA_MASK;\r
+       BITBANG_PDICLOCK_PORT &= ~BITBANG_PDICLOCK_MASK;\r
+#endif\r
+}\r
+\r
+/** Sends a byte via the USART.\r
+ *\r
+ *  \param[in] Byte  Byte to send through the USART\r
+ */\r
+void PDITarget_SendByte(const uint8_t Byte)\r
+{\r
+#if defined(PDI_VIA_HARDWARE_USART)\r
+       /* Switch to Tx mode if currently in Rx mode */\r
+       if (!(IsSending))\r
+       {\r
+               PORTD  |=  (1 << 3);\r
+               DDRD   |=  (1 << 3);\r
+\r
+               UCSR1B |=  (1 << TXEN1);\r
+               UCSR1B &= ~(1 << RXEN1);\r
+               \r
+               IsSending = true;\r
+       }\r
+       \r
+       /* Wait until there is space in the hardware Tx buffer before writing */\r
+       while (!(UCSR1A & (1 << UDRE1)));\r
+       UCSR1A |= (1 << TXC1);\r
+       UDR1    = Byte;\r
+#else\r
+       /* Switch to Tx mode if currently in Rx mode */\r
+       if (!(IsSending))\r
+       {\r
+               BITBANG_PDIDATA_PORT |= BITBANG_PDIDATA_MASK;\r
+               BITBANG_PDIDATA_DDR  |= BITBANG_PDIDATA_MASK;\r
+\r
+               IsSending = true;\r
+       }\r
+\r
+       /* Calculate the new USART frame data here while while we wait for a previous byte (if any) to finish sending */\r
+       uint16_t NewUSARTData = ((1 << 11) | (1 << 10) | (0 << 9) | ((uint16_t)Byte << 1) | (0 << 0));\r
+\r
+       /* Compute Even parity - while a bit is still set, chop off lowest bit and toggle parity bit */\r
+       uint8_t ParityData    = Byte;\r
+       while (ParityData)\r
+       {\r
+               NewUSARTData ^= (1 << 9);\r
+               ParityData   &= (ParityData - 1);\r
+       }\r
+\r
+       /* Wait until transmitter is idle before writing new data */\r
+       while (SoftUSART_BitCount);\r
+\r
+       /* Data shifted out LSB first, START DATA PARITY STOP STOP */\r
+       SoftUSART_Data     = NewUSARTData;\r
+       SoftUSART_BitCount = BITS_IN_PDI_FRAME;\r
+#endif\r
+}\r
+\r
+/** Receives a byte via the software USART, blocking until data is received.\r
+ *\r
+ *  \return Received byte from the USART\r
+ */\r
+uint8_t PDITarget_ReceiveByte(void)\r
+{\r
+#if defined(PDI_VIA_HARDWARE_USART)\r
+       /* Switch to Rx mode if currently in Tx mode */\r
+       if (IsSending)\r
+       {\r
+               while (!(UCSR1A & (1 << TXC1)));\r
+               UCSR1A |=  (1 << TXC1);\r
+\r
+               UCSR1B &= ~(1 << TXEN1);\r
+               UCSR1B |=  (1 << RXEN1);\r
+\r
+               DDRD   &= ~(1 << 3);\r
+               PORTD  &= ~(1 << 3);\r
+               \r
+               IsSending = false;\r
+       }\r
+\r
+       /* Wait until a byte has been received before reading */\r
+       while (!(UCSR1A & (1 << RXC1)));\r
+       return UDR1;\r
+#else\r
+       /* Switch to Rx mode if currently in Tx mode */\r
+       if (IsSending)\r
+       {\r
+               while (SoftUSART_BitCount);\r
+\r
+               BITBANG_PDIDATA_DDR  &= ~BITBANG_PDIDATA_MASK;\r
+               BITBANG_PDIDATA_PORT &= ~BITBANG_PDIDATA_MASK;\r
+\r
+               IsSending = false;\r
+       }\r
+\r
+       /* Wait until a byte has been received before reading */\r
+       SoftUSART_BitCount = BITS_IN_PDI_FRAME;\r
+       while (SoftUSART_BitCount);\r
+       \r
+       /* Throw away the parity and stop bits to leave only the data (start bit is already discarded) */\r
+       return (uint8_t)SoftUSART_Data;\r
+#endif\r
+}\r
+\r
+/** Sends a BREAK via the USART to the attached target, consisting of a full frame of idle bits. */\r
+void PDITarget_SendBreak(void)\r
+{\r
+#if defined(PDI_VIA_HARDWARE_USART)\r
+       /* Switch to Tx mode if currently in Rx mode */\r
+       if (!(IsSending))\r
+       {\r
+               PORTD  |=  (1 << 3);\r
+               DDRD   |=  (1 << 3);\r
+\r
+               UCSR1B &= ~(1 << RXEN1);\r
+               UCSR1B |=  (1 << TXEN1);\r
+               \r
+               IsSending = true;\r
+       }\r
+\r
+       /* Need to do nothing for a full frame to send a BREAK */\r
+       for (uint8_t i = 0; i < BITS_IN_PDI_FRAME; i++)\r
+       {\r
+               /* Wait for a full cycle of the clock */\r
+               while (PIND & (1 << 5));\r
+               while (!(PIND & (1 << 5)));\r
+       }\r
+#else\r
+       /* Switch to Tx mode if currently in Rx mode */\r
+       if (!(IsSending))\r
+       {\r
+               BITBANG_PDIDATA_PORT |= BITBANG_PDIDATA_MASK;\r
+               BITBANG_PDIDATA_DDR  |= BITBANG_PDIDATA_MASK;\r
+\r
+               IsSending = true;\r
+       }\r
+       \r
+       while (SoftUSART_BitCount);\r
+\r
+       /* Need to do nothing for a full frame to send a BREAK */\r
+       SoftUSART_Data     = 0x0FFF;\r
+       SoftUSART_BitCount = BITS_IN_PDI_FRAME;\r
+#endif\r
+}\r
+\r
+/** Busy-waits while the NVM controller is busy performing a NVM operation, such as a FLASH page read or CRC\r
+ *  calculation.\r
+ *\r
+ *  \return Boolean true if the NVM controller became ready within the timeout period, false otherwise\r
+ */\r
+bool PDITarget_WaitWhileNVMBusBusy(void)\r
+{\r
+       TCNT0 = 0;\r
+       TIFR0 = (1 << OCF1A);\r
+                       \r
+       uint8_t TimeoutMS = PDI_NVM_TIMEOUT_MS;\r
+       \r
+       /* Poll the STATUS register to check to see if NVM access has been enabled */\r
+       while (TimeoutMS)\r
+       {\r
+               /* Send the LDCS command to read the PDI STATUS register to see the NVM bus is active */\r
+               PDITarget_SendByte(PDI_CMD_LDCS | PDI_STATUS_REG);\r
+               if (PDITarget_ReceiveByte() & PDI_STATUS_NVM)\r
+                 return true;\r
+\r
+               if (TIFR0 & (1 << OCF1A))\r
+               {\r
+                       TIFR0 = (1 << OCF1A);\r
+                       TimeoutMS--;\r
+               }\r
+       }\r
+       \r
+       return false;\r
+}\r
+\r
+#endif\r
diff --git a/Projects/AVRISP/Lib/XPROG/PDITarget.h b/Projects/AVRISP/Lib/XPROG/PDITarget.h
new file mode 100644 (file)
index 0000000..cf7780c
--- /dev/null
@@ -0,0 +1,112 @@
+/*\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 PDITarget.c.\r
+ */\r
+\r
+#ifndef _PDI_TARGET_\r
+#define _PDI_TARGET_\r
+\r
+       /* Includes: */\r
+               #include <avr/io.h>\r
+               #include <avr/interrupt.h>\r
+               #include <stdbool.h>\r
+               \r
+               #include <LUFA/Common/Common.h>\r
+       \r
+       /* Preprocessor Checks: */\r
+               #if ((BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1))\r
+                       #undef ENABLE_ISP_PROTOCOL\r
+                       #undef ENABLE_TPI_PROTOCOL\r
+                       \r
+                       #if !defined(ENABLE_PDI_PROTOCOL)\r
+                               #define ENABLE_PDI_PROTOCOL\r
+                       #endif\r
+               #endif\r
+\r
+       /* Defines: */\r
+               #if ((BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1))\r
+                       #define PDI_VIA_HARDWARE_USART\r
+               #else\r
+                       #define BITBANG_PDIDATA_PORT     PORTB\r
+                       #define BITBANG_PDIDATA_DDR      DDRB\r
+                       #define BITBANG_PDIDATA_PIN      PINB\r
+                       #define BITBANG_PDIDATA_MASK     (1 << 3)\r
+                       \r
+                       #define BITBANG_PDICLOCK_PORT    RESET_LINE_PORT\r
+                       #define BITBANG_PDICLOCK_DDR     RESET_LINE_DDR\r
+                       #define BITBANG_PDICLOCK_PIN     RESET_LINE_PIN\r
+                       #define BITBANG_PDICLOCK_MASK    RESET_LINE_MASK\r
+               #endif\r
+               \r
+               /** Total number of bits in a single USART frame */\r
+               #define BITS_IN_PDI_FRAME        12\r
+               \r
+               /** Timeout in milliseconds of a PDI busy-wait command */\r
+               #define PDI_NVM_TIMEOUT_MS       100\r
+               \r
+               #define PDI_CMD_LDS              0x00\r
+               #define PDI_CMD_LD               0x20\r
+               #define PDI_CMD_STS              0x40\r
+               #define PDI_CMD_ST               0x60\r
+               #define PDI_CMD_LDCS             0x80\r
+               #define PDI_CMD_REPEAT           0xA0\r
+               #define PDI_CMD_STCS             0xC0\r
+               #define PDI_CMD_KEY              0xE0\r
+               \r
+               #define PDI_STATUS_REG           0\r
+               #define PDI_RESET_REG            1\r
+               #define PDI_CTRL_REG             2\r
+               \r
+               #define PDI_STATUS_NVM           (1 << 1)\r
+               #define PDI_RESET_KEY            0x59\r
+\r
+               #define PDI_NVMENABLE_KEY        (uint8_t[]){0x12, 0x89, 0xAB, 0x45, 0xCD, 0xD8, 0x88, 0xFF}\r
+\r
+               #define PDI_DATSIZE_1BYTE        0\r
+               #define PDI_DATSIZE_2BYTES       1\r
+               #define PDI_DATSIZE_3BYTES       2\r
+               #define PDI_DATSIZE_4BYTES       3\r
+               \r
+               #define PDI_POINTER_INDIRECT     0\r
+               #define PDI_POINTER_INDIRECT_PI  1\r
+               #define PDI_POINTER_DIRECT       2\r
+                               \r
+       /* Function Prototypes: */\r
+               void    PDITarget_EnableTargetPDI(void);\r
+               void    PDITarget_DisableTargetPDI(void);\r
+               void    PDITarget_SendByte(const uint8_t Byte);\r
+               uint8_t PDITarget_ReceiveByte(void);\r
+               void    PDITarget_SendBreak(void);\r
+               bool    PDITarget_WaitWhileNVMBusBusy(void);\r
+\r
+#endif\r
diff --git a/Projects/AVRISP/Lib/XPROG/TINYNVM.c b/Projects/AVRISP/Lib/XPROG/TINYNVM.c
new file mode 100644 (file)
index 0000000..206ea39
--- /dev/null
@@ -0,0 +1,43 @@
+/*\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
+ *  Target-related functions for the TINY target's NVM module.\r
+ */\r
+\r
+#define  INCLUDE_FROM_TINYNVM_C\r
+#include "TINYNVM.h"\r
+\r
+#if defined(ENABLE_TPI_PROTOCOL) || defined(__DOXYGEN__)\r
+\r
+// TODO\r
+\r
+#endif\r
diff --git a/Projects/AVRISP/Lib/XPROG/TINYNVM.h b/Projects/AVRISP/Lib/XPROG/TINYNVM.h
new file mode 100644 (file)
index 0000000..eca3c98
--- /dev/null
@@ -0,0 +1,62 @@
+/*\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 TINYNVM.c.\r
+ */\r
+\r
+#ifndef _TINY_NVM_\r
+#define _TINY_NVM_\r
+\r
+       /* Includes: */\r
+               #include <avr/io.h>\r
+               #include <avr/interrupt.h>\r
+               #include <stdbool.h>\r
+               \r
+               #include <LUFA/Common/Common.h>\r
+               \r
+               #include "TPIProtocol.h"\r
+               #include "TPITarget.h"\r
+       \r
+       /* Preprocessor Checks: */\r
+               #if ((BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1))\r
+                       #undef ENABLE_ISP_PROTOCOL\r
+                       #undef ENABLE_TPI_PROTOCOL\r
+                       \r
+                       #if !defined(ENABLE_PDI_PROTOCOL)\r
+                               #define ENABLE_PDI_PROTOCOL\r
+                       #endif\r
+               #endif\r
+\r
+       /* Defines: */\r
+               #define TINY_NVM_BUSY_TIMEOUT_MS       100\r
+\r
+#endif\r
diff --git a/Projects/AVRISP/Lib/XPROG/TPIProtocol.c b/Projects/AVRISP/Lib/XPROG/TPIProtocol.c
new file mode 100644 (file)
index 0000000..a95e94b
--- /dev/null
@@ -0,0 +1,44 @@
+/*\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
+ *  TPI Protocol handler, to process V2 Protocol wrapped TPI commands used in Atmel programmer devices.\r
+ */\r
+\r
+#define  INCLUDE_FROM_TPIPROTOCOL_C\r
+#include "TPIProtocol.h"\r
+\r
+#if defined(ENABLE_TPI_PROTOCOL) || defined(__DOXYGEN__)\r
+#warning TPI Programming Protocol is currently incomplete and is not suitable for general use.\r
+\r
+// TODO\r
+\r
+#endif\r
diff --git a/Projects/AVRISP/Lib/XPROG/TPIProtocol.h b/Projects/AVRISP/Lib/XPROG/TPIProtocol.h
new file mode 100644 (file)
index 0000000..11894a3
--- /dev/null
@@ -0,0 +1,59 @@
+/*\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 TPIProtocol.c.\r
+ */\r
+\r
+#ifndef _TPI_PROTOCOL_\r
+#define _TPI_PROTOCOL_\r
+\r
+       /* Includes: */\r
+               #include <avr/io.h>\r
+               #include <util/delay.h>\r
+               #include <stdio.h>\r
+       
+               #include <LUFA/Drivers/USB/USB.h>\r
+\r
+               #include "TPITarget.h"\r
+               #include "TINYNVM.h"\r
+\r
+       /* Preprocessor Checks: */\r
+               #if ((BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1))\r
+                       #undef ENABLE_ISP_PROTOCOL\r
+                       #undef ENABLE_TPI_PROTOCOL\r
+                       \r
+                       #if !defined(ENABLE_PDI_PROTOCOL)\r
+                               #define ENABLE_PDI_PROTOCOL\r
+                       #endif\r
+               #endif\r
+               \r
+#endif\r
diff --git a/Projects/AVRISP/Lib/XPROG/TPITarget.c b/Projects/AVRISP/Lib/XPROG/TPITarget.c
new file mode 100644 (file)
index 0000000..f7943bf
--- /dev/null
@@ -0,0 +1,338 @@
+/*\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
+ *  Target-related functions for the TPI Protocol decoder.\r
+ */\r
+\r
+#define  INCLUDE_FROM_TPITARGET_C\r
+#include "TPITarget.h"\r
+\r
+#if defined(ENABLE_TPI_PROTOCOL) || defined(__DOXYGEN__)\r
+\r
+/** Flag to indicate if the USART is currently in Tx or Rx mode. */\r
+volatile bool               IsSending;\r
+\r
+#if !defined(TPI_VIA_HARDWARE_USART)\r
+/** Software USART raw frame bits for transmission/reception. */\r
+volatile uint16_t           SoftUSART_Data;\r
+\r
+/** Bits remaining to be sent or received via the software USART - set as a GPIOR for speed. */\r
+#define SoftUSART_BitCount  GPIOR2\r
+\r
+\r
+/** ISR to manage the software USART when bit-banged USART mode is selected. */\r
+ISR(TIMER1_CAPT_vect, ISR_BLOCK)\r
+{\r
+       /* Toggle CLOCK pin in a single cycle (see AVR datasheet) */\r
+       BITBANG_TPICLOCK_PIN |= BITBANG_TPICLOCK_MASK;\r
+\r
+       /* If not sending or receiving, just exit */\r
+       if (!(SoftUSART_BitCount))\r
+         return;\r
+\r
+       /* Check to see if we are at a rising or falling edge of the clock */\r
+       if (BITBANG_TPICLOCK_PORT & BITBANG_TPICLOCK_MASK)\r
+       {\r
+               /* If at rising clock edge and we are in send mode, abort */\r
+               if (IsSending)\r
+                 return;\r
+                 \r
+               /* Wait for the start bit when receiving */\r
+               if ((SoftUSART_BitCount == BITS_IN_TPI_FRAME) && (BITBANG_TPIDATA_PIN & BITBANG_TPIDATA_MASK))\r
+                 return;\r
+       \r
+               /* Shift in the bit one less than the frame size in position, so that the start bit will eventually\r
+                * be discarded leaving the data to be byte-aligned for quick access */\r
+               if (BITBANG_TPIDATA_PIN & BITBANG_TPIDATA_MASK)\r
+                 SoftUSART_Data |= (1 << (BITS_IN_TPI_FRAME - 1));\r
+\r
+               SoftUSART_Data >>= 1;\r
+               SoftUSART_BitCount--;\r
+       }\r
+       else\r
+       {\r
+               /* If at falling clock edge and we are in receive mode, abort */\r
+               if (!IsSending)\r
+                 return;\r
+\r
+               /* Set the data line to the next bit value */\r
+               if (SoftUSART_Data & 0x01)\r
+                 BITBANG_TPIDATA_PORT |=  BITBANG_TPIDATA_MASK;\r
+               else\r
+                 BITBANG_TPIDATA_PORT &= ~BITBANG_TPIDATA_MASK;                  \r
+\r
+               SoftUSART_Data >>= 1;\r
+               SoftUSART_BitCount--;\r
+       }\r
+}\r
+#endif\r
+\r
+/** Enables the target's TPI interface, holding the target in reset until TPI mode is exited. */\r
+void TPITarget_EnableTargetTPI(void)\r
+{\r
+       /* Set /RESET line low for at least 90ns to enable TPI functionality */\r
+       RESET_LINE_DDR  |= RESET_LINE_MASK;\r
+       RESET_LINE_PORT &= ~RESET_LINE_MASK;\r
+       asm volatile ("NOP"::);\r
+       asm volatile ("NOP"::);\r
+\r
+#if defined(TPI_VIA_HARDWARE_USART)\r
+       /* Set Tx and XCK as outputs, Rx as input */\r
+       DDRD |=  (1 << 5) | (1 << 3);\r
+       DDRD &= ~(1 << 2);\r
+               \r
+       /* Set up the synchronous USART for XMEGA communications - \r
+          8 data bits, even parity, 2 stop bits */\r
+       UBRR1  = (F_CPU / 1000000UL);\r
+       UCSR1B = (1 << TXEN1);\r
+       UCSR1C = (1 << UMSEL10) | (1 << UPM11) | (1 << USBS1) | (1 << UCSZ11) | (1 << UCSZ10) | (1 << UCPOL1);\r
+\r
+       /* Send two BREAKs of 12 bits each to enable TPI interface (need at least 16 idle bits) */\r
+       TPITarget_SendBreak();\r
+       TPITarget_SendBreak();\r
+#else\r
+       /* Set DATA and CLOCK lines to outputs */\r
+       BITBANG_TPIDATA_DDR  |= BITBANG_TPIDATA_MASK;\r
+       BITBANG_TPICLOCK_DDR |= BITBANG_TPICLOCK_MASK;\r
+       \r
+       /* Set DATA line high for idle state */\r
+       BITBANG_TPIDATA_PORT |= BITBANG_TPIDATA_MASK;\r
+\r
+       /* Fire timer capture ISR every 100 cycles to manage the software USART */\r
+       OCR1A   = 80;\r
+       TCCR1B  = (1 << WGM13) | (1 << WGM12) | (1 << CS10);\r
+       TIMSK1  = (1 << ICIE1);\r
+       \r
+       /* Send two BREAKs of 12 bits each to enable TPI interface (need at least 16 idle bits) */\r
+       TPITarget_SendBreak();\r
+       TPITarget_SendBreak();\r
+#endif\r
+}\r
+\r
+/** Disables the target's TPI interface, exits programming mode and starts the target's application. */\r
+void TPITarget_DisableTargetTPI(void)\r
+{\r
+#if defined(TPI_VIA_HARDWARE_USART)\r
+       /* Turn off receiver and transmitter of the USART, clear settings */\r
+       UCSR1A |= (1 << TXC1) | (1 << RXC1);\r
+       UCSR1B  = 0;\r
+       UCSR1C  = 0;\r
+\r
+       /* Set all USART lines as input, tristate */\r
+       DDRD  &= ~((1 << 5) | (1 << 3));\r
+       PORTD &= ~((1 << 5) | (1 << 3) | (1 << 2));\r
+#else\r
+       /* Set DATA and CLOCK lines to inputs */\r
+       BITBANG_TPIDATA_DDR   &= ~BITBANG_TPIDATA_MASK;\r
+       BITBANG_TPICLOCK_DDR  &= ~BITBANG_TPICLOCK_MASK;\r
+       \r
+       /* Tristate DATA and CLOCK lines */\r
+       BITBANG_TPIDATA_PORT  &= ~BITBANG_TPIDATA_MASK;\r
+       BITBANG_TPICLOCK_PORT &= ~BITBANG_TPICLOCK_MASK;\r
+#endif\r
+\r
+       /* Tristate target /RESET line */\r
+       RESET_LINE_DDR  &= ~RESET_LINE_MASK;\r
+       RESET_LINE_PORT &= ~RESET_LINE_MASK;\r
+}\r
+\r
+/** Sends a byte via the USART.\r
+ *\r
+ *  \param[in] Byte  Byte to send through the USART\r
+ */\r
+void TPITarget_SendByte(const uint8_t Byte)\r
+{\r
+#if defined(TPI_VIA_HARDWARE_USART)\r
+       /* Switch to Tx mode if currently in Rx mode */\r
+       if (!(IsSending))\r
+       {\r
+               PORTD  |=  (1 << 3);\r
+               DDRD   |=  (1 << 3);\r
+\r
+               UCSR1B |=  (1 << TXEN1);\r
+               UCSR1B &= ~(1 << RXEN1);\r
+               \r
+               IsSending = true;\r
+       }\r
+       \r
+       /* Wait until there is space in the hardware Tx buffer before writing */\r
+       while (!(UCSR1A & (1 << UDRE1)));\r
+       UCSR1A |= (1 << TXC1);\r
+       UDR1    = Byte;\r
+#else\r
+       /* Switch to Tx mode if currently in Rx mode */\r
+       if (!(IsSending))\r
+       {\r
+               BITBANG_TPIDATA_PORT |= BITBANG_TPIDATA_MASK;\r
+               BITBANG_TPIDATA_DDR  |= BITBANG_TPIDATA_MASK;\r
+\r
+               IsSending = true;\r
+       }\r
+\r
+       /* Calculate the new USART frame data here while while we wait for a previous byte (if any) to finish sending */\r
+       uint16_t NewUSARTData = ((1 << 11) | (1 << 10) | (0 << 9) | ((uint16_t)Byte << 1) | (0 << 0));\r
+\r
+       /* Compute Even parity - while a bit is still set, chop off lowest bit and toggle parity bit */\r
+       uint8_t ParityData    = Byte;\r
+       while (ParityData)\r
+       {\r
+               NewUSARTData ^= (1 << 9);\r
+               ParityData   &= (ParityData - 1);\r
+       }\r
+\r
+       /* Wait until transmitter is idle before writing new data */\r
+       while (SoftUSART_BitCount);\r
+\r
+       /* Data shifted out LSB first, START DATA PARITY STOP STOP */\r
+       SoftUSART_Data     = NewUSARTData;\r
+       SoftUSART_BitCount = BITS_IN_TPI_FRAME;\r
+#endif\r
+}\r
+\r
+/** Receives a byte via the software USART, blocking until data is received.\r
+ *\r
+ *  \return Received byte from the USART\r
+ */\r
+uint8_t TPITarget_ReceiveByte(void)\r
+{\r
+#if defined(TPI_VIA_HARDWARE_USART)\r
+       /* Switch to Rx mode if currently in Tx mode */\r
+       if (IsSending)\r
+       {\r
+               while (!(UCSR1A & (1 << TXC1)));\r
+               UCSR1A |=  (1 << TXC1);\r
+\r
+               UCSR1B &= ~(1 << TXEN1);\r
+               UCSR1B |=  (1 << RXEN1);\r
+\r
+               DDRD   &= ~(1 << 3);\r
+               PORTD  &= ~(1 << 3);\r
+               \r
+               IsSending = false;\r
+       }\r
+\r
+       /* Wait until a byte has been received before reading */\r
+       while (!(UCSR1A & (1 << RXC1)));\r
+       return UDR1;\r
+#else\r
+       /* Switch to Rx mode if currently in Tx mode */\r
+       if (IsSending)\r
+       {\r
+               while (SoftUSART_BitCount);\r
+\r
+               BITBANG_TPIDATA_DDR  &= ~BITBANG_TPIDATA_MASK;\r
+               BITBANG_TPIDATA_PORT &= ~BITBANG_TPIDATA_MASK;\r
+\r
+               IsSending = false;\r
+       }\r
+\r
+       /* Wait until a byte has been received before reading */\r
+       SoftUSART_BitCount = BITS_IN_TPI_FRAME;\r
+       while (SoftUSART_BitCount);\r
+       \r
+       /* Throw away the parity and stop bits to leave only the data (start bit is already discarded) */\r
+       return (uint8_t)SoftUSART_Data;\r
+#endif\r
+}\r
+\r
+/** Sends a BREAK via the USART to the attached target, consisting of a full frame of idle bits. */\r
+void TPITarget_SendBreak(void)\r
+{\r
+#if defined(TPI_VIA_HARDWARE_USART)\r
+       /* Switch to Tx mode if currently in Rx mode */\r
+       if (!(IsSending))\r
+       {\r
+               PORTD  |=  (1 << 3);\r
+               DDRD   |=  (1 << 3);\r
+\r
+               UCSR1B &= ~(1 << RXEN1);\r
+               UCSR1B |=  (1 << TXEN1);\r
+               \r
+               IsSending = true;\r
+       }\r
+\r
+       /* Need to do nothing for a full frame to send a BREAK */\r
+       for (uint8_t i = 0; i < BITS_IN_TPI_FRAME; i++)\r
+       {\r
+               /* Wait for a full cycle of the clock */\r
+               while (PIND & (1 << 5));\r
+               while (!(PIND & (1 << 5)));\r
+       }\r
+#else\r
+       /* Switch to Tx mode if currently in Rx mode */\r
+       if (!(IsSending))\r
+       {\r
+               BITBANG_TPIDATA_PORT |= BITBANG_TPIDATA_MASK;\r
+               BITBANG_TPIDATA_DDR  |= BITBANG_TPIDATA_MASK;\r
+\r
+               IsSending = true;\r
+       }\r
+       \r
+       while (SoftUSART_BitCount);\r
+\r
+       /* Need to do nothing for a full frame to send a BREAK */\r
+       SoftUSART_Data     = 0x0FFF;\r
+       SoftUSART_BitCount = BITS_IN_TPI_FRAME;\r
+#endif\r
+}\r
+\r
+/** Busy-waits while the NVM controller is busy performing a NVM operation, such as a FLASH page read or CRC\r
+ *  calculation.\r
+ *\r
+ *  \return Boolean true if the NVM controller became ready within the timeout period, false otherwise\r
+ */\r
+bool TPITarget_WaitWhileNVMBusBusy(void)\r
+{\r
+       TCNT0 = 0;\r
+       TIFR0 = (1 << OCF1A);\r
+                       \r
+       uint8_t TimeoutMS = TPI_NVM_TIMEOUT_MS;\r
+       \r
+       /* Poll the STATUS register to check to see if NVM access has been enabled */\r
+       while (TimeoutMS)\r
+       {\r
+               /* Send the SLDCS command to read the TPI STATUS register to see the NVM bus is active */\r
+               TPITarget_SendByte(TPI_CMD_SLDCS | TPI_STATUS_REG);\r
+               if (TPITarget_ReceiveByte() & TPI_STATUS_NVM)\r
+                 return true;\r
+\r
+               if (TIFR0 & (1 << OCF1A))\r
+               {\r
+                       TIFR0 = (1 << OCF1A);\r
+                       TimeoutMS--;\r
+               }\r
+       }\r
+       \r
+       return false;\r
+}\r
+\r
+#endif\r
diff --git a/Projects/AVRISP/Lib/XPROG/TPITarget.h b/Projects/AVRISP/Lib/XPROG/TPITarget.h
new file mode 100644 (file)
index 0000000..596bdce
--- /dev/null
@@ -0,0 +1,101 @@
+/*\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 TPITarget.c.\r
+ */\r
+\r
+#ifndef _TPI_TARGET_\r
+#define _TPI_TARGET_\r
+\r
+       /* Includes: */\r
+               #include <avr/io.h>\r
+               #include <avr/interrupt.h>\r
+               #include <stdbool.h>\r
+               \r
+               #include <LUFA/Common/Common.h>\r
+       \r
+       /* Preprocessor Checks: */\r
+               #if ((BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1))\r
+                       #undef ENABLE_ISP_PROTOCOL\r
+                       #undef ENABLE_TPI_PROTOCOL\r
+                       \r
+                       #if !defined(ENABLE_PDI_PROTOCOL)\r
+                               #define ENABLE_PDI_PROTOCOL\r
+                       #endif\r
+               #endif\r
+\r
+       /* Defines: */\r
+               #define BITBANG_TPIDATA_PORT     PORTB\r
+               #define BITBANG_TPIDATA_DDR      DDRB\r
+               #define BITBANG_TPIDATA_PIN      PINB\r
+               #define BITBANG_TPIDATA_MASK     (1 << 3)\r
+                       \r
+               #define BITBANG_TPICLOCK_PORT    PORTB\r
+               #define BITBANG_TPICLOCK_DDR     DDRB\r
+               #define BITBANG_TPICLOCK_PIN     PINB\r
+               #define BITBANG_TPICLOCK_MASK    (1 << 1)\r
+               \r
+               /** Total number of bits in a single USART frame */\r
+               #define BITS_IN_TPI_FRAME        12\r
+               \r
+               /** Timeout in milliseconds of a PDI busy-wait command */\r
+               #define TPI_NVM_TIMEOUT_MS       100\r
+\r
+               #define TPI_CMD_SLD              0x20\r
+               #define TPI_CMD_SST              0x60\r
+               #define TPI_CMD_SSTPR            0x68\r
+               #define TPI_CMD_SIN              0x10\r
+               #define TPI_CMD_SOUT             0x90\r
+               #define TPI_CMD_SLDCS            0x80\r
+               #define TPI_CMD_SSTCS            0xC0\r
+               #define TPI_CMD_SKEY             0xE0\r
+\r
+               #define TPI_STATUS_REG           0x00\r
+               #define TPI_CTRL_REG             0x02\r
+               #define TPI_ID_REG               0x0F\r
+               \r
+               #define TPI_STATUS_NVM           (1 << 1)\r
+\r
+               #define TPI_NVMENABLE_KEY        (uint8_t[]){0x12, 0x89, 0xAB, 0x45, 0xCD, 0xD8, 0x88, 0xFF}\r
+\r
+               #define TPI_POINTER_INDIRECT     0\r
+               #define TPI_POINTER_INDIRECT_PI  (1 << 2)\r
+                               \r
+       /* Function Prototypes: */\r
+               void    TPITarget_EnableTargetTPI(void);\r
+               void    TPITarget_DisableTargetTPI(void);\r
+               void    TPITarget_SendByte(const uint8_t Byte);\r
+               uint8_t TPITarget_ReceiveByte(void);\r
+               void    TPITarget_SendBreak(void);\r
+               bool    TPITarget_WaitWhileNVMBusBusy(void);\r
+\r
+#endif\r
diff --git a/Projects/AVRISP/Lib/XPROG/XMEGANVM.c b/Projects/AVRISP/Lib/XPROG/XMEGANVM.c
new file mode 100644 (file)
index 0000000..ed8719c
--- /dev/null
@@ -0,0 +1,332 @@
+/*\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
+ *  Target-related functions for the XMEGA target's NVM module.\r
+ */\r
+\r
+#define  INCLUDE_FROM_XMEGA_NVM_C\r
+#include "XMEGANVM.h"\r
+\r
+#if defined(ENABLE_PDI_PROTOCOL) || defined(__DOXYGEN__)\r
+\r
+/** Sends the given NVM register address to the target.\r
+ *\r
+ *  \param[in] Register  NVM register whose absolute address is to be sent\r
+ */\r
+void XMEGANVM_SendNVMRegAddress(const uint8_t Register)\r
+{\r
+       /* Determine the absolute register address from the NVM base memory address and the NVM register address */\r
+       uint32_t Address = XPROG_Param_NVMBase | Register;\r
+\r
+       /* Send the calculated 32-bit address to the target, LSB first */\r
+       XMEGANVM_SendAddress(Address);\r
+}\r
+\r
+/** Sends the given 32-bit absolute address to the target.\r
+ *\r
+ *  \param[in] AbsoluteAddress  Absolute address to send to the target\r
+ */\r
+void XMEGANVM_SendAddress(const uint32_t AbsoluteAddress)\r
+{\r
+       /* Send the given 32-bit address to the target, LSB first */\r
+       PDITarget_SendByte(AbsoluteAddress &  0xFF);\r
+       PDITarget_SendByte(AbsoluteAddress >> 8);\r
+       PDITarget_SendByte(AbsoluteAddress >> 16);\r
+       PDITarget_SendByte(AbsoluteAddress >> 24);\r
+}\r
+\r
+/** Waits while the target's NVM controller is busy performing an operation, exiting if the\r
+ *  timeout period expires.\r
+ *\r
+ *  \return Boolean true if the NVM controller became ready within the timeout period, false otherwise\r
+ */\r
+bool XMEGANVM_WaitWhileNVMControllerBusy(void)\r
+{\r
+       TCNT0 = 0;\r
+       TIFR0 = (1 << OCF1A);\r
+                       \r
+       uint8_t TimeoutMS = XMEGA_NVM_BUSY_TIMEOUT_MS;\r
+       \r
+       /* Poll the NVM STATUS register while the NVM controller is busy */\r
+       while (TimeoutMS)\r
+       {\r
+               /* Send a LDS command to read the NVM STATUS register to check the BUSY flag */\r
+               PDITarget_SendByte(PDI_CMD_LDS | (PDI_DATSIZE_4BYTES << 2));\r
+               XMEGANVM_SendNVMRegAddress(XMEGA_NVM_REG_STATUS);\r
+               \r
+               /* Check to see if the BUSY flag is still set */\r
+               if (!(PDITarget_ReceiveByte() & (1 << 7)))\r
+                 return true;\r
+\r
+               if (TIFR0 & (1 << OCF1A))\r
+               {\r
+                       TIFR0 = (1 << OCF1A);\r
+                       TimeoutMS--;\r
+               }\r
+       }\r
+       \r
+       return false;\r
+}\r
+\r
+/** Retrieves the CRC value of the given memory space.\r
+ *\r
+ *  \param[in]  CRCCommand  NVM CRC command to issue to the target\r
+ *  \param[out] CRCDest     CRC Destination when read from the target\r
+ *\r
+ *  \return Boolean true if the command sequence complete successfully\r
+ */\r
+bool XMEGANVM_GetMemoryCRC(const uint8_t CRCCommand, uint32_t* const CRCDest)\r
+{\r
+       /* Wait until the NVM controller is no longer busy */\r
+       if (!(XMEGANVM_WaitWhileNVMControllerBusy()))\r
+         return false;\r
+         \r
+       /* Set the NVM command to the correct CRC read command */\r
+       PDITarget_SendByte(PDI_CMD_STS | (PDI_DATSIZE_4BYTES << 2));\r
+       XMEGANVM_SendNVMRegAddress(XMEGA_NVM_REG_CMD);\r
+       PDITarget_SendByte(CRCCommand);\r
+\r
+       /* Set CMDEX bit in NVM CTRLA register to start the CRC generation */\r
+       PDITarget_SendByte(PDI_CMD_STS | (PDI_DATSIZE_4BYTES << 2));\r
+       XMEGANVM_SendNVMRegAddress(XMEGA_NVM_REG_CTRLA);\r
+       PDITarget_SendByte(1 << 0);\r
+\r
+       /* Wait until the NVM bus is ready again */\r
+       if (!(PDITarget_WaitWhileNVMBusBusy()))\r
+         return false;\r
+\r
+       /* Wait until the NVM controller is no longer busy */\r
+       if (!(XMEGANVM_WaitWhileNVMControllerBusy()))\r
+         return false;\r
+       \r
+       *CRCDest = 0;\r
+       \r
+       /* Read the first generated CRC byte value */\r
+       PDITarget_SendByte(PDI_CMD_LDS | (PDI_DATSIZE_4BYTES << 2));\r
+       XMEGANVM_SendNVMRegAddress(XMEGA_NVM_REG_DAT0);\r
+       *CRCDest  = PDITarget_ReceiveByte();\r
+\r
+       /* Read the second generated CRC byte value */\r
+       PDITarget_SendByte(PDI_CMD_LDS | (PDI_DATSIZE_4BYTES << 2));\r
+       XMEGANVM_SendNVMRegAddress(XMEGA_NVM_REG_DAT1);\r
+       *CRCDest |= ((uint16_t)PDITarget_ReceiveByte() << 8);\r
+\r
+       /* Read the third generated CRC byte value */\r
+       PDITarget_SendByte(PDI_CMD_LDS | (PDI_DATSIZE_4BYTES << 2));\r
+       XMEGANVM_SendNVMRegAddress(XMEGA_NVM_REG_DAT2);\r
+       *CRCDest |= ((uint32_t)PDITarget_ReceiveByte() << 16);\r
+       \r
+       return true;\r
+}\r
+\r
+/** Reads memory from the target's memory spaces.\r
+ *\r
+ *  \param[in]  ReadAddress  Start address to read from within the target's address space\r
+ *  \param[out] ReadBuffer   Buffer to store read data into\r
+ *  \param[in]  ReadSize     Number of bytes to read\r
+ *\r
+ *  \return Boolean true if the command sequence complete successfully\r
+ */\r
+bool XMEGANVM_ReadMemory(const uint32_t ReadAddress, uint8_t* ReadBuffer, const uint16_t ReadSize)\r
+{\r
+       /* Wait until the NVM controller is no longer busy */\r
+       if (!(XMEGANVM_WaitWhileNVMControllerBusy()))\r
+         return false;\r
+       \r
+       /* Send the READNVM command to the NVM controller for reading of an arbitrary location */\r
+       PDITarget_SendByte(PDI_CMD_STS | (PDI_DATSIZE_4BYTES << 2));\r
+       XMEGANVM_SendNVMRegAddress(XMEGA_NVM_REG_CMD);\r
+       PDITarget_SendByte(XMEGA_NVM_CMD_READNVM);\r
+\r
+       /* Load the PDI pointer register with the start address we want to read from */\r
+       PDITarget_SendByte(PDI_CMD_ST | (PDI_POINTER_DIRECT << 2) | PDI_DATSIZE_4BYTES);\r
+       XMEGANVM_SendAddress(ReadAddress);\r
+\r
+       /* Send the REPEAT command with the specified number of bytes to read */\r
+       PDITarget_SendByte(PDI_CMD_REPEAT | PDI_DATSIZE_1BYTE);\r
+       PDITarget_SendByte(ReadSize - 1);\r
+               \r
+       /* Send a LD command with indirect access and postincrement to read out the bytes */\r
+       PDITarget_SendByte(PDI_CMD_LD | (PDI_POINTER_INDIRECT_PI << 2) | PDI_DATSIZE_1BYTE);\r
+       for (uint16_t i = 0; i < ReadSize; i++)\r
+         *(ReadBuffer++) = PDITarget_ReceiveByte();\r
+       \r
+       return true;\r
+}\r
+\r
+/** Writes byte addressed memory to the target's memory spaces.\r
+ *\r
+ *  \param[in]  WriteCommand  Command to send to the device to write each memory byte\r
+ *  \param[in]  WriteAddress  Start address to write to within the target's address space\r
+ *  \param[in]  WriteBuffer   Buffer to source data from\r
+ *\r
+ *  \return Boolean true if the command sequence complete successfully\r
+ */\r
+bool XMEGANVM_WriteByteMemory(const uint8_t WriteCommand, const uint32_t WriteAddress, const uint8_t* WriteBuffer)\r
+{\r
+       /* Wait until the NVM controller is no longer busy */\r
+       if (!(XMEGANVM_WaitWhileNVMControllerBusy()))\r
+         return false;\r
+\r
+       /* Send the memory write command to the target */\r
+       PDITarget_SendByte(PDI_CMD_STS | (PDI_DATSIZE_4BYTES << 2));\r
+       XMEGANVM_SendNVMRegAddress(XMEGA_NVM_REG_CMD);\r
+       PDITarget_SendByte(WriteCommand);\r
+       \r
+       /* Send new memory byte to the memory to the target */\r
+       PDITarget_SendByte(PDI_CMD_STS | (PDI_DATSIZE_4BYTES << 2));\r
+       XMEGANVM_SendAddress(WriteAddress);\r
+       PDITarget_SendByte(*(WriteBuffer++));\r
+       \r
+       return true;\r
+}\r
+\r
+/** Writes page addressed memory to the target's memory spaces.\r
+ *\r
+ *  \param[in]  WriteBuffCommand  Command to send to the device to write a byte to the memory page buffer\r
+ *  \param[in]  EraseBuffCommand  Command to send to the device to erase the memory page buffer\r
+ *  \param[in]  WritePageCommand  Command to send to the device to write the page buffer to the destination memory\r
+ *  \param[in]  PageMode          Bitfield indicating what operations need to be executed on the specified page\r
+ *  \param[in]  WriteAddress      Start address to write the page data to within the target's address space\r
+ *  \param[in]  WriteBuffer       Buffer to source data from\r
+ *  \param[in]  WriteSize         Number of bytes to write\r
+ *\r
+ *  \return Boolean true if the command sequence complete successfully\r
+ */\r
+bool XMEGANVM_WritePageMemory(const uint8_t WriteBuffCommand, const uint8_t EraseBuffCommand,\r
+                               const uint8_t WritePageCommand, const uint8_t PageMode, const uint32_t WriteAddress,\r
+                               const uint8_t* WriteBuffer, const uint16_t WriteSize)\r
+{\r
+       if (PageMode & XPRG_PAGEMODE_ERASE)\r
+       {\r
+               /* Wait until the NVM controller is no longer busy */\r
+               if (!(XMEGANVM_WaitWhileNVMControllerBusy()))\r
+                 return false;\r
+\r
+               /* Send the memory buffer erase command to the target */\r
+               PDITarget_SendByte(PDI_CMD_STS | (PDI_DATSIZE_4BYTES << 2));\r
+               XMEGANVM_SendNVMRegAddress(XMEGA_NVM_REG_CMD);\r
+               PDITarget_SendByte(EraseBuffCommand);\r
+\r
+               /* Set CMDEX bit in NVM CTRLA register to start the buffer erase */\r
+               PDITarget_SendByte(PDI_CMD_STS | (PDI_DATSIZE_4BYTES << 2));\r
+               XMEGANVM_SendNVMRegAddress(XMEGA_NVM_REG_CTRLA);\r
+               PDITarget_SendByte(1 << 0);\r
+       }\r
+\r
+       if (WriteSize)\r
+       {\r
+               /* Wait until the NVM controller is no longer busy */\r
+               if (!(XMEGANVM_WaitWhileNVMControllerBusy()))\r
+                 return false;\r
+\r
+               /* Send the memory buffer write command to the target */\r
+               PDITarget_SendByte(PDI_CMD_STS | (PDI_DATSIZE_4BYTES << 2));\r
+               XMEGANVM_SendNVMRegAddress(XMEGA_NVM_REG_CMD);\r
+               PDITarget_SendByte(WriteBuffCommand);\r
+\r
+               /* Load the PDI pointer register with the start address we want to write to */\r
+               PDITarget_SendByte(PDI_CMD_ST | (PDI_POINTER_DIRECT << 2) | PDI_DATSIZE_4BYTES);\r
+               XMEGANVM_SendAddress(WriteAddress);\r
+\r
+               /* Send the REPEAT command with the specified number of bytes to write */\r
+               PDITarget_SendByte(PDI_CMD_REPEAT | PDI_DATSIZE_1BYTE);\r
+               PDITarget_SendByte(WriteSize - 1);\r
+                       \r
+               /* Send a ST command with indirect access and postincrement to write the bytes */\r
+               PDITarget_SendByte(PDI_CMD_ST | (PDI_POINTER_INDIRECT_PI << 2) | PDI_DATSIZE_1BYTE);\r
+               for (uint16_t i = 0; i < WriteSize; i++)\r
+                 PDITarget_SendByte(*(WriteBuffer++));\r
+       }\r
+       \r
+       if (PageMode & XPRG_PAGEMODE_WRITE)\r
+       {\r
+               /* Wait until the NVM controller is no longer busy */\r
+               if (!(XMEGANVM_WaitWhileNVMControllerBusy()))\r
+                 return false;\r
+\r
+               /* Send the memory write command to the target */\r
+               PDITarget_SendByte(PDI_CMD_STS | (PDI_DATSIZE_4BYTES << 2));\r
+               XMEGANVM_SendNVMRegAddress(XMEGA_NVM_REG_CMD);\r
+               PDITarget_SendByte(WritePageCommand);\r
+               \r
+               /* Send the address of the first page location to write the memory page */\r
+               PDITarget_SendByte(PDI_CMD_STS | (PDI_DATSIZE_4BYTES << 2));\r
+               XMEGANVM_SendAddress(WriteAddress);\r
+               PDITarget_SendByte(0x00);\r
+       }\r
+\r
+       return true;\r
+}\r
+\r
+/** Erases a specific memory space of the target.\r
+ *\r
+ *  \param[in] EraseCommand  NVM erase command to send to the device\r
+ *  \param[in] Address  Address inside the memory space to erase\r
+ *\r
+ *  \return Boolean true if the command sequence complete successfully\r
+ */\r
+bool XMEGANVM_EraseMemory(const uint8_t EraseCommand, const uint32_t Address)\r
+{\r
+       /* Wait until the NVM controller is no longer busy */\r
+       if (!(XMEGANVM_WaitWhileNVMControllerBusy()))\r
+         return false;\r
+         \r
+       /* Send the memory erase command to the target */\r
+       PDITarget_SendByte(PDI_CMD_STS | (PDI_DATSIZE_4BYTES << 2));\r
+       XMEGANVM_SendNVMRegAddress(XMEGA_NVM_REG_CMD);\r
+       PDITarget_SendByte(EraseCommand);\r
+       \r
+       /* Chip erase is handled separately, since it's procedure is different to other erase types */\r
+       if (EraseCommand == XMEGA_NVM_CMD_CHIPERASE)\r
+       {\r
+               /* Set CMDEX bit in NVM CTRLA register to start the chip erase */\r
+               PDITarget_SendByte(PDI_CMD_STS | (PDI_DATSIZE_4BYTES << 2));\r
+               XMEGANVM_SendNVMRegAddress(XMEGA_NVM_REG_CTRLA);\r
+               PDITarget_SendByte(1 << 0);             \r
+       }\r
+       else\r
+       {\r
+               /* Other erase modes just need us to address a byte within the target memory space */\r
+               PDITarget_SendByte(PDI_CMD_STS | (PDI_DATSIZE_4BYTES << 2));\r
+               XMEGANVM_SendAddress(Address);  \r
+               PDITarget_SendByte(0x00);\r
+       }\r
+       \r
+       /* Wait until the NVM bus is ready again */\r
+       if (!(PDITarget_WaitWhileNVMBusBusy()))\r
+         return false;\r
+         \r
+       return true;\r
+}\r
+\r
+#endif\r
diff --git a/Projects/AVRISP/Lib/XPROG/XMEGANVM.h b/Projects/AVRISP/Lib/XPROG/XMEGANVM.h
new file mode 100644 (file)
index 0000000..c31c7e8
--- /dev/null
@@ -0,0 +1,121 @@
+/*\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 XMEGANVM.c.\r
+ */\r
+\r
+#ifndef _XMEGA_NVM__\r
+#define _XMEGA_NVM_\r
+\r
+       /* Includes: */\r
+               #include <avr/io.h>\r
+               #include <avr/interrupt.h>\r
+               #include <stdbool.h>\r
+               \r
+               #include <LUFA/Common/Common.h>\r
+               \r
+               #include "PDIProtocol.h"\r
+               #include "PDITarget.h"\r
+       \r
+       /* Preprocessor Checks: */\r
+               #if ((BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1))\r
+                       #undef ENABLE_ISP_PROTOCOL\r
+                       #undef ENABLE_TPI_PROTOCOL\r
+                       \r
+                       #if !defined(ENABLE_PDI_PROTOCOL)\r
+                               #define ENABLE_PDI_PROTOCOL\r
+                       #endif\r
+               #endif\r
+\r
+       /* Defines: */\r
+               #define XMEGA_NVM_BUSY_TIMEOUT_MS            200\r
+               \r
+               #define XMEGA_NVM_REG_ADDR0                  0x00\r
+               #define XMEGA_NVM_REG_ADDR1                  0x01\r
+               #define XMEGA_NVM_REG_ADDR2                  0x02\r
+               #define XMEGA_NVM_REG_DAT0                   0x04\r
+               #define XMEGA_NVM_REG_DAT1                   0x05\r
+               #define XMEGA_NVM_REG_DAT2                   0x06\r
+               #define XMEGA_NVM_REG_CMD                    0x0A\r
+               #define XMEGA_NVM_REG_CTRLA                  0x0B\r
+               #define XMEGA_NVM_REG_CTRLB                  0x0C\r
+               #define XMEGA_NVM_REG_INTCTRL                0x0D\r
+               #define XMEGA_NVM_REG_STATUS                 0x0F\r
+               #define XMEGA_NVM_REG_LOCKBITS               0x10\r
+               \r
+               #define XMEGA_NVM_CMD_NOOP                   0x00\r
+               #define XMEGA_NVM_CMD_CHIPERASE              0x40\r
+               #define XMEGA_NVM_CMD_READNVM                0x43\r
+               #define XMEGA_NVM_CMD_LOADFLASHPAGEBUFF      0x23\r
+               #define XMEGA_NVM_CMD_ERASEFLASHPAGEBUFF     0x26\r
+               #define XMEGA_NVM_CMD_ERASEFLASHPAGE         0x2B\r
+               #define XMEGA_NVM_CMD_WRITEFLASHPAGE         0x2E\r
+               #define XMEGA_NVM_CMD_ERASEWRITEFLASH        0x2F\r
+               #define XMEGA_NVM_CMD_FLASHCRC               0x78\r
+               #define XMEGA_NVM_CMD_ERASEAPPSEC            0x20\r
+               #define XMEGA_NVM_CMD_ERASEAPPSECPAGE        0x22\r
+               #define XMEGA_NVM_CMD_WRITEAPPSECPAGE        0x24\r
+               #define XMEGA_NVM_CMD_ERASEWRITEAPPSECPAGE   0x25\r
+               #define XMEGA_NVM_CMD_APPCRC                 0x38\r
+               #define XMEGA_NVM_CMD_ERASEBOOTSEC           0x68\r
+               #define XMEGA_NVM_CMD_ERASEBOOTSECPAGE       0x2A\r
+               #define XMEGA_NVM_CMD_WRITEBOOTSECPAGE       0x2C\r
+               #define XMEGA_NVM_CMD_ERASEWRITEBOOTSECPAGE  0x2D\r
+               #define XMEGA_NVM_CMD_BOOTCRC                0x39\r
+               #define XMEGA_NVM_CMD_READUSERSIG            0x03\r
+               #define XMEGA_NVM_CMD_ERASEUSERSIG           0x18\r
+               #define XMEGA_NVM_CMD_WRITEUSERSIG           0x1A\r
+               #define XMEGA_NVM_CMD_READCALIBRATION        0x02\r
+               #define XMEGA_NVM_CMD_READFUSE               0x07\r
+               #define XMEGA_NVM_CMD_WRITEFUSE              0x4C\r
+               #define XMEGA_NVM_CMD_WRITELOCK              0x08\r
+               #define XMEGA_NVM_CMD_LOADEEPROMPAGEBUFF     0x33\r
+               #define XMEGA_NVM_CMD_ERASEEEPROMPAGEBUFF    0x36\r
+               #define XMEGA_NVM_CMD_ERASEEEPROM            0x30\r
+               #define XMEGA_NVM_CMD_ERASEEEPROMPAGE        0x32\r
+               #define XMEGA_NVM_CMD_WRITEEEPROMPAGE        0x34\r
+               #define XMEGA_NVM_CMD_ERASEWRITEEEPROMPAGE   0x35\r
+               #define XMEGA_NVM_CMD_READEEPROM             0x06\r
+\r
+       /* Function Prototypes: */\r
+               void XMEGANVM_SendNVMRegAddress(const uint8_t Register);\r
+               void XMEGANVM_SendAddress(const uint32_t AbsoluteAddress);\r
+               bool XMEGANVM_WaitWhileNVMControllerBusy(void);\r
+               bool XMEGANVM_GetMemoryCRC(const uint8_t CRCCommand, uint32_t* const CRCDest);\r
+               bool XMEGANVM_ReadMemory(const uint32_t ReadAddress, uint8_t* ReadBuffer, const uint16_t ReadSize);\r
+               bool XMEGANVM_WriteByteMemory(const uint8_t WriteCommand, const uint32_t WriteAddress, const uint8_t* WriteBuffer);\r
+               bool XMEGANVM_WritePageMemory(const uint8_t WriteBuffCommand, const uint8_t EraseBuffCommand,\r
+                                             const uint8_t WritePageCommand, const uint8_t PageMode, const uint32_t WriteAddress,\r
+                                             const uint8_t* WriteBuffer, const uint16_t WriteSize);\r
+               bool XMEGANVM_EraseMemory(const uint8_t EraseCommand, const uint32_t Address);\r
+\r
+#endif\r
index 6f8ee40..12f3154 100644 (file)
@@ -131,12 +131,13 @@ SRC = $(TARGET).c                                                 \
       Lib/V2ProtocolParams.c                                      \\r
       Lib/ISP/ISPProtocol.c                                       \\r
       Lib/ISP/ISPTarget.c                                         \\r
       Lib/V2ProtocolParams.c                                      \\r
       Lib/ISP/ISPProtocol.c                                       \\r
       Lib/ISP/ISPTarget.c                                         \\r
-         Lib/PDI/PDIProtocol.c                                       \\r
-         Lib/PDI/PDITarget.c                                         \\r
-         Lib/PDI/XMEGANVM.c                                          \\r
-         Lib/TPI/TPIProtocol.c                                       \\r
-         Lib/TPI/TPITarget.c                                         \\r
-         Lib/TPI/TINYNVM.c                                           \\r
+         Lib/XPROG/PDIProtocol.c                                     \\r
+         Lib/XPROG/PDITarget.c                                       \\r
+         Lib/XPROG/XMEGANVM.c                                        \\r
+         Lib/XPROG/TPIProtocol.c                                     \\r
+         Lib/XPROG/TPITarget.c                                       \\r
+         Lib/XPROG/TINYNVM.c                                         \\r
+         $(LUFA_PATH)/LUFA/Drivers/Peripheral/Serial.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/DevChapter9.c        \\r
          $(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Endpoint.c           \\r
          $(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Host.c               \\r