Tag for the LUFA-120730-BETA release. LUFA-120730-BETA
authorDean Camera <dean@fourwalledcubicle.com>
Mon, 16 Jul 2012 17:11:14 +0000 (17:11 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Mon, 16 Jul 2012 17:11:14 +0000 (17:11 +0000)
268 files changed:
Bootloaders/CDC/BootloaderAPI.c
Bootloaders/CDC/BootloaderAPITable.S
Bootloaders/CDC/BootloaderCDC.c
Bootloaders/CDC/BootloaderCDC.h
Bootloaders/CDC/LUFA CDC Bootloader.inf
Bootloaders/CDC/makefile
Bootloaders/DFU/BootloaderAPI.c
Bootloaders/DFU/BootloaderAPITable.S
Bootloaders/DFU/BootloaderDFU.c
Bootloaders/DFU/BootloaderDFU.h
Bootloaders/DFU/BootloaderDFU.txt
Bootloaders/DFU/Descriptors.c
Bootloaders/DFU/makefile
Bootloaders/HID/BootloaderHID.c
Bootloaders/HID/BootloaderHID.h
Bootloaders/HID/makefile
Bootloaders/makefile
BuildTests/BoardDriverTest/BoardDeviceMap.cfg
BuildTests/BoardDriverTest/makefile
BuildTests/BoardDriverTest/makefile.avr8 [deleted file]
BuildTests/BoardDriverTest/makefile.test [new file with mode: 0644]
BuildTests/BoardDriverTest/makefile.uc3 [deleted file]
BuildTests/BoardDriverTest/makefile.xmega [deleted file]
BuildTests/BootloaderTest/BootloaderDeviceMap.cfg
BuildTests/BootloaderTest/makefile
BuildTests/ModuleTest/Dummy.S
BuildTests/ModuleTest/Modules.h
BuildTests/ModuleTest/Test_C.c
BuildTests/ModuleTest/Test_CPP.cpp
BuildTests/ModuleTest/makefile
BuildTests/ModuleTest/makefile.avr8 [deleted file]
BuildTests/ModuleTest/makefile.test [new file with mode: 0644]
BuildTests/ModuleTest/makefile.uc3 [deleted file]
BuildTests/ModuleTest/makefile.xmega [deleted file]
BuildTests/SingleUSBModeTest/Dummy.S
BuildTests/SingleUSBModeTest/Test.c
BuildTests/SingleUSBModeTest/makefile
BuildTests/SingleUSBModeTest/makefile.avr8 [deleted file]
BuildTests/SingleUSBModeTest/makefile.test [new file with mode: 0644]
BuildTests/SingleUSBModeTest/makefile.uc3 [deleted file]
BuildTests/SingleUSBModeTest/makefile.xmega [deleted file]
BuildTests/StaticAnalysisTest/makefile
BuildTests/makefile
Demos/Device/ClassDriver/AudioInput/AudioInput.c
Demos/Device/ClassDriver/AudioInput/makefile
Demos/Device/ClassDriver/AudioOutput/AudioOutput.c
Demos/Device/ClassDriver/AudioOutput/makefile
Demos/Device/ClassDriver/DualVirtualSerial/LUFA DualVirtualSerial.inf
Demos/Device/ClassDriver/DualVirtualSerial/makefile
Demos/Device/ClassDriver/GenericHID/makefile
Demos/Device/ClassDriver/Joystick/makefile
Demos/Device/ClassDriver/Keyboard/makefile
Demos/Device/ClassDriver/KeyboardMouse/makefile
Demos/Device/ClassDriver/KeyboardMouseMultiReport/makefile
Demos/Device/ClassDriver/MIDI/makefile
Demos/Device/ClassDriver/MassStorage/makefile
Demos/Device/ClassDriver/MassStorageKeyboard/makefile
Demos/Device/ClassDriver/Mouse/makefile
Demos/Device/ClassDriver/RNDISEthernet/Lib/TCP.c
Demos/Device/ClassDriver/RNDISEthernet/Lib/TCP.h
Demos/Device/ClassDriver/RNDISEthernet/makefile
Demos/Device/ClassDriver/VirtualSerial/LUFA VirtualSerial.inf
Demos/Device/ClassDriver/VirtualSerial/makefile
Demos/Device/ClassDriver/VirtualSerialMassStorage/LUFA VirtualSerialMassStorage.inf
Demos/Device/ClassDriver/VirtualSerialMassStorage/makefile
Demos/Device/ClassDriver/VirtualSerialMouse/LUFA VirtualSerialMouse.inf
Demos/Device/ClassDriver/VirtualSerialMouse/makefile
Demos/Device/ClassDriver/makefile
Demos/Device/Incomplete/Sideshow/makefile
Demos/Device/Incomplete/TestAndMeasurement/Descriptors.h
Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.c
Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.h
Demos/Device/Incomplete/TestAndMeasurement/makefile
Demos/Device/LowLevel/AudioInput/makefile
Demos/Device/LowLevel/AudioOutput/makefile
Demos/Device/LowLevel/DualVirtualSerial/LUFA DualVirtualSerial.inf
Demos/Device/LowLevel/DualVirtualSerial/makefile
Demos/Device/LowLevel/GenericHID/makefile
Demos/Device/LowLevel/Joystick/makefile
Demos/Device/LowLevel/Keyboard/makefile
Demos/Device/LowLevel/KeyboardMouse/Descriptors.h
Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.c
Demos/Device/LowLevel/KeyboardMouse/makefile
Demos/Device/LowLevel/MIDI/makefile
Demos/Device/LowLevel/MassStorage/makefile
Demos/Device/LowLevel/Mouse/makefile
Demos/Device/LowLevel/RNDISEthernet/Lib/TCP.c
Demos/Device/LowLevel/RNDISEthernet/Lib/TCP.h
Demos/Device/LowLevel/RNDISEthernet/makefile
Demos/Device/LowLevel/VirtualSerial/LUFA VirtualSerial.inf
Demos/Device/LowLevel/VirtualSerial/makefile
Demos/Device/LowLevel/makefile
Demos/DualRole/ClassDriver/MouseHostDevice/makefile
Demos/DualRole/ClassDriver/makefile
Demos/DualRole/makefile
Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.c
Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.h
Demos/Host/ClassDriver/AndroidAccessoryHost/makefile
Demos/Host/ClassDriver/AudioInputHost/makefile
Demos/Host/ClassDriver/AudioOutputHost/makefile
Demos/Host/ClassDriver/JoystickHostWithParser/makefile
Demos/Host/ClassDriver/KeyboardHost/makefile
Demos/Host/ClassDriver/KeyboardHostWithParser/makefile
Demos/Host/ClassDriver/MIDIHost/MIDIHost.c
Demos/Host/ClassDriver/MIDIHost/makefile
Demos/Host/ClassDriver/MassStorageHost/makefile
Demos/Host/ClassDriver/MouseHost/makefile
Demos/Host/ClassDriver/MouseHostWithParser/makefile
Demos/Host/ClassDriver/PrinterHost/makefile
Demos/Host/ClassDriver/RNDISEthernetHost/makefile
Demos/Host/ClassDriver/StillImageHost/makefile
Demos/Host/ClassDriver/VirtualSerialHost/makefile
Demos/Host/ClassDriver/makefile
Demos/Host/LowLevel/AndroidAccessoryHost/makefile
Demos/Host/LowLevel/AudioInputHost/makefile
Demos/Host/LowLevel/AudioOutputHost/makefile
Demos/Host/LowLevel/GenericHIDHost/makefile
Demos/Host/LowLevel/JoystickHostWithParser/makefile
Demos/Host/LowLevel/KeyboardHost/makefile
Demos/Host/LowLevel/KeyboardHostWithParser/makefile
Demos/Host/LowLevel/MIDIHost/makefile
Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.c
Demos/Host/LowLevel/MassStorageHost/makefile
Demos/Host/LowLevel/MouseHost/makefile
Demos/Host/LowLevel/MouseHostWithParser/makefile
Demos/Host/LowLevel/PrinterHost/makefile
Demos/Host/LowLevel/RNDISEthernetHost/makefile
Demos/Host/LowLevel/StillImageHost/makefile
Demos/Host/LowLevel/VirtualSerialHost/makefile
Demos/Host/LowLevel/makefile
LUFA.pnproj
LUFA/Build/HID_EEPROM_Loader/HID_EEPROM_Loader.c [new file with mode: 0644]
LUFA/Build/HID_EEPROM_Loader/makefile [new file with mode: 0644]
LUFA/Build/lufa.avrdude.in [deleted file]
LUFA/Build/lufa.build.in [deleted file]
LUFA/Build/lufa.core.in [deleted file]
LUFA/Build/lufa.dfu.in [deleted file]
LUFA/Build/lufa.doxygen.in [deleted file]
LUFA/Build/lufa.sources.in [deleted file]
LUFA/Build/lufa_atprogram.mk [new file with mode: 0644]
LUFA/Build/lufa_avrdude.mk [new file with mode: 0644]
LUFA/Build/lufa_build.mk [new file with mode: 0644]
LUFA/Build/lufa_core.mk [new file with mode: 0644]
LUFA/Build/lufa_cppcheck.mk [new file with mode: 0644]
LUFA/Build/lufa_dfu.mk [new file with mode: 0644]
LUFA/Build/lufa_doxygen.mk [new file with mode: 0644]
LUFA/Build/lufa_hid.mk [new file with mode: 0644]
LUFA/Build/lufa_sources.mk [new file with mode: 0644]
LUFA/CodeTemplates/LUFAConfig.h
LUFA/CodeTemplates/makefile_template
LUFA/CodeTemplates/makefile_template.avr8 [deleted file]
LUFA/CodeTemplates/makefile_template.uc3 [deleted file]
LUFA/CodeTemplates/makefile_template.xmega [deleted file]
LUFA/Common/ArchitectureSpecific.h
LUFA/Common/Attributes.h
LUFA/Common/Common.h
LUFA/Doxygen.conf
LUFA/DoxygenPages/BuildSystem.txt [new file with mode: 0644]
LUFA/DoxygenPages/ChangeLog.txt
LUFA/DoxygenPages/CompileTimeTokens.txt
LUFA/DoxygenPages/CompilingApps.txt
LUFA/DoxygenPages/ConfiguringApps.txt
LUFA/DoxygenPages/DevelopingWithLUFA.txt
LUFA/DoxygenPages/DeviceSupport.txt
LUFA/DoxygenPages/ExportingLibrary.txt
LUFA/DoxygenPages/FutureChanges.txt
LUFA/DoxygenPages/Groups.txt
LUFA/DoxygenPages/KnownIssues.txt
LUFA/DoxygenPages/LUFAPoweredProjects.txt
LUFA/DoxygenPages/MigrationInformation.txt
LUFA/DoxygenPages/ProgrammingApps.txt
LUFA/DoxygenPages/Style/Style.css
LUFA/Drivers/Board/AVR8/BIGMULTIO/LEDs.h
LUFA/Drivers/Board/AVR8/MICROPENDOUS/Buttons.h
LUFA/Drivers/Board/AVR8/MICROPENDOUS/LEDs.h
LUFA/Drivers/Board/AVR8/MULTIO/LEDs.h
LUFA/Drivers/Board/AVR8/USB2AX/Buttons.h
LUFA/Drivers/Board/AVR8/USB2AX/LEDs.h
LUFA/Drivers/Board/Buttons.h
LUFA/Drivers/Board/Joystick.h
LUFA/Drivers/Board/LEDs.h
LUFA/Drivers/Board/UC3/EVK1101/Buttons.h
LUFA/Drivers/Peripheral/AVR8/ADC_AVR8.h
LUFA/Drivers/USB/Class/AndroidAccessoryClass.h
LUFA/Drivers/USB/Class/Common/AndroidAccessoryClassCommon.h
LUFA/Drivers/USB/Class/Device/AudioClassDevice.h
LUFA/Drivers/USB/Class/Device/CDCClassDevice.h
LUFA/Drivers/USB/Class/Device/MIDIClassDevice.h
LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.c
LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.h
LUFA/Drivers/USB/Class/Host/CDCClassHost.h
LUFA/Drivers/USB/Class/Host/HIDClassHost.h
LUFA/Drivers/USB/Class/Host/MIDIClassHost.h
LUFA/Drivers/USB/Core/AVR8/EndpointStream_AVR8.c
LUFA/Drivers/USB/Core/AVR8/EndpointStream_AVR8.h
LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.h
LUFA/Drivers/USB/Core/AVR8/PipeStream_AVR8.c
LUFA/Drivers/USB/Core/AVR8/PipeStream_AVR8.h
LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.c
LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h
LUFA/Drivers/USB/Core/ConfigDescriptor.c [deleted file]
LUFA/Drivers/USB/Core/ConfigDescriptor.h [deleted file]
LUFA/Drivers/USB/Core/ConfigDescriptors.c [new file with mode: 0644]
LUFA/Drivers/USB/Core/ConfigDescriptors.h [new file with mode: 0644]
LUFA/Drivers/USB/Core/Events.h
LUFA/Drivers/USB/Core/HostStandardReq.h
LUFA/Drivers/USB/Core/StdDescriptors.h
LUFA/Drivers/USB/Core/UC3/EndpointStream_UC3.c
LUFA/Drivers/USB/Core/UC3/EndpointStream_UC3.h
LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.c
LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.h
LUFA/Drivers/USB/Core/UC3/PipeStream_UC3.c
LUFA/Drivers/USB/Core/UC3/PipeStream_UC3.h
LUFA/Drivers/USB/Core/UC3/Pipe_UC3.c
LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h
LUFA/Drivers/USB/Core/UC3/USBController_UC3.c
LUFA/Drivers/USB/Core/UC3/USBController_UC3.h
LUFA/Drivers/USB/Core/XMEGA/EndpointStream_XMEGA.c
LUFA/Drivers/USB/Core/XMEGA/EndpointStream_XMEGA.h
LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.h
LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.c
LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.h
LUFA/Drivers/USB/USB.h
LUFA/Platform/Platform.h [new file with mode: 0644]
LUFA/Platform/UC3/ClockManagement.h
LUFA/Platform/UC3/InterruptManagement.h
LUFA/Platform/XMEGA/ClockManagement.h
LUFA/Version.h
LUFA/makefile
Maintenance/AS4Template.aps
Maintenance/makefile
Projects/AVRISP-MKII/AVRISPDescriptors.c
Projects/AVRISP-MKII/AVRISPDescriptors.h
Projects/AVRISP-MKII/Lib/ISP/ISPTarget.c
Projects/AVRISP-MKII/makefile
Projects/Benito/Benito Programmer.inf
Projects/Benito/makefile
Projects/HIDReportViewer/makefile
Projects/LEDNotifier/LUFA LED Notifier.inf
Projects/LEDNotifier/makefile
Projects/MIDIToneGenerator/makefile
Projects/Magstripe/Lib/CircularBitBuffer.h
Projects/Magstripe/Lib/MagstripeHW.h
Projects/Magstripe/makefile
Projects/MediaController/makefile
Projects/MissileLauncher/makefile
Projects/RelayBoard/makefile
Projects/SerialToLCD/Lib/HD44780.c
Projects/SerialToLCD/Lib/HD44780.h
Projects/SerialToLCD/SerialToLCD.c
Projects/SerialToLCD/SerialToLCD.txt
Projects/SerialToLCD/makefile
Projects/TempDataLogger/Lib/DataflashManager.h
Projects/TempDataLogger/TempDataLogger.c
Projects/TempDataLogger/TempLogHostApp/DataLoggerSettings.Designer.cs
Projects/TempDataLogger/TempLogHostApp/DataLoggerSettings.cs
Projects/TempDataLogger/TempLogHostApp/Properties/AssemblyInfo.cs
Projects/TempDataLogger/makefile
Projects/USBtoSerial/LUFA USBtoSerial.inf
Projects/USBtoSerial/makefile
Projects/Webserver/Lib/DataflashManager.h
Projects/Webserver/Lib/uip/uip.c
Projects/Webserver/makefile
Projects/XPLAINBridge/LUFA XPLAIN Bridge.inf
Projects/XPLAINBridge/makefile
Projects/makefile
README.txt
makefile

index 60b2d94..bac078f 100644 (file)
 void BootloaderAPI_ErasePage(const uint32_t Address)
 {
        boot_page_erase_safe(Address);
+       boot_spm_busy_wait();
        boot_rww_enable();
 }
 
 void BootloaderAPI_WritePage(const uint32_t Address)
 {
        boot_page_write_safe(Address);
+       boot_spm_busy_wait();
        boot_rww_enable();
 }
 
index a8e3886..060a7ab 100644 (file)
@@ -1,6 +1,6 @@
 /*
              LUFA Library
-     Copyright (C) Dean Camera, 2011.
+     Copyright (C) Dean Camera, 2012.
 
   dean [at] fourwalledcubicle [dot] com
            www.lufa-lib.org
   this software.
 */
 
-; Bootloader API Jump Table
-.section .apitable, "ax"
-
 ; Trampolines to actual API implementations if the target address is outside the
 ; range of a rjmp instruction (can happen with large bootloader sections)
-.org 0
-BootloaderAPI_ErasePage_Trampoline:
-       jmp BootloaderAPI_ErasePage
-BootloaderAPI_WritePage_Trampoline:
-       jmp BootloaderAPI_WritePage
-BootloaderAPI_FillWord_Trampoline:
-       jmp BootloaderAPI_FillWord
-BootloaderAPI_ReadSignature_Trampoline:
-       jmp BootloaderAPI_ReadSignature
-BootloaderAPI_ReadFuse_Trampoline:
-       jmp BootloaderAPI_ReadFuse
-BootloaderAPI_ReadLock_Trampoline:
-       jmp BootloaderAPI_ReadLock
-BootloaderAPI_WriteLock_Trampoline:
-       jmp BootloaderAPI_WriteLock
-BootloaderAPU_UNUSED1:
-       ret
-BootloaderAPU_UNUSED2:
-       ret
-BootloaderAPU_UNUSED3:
-       ret
-BootloaderAPU_UNUSED4:
-       ret
-BootloaderAPU_UNUSED5:
-       ret
+.section .apitable_trampolines, "ax"
+.global BootloaderAPI_Trampolines
+BootloaderAPI_Trampolines:
+
+       BootloaderAPI_ErasePage_Trampoline:
+               jmp BootloaderAPI_ErasePage
+       BootloaderAPI_WritePage_Trampoline:
+               jmp BootloaderAPI_WritePage
+       BootloaderAPI_FillWord_Trampoline:
+               jmp BootloaderAPI_FillWord
+       BootloaderAPI_ReadSignature_Trampoline:
+               jmp BootloaderAPI_ReadSignature
+       BootloaderAPI_ReadFuse_Trampoline:
+               jmp BootloaderAPI_ReadFuse
+       BootloaderAPI_ReadLock_Trampoline:
+               jmp BootloaderAPI_ReadLock
+       BootloaderAPI_WriteLock_Trampoline:
+               jmp BootloaderAPI_WriteLock
+       BootloaderAPU_UNUSED1:
+               ret
+       BootloaderAPU_UNUSED2:
+               ret
+       BootloaderAPU_UNUSED3:
+               ret
+       BootloaderAPU_UNUSED4:
+               ret
+       BootloaderAPU_UNUSED5:
+               ret
+
+
 
 ; API function jump table
-.org (96 - 32)
+.section .apitable_jumptable, "ax"
 .global BootloaderAPI_JumpTable
 BootloaderAPI_JumpTable:
+
        rjmp BootloaderAPI_ErasePage_Trampoline
        rjmp BootloaderAPI_WritePage_Trampoline
        rjmp BootloaderAPI_FillWord_Trampoline
@@ -76,10 +79,13 @@ BootloaderAPI_JumpTable:
        rjmp BootloaderAPU_UNUSED4 ; UNUSED ENTRY 4
        rjmp BootloaderAPU_UNUSED5 ; UNUSED ENTRY 5
 
+
+
 ; Bootloader table signatures and information
-.org (96 - 8)
-BootloaderAPI_Signatures:
+.section .apitable_signatures, "ax"
 .global BootloaderAPI_Signatures
+BootloaderAPI_Signatures:
+
        .long BOOT_START_ADDR ; Start address of the bootloader
-       .word 0xCDC1 ; Signature for the CDC class bootloader, V1
+       .word 0xDFB1 ; Signature for the DFU class bootloader, V1
        .word 0xDCFB ; Signature for a LUFA class bootloader
index ef68e14..af778c7 100644 (file)
@@ -61,7 +61,7 @@ static bool RunBootloader = true;
  *  low when the application attempts to start via a watchdog reset, the bootloader will re-start. If set to the value
  *  \ref MAGIC_BOOT_KEY the special init function \ref Application_Jump_Check() will force the application to start.
  */
-uint32_t MagicBootKey ATTR_NO_INIT;
+uint16_t MagicBootKey ATTR_NO_INIT;
 
 
 /** Special startup routine to check if the bootloader was started via a watchdog reset, and if the magic application
@@ -70,8 +70,29 @@ uint32_t MagicBootKey ATTR_NO_INIT;
  */
 void Application_Jump_Check(void)
 {
+       bool JumpToApplication = false;
+
+       #if ((BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1))
+               /* Disable JTAG debugging */
+               JTAG_DISABLE();
+
+               /* Enable pull-up on the JTAG TCK pin so we can use it to select the mode */
+               PORTF |= (1 << 4);
+               Delay_MS(10);
+
+               /* If the TCK pin is not jumpered to ground, start the user application instead */
+               JumpToApplication |= ((PINF & (1 << 4)) != 0);
+
+               /* Re-enable JTAG debugging */
+               JTAG_ENABLE();
+       #endif
+
        /* If the reset source was the bootloader and the key is correct, clear it and jump to the application */
        if ((MCUSR & (1 << WDRF)) && (MagicBootKey == MAGIC_BOOT_KEY))
+         JumpToApplication |= true;
+
+       /* If a request has been made to jump to the user application, honor it */
+       if (JumpToApplication)
        {
                /* Turn off the watchdog */
                MCUSR &= ~(1<<WDRF);
index 36af962..d8c9c1c 100644 (file)
@@ -69,7 +69,7 @@
                #define SOFTWARE_IDENTIFIER          "LUFACDC"
 
                /** Magic bootloader key to unlock forced application start mode. */
-               #define MAGIC_BOOT_KEY            0xDC42CACA
+               #define MAGIC_BOOT_KEY               0xDC42
                
        /* Type Defines: */
                /** Type define for a non-returning pointer to the start of the loaded application in flash memory. */
index 9634004..50b2a64 100644 (file)
@@ -1,78 +1,36 @@
 ;************************************************************
 ; Windows USB CDC ACM Setup File
 ; Copyright (c) 2000 Microsoft Corporation
-
+;************************************************************
 
 [Version]
 Signature="$Windows NT$"
 Class=Ports
 ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
 Provider=%MFGNAME%
-LayoutFile=layout.inf
-CatalogFile=%MFGFILENAME%.cat
-DriverVer=11/15/2007,5.1.2600.0
+DriverVer=7/1/2012,10.0.0.0
 
 [Manufacturer]
-%MFGNAME%=DeviceList, NTamd64
-
-[DestinationDirs]
-DefaultDestDir=12
-
-
-;------------------------------------------------------------------------------
-;  Windows 2000/XP/Vista-32bit Sections
-;------------------------------------------------------------------------------
-
-[DriverInstall.nt]
-include=mdmcpq.inf
-CopyFiles=DriverCopyFiles.nt
-AddReg=DriverInstall.nt.AddReg
-
-[DriverCopyFiles.nt]
-usbser.sys,,,0x20
-
-[DriverInstall.nt.AddReg]
-HKR,,DevLoader,,*ntkern
-HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
-HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
+%MFGNAME%=DeviceList, NTx86, NTamd64, NTia64
 
-[DriverInstall.nt.Services]
-AddService=usbser, 0x00000002, DriverService.nt
-
-[DriverService.nt]
-DisplayName=%SERVICE%
-ServiceType=1
-StartType=3
-ErrorControl=1
-ServiceBinary=%12%\%DRIVERFILENAME%.sys
-
-;------------------------------------------------------------------------------
-;  Vista-64bit Sections
-;------------------------------------------------------------------------------
-
-[DriverInstall.NTamd64]
-include=mdmcpq.inf
-CopyFiles=DriverCopyFiles.NTamd64
-AddReg=DriverInstall.NTamd64.AddReg
+[SourceDisksNames]
 
-[DriverCopyFiles.NTamd64]
-%DRIVERFILENAME%.sys,,,0x20
+[SourceDisksFiles]
 
-[DriverInstall.NTamd64.AddReg]
-HKR,,DevLoader,,*ntkern
-HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
-HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
+[DestinationDirs]
+DefaultDestDir=12
 
-[DriverInstall.NTamd64.Services]
-AddService=usbser, 0x00000002, DriverService.NTamd64
+[DriverInstall]
+Include=mdmcpq.inf
+CopyFiles=FakeModemCopyFileSection
+AddReg=DriverInstall.AddReg
 
-[DriverService.NTamd64]
-DisplayName=%SERVICE%
-ServiceType=1
-StartType=3
-ErrorControl=1
-ServiceBinary=%12%\%DRIVERFILENAME%.sys
+[DriverInstall.Services]
+Include=mdmcpq.inf
+AddService=usbser, 0x00000002, LowerFilter_Service_Inst
 
+[DriverInstall.AddReg]
+HKR,,EnumPropPages32,,"msports.dll,SerialPortPropPageProvider"
 
 ;------------------------------------------------------------------------------
 ;  Vendor and Product ID Definitions
@@ -83,14 +41,14 @@ ServiceBinary=%12%\%DRIVERFILENAME%.sys
 ; Note: One INF file can be used for multiple devices with different VID and PIDs.
 ; For each supported device, append ",USB\VID_xxxx&PID_yyyy" to the end of the line.
 ;------------------------------------------------------------------------------
-[SourceDisksFiles]
-[SourceDisksNames]
 [DeviceList]
 %DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_204A
 
 [DeviceList.NTamd64]
 %DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_204A
 
+[DeviceList.NTia64]
+%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_204A
 
 ;------------------------------------------------------------------------------
 ;  String Definitions
@@ -98,9 +56,5 @@ ServiceBinary=%12%\%DRIVERFILENAME%.sys
 ;Modify these strings to customize your device
 ;------------------------------------------------------------------------------
 [Strings]
-MFGFILENAME="CDC_vista"
-DRIVERFILENAME ="usbser"
 MFGNAME="http://www.lufa-lib.org"
-INSTDISK="LUFA CDC Bootloader Driver Installer"
-DESCRIPTION="Communications Port"
-SERVICE="USB RS-232 Emulation Driver"
\ No newline at end of file
+DESCRIPTION="LUFA CDC Class Bootloader"
\ No newline at end of file
index 64d7928..c67e762 100644 (file)
@@ -9,20 +9,6 @@
 #         LUFA Project Makefile.
 # --------------------------------------
 
-# Starting byte address of the bootloader, as a byte address - computed via the formula
-#   BOOT_START = ((FLASH_SIZE_KB - BOOT_SECTION_SIZE_KB) * 1024)
-#
-# Note that the bootloader size and start address given in AVRStudio is in words and not
-# bytes, and so will need to be doubled to obtain the byte address needed by AVR-GCC.
-FLASH_SIZE_KB        = 128
-BOOT_SECTION_SIZE_KB = 8
-
-# Formulas used to calculate the starting address of the Bootloader section, and the User Application
-# API jump table (for more information on the latter, see the bootloader documentation). These formulas
-# should not need to be altered - modify the FLASH_SIZE_KB and BOOT_SECTION_KB values above instead.
-BOOT_START           = 0x$(shell echo "obase=16; ($(FLASH_SIZE_KB) - $(BOOT_SECTION_SIZE_KB)) * 1024" | bc)
-BOOT_API_TABLESTART  = 0x$(shell echo "obase=16; (($(FLASH_SIZE_KB) * 1024) - 96)" | bc)
-
 MCU          = at90usb1287
 ARCH         = AVR8
 BOARD        = USBKEY
@@ -31,16 +17,36 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = BootloaderCDC
 SRC          = $(TARGET).c Descriptors.c BootloaderAPI.c BootloaderAPITable.S $(LUFA_SRC_USB)
-LUFA_PATH    = ../../LUFA/
-CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/ -DBOOT_START_ADDR=$(BOOT_START)
-LD_FLAGS     = -Wl,--section-start=.text=$(BOOT_START) -Wl,--section-start=.apitable=$(BOOT_API_TABLESTART) -Wl,--undefined=BootloaderAPI_JumpTable
+LUFA_PATH    = ../../LUFA
+CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/ -DBOOT_START_ADDR=$(BOOT_START_OFFSET)
+LD_FLAGS     = -Wl,--section-start=.text=$(BOOT_START_OFFSET) $(BOOT_API_LD_FLAGS)
+
+# Flash size and bootloader section sizes of the target, in KB. These must
+# match the target's total FLASH size and the bootloader size set in the
+# device's fuses.
+FLASH_SIZE_KB         = 128
+BOOT_SECTION_SIZE_KB  = 8
+
+# Bootloader address calculation formulas (requires the "bc" unix utility)
+# Do not modify these macros, but rather modify the depedant values above.
+BOOT_START_OFFSET     = 0x$(shell echo "obase=16; ($(FLASH_SIZE_KB) - $(BOOT_SECTION_SIZE_KB)) * 1024" | bc)
+BOOT_SEC_OFFSET       = 0x$(shell echo "obase=16; (($(FLASH_SIZE_KB) * 1024) - $(strip $(1)))" | bc)
+
+# Bootloader linker section flags for relocating the API table sections to
+# known FLASH addresses - these should not normally be user-edited.
+BOOT_SECTION_LD_FLAG  = -Wl,--section-start=.apitable_$(strip $(1))=$(call BOOT_SEC_OFFSET, $(3)) -Wl,--undefined=BootloaderAPI_$(strip $(2))
+BOOT_API_LD_FLAGS     = $(call BOOT_SECTION_LD_FLAG, trampolines, Trampolines, 96)
+BOOT_API_LD_FLAGS    += $(call BOOT_SECTION_LD_FLAG, jumptable,   JumpTable,   32)
+BOOT_API_LD_FLAGS    += $(call BOOT_SECTION_LD_FLAG, signatures,  Signatures,  8)
 
 # Default target
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index f161bad..dadab3d 100644 (file)
 void BootloaderAPI_ErasePage(const uint32_t Address)
 {
        boot_page_erase_safe(Address);
+       boot_spm_busy_wait();
        boot_rww_enable();
 }
 
 void BootloaderAPI_WritePage(const uint32_t Address)
 {
        boot_page_write_safe(Address);
+       boot_spm_busy_wait();
        boot_rww_enable();
 }
 
index 18ae390..9d1e2fc 100644 (file)
@@ -7,7 +7,7 @@
 */
 
 /*
-  Copyright 2011  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
 
   Permission to use, copy, modify, distribute, and sell this
   software and its documentation for any purpose is hereby granted
   this software.
 */
 
-; Bootloader API Jump Table
-.section .apitable, "ax"
-
 ; Trampolines to actual API implementations if the target address is outside the
 ; range of a rjmp instruction (can happen with large bootloader sections)
-.org 0
-BootloaderAPI_ErasePage_Trampoline:
-       jmp BootloaderAPI_ErasePage
-BootloaderAPI_WritePage_Trampoline:
-       jmp BootloaderAPI_WritePage
-BootloaderAPI_FillWord_Trampoline:
-       jmp BootloaderAPI_FillWord
-BootloaderAPI_ReadSignature_Trampoline:
-       jmp BootloaderAPI_ReadSignature
-BootloaderAPI_ReadFuse_Trampoline:
-       jmp BootloaderAPI_ReadFuse
-BootloaderAPI_ReadLock_Trampoline:
-       jmp BootloaderAPI_ReadLock
-BootloaderAPI_WriteLock_Trampoline:
-       jmp BootloaderAPI_WriteLock
-BootloaderAPU_UNUSED1:
-       ret
-BootloaderAPU_UNUSED2:
-       ret
-BootloaderAPU_UNUSED3:
-       ret
-BootloaderAPU_UNUSED4:
-       ret
-BootloaderAPU_UNUSED5:
-       ret
+.section .apitable_trampolines, "ax"
+.global BootloaderAPI_Trampolines
+BootloaderAPI_Trampolines:
+
+       BootloaderAPI_ErasePage_Trampoline:
+               jmp BootloaderAPI_ErasePage
+       BootloaderAPI_WritePage_Trampoline:
+               jmp BootloaderAPI_WritePage
+       BootloaderAPI_FillWord_Trampoline:
+               jmp BootloaderAPI_FillWord
+       BootloaderAPI_ReadSignature_Trampoline:
+               jmp BootloaderAPI_ReadSignature
+       BootloaderAPI_ReadFuse_Trampoline:
+               jmp BootloaderAPI_ReadFuse
+       BootloaderAPI_ReadLock_Trampoline:
+               jmp BootloaderAPI_ReadLock
+       BootloaderAPI_WriteLock_Trampoline:
+               jmp BootloaderAPI_WriteLock
+       BootloaderAPU_UNUSED1:
+               ret
+       BootloaderAPU_UNUSED2:
+               ret
+       BootloaderAPU_UNUSED3:
+               ret
+       BootloaderAPU_UNUSED4:
+               ret
+       BootloaderAPU_UNUSED5:
+               ret
+
+
 
 ; API function jump table
-.org (96 - 32)
+.section .apitable_jumptable, "ax"
 .global BootloaderAPI_JumpTable
 BootloaderAPI_JumpTable:
+
        rjmp BootloaderAPI_ErasePage_Trampoline
        rjmp BootloaderAPI_WritePage_Trampoline
        rjmp BootloaderAPI_FillWord_Trampoline
@@ -76,10 +79,13 @@ BootloaderAPI_JumpTable:
        rjmp BootloaderAPU_UNUSED4 ; UNUSED ENTRY 4
        rjmp BootloaderAPU_UNUSED5 ; UNUSED ENTRY 5
 
+
+
 ; Bootloader table signatures and information
-.org (96 - 8)
-BootloaderAPI_Signatures:
+.section .apitable_signatures, "ax"
 .global BootloaderAPI_Signatures
+BootloaderAPI_Signatures:
+
        .long BOOT_START_ADDR ; Start address of the bootloader
        .word 0xDFB1 ; Signature for the DFU class bootloader, V1
        .word 0xDCFB ; Signature for a LUFA class bootloader
index f5c8d17..fcacf76 100644 (file)
@@ -97,7 +97,7 @@ static uint16_t EndAddr = 0x0000;
  *  low when the application attempts to start via a watchdog reset, the bootloader will re-start. If set to the value
  *  \ref MAGIC_BOOT_KEY the special init function \ref Application_Jump_Check() will force the application to start.
  */
-uint32_t MagicBootKey ATTR_NO_INIT;
+uint16_t MagicBootKey ATTR_NO_INIT;
 
 
 /** Special startup routine to check if the bootloader was started via a watchdog reset, and if the magic application
@@ -106,8 +106,29 @@ uint32_t MagicBootKey ATTR_NO_INIT;
  */
 void Application_Jump_Check(void)
 {
+       bool JumpToApplication = false;
+
+       #if ((BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1))
+               /* Disable JTAG debugging */
+               JTAG_DISABLE();
+
+               /* Enable pull-up on the JTAG TCK pin so we can use it to select the mode */
+               PORTF |= (1 << 4);
+               Delay_MS(10);
+
+               /* If the TCK pin is not jumpered to ground, start the user application instead */
+               JumpToApplication |= ((PINF & (1 << 4)) != 0);
+
+               /* Re-enable JTAG debugging */
+               JTAG_ENABLE();
+       #endif
+
        /* If the reset source was the bootloader and the key is correct, clear it and jump to the application */
        if ((MCUSR & (1 << WDRF)) && (MagicBootKey == MAGIC_BOOT_KEY))
+         JumpToApplication |= true;
+
+       /* If a request has been made to jump to the user application, honor it */
+       if (JumpToApplication)
        {
                /* Turn off the watchdog */
                MCUSR &= ~(1<<WDRF);
@@ -130,23 +151,6 @@ int main(void)
        /* Configure hardware required by the bootloader */
        SetupHardware();
 
-       #if ((BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1))
-       /* Disable JTAG debugging */
-       MCUCR |= (1 << JTD);
-       MCUCR |= (1 << JTD);
-
-       /* Enable pull-up on the JTAG TCK pin so we can use it to select the mode */
-       PORTF |= (1 << 4);
-       Delay_MS(10);
-
-       /* If the TCK pin is not jumpered to ground, start the user application instead */
-       RunBootloader = (!(PINF & (1 << 4)));
-
-       /* Re-enable JTAG debugging */
-       MCUCR &= ~(1 << JTD);
-       MCUCR &= ~(1 << JTD);
-       #endif
-
        /* Turn on first LED on the board to indicate that the bootloader has started */
        LEDs_SetAllLEDs(LEDS_LED1);
 
index ffd330d..8a826f5 100644 (file)
@@ -62,7 +62,7 @@
                #define BOOTLOADER_VERSION_REV   0
                
                /** Magic bootloader key to unlock forced application start mode. */
-               #define MAGIC_BOOT_KEY            0xDC42CACA
+               #define MAGIC_BOOT_KEY            0xDC42
 
                /** Complete bootloader version number expressed as a packed byte, constructed from the
                 *  two individual bootloader version macros.
index 538214e..aefe344 100644 (file)
@@ -38,7 +38,8 @@
  *  </tr>
  *  <tr>
  *   <td><b>Supported USB Speeds:</b></td>
- *   <td>Full Speed Mode</td>
+ *   <td>Low Speed Mode \n
+ *       Full Speed Mode</td>
  *  </tr>
  * </table>
  *
index ff33b6b..3a1a2e2 100644 (file)
@@ -57,8 +57,8 @@ const USB_Descriptor_Device_t DeviceDescriptor =
        .ProductID              = PRODUCT_ID_CODE,
        .ReleaseNumber          = VERSION_BCD(00.00),
 
-       .ManufacturerStrIndex   = NO_DESCRIPTOR,
-       .ProductStrIndex        = 0x01,
+       .ManufacturerStrIndex   = 0x01,
+       .ProductStrIndex        = 0x02,
        .SerialNumStrIndex      = NO_DESCRIPTOR,
 
        .NumberOfConfigurations = FIXED_NUM_CONFIGURATIONS
@@ -126,6 +126,17 @@ const USB_Descriptor_String_t LanguageString =
        .UnicodeString          = {LANGUAGE_ID_ENG}
 };
 
+/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable
+ *  form, and is read out upon request by the host when the appropriate string ID is requested, listed in the Device
+ *  Descriptor.
+ */
+const USB_Descriptor_String_t PROGMEM ManufacturerString =
+{
+       .Header                 = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},
+
+       .UnicodeString          = L"Dean Camera"
+};
+
 /** Product descriptor string. This is a Unicode string containing the product's details in human readable form,
  *  and is read out upon request by the host when the appropriate string ID is requested, listed in the Device
  *  Descriptor.
@@ -169,7 +180,12 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
                                Address = &LanguageString;
                                Size    = LanguageString.Header.Size;
                        }
-                       else
+                       else if (DescriptorNumber == 0x01)
+                       {
+                               Address = &ManufacturerString;
+                               Size    = ManufacturerString.Header.Size;
+                       }
+                       else if (DescriptorNumber == 0x02)
                        {
                                Address = &ProductString;
                                Size    = ProductString.Header.Size;
index 22ae1d6..8a9a5ad 100644 (file)
@@ -9,20 +9,6 @@
 #         LUFA Project Makefile.
 # --------------------------------------
 
-# Starting byte address of the bootloader, as a byte address - computed via the formula
-#   BOOT_START = ((FLASH_SIZE_KB - BOOT_SECTION_SIZE_KB) * 1024)
-#
-# Note that the bootloader size and start address given in AVRStudio is in words and not
-# bytes, and so will need to be doubled to obtain the byte address needed by AVR-GCC.
-FLASH_SIZE_KB        = 128
-BOOT_SECTION_SIZE_KB = 8
-
-# Formulas used to calculate the starting address of the Bootloader section, and the User Application
-# API jump table (for more information on the latter, see the bootloader documentation). These formulas
-# should not need to be altered - modify the FLASH_SIZE_KB and BOOT_SECTION_KB values above instead.
-BOOT_START           = 0x$(shell echo "obase=16; ($(FLASH_SIZE_KB) - $(BOOT_SECTION_SIZE_KB)) * 1024" | bc)
-BOOT_API_TABLESTART  = 0x$(shell echo "obase=16; (($(FLASH_SIZE_KB) * 1024) - 96)" | bc)
-
 MCU          = at90usb1287
 ARCH         = AVR8
 BOARD        = USBKEY
@@ -31,16 +17,36 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = BootloaderDFU
 SRC          = $(TARGET).c Descriptors.c BootloaderAPI.c BootloaderAPITable.S $(LUFA_SRC_USB)
-LUFA_PATH    = ../../LUFA/
-CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/ -DBOOT_START_ADDR=$(BOOT_START)
-LD_FLAGS     = -Wl,--section-start=.text=$(BOOT_START) -Wl,--section-start=.apitable=$(BOOT_API_TABLESTART) -Wl,--undefined=BootloaderAPI_JumpTable
+LUFA_PATH    = ../../LUFA
+CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/ -DBOOT_START_ADDR=$(BOOT_START_OFFSET)
+LD_FLAGS     = -Wl,--section-start=.text=$(BOOT_START_OFFSET) $(BOOT_API_LD_FLAGS)
+
+# Flash size and bootloader section sizes of the target, in KB. These must
+# match the target's total FLASH size and the bootloader size set in the
+# device's fuses.
+FLASH_SIZE_KB         = 128
+BOOT_SECTION_SIZE_KB  = 8
+
+# Bootloader address calculation formulas (requires the "bc" unix utility)
+# Do not modify these macros, but rather modify the depedant values above.
+BOOT_START_OFFSET     = 0x$(shell echo "obase=16; ($(FLASH_SIZE_KB) - $(BOOT_SECTION_SIZE_KB)) * 1024" | bc)
+BOOT_SEC_OFFSET       = 0x$(shell echo "obase=16; (($(FLASH_SIZE_KB) * 1024) - $(strip $(1)))" | bc)
+
+# Bootloader linker section flags for relocating the API table sections to
+# known FLASH addresses - these should not normally be user-edited.
+BOOT_SECTION_LD_FLAG  = -Wl,--section-start=.apitable_$(strip $(1))=$(call BOOT_SEC_OFFSET, $(3)) -Wl,--undefined=BootloaderAPI_$(strip $(2))
+BOOT_API_LD_FLAGS     = $(call BOOT_SECTION_LD_FLAG, trampolines, Trampolines, 96)
+BOOT_API_LD_FLAGS    += $(call BOOT_SECTION_LD_FLAG, jumptable,   JumpTable,   32)
+BOOT_API_LD_FLAGS    += $(call BOOT_SECTION_LD_FLAG, signatures,  Signatures,  8)
 
 # Default target
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index acc351a..c32dddc 100644 (file)
@@ -46,7 +46,7 @@ static bool RunBootloader = true;
  *  low when the application attempts to start via a watchdog reset, the bootloader will re-start. If set to the value
  *  \ref MAGIC_BOOT_KEY the special init function \ref Application_Jump_Check() will force the application to start.
  */
-uint32_t MagicBootKey ATTR_NO_INIT;
+uint16_t MagicBootKey ATTR_NO_INIT;
 
 
 /** Special startup routine to check if the bootloader was started via a watchdog reset, and if the magic application
index af2812a..e83aad3 100644 (file)
 
 /** \file
  *
- *  Header file for TeensyHID.c.
+ *  Header file for BootloaderHID.c.
  */
 
-#ifndef _TEENSYHID_H_
-#define _TEENSYHID_H_
+#ifndef _BOOTLOADERHID_H_
+#define _BOOTLOADERHID_H_
 
        /* Includes: */
                #include <avr/io.h>
@@ -53,7 +53,7 @@
                #define COMMAND_STARTAPPLICATION   0xFFFF
 
                /** Magic bootloader key to unlock forced application start mode. */
-               #define MAGIC_BOOT_KEY            0xDC42CACA
+               #define MAGIC_BOOT_KEY             0xDC42
                
        /* Function Prototypes: */
                static void SetupHardware(void);
index 9e33f7b..b6477f9 100644 (file)
@@ -9,20 +9,6 @@
 #         LUFA Project Makefile.
 # --------------------------------------
 
-# Starting byte address of the bootloader, as a byte address - computed via the formula
-#   BOOT_START = ((FLASH_SIZE_KB - BOOT_SECTION_SIZE_KB) * 1024)
-#
-# Note that the bootloader size and start address given in AVRStudio is in words and not
-# bytes, and so will need to be doubled to obtain the byte address needed by AVR-GCC.
-FLASH_SIZE_KB        = 128
-BOOT_SECTION_SIZE_KB = 8
-
-# Formulas used to calculate the starting address of the Bootloader section, and the User Application
-# API jump table (for more information on the latter, see the bootloader documentation). These formulas
-# should not need to be altered - modify the FLASH_SIZE_KB and BOOT_SECTION_KB values above instead.
-BOOT_START           = 0x$(shell echo "obase=16; ($(FLASH_SIZE_KB) - $(BOOT_SECTION_SIZE_KB)) * 1024" | bc)
-BOOT_API_TABLESTART  = 0x$(shell echo "obase=16; (($(FLASH_SIZE_KB) * 1024) - 96)" | bc)
-
 MCU          = at90usb1287
 ARCH         = AVR8
 BOARD        = USBKEY
@@ -31,16 +17,29 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = BootloaderHID
 SRC          = $(TARGET).c Descriptors.c $(LUFA_SRC_USB)
-LUFA_PATH    = ../../LUFA/
+LUFA_PATH    = ../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
-LD_FLAGS     = -Wl,--section-start=.text=$(BOOT_START)
+LD_FLAGS     = -Wl,--section-start=.text=$(BOOT_START_OFFSET)
+
+# Flash size and bootloader section sizes of the target, in KB. These must
+# match the target's total FLASH size and the bootloader size set in the
+# device's fuses.
+FLASH_SIZE_KB        := 128
+BOOT_SECTION_SIZE_KB := 8
+
+# Bootloader address calculation formulas (requires the "bc" unix utility)
+# Do not modify these macros, but rather modify the depedant values above.
+BOOT_START_OFFSET     = 0x$(shell echo "obase=16; ($(FLASH_SIZE_KB) - $(BOOT_SECTION_SIZE_KB)) * 1024" | bc)
+BOOT_SEC_OFFSET       = 0x$(shell echo "obase=16; (($(FLASH_SIZE_KB) * 1024) - $(strip $(1)))" | bc)
 
 # Default target
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index c9f4941..003069b 100644 (file)
 # custom LUFA library build options are reflected in the compiled
 # code.
 
-all:
-       $(MAKE) -C CDC clean
-       $(MAKE) -C CDC all
+PROJECT_DIRECTORIES := $(shell ls -d */)
 
-       $(MAKE) -C HID clean
-       $(MAKE) -C HID all
+# This makefile is potentially infinitely recursive if something really bad
+# happens when determining the set of project directories - hard-abort if
+# more than 10 levels deep to avoid angry emails.
+ifeq ($(MAKELEVEL), 10)
+   $(error EMERGENCY ABORT: INFINITE RECURSION DETECTED)
+endif
 
-       $(MAKE) -C DFU clean
-       $(MAKE) -C DFU all
+# Need to special-case building without a per-project object directory
+ifeq ($(OBJDIR),)
+   # If no target specified, force "clean all" and disallow parallel build   
+   ifeq ($(MAKECMDGOALS),)
+      MAKECMDGOALS := clean all
+      .NOTPARALLEL:
+   endif
 
-%:
-       $(MAKE) -C CDC $@
-       $(MAKE) -C DFU $@
-       $(MAKE) -C HID $@
+   # If one of the targets is to build, force "clean" beforehand and disallow parallel build   
+   ifneq ($(findstring all, $(MAKECMDGOALS)),)
+      MAKECMDGOALS := clean $(MAKECMDGOALS)
+      .NOTPARALLEL:
+   endif
+endif
 
+%: $(PROJECT_DIRECTORIES)
+       @echo . > /dev/null
+
+$(PROJECT_DIRECTORIES):
+       @$(MAKE) -C $@ $(MAKECMDGOALS)
+    
+.PHONY: $(PROJECT_DIRECTORIES)
index 5ef6db2..2b80fa0 100644 (file)
@@ -1,73 +1,73 @@
-#\r
-#             LUFA Library\r
-#     Copyright (C) Dean Camera, 2012.\r
-#\r
-#  dean [at] fourwalledcubicle [dot] com\r
-#           www.lufa-lib.org\r
-#\r
-#\r
-# =============================================================================\r
-# Board configuration map script, processed with the "BoardDriverTest"\r
-# makefile. This script file maps the possible LUFA target BOARD makefile\r
-# value in user projects to a specific architecture and device. This mapping is\r
-# then used by the makefile to build all possible drivers for that board, to\r
-# detect any missing or erroneous functions. To add a new board mapping, use\r
-# the syntax:\r
-#\r
-#    BOARD DEFINE = {ARCH} : {MCU} :\r
-#\r
-# And re-run the makefile. Note that each board may have only one target.\r
-# =============================================================================\r
-# \r
-#\r
-BOARD_USER = avr8 : at90usb1287 :\r
-BOARD_NONE = avr8 : at90usb1287 :\r
-BOARD_USBKEY = avr8 : at90usb1287 :\r
-BOARD_STK525 = avr8 : at90usb647 :\r
-BOARD_STK526 = avr8 : at90usb162 :\r
-BOARD_RZUSBSTICK = avr8 : at90usb1287 :\r
-BOARD_ATAVRUSBRF01 = avr8 : at90usb1287 :\r
-BOARD_BUMBLEB = avr8 : at90usb162 :\r
-BOARD_XPLAIN = avr8 : at90usb1287 :\r
-BOARD_XPLAIN_REV1 = avr8 : at90usb1287 :\r
-BOARD_EVK527 = avr8 : atmega32u4 :\r
-BOARD_TEENSY = avr8 : at90usb162 :\r
-BOARD_USBTINYMKII = avr8 : at90usb162 :\r
-BOARD_BENITO = avr8 : at90usb162 :\r
-BOARD_JMDBU2 = avr8 : atmega32u2 :\r
-BOARD_OLIMEX162 = avr8 : at90usb162 :\r
-BOARD_UDIP = avr8 : atmega32u2 :\r
-BOARD_BUI = avr8 : at90usb646 :\r
-BOARD_UNO = avr8 : atmega8u2 :\r
-BOARD_CULV3 = avr8 : atmega32u4 :\r
-BOARD_BLACKCAT = avr8 : at90usb162 :\r
-BOARD_MAXIMUS = avr8 : at90usb162 :\r
-BOARD_MINIMUS = avr8 : atmega32u2 :\r
-BOARD_ADAFRUITU4 = avr8 : atmega32u4 :\r
-BOARD_MICROSIN162 = avr8 : atmega162 :\r
-BOARD_USBFOO = avr8 : atmega162 :\r
-BOARD_SPARKFUN8U2 = avr8 : atmega8u2 :\r
-BOARD_EVK1101 = uc3 : uc3b0256 :\r
-BOARD_TUL = avr8 : atmega32u4 :\r
-BOARD_EVK1100 = uc3 : uc3a0512 :\r
-BOARD_EVK1104 = uc3 : uc3a3256 :\r
-BOARD_A3BU_XPLAINED = xmega : atxmega256a3bu :\r
-BOARD_TEENSY2 = avr8 : at90usb646 :\r
-BOARD_USB2AX = avr8 : atmega32u4 :\r
-BOARD_USB2AX_V3 = avr8 : atmega32u4 :\r
-BOARD_MICROPENDOUS_32U2 = avr8 : atmega32u2 :\r
-BOARD_MICROPENDOUS_A = avr8 : at90usb1287 :\r
-BOARD_MICROPENDOUS_1 = avr8 : at90usb162 :\r
-BOARD_MICROPENDOUS_2 = avr8 : atmega32u4 :\r
-BOARD_MICROPENDOUS_3 = avr8 : at90usb1287 :\r
-BOARD_MICROPENDOUS_4 = avr8 : at90usb1287 :\r
-BOARD_MICROPENDOUS_DIP = avr8 : at90usb1287 :\r
-BOARD_MICROPENDOUS_REV1 = avr8 : at90usb1287 :\r
-BOARD_MICROPENDOUS_REV2 = avr8 : at90usb1287 :\r
-BOARD_B1_XPLAINED = xmega : atxmega128b1 :\r
-BOARD_MULTIO = avr8 : at90usb162 :\r
-BOARD_BIGMULTIO = avr8 : atmega32u4 :\r
-BOARD_DUCE = avr8 : atmega32u2 :\r
-BOARD_OLIMEX32U4 = avr8 : atmega32u4 :\r
-BOARD_OLIMEXT32U4 = avr8 : atmega32u4 :\r
+#
+#             LUFA Library
+#     Copyright (C) Dean Camera, 2012.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#           www.lufa-lib.org
+#
+#
+# =============================================================================
+# Board configuration map script, processed with the "BoardDriverTest"
+# makefile. This script file maps the possible LUFA target BOARD makefile
+# value in user projects to a specific architecture and device. This mapping is
+# then used by the makefile to build all possible drivers for that board, to
+# detect any missing or erroneous functions. To add a new board mapping, use
+# the syntax:
+#
+#    BOARD DEFINE = {ARCH} : {MCU} :
+#
+# And re-run the makefile. Note that each board may have only one target.
+# =============================================================================
+# 
+#
+BOARD_USER = AVR8 : at90usb1287 :
+BOARD_NONE = AVR8 : at90usb1287 :
+BOARD_USBKEY = AVR8 : at90usb1287 :
+BOARD_STK525 = AVR8 : at90usb647 :
+BOARD_STK526 = AVR8 : at90usb162 :
+BOARD_RZUSBSTICK = AVR8 : at90usb1287 :
+BOARD_ATAVRUSBRF01 = AVR8 : at90usb1287 :
+BOARD_BUMBLEB = AVR8 : at90usb162 :
+BOARD_XPLAIN = AVR8 : at90usb1287 :
+BOARD_XPLAIN_REV1 = AVR8 : at90usb1287 :
+BOARD_EVK527 = AVR8 : atmega32u4 :
+BOARD_TEENSY = AVR8 : at90usb162 :
+BOARD_USBTINYMKII = AVR8 : at90usb162 :
+BOARD_BENITO = AVR8 : at90usb162 :
+BOARD_JMDBU2 = AVR8 : atmega32u2 :
+BOARD_OLIMEX162 = AVR8 : at90usb162 :
+BOARD_UDIP = AVR8 : atmega32u2 :
+BOARD_BUI = AVR8 : at90usb646 :
+BOARD_UNO = AVR8 : atmega8u2 :
+BOARD_CULV3 = AVR8 : atmega32u4 :
+BOARD_BLACKCAT = AVR8 : at90usb162 :
+BOARD_MAXIMUS = AVR8 : at90usb162 :
+BOARD_MINIMUS = AVR8 : atmega32u2 :
+BOARD_ADAFRUITU4 = AVR8 : atmega32u4 :
+BOARD_MICROSIN162 = AVR8 : atmega162 :
+BOARD_USBFOO = AVR8 : atmega162 :
+BOARD_SPARKFUN8U2 = AVR8 : atmega8u2 :
+BOARD_EVK1101 = UC3 : uc3b0256 :
+BOARD_TUL = AVR8 : atmega32u4 :
+BOARD_EVK1100 = UC3 : uc3a0512 :
+BOARD_EVK1104 = UC3 : uc3a3256 :
+BOARD_A3BU_XPLAINED = XMEGA : atxmega256a3bu :
+BOARD_TEENSY2 = AVR8 : at90usb646 :
+BOARD_USB2AX = AVR8 : atmega32u4 :
+BOARD_USB2AX_V3 = AVR8 : atmega32u4 :
+BOARD_MICROPENDOUS_32U2 = AVR8 : atmega32u2 :
+BOARD_MICROPENDOUS_A = AVR8 : at90usb1287 :
+BOARD_MICROPENDOUS_1 = AVR8 : at90usb162 :
+BOARD_MICROPENDOUS_2 = AVR8 : atmega32u4 :
+BOARD_MICROPENDOUS_3 = AVR8 : at90usb1287 :
+BOARD_MICROPENDOUS_4 = AVR8 : at90usb1287 :
+BOARD_MICROPENDOUS_DIP = AVR8 : at90usb1287 :
+BOARD_MICROPENDOUS_REV1 = AVR8 : at90usb1287 :
+BOARD_MICROPENDOUS_REV2 = AVR8 : at90usb1287 :
+BOARD_B1_XPLAINED = XMEGA : atxmega128b1 :
+BOARD_MULTIO = AVR8 : at90usb162 :
+BOARD_BIGMULTIO = AVR8 : atmega32u4 :
+BOARD_DUCE = AVR8 : atmega32u2 :
+BOARD_OLIMEX32U4 = AVR8 : atmega32u4 :
+BOARD_OLIMEXT32U4 = AVR8 : atmega32u4 :
 #
\ No newline at end of file
index cb1ed62..c46a00c 100644 (file)
@@ -1,63 +1,68 @@
-#\r
-#             LUFA Library\r
-#     Copyright (C) Dean Camera, 2012.\r
-#\r
-#  dean [at] fourwalledcubicle [dot] com\r
-#           www.lufa-lib.org\r
-#\r
-\r
-# Makefile for the board driver build test. This\r
-# test attempts to build a dummy project with all\r
-# possible board targets using their respective\r
-# compiler.\r
-\r
-# Path to the root of the LUFA tree to scan\r
-LUFA_ROOT_PATH    = ../..\r
-\r
-\r
-all: begin makeboardlist testboards clean end\r
-\r
-begin:\r
-       @echo Executing build test "BoardDriverTest".\r
-       @echo\r
-\r
-end:\r
-       @echo Build test "BoardDriverTest" complete.\r
-       @echo\r
-\r
-makeboardlist:\r
-       @grep "BOARD_" $(LUFA_ROOT_PATH)/LUFA/Common/BoardTypes.h | cut -d'#' -f2 | cut -d' ' -f2 | grep "BOARD_" > BoardList.txt\r
-       \r
-testboards:\r
-       @echo "buildtest:" > BuildMakefile\r
-       \r
-       @while read line;                                                                               \\r
-        do                                                                                             \\r
-          build_cfg=`grep "$$line " BoardDeviceMap.cfg | grep -v "#" | cut -d'=' -f2- | sed 's/ //g'`; \\r
-                                                                                                       \\r
-          build_board=$$line;                                                                          \\r
-          build_arch=`echo $$build_cfg | cut -d':' -f1`;                                               \\r
-          build_mcu=`echo $$build_cfg | cut -d':' -f2`;                                                \\r
-                                                                                                       \\r
-          if ( test -z "$$build_cfg" ); then                                                           \\r
-            echo "No matching information set for board $$build_board";                                \\r
-          else                                                                                         \\r
-            echo "Found board configuration for $$build_board - $$build_arch, $$build_mcu";            \\r
-                                                                                                           \\r
-                printf "\t@echo Building dummy project for $$build_board...\n" >> BuildMakefile;           \\r
-                printf "\tmake -s -f makefile.%s clean\n" $$build_arch >> BuildMakefile;                   \\r
-                printf "\tmake -s -f makefile.%s MCU=%s BOARD=%s elf\n\n" $$build_arch $$build_mcu $$build_board >> BuildMakefile; \\r
-          fi;                                                                                          \\r
-        done < BoardList.txt\r
-        \r
-        $(MAKE) -f BuildMakefile buildtest\r
-\r
-clean:\r
-       rm -f BuildMakefile\r
-       rm -f BoardList.txt\r
-       $(MAKE) -f makefile.avr8 clean\r
-       $(MAKE) -f makefile.xmega clean\r
-       $(MAKE) -f makefile.uc3 clean\r
-\r
-%:\r
-       
\ No newline at end of file
+#
+#             LUFA Library
+#     Copyright (C) Dean Camera, 2012.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#           www.lufa-lib.org
+#
+
+# Makefile for the board driver build test. This
+# test attempts to build a dummy project with all
+# possible board targets using their respective
+# compiler.
+
+# Path to the LUFA library core
+LUFA_PATH := ../../LUFA/
+
+# Build test cannot be run with multiple parallel jobs
+.NOTPARALLEL:
+
+all: begin makeboardlist testboards clean end
+
+begin:
+       @echo Executing build test "BoardDriverTest".
+       @echo
+
+end:
+       @echo Build test "BoardDriverTest" complete.
+       @echo
+
+makeboardlist:
+       @grep "BOARD_" $(patsubst %/,%,$(LUFA_PATH))/Common/BoardTypes.h | cut -d'#' -f2 | cut -d' ' -f2 | grep "BOARD_" > BoardList.txt
+       
+testboards:
+       @echo "buildtest:" > BuildMakefile
+       
+       @while read line;                                                                               \
+        do                                                                                             \
+          build_cfg=`grep "$$line " BoardDeviceMap.cfg | grep -v "#" | cut -d'=' -f2- | sed 's/ //g'`; \
+                                                                                                       \
+          build_board=$$line;                                                                          \
+          build_arch=`echo $$build_cfg | cut -d':' -f1`;                                               \
+          build_mcu=`echo $$build_cfg | cut -d':' -f2`;                                                \
+                                                                                                       \
+          if ( test -z "$$build_cfg" ); then                                                           \
+            echo "No matching information set for board $$build_board";                                \
+          else                                                                                         \
+            echo "Found board configuration for $$build_board - $$build_arch, $$build_mcu";            \
+                                                                                                           \
+                printf "\t@echo Building dummy project for $$build_board...\n" >> BuildMakefile;           \
+                printf "\t$(MAKE) -f makefile.test clean elf MCU=%s ARCH=%s BOARD=%s\n\n" $$build_mcu $$build_arch $$build_board >> BuildMakefile; \
+          fi;                                                                                          \
+        done < BoardList.txt
+        
+        $(MAKE) -f BuildMakefile buildtest
+
+clean:
+       rm -f BuildMakefile
+       rm -f BoardList.txt
+       $(MAKE) -f makefile.test clean BOARD=NONE ARCH=AVR8 MCU=at90usb1287
+       $(MAKE) -f makefile.test clean BOARD=NONE ARCH=XMEGA MCU=atxmega128a1u
+       $(MAKE) -f makefile.test clean BOARD=NONE ARCH=UC3 MCU=uc3a0256
+
+%:
+
+.PHONY: all begin end makeboardlist testboards clean
+
+# Include LUFA build script makefiles
+include $(LUFA_PATH)/Build/lufa_core.mk
diff --git a/BuildTests/BoardDriverTest/makefile.avr8 b/BuildTests/BoardDriverTest/makefile.avr8
deleted file mode 100644 (file)
index 8840cee..0000000
+++ /dev/null
@@ -1,723 +0,0 @@
-# Hey Emacs, this is a -*- makefile -*-\r
-#----------------------------------------------------------------------------\r
-# WinAVR Makefile Template written by Eric B. Weddington, Jörg Wunsch, et al.\r
-#  >> Modified for use with the LUFA project. <<\r
-#\r
-# Released to the Public Domain\r
-#\r
-# Additional material for this makefile was written by:\r
-# Peter Fleury\r
-# Tim Henigan\r
-# Colin O'Flynn\r
-# Reiner Patommel\r
-# Markus Pfaff\r
-# Sander Pool\r
-# Frederik Rouleau\r
-# Carlos Lamas\r
-# Dean Camera\r
-# Opendous Inc.\r
-# Denver Gingerich\r
-#\r
-#----------------------------------------------------------------------------\r
-# On command line:\r
-#\r
-# make all = Make software.\r
-#\r
-# make clean = Clean out built project files.\r
-#\r
-# make coff = Convert ELF to AVR COFF.\r
-#\r
-# make extcoff = Convert ELF to AVR Extended COFF.\r
-#\r
-# make program = Download the hex file to the device, using avrdude.\r
-#                Please customize the avrdude settings below first!\r
-#\r
-# make dfu = Download the hex file to the device, using dfu-programmer (must\r
-#            have dfu-programmer installed).\r
-#\r
-# make flip = Download the hex file to the device, using Atmel FLIP (must\r
-#             have Atmel FLIP installed).\r
-#\r
-# make dfu-ee = Download the eeprom file to the device, using dfu-programmer\r
-#               (must have dfu-programmer installed).\r
-#\r
-# make flip-ee = Download the eeprom file to the device, using Atmel FLIP\r
-#                (must have Atmel FLIP installed).\r
-#\r
-# make doxygen = Generate DoxyGen documentation for the project (must have\r
-#                DoxyGen installed)\r
-#\r
-# make debug = Start either simulavr or avarice as specified for debugging,\r
-#              with avr-gdb or avr-insight as the front end for debugging.\r
-#\r
-# make filename.s = Just compile filename.c into the assembler code only.\r
-#\r
-# make filename.i = Create a preprocessed source file for use in submitting\r
-#                   bug reports to the GCC project.\r
-#\r
-# To rebuild project do "make clean" then "make all".\r
-#----------------------------------------------------------------------------\r
-\r
-\r
-# MCU name\r
-MCU = at90usb1287\r
-\r
-\r
-# Target architecture (see library "Board Types" documentation).\r
-ARCH = AVR8\r
-\r
-\r
-# Target board (see library "Board Types" documentation, NONE for projects not requiring\r
-# LUFA board drivers). If USER is selected, put custom board drivers in a directory called\r
-# "Board" inside the application directory.\r
-BOARD = NONE\r
-\r
-\r
-# Processor frequency.\r
-#     This will define a symbol, F_CPU, in all source code files equal to the\r
-#     processor frequency in Hz. You can then use this symbol in your source code to\r
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done\r
-#     automatically to create a 32-bit value in your source code.\r
-#\r
-#     This will be an integer division of F_USB below, as it is sourced by\r
-#     F_USB after it has run through any CPU prescalers. Note that this value\r
-#     does not *change* the processor frequency - it should merely be updated to\r
-#     reflect the processor speed set externally so that the code can use accurate\r
-#     software delays.\r
-F_CPU = 16000000\r
-\r
-\r
-# Input clock frequency.\r
-#     This will define a symbol, F_USB, in all source code files equal to the\r
-#     input clock frequency (before any prescaling is performed) in Hz. This value may\r
-#     differ from F_CPU if prescaling is used on the latter, and is required as the\r
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed\r
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'\r
-#     at the end, this will be done automatically to create a 32-bit value in your\r
-#     source code.\r
-#\r
-#     If no clock division is performed on the input clock inside the AVR (via the\r
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_USB = $(F_CPU)\r
-\r
-\r
-# Output format. (can be srec, ihex, binary)\r
-FORMAT = ihex\r
-\r
-\r
-# Target file name (without extension).\r
-TARGET = Test\r
-\r
-\r
-# Object files directory\r
-#     To put object files in current directory, use a dot (.), do NOT make\r
-#     this an empty or blank macro!\r
-OBJDIR = .\r
-\r
-\r
-# Path to the LUFA library\r
-LUFA_PATH = ../..\r
-\r
-\r
-# LUFA library compile-time options and predefined tokens\r
-LUFA_OPTS  = \r
-\r
-\r
-# Create the LUFA source path variables by including the LUFA root makefile\r
-include $(LUFA_PATH)/LUFA/makefile\r
-\r
-\r
-# List C source files here. (C dependencies are automatically generated.)\r
-SRC = Test.c\r
-\r
-\r
-\r
-# List C++ source files here. (C dependencies are automatically generated.)\r
-CPPSRC = \r
-\r
-\r
-# List Assembler source files here.\r
-#     Make them always end in a capital .S.  Files ending in a lowercase .s\r
-#     will not be considered source files but generated files (assembler\r
-#     output from the compiler), and will be deleted upon "make clean"!\r
-#     Even though the DOS/Win* filesystem matches both .s and .S the same,\r
-#     it will preserve the spelling of the filenames, and gcc itself does\r
-#     care about how the name is spelled on its command-line.\r
-ASRC = \r
-\r
-\r
-# Optimization level, can be [0, 1, 2, 3, s].\r
-#     0 = turn off optimization. s = optimize for size.\r
-#     (Note: 3 is not always the best optimization level. See avr-libc FAQ.)\r
-OPT = 1\r
-\r
-\r
-# Debugging format.\r
-#     Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs.\r
-#     AVR Studio 4.10 requires dwarf-2.\r
-#     AVR [Extended] COFF format requires stabs, plus an avr-objcopy run.\r
-DEBUG = dwarf-2\r
-\r
-\r
-# List any extra directories to look for include files here.\r
-#     Each directory must be seperated by a space.\r
-#     Use forward slashes for directory separators.\r
-#     For a directory that has spaces, enclose it in quotes.\r
-EXTRAINCDIRS = $(LUFA_PATH)/\r
-\r
-\r
-# Compiler flag to set the C Standard level.\r
-#     c89   = "ANSI" C\r
-#     gnu89 = c89 plus GCC extensions\r
-#     c99   = ISO C99 standard (not yet fully implemented)\r
-#     gnu99 = c99 plus GCC extensions\r
-CSTANDARD = -std=c99\r
-\r
-\r
-# Place -D or -U options here for C sources\r
-CDEFS  = -DF_CPU=$(F_CPU)UL\r
-CDEFS += -DF_USB=$(F_USB)UL\r
-CDEFS += -DBOARD=BOARD_$(BOARD) -DARCH=ARCH_$(ARCH)\r
-CDEFS += $(LUFA_OPTS)\r
-\r
-\r
-# Place -D or -U options here for ASM sources\r
-ADEFS  = -DF_CPU=$(F_CPU)\r
-ADEFS += -DF_USB=$(F_USB)UL\r
-ADEFS += -DBOARD=BOARD_$(BOARD)\r
-ADEFS += $(LUFA_OPTS)\r
-\r
-# Place -D or -U options here for C++ sources\r
-CPPDEFS  = -DF_CPU=$(F_CPU)UL\r
-CPPDEFS += -DF_USB=$(F_USB)UL\r
-CPPDEFS += -DBOARD=BOARD_$(BOARD)\r
-CPPDEFS += $(LUFA_OPTS)\r
-#CPPDEFS += -D__STDC_LIMIT_MACROS\r
-#CPPDEFS += -D__STDC_CONSTANT_MACROS\r
-\r
-\r
-\r
-#---------------- Compiler Options C ----------------\r
-#  -g*:          generate debugging information\r
-#  -O*:          optimization level\r
-#  -f...:        tuning, see GCC manual and avr-libc documentation\r
-#  -Wall...:     warning level\r
-#  -Wa,...:      tell GCC to pass this to the assembler.\r
-#    -adhlns...: create assembler listing\r
-CFLAGS = -g$(DEBUG)\r
-CFLAGS += $(CDEFS)\r
-CFLAGS += -O$(OPT)\r
-CFLAGS += -funsigned-char\r
-CFLAGS += -funsigned-bitfields\r
-CFLAGS += -ffunction-sections\r
-CFLAGS += -fno-inline-small-functions\r
-CFLAGS += -fpack-struct\r
-CFLAGS += -fshort-enums\r
-CFLAGS += -fno-strict-aliasing\r
-CFLAGS += -fno-split-wide-types\r
-CFLAGS += -Wall\r
-CFLAGS += -Wstrict-prototypes\r
-#CFLAGS += -mshort-calls\r
-#CFLAGS += -fno-unit-at-a-time\r
-#CFLAGS += -Wundef\r
-#CFLAGS += -Wunreachable-code\r
-#CFLAGS += -Wsign-compare\r
-#CFLAGS += -Wa,-adhlns=$(<:%.c=$(OBJDIR)/%.lst)\r
-CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
-CFLAGS += $(CSTANDARD)\r
-\r
-\r
-#---------------- Compiler Options C++ ----------------\r
-#  -g*:          generate debugging information\r
-#  -O*:          optimization level\r
-#  -f...:        tuning, see GCC manual and avr-libc documentation\r
-#  -Wall...:     warning level\r
-#  -Wa,...:      tell GCC to pass this to the assembler.\r
-#    -adhlns...: create assembler listing\r
-CPPFLAGS = -g$(DEBUG)\r
-CPPFLAGS += $(CPPDEFS)\r
-CPPFLAGS += -O$(OPT)\r
-CPPFLAGS += -funsigned-char\r
-CPPFLAGS += -funsigned-bitfields\r
-CPPFLAGS += -fpack-struct\r
-CPPFLAGS += -fshort-enums\r
-CPPFLAGS += -fno-exceptions\r
-CPPFLAGS += -Wall\r
-CPPFLAGS += -Wundef\r
-#CPPFLAGS += -mshort-calls\r
-#CPPFLAGS += -fno-unit-at-a-time\r
-#CPPFLAGS += -Wstrict-prototypes\r
-#CPPFLAGS += -Wunreachable-code\r
-#CPPFLAGS += -Wsign-compare\r
-#CPPFLAGS += -Wa,-adhlns=$(<:%.cpp=$(OBJDIR)/%.lst)\r
-CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
-#CPPFLAGS += $(CSTANDARD)\r
-\r
-\r
-#---------------- Assembler Options ----------------\r
-#  -Wa,...:   tell GCC to pass this to the assembler.\r
-#  -adhlns:   create listing\r
-#  -gstabs:   have the assembler create line number information; note that\r
-#             for use in COFF files, additional information about filenames\r
-#             and function names needs to be present in the assembler source\r
-#             files -- see avr-libc docs [FIXME: not yet described there]\r
-#  -listing-cont-lines: Sets the maximum number of continuation lines of hex\r
-#       dump that will be displayed for a given single line of source input.\r
-ASFLAGS = $(ADEFS)\r
-#ASFLAGS += -Wa,-adhlns=$(<:%.S=$(OBJDIR)/%.lst),-gstabs,--listing-cont-lines=100\r
-\r
-\r
-#---------------- Library Options ----------------\r
-# Minimalistic printf version\r
-PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min\r
-\r
-# Floating point printf version (requires MATH_LIB = -lm below)\r
-PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt\r
-\r
-# If this is left blank, then it will use the Standard printf version.\r
-PRINTF_LIB =\r
-#PRINTF_LIB = $(PRINTF_LIB_MIN)\r
-#PRINTF_LIB = $(PRINTF_LIB_FLOAT)\r
-\r
-\r
-# Minimalistic scanf version\r
-SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min\r
-\r
-# Floating point + %[ scanf version (requires MATH_LIB = -lm below)\r
-SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt\r
-\r
-# If this is left blank, then it will use the Standard scanf version.\r
-SCANF_LIB =\r
-#SCANF_LIB = $(SCANF_LIB_MIN)\r
-#SCANF_LIB = $(SCANF_LIB_FLOAT)\r
-\r
-\r
-MATH_LIB = -lm\r
-\r
-\r
-# List any extra directories to look for libraries here.\r
-#     Each directory must be seperated by a space.\r
-#     Use forward slashes for directory separators.\r
-#     For a directory that has spaces, enclose it in quotes.\r
-EXTRALIBDIRS =\r
-\r
-\r
-\r
-#---------------- External Memory Options ----------------\r
-\r
-# 64 KB of external RAM, starting after internal RAM (ATmega128!),\r
-# used for variables (.data/.bss) and heap (malloc()).\r
-#EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff\r
-\r
-# 64 KB of external RAM, starting after internal RAM (ATmega128!),\r
-# only used for heap (malloc()).\r
-#EXTMEMOPTS = -Wl,--section-start,.data=0x801100,--defsym=__heap_end=0x80ffff\r
-\r
-EXTMEMOPTS =\r
-\r
-\r
-\r
-#---------------- Linker Options ----------------\r
-#  -Wl,...:     tell GCC to pass this to linker.\r
-#    -Map:      create map file\r
-#    --cref:    add cross reference to  map file\r
-#LDFLAGS  = -Wl,-Map=$(TARGET).map,--cref\r
-LDFLAGS += -Wl,--relax\r
-LDFLAGS += -Wl,--gc-sections\r
-LDFLAGS += $(EXTMEMOPTS)\r
-LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS))\r
-LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)\r
-#LDFLAGS += -T linker_script.x\r
-\r
-\r
-\r
-#---------------- Programming Options (avrdude) ----------------\r
-\r
-# Programming hardware\r
-# Type: avrdude -c ?\r
-# to get a full listing.\r
-#\r
-AVRDUDE_PROGRAMMER = jtagmkII\r
-\r
-# com1 = serial port. Use lpt1 to connect to parallel port.\r
-AVRDUDE_PORT = usb\r
-\r
-AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex\r
-#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep\r
-\r
-\r
-# Uncomment the following if you want avrdude's erase cycle counter.\r
-# Note that this counter needs to be initialized first using -Yn,\r
-# see avrdude manual.\r
-#AVRDUDE_ERASE_COUNTER = -y\r
-\r
-# Uncomment the following if you do /not/ wish a verification to be\r
-# performed after programming the device.\r
-#AVRDUDE_NO_VERIFY = -V\r
-\r
-# Increase verbosity level.  Please use this when submitting bug\r
-# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>\r
-# to submit bug reports.\r
-#AVRDUDE_VERBOSE = -v -v\r
-\r
-AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)\r
-AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)\r
-AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)\r
-AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)\r
-\r
-\r
-\r
-#---------------- Debugging Options ----------------\r
-\r
-# For simulavr only - target MCU frequency.\r
-DEBUG_MFREQ = $(F_CPU)\r
-\r
-# Set the DEBUG_UI to either gdb or insight.\r
-# DEBUG_UI = gdb\r
-DEBUG_UI = insight\r
-\r
-# Set the debugging back-end to either avarice, simulavr.\r
-DEBUG_BACKEND = avarice\r
-#DEBUG_BACKEND = simulavr\r
-\r
-# GDB Init Filename.\r
-GDBINIT_FILE = __avr_gdbinit\r
-\r
-# When using avarice settings for the JTAG\r
-JTAG_DEV = /dev/com1\r
-\r
-# Debugging port used to communicate between GDB / avarice / simulavr.\r
-DEBUG_PORT = 4242\r
-\r
-# Debugging host used to communicate between GDB / avarice / simulavr, normally\r
-#     just set to localhost unless doing some sort of crazy debugging when\r
-#     avarice is running on a different computer.\r
-DEBUG_HOST = localhost\r
-\r
-\r
-\r
-#============================================================================\r
-\r
-\r
-# Define programs and commands.\r
-SHELL = sh\r
-CC = avr-gcc\r
-OBJCOPY = avr-objcopy\r
-OBJDUMP = avr-objdump\r
-SIZE = avr-size\r
-AR = avr-ar rcs\r
-NM = avr-nm\r
-AVRDUDE = avrdude\r
-REMOVE = rm -f\r
-REMOVEDIR = rm -rf\r
-COPY = cp\r
-WINSHELL = cmd\r
-\r
-\r
-# Define Messages\r
-# English\r
-MSG_ERRORS_NONE = Errors: none\r
-MSG_BEGIN = -------- begin --------\r
-MSG_END = --------  end  --------\r
-MSG_SIZE_BEFORE = Size before:\r
-MSG_SIZE_AFTER = Size after:\r
-MSG_COFF = Converting to AVR COFF:\r
-MSG_EXTENDED_COFF = Converting to AVR Extended COFF:\r
-MSG_FLASH = Creating load file for Flash:\r
-MSG_EEPROM = Creating load file for EEPROM:\r
-MSG_EXTENDED_LISTING = Creating Extended Listing:\r
-MSG_SYMBOL_TABLE = Creating Symbol Table:\r
-MSG_LINKING = Linking:\r
-MSG_COMPILING = Compiling C:\r
-MSG_COMPILING_CPP = Compiling C++:\r
-MSG_ASSEMBLING = Assembling:\r
-MSG_CLEANING = Cleaning project:\r
-MSG_CREATING_LIBRARY = Creating library:\r
-\r
-\r
-\r
-\r
-# Define all object files.\r
-OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o)\r
-\r
-# Define all listing files.\r
-LST = $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst)\r
-\r
-\r
-# Compiler flags to generate dependency files.\r
-#GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d\r
-\r
-\r
-# Combine all necessary flags and optional flags.\r
-# Add target processor to flags.\r
-ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)\r
-ALL_CPPFLAGS = -mmcu=$(MCU) -I. -x c++ $(CPPFLAGS) $(GENDEPFLAGS)\r
-ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)\r
-\r
-\r
-\r
-\r
-\r
-# Default target.\r
-all: begin gccversion sizebefore build sizeafter end\r
-\r
-# Change the build target to build a HEX file or a library.\r
-build: elf hex eep lss sym\r
-#build: lib\r
-\r
-\r
-elf: $(TARGET).elf\r
-hex: $(TARGET).hex\r
-eep: $(TARGET).eep\r
-lss: $(TARGET).lss\r
-sym: $(TARGET).sym\r
-LIBNAME=lib$(TARGET).a\r
-lib: $(LIBNAME)\r
-\r
-\r
-\r
-# Eye candy.\r
-# AVR Studio 3.x does not check make's exit code but relies on\r
-# the following magic strings to be generated by the compile job.\r
-begin:\r
-       @echo\r
-       @echo $(MSG_BEGIN)\r
-\r
-end:\r
-       @echo $(MSG_END)\r
-       @echo\r
-\r
-\r
-# Display size of file.\r
-HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex\r
-ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf\r
-MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )\r
-FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )\r
-\r
-\r
-sizebefore:\r
-       @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \\r
-       2>/dev/null; echo; fi\r
-\r
-sizeafter:\r
-       @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \\r
-       2>/dev/null; echo; fi\r
-\r
-\r
-\r
-# Display compiler version information.\r
-gccversion :\r
-       @$(CC) --version\r
-\r
-\r
-# Program the device.\r
-program: $(TARGET).hex $(TARGET).eep\r
-       $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)\r
-\r
-flip: $(TARGET).hex\r
-       batchisp -hardware usb -device $(MCU) -operation erase f\r
-       batchisp -hardware usb -device $(MCU) -operation loadbuffer $(TARGET).hex program\r
-       batchisp -hardware usb -device $(MCU) -operation start reset 0\r
-\r
-dfu: $(TARGET).hex\r
-       dfu-programmer $(MCU) erase\r
-       dfu-programmer $(MCU) flash $(TARGET).hex\r
-       dfu-programmer $(MCU) reset\r
-\r
-flip-ee: $(TARGET).hex $(TARGET).eep\r
-       $(COPY) $(TARGET).eep $(TARGET)eep.hex\r
-       batchisp -hardware usb -device $(MCU) -operation memory EEPROM erase\r
-       batchisp -hardware usb -device $(MCU) -operation memory EEPROM loadbuffer $(TARGET)eep.hex program\r
-       batchisp -hardware usb -device $(MCU) -operation start reset 0\r
-       $(REMOVE) $(TARGET)eep.hex\r
-\r
-dfu-ee: $(TARGET).hex $(TARGET).eep\r
-       dfu-programmer $(MCU) eeprom-flash $(TARGET).eep\r
-       dfu-programmer $(MCU) reset\r
-\r
-\r
-# Generate avr-gdb config/init file which does the following:\r
-#     define the reset signal, load the target file, connect to target, and set\r
-#     a breakpoint at main().\r
-gdb-config:\r
-       @$(REMOVE) $(GDBINIT_FILE)\r
-       @echo define reset >> $(GDBINIT_FILE)\r
-       @echo SIGNAL SIGHUP >> $(GDBINIT_FILE)\r
-       @echo end >> $(GDBINIT_FILE)\r
-       @echo file $(TARGET).elf >> $(GDBINIT_FILE)\r
-       @echo target remote $(DEBUG_HOST):$(DEBUG_PORT)  >> $(GDBINIT_FILE)\r
-ifeq ($(DEBUG_BACKEND),simulavr)\r
-       @echo load  >> $(GDBINIT_FILE)\r
-endif\r
-       @echo break main >> $(GDBINIT_FILE)\r
-\r
-debug: gdb-config $(TARGET).elf\r
-ifeq ($(DEBUG_BACKEND), avarice)\r
-       @echo Starting AVaRICE - Press enter when "waiting to connect" message displays.\r
-       @$(WINSHELL) /c start avarice --jtag $(JTAG_DEV) --erase --program --file \\r
-       $(TARGET).elf $(DEBUG_HOST):$(DEBUG_PORT)\r
-       @$(WINSHELL) /c pause\r
-\r
-else\r
-       @$(WINSHELL) /c start simulavr --gdbserver --device $(MCU) --clock-freq \\r
-       $(DEBUG_MFREQ) --port $(DEBUG_PORT)\r
-endif\r
-       @$(WINSHELL) /c start avr-$(DEBUG_UI) --command=$(GDBINIT_FILE)\r
-\r
-\r
-\r
-\r
-# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.\r
-COFFCONVERT = $(OBJCOPY) --debugging\r
-COFFCONVERT += --change-section-address .data-0x800000\r
-COFFCONVERT += --change-section-address .bss-0x800000\r
-COFFCONVERT += --change-section-address .noinit-0x800000\r
-COFFCONVERT += --change-section-address .eeprom-0x810000\r
-\r
-\r
-\r
-coff: $(TARGET).elf\r
-       @echo\r
-       @echo $(MSG_COFF) $(TARGET).cof\r
-       $(COFFCONVERT) -O coff-avr $< $(TARGET).cof\r
-\r
-\r
-extcoff: $(TARGET).elf\r
-       @echo\r
-       @echo $(MSG_EXTENDED_COFF) $(TARGET).cof\r
-       $(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof\r
-\r
-\r
-\r
-# Create final output files (.hex, .eep) from ELF output file.\r
-%.hex: %.elf\r
-       @echo\r
-       @echo $(MSG_FLASH) $@\r
-       $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock $< $@\r
-\r
-%.eep: %.elf\r
-       @echo\r
-       @echo $(MSG_EEPROM) $@\r
-       -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \\r
-       --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) $< $@ || exit 0\r
-\r
-# Create extended listing file from ELF output file.\r
-%.lss: %.elf\r
-       @echo\r
-       @echo $(MSG_EXTENDED_LISTING) $@\r
-       $(OBJDUMP) -h -S -z $< > $@\r
-\r
-# Create a symbol table from ELF output file.\r
-%.sym: %.elf\r
-       @echo\r
-       @echo $(MSG_SYMBOL_TABLE) $@\r
-       $(NM) -n $< > $@\r
-\r
-\r
-\r
-# Create library from object files.\r
-.SECONDARY : $(TARGET).a\r
-.PRECIOUS : $(OBJ)\r
-%.a: $(OBJ)\r
-       @echo\r
-       @echo $(MSG_CREATING_LIBRARY) $@\r
-       $(AR) $@ $(OBJ)\r
-\r
-\r
-# Link: create ELF output file from object files.\r
-.SECONDARY : $(TARGET).elf\r
-.PRECIOUS : $(OBJ)\r
-%.elf: $(OBJ)\r
-       @echo\r
-       @echo $(MSG_LINKING) $@\r
-       $(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS)\r
-\r
-\r
-# Compile: create object files from C source files.\r
-$(OBJDIR)/%.o : %.c\r
-       @echo\r
-       @echo $(MSG_COMPILING) $<\r
-       $(CC) -c $(ALL_CFLAGS) $< -o $@\r
-\r
-\r
-# Compile: create object files from C++ source files.\r
-$(OBJDIR)/%.o : %.cpp\r
-       @echo\r
-       @echo $(MSG_COMPILING_CPP) $<\r
-       $(CC) -c $(ALL_CPPFLAGS) $< -o $@\r
-\r
-\r
-# Compile: create assembler files from C source files.\r
-%.s : %.c\r
-       $(CC) -S $(ALL_CFLAGS) $< -o $@\r
-\r
-\r
-# Compile: create assembler files from C++ source files.\r
-%.s : %.cpp\r
-       $(CC) -S $(ALL_CPPFLAGS) $< -o $@\r
-\r
-\r
-# Assemble: create object files from assembler source files.\r
-$(OBJDIR)/%.o : %.S\r
-       @echo\r
-       @echo $(MSG_ASSEMBLING) $<\r
-       $(CC) -c $(ALL_ASFLAGS) $< -o $@\r
-\r
-\r
-# Create preprocessed source for use in sending a bug report.\r
-%.i : %.c\r
-       $(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@\r
-\r
-\r
-# Target: clean project.\r
-clean: begin clean_list end\r
-\r
-clean_list :\r
-       @echo\r
-       @echo $(MSG_CLEANING)\r
-       $(REMOVE) $(TARGET).hex\r
-       $(REMOVE) $(TARGET).eep\r
-       $(REMOVE) $(TARGET).cof\r
-       $(REMOVE) $(TARGET).elf\r
-       $(REMOVE) $(TARGET).map\r
-       $(REMOVE) $(TARGET).sym\r
-       $(REMOVE) $(TARGET).lss\r
-       $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o)\r
-       $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst)\r
-       $(REMOVE) $(SRC:.c=.s)\r
-       $(REMOVE) $(SRC:.c=.d)\r
-       $(REMOVE) $(SRC:.c=.i)\r
-       $(REMOVEDIR) .dep\r
-\r
-doxygen:\r
-       @echo Generating Project Documentation \($(TARGET)\)...\r
-       @if ( ( cat Doxygen.conf ; echo "HTML_STYLESHEET=$(LUFA_PATH)/LUFA/DoxygenPages/Style/Style.css" ) | doxygen - 2>&1 | grep -v "warning: ignoring unsupported tag" ;); then \\r
-         exit 1; \\r
-       fi;\r
-       @echo Documentation Generation Complete.\r
-\r
-clean_doxygen:\r
-       rm -rf Documentation\r
-\r
-checksource:\r
-       @for f in $(SRC) $(CPPSRC) $(ASRC); do \\r
-               if [ -f $$f ]; then \\r
-                       echo "Found Source File: $$f" ; \\r
-               else \\r
-                       echo "Source File Not Found: $$f" ; \\r
-               fi; done \r
-\r
-\r
-# Create object files directory\r
-$(shell mkdir $(OBJDIR) 2>/dev/null)\r
-\r
-\r
-# Include the dependency files.\r
--include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)\r
-\r
-\r
-# Listing of phony targets.\r
-.PHONY : all begin finish end sizebefore sizeafter gccversion \\r
-build elf hex eep lss sym coff extcoff doxygen clean          \\r
-clean_list clean_doxygen program dfu flip flip-ee dfu-ee      \\r
-debug gdb-config checksource\r
diff --git a/BuildTests/BoardDriverTest/makefile.test b/BuildTests/BoardDriverTest/makefile.test
new file mode 100644 (file)
index 0000000..234add1
--- /dev/null
@@ -0,0 +1,25 @@
+#
+#             LUFA Library
+#     Copyright (C) Dean Camera, 2012.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#           www.lufa-lib.org
+#
+# --------------------------------------
+#         LUFA Project Makefile.
+# --------------------------------------
+
+MCU          = 
+ARCH         = 
+BOARD        = 
+F_CPU        = $(F_USB)
+F_USB        = 8000000
+OPTIMIZATION = 1
+TARGET       = Test
+SRC          = $(TARGET).c
+LUFA_PATH    = ../../LUFA
+CC_FLAGS     = -Werror
+DEBUG_LEVEL  = 0
+
+# Include LUFA build script makefiles
+include $(LUFA_PATH)/Build/lufa_build.mk
\ No newline at end of file
diff --git a/BuildTests/BoardDriverTest/makefile.uc3 b/BuildTests/BoardDriverTest/makefile.uc3
deleted file mode 100644 (file)
index be9e931..0000000
+++ /dev/null
@@ -1,486 +0,0 @@
-# Hey Emacs, this is a -*- makefile -*-\r
-#----------------------------------------------------------------------------\r
-# WinAVR Makefile Template written by Eric B. Weddington, Jörg Wunsch, et al.\r
-#  >> Modified for use with the LUFA project. <<\r
-#\r
-# Released to the Public Domain\r
-#\r
-# Additional material for this makefile was written by:\r
-# Peter Fleury\r
-# Tim Henigan\r
-# Colin O'Flynn\r
-# Reiner Patommel\r
-# Markus Pfaff\r
-# Sander Pool\r
-# Frederik Rouleau\r
-# Carlos Lamas\r
-# Dean Camera\r
-# Opendous Inc.\r
-# Denver Gingerich\r
-#\r
-#----------------------------------------------------------------------------\r
-# On command line:\r
-#\r
-# make all = Make software.\r
-#\r
-# make clean = Clean out built project files.\r
-#\r
-# make dfu = Download the hex file to the device, using dfu-programmer (must\r
-#            have dfu-programmer installed).\r
-#\r
-# make flip = Download the hex file to the device, using Atmel FLIP (must\r
-#             have Atmel FLIP installed).\r
-#\r
-# make doxygen = Generate DoxyGen documentation for the project (must have\r
-#                DoxyGen installed)\r
-#\r
-# make filename.s = Just compile filename.c into the assembler code only.\r
-#\r
-# make filename.i = Create a preprocessed source file for use in submitting\r
-#                   bug reports to the GCC project.\r
-#\r
-# To rebuild project do "make clean" then "make all".\r
-#----------------------------------------------------------------------------\r
-\r
-\r
-# MCU name\r
-MCU = uc3a3256\r
-\r
-\r
-# Targeted chip architecture (see library "Architectures" documentation)\r
-ARCH = UC3\r
-\r
-\r
-# Target board (see library "Board Types" documentation, NONE for projects not requiring\r
-# LUFA board drivers). If USER is selected, put custom board drivers in a directory called \r
-# "Board" inside the application directory.\r
-BOARD = NONE\r
-\r
-\r
-# Processor frequency.\r
-#     This will define a symbol, F_CPU, in all source code files equal to the\r
-#     processor frequency in Hz. You can then use this symbol in your source code to\r
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done\r
-#     automatically to create a 32-bit value in your source code.\r
-#\r
-#     This should be the frequency the system core runs at, after the system clock\r
-#     has been set up correctly and started.\r
-F_CPU = 12000000\r
-\r
-\r
-# USB controller master clock frequency.\r
-#     This will define a symbol, F_USB, in all source code files equal to the\r
-#     input clock frequency of the USB controller's clock generator in Hz.\r
-#\r
-#     For the UC3 chips, this should be equal to 48MHz or 96MHz.\r
-F_USB = 48000000\r
-\r
-\r
-# Output format. (can be srec, ihex, binary)\r
-FORMAT = ihex\r
-\r
-\r
-# Target file name (without extension).\r
-TARGET = Test\r
-\r
-\r
-# Object files directory\r
-#     To put object files in current directory, use a dot (.), do NOT make\r
-#     this an empty or blank macro!\r
-OBJDIR = .\r
-\r
-\r
-# Path to the LUFA library\r
-LUFA_PATH = ../..\r
-\r
-\r
-# LUFA library compile-time options and predefined tokens (add '-D' before each token)\r
-LUFA_OPTS = \r
-\r
-\r
-# Create the LUFA source path variables by including the LUFA root makefile\r
-include $(LUFA_PATH)/LUFA/makefile\r
-\r
-\r
-# List C source files here. (C dependencies are automatically generated.)\r
-SRC = Test.c\r
-\r
-\r
-# List C++ source files here. (C dependencies are automatically generated.)\r
-CPPSRC = \r
-\r
-\r
-# List Assembler source files here.\r
-#     Make them always end in a capital .S.  Files ending in a lowercase .s\r
-#     will not be considered source files but generated files (assembler\r
-#     output from the compiler), and will be deleted upon "make clean"!\r
-#     Even though the DOS/Win* filesystem matches both .s and .S the same,\r
-#     it will preserve the spelling of the filenames, and gcc itself does\r
-#     care about how the name is spelled on its command-line.\r
-ASRC = \r
-\r
-\r
-# Optimization level, can be [0, 1, 2, 3, s]. \r
-#     0 = turn off optimization. s = optimize for size.\r
-#     (Note: 3 is not always the best optimization level. See avr-libc FAQ.)\r
-OPT = 1\r
-\r
-\r
-# List any extra directories to look for include files here.\r
-#     Each directory must be seperated by a space.\r
-#     Use forward slashes for directory separators.\r
-#     For a directory that has spaces, enclose it in quotes.\r
-EXTRAINCDIRS = $(LUFA_PATH)/\r
-\r
-\r
-# Compiler flag to set the C Standard level.\r
-#     c89   = "ANSI" C\r
-#     gnu89 = c89 plus GCC extensions\r
-#     c99   = ISO C99 standard (not yet fully implemented)\r
-#     gnu99 = c99 plus GCC extensions\r
-CSTANDARD = -std=gnu99\r
-\r
-\r
-# Place -D or -U options here for C sources\r
-CDEFS  = -DF_CPU=$(F_CPU)UL\r
-CDEFS += -DF_USB=$(F_USB)UL\r
-CDEFS += -DBOARD=BOARD_$(BOARD)\r
-CDEFS += -DARCH=ARCH_$(ARCH)\r
-CDEFS += $(LUFA_OPTS)\r
-\r
-\r
-# Place -D or -U options here for ASM sources\r
-ADEFS  = -DF_CPU=$(F_CPU)\r
-ADEFS += -DF_USB=$(F_USB)UL\r
-ADEFS += -DBOARD=BOARD_$(BOARD)\r
-ADEFS += -DARCH=ARCH_$(ARCH)\r
-ADEFS += $(LUFA_OPTS)\r
-\r
-# Place -D or -U options here for C++ sources\r
-CPPDEFS  = -DF_CPU=$(F_CPU)UL\r
-CPPDEFS += -DF_USB=$(F_USB)UL\r
-CPPDEFS += -DBOARD=BOARD_$(BOARD)\r
-CPPDEFS += -DARCH=ARCH_$(ARCH)\r
-CPPDEFS += $(LUFA_OPTS)\r
-\r
-\r
-# Debugging level.\r
-DEBUG = 3\r
-\r
-\r
-#---------------- Compiler Options C ----------------\r
-#  -g*:          generate debugging information\r
-#  -O*:          optimization level\r
-#  -f...:        tuning, see GCC manual and avr-libc documentation\r
-#  -Wall...:     warning level\r
-#  -Wa,...:      tell GCC to pass this to the assembler.\r
-#    -adhlns...: create assembler listing\r
-CFLAGS = -g$(DEBUG)\r
-CFLAGS += $(CDEFS)\r
-CFLAGS += -O$(OPT)\r
-CFLAGS += -funsigned-char\r
-CFLAGS += -funsigned-bitfields\r
-CFLAGS += -ffunction-sections\r
-CFLAGS += -fno-strict-aliasing\r
-CFLAGS += -Wall\r
-CFLAGS += -Wstrict-prototypes\r
-CFLAGS += -masm-addr-pseudos\r
-#CFLAGS += -Wa,-adhlns=$(<:%.c=$(OBJDIR)/%.lst)\r
-CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
-CFLAGS += $(CSTANDARD)\r
-\r
-\r
-#---------------- Compiler Options C++ ----------------\r
-#  -g*:          generate debugging information\r
-#  -O*:          optimization level\r
-#  -f...:        tuning, see GCC manual and avr-libc documentation\r
-#  -Wall...:     warning level\r
-#  -Wa,...:      tell GCC to pass this to the assembler.\r
-#    -adhlns...: create assembler listing\r
-CPPFLAGS = -g$(DEBUG)\r
-CPPFLAGS += $(CPPDEFS)\r
-CPPFLAGS += -O$(OPT)\r
-CPPFLAGS += -funsigned-char\r
-CPPFLAGS += -funsigned-bitfields\r
-CPPFLAGS += -ffunction-sections\r
-CPPFLAGS += -fno-strict-aliasing\r
-CPPFLAGS += -fno-exceptions\r
-CPPFLAGS += -masm-addr-pseudos\r
-CPPFLAGS += -Wall\r
-CPPFLAGS += -Wundef\r
-#CPPFLAGS += -Wa,-adhlns=$(<:%.cpp=$(OBJDIR)/%.lst)\r
-CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
-#CPPFLAGS += $(CSTANDARD)\r
-\r
-\r
-#---------------- Assembler Options ----------------\r
-#  -Wa,...:   tell GCC to pass this to the assembler.\r
-#  -adhlns:   create listing\r
-#  -gstabs:   have the assembler create line number information; note that\r
-#             for use in COFF files, additional information about filenames\r
-#             and function names needs to be present in the assembler source\r
-#             files -- see avr-libc docs [FIXME: not yet described there]\r
-#  -listing-cont-lines: Sets the maximum number of continuation lines of hex \r
-#       dump that will be displayed for a given single line of source input.\r
-ASFLAGS = $(ADEFS)\r
-#ASFLAGS += -Wa,-adhlns=$(<:%.S=$(OBJDIR)/%.lst),-gstabs,--listing-cont-lines=100\r
-\r
-\r
-#---------------- Linker Options ----------------\r
-#  -Wl,...:     tell GCC to pass this to linker.\r
-#    -Map:      create map file\r
-#    --cref:    add cross reference to  map file\r
-#LDFLAGS  = -Wl,-Map=$(TARGET).map,--cref\r
-LDFLAGS += -Wl,--gc-sections --rodata-writable\r
-LDFLAGS += -Wl,--direct-data\r
-#LDFLAGS += -T linker_script.x\r
-\r
-\r
-#============================================================================\r
-\r
-\r
-# Define programs and commands.\r
-SHELL = sh\r
-CC = avr32-gcc\r
-OBJCOPY = avr32-objcopy\r
-OBJDUMP = avr32-objdump\r
-SIZE = avr32-size\r
-AR = avr32-ar rcs\r
-NM = avr32-nm\r
-REMOVE = rm -f\r
-REMOVEDIR = rm -rf\r
-COPY = cp\r
-WINSHELL = cmd\r
-\r
-\r
-# Define Messages\r
-# English\r
-MSG_ERRORS_NONE = Errors: none\r
-MSG_BEGIN = -------- begin --------\r
-MSG_END = --------  end  --------\r
-MSG_SIZE_BEFORE = Size before: \r
-MSG_SIZE_AFTER = Size after:\r
-MSG_COFF = Converting to AVR COFF:\r
-MSG_FLASH = Creating load file for Flash:\r
-MSG_EEPROM = Creating load file for EEPROM:\r
-MSG_EXTENDED_LISTING = Creating Extended Listing:\r
-MSG_SYMBOL_TABLE = Creating Symbol Table:\r
-MSG_LINKING = Linking:\r
-MSG_COMPILING = Compiling C:\r
-MSG_COMPILING_CPP = Compiling C++:\r
-MSG_ASSEMBLING = Assembling:\r
-MSG_CLEANING = Cleaning project:\r
-MSG_CREATING_LIBRARY = Creating library:\r
-\r
-\r
-\r
-\r
-# Define all object files.\r
-OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o) \r
-\r
-# Define all listing files.\r
-LST = $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst) \r
-\r
-\r
-# Compiler flags to generate dependency files.\r
-#GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d\r
-\r
-\r
-# Combine all necessary flags and optional flags.\r
-# Add target processor to flags.\r
-ALL_CFLAGS = -mpart=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)\r
-ALL_CPPFLAGS = -mpart=$(MCU) -I. -x c++ $(CPPFLAGS) $(GENDEPFLAGS)\r
-ALL_ASFLAGS = -mpart=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)\r
-\r
-\r
-\r
-\r
-\r
-# Default target.\r
-all: begin gccversion sizebefore build sizeafter end\r
-\r
-# Change the build target to build a HEX file or a library.\r
-build: elf hex lss sym\r
-#build: lib\r
-\r
-\r
-elf: $(TARGET).elf\r
-hex: $(TARGET).hex\r
-lss: $(TARGET).lss\r
-sym: $(TARGET).sym\r
-LIBNAME=lib$(TARGET).a\r
-lib: $(LIBNAME)\r
-\r
-\r
-\r
-# Eye candy.\r
-# AVR Studio 3.x does not check make's exit code but relies on\r
-# the following magic strings to be generated by the compile job.\r
-begin:\r
-       @echo\r
-       @echo $(MSG_BEGIN)\r
-\r
-end:\r
-       @echo $(MSG_END)\r
-       @echo\r
-\r
-\r
-# Display size of file.\r
-HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex\r
-ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf\r
-MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )\r
-FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )\r
-\r
-\r
-sizebefore:\r
-       @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \\r
-       2>/dev/null; echo; fi\r
-\r
-sizeafter:\r
-       @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \\r
-       2>/dev/null; echo; fi\r
-\r
-\r
-\r
-# Display compiler version information.\r
-gccversion : \r
-       @$(CC) --version\r
-\r
-\r
-# Program the device.  \r
-flip: $(TARGET).hex\r
-       batchisp -hardware usb -device $(MCU) -operation erase f\r
-       batchisp -hardware usb -device $(MCU) -operation loadbuffer $(TARGET).hex program\r
-       batchisp -hardware usb -device $(MCU) -operation start reset 0\r
-\r
-dfu: $(TARGET).hex\r
-       dfu-programmer $(MCU) erase\r
-       dfu-programmer $(MCU) flash $(TARGET).hex\r
-       dfu-programmer $(MCU) reset\r
-\r
-\r
-# Create final output files (.hex, .eep) from ELF output file.\r
-%.hex: %.elf\r
-       @echo\r
-       @echo $(MSG_FLASH) $@\r
-       $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock -R .signature $< $@\r
-\r
-# Create extended listing file from ELF output file.\r
-%.lss: %.elf\r
-       @echo\r
-       @echo $(MSG_EXTENDED_LISTING) $@\r
-       $(OBJDUMP) -h -S -z $< > $@\r
-\r
-# Create a symbol table from ELF output file.\r
-%.sym: %.elf\r
-       @echo\r
-       @echo $(MSG_SYMBOL_TABLE) $@\r
-       $(NM) -n $< > $@\r
-\r
-\r
-\r
-# Create library from object files.\r
-.SECONDARY : $(TARGET).a\r
-.PRECIOUS : $(OBJ)\r
-%.a: $(OBJ)\r
-       @echo\r
-       @echo $(MSG_CREATING_LIBRARY) $@\r
-       $(AR) $@ $(OBJ)\r
-\r
-\r
-# Link: create ELF output file from object files.\r
-.SECONDARY : $(TARGET).elf\r
-.PRECIOUS : $(OBJ)\r
-%.elf: $(OBJ)\r
-       @echo\r
-       @echo $(MSG_LINKING) $@\r
-       $(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS)\r
-\r
-\r
-# Compile: create object files from C source files.\r
-$(OBJDIR)/%.o : %.c\r
-       @echo\r
-       @echo $(MSG_COMPILING) $<\r
-       $(CC) -c $(ALL_CFLAGS) $< -o $@ \r
-\r
-\r
-# Compile: create object files from C++ source files.\r
-$(OBJDIR)/%.o : %.cpp\r
-       @echo\r
-       @echo $(MSG_COMPILING_CPP) $<\r
-       $(CC) -c $(ALL_CPPFLAGS) $< -o $@ \r
-\r
-\r
-# Compile: create assembler files from C source files.\r
-%.s : %.c\r
-       $(CC) -S $(ALL_CFLAGS) $< -o $@\r
-\r
-\r
-# Compile: create assembler files from C++ source files.\r
-%.s : %.cpp\r
-       $(CC) -S $(ALL_CPPFLAGS) $< -o $@\r
-\r
-\r
-# Assemble: create object files from assembler source files.\r
-$(OBJDIR)/%.o : %.S\r
-       @echo\r
-       @echo $(MSG_ASSEMBLING) $<\r
-       $(CC) -c $(ALL_ASFLAGS) $< -o $@\r
-\r
-\r
-# Create preprocessed source for use in sending a bug report.\r
-%.i : %.c\r
-       $(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@ \r
-\r
-\r
-# Target: clean project.\r
-clean: begin clean_list end\r
-\r
-clean_list :\r
-       @echo\r
-       @echo $(MSG_CLEANING)\r
-       $(REMOVE) $(TARGET).hex\r
-       $(REMOVE) $(TARGET).cof\r
-       $(REMOVE) $(TARGET).elf\r
-       $(REMOVE) $(TARGET).map\r
-       $(REMOVE) $(TARGET).sym\r
-       $(REMOVE) $(TARGET).lss\r
-       $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o)\r
-       $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst)\r
-       $(REMOVE) $(SRC:.c=.s)\r
-       $(REMOVE) $(SRC:.c=.d)\r
-       $(REMOVE) $(SRC:.c=.i)\r
-       $(REMOVEDIR) .dep\r
-\r
-doxygen:\r
-       @echo Generating Project Documentation \($(TARGET)\)...\r
-       @if ( ( cat Doxygen.conf ; echo "HTML_STYLESHEET=$(LUFA_PATH)/LUFA/DoxygenPages/Style/Style.css" ) | doxygen - 2>&1 | grep -v "warning: ignoring unsupported tag" ;); then \\r
-         exit 1; \\r
-       fi;\r
-       @echo Documentation Generation Complete.\r
-\r
-clean_doxygen:\r
-       rm -rf Documentation\r
-\r
-checksource:\r
-       @for f in $(SRC) $(CPPSRC) $(ASRC); do \\r
-               if [ -f $$f ]; then \\r
-                       echo "Found Source File: $$f" ; \\r
-               else \\r
-                       echo "Source File Not Found: $$f" ; \\r
-               fi; done \r
-\r
-\r
-# Create object files directory\r
-$(shell mkdir $(OBJDIR) 2>/dev/null)\r
-\r
-\r
-# Include the dependency files.\r
--include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)\r
-\r
-\r
-# Listing of phony targets.\r
-.PHONY : all begin finish end sizebefore sizeafter gccversion \\r
-build elf hex lss sym doxygen clean clean_list clean_doxygen  \\r
-dfu flip checksource\r
-\r
diff --git a/BuildTests/BoardDriverTest/makefile.xmega b/BuildTests/BoardDriverTest/makefile.xmega
deleted file mode 100644 (file)
index ef6dfe1..0000000
+++ /dev/null
@@ -1,705 +0,0 @@
-# Hey Emacs, this is a -*- makefile -*-\r
-#----------------------------------------------------------------------------\r
-# WinAVR Makefile Template written by Eric B. Weddington, Jörg Wunsch, et al.\r
-#  >> Modified for use with the LUFA project. <<\r
-#\r
-# Released to the Public Domain\r
-#\r
-# Additional material for this makefile was written by:\r
-# Peter Fleury\r
-# Tim Henigan\r
-# Colin O'Flynn\r
-# Reiner Patommel\r
-# Markus Pfaff\r
-# Sander Pool\r
-# Frederik Rouleau\r
-# Carlos Lamas\r
-# Dean Camera\r
-# Opendous Inc.\r
-# Denver Gingerich\r
-#\r
-#----------------------------------------------------------------------------\r
-# On command line:\r
-#\r
-# make all = Make software.\r
-#\r
-# make clean = Clean out built project files.\r
-#\r
-# make coff = Convert ELF to AVR COFF.\r
-#\r
-# make extcoff = Convert ELF to AVR Extended COFF.\r
-#\r
-# make program = Download the hex file to the device, using avrdude.\r
-#                Please customize the avrdude settings below first!\r
-#\r
-# make dfu = Download the hex file to the device, using dfu-programmer (must\r
-#            have dfu-programmer installed).\r
-#\r
-# make flip = Download the hex file to the device, using Atmel FLIP (must\r
-#             have Atmel FLIP installed).\r
-#\r
-# make dfu-ee = Download the eeprom file to the device, using dfu-programmer\r
-#               (must have dfu-programmer installed).\r
-#\r
-# make flip-ee = Download the eeprom file to the device, using Atmel FLIP\r
-#                (must have Atmel FLIP installed).\r
-#\r
-# make doxygen = Generate DoxyGen documentation for the project (must have\r
-#                DoxyGen installed)\r
-#\r
-# make debug = Start either simulavr or avarice as specified for debugging, \r
-#              with avr-gdb or avr-insight as the front end for debugging.\r
-#\r
-# make filename.s = Just compile filename.c into the assembler code only.\r
-#\r
-# make filename.i = Create a preprocessed source file for use in submitting\r
-#                   bug reports to the GCC project.\r
-#\r
-# To rebuild project do "make clean" then "make all".\r
-#----------------------------------------------------------------------------\r
-\r
-\r
-# MCU name\r
-MCU = atxmega128a1u\r
-\r
-\r
-# Targeted chip architecture (see library "Architectures" documentation)\r
-ARCH = XMEGA\r
-\r
-\r
-# Target board (see library "Board Types" documentation, NONE for projects not requiring\r
-# LUFA board drivers). If USER is selected, put custom board drivers in a directory called \r
-# "Board" inside the application directory.\r
-BOARD = NONE\r
-\r
-\r
-# Processor frequency.\r
-#     This will define a symbol, F_CPU, in all source code files equal to the\r
-#     processor frequency in Hz. You can then use this symbol in your source code to\r
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done\r
-#     automatically to create a 32-bit value in your source code.\r
-#\r
-#     This should be the frequency the system core runs at, after the system clock\r
-#     has been set up correctly and started.\r
-F_CPU = 24000000\r
-\r
-\r
-# USB controller master clock frequency.\r
-#     This will define a symbol, F_USB, in all source code files equal to the\r
-#     input clock frequency of the USB controller's clock generator in Hz.\r
-#\r
-#     For the XMEGA chips, this should be equal to a multiple of 6MHz for Low\r
-#     Speed USB mode, or a multiple of 48MHz for Full Speed USB mode.\r
-F_USB = 48000000\r
-\r
-\r
-# Output format. (can be srec, ihex, binary)\r
-FORMAT = ihex\r
-\r
-\r
-# Target file name (without extension).\r
-TARGET = Test\r
-\r
-\r
-# Object files directory\r
-#     To put object files in current directory, use a dot (.), do NOT make\r
-#     this an empty or blank macro!\r
-OBJDIR = .\r
-\r
-\r
-# Path to the LUFA library\r
-LUFA_PATH = ../..\r
-\r
-\r
-# LUFA library compile-time options and predefined tokens\r
-LUFA_OPTS  = \r
-\r
-\r
-# Create the LUFA source path variables by including the LUFA root makefile\r
-include $(LUFA_PATH)/LUFA/makefile\r
-\r
-\r
-# List C source files here. (C dependencies are automatically generated.)\r
-SRC = Test.c\r
-\r
-\r
-# List C++ source files here. (C dependencies are automatically generated.)\r
-CPPSRC = \r
-\r
-\r
-# List Assembler source files here.\r
-#     Make them always end in a capital .S.  Files ending in a lowercase .s\r
-#     will not be considered source files but generated files (assembler\r
-#     output from the compiler), and will be deleted upon "make clean"!\r
-#     Even though the DOS/Win* filesystem matches both .s and .S the same,\r
-#     it will preserve the spelling of the filenames, and gcc itself does\r
-#     care about how the name is spelled on its command-line.\r
-ASRC = \r
-\r
-\r
-# Optimization level, can be [0, 1, 2, 3, s]. \r
-#     0 = turn off optimization. s = optimize for size.\r
-#     (Note: 3 is not always the best optimization level. See avr-libc FAQ.)\r
-OPT = 1\r
-\r
-\r
-# List any extra directories to look for include files here.\r
-#     Each directory must be seperated by a space.\r
-#     Use forward slashes for directory separators.\r
-#     For a directory that has spaces, enclose it in quotes.\r
-EXTRAINCDIRS = $(LUFA_PATH)/\r
-\r
-\r
-# Compiler flag to set the C Standard level.\r
-#     c89   = "ANSI" C\r
-#     gnu89 = c89 plus GCC extensions\r
-#     c99   = ISO C99 standard (not yet fully implemented)\r
-#     gnu99 = c99 plus GCC extensions\r
-CSTANDARD = -std=gnu99\r
-\r
-\r
-# Place -D or -U options here for C sources\r
-CDEFS  = -DF_CPU=$(F_CPU)UL\r
-CDEFS += -DF_USB=$(F_USB)UL\r
-CDEFS += -DBOARD=BOARD_$(BOARD)\r
-CDEFS += -DARCH=ARCH_$(ARCH)\r
-CDEFS += $(LUFA_OPTS)\r
-\r
-\r
-# Place -D or -U options here for ASM sources\r
-ADEFS  = -DF_CPU=$(F_CPU)\r
-ADEFS += -DF_USB=$(F_USB)UL\r
-ADEFS += -DBOARD=BOARD_$(BOARD)\r
-ADEFS += -DARCH=ARCH_$(ARCH)\r
-ADEFS += $(LUFA_OPTS)\r
-\r
-# Place -D or -U options here for C++ sources\r
-CPPDEFS  = -DF_CPU=$(F_CPU)UL\r
-CPPDEFS += -DF_USB=$(F_USB)UL\r
-CPPDEFS += -DBOARD=BOARD_$(BOARD)\r
-CPPDEFS += -DARCH=ARCH_$(ARCH)\r
-CPPDEFS += $(LUFA_OPTS)\r
-\r
-\r
-# Debugging format.\r
-#     Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs.\r
-#     AVR Studio 4.10 requires dwarf-2.\r
-#     AVR [Extended] COFF format requires stabs, plus an avr-objcopy run.\r
-DEBUG = dwarf-2\r
-\r
-\r
-#---------------- Compiler Options C ----------------\r
-#  -g*:          generate debugging information\r
-#  -O*:          optimization level\r
-#  -f...:        tuning, see GCC manual and avr-libc documentation\r
-#  -Wall...:     warning level\r
-#  -Wa,...:      tell GCC to pass this to the assembler.\r
-#    -adhlns...: create assembler listing\r
-CFLAGS = -g$(DEBUG)\r
-CFLAGS += $(CDEFS)\r
-CFLAGS += -O$(OPT)\r
-CFLAGS += -funsigned-char\r
-CFLAGS += -funsigned-bitfields\r
-CFLAGS += -ffunction-sections\r
-CFLAGS += -fno-inline-small-functions\r
-CFLAGS += -fpack-struct\r
-CFLAGS += -fshort-enums\r
-CFLAGS += -fno-strict-aliasing\r
-CFLAGS += -Wall\r
-CFLAGS += -Wstrict-prototypes\r
-#CFLAGS += -Wa,-adhlns=$(<:%.c=$(OBJDIR)/%.lst)\r
-CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
-CFLAGS += $(CSTANDARD)\r
-\r
-\r
-#---------------- Compiler Options C++ ----------------\r
-#  -g*:          generate debugging information\r
-#  -O*:          optimization level\r
-#  -f...:        tuning, see GCC manual and avr-libc documentation\r
-#  -Wall...:     warning level\r
-#  -Wa,...:      tell GCC to pass this to the assembler.\r
-#    -adhlns...: create assembler listing\r
-CPPFLAGS = -g$(DEBUG)\r
-CPPFLAGS += $(CPPDEFS)\r
-CPPFLAGS += -O$(OPT)\r
-CPPFLAGS += -funsigned-char\r
-CPPFLAGS += -funsigned-bitfields\r
-CPPFLAGS += -fpack-struct\r
-CPPFLAGS += -fshort-enums\r
-CPPFLAGS += -ffunction-sections\r
-CPPFLAGS += -fno-strict-aliasing\r
-CPPFLAGS += -fno-exceptions\r
-CPPFLAGS += -Wall\r
-CPPFLAGS += -Wundef\r
-#CPPFLAGS += -Wa,-adhlns=$(<:%.cpp=$(OBJDIR)/%.lst)\r
-CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
-#CPPFLAGS += $(CSTANDARD)\r
-\r
-\r
-#---------------- Assembler Options ----------------\r
-#  -Wa,...:   tell GCC to pass this to the assembler.\r
-#  -adhlns:   create listing\r
-#  -gstabs:   have the assembler create line number information; note that\r
-#             for use in COFF files, additional information about filenames\r
-#             and function names needs to be present in the assembler source\r
-#             files -- see avr-libc docs [FIXME: not yet described there]\r
-#  -listing-cont-lines: Sets the maximum number of continuation lines of hex \r
-#       dump that will be displayed for a given single line of source input.\r
-ASFLAGS = $(ADEFS)\r
-#ASFLAGS += -Wa,-adhlns=$(<:%.S=$(OBJDIR)/%.lst),-gstabs,--listing-cont-lines=100\r
-\r
-\r
-#---------------- Library Options ----------------\r
-# Minimalistic printf version\r
-PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min\r
-\r
-# Floating point printf version (requires MATH_LIB = -lm below)\r
-PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt\r
-\r
-# If this is left blank, then it will use the Standard printf version.\r
-PRINTF_LIB = \r
-#PRINTF_LIB = $(PRINTF_LIB_MIN)\r
-#PRINTF_LIB = $(PRINTF_LIB_FLOAT)\r
-\r
-\r
-# Minimalistic scanf version\r
-SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min\r
-\r
-# Floating point + %[ scanf version (requires MATH_LIB = -lm below)\r
-SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt\r
-\r
-# If this is left blank, then it will use the Standard scanf version.\r
-SCANF_LIB = \r
-#SCANF_LIB = $(SCANF_LIB_MIN)\r
-#SCANF_LIB = $(SCANF_LIB_FLOAT)\r
-\r
-\r
-MATH_LIB = -lm\r
-\r
-\r
-# List any extra directories to look for libraries here.\r
-#     Each directory must be seperated by a space.\r
-#     Use forward slashes for directory separators.\r
-#     For a directory that has spaces, enclose it in quotes.\r
-EXTRALIBDIRS = \r
-\r
-\r
-\r
-#---------------- External Memory Options ----------------\r
-\r
-# 64 KB of external RAM, starting after internal RAM (ATmega128!),\r
-# used for variables (.data/.bss) and heap (malloc()).\r
-#EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff\r
-\r
-# 64 KB of external RAM, starting after internal RAM (ATmega128!),\r
-# only used for heap (malloc()).\r
-#EXTMEMOPTS = -Wl,--section-start,.data=0x801100,--defsym=__heap_end=0x80ffff\r
-\r
-EXTMEMOPTS =\r
-\r
-\r
-\r
-#---------------- Linker Options ----------------\r
-#  -Wl,...:     tell GCC to pass this to linker.\r
-#    -Map:      create map file\r
-#    --cref:    add cross reference to  map file\r
-#LDFLAGS  = -Wl,-Map=$(TARGET).map,--cref\r
-LDFLAGS += -Wl,--relax \r
-LDFLAGS += -Wl,--gc-sections\r
-LDFLAGS += $(EXTMEMOPTS)\r
-LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS))\r
-LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)\r
-#LDFLAGS += -T linker_script.x\r
-\r
-\r
-\r
-#---------------- Programming Options (avrdude) ----------------\r
-\r
-# Programming hardware\r
-# Type: avrdude -c ?\r
-# to get a full listing.\r
-#\r
-AVRDUDE_PROGRAMMER = jtagmkII\r
-\r
-# com1 = serial port. Use lpt1 to connect to parallel port.\r
-AVRDUDE_PORT = usb\r
-\r
-AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex\r
-#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep\r
-\r
-\r
-# Uncomment the following if you want avrdude's erase cycle counter.\r
-# Note that this counter needs to be initialized first using -Yn,\r
-# see avrdude manual.\r
-#AVRDUDE_ERASE_COUNTER = -y\r
-\r
-# Uncomment the following if you do /not/ wish a verification to be\r
-# performed after programming the device.\r
-#AVRDUDE_NO_VERIFY = -V\r
-\r
-# Increase verbosity level.  Please use this when submitting bug\r
-# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude> \r
-# to submit bug reports.\r
-#AVRDUDE_VERBOSE = -v -v\r
-\r
-AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)\r
-AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)\r
-AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)\r
-AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)\r
-\r
-\r
-\r
-#---------------- Debugging Options ----------------\r
-\r
-# For simulavr only - target MCU frequency.\r
-DEBUG_MFREQ = $(F_CPU)\r
-\r
-# Set the DEBUG_UI to either gdb or insight.\r
-# DEBUG_UI = gdb\r
-DEBUG_UI = insight\r
-\r
-# Set the debugging back-end to either avarice, simulavr.\r
-DEBUG_BACKEND = avarice\r
-#DEBUG_BACKEND = simulavr\r
-\r
-# GDB Init Filename.\r
-GDBINIT_FILE = __avr_gdbinit\r
-\r
-# When using avarice settings for the JTAG\r
-JTAG_DEV = /dev/com1\r
-\r
-# Debugging port used to communicate between GDB / avarice / simulavr.\r
-DEBUG_PORT = 4242\r
-\r
-# Debugging host used to communicate between GDB / avarice / simulavr, normally\r
-#     just set to localhost unless doing some sort of crazy debugging when \r
-#     avarice is running on a different computer.\r
-DEBUG_HOST = localhost\r
-\r
-\r
-\r
-#============================================================================\r
-\r
-\r
-# Define programs and commands.\r
-SHELL = sh\r
-CC = avr-gcc\r
-OBJCOPY = avr-objcopy\r
-OBJDUMP = avr-objdump\r
-SIZE = avr-size\r
-AR = avr-ar rcs\r
-NM = avr-nm\r
-AVRDUDE = avrdude\r
-REMOVE = rm -f\r
-REMOVEDIR = rm -rf\r
-COPY = cp\r
-WINSHELL = cmd\r
-\r
-\r
-# Define Messages\r
-# English\r
-MSG_ERRORS_NONE = Errors: none\r
-MSG_BEGIN = -------- begin --------\r
-MSG_END = --------  end  --------\r
-MSG_SIZE_BEFORE = Size before: \r
-MSG_SIZE_AFTER = Size after:\r
-MSG_COFF = Converting to AVR COFF:\r
-MSG_EXTENDED_COFF = Converting to AVR Extended COFF:\r
-MSG_FLASH = Creating load file for Flash:\r
-MSG_EEPROM = Creating load file for EEPROM:\r
-MSG_EXTENDED_LISTING = Creating Extended Listing:\r
-MSG_SYMBOL_TABLE = Creating Symbol Table:\r
-MSG_LINKING = Linking:\r
-MSG_COMPILING = Compiling C:\r
-MSG_COMPILING_CPP = Compiling C++:\r
-MSG_ASSEMBLING = Assembling:\r
-MSG_CLEANING = Cleaning project:\r
-MSG_CREATING_LIBRARY = Creating library:\r
-\r
-\r
-\r
-\r
-# Define all object files.\r
-OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o) \r
-\r
-# Define all listing files.\r
-LST = $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst) \r
-\r
-\r
-# Compiler flags to generate dependency files.\r
-#GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d\r
-\r
-\r
-# Combine all necessary flags and optional flags.\r
-# Add target processor to flags.\r
-ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)\r
-ALL_CPPFLAGS = -mmcu=$(MCU) -I. -x c++ $(CPPFLAGS) $(GENDEPFLAGS)\r
-ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)\r
-\r
-\r
-\r
-\r
-\r
-# Default target.\r
-all: begin gccversion sizebefore build sizeafter end\r
-\r
-# Change the build target to build a HEX file or a library.\r
-build: elf hex eep lss sym\r
-#build: lib\r
-\r
-\r
-elf: $(TARGET).elf\r
-hex: $(TARGET).hex\r
-eep: $(TARGET).eep\r
-lss: $(TARGET).lss\r
-sym: $(TARGET).sym\r
-LIBNAME=lib$(TARGET).a\r
-lib: $(LIBNAME)\r
-\r
-\r
-\r
-# Eye candy.\r
-# AVR Studio 3.x does not check make's exit code but relies on\r
-# the following magic strings to be generated by the compile job.\r
-begin:\r
-       @echo\r
-       @echo $(MSG_BEGIN)\r
-\r
-end:\r
-       @echo $(MSG_END)\r
-       @echo\r
-\r
-\r
-# Display size of file.\r
-HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex\r
-ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf\r
-MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )\r
-FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )\r
-\r
-\r
-sizebefore:\r
-       @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \\r
-       2>/dev/null; echo; fi\r
-\r
-sizeafter:\r
-       @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \\r
-       2>/dev/null; echo; fi\r
-\r
-\r
-\r
-# Display compiler version information.\r
-gccversion : \r
-       @$(CC) --version\r
-\r
-\r
-# Program the device.  \r
-program: $(TARGET).hex $(TARGET).eep\r
-       $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)\r
-\r
-flip: $(TARGET).hex\r
-       batchisp -hardware usb -device $(MCU) -operation erase f\r
-       batchisp -hardware usb -device $(MCU) -operation loadbuffer $(TARGET).hex program\r
-       batchisp -hardware usb -device $(MCU) -operation start reset 0\r
-\r
-dfu: $(TARGET).hex\r
-       dfu-programmer $(MCU) erase\r
-       dfu-programmer $(MCU) flash $(TARGET).hex\r
-       dfu-programmer $(MCU) reset\r
-\r
-flip-ee: $(TARGET).hex $(TARGET).eep\r
-       $(COPY) $(TARGET).eep $(TARGET)eep.hex\r
-       batchisp -hardware usb -device $(MCU) -operation memory EEPROM erase\r
-       batchisp -hardware usb -device $(MCU) -operation memory EEPROM loadbuffer $(TARGET)eep.hex program\r
-       batchisp -hardware usb -device $(MCU) -operation start reset 0\r
-       $(REMOVE) $(TARGET)eep.hex\r
-\r
-dfu-ee: $(TARGET).hex $(TARGET).eep\r
-       dfu-programmer $(MCU) eeprom-flash $(TARGET).eep\r
-       dfu-programmer $(MCU) reset\r
-\r
-\r
-# Generate avr-gdb config/init file which does the following:\r
-#     define the reset signal, load the target file, connect to target, and set \r
-#     a breakpoint at main().\r
-gdb-config: \r
-       @$(REMOVE) $(GDBINIT_FILE)\r
-       @echo define reset >> $(GDBINIT_FILE)\r
-       @echo SIGNAL SIGHUP >> $(GDBINIT_FILE)\r
-       @echo end >> $(GDBINIT_FILE)\r
-       @echo file $(TARGET).elf >> $(GDBINIT_FILE)\r
-       @echo target remote $(DEBUG_HOST):$(DEBUG_PORT)  >> $(GDBINIT_FILE)\r
-ifeq ($(DEBUG_BACKEND),simulavr)\r
-       @echo load  >> $(GDBINIT_FILE)\r
-endif\r
-       @echo break main >> $(GDBINIT_FILE)\r
-\r
-debug: gdb-config $(TARGET).elf\r
-ifeq ($(DEBUG_BACKEND), avarice)\r
-       @echo Starting AVaRICE - Press enter when "waiting to connect" message displays.\r
-       @$(WINSHELL) /c start avarice --jtag $(JTAG_DEV) --erase --program --file \\r
-       $(TARGET).elf $(DEBUG_HOST):$(DEBUG_PORT)\r
-       @$(WINSHELL) /c pause\r
-\r
-else\r
-       @$(WINSHELL) /c start simulavr --gdbserver --device $(MCU) --clock-freq \\r
-       $(DEBUG_MFREQ) --port $(DEBUG_PORT)\r
-endif\r
-       @$(WINSHELL) /c start avr-$(DEBUG_UI) --command=$(GDBINIT_FILE)\r
-\r
-\r
-\r
-\r
-# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.\r
-COFFCONVERT = $(OBJCOPY) --debugging\r
-COFFCONVERT += --change-section-address .data-0x800000\r
-COFFCONVERT += --change-section-address .bss-0x800000\r
-COFFCONVERT += --change-section-address .noinit-0x800000\r
-COFFCONVERT += --change-section-address .eeprom-0x810000\r
-\r
-\r
-\r
-coff: $(TARGET).elf\r
-       @echo\r
-       @echo $(MSG_COFF) $(TARGET).cof\r
-       $(COFFCONVERT) -O coff-avr $< $(TARGET).cof\r
-\r
-\r
-extcoff: $(TARGET).elf\r
-       @echo\r
-       @echo $(MSG_EXTENDED_COFF) $(TARGET).cof\r
-       $(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof\r
-\r
-\r
-\r
-# Create final output files (.hex, .eep) from ELF output file.\r
-%.hex: %.elf\r
-       @echo\r
-       @echo $(MSG_FLASH) $@\r
-       $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock -R .signature $< $@\r
-\r
-%.eep: %.elf\r
-       @echo\r
-       @echo $(MSG_EEPROM) $@\r
-       -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \\r
-       --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) $< $@ || exit 0\r
-\r
-# Create extended listing file from ELF output file.\r
-%.lss: %.elf\r
-       @echo\r
-       @echo $(MSG_EXTENDED_LISTING) $@\r
-       $(OBJDUMP) -h -S -z $< > $@\r
-\r
-# Create a symbol table from ELF output file.\r
-%.sym: %.elf\r
-       @echo\r
-       @echo $(MSG_SYMBOL_TABLE) $@\r
-       $(NM) -n $< > $@\r
-\r
-\r
-\r
-# Create library from object files.\r
-.SECONDARY : $(TARGET).a\r
-.PRECIOUS : $(OBJ)\r
-%.a: $(OBJ)\r
-       @echo\r
-       @echo $(MSG_CREATING_LIBRARY) $@\r
-       $(AR) $@ $(OBJ)\r
-\r
-\r
-# Link: create ELF output file from object files.\r
-.SECONDARY : $(TARGET).elf\r
-.PRECIOUS : $(OBJ)\r
-%.elf: $(OBJ)\r
-       @echo\r
-       @echo $(MSG_LINKING) $@\r
-       $(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS)\r
-\r
-\r
-# Compile: create object files from C source files.\r
-$(OBJDIR)/%.o : %.c\r
-       @echo\r
-       @echo $(MSG_COMPILING) $<\r
-       $(CC) -c $(ALL_CFLAGS) $< -o $@ \r
-\r
-\r
-# Compile: create object files from C++ source files.\r
-$(OBJDIR)/%.o : %.cpp\r
-       @echo\r
-       @echo $(MSG_COMPILING_CPP) $<\r
-       $(CC) -c $(ALL_CPPFLAGS) $< -o $@ \r
-\r
-\r
-# Compile: create assembler files from C source files.\r
-%.s : %.c\r
-       $(CC) -S $(ALL_CFLAGS) $< -o $@\r
-\r
-\r
-# Compile: create assembler files from C++ source files.\r
-%.s : %.cpp\r
-       $(CC) -S $(ALL_CPPFLAGS) $< -o $@\r
-\r
-\r
-# Assemble: create object files from assembler source files.\r
-$(OBJDIR)/%.o : %.S\r
-       @echo\r
-       @echo $(MSG_ASSEMBLING) $<\r
-       $(CC) -c $(ALL_ASFLAGS) $< -o $@\r
-\r
-\r
-# Create preprocessed source for use in sending a bug report.\r
-%.i : %.c\r
-       $(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@ \r
-\r
-\r
-# Target: clean project.\r
-clean: begin clean_list end\r
-\r
-clean_list :\r
-       @echo\r
-       @echo $(MSG_CLEANING)\r
-       $(REMOVE) $(TARGET).hex\r
-       $(REMOVE) $(TARGET).eep\r
-       $(REMOVE) $(TARGET).cof\r
-       $(REMOVE) $(TARGET).elf\r
-       $(REMOVE) $(TARGET).map\r
-       $(REMOVE) $(TARGET).sym\r
-       $(REMOVE) $(TARGET).lss\r
-       $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o)\r
-       $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst)\r
-       $(REMOVE) $(SRC:.c=.s)\r
-       $(REMOVE) $(SRC:.c=.d)\r
-       $(REMOVE) $(SRC:.c=.i)\r
-       $(REMOVEDIR) .dep\r
-\r
-doxygen:\r
-       @echo Generating Project Documentation \($(TARGET)\)...\r
-       @if ( ( cat Doxygen.conf ; echo "HTML_STYLESHEET=$(LUFA_PATH)/LUFA/DoxygenPages/Style/Style.css" ) | doxygen - 2>&1 | grep -v "warning: ignoring unsupported tag" ;); then \\r
-         exit 1; \\r
-       fi;\r
-       @echo Documentation Generation Complete.\r
-\r
-clean_doxygen:\r
-       rm -rf Documentation\r
-\r
-checksource:\r
-       @for f in $(SRC) $(CPPSRC) $(ASRC); do \\r
-               if [ -f $$f ]; then \\r
-                       echo "Found Source File: $$f" ; \\r
-               else \\r
-                       echo "Source File Not Found: $$f" ; \\r
-               fi; done \r
-\r
-\r
-# Create object files directory\r
-$(shell mkdir $(OBJDIR) 2>/dev/null)\r
-\r
-\r
-# Include the dependency files.\r
--include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)\r
-\r
-\r
-# Listing of phony targets.\r
-.PHONY : all begin finish end sizebefore sizeafter gccversion \\r
-build elf hex eep lss sym coff extcoff doxygen clean          \\r
-clean_list clean_doxygen program dfu flip flip-ee dfu-ee      \\r
-debug gdb-config checksource\r
index 082b8f5..614b6b5 100644 (file)
@@ -1,63 +1,63 @@
-#\r
-#             LUFA Library\r
-#     Copyright (C) Dean Camera, 2012.\r
-#\r
-#  dean [at] fourwalledcubicle [dot] com\r
-#           www.lufa-lib.org\r
-#\r
-#\r
-# =============================================================================\r
-# Bootloader configuration map script, processed with the "BootloaderTest"\r
-# makefile. This script file defines the targets for each LUFA bootloader,\r
-# which are then built as part of the build test to ensure that there are no\r
-# failures on all standard configurations. To add a new build target for a\r
-# bootloader to this script, use the format:\r
-#\r
-#    BOOTLOADER = {ARCH} : {MCU} : {BOARD} : {FLASH SIZE KB} : {BOOT SIZE KB} :\r
-#\r
-# And re-run the makefile.\r
-# =============================================================================\r
-#\r
-#\r
-# ------------ CDC Bootloader -------------\r
-CDC = avr8 : at90usb1287 : NONE : 128 : 8 :\r
-CDC = avr8 : at90usb647  : NONE :  64 : 4 :\r
-CDC = avr8 : at90usb1286 : NONE : 128 : 8 :\r
-CDC = avr8 : at90usb646  : NONE :  64 : 4 :\r
-CDC = avr8 : atmega32u6  : NONE :  32 : 4 :\r
-CDC = avr8 : atmega32u4  : NONE :  32 : 4 :\r
-CDC = avr8 : atmega16u4  : NONE :  16 : 4 :\r
-CDC = avr8 : atmega32u2  : NONE :  32 : 4 :\r
-CDC = avr8 : atmega16u2  : NONE :  16 : 4 :\r
-CDC = avr8 : atmega8u2   : NONE :   8 : 4 :\r
-CDC = avr8 : at90usb162  : NONE :  16 : 4 :\r
-CDC = avr8 : at90usb82   : NONE :   8 : 4 :\r
-#\r
-# ------------ DFU Bootloader -------------\r
-DFU = avr8 : at90usb1287 : NONE : 128 : 8 :\r
-DFU = avr8 : at90usb647  : NONE :  64 : 4 :\r
-DFU = avr8 : at90usb1286 : NONE : 128 : 8 :\r
-DFU = avr8 : at90usb646  : NONE :  64 : 4 :\r
-DFU = avr8 : atmega32u6  : NONE :  32 : 4 :\r
-DFU = avr8 : atmega32u4  : NONE :  32 : 4 :\r
-DFU = avr8 : atmega16u4  : NONE :  16 : 4 :\r
-DFU = avr8 : atmega32u2  : NONE :  32 : 4 :\r
-DFU = avr8 : atmega16u2  : NONE :  16 : 4 :\r
-DFU = avr8 : atmega8u2   : NONE :   8 : 4 :\r
-DFU = avr8 : at90usb162  : NONE :  16 : 4 :\r
-DFU = avr8 : at90usb82   : NONE :   8 : 4 :\r
-#\r
-# ------------ HID Bootloader -------------\r
-HID = avr8 : at90usb1287 : NONE : 128 : 4 :\r
-HID = avr8 : at90usb647  : NONE :  64 : 4 :\r
-HID = avr8 : at90usb1286 : NONE : 128 : 4 :\r
-HID = avr8 : at90usb646  : NONE :  64 : 4 :\r
-HID = avr8 : atmega32u6  : NONE :  32 : 4 :\r
-HID = avr8 : atmega32u4  : NONE :  32 : 4 :\r
-HID = avr8 : atmega16u4  : NONE :  16 : 4 :\r
-HID = avr8 : atmega32u2  : NONE :  32 : 2 :\r
-HID = avr8 : atmega16u2  : NONE :  16 : 2 :\r
-HID = avr8 : atmega8u2   : NONE :   8 : 2 :\r
-HID = avr8 : at90usb162  : NONE :  16 : 2 :\r
-HID = avr8 : at90usb82   : NONE :   8 : 2 :\r
+#
+#             LUFA Library
+#     Copyright (C) Dean Camera, 2012.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#           www.lufa-lib.org
+#
+#
+# =============================================================================
+# Bootloader configuration map script, processed with the "BootloaderTest"
+# makefile. This script file defines the targets for each LUFA bootloader,
+# which are then built as part of the build test to ensure that there are no
+# failures on all standard configurations. To add a new build target for a
+# bootloader to this script, use the format:
+#
+#    BOOTLOADER = {ARCH} : {MCU} : {BOARD} : {FLASH SIZE KB} : {BOOT SIZE KB} :
+#
+# And re-run the makefile.
+# =============================================================================
+#
+#
+# ------------ CDC Bootloader -------------
+CDC = AVR8 : at90usb1287 : NONE : 128 : 8 :
+CDC = AVR8 : at90usb647  : NONE :  64 : 4 :
+CDC = AVR8 : at90usb1286 : NONE : 128 : 8 :
+CDC = AVR8 : at90usb646  : NONE :  64 : 4 :
+CDC = AVR8 : atmega32u6  : NONE :  32 : 4 :
+CDC = AVR8 : atmega32u4  : NONE :  32 : 4 :
+CDC = AVR8 : atmega16u4  : NONE :  16 : 4 :
+CDC = AVR8 : atmega32u2  : NONE :  32 : 4 :
+CDC = AVR8 : atmega16u2  : NONE :  16 : 4 :
+CDC = AVR8 : atmega8u2   : NONE :   8 : 4 :
+CDC = AVR8 : at90usb162  : NONE :  16 : 4 :
+CDC = AVR8 : at90usb82   : NONE :   8 : 4 :
+#
+# ------------ DFU Bootloader -------------
+DFU = AVR8 : at90usb1287 : NONE : 128 : 8 :
+DFU = AVR8 : at90usb647  : NONE :  64 : 4 :
+DFU = AVR8 : at90usb1286 : NONE : 128 : 8 :
+DFU = AVR8 : at90usb646  : NONE :  64 : 4 :
+DFU = AVR8 : atmega32u6  : NONE :  32 : 4 :
+DFU = AVR8 : atmega32u4  : NONE :  32 : 4 :
+DFU = AVR8 : atmega16u4  : NONE :  16 : 4 :
+DFU = AVR8 : atmega32u2  : NONE :  32 : 4 :
+DFU = AVR8 : atmega16u2  : NONE :  16 : 4 :
+DFU = AVR8 : atmega8u2   : NONE :   8 : 4 :
+DFU = AVR8 : at90usb162  : NONE :  16 : 4 :
+DFU = AVR8 : at90usb82   : NONE :   8 : 4 :
+#
+# ------------ HID Bootloader -------------
+HID = AVR8 : at90usb1287 : NONE : 128 : 4 :
+HID = AVR8 : at90usb647  : NONE :  64 : 4 :
+HID = AVR8 : at90usb1286 : NONE : 128 : 4 :
+HID = AVR8 : at90usb646  : NONE :  64 : 4 :
+HID = AVR8 : atmega32u6  : NONE :  32 : 4 :
+HID = AVR8 : atmega32u4  : NONE :  32 : 4 :
+HID = AVR8 : atmega16u4  : NONE :  16 : 4 :
+HID = AVR8 : atmega32u2  : NONE :  32 : 2 :
+HID = AVR8 : atmega16u2  : NONE :  16 : 2 :
+HID = AVR8 : atmega8u2   : NONE :   8 : 2 :
+HID = AVR8 : at90usb162  : NONE :  16 : 2 :
+HID = AVR8 : at90usb82   : NONE :   8 : 2 :
 #
\ No newline at end of file
index 71fa21a..e3f60d7 100644 (file)
@@ -1,58 +1,63 @@
-#\r
-#             LUFA Library\r
-#     Copyright (C) Dean Camera, 2012.\r
-#\r
-#  dean [at] fourwalledcubicle [dot] com\r
-#           www.lufa-lib.org\r
-#\r
-\r
-# Makefile for the bootloader build test. This\r
-# test attempts to build all the bootloaders\r
-# with all supported device configurations.\r
-\r
-# Path to the root of the LUFA tree to scan\r
-LUFA_ROOT_PATH    = ../..\r
-\r
-\r
-all: begin testbootloaders clean end\r
-\r
-begin:\r
-       @echo Executing build test "BootloaderTest".\r
-       @echo\r
-\r
-end:\r
-       @echo Build test "BootloaderTest" complete.\r
-       @echo\r
-       \r
-testbootloaders:\r
-       @echo "buildtest:" > BuildMakefile\r
-       \r
-       @while read line;                                         \\r
-        do                                                       \\r
-          build_cfg=`echo $$line | grep -v "#" | sed 's/ //g'`;  \\r
-                                                                 \\r
-          if ( test -n "$$build_cfg" ); then                     \\r
-            build_bootloader=`echo $$build_cfg | cut -d'=' -f1`; \\r
-                build_cfg=`echo $$build_cfg | cut -d'=' -f2-`;       \\r
-                                                                     \\r
-            build_arch=`echo $$build_cfg | cut -d':' -f1`;       \\r
-            build_mcu=`echo $$build_cfg | cut -d':' -f2`;        \\r
-            build_board=`echo $$build_cfg | cut -d':' -f3`;      \\r
-            build_flashsize=`echo $$build_cfg | cut -d':' -f4`;  \\r
-            build_bootsize=`echo $$build_cfg | cut -d':' -f5`;   \\r
-                                                                 \\r
-            printf "Found bootloader configuration for bootloader '%s' (FLASH: %3s KB | BOOT: %3s KB | MCU: %12s / %4s)\n" $$build_bootloader $$build_flashsize $$build_bootsize $$build_mcu $$build_arch; \\r
-                                                                 \\r
-            printf "\t@echo Building bootloader %s - %s - FLASH: %s KB, BOOT: %s KB\n" $$build_bootloader $$build_mcu $$build_flashsize $$build_bootsize >> BuildMakefile; \\r
-            printf "\tmake -s -C $(LUFA_ROOT_PATH)/Bootloaders/%s/ clean\n" $$build_bootloader >> BuildMakefile; \\r
-            printf "\tmake -s -C $(LUFA_ROOT_PATH)/Bootloaders/%s/ MCU=%s BOARD=%s FLASH_SIZE_KB=%s BOOT_SECTION_SIZE_KB=%s elf\n\n" $$build_bootloader $$build_mcu $$build_board $$build_flashsize $$build_bootsize >> BuildMakefile; \\r
-          fi;                                                    \\r
-        done < BootloaderDeviceMap.cfg\r
-        \r
-        $(MAKE) -f BuildMakefile buildtest\r
-\r
-clean:\r
-       rm -f BuildMakefile\r
-\r
-%:\r
-       
\ No newline at end of file
+#
+#             LUFA Library
+#     Copyright (C) Dean Camera, 2012.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#           www.lufa-lib.org
+#
+
+# Makefile for the bootloader build test. This
+# test attempts to build all the bootloaders
+# with all supported device configurations.
+
+# Path to the LUFA library core
+LUFA_PATH := ../../LUFA/
+
+# Build test cannot be run with multiple parallel jobs
+.NOTPARALLEL:
+
+all: begin testbootloaders clean end
+
+begin:
+       @echo Executing build test "BootloaderTest".
+       @echo
+
+end:
+       @echo Build test "BootloaderTest" complete.
+       @echo
+       
+testbootloaders:
+       @echo "buildtest:" > BuildMakefile
+       
+       @while read line;                                         \
+        do                                                       \
+          build_cfg=`echo $$line | grep -v "#" | sed 's/ //g'`;  \
+                                                                 \
+          if ( test -n "$$build_cfg" ); then                     \
+            build_bootloader=`echo $$build_cfg | cut -d'=' -f1`; \
+                build_cfg=`echo $$build_cfg | cut -d'=' -f2-`;       \
+                                                                     \
+            build_arch=`echo $$build_cfg | cut -d':' -f1`;       \
+            build_mcu=`echo $$build_cfg | cut -d':' -f2`;        \
+            build_board=`echo $$build_cfg | cut -d':' -f3`;      \
+            build_flashsize=`echo $$build_cfg | cut -d':' -f4`;  \
+            build_bootsize=`echo $$build_cfg | cut -d':' -f5`;   \
+                                                                 \
+            printf "Found '%s' bootloader configuration (FLASH: %3s KB | BOOT: %3s KB | MCU: %12s / %4s)\n" $$build_bootloader $$build_flashsize $$build_bootsize $$build_mcu $$build_arch; \
+                                                                 \
+            printf "\t@echo Building bootloader %s - %s - FLASH: %s KB, BOOT: %s KB\n" $$build_bootloader $$build_mcu $$build_flashsize $$build_bootsize >> BuildMakefile; \
+            printf "\t$(MAKE) -C $(patsubst %/,%,$(LUFA_PATH))/../Bootloaders/%s/ clean elf ARCH=%s MCU=%s BOARD=%s FLASH_SIZE_KB=%s BOOT_SECTION_SIZE_KB=%s DEBUG_LEVEL=0\n\n" $$build_bootloader $$build_arch $$build_mcu $$build_board $$build_flashsize $$build_bootsize >> BuildMakefile; \
+          fi;                                                    \
+        done < BootloaderDeviceMap.cfg
+        
+        $(MAKE) -f BuildMakefile buildtest
+
+clean:
+       rm -f BuildMakefile
+
+%:
+
+.PHONY: all begin end testbootloaders clean
+
+# Include LUFA build script makefiles
+include $(LUFA_PATH)/Build/lufa_core.mk
index bc13b31..659d144 100644 (file)
@@ -1,41 +1,41 @@
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2012.\r
-\r
-  dean [at] fourwalledcubicle [dot] com\r
-           www.lufa-lib.org\r
-*/\r
-\r
-/*\r
-  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, distribute, and sell this\r
-  software and its documentation for any purpose is hereby granted\r
-  without fee, provided that the above copyright notice appear in\r
-  all copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting\r
-  documentation, and that the name of the author not be used in\r
-  advertising or publicity pertaining to distribution of the\r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-.section .text\r
-\r
-\r
-# Mandatory entry point for successful compilation and link\r
-.global main\r
-main:\r
-\r
-       \r
-# Mandatory callback needed for base compile of the USB driver\r
-.global CALLBACK_USB_GetDescriptor\r
-CALLBACK_USB_GetDescriptor:\r
+/*
+             LUFA Library
+     Copyright (C) Dean Camera, 2012.
+
+  dean [at] fourwalledcubicle [dot] com
+           www.lufa-lib.org
+*/
+
+/*
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+  Permission to use, copy, modify, distribute, and sell this
+  software and its documentation for any purpose is hereby granted
+  without fee, provided that the above copyright notice appear in
+  all copies and that both that the copyright notice and this
+  permission notice and warranty disclaimer appear in supporting
+  documentation, and that the name of the author not be used in
+  advertising or publicity pertaining to distribution of the
+  software without specific, written prior permission.
+
+  The author disclaim all warranties with regard to this
+  software, including all implied warranties of merchantability
+  and fitness.  In no event shall the author be liable for any
+  special, indirect or consequential damages or any damages
+  whatsoever resulting from loss of use, data or profits, whether
+  in an action of contract, negligence or other tortious action,
+  arising out of or in connection with the use or performance of
+  this software.
+*/
+
+.section .text
+
+
+# Mandatory entry point for successful compilation and link
+.global main
+main:
+
+       
+# Mandatory callback needed for base compile of the USB driver
+.global CALLBACK_USB_GetDescriptor
+CALLBACK_USB_GetDescriptor:
index 00f7b89..9dd7c46 100644 (file)
@@ -1,58 +1,58 @@
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2012.\r
-\r
-  dean [at] fourwalledcubicle [dot] com\r
-           www.lufa-lib.org\r
-*/\r
-\r
-/*\r
-  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, distribute, and sell this\r
-  software and its documentation for any purpose is hereby granted\r
-  without fee, provided that the above copyright notice appear in\r
-  all copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting\r
-  documentation, and that the name of the author not be used in\r
-  advertising or publicity pertaining to distribution of the\r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-#include <LUFA/Common/Common.h>\r
-\r
-#include <LUFA/Drivers/USB/USB.h>\r
-#include <LUFA/Drivers/Misc/RingBuffer.h>\r
-#include <LUFA/Drivers/Misc/TerminalCodes.h>\r
-\r
-#if (ARCH == ARCH_AVR8)\r
-       #if defined(TWCR)\r
-               #include <LUFA/Drivers/Peripheral/TWI.h>\r
-       #endif\r
-\r
-       #if defined(ADC)\r
-               #include <LUFA/Drivers/Peripheral/ADC.h>\r
-       #endif\r
-\r
-       #include <LUFA/Drivers/Peripheral/Serial.h>     \r
-       #include <LUFA/Drivers/Peripheral/SPI.h>\r
-       #include <LUFA/Drivers/Peripheral/SerialSPI.h>\r
-#elif (ARCH == ARCH_XMEGA)\r
-       #include <LUFA/Drivers/Peripheral/Serial.h>\r
-       #include <LUFA/Drivers/Peripheral/SPI.h>\r
-       #include <LUFA/Drivers/Peripheral/SerialSPI.h>\r
-       \r
-       #include <LUFA/Platform/XMEGA/ClockManagement.h>\r
-#elif (ARCH == ARCH_UC3)\r
-       #include <LUFA/Platform/UC3/ClockManagement.h>\r
-       #include <LUFA/Platform/UC3/InterruptManagement.h>\r
+/*
+             LUFA Library
+     Copyright (C) Dean Camera, 2012.
+
+  dean [at] fourwalledcubicle [dot] com
+           www.lufa-lib.org
+*/
+
+/*
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+  Permission to use, copy, modify, distribute, and sell this
+  software and its documentation for any purpose is hereby granted
+  without fee, provided that the above copyright notice appear in
+  all copies and that both that the copyright notice and this
+  permission notice and warranty disclaimer appear in supporting
+  documentation, and that the name of the author not be used in
+  advertising or publicity pertaining to distribution of the
+  software without specific, written prior permission.
+
+  The author disclaim all warranties with regard to this
+  software, including all implied warranties of merchantability
+  and fitness.  In no event shall the author be liable for any
+  special, indirect or consequential damages or any damages
+  whatsoever resulting from loss of use, data or profits, whether
+  in an action of contract, negligence or other tortious action,
+  arising out of or in connection with the use or performance of
+  this software.
+*/
+
+#include <LUFA/Common/Common.h>
+
+#include <LUFA/Drivers/USB/USB.h>
+#include <LUFA/Drivers/Misc/RingBuffer.h>
+#include <LUFA/Drivers/Misc/TerminalCodes.h>
+
+#if (ARCH == ARCH_AVR8)
+       #if defined(TWCR)
+               #include <LUFA/Drivers/Peripheral/TWI.h>
+       #endif
+
+       #if defined(ADC)
+               #include <LUFA/Drivers/Peripheral/ADC.h>
+       #endif
+
+       #include <LUFA/Drivers/Peripheral/Serial.h>     
+       #include <LUFA/Drivers/Peripheral/SPI.h>
+       #include <LUFA/Drivers/Peripheral/SerialSPI.h>
+#elif (ARCH == ARCH_XMEGA)
+       #include <LUFA/Drivers/Peripheral/Serial.h>
+       #include <LUFA/Drivers/Peripheral/SPI.h>
+       #include <LUFA/Drivers/Peripheral/SerialSPI.h>
+       
+       #include <LUFA/Platform/XMEGA/ClockManagement.h>
+#elif (ARCH == ARCH_UC3)
+       #include <LUFA/Platform/UC3/ClockManagement.h>
+       #include <LUFA/Platform/UC3/InterruptManagement.h>
 #endif
\ No newline at end of file
index 6cbf8fa..98c17c3 100644 (file)
@@ -1,31 +1,31 @@
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2012.\r
-\r
-  dean [at] fourwalledcubicle [dot] com\r
-           www.lufa-lib.org\r
-*/\r
-\r
-/*\r
-  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, distribute, and sell this\r
-  software and its documentation for any purpose is hereby granted\r
-  without fee, provided that the above copyright notice appear in\r
-  all copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting\r
-  documentation, and that the name of the author not be used in\r
-  advertising or publicity pertaining to distribution of the\r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
+/*
+             LUFA Library
+     Copyright (C) Dean Camera, 2012.
+
+  dean [at] fourwalledcubicle [dot] com
+           www.lufa-lib.org
+*/
+
+/*
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+  Permission to use, copy, modify, distribute, and sell this
+  software and its documentation for any purpose is hereby granted
+  without fee, provided that the above copyright notice appear in
+  all copies and that both that the copyright notice and this
+  permission notice and warranty disclaimer appear in supporting
+  documentation, and that the name of the author not be used in
+  advertising or publicity pertaining to distribution of the
+  software without specific, written prior permission.
+
+  The author disclaim all warranties with regard to this
+  software, including all implied warranties of merchantability
+  and fitness.  In no event shall the author be liable for any
+  special, indirect or consequential damages or any damages
+  whatsoever resulting from loss of use, data or profits, whether
+  in an action of contract, negligence or other tortious action,
+  arising out of or in connection with the use or performance of
+  this software.
+*/
+
 #include "Modules.h"
\ No newline at end of file
index 6cbf8fa..98c17c3 100644 (file)
@@ -1,31 +1,31 @@
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2012.\r
-\r
-  dean [at] fourwalledcubicle [dot] com\r
-           www.lufa-lib.org\r
-*/\r
-\r
-/*\r
-  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, distribute, and sell this\r
-  software and its documentation for any purpose is hereby granted\r
-  without fee, provided that the above copyright notice appear in\r
-  all copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting\r
-  documentation, and that the name of the author not be used in\r
-  advertising or publicity pertaining to distribution of the\r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
+/*
+             LUFA Library
+     Copyright (C) Dean Camera, 2012.
+
+  dean [at] fourwalledcubicle [dot] com
+           www.lufa-lib.org
+*/
+
+/*
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+  Permission to use, copy, modify, distribute, and sell this
+  software and its documentation for any purpose is hereby granted
+  without fee, provided that the above copyright notice appear in
+  all copies and that both that the copyright notice and this
+  permission notice and warranty disclaimer appear in supporting
+  documentation, and that the name of the author not be used in
+  advertising or publicity pertaining to distribution of the
+  software without specific, written prior permission.
+
+  The author disclaim all warranties with regard to this
+  software, including all implied warranties of merchantability
+  and fitness.  In no event shall the author be liable for any
+  special, indirect or consequential damages or any damages
+  whatsoever resulting from loss of use, data or profits, whether
+  in an action of contract, negligence or other tortious action,
+  arising out of or in connection with the use or performance of
+  this software.
+*/
+
 #include "Modules.h"
\ No newline at end of file
index 6811e1a..738152e 100644 (file)
@@ -1,57 +1,66 @@
-#\r
-#             LUFA Library\r
-#     Copyright (C) Dean Camera, 2012.\r
-#\r
-#  dean [at] fourwalledcubicle [dot] com\r
-#           www.lufa-lib.org\r
-#\r
-\r
-# Makefile for the module build test. This test\r
-# attempts to build as many modules as possible\r
-# under all supported architectures, and include\r
-# all module headers in a simple C and C++\r
-# application.\r
-\r
-\r
-# List of device families per architecture, one device per architecture sub-family\r
-AVR8_FAMILIES  = at90usb1287 at90usb1286 atmega16u4 atmega16u2 at90usb162\r
-XMEGA_FAMILIES = atxmega128a1u atxmega128a3u atxmega256a3bu atxmega128a4u atxmega128b1 atxmega128b3 atxmega128c3 atxmega32c4\r
-UC3_FAMILIES   = uc3a0256 uc3a1256 uc3a3256 uc3a4256 uc3b0256 uc3b1256\r
-\r
-# List of all device families, with a family postfix\r
-DEVICE_FAMILIES = $(AVR8_FAMILIES:%=%.avr8) $(XMEGA_FAMILIES:%=%.xmega) $(UC3_FAMILIES:%=%.uc3)\r
-\r
-\r
-all: begin $(DEVICE_FAMILIES) clean end\r
-\r
-arch_avr8:  begin $(AVR8_FAMILIES:%=%.avr8) end\r
-arch_xmega: begin $(XMEGA_FAMILIES:%=%.xmega) end\r
-arch_uc3:   begin $(UC3_FAMILIES:%=%.uc3) end\r
-\r
-begin:\r
-       @echo Executing build test "ModuleTest".\r
-       @echo\r
-\r
-end:\r
-       @echo Build test "ModuleTest" complete.\r
-       @echo\r
-\r
-%.avr8:\r
-       $(MAKE) -s -f makefile.avr8 clean\r
-       $(MAKE) -s -f makefile.avr8 all MCU=$(@:%.avr8=%) elf\r
-\r
-%.xmega:\r
-       $(MAKE) -s -f makefile.xmega clean\r
-       $(MAKE) -s -f makefile.xmega all MCU=$(@:%.xmega=%) elf\r
-\r
-%.uc3:\r
-       $(MAKE) -s -f makefile.uc3 clean\r
-       $(MAKE) -s -f makefile.uc3 all MCU=$(@:%.uc3=%) elf\r
-\r
-clean:\r
-       $(MAKE) -s -f makefile.avr8 clean\r
-       $(MAKE) -s -f makefile.xmega clean\r
-       $(MAKE) -s -f makefile.uc3 clean\r
-\r
-%:\r
-       
\ No newline at end of file
+#
+#             LUFA Library
+#     Copyright (C) Dean Camera, 2012.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#           www.lufa-lib.org
+#
+
+# Makefile for the module build test. This test
+# attempts to build as many modules as possible
+# under all supported architectures, and include
+# all module headers in a simple C and C++
+# application.
+
+# Path to the LUFA library core
+LUFA_PATH := ../../LUFA/
+
+# Build test cannot be run with multiple parallel jobs
+.NOTPARALLEL:
+
+# List of device families per architecture, one device per architecture sub-family
+AVR8_FAMILIES   := at90usb1287 at90usb1286 atmega16u4 atmega16u2 at90usb162
+XMEGA_FAMILIES  := atxmega128a1u atxmega128a3u atxmega256a3bu atxmega128a4u atxmega128b1 atxmega128b3 atxmega128c3 atxmega32c4
+UC3_FAMILIES    := uc3a0256 uc3a1256 uc3a3256 uc3a4256 uc3b0256 uc3b1256
+
+# List of all device families, with a family postfix
+DEVICE_FAMILIES := $(AVR8_FAMILIES:%=%.avr8) $(XMEGA_FAMILIES:%=%.xmega) $(UC3_FAMILIES:%=%.uc3)
+
+
+all: begin $(DEVICE_FAMILIES) clean end
+
+arch_avr8:  begin $(AVR8_FAMILIES:%=%.avr8) end
+arch_xmega: begin $(XMEGA_FAMILIES:%=%.xmega) end
+arch_uc3:   begin $(UC3_FAMILIES:%=%.uc3) end
+
+begin:
+       @echo Executing build test "ModuleTest".
+       @echo
+
+end:
+       @echo Build test "ModuleTest" complete.
+       @echo
+
+%.avr8:
+       @echo Building ModuleTest for ARCH=AVR8 MCU=$(@:%.avr8=%)...
+       $(MAKE) -f makefile.test clean elf ARCH=AVR8 MCU=$(@:%.avr8=%)
+
+%.xmega:
+       @echo Building ModuleTest for ARCH=XMEGA MCU=$(@:%.xmega=%)...
+       $(MAKE) -f makefile.test clean elf ARCH=XMEGA MCU=$(@:%.xmega=%)
+
+%.uc3:
+       @echo Building ModuleTest for ARCH=UC3 MCU=$(@:%.uc3=%)...
+       $(MAKE) -f makefile.test clean elf ARCH=UC3 MCU=$(@:%.uc3=%)
+
+clean:
+       $(MAKE) -f makefile.test clean ARCH=AVR8 MCU=$(firstword $(AVR8_FAMILIES))
+       $(MAKE) -f makefile.test clean ARCH=XMEGA MCU=$(firstword $(XMEGA_FAMILIES))
+       $(MAKE) -f makefile.test clean ARCH=UC3 MCU=$(firstword $(UC3_FAMILIES))
+
+%:
+
+.PHONY: all arch_avr8 arch_xmega arch_uc3 begin end
+
+# Include LUFA build script makefiles
+include $(LUFA_PATH)/Build/lufa_core.mk
diff --git a/BuildTests/ModuleTest/makefile.avr8 b/BuildTests/ModuleTest/makefile.avr8
deleted file mode 100644 (file)
index 8673209..0000000
+++ /dev/null
@@ -1,742 +0,0 @@
-# Hey Emacs, this is a -*- makefile -*-\r
-#----------------------------------------------------------------------------\r
-# WinAVR Makefile Template written by Eric B. Weddington, Jörg Wunsch, et al.\r
-#  >> Modified for use with the LUFA project. <<\r
-#\r
-# Released to the Public Domain\r
-#\r
-# Additional material for this makefile was written by:\r
-# Peter Fleury\r
-# Tim Henigan\r
-# Colin O'Flynn\r
-# Reiner Patommel\r
-# Markus Pfaff\r
-# Sander Pool\r
-# Frederik Rouleau\r
-# Carlos Lamas\r
-# Dean Camera\r
-# Opendous Inc.\r
-# Denver Gingerich\r
-#\r
-#----------------------------------------------------------------------------\r
-# On command line:\r
-#\r
-# make all = Make software.\r
-#\r
-# make clean = Clean out built project files.\r
-#\r
-# make coff = Convert ELF to AVR COFF.\r
-#\r
-# make extcoff = Convert ELF to AVR Extended COFF.\r
-#\r
-# make program = Download the hex file to the device, using avrdude.\r
-#                Please customize the avrdude settings below first!\r
-#\r
-# make dfu = Download the hex file to the device, using dfu-programmer (must\r
-#            have dfu-programmer installed).\r
-#\r
-# make flip = Download the hex file to the device, using Atmel FLIP (must\r
-#             have Atmel FLIP installed).\r
-#\r
-# make dfu-ee = Download the eeprom file to the device, using dfu-programmer\r
-#               (must have dfu-programmer installed).\r
-#\r
-# make flip-ee = Download the eeprom file to the device, using Atmel FLIP\r
-#                (must have Atmel FLIP installed).\r
-#\r
-# make doxygen = Generate DoxyGen documentation for the project (must have\r
-#                DoxyGen installed)\r
-#\r
-# make debug = Start either simulavr or avarice as specified for debugging,\r
-#              with avr-gdb or avr-insight as the front end for debugging.\r
-#\r
-# make filename.s = Just compile filename.c into the assembler code only.\r
-#\r
-# make filename.i = Create a preprocessed source file for use in submitting\r
-#                   bug reports to the GCC project.\r
-#\r
-# To rebuild project do "make clean" then "make all".\r
-#----------------------------------------------------------------------------\r
-\r
-\r
-# MCU name\r
-MCU = at90usb1287\r
-\r
-\r
-# Target architecture (see library "Board Types" documentation).\r
-ARCH = AVR8\r
-\r
-\r
-# Target board (see library "Board Types" documentation, NONE for projects not requiring\r
-# LUFA board drivers). If USER is selected, put custom board drivers in a directory called\r
-# "Board" inside the application directory.\r
-BOARD = NONE\r
-\r
-\r
-# Processor frequency.\r
-#     This will define a symbol, F_CPU, in all source code files equal to the\r
-#     processor frequency in Hz. You can then use this symbol in your source code to\r
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done\r
-#     automatically to create a 32-bit value in your source code.\r
-#\r
-#     This will be an integer division of F_USB below, as it is sourced by\r
-#     F_USB after it has run through any CPU prescalers. Note that this value\r
-#     does not *change* the processor frequency - it should merely be updated to\r
-#     reflect the processor speed set externally so that the code can use accurate\r
-#     software delays.\r
-F_CPU = 16000000\r
-\r
-\r
-# Input clock frequency.\r
-#     This will define a symbol, F_USB, in all source code files equal to the\r
-#     input clock frequency (before any prescaling is performed) in Hz. This value may\r
-#     differ from F_CPU if prescaling is used on the latter, and is required as the\r
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed\r
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'\r
-#     at the end, this will be done automatically to create a 32-bit value in your\r
-#     source code.\r
-#\r
-#     If no clock division is performed on the input clock inside the AVR (via the\r
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_USB = $(F_CPU)\r
-\r
-\r
-# Output format. (can be srec, ihex, binary)\r
-FORMAT = ihex\r
-\r
-\r
-# Target file name (without extension).\r
-TARGET = Test\r
-\r
-\r
-# Object files directory\r
-#     To put object files in current directory, use a dot (.), do NOT make\r
-#     this an empty or blank macro!\r
-OBJDIR = .\r
-\r
-\r
-# Path to the LUFA library\r
-LUFA_PATH = ../..\r
-\r
-\r
-# LUFA library compile-time options and predefined tokens\r
-LUFA_OPTS  = \r
-\r
-\r
-# Create the LUFA source path variables by including the LUFA root makefile\r
-include $(LUFA_PATH)/LUFA/makefile\r
-\r
-\r
-# List C source files here. (C dependencies are automatically generated.)\r
-SRC = Test_C.c                   \\r
-      $(LUFA_SRC_USB)            \\r
-      $(LUFA_SRC_USBCLASS)       \\r
-      $(LUFA_SRC_TEMPERATURE)    \\r
-      $(LUFA_SRC_SERIAL)         \\r
-      $(LUFA_SRC_TWI)            \\r
-\r
-\r
-\r
-# List C++ source files here. (C dependencies are automatically generated.)\r
-CPPSRC = Test_CPP.cpp\r
-\r
-\r
-# List Assembler source files here.\r
-#     Make them always end in a capital .S.  Files ending in a lowercase .s\r
-#     will not be considered source files but generated files (assembler\r
-#     output from the compiler), and will be deleted upon "make clean"!\r
-#     Even though the DOS/Win* filesystem matches both .s and .S the same,\r
-#     it will preserve the spelling of the filenames, and gcc itself does\r
-#     care about how the name is spelled on its command-line.\r
-ASRC = Dummy.S\r
-\r
-\r
-# Optimization level, can be [0, 1, 2, 3, s].\r
-#     0 = turn off optimization. s = optimize for size.\r
-#     (Note: 3 is not always the best optimization level. See avr-libc FAQ.)\r
-OPT = 1\r
-\r
-\r
-# Debugging format.\r
-#     Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs.\r
-#     AVR Studio 4.10 requires dwarf-2.\r
-#     AVR [Extended] COFF format requires stabs, plus an avr-objcopy run.\r
-DEBUG = dwarf-2\r
-\r
-\r
-# List any extra directories to look for include files here.\r
-#     Each directory must be seperated by a space.\r
-#     Use forward slashes for directory separators.\r
-#     For a directory that has spaces, enclose it in quotes.\r
-EXTRAINCDIRS = $(LUFA_PATH)/\r
-\r
-\r
-# Compiler flag to set the C Standard level.\r
-#     c89   = "ANSI" C\r
-#     gnu89 = c89 plus GCC extensions\r
-#     c99   = ISO C99 standard (not yet fully implemented)\r
-#     gnu99 = c99 plus GCC extensions\r
-CSTANDARD = -std=c99\r
-\r
-\r
-# Place -D or -U options here for C sources\r
-CDEFS  = -DF_CPU=$(F_CPU)UL\r
-CDEFS += -DF_USB=$(F_USB)UL\r
-CDEFS += -DBOARD=BOARD_$(BOARD) -DARCH=ARCH_$(ARCH)\r
-CDEFS += $(LUFA_OPTS)\r
-\r
-\r
-# Place -D or -U options here for ASM sources\r
-ADEFS  = -DF_CPU=$(F_CPU)\r
-ADEFS += -DF_USB=$(F_USB)UL\r
-ADEFS += -DBOARD=BOARD_$(BOARD)\r
-ADEFS += $(LUFA_OPTS)\r
-\r
-# Place -D or -U options here for C++ sources\r
-CPPDEFS  = -DF_CPU=$(F_CPU)UL\r
-CPPDEFS += -DF_USB=$(F_USB)UL\r
-CPPDEFS += -DBOARD=BOARD_$(BOARD)\r
-CPPDEFS += $(LUFA_OPTS)\r
-#CPPDEFS += -D__STDC_LIMIT_MACROS\r
-#CPPDEFS += -D__STDC_CONSTANT_MACROS\r
-\r
-\r
-\r
-#---------------- Compiler Options C ----------------\r
-#  -g*:          generate debugging information\r
-#  -O*:          optimization level\r
-#  -f...:        tuning, see GCC manual and avr-libc documentation\r
-#  -Wall...:     warning level\r
-#  -Wa,...:      tell GCC to pass this to the assembler.\r
-#    -adhlns...: create assembler listing\r
-CFLAGS = -g$(DEBUG)\r
-CFLAGS += $(CDEFS)\r
-CFLAGS += -O$(OPT)\r
-CFLAGS += -funsigned-char\r
-CFLAGS += -funsigned-bitfields\r
-CFLAGS += -ffunction-sections\r
-CFLAGS += -fno-inline-small-functions\r
-CFLAGS += -fpack-struct\r
-CFLAGS += -fshort-enums\r
-CFLAGS += -fno-strict-aliasing\r
-CFLAGS += -fno-split-wide-types\r
-#CFLAGS += -Wa,-adhlns=$(<:%.c=$(OBJDIR)/%.lst)\r
-CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
-CFLAGS += $(CSTANDARD)\r
-CFLAGS += -Werror\r
-CFLAGS += -Wall\r
-CFLAGS += -Wextra\r
-CFLAGS += -Wstrict-prototypes\r
-CFLAGS += -Wformat=2\r
-CFLAGS += -Winit-self\r
-CFLAGS += -Wswitch-enum\r
-CFLAGS += -Wunused\r
-CFLAGS += -Wundef\r
-CFLAGS += -Wpointer-arith\r
-CFLAGS += -Wcast-align\r
-CFLAGS += -Wwrite-strings\r
-CFLAGS += -Wlogical-op\r
-CFLAGS += -Wmissing-parameter-type\r
-CFLAGS += -Wmissing-declarations\r
-CFLAGS += -Wmissing-field-initializers\r
-CFLAGS += -Wmissing-format-attribute\r
-CFLAGS += -Wredundant-decls\r
-CFLAGS += -Wnested-externs\r
-CFLAGS += -Woverlength-strings\r
-#CFLAGS += -Wswitch-default\r
-#CFLAGS += -Wc++-compat\r
-#CFLAGS += -Wcast-qual\r
-#CFLAGS += -Wconversion\r
-#CFLAGS += -Wjump-misses-init\r
-#CFLAGS += -pedantic\r
-\r
-\r
-#---------------- Compiler Options C++ ----------------\r
-#  -g*:          generate debugging information\r
-#  -O*:          optimization level\r
-#  -f...:        tuning, see GCC manual and avr-libc documentation\r
-#  -Wall...:     warning level\r
-#  -Wa,...:      tell GCC to pass this to the assembler.\r
-#    -adhlns...: create assembler listing\r
-CPPFLAGS = -g$(DEBUG)\r
-CPPFLAGS += $(CPPDEFS)\r
-CPPFLAGS += -O$(OPT)\r
-CPPFLAGS += -funsigned-char\r
-CPPFLAGS += -funsigned-bitfields\r
-CPPFLAGS += -fpack-struct\r
-CPPFLAGS += -fshort-enums\r
-CPPFLAGS += -fno-exceptions\r
-CPPFLAGS += -Wall\r
-CPPFLAGS += -Wundef\r
-#CPPFLAGS += -Wa,-adhlns=$(<:%.cpp=$(OBJDIR)/%.lst)\r
-CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
-\r
-\r
-#---------------- Assembler Options ----------------\r
-#  -Wa,...:   tell GCC to pass this to the assembler.\r
-#  -adhlns:   create listing\r
-#  -gstabs:   have the assembler create line number information; note that\r
-#             for use in COFF files, additional information about filenames\r
-#             and function names needs to be present in the assembler source\r
-#             files -- see avr-libc docs [FIXME: not yet described there]\r
-#  -listing-cont-lines: Sets the maximum number of continuation lines of hex\r
-#       dump that will be displayed for a given single line of source input.\r
-ASFLAGS = $(ADEFS)\r
-#ASFLAGS += -Wa,-adhlns=$(<:%.S=$(OBJDIR)/%.lst),-gstabs,--listing-cont-lines=100\r
-\r
-\r
-#---------------- Library Options ----------------\r
-# Minimalistic printf version\r
-PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min\r
-\r
-# Floating point printf version (requires MATH_LIB = -lm below)\r
-PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt\r
-\r
-# If this is left blank, then it will use the Standard printf version.\r
-PRINTF_LIB =\r
-#PRINTF_LIB = $(PRINTF_LIB_MIN)\r
-#PRINTF_LIB = $(PRINTF_LIB_FLOAT)\r
-\r
-\r
-# Minimalistic scanf version\r
-SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min\r
-\r
-# Floating point + %[ scanf version (requires MATH_LIB = -lm below)\r
-SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt\r
-\r
-# If this is left blank, then it will use the Standard scanf version.\r
-SCANF_LIB =\r
-#SCANF_LIB = $(SCANF_LIB_MIN)\r
-#SCANF_LIB = $(SCANF_LIB_FLOAT)\r
-\r
-\r
-MATH_LIB = -lm\r
-\r
-\r
-# List any extra directories to look for libraries here.\r
-#     Each directory must be seperated by a space.\r
-#     Use forward slashes for directory separators.\r
-#     For a directory that has spaces, enclose it in quotes.\r
-EXTRALIBDIRS =\r
-\r
-\r
-\r
-#---------------- External Memory Options ----------------\r
-\r
-# 64 KB of external RAM, starting after internal RAM (ATmega128!),\r
-# used for variables (.data/.bss) and heap (malloc()).\r
-#EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff\r
-\r
-# 64 KB of external RAM, starting after internal RAM (ATmega128!),\r
-# only used for heap (malloc()).\r
-#EXTMEMOPTS = -Wl,--section-start,.data=0x801100,--defsym=__heap_end=0x80ffff\r
-\r
-EXTMEMOPTS =\r
-\r
-\r
-\r
-#---------------- Linker Options ----------------\r
-#  -Wl,...:     tell GCC to pass this to linker.\r
-#    -Map:      create map file\r
-#    --cref:    add cross reference to  map file\r
-#LDFLAGS  = -Wl,-Map=$(TARGET).map,--cref\r
-LDFLAGS += -Wl,--relax\r
-LDFLAGS += -Wl,--gc-sections\r
-LDFLAGS += $(EXTMEMOPTS)\r
-LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS))\r
-LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)\r
-#LDFLAGS += -T linker_script.x\r
-\r
-\r
-\r
-#---------------- Programming Options (avrdude) ----------------\r
-\r
-# Programming hardware\r
-# Type: avrdude -c ?\r
-# to get a full listing.\r
-#\r
-AVRDUDE_PROGRAMMER = jtagmkII\r
-\r
-# com1 = serial port. Use lpt1 to connect to parallel port.\r
-AVRDUDE_PORT = usb\r
-\r
-AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex\r
-#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep\r
-\r
-\r
-# Uncomment the following if you want avrdude's erase cycle counter.\r
-# Note that this counter needs to be initialized first using -Yn,\r
-# see avrdude manual.\r
-#AVRDUDE_ERASE_COUNTER = -y\r
-\r
-# Uncomment the following if you do /not/ wish a verification to be\r
-# performed after programming the device.\r
-#AVRDUDE_NO_VERIFY = -V\r
-\r
-# Increase verbosity level.  Please use this when submitting bug\r
-# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>\r
-# to submit bug reports.\r
-#AVRDUDE_VERBOSE = -v -v\r
-\r
-AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)\r
-AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)\r
-AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)\r
-AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)\r
-\r
-\r
-\r
-#---------------- Debugging Options ----------------\r
-\r
-# For simulavr only - target MCU frequency.\r
-DEBUG_MFREQ = $(F_CPU)\r
-\r
-# Set the DEBUG_UI to either gdb or insight.\r
-# DEBUG_UI = gdb\r
-DEBUG_UI = insight\r
-\r
-# Set the debugging back-end to either avarice, simulavr.\r
-DEBUG_BACKEND = avarice\r
-#DEBUG_BACKEND = simulavr\r
-\r
-# GDB Init Filename.\r
-GDBINIT_FILE = __avr_gdbinit\r
-\r
-# When using avarice settings for the JTAG\r
-JTAG_DEV = /dev/com1\r
-\r
-# Debugging port used to communicate between GDB / avarice / simulavr.\r
-DEBUG_PORT = 4242\r
-\r
-# Debugging host used to communicate between GDB / avarice / simulavr, normally\r
-#     just set to localhost unless doing some sort of crazy debugging when\r
-#     avarice is running on a different computer.\r
-DEBUG_HOST = localhost\r
-\r
-\r
-\r
-#============================================================================\r
-\r
-\r
-# Define programs and commands.\r
-SHELL = sh\r
-CC = avr-gcc\r
-OBJCOPY = avr-objcopy\r
-OBJDUMP = avr-objdump\r
-SIZE = avr-size\r
-AR = avr-ar rcs\r
-NM = avr-nm\r
-AVRDUDE = avrdude\r
-REMOVE = rm -f\r
-REMOVEDIR = rm -rf\r
-COPY = cp\r
-WINSHELL = cmd\r
-\r
-\r
-# Define Messages\r
-# English\r
-MSG_ERRORS_NONE = Errors: none\r
-MSG_BEGIN = -------- begin --------\r
-MSG_END = --------  end  --------\r
-MSG_SIZE_BEFORE = Size before:\r
-MSG_SIZE_AFTER = Size after:\r
-MSG_COFF = Converting to AVR COFF:\r
-MSG_EXTENDED_COFF = Converting to AVR Extended COFF:\r
-MSG_FLASH = Creating load file for Flash:\r
-MSG_EEPROM = Creating load file for EEPROM:\r
-MSG_EXTENDED_LISTING = Creating Extended Listing:\r
-MSG_SYMBOL_TABLE = Creating Symbol Table:\r
-MSG_LINKING = Linking:\r
-MSG_COMPILING = Compiling C:\r
-MSG_COMPILING_CPP = Compiling C++:\r
-MSG_ASSEMBLING = Assembling:\r
-MSG_CLEANING = Cleaning project:\r
-MSG_CREATING_LIBRARY = Creating library:\r
-\r
-\r
-\r
-\r
-# Define all object files.\r
-OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o)\r
-\r
-# Define all listing files.\r
-LST = $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst)\r
-\r
-\r
-# Compiler flags to generate dependency files.\r
-#GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d\r
-\r
-\r
-# Combine all necessary flags and optional flags.\r
-# Add target processor to flags.\r
-ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)\r
-ALL_CPPFLAGS = -mmcu=$(MCU) -I. -x c++ $(CPPFLAGS) $(GENDEPFLAGS)\r
-ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)\r
-\r
-\r
-\r
-\r
-\r
-# Default target.\r
-all: begin gccversion sizebefore build sizeafter end\r
-\r
-# Change the build target to build a HEX file or a library.\r
-build: elf hex eep lss sym\r
-#build: lib\r
-\r
-\r
-elf: $(TARGET).elf\r
-hex: $(TARGET).hex\r
-eep: $(TARGET).eep\r
-lss: $(TARGET).lss\r
-sym: $(TARGET).sym\r
-LIBNAME=lib$(TARGET).a\r
-lib: $(LIBNAME)\r
-\r
-\r
-\r
-# Eye candy.\r
-# AVR Studio 3.x does not check make's exit code but relies on\r
-# the following magic strings to be generated by the compile job.\r
-begin:\r
-       @echo\r
-       @echo $(MSG_BEGIN)\r
-\r
-end:\r
-       @echo $(MSG_END)\r
-       @echo\r
-\r
-\r
-# Display size of file.\r
-HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex\r
-ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf\r
-MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )\r
-FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )\r
-\r
-\r
-sizebefore:\r
-       @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \\r
-       2>/dev/null; echo; fi\r
-\r
-sizeafter:\r
-       @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \\r
-       2>/dev/null; echo; fi\r
-\r
-\r
-\r
-# Display compiler version information.\r
-gccversion :\r
-       @$(CC) --version\r
-\r
-\r
-# Program the device.\r
-program: $(TARGET).hex $(TARGET).eep\r
-       $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)\r
-\r
-flip: $(TARGET).hex\r
-       batchisp -hardware usb -device $(MCU) -operation erase f\r
-       batchisp -hardware usb -device $(MCU) -operation loadbuffer $(TARGET).hex program\r
-       batchisp -hardware usb -device $(MCU) -operation start reset 0\r
-\r
-dfu: $(TARGET).hex\r
-       dfu-programmer $(MCU) erase\r
-       dfu-programmer $(MCU) flash $(TARGET).hex\r
-       dfu-programmer $(MCU) reset\r
-\r
-flip-ee: $(TARGET).hex $(TARGET).eep\r
-       $(COPY) $(TARGET).eep $(TARGET)eep.hex\r
-       batchisp -hardware usb -device $(MCU) -operation memory EEPROM erase\r
-       batchisp -hardware usb -device $(MCU) -operation memory EEPROM loadbuffer $(TARGET)eep.hex program\r
-       batchisp -hardware usb -device $(MCU) -operation start reset 0\r
-       $(REMOVE) $(TARGET)eep.hex\r
-\r
-dfu-ee: $(TARGET).hex $(TARGET).eep\r
-       dfu-programmer $(MCU) eeprom-flash $(TARGET).eep\r
-       dfu-programmer $(MCU) reset\r
-\r
-\r
-# Generate avr-gdb config/init file which does the following:\r
-#     define the reset signal, load the target file, connect to target, and set\r
-#     a breakpoint at main().\r
-gdb-config:\r
-       @$(REMOVE) $(GDBINIT_FILE)\r
-       @echo define reset >> $(GDBINIT_FILE)\r
-       @echo SIGNAL SIGHUP >> $(GDBINIT_FILE)\r
-       @echo end >> $(GDBINIT_FILE)\r
-       @echo file $(TARGET).elf >> $(GDBINIT_FILE)\r
-       @echo target remote $(DEBUG_HOST):$(DEBUG_PORT)  >> $(GDBINIT_FILE)\r
-ifeq ($(DEBUG_BACKEND),simulavr)\r
-       @echo load  >> $(GDBINIT_FILE)\r
-endif\r
-       @echo break main >> $(GDBINIT_FILE)\r
-\r
-debug: gdb-config $(TARGET).elf\r
-ifeq ($(DEBUG_BACKEND), avarice)\r
-       @echo Starting AVaRICE - Press enter when "waiting to connect" message displays.\r
-       @$(WINSHELL) /c start avarice --jtag $(JTAG_DEV) --erase --program --file \\r
-       $(TARGET).elf $(DEBUG_HOST):$(DEBUG_PORT)\r
-       @$(WINSHELL) /c pause\r
-\r
-else\r
-       @$(WINSHELL) /c start simulavr --gdbserver --device $(MCU) --clock-freq \\r
-       $(DEBUG_MFREQ) --port $(DEBUG_PORT)\r
-endif\r
-       @$(WINSHELL) /c start avr-$(DEBUG_UI) --command=$(GDBINIT_FILE)\r
-\r
-\r
-\r
-\r
-# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.\r
-COFFCONVERT = $(OBJCOPY) --debugging\r
-COFFCONVERT += --change-section-address .data-0x800000\r
-COFFCONVERT += --change-section-address .bss-0x800000\r
-COFFCONVERT += --change-section-address .noinit-0x800000\r
-COFFCONVERT += --change-section-address .eeprom-0x810000\r
-\r
-\r
-\r
-coff: $(TARGET).elf\r
-       @echo\r
-       @echo $(MSG_COFF) $(TARGET).cof\r
-       $(COFFCONVERT) -O coff-avr $< $(TARGET).cof\r
-\r
-\r
-extcoff: $(TARGET).elf\r
-       @echo\r
-       @echo $(MSG_EXTENDED_COFF) $(TARGET).cof\r
-       $(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof\r
-\r
-\r
-\r
-# Create final output files (.hex, .eep) from ELF output file.\r
-%.hex: %.elf\r
-       @echo\r
-       @echo $(MSG_FLASH) $@\r
-       $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock $< $@\r
-\r
-%.eep: %.elf\r
-       @echo\r
-       @echo $(MSG_EEPROM) $@\r
-       -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \\r
-       --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) $< $@ || exit 0\r
-\r
-# Create extended listing file from ELF output file.\r
-%.lss: %.elf\r
-       @echo\r
-       @echo $(MSG_EXTENDED_LISTING) $@\r
-       $(OBJDUMP) -h -S -z $< > $@\r
-\r
-# Create a symbol table from ELF output file.\r
-%.sym: %.elf\r
-       @echo\r
-       @echo $(MSG_SYMBOL_TABLE) $@\r
-       $(NM) -n $< > $@\r
-\r
-\r
-\r
-# Create library from object files.\r
-.SECONDARY : $(TARGET).a\r
-.PRECIOUS : $(OBJ)\r
-%.a: $(OBJ)\r
-       @echo\r
-       @echo $(MSG_CREATING_LIBRARY) $@\r
-       $(AR) $@ $(OBJ)\r
-\r
-\r
-# Link: create ELF output file from object files.\r
-.SECONDARY : $(TARGET).elf\r
-.PRECIOUS : $(OBJ)\r
-%.elf: $(OBJ)\r
-       @echo\r
-       @echo $(MSG_LINKING) $@\r
-       $(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS)\r
-\r
-\r
-# Compile: create object files from C source files.\r
-$(OBJDIR)/%.o : %.c\r
-       @echo\r
-       @echo $(MSG_COMPILING) $<\r
-       $(CC) -c $(ALL_CFLAGS) $< -o $@\r
-\r
-\r
-# Compile: create object files from C++ source files.\r
-$(OBJDIR)/%.o : %.cpp\r
-       @echo\r
-       @echo $(MSG_COMPILING_CPP) $<\r
-       $(CC) -c $(ALL_CPPFLAGS) $< -o $@\r
-\r
-\r
-# Compile: create assembler files from C source files.\r
-%.s : %.c\r
-       $(CC) -S $(ALL_CFLAGS) $< -o $@\r
-\r
-\r
-# Compile: create assembler files from C++ source files.\r
-%.s : %.cpp\r
-       $(CC) -S $(ALL_CPPFLAGS) $< -o $@\r
-\r
-\r
-# Assemble: create object files from assembler source files.\r
-$(OBJDIR)/%.o : %.S\r
-       @echo\r
-       @echo $(MSG_ASSEMBLING) $<\r
-       $(CC) -c $(ALL_ASFLAGS) $< -o $@\r
-\r
-\r
-# Create preprocessed source for use in sending a bug report.\r
-%.i : %.c\r
-       $(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@\r
-\r
-\r
-# Target: clean project.\r
-clean: begin clean_list end\r
-\r
-clean_list :\r
-       @echo\r
-       @echo $(MSG_CLEANING)\r
-       $(REMOVE) $(TARGET).hex\r
-       $(REMOVE) $(TARGET).eep\r
-       $(REMOVE) $(TARGET).cof\r
-       $(REMOVE) $(TARGET).elf\r
-       $(REMOVE) $(TARGET).map\r
-       $(REMOVE) $(TARGET).sym\r
-       $(REMOVE) $(TARGET).lss\r
-       $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o)\r
-       $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst)\r
-       $(REMOVE) $(SRC:.c=.s)\r
-       $(REMOVE) $(SRC:.c=.d)\r
-       $(REMOVE) $(SRC:.c=.i)\r
-       $(REMOVEDIR) .dep\r
-\r
-doxygen:\r
-       @echo Generating Project Documentation \($(TARGET)\)...\r
-       @if ( ( cat Doxygen.conf ; echo "HTML_STYLESHEET=$(LUFA_PATH)/LUFA/DoxygenPages/Style/Style.css" ) | doxygen - 2>&1 | grep -v "warning: ignoring unsupported tag" ;); then \\r
-         exit 1; \\r
-       fi;\r
-       @echo Documentation Generation Complete.\r
-\r
-\r
-clean_doxygen:\r
-       rm -rf Documentation\r
-\r
-checksource:\r
-       @for f in $(SRC) $(CPPSRC) $(ASRC); do \\r
-               if [ -f $$f ]; then \\r
-                       echo "Found Source File: $$f" ; \\r
-               else \\r
-                       echo "Source File Not Found: $$f" ; \\r
-               fi; done \r
-\r
-\r
-# Create object files directory\r
-$(shell mkdir $(OBJDIR) 2>/dev/null)\r
-\r
-\r
-# Include the dependency files.\r
--include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)\r
-\r
-\r
-# Listing of phony targets.\r
-.PHONY : all begin finish end sizebefore sizeafter gccversion \\r
-build elf hex eep lss sym coff extcoff doxygen clean          \\r
-clean_list clean_doxygen program dfu flip flip-ee dfu-ee      \\r
-debug gdb-config checksource\r
diff --git a/BuildTests/ModuleTest/makefile.test b/BuildTests/ModuleTest/makefile.test
new file mode 100644 (file)
index 0000000..b01998f
--- /dev/null
@@ -0,0 +1,66 @@
+#
+#             LUFA Library
+#     Copyright (C) Dean Camera, 2012.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#           www.lufa-lib.org
+#
+# --------------------------------------
+#         LUFA Project Makefile.
+# --------------------------------------
+
+MCU          = 
+ARCH         = 
+BOARD        = NONE
+F_CPU        = $(F_USB)
+OPTIMIZATION = 1
+TARGET       = Test
+SRC          = $(TARGET)_C.c $(TARGET)_CPP.cpp Dummy.S $(LUFA_SRC_USB)
+LUFA_PATH    = ../../LUFA
+DEBUG_LEVEL  = 0 
+
+ifeq ($(ARCH), AVR8)
+F_USB        = 8000000
+else ifeq ($(ARCH), XMEGA)
+F_USB        = 48000000
+else ifeq ($(ARCH), UC3)
+F_USB        = 48000000
+endif
+
+# Generic C/C++ compiler flags
+CC_FLAGS  = -Wextra
+CC_FLAGS += -Werror
+CC_FLAGS += -Wformat=2
+CC_FLAGS += -Winit-self
+CC_FLAGS += -Wswitch-enum
+CC_FLAGS += -Wunused
+CC_FLAGS += -Wundef
+CC_FLAGS += -Wpointer-arith
+CC_FLAGS += -Wcast-align
+CC_FLAGS += -Wwrite-strings
+CC_FLAGS += -Wlogical-op
+CC_FLAGS += -Wmissing-declarations
+CC_FLAGS += -Wmissing-field-initializers
+CC_FLAGS += -Wmissing-format-attribute
+CC_FLAGS += -Woverlength-strings
+
+# Only enable rendundant declaration warnings for AVR8 target (FIXME)
+ifeq ($(ARCH), AVR8)
+CC_FLAGS += -Wredundant-decls
+endif
+
+# C compiler only flags
+C_FLAGS += -Wmissing-parameter-type
+C_FLAGS += -Wnested-externs
+
+# Potential additional warnings to enable in the future (FIXME)
+#CC_FLAGS += -Wswitch-default
+#CC_FLAGS += -Wc++-compat
+#CC_FLAGS += -Wcast-qual
+#CC_FLAGS += -Wconversion
+#CC_FLAGS += -Wjump-misses-init
+#CC_FLAGS += -pedantic
+
+# Include LUFA build script makefiles
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
\ No newline at end of file
diff --git a/BuildTests/ModuleTest/makefile.uc3 b/BuildTests/ModuleTest/makefile.uc3
deleted file mode 100644 (file)
index 5628748..0000000
+++ /dev/null
@@ -1,513 +0,0 @@
-# Hey Emacs, this is a -*- makefile -*-\r
-#----------------------------------------------------------------------------\r
-# WinAVR Makefile Template written by Eric B. Weddington, Jörg Wunsch, et al.\r
-#  >> Modified for use with the LUFA project. <<\r
-#\r
-# Released to the Public Domain\r
-#\r
-# Additional material for this makefile was written by:\r
-# Peter Fleury\r
-# Tim Henigan\r
-# Colin O'Flynn\r
-# Reiner Patommel\r
-# Markus Pfaff\r
-# Sander Pool\r
-# Frederik Rouleau\r
-# Carlos Lamas\r
-# Dean Camera\r
-# Opendous Inc.\r
-# Denver Gingerich\r
-#\r
-#----------------------------------------------------------------------------\r
-# On command line:\r
-#\r
-# make all = Make software.\r
-#\r
-# make clean = Clean out built project files.\r
-#\r
-# make dfu = Download the hex file to the device, using dfu-programmer (must\r
-#            have dfu-programmer installed).\r
-#\r
-# make flip = Download the hex file to the device, using Atmel FLIP (must\r
-#             have Atmel FLIP installed).\r
-#\r
-# make doxygen = Generate DoxyGen documentation for the project (must have\r
-#                DoxyGen installed)\r
-#\r
-# make filename.s = Just compile filename.c into the assembler code only.\r
-#\r
-# make filename.i = Create a preprocessed source file for use in submitting\r
-#                   bug reports to the GCC project.\r
-#\r
-# To rebuild project do "make clean" then "make all".\r
-#----------------------------------------------------------------------------\r
-\r
-\r
-# MCU name\r
-MCU = uc3a3256\r
-\r
-\r
-# Targeted chip architecture (see library "Architectures" documentation)\r
-ARCH = UC3\r
-\r
-\r
-# Target board (see library "Board Types" documentation, NONE for projects not requiring\r
-# LUFA board drivers). If USER is selected, put custom board drivers in a directory called \r
-# "Board" inside the application directory.\r
-BOARD = NONE\r
-\r
-\r
-# Processor frequency.\r
-#     This will define a symbol, F_CPU, in all source code files equal to the\r
-#     processor frequency in Hz. You can then use this symbol in your source code to\r
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done\r
-#     automatically to create a 32-bit value in your source code.\r
-#\r
-#     This should be the frequency the system core runs at, after the system clock\r
-#     has been set up correctly and started.\r
-F_CPU = 12000000\r
-\r
-\r
-# USB controller master clock frequency.\r
-#     This will define a symbol, F_USB, in all source code files equal to the\r
-#     input clock frequency of the USB controller's clock generator in Hz.\r
-#\r
-#     For the UC3 chips, this should be equal to 48MHz or 96MHz.\r
-F_USB = 48000000\r
-\r
-\r
-# Output format. (can be srec, ihex, binary)\r
-FORMAT = ihex\r
-\r
-\r
-# Target file name (without extension).\r
-TARGET = Test\r
-\r
-\r
-# Object files directory\r
-#     To put object files in current directory, use a dot (.), do NOT make\r
-#     this an empty or blank macro!\r
-OBJDIR = .\r
-\r
-\r
-# Path to the LUFA library\r
-LUFA_PATH = ../..\r
-\r
-\r
-# LUFA library compile-time options and predefined tokens (add '-D' before each token)\r
-LUFA_OPTS = \r
-\r
-\r
-# Create the LUFA source path variables by including the LUFA root makefile\r
-include $(LUFA_PATH)/LUFA/makefile\r
-\r
-\r
-# List C source files here. (C dependencies are automatically generated.)\r
-SRC = Test_C.c                   \\r
-      $(LUFA_SRC_USB)            \\r
-      $(LUFA_SRC_USBCLASS)\r
-\r
-\r
-# List C++ source files here. (C dependencies are automatically generated.)\r
-CPPSRC = Test_CPP.cpp\r
-\r
-\r
-# List Assembler source files here.\r
-#     Make them always end in a capital .S.  Files ending in a lowercase .s\r
-#     will not be considered source files but generated files (assembler\r
-#     output from the compiler), and will be deleted upon "make clean"!\r
-#     Even though the DOS/Win* filesystem matches both .s and .S the same,\r
-#     it will preserve the spelling of the filenames, and gcc itself does\r
-#     care about how the name is spelled on its command-line.\r
-ASRC = Dummy.S                 \\r
-       $(LUFA_PATH)/LUFA/Platform/UC3/Exception.S\r
-\r
-\r
-# Optimization level, can be [0, 1, 2, 3, s]. \r
-#     0 = turn off optimization. s = optimize for size.\r
-#     (Note: 3 is not always the best optimization level. See avr-libc FAQ.)\r
-OPT = 1\r
-\r
-\r
-# List any extra directories to look for include files here.\r
-#     Each directory must be seperated by a space.\r
-#     Use forward slashes for directory separators.\r
-#     For a directory that has spaces, enclose it in quotes.\r
-EXTRAINCDIRS = $(LUFA_PATH)/\r
-\r
-\r
-# Compiler flag to set the C Standard level.\r
-#     c89   = "ANSI" C\r
-#     gnu89 = c89 plus GCC extensions\r
-#     c99   = ISO C99 standard (not yet fully implemented)\r
-#     gnu99 = c99 plus GCC extensions\r
-CSTANDARD = -std=gnu99\r
-\r
-\r
-# Place -D or -U options here for C sources\r
-CDEFS  = -DF_CPU=$(F_CPU)UL\r
-CDEFS += -DF_USB=$(F_USB)UL\r
-CDEFS += -DBOARD=BOARD_$(BOARD)\r
-CDEFS += -DARCH=ARCH_$(ARCH)\r
-CDEFS += $(LUFA_OPTS)\r
-\r
-\r
-# Place -D or -U options here for ASM sources\r
-ADEFS  = -DF_CPU=$(F_CPU)\r
-ADEFS += -DF_USB=$(F_USB)UL\r
-ADEFS += -DBOARD=BOARD_$(BOARD)\r
-ADEFS += -DARCH=ARCH_$(ARCH)\r
-ADEFS += $(LUFA_OPTS)\r
-\r
-# Place -D or -U options here for C++ sources\r
-CPPDEFS  = -DF_CPU=$(F_CPU)UL\r
-CPPDEFS += -DF_USB=$(F_USB)UL\r
-CPPDEFS += -DBOARD=BOARD_$(BOARD)\r
-CPPDEFS += -DARCH=ARCH_$(ARCH)\r
-CPPDEFS += $(LUFA_OPTS)\r
-\r
-\r
-# Debugging level.\r
-DEBUG = 3\r
-\r
-\r
-#---------------- Compiler Options C ----------------\r
-#  -g*:          generate debugging information\r
-#  -O*:          optimization level\r
-#  -f...:        tuning, see GCC manual and avr-libc documentation\r
-#  -Wall...:     warning level\r
-#  -Wa,...:      tell GCC to pass this to the assembler.\r
-#    -adhlns...: create assembler listing\r
-CFLAGS = -g$(DEBUG)\r
-CFLAGS += $(CDEFS)\r
-CFLAGS += -O$(OPT)\r
-CFLAGS += -funsigned-char\r
-CFLAGS += -funsigned-bitfields\r
-CFLAGS += -ffunction-sections\r
-CFLAGS += -fno-strict-aliasing\r
-CFLAGS += -masm-addr-pseudos\r
-#CFLAGS += -Wa,-adhlns=$(<:%.c=$(OBJDIR)/%.lst)\r
-CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
-CFLAGS += $(CSTANDARD)\r
-CFLAGS += -Werror\r
-CFLAGS += -Wall\r
-CFLAGS += -Wextra\r
-CFLAGS += -Wstrict-prototypes\r
-CFLAGS += -Wformat=2\r
-CFLAGS += -Winit-self\r
-CFLAGS += -Wswitch-enum\r
-CFLAGS += -Wunused\r
-CFLAGS += -Wundef\r
-CFLAGS += -Wpointer-arith\r
-CFLAGS += -Wcast-align\r
-CFLAGS += -Wwrite-strings\r
-CFLAGS += -Wlogical-op\r
-CFLAGS += -Wmissing-parameter-type\r
-CFLAGS += -Wmissing-declarations\r
-CFLAGS += -Wmissing-field-initializers\r
-CFLAGS += -Wmissing-format-attribute\r
-#CFLAGS += -Wredundant-decls\r
-CFLAGS += -Wnested-externs\r
-CFLAGS += -Woverlength-strings\r
-#CFLAGS += -Wswitch-default\r
-#CFLAGS += -Wc++-compat\r
-#CFLAGS += -Wcast-qual\r
-#CFLAGS += -Wconversion\r
-#CFLAGS += -Wjump-misses-init\r
-#CFLAGS += -pedantic\r
-\r
-\r
-#---------------- Compiler Options C++ ----------------\r
-#  -g*:          generate debugging information\r
-#  -O*:          optimization level\r
-#  -f...:        tuning, see GCC manual and avr-libc documentation\r
-#  -Wall...:     warning level\r
-#  -Wa,...:      tell GCC to pass this to the assembler.\r
-#    -adhlns...: create assembler listing\r
-CPPFLAGS = -g$(DEBUG)\r
-CPPFLAGS += $(CPPDEFS)\r
-CPPFLAGS += -O$(OPT)\r
-CPPFLAGS += -funsigned-char\r
-CPPFLAGS += -funsigned-bitfields\r
-CPPFLAGS += -ffunction-sections\r
-CPPFLAGS += -fno-strict-aliasing\r
-CPPFLAGS += -fno-exceptions\r
-CPPFLAGS += -masm-addr-pseudos\r
-CPPFLAGS += -Wall\r
-CPPFLAGS += -Wundef\r
-#CPPFLAGS += -Wa,-adhlns=$(<:%.cpp=$(OBJDIR)/%.lst)\r
-CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
-#CPPFLAGS += $(CSTANDARD)\r
-\r
-\r
-#---------------- Assembler Options ----------------\r
-#  -Wa,...:   tell GCC to pass this to the assembler.\r
-#  -adhlns:   create listing\r
-#  -gstabs:   have the assembler create line number information; note that\r
-#             for use in COFF files, additional information about filenames\r
-#             and function names needs to be present in the assembler source\r
-#             files -- see avr-libc docs [FIXME: not yet described there]\r
-#  -listing-cont-lines: Sets the maximum number of continuation lines of hex \r
-#       dump that will be displayed for a given single line of source input.\r
-ASFLAGS = $(ADEFS)\r
-#ASFLAGS += -Wa,-adhlns=$(<:%.S=$(OBJDIR)/%.lst),-gstabs,--listing-cont-lines=100\r
-\r
-\r
-#---------------- Linker Options ----------------\r
-#  -Wl,...:     tell GCC to pass this to linker.\r
-#    -Map:      create map file\r
-#    --cref:    add cross reference to  map file\r
-#LDFLAGS  = -Wl,-Map=$(TARGET).map,--cref\r
-LDFLAGS += -Wl,--gc-sections --rodata-writable\r
-LDFLAGS += -Wl,--direct-data\r
-#LDFLAGS += -T linker_script.x\r
-\r
-\r
-#============================================================================\r
-\r
-\r
-# Define programs and commands.\r
-SHELL = sh\r
-CC = avr32-gcc\r
-OBJCOPY = avr32-objcopy\r
-OBJDUMP = avr32-objdump\r
-SIZE = avr32-size\r
-AR = avr32-ar rcs\r
-NM = avr32-nm\r
-REMOVE = rm -f\r
-REMOVEDIR = rm -rf\r
-COPY = cp\r
-WINSHELL = cmd\r
-\r
-\r
-# Define Messages\r
-# English\r
-MSG_ERRORS_NONE = Errors: none\r
-MSG_BEGIN = -------- begin --------\r
-MSG_END = --------  end  --------\r
-MSG_SIZE_BEFORE = Size before: \r
-MSG_SIZE_AFTER = Size after:\r
-MSG_COFF = Converting to AVR COFF:\r
-MSG_FLASH = Creating load file for Flash:\r
-MSG_EEPROM = Creating load file for EEPROM:\r
-MSG_EXTENDED_LISTING = Creating Extended Listing:\r
-MSG_SYMBOL_TABLE = Creating Symbol Table:\r
-MSG_LINKING = Linking:\r
-MSG_COMPILING = Compiling C:\r
-MSG_COMPILING_CPP = Compiling C++:\r
-MSG_ASSEMBLING = Assembling:\r
-MSG_CLEANING = Cleaning project:\r
-MSG_CREATING_LIBRARY = Creating library:\r
-\r
-\r
-\r
-\r
-# Define all object files.\r
-OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o) \r
-\r
-# Define all listing files.\r
-LST = $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst) \r
-\r
-\r
-# Compiler flags to generate dependency files.\r
-#GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d\r
-\r
-\r
-# Combine all necessary flags and optional flags.\r
-# Add target processor to flags.\r
-ALL_CFLAGS = -mpart=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)\r
-ALL_CPPFLAGS = -mpart=$(MCU) -I. -x c++ $(CPPFLAGS) $(GENDEPFLAGS)\r
-ALL_ASFLAGS = -mpart=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)\r
-\r
-\r
-\r
-\r
-\r
-# Default target.\r
-all: begin gccversion sizebefore build sizeafter end\r
-\r
-# Change the build target to build a HEX file or a library.\r
-build: elf hex lss sym\r
-#build: lib\r
-\r
-\r
-elf: $(TARGET).elf\r
-hex: $(TARGET).hex\r
-lss: $(TARGET).lss\r
-sym: $(TARGET).sym\r
-LIBNAME=lib$(TARGET).a\r
-lib: $(LIBNAME)\r
-\r
-\r
-\r
-# Eye candy.\r
-# AVR Studio 3.x does not check make's exit code but relies on\r
-# the following magic strings to be generated by the compile job.\r
-begin:\r
-       @echo\r
-       @echo $(MSG_BEGIN)\r
-\r
-end:\r
-       @echo $(MSG_END)\r
-       @echo\r
-\r
-\r
-# Display size of file.\r
-HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex\r
-ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf\r
-MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )\r
-FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )\r
-\r
-\r
-sizebefore:\r
-       @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \\r
-       2>/dev/null; echo; fi\r
-\r
-sizeafter:\r
-       @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \\r
-       2>/dev/null; echo; fi\r
-\r
-\r
-\r
-# Display compiler version information.\r
-gccversion : \r
-       @$(CC) --version\r
-\r
-\r
-# Program the device.  \r
-flip: $(TARGET).hex\r
-       batchisp -hardware usb -device $(MCU) -operation erase f\r
-       batchisp -hardware usb -device $(MCU) -operation loadbuffer $(TARGET).hex program\r
-       batchisp -hardware usb -device $(MCU) -operation start reset 0\r
-\r
-dfu: $(TARGET).hex\r
-       dfu-programmer $(MCU) erase\r
-       dfu-programmer $(MCU) flash $(TARGET).hex\r
-       dfu-programmer $(MCU) reset\r
-\r
-\r
-# Create final output files (.hex, .eep) from ELF output file.\r
-%.hex: %.elf\r
-       @echo\r
-       @echo $(MSG_FLASH) $@\r
-       $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock -R .signature $< $@\r
-\r
-# Create extended listing file from ELF output file.\r
-%.lss: %.elf\r
-       @echo\r
-       @echo $(MSG_EXTENDED_LISTING) $@\r
-       $(OBJDUMP) -h -S -z $< > $@\r
-\r
-# Create a symbol table from ELF output file.\r
-%.sym: %.elf\r
-       @echo\r
-       @echo $(MSG_SYMBOL_TABLE) $@\r
-       $(NM) -n $< > $@\r
-\r
-\r
-\r
-# Create library from object files.\r
-.SECONDARY : $(TARGET).a\r
-.PRECIOUS : $(OBJ)\r
-%.a: $(OBJ)\r
-       @echo\r
-       @echo $(MSG_CREATING_LIBRARY) $@\r
-       $(AR) $@ $(OBJ)\r
-\r
-\r
-# Link: create ELF output file from object files.\r
-.SECONDARY : $(TARGET).elf\r
-.PRECIOUS : $(OBJ)\r
-%.elf: $(OBJ)\r
-       @echo\r
-       @echo $(MSG_LINKING) $@\r
-       $(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS)\r
-\r
-\r
-# Compile: create object files from C source files.\r
-$(OBJDIR)/%.o : %.c\r
-       @echo\r
-       @echo $(MSG_COMPILING) $<\r
-       $(CC) -c $(ALL_CFLAGS) $< -o $@ \r
-\r
-\r
-# Compile: create object files from C++ source files.\r
-$(OBJDIR)/%.o : %.cpp\r
-       @echo\r
-       @echo $(MSG_COMPILING_CPP) $<\r
-       $(CC) -c $(ALL_CPPFLAGS) $< -o $@ \r
-\r
-\r
-# Compile: create assembler files from C source files.\r
-%.s : %.c\r
-       $(CC) -S $(ALL_CFLAGS) $< -o $@\r
-\r
-\r
-# Compile: create assembler files from C++ source files.\r
-%.s : %.cpp\r
-       $(CC) -S $(ALL_CPPFLAGS) $< -o $@\r
-\r
-\r
-# Assemble: create object files from assembler source files.\r
-$(OBJDIR)/%.o : %.S\r
-       @echo\r
-       @echo $(MSG_ASSEMBLING) $<\r
-       $(CC) -c $(ALL_ASFLAGS) $< -o $@\r
-\r
-\r
-# Create preprocessed source for use in sending a bug report.\r
-%.i : %.c\r
-       $(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@ \r
-\r
-\r
-# Target: clean project.\r
-clean: begin clean_list end\r
-\r
-clean_list :\r
-       @echo\r
-       @echo $(MSG_CLEANING)\r
-       $(REMOVE) $(TARGET).hex\r
-       $(REMOVE) $(TARGET).cof\r
-       $(REMOVE) $(TARGET).elf\r
-       $(REMOVE) $(TARGET).map\r
-       $(REMOVE) $(TARGET).sym\r
-       $(REMOVE) $(TARGET).lss\r
-       $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o)\r
-       $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst)\r
-       $(REMOVE) $(SRC:.c=.s)\r
-       $(REMOVE) $(SRC:.c=.d)\r
-       $(REMOVE) $(SRC:.c=.i)\r
-       $(REMOVEDIR) .dep\r
-\r
-doxygen:\r
-       @echo Generating Project Documentation \($(TARGET)\)...\r
-       @if ( ( cat Doxygen.conf ; echo "HTML_STYLESHEET=$(LUFA_PATH)/LUFA/DoxygenPages/Style/Style.css" ) | doxygen - 2>&1 | grep -v "warning: ignoring unsupported tag" ;); then \\r
-         exit 1; \\r
-       fi;\r
-       @echo Documentation Generation Complete.\r
-\r
-clean_doxygen:\r
-       rm -rf Documentation\r
-\r
-checksource:\r
-       @for f in $(SRC) $(CPPSRC) $(ASRC); do \\r
-               if [ -f $$f ]; then \\r
-                       echo "Found Source File: $$f" ; \\r
-               else \\r
-                       echo "Source File Not Found: $$f" ; \\r
-               fi; done \r
-\r
-\r
-# Create object files directory\r
-$(shell mkdir $(OBJDIR) 2>/dev/null)\r
-\r
-\r
-# Include the dependency files.\r
--include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)\r
-\r
-\r
-# Listing of phony targets.\r
-.PHONY : all begin finish end sizebefore sizeafter gccversion \\r
-build elf hex lss sym doxygen clean clean_list clean_doxygen  \\r
-dfu flip checksource\r
-\r
diff --git a/BuildTests/ModuleTest/makefile.xmega b/BuildTests/ModuleTest/makefile.xmega
deleted file mode 100644 (file)
index 0a2f501..0000000
+++ /dev/null
@@ -1,733 +0,0 @@
-# Hey Emacs, this is a -*- makefile -*-\r
-#----------------------------------------------------------------------------\r
-# WinAVR Makefile Template written by Eric B. Weddington, Jörg Wunsch, et al.\r
-#  >> Modified for use with the LUFA project. <<\r
-#\r
-# Released to the Public Domain\r
-#\r
-# Additional material for this makefile was written by:\r
-# Peter Fleury\r
-# Tim Henigan\r
-# Colin O'Flynn\r
-# Reiner Patommel\r
-# Markus Pfaff\r
-# Sander Pool\r
-# Frederik Rouleau\r
-# Carlos Lamas\r
-# Dean Camera\r
-# Opendous Inc.\r
-# Denver Gingerich\r
-#\r
-#----------------------------------------------------------------------------\r
-# On command line:\r
-#\r
-# make all = Make software.\r
-#\r
-# make clean = Clean out built project files.\r
-#\r
-# make coff = Convert ELF to AVR COFF.\r
-#\r
-# make extcoff = Convert ELF to AVR Extended COFF.\r
-#\r
-# make program = Download the hex file to the device, using avrdude.\r
-#                Please customize the avrdude settings below first!\r
-#\r
-# make dfu = Download the hex file to the device, using dfu-programmer (must\r
-#            have dfu-programmer installed).\r
-#\r
-# make flip = Download the hex file to the device, using Atmel FLIP (must\r
-#             have Atmel FLIP installed).\r
-#\r
-# make dfu-ee = Download the eeprom file to the device, using dfu-programmer\r
-#               (must have dfu-programmer installed).\r
-#\r
-# make flip-ee = Download the eeprom file to the device, using Atmel FLIP\r
-#                (must have Atmel FLIP installed).\r
-#\r
-# make doxygen = Generate DoxyGen documentation for the project (must have\r
-#                DoxyGen installed)\r
-#\r
-# make debug = Start either simulavr or avarice as specified for debugging, \r
-#              with avr-gdb or avr-insight as the front end for debugging.\r
-#\r
-# make filename.s = Just compile filename.c into the assembler code only.\r
-#\r
-# make filename.i = Create a preprocessed source file for use in submitting\r
-#                   bug reports to the GCC project.\r
-#\r
-# To rebuild project do "make clean" then "make all".\r
-#----------------------------------------------------------------------------\r
-\r
-\r
-# MCU name\r
-MCU = atxmega128a1u\r
-\r
-\r
-# Targeted chip architecture (see library "Architectures" documentation)\r
-ARCH = XMEGA\r
-\r
-\r
-# Target board (see library "Board Types" documentation, NONE for projects not requiring\r
-# LUFA board drivers). If USER is selected, put custom board drivers in a directory called \r
-# "Board" inside the application directory.\r
-BOARD = NONE\r
-\r
-\r
-# Processor frequency.\r
-#     This will define a symbol, F_CPU, in all source code files equal to the\r
-#     processor frequency in Hz. You can then use this symbol in your source code to\r
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done\r
-#     automatically to create a 32-bit value in your source code.\r
-#\r
-#     This should be the frequency the system core runs at, after the system clock\r
-#     has been set up correctly and started.\r
-F_CPU = 24000000\r
-\r
-\r
-# USB controller master clock frequency.\r
-#     This will define a symbol, F_USB, in all source code files equal to the\r
-#     input clock frequency of the USB controller's clock generator in Hz.\r
-#\r
-#     For the XMEGA chips, this should be equal to a multiple of 6MHz for Low\r
-#     Speed USB mode, or a multiple of 48MHz for Full Speed USB mode.\r
-F_USB = 48000000\r
-\r
-\r
-# Output format. (can be srec, ihex, binary)\r
-FORMAT = ihex\r
-\r
-\r
-# Target file name (without extension).\r
-TARGET = Test\r
-\r
-\r
-# Object files directory\r
-#     To put object files in current directory, use a dot (.), do NOT make\r
-#     this an empty or blank macro!\r
-OBJDIR = .\r
-\r
-\r
-# Path to the LUFA library\r
-LUFA_PATH = ../..\r
-\r
-\r
-# LUFA library compile-time options and predefined tokens\r
-LUFA_OPTS  = \r
-\r
-\r
-# Create the LUFA source path variables by including the LUFA root makefile\r
-include $(LUFA_PATH)/LUFA/makefile\r
-\r
-\r
-# List C source files here. (C dependencies are automatically generated.)\r
-SRC = Test_C.c                   \\r
-      $(LUFA_SRC_USB)            \\r
-      $(LUFA_SRC_USBCLASS)       \\r
-      $(LUFA_SRC_SERIAL)\r
-\r
-\r
-# List C++ source files here. (C dependencies are automatically generated.)\r
-CPPSRC = Test_CPP.cpp\r
-\r
-\r
-# List Assembler source files here.\r
-#     Make them always end in a capital .S.  Files ending in a lowercase .s\r
-#     will not be considered source files but generated files (assembler\r
-#     output from the compiler), and will be deleted upon "make clean"!\r
-#     Even though the DOS/Win* filesystem matches both .s and .S the same,\r
-#     it will preserve the spelling of the filenames, and gcc itself does\r
-#     care about how the name is spelled on its command-line.\r
-ASRC = Dummy.S\r
-\r
-\r
-# Optimization level, can be [0, 1, 2, 3, s]. \r
-#     0 = turn off optimization. s = optimize for size.\r
-#     (Note: 3 is not always the best optimization level. See avr-libc FAQ.)\r
-OPT = 1\r
-\r
-\r
-# List any extra directories to look for include files here.\r
-#     Each directory must be seperated by a space.\r
-#     Use forward slashes for directory separators.\r
-#     For a directory that has spaces, enclose it in quotes.\r
-EXTRAINCDIRS = $(LUFA_PATH)/\r
-\r
-\r
-# Compiler flag to set the C Standard level.\r
-#     c89   = "ANSI" C\r
-#     gnu89 = c89 plus GCC extensions\r
-#     c99   = ISO C99 standard (not yet fully implemented)\r
-#     gnu99 = c99 plus GCC extensions\r
-CSTANDARD = -std=gnu99\r
-\r
-\r
-# Place -D or -U options here for C sources\r
-CDEFS  = -DF_CPU=$(F_CPU)UL\r
-CDEFS += -DF_USB=$(F_USB)UL\r
-CDEFS += -DBOARD=BOARD_$(BOARD)\r
-CDEFS += -DARCH=ARCH_$(ARCH)\r
-CDEFS += $(LUFA_OPTS)\r
-\r
-\r
-# Place -D or -U options here for ASM sources\r
-ADEFS  = -DF_CPU=$(F_CPU)\r
-ADEFS += -DF_USB=$(F_USB)UL\r
-ADEFS += -DBOARD=BOARD_$(BOARD)\r
-ADEFS += -DARCH=ARCH_$(ARCH)\r
-ADEFS += $(LUFA_OPTS)\r
-\r
-# Place -D or -U options here for C++ sources\r
-CPPDEFS  = -DF_CPU=$(F_CPU)UL\r
-CPPDEFS += -DF_USB=$(F_USB)UL\r
-CPPDEFS += -DBOARD=BOARD_$(BOARD)\r
-CPPDEFS += -DARCH=ARCH_$(ARCH)\r
-CPPDEFS += $(LUFA_OPTS)\r
-\r
-\r
-# Debugging format.\r
-#     Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs.\r
-#     AVR Studio 4.10 requires dwarf-2.\r
-#     AVR [Extended] COFF format requires stabs, plus an avr-objcopy run.\r
-DEBUG = dwarf-2\r
-\r
-\r
-#---------------- Compiler Options C ----------------\r
-#  -g*:          generate debugging information\r
-#  -O*:          optimization level\r
-#  -f...:        tuning, see GCC manual and avr-libc documentation\r
-#  -Wall...:     warning level\r
-#  -Wa,...:      tell GCC to pass this to the assembler.\r
-#    -adhlns...: create assembler listing\r
-CFLAGS = -g$(DEBUG)\r
-CFLAGS += $(CDEFS)\r
-CFLAGS += -O$(OPT)\r
-CFLAGS += -funsigned-char\r
-CFLAGS += -funsigned-bitfields\r
-CFLAGS += -ffunction-sections\r
-CFLAGS += -fno-inline-small-functions\r
-CFLAGS += -fpack-struct\r
-CFLAGS += -fshort-enums\r
-CFLAGS += -fno-strict-aliasing\r
-CFLAGS += -fno-split-wide-types\r
-#CFLAGS += -Wa,-adhlns=$(<:%.c=$(OBJDIR)/%.lst)\r
-CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
-CFLAGS += $(CSTANDARD)\r
-CFLAGS += -Werror\r
-CFLAGS += -Wall\r
-CFLAGS += -Wextra\r
-CFLAGS += -Wstrict-prototypes\r
-CFLAGS += -Wformat=2\r
-CFLAGS += -Winit-self\r
-CFLAGS += -Wswitch-enum\r
-CFLAGS += -Wunused\r
-CFLAGS += -Wundef\r
-CFLAGS += -Wpointer-arith\r
-CFLAGS += -Wcast-align\r
-CFLAGS += -Wwrite-strings\r
-CFLAGS += -Wlogical-op\r
-CFLAGS += -Wmissing-parameter-type\r
-CFLAGS += -Wmissing-declarations\r
-CFLAGS += -Wmissing-field-initializers\r
-CFLAGS += -Wmissing-format-attribute\r
-CFLAGS += -Wredundant-decls\r
-CFLAGS += -Wnested-externs\r
-CFLAGS += -Woverlength-strings\r
-#CFLAGS += -Wswitch-default\r
-#CFLAGS += -Wc++-compat\r
-#CFLAGS += -Wcast-qual\r
-#CFLAGS += -Wconversion\r
-#CFLAGS += -Wjump-misses-init\r
-#CFLAGS += -pedantic\r
-\r
-\r
-#---------------- Compiler Options C++ ----------------\r
-#  -g*:          generate debugging information\r
-#  -O*:          optimization level\r
-#  -f...:        tuning, see GCC manual and avr-libc documentation\r
-#  -Wall...:     warning level\r
-#  -Wa,...:      tell GCC to pass this to the assembler.\r
-#    -adhlns...: create assembler listing\r
-CPPFLAGS = -g$(DEBUG)\r
-CPPFLAGS += $(CPPDEFS)\r
-CPPFLAGS += -O$(OPT)\r
-CPPFLAGS += -funsigned-char\r
-CPPFLAGS += -funsigned-bitfields\r
-CPPFLAGS += -fpack-struct\r
-CPPFLAGS += -fshort-enums\r
-CPPFLAGS += -ffunction-sections\r
-CPPFLAGS += -fno-strict-aliasing\r
-CPPFLAGS += -fno-exceptions\r
-CPPFLAGS += -Wall\r
-CPPFLAGS += -Wundef\r
-#CPPFLAGS += -Wa,-adhlns=$(<:%.cpp=$(OBJDIR)/%.lst)\r
-CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
-#CPPFLAGS += $(CSTANDARD)\r
-\r
-\r
-#---------------- Assembler Options ----------------\r
-#  -Wa,...:   tell GCC to pass this to the assembler.\r
-#  -adhlns:   create listing\r
-#  -gstabs:   have the assembler create line number information; note that\r
-#             for use in COFF files, additional information about filenames\r
-#             and function names needs to be present in the assembler source\r
-#             files -- see avr-libc docs [FIXME: not yet described there]\r
-#  -listing-cont-lines: Sets the maximum number of continuation lines of hex \r
-#       dump that will be displayed for a given single line of source input.\r
-ASFLAGS = $(ADEFS)\r
-#ASFLAGS += -Wa,-adhlns=$(<:%.S=$(OBJDIR)/%.lst),-gstabs,--listing-cont-lines=100\r
-\r
-\r
-#---------------- Library Options ----------------\r
-# Minimalistic printf version\r
-PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min\r
-\r
-# Floating point printf version (requires MATH_LIB = -lm below)\r
-PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt\r
-\r
-# If this is left blank, then it will use the Standard printf version.\r
-PRINTF_LIB = \r
-#PRINTF_LIB = $(PRINTF_LIB_MIN)\r
-#PRINTF_LIB = $(PRINTF_LIB_FLOAT)\r
-\r
-\r
-# Minimalistic scanf version\r
-SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min\r
-\r
-# Floating point + %[ scanf version (requires MATH_LIB = -lm below)\r
-SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt\r
-\r
-# If this is left blank, then it will use the Standard scanf version.\r
-SCANF_LIB = \r
-#SCANF_LIB = $(SCANF_LIB_MIN)\r
-#SCANF_LIB = $(SCANF_LIB_FLOAT)\r
-\r
-\r
-MATH_LIB = -lm\r
-\r
-\r
-# List any extra directories to look for libraries here.\r
-#     Each directory must be seperated by a space.\r
-#     Use forward slashes for directory separators.\r
-#     For a directory that has spaces, enclose it in quotes.\r
-EXTRALIBDIRS = \r
-\r
-\r
-\r
-#---------------- External Memory Options ----------------\r
-\r
-# 64 KB of external RAM, starting after internal RAM (ATmega128!),\r
-# used for variables (.data/.bss) and heap (malloc()).\r
-#EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff\r
-\r
-# 64 KB of external RAM, starting after internal RAM (ATmega128!),\r
-# only used for heap (malloc()).\r
-#EXTMEMOPTS = -Wl,--section-start,.data=0x801100,--defsym=__heap_end=0x80ffff\r
-\r
-EXTMEMOPTS =\r
-\r
-\r
-\r
-#---------------- Linker Options ----------------\r
-#  -Wl,...:     tell GCC to pass this to linker.\r
-#    -Map:      create map file\r
-#    --cref:    add cross reference to  map file\r
-#LDFLAGS  = -Wl,-Map=$(TARGET).map,--cref\r
-LDFLAGS += -Wl,--relax \r
-LDFLAGS += -Wl,--gc-sections\r
-LDFLAGS += $(EXTMEMOPTS)\r
-LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS))\r
-LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)\r
-#LDFLAGS += -T linker_script.x\r
-\r
-\r
-\r
-#---------------- Programming Options (avrdude) ----------------\r
-\r
-# Programming hardware\r
-# Type: avrdude -c ?\r
-# to get a full listing.\r
-#\r
-AVRDUDE_PROGRAMMER = jtagmkII\r
-\r
-# com1 = serial port. Use lpt1 to connect to parallel port.\r
-AVRDUDE_PORT = usb\r
-\r
-AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex\r
-#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep\r
-\r
-\r
-# Uncomment the following if you want avrdude's erase cycle counter.\r
-# Note that this counter needs to be initialized first using -Yn,\r
-# see avrdude manual.\r
-#AVRDUDE_ERASE_COUNTER = -y\r
-\r
-# Uncomment the following if you do /not/ wish a verification to be\r
-# performed after programming the device.\r
-#AVRDUDE_NO_VERIFY = -V\r
-\r
-# Increase verbosity level.  Please use this when submitting bug\r
-# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude> \r
-# to submit bug reports.\r
-#AVRDUDE_VERBOSE = -v -v\r
-\r
-AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)\r
-AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)\r
-AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)\r
-AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)\r
-\r
-\r
-\r
-#---------------- Debugging Options ----------------\r
-\r
-# For simulavr only - target MCU frequency.\r
-DEBUG_MFREQ = $(F_CPU)\r
-\r
-# Set the DEBUG_UI to either gdb or insight.\r
-# DEBUG_UI = gdb\r
-DEBUG_UI = insight\r
-\r
-# Set the debugging back-end to either avarice, simulavr.\r
-DEBUG_BACKEND = avarice\r
-#DEBUG_BACKEND = simulavr\r
-\r
-# GDB Init Filename.\r
-GDBINIT_FILE = __avr_gdbinit\r
-\r
-# When using avarice settings for the JTAG\r
-JTAG_DEV = /dev/com1\r
-\r
-# Debugging port used to communicate between GDB / avarice / simulavr.\r
-DEBUG_PORT = 4242\r
-\r
-# Debugging host used to communicate between GDB / avarice / simulavr, normally\r
-#     just set to localhost unless doing some sort of crazy debugging when \r
-#     avarice is running on a different computer.\r
-DEBUG_HOST = localhost\r
-\r
-\r
-\r
-#============================================================================\r
-\r
-\r
-# Define programs and commands.\r
-SHELL = sh\r
-CC = avr-gcc\r
-OBJCOPY = avr-objcopy\r
-OBJDUMP = avr-objdump\r
-SIZE = avr-size\r
-AR = avr-ar rcs\r
-NM = avr-nm\r
-AVRDUDE = avrdude\r
-REMOVE = rm -f\r
-REMOVEDIR = rm -rf\r
-COPY = cp\r
-WINSHELL = cmd\r
-\r
-\r
-# Define Messages\r
-# English\r
-MSG_ERRORS_NONE = Errors: none\r
-MSG_BEGIN = -------- begin --------\r
-MSG_END = --------  end  --------\r
-MSG_SIZE_BEFORE = Size before: \r
-MSG_SIZE_AFTER = Size after:\r
-MSG_COFF = Converting to AVR COFF:\r
-MSG_EXTENDED_COFF = Converting to AVR Extended COFF:\r
-MSG_FLASH = Creating load file for Flash:\r
-MSG_EEPROM = Creating load file for EEPROM:\r
-MSG_EXTENDED_LISTING = Creating Extended Listing:\r
-MSG_SYMBOL_TABLE = Creating Symbol Table:\r
-MSG_LINKING = Linking:\r
-MSG_COMPILING = Compiling C:\r
-MSG_COMPILING_CPP = Compiling C++:\r
-MSG_ASSEMBLING = Assembling:\r
-MSG_CLEANING = Cleaning project:\r
-MSG_CREATING_LIBRARY = Creating library:\r
-\r
-\r
-\r
-\r
-# Define all object files.\r
-OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o) \r
-\r
-# Define all listing files.\r
-LST = $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst) \r
-\r
-\r
-# Compiler flags to generate dependency files.\r
-#GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d\r
-\r
-\r
-# Combine all necessary flags and optional flags.\r
-# Add target processor to flags.\r
-ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)\r
-ALL_CPPFLAGS = -mmcu=$(MCU) -I. -x c++ $(CPPFLAGS) $(GENDEPFLAGS)\r
-ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)\r
-\r
-\r
-\r
-\r
-\r
-# Default target.\r
-all: begin gccversion sizebefore build sizeafter end\r
-\r
-# Change the build target to build a HEX file or a library.\r
-build: elf hex eep lss sym\r
-#build: lib\r
-\r
-\r
-elf: $(TARGET).elf\r
-hex: $(TARGET).hex\r
-eep: $(TARGET).eep\r
-lss: $(TARGET).lss\r
-sym: $(TARGET).sym\r
-LIBNAME=lib$(TARGET).a\r
-lib: $(LIBNAME)\r
-\r
-\r
-\r
-# Eye candy.\r
-# AVR Studio 3.x does not check make's exit code but relies on\r
-# the following magic strings to be generated by the compile job.\r
-begin:\r
-       @echo\r
-       @echo $(MSG_BEGIN)\r
-\r
-end:\r
-       @echo $(MSG_END)\r
-       @echo\r
-\r
-\r
-# Display size of file.\r
-HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex\r
-ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf\r
-MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )\r
-FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )\r
-\r
-\r
-sizebefore:\r
-       @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \\r
-       2>/dev/null; echo; fi\r
-\r
-sizeafter:\r
-       @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \\r
-       2>/dev/null; echo; fi\r
-\r
-\r
-\r
-# Display compiler version information.\r
-gccversion : \r
-       @$(CC) --version\r
-\r
-\r
-# Program the device.  \r
-program: $(TARGET).hex $(TARGET).eep\r
-       $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)\r
-\r
-flip: $(TARGET).hex\r
-       batchisp -hardware usb -device $(MCU) -operation erase f\r
-       batchisp -hardware usb -device $(MCU) -operation loadbuffer $(TARGET).hex program\r
-       batchisp -hardware usb -device $(MCU) -operation start reset 0\r
-\r
-dfu: $(TARGET).hex\r
-       dfu-programmer $(MCU) erase\r
-       dfu-programmer $(MCU) flash $(TARGET).hex\r
-       dfu-programmer $(MCU) reset\r
-\r
-flip-ee: $(TARGET).hex $(TARGET).eep\r
-       $(COPY) $(TARGET).eep $(TARGET)eep.hex\r
-       batchisp -hardware usb -device $(MCU) -operation memory EEPROM erase\r
-       batchisp -hardware usb -device $(MCU) -operation memory EEPROM loadbuffer $(TARGET)eep.hex program\r
-       batchisp -hardware usb -device $(MCU) -operation start reset 0\r
-       $(REMOVE) $(TARGET)eep.hex\r
-\r
-dfu-ee: $(TARGET).hex $(TARGET).eep\r
-       dfu-programmer $(MCU) eeprom-flash $(TARGET).eep\r
-       dfu-programmer $(MCU) reset\r
-\r
-\r
-# Generate avr-gdb config/init file which does the following:\r
-#     define the reset signal, load the target file, connect to target, and set \r
-#     a breakpoint at main().\r
-gdb-config: \r
-       @$(REMOVE) $(GDBINIT_FILE)\r
-       @echo define reset >> $(GDBINIT_FILE)\r
-       @echo SIGNAL SIGHUP >> $(GDBINIT_FILE)\r
-       @echo end >> $(GDBINIT_FILE)\r
-       @echo file $(TARGET).elf >> $(GDBINIT_FILE)\r
-       @echo target remote $(DEBUG_HOST):$(DEBUG_PORT)  >> $(GDBINIT_FILE)\r
-ifeq ($(DEBUG_BACKEND),simulavr)\r
-       @echo load  >> $(GDBINIT_FILE)\r
-endif\r
-       @echo break main >> $(GDBINIT_FILE)\r
-\r
-debug: gdb-config $(TARGET).elf\r
-ifeq ($(DEBUG_BACKEND), avarice)\r
-       @echo Starting AVaRICE - Press enter when "waiting to connect" message displays.\r
-       @$(WINSHELL) /c start avarice --jtag $(JTAG_DEV) --erase --program --file \\r
-       $(TARGET).elf $(DEBUG_HOST):$(DEBUG_PORT)\r
-       @$(WINSHELL) /c pause\r
-\r
-else\r
-       @$(WINSHELL) /c start simulavr --gdbserver --device $(MCU) --clock-freq \\r
-       $(DEBUG_MFREQ) --port $(DEBUG_PORT)\r
-endif\r
-       @$(WINSHELL) /c start avr-$(DEBUG_UI) --command=$(GDBINIT_FILE)\r
-\r
-\r
-\r
-\r
-# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.\r
-COFFCONVERT = $(OBJCOPY) --debugging\r
-COFFCONVERT += --change-section-address .data-0x800000\r
-COFFCONVERT += --change-section-address .bss-0x800000\r
-COFFCONVERT += --change-section-address .noinit-0x800000\r
-COFFCONVERT += --change-section-address .eeprom-0x810000\r
-\r
-\r
-\r
-coff: $(TARGET).elf\r
-       @echo\r
-       @echo $(MSG_COFF) $(TARGET).cof\r
-       $(COFFCONVERT) -O coff-avr $< $(TARGET).cof\r
-\r
-\r
-extcoff: $(TARGET).elf\r
-       @echo\r
-       @echo $(MSG_EXTENDED_COFF) $(TARGET).cof\r
-       $(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof\r
-\r
-\r
-\r
-# Create final output files (.hex, .eep) from ELF output file.\r
-%.hex: %.elf\r
-       @echo\r
-       @echo $(MSG_FLASH) $@\r
-       $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock -R .signature $< $@\r
-\r
-%.eep: %.elf\r
-       @echo\r
-       @echo $(MSG_EEPROM) $@\r
-       -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \\r
-       --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) $< $@ || exit 0\r
-\r
-# Create extended listing file from ELF output file.\r
-%.lss: %.elf\r
-       @echo\r
-       @echo $(MSG_EXTENDED_LISTING) $@\r
-       $(OBJDUMP) -h -S -z $< > $@\r
-\r
-# Create a symbol table from ELF output file.\r
-%.sym: %.elf\r
-       @echo\r
-       @echo $(MSG_SYMBOL_TABLE) $@\r
-       $(NM) -n $< > $@\r
-\r
-\r
-\r
-# Create library from object files.\r
-.SECONDARY : $(TARGET).a\r
-.PRECIOUS : $(OBJ)\r
-%.a: $(OBJ)\r
-       @echo\r
-       @echo $(MSG_CREATING_LIBRARY) $@\r
-       $(AR) $@ $(OBJ)\r
-\r
-\r
-# Link: create ELF output file from object files.\r
-.SECONDARY : $(TARGET).elf\r
-.PRECIOUS : $(OBJ)\r
-%.elf: $(OBJ)\r
-       @echo\r
-       @echo $(MSG_LINKING) $@\r
-       $(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS)\r
-\r
-\r
-# Compile: create object files from C source files.\r
-$(OBJDIR)/%.o : %.c\r
-       @echo\r
-       @echo $(MSG_COMPILING) $<\r
-       $(CC) -c $(ALL_CFLAGS) $< -o $@ \r
-\r
-\r
-# Compile: create object files from C++ source files.\r
-$(OBJDIR)/%.o : %.cpp\r
-       @echo\r
-       @echo $(MSG_COMPILING_CPP) $<\r
-       $(CC) -c $(ALL_CPPFLAGS) $< -o $@ \r
-\r
-\r
-# Compile: create assembler files from C source files.\r
-%.s : %.c\r
-       $(CC) -S $(ALL_CFLAGS) $< -o $@\r
-\r
-\r
-# Compile: create assembler files from C++ source files.\r
-%.s : %.cpp\r
-       $(CC) -S $(ALL_CPPFLAGS) $< -o $@\r
-\r
-\r
-# Assemble: create object files from assembler source files.\r
-$(OBJDIR)/%.o : %.S\r
-       @echo\r
-       @echo $(MSG_ASSEMBLING) $<\r
-       $(CC) -c $(ALL_ASFLAGS) $< -o $@\r
-\r
-\r
-# Create preprocessed source for use in sending a bug report.\r
-%.i : %.c\r
-       $(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@ \r
-\r
-\r
-# Target: clean project.\r
-clean: begin clean_list end\r
-\r
-clean_list :\r
-       @echo\r
-       @echo $(MSG_CLEANING)\r
-       $(REMOVE) $(TARGET).hex\r
-       $(REMOVE) $(TARGET).eep\r
-       $(REMOVE) $(TARGET).cof\r
-       $(REMOVE) $(TARGET).elf\r
-       $(REMOVE) $(TARGET).map\r
-       $(REMOVE) $(TARGET).sym\r
-       $(REMOVE) $(TARGET).lss\r
-       $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o)\r
-       $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst)\r
-       $(REMOVE) $(SRC:.c=.s)\r
-       $(REMOVE) $(SRC:.c=.d)\r
-       $(REMOVE) $(SRC:.c=.i)\r
-       $(REMOVEDIR) .dep\r
-\r
-doxygen:\r
-       @echo Generating Project Documentation \($(TARGET)\)...\r
-       @if ( ( cat Doxygen.conf ; echo "HTML_STYLESHEET=$(LUFA_PATH)/LUFA/DoxygenPages/Style/Style.css" ) | doxygen - 2>&1 | grep -v "warning: ignoring unsupported tag" ;); then \\r
-         exit 1; \\r
-       fi;\r
-       @echo Documentation Generation Complete.\r
-\r
-clean_doxygen:\r
-       rm -rf Documentation\r
-\r
-checksource:\r
-       @for f in $(SRC) $(CPPSRC) $(ASRC); do \\r
-               if [ -f $$f ]; then \\r
-                       echo "Found Source File: $$f" ; \\r
-               else \\r
-                       echo "Source File Not Found: $$f" ; \\r
-               fi; done \r
-\r
-\r
-# Create object files directory\r
-$(shell mkdir $(OBJDIR) 2>/dev/null)\r
-\r
-\r
-# Include the dependency files.\r
--include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)\r
-\r
-\r
-# Listing of phony targets.\r
-.PHONY : all begin finish end sizebefore sizeafter gccversion \\r
-build elf hex eep lss sym coff extcoff doxygen clean          \\r
-clean_list clean_doxygen program dfu flip flip-ee dfu-ee      \\r
-debug gdb-config checksource\r
index bc13b31..0a17635 100644 (file)
@@ -1,41 +1,42 @@
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2012.\r
-\r
-  dean [at] fourwalledcubicle [dot] com\r
-           www.lufa-lib.org\r
-*/\r
-\r
-/*\r
-  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, distribute, and sell this\r
-  software and its documentation for any purpose is hereby granted\r
-  without fee, provided that the above copyright notice appear in\r
-  all copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting\r
-  documentation, and that the name of the author not be used in\r
-  advertising or publicity pertaining to distribution of the\r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-.section .text\r
-\r
-\r
-# Mandatory entry point for successful compilation and link\r
-.global main\r
-main:\r
-\r
-       \r
-# Mandatory callback needed for base compile of the USB driver\r
-.global CALLBACK_USB_GetDescriptor\r
-CALLBACK_USB_GetDescriptor:\r
+/*
+             LUFA Library
+     Copyright (C) Dean Camera, 2012.
+
+  dean [at] fourwalledcubicle [dot] com
+           www.lufa-lib.org
+*/
+
+/*
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+  Permission to use, copy, modify, distribute, and sell this
+  software and its documentation for any purpose is hereby granted
+  without fee, provided that the above copyright notice appear in
+  all copies and that both that the copyright notice and this
+  permission notice and warranty disclaimer appear in supporting
+  documentation, and that the name of the author not be used in
+  advertising or publicity pertaining to distribution of the
+  software without specific, written prior permission.
+
+  The author disclaim all warranties with regard to this
+  software, including all implied warranties of merchantability
+  and fitness.  In no event shall the author be liable for any
+  special, indirect or consequential damages or any damages
+  whatsoever resulting from loss of use, data or profits, whether
+  in an action of contract, negligence or other tortious action,
+  arising out of or in connection with the use or performance of
+  this software.
+*/
+
+.section .text
+
+
+# Mandatory entry point for successful compilation and link
+.global main
+main:
+       # Force code generation of the base USB stack
+       call USB_Init
+       
+# Mandatory callback needed for base compile of the USB driver
+.global CALLBACK_USB_GetDescriptor
+CALLBACK_USB_GetDescriptor:
index e361b25..887344b 100644 (file)
@@ -1,32 +1,32 @@
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2012.\r
-\r
-  dean [at] fourwalledcubicle [dot] com\r
-           www.lufa-lib.org\r
-*/\r
-\r
-/*\r
-  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, distribute, and sell this\r
-  software and its documentation for any purpose is hereby granted\r
-  without fee, provided that the above copyright notice appear in\r
-  all copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting\r
-  documentation, and that the name of the author not be used in\r
-  advertising or publicity pertaining to distribution of the\r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-#include <LUFA/Common/Common.h>\r
-#include <LUFA/Drivers/USB/USB.h>\r
+/*
+             LUFA Library
+     Copyright (C) Dean Camera, 2012.
+
+  dean [at] fourwalledcubicle [dot] com
+           www.lufa-lib.org
+*/
+
+/*
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+  Permission to use, copy, modify, distribute, and sell this
+  software and its documentation for any purpose is hereby granted
+  without fee, provided that the above copyright notice appear in
+  all copies and that both that the copyright notice and this
+  permission notice and warranty disclaimer appear in supporting
+  documentation, and that the name of the author not be used in
+  advertising or publicity pertaining to distribution of the
+  software without specific, written prior permission.
+
+  The author disclaim all warranties with regard to this
+  software, including all implied warranties of merchantability
+  and fitness.  In no event shall the author be liable for any
+  special, indirect or consequential damages or any damages
+  whatsoever resulting from loss of use, data or profits, whether
+  in an action of contract, negligence or other tortious action,
+  arising out of or in connection with the use or performance of
+  this software.
+*/
+
+#include <LUFA/Common/Common.h>
+#include <LUFA/Drivers/USB/USB.h>
index 82ed94a..bef8a5c 100644 (file)
@@ -1,45 +1,56 @@
-#\r
-#             LUFA Library\r
-#     Copyright (C) Dean Camera, 2012.\r
-#\r
-#  dean [at] fourwalledcubicle [dot] com\r
-#           www.lufa-lib.org\r
-#\r
-\r
-# Makefile for the module build test. This test\r
-# attempts to build as many modules as possible\r
-# under all supported architectures, and include\r
-# all module headers in a simple C and C++\r
-# application.\r
-\r
-all: begin compile clean end\r
-\r
-begin:\r
-       @echo Executing build test "SingleUSBModeTest".\r
-       @echo\r
-\r
-end:\r
-       @echo Build test "SingleUSBModeTest" complete.\r
-       @echo\r
-\r
-compile:\r
-       $(MAKE) -s -f makefile.avr8 clean\r
-       $(MAKE) -s -f makefile.avr8 LUFA_OPTS='-D USB_DEVICE_ONLY' elf\r
-       $(MAKE) -s -f makefile.avr8 clean\r
-       $(MAKE) -s -f makefile.avr8 LUFA_OPTS='-D USB_HOST_ONLY' elf\r
-\r
-       $(MAKE) -s -f makefile.xmega clean\r
-       $(MAKE) -s -f makefile.xmega LUFA_OPTS='-D USB_DEVICE_ONLY' elf\r
-       \r
-       $(MAKE) -s -f makefile.uc3 clean\r
-       $(MAKE) -s -f makefile.uc3 LUFA_OPTS='-D USB_DEVICE_ONLY' elf\r
-       $(MAKE) -s -f makefile.uc3 clean\r
-       $(MAKE) -s -f makefile.uc3 LUFA_OPTS='-D USB_HOST_ONLY' elf\r
-\r
-clean:\r
-       $(MAKE) -s -f makefile.avr8 clean\r
-       $(MAKE) -s -f makefile.xmega clean\r
-       $(MAKE) -s -f makefile.uc3 clean\r
-\r
-%:\r
-       
\ No newline at end of file
+#
+#             LUFA Library
+#     Copyright (C) Dean Camera, 2012.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#           www.lufa-lib.org
+#
+
+# Makefile for the single USB mode build test.
+# This test attempts to build the USB module
+# under fixed device and fixed host modes under
+# all supported architectures
+
+# Path to the LUFA library core
+LUFA_PATH := ../../LUFA/
+
+# Build test cannot be run with multiple parallel jobs
+.NOTPARALLEL:
+
+all: begin compile clean end
+
+begin:
+       @echo Executing build test "SingleUSBModeTest".
+       @echo
+
+end:
+       @echo Build test "SingleUSBModeTest" complete.
+       @echo
+
+compile:
+       @echo Building SingleUSBModeTest for ARCH=AVR8 in device only mode...
+       $(MAKE) -f makefile.test clean elf ARCH=AVR8 MCU=at90usb1287 CC_FLAGS='-D USB_DEVICE_ONLY'
+
+       @echo Building SingleUSBModeTest for ARCH=AVR8 in host only mode...
+       $(MAKE) -f makefile.test clean elf ARCH=AVR8 MCU=at90usb1287 CC_FLAGS='-D USB_HOST_ONLY'
+
+       @echo Building SingleUSBModeTest for ARCH=XMEGA in device only mode...
+       $(MAKE) -f makefile.test clean elf ARCH=XMEGA MCU=atxmega128a1u CC_FLAGS='-D USB_DEVICE_ONLY'
+       
+       @echo Building SingleUSBModeTest for ARCH=UC3 in device only mode...
+       $(MAKE) -f makefile.test clean elf ARCH=UC3 MCU=uc3a0256 CC_FLAGS='-D USB_DEVICE_ONLY'
+
+       @echo Building SingleUSBModeTest for ARCH=UC3 in host only mode...
+       $(MAKE) -f makefile.test clean elf ARCH=UC3 MCU=uc3a0256 CC_FLAGS='-D USB_HOST_ONLY'
+
+clean:
+       $(MAKE) -f makefile.test clean ARCH=AVR8 MCU=at90usb1287
+       $(MAKE) -f makefile.test clean ARCH=XMEGA MCU=atxmega128a1u
+       $(MAKE) -f makefile.test clean ARCH=UC3 MCU=uc3a0256
+
+%:
+
+.PHONY: begin end compile clean
+
+# Include LUFA build script makefiles
+include $(LUFA_PATH)/Build/lufa_core.mk
diff --git a/BuildTests/SingleUSBModeTest/makefile.avr8 b/BuildTests/SingleUSBModeTest/makefile.avr8
deleted file mode 100644 (file)
index d38b0e1..0000000
+++ /dev/null
@@ -1,724 +0,0 @@
-# Hey Emacs, this is a -*- makefile -*-\r
-#----------------------------------------------------------------------------\r
-# WinAVR Makefile Template written by Eric B. Weddington, Jörg Wunsch, et al.\r
-#  >> Modified for use with the LUFA project. <<\r
-#\r
-# Released to the Public Domain\r
-#\r
-# Additional material for this makefile was written by:\r
-# Peter Fleury\r
-# Tim Henigan\r
-# Colin O'Flynn\r
-# Reiner Patommel\r
-# Markus Pfaff\r
-# Sander Pool\r
-# Frederik Rouleau\r
-# Carlos Lamas\r
-# Dean Camera\r
-# Opendous Inc.\r
-# Denver Gingerich\r
-#\r
-#----------------------------------------------------------------------------\r
-# On command line:\r
-#\r
-# make all = Make software.\r
-#\r
-# make clean = Clean out built project files.\r
-#\r
-# make coff = Convert ELF to AVR COFF.\r
-#\r
-# make extcoff = Convert ELF to AVR Extended COFF.\r
-#\r
-# make program = Download the hex file to the device, using avrdude.\r
-#                Please customize the avrdude settings below first!\r
-#\r
-# make dfu = Download the hex file to the device, using dfu-programmer (must\r
-#            have dfu-programmer installed).\r
-#\r
-# make flip = Download the hex file to the device, using Atmel FLIP (must\r
-#             have Atmel FLIP installed).\r
-#\r
-# make dfu-ee = Download the eeprom file to the device, using dfu-programmer\r
-#               (must have dfu-programmer installed).\r
-#\r
-# make flip-ee = Download the eeprom file to the device, using Atmel FLIP\r
-#                (must have Atmel FLIP installed).\r
-#\r
-# make doxygen = Generate DoxyGen documentation for the project (must have\r
-#                DoxyGen installed)\r
-#\r
-# make debug = Start either simulavr or avarice as specified for debugging,\r
-#              with avr-gdb or avr-insight as the front end for debugging.\r
-#\r
-# make filename.s = Just compile filename.c into the assembler code only.\r
-#\r
-# make filename.i = Create a preprocessed source file for use in submitting\r
-#                   bug reports to the GCC project.\r
-#\r
-# To rebuild project do "make clean" then "make all".\r
-#----------------------------------------------------------------------------\r
-\r
-\r
-# MCU name\r
-MCU = at90usb1287\r
-\r
-\r
-# Target architecture (see library "Board Types" documentation).\r
-ARCH = AVR8\r
-\r
-\r
-# Target board (see library "Board Types" documentation, NONE for projects not requiring\r
-# LUFA board drivers). If USER is selected, put custom board drivers in a directory called\r
-# "Board" inside the application directory.\r
-BOARD = NONE\r
-\r
-\r
-# Processor frequency.\r
-#     This will define a symbol, F_CPU, in all source code files equal to the\r
-#     processor frequency in Hz. You can then use this symbol in your source code to\r
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done\r
-#     automatically to create a 32-bit value in your source code.\r
-#\r
-#     This will be an integer division of F_USB below, as it is sourced by\r
-#     F_USB after it has run through any CPU prescalers. Note that this value\r
-#     does not *change* the processor frequency - it should merely be updated to\r
-#     reflect the processor speed set externally so that the code can use accurate\r
-#     software delays.\r
-F_CPU = 16000000\r
-\r
-\r
-# Input clock frequency.\r
-#     This will define a symbol, F_USB, in all source code files equal to the\r
-#     input clock frequency (before any prescaling is performed) in Hz. This value may\r
-#     differ from F_CPU if prescaling is used on the latter, and is required as the\r
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed\r
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'\r
-#     at the end, this will be done automatically to create a 32-bit value in your\r
-#     source code.\r
-#\r
-#     If no clock division is performed on the input clock inside the AVR (via the\r
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_USB = $(F_CPU)\r
-\r
-\r
-# Output format. (can be srec, ihex, binary)\r
-FORMAT = ihex\r
-\r
-\r
-# Target file name (without extension).\r
-TARGET = Test\r
-\r
-\r
-# Object files directory\r
-#     To put object files in current directory, use a dot (.), do NOT make\r
-#     this an empty or blank macro!\r
-OBJDIR = .\r
-\r
-\r
-# Path to the LUFA library\r
-LUFA_PATH = ../..\r
-\r
-\r
-# LUFA library compile-time options and predefined tokens\r
-LUFA_OPTS  = \r
-\r
-\r
-# Create the LUFA source path variables by including the LUFA root makefile\r
-include $(LUFA_PATH)/LUFA/makefile\r
-\r
-\r
-# List C source files here. (C dependencies are automatically generated.)\r
-SRC = Test.c                   \\r
-      $(LUFA_SRC_USB)\r
-\r
-\r
-\r
-# List C++ source files here. (C dependencies are automatically generated.)\r
-CPPSRC = \r
-\r
-\r
-# List Assembler source files here.\r
-#     Make them always end in a capital .S.  Files ending in a lowercase .s\r
-#     will not be considered source files but generated files (assembler\r
-#     output from the compiler), and will be deleted upon "make clean"!\r
-#     Even though the DOS/Win* filesystem matches both .s and .S the same,\r
-#     it will preserve the spelling of the filenames, and gcc itself does\r
-#     care about how the name is spelled on its command-line.\r
-ASRC = Dummy.S\r
-\r
-\r
-# Optimization level, can be [0, 1, 2, 3, s].\r
-#     0 = turn off optimization. s = optimize for size.\r
-#     (Note: 3 is not always the best optimization level. See avr-libc FAQ.)\r
-OPT = 1\r
-\r
-\r
-# Debugging format.\r
-#     Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs.\r
-#     AVR Studio 4.10 requires dwarf-2.\r
-#     AVR [Extended] COFF format requires stabs, plus an avr-objcopy run.\r
-DEBUG = dwarf-2\r
-\r
-\r
-# List any extra directories to look for include files here.\r
-#     Each directory must be seperated by a space.\r
-#     Use forward slashes for directory separators.\r
-#     For a directory that has spaces, enclose it in quotes.\r
-EXTRAINCDIRS = $(LUFA_PATH)/\r
-\r
-\r
-# Compiler flag to set the C Standard level.\r
-#     c89   = "ANSI" C\r
-#     gnu89 = c89 plus GCC extensions\r
-#     c99   = ISO C99 standard (not yet fully implemented)\r
-#     gnu99 = c99 plus GCC extensions\r
-CSTANDARD = -std=c99\r
-\r
-\r
-# Place -D or -U options here for C sources\r
-CDEFS  = -DF_CPU=$(F_CPU)UL\r
-CDEFS += -DF_USB=$(F_USB)UL\r
-CDEFS += -DBOARD=BOARD_$(BOARD) -DARCH=ARCH_$(ARCH)\r
-CDEFS += $(LUFA_OPTS)\r
-\r
-\r
-# Place -D or -U options here for ASM sources\r
-ADEFS  = -DF_CPU=$(F_CPU)\r
-ADEFS += -DF_USB=$(F_USB)UL\r
-ADEFS += -DBOARD=BOARD_$(BOARD)\r
-ADEFS += $(LUFA_OPTS)\r
-\r
-# Place -D or -U options here for C++ sources\r
-CPPDEFS  = -DF_CPU=$(F_CPU)UL\r
-CPPDEFS += -DF_USB=$(F_USB)UL\r
-CPPDEFS += -DBOARD=BOARD_$(BOARD)\r
-CPPDEFS += $(LUFA_OPTS)\r
-#CPPDEFS += -D__STDC_LIMIT_MACROS\r
-#CPPDEFS += -D__STDC_CONSTANT_MACROS\r
-\r
-\r
-\r
-#---------------- Compiler Options C ----------------\r
-#  -g*:          generate debugging information\r
-#  -O*:          optimization level\r
-#  -f...:        tuning, see GCC manual and avr-libc documentation\r
-#  -Wall...:     warning level\r
-#  -Wa,...:      tell GCC to pass this to the assembler.\r
-#    -adhlns...: create assembler listing\r
-CFLAGS = -g$(DEBUG)\r
-CFLAGS += $(CDEFS)\r
-CFLAGS += -O$(OPT)\r
-CFLAGS += -funsigned-char\r
-CFLAGS += -funsigned-bitfields\r
-CFLAGS += -ffunction-sections\r
-CFLAGS += -fno-inline-small-functions\r
-CFLAGS += -fpack-struct\r
-CFLAGS += -fshort-enums\r
-CFLAGS += -fno-strict-aliasing\r
-CFLAGS += -fno-split-wide-types\r
-CFLAGS += -Wall\r
-CFLAGS += -Wstrict-prototypes\r
-#CFLAGS += -mshort-calls\r
-#CFLAGS += -fno-unit-at-a-time\r
-#CFLAGS += -Wundef\r
-#CFLAGS += -Wunreachable-code\r
-#CFLAGS += -Wsign-compare\r
-#CFLAGS += -Wa,-adhlns=$(<:%.c=$(OBJDIR)/%.lst)\r
-CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
-CFLAGS += $(CSTANDARD)\r
-\r
-\r
-#---------------- Compiler Options C++ ----------------\r
-#  -g*:          generate debugging information\r
-#  -O*:          optimization level\r
-#  -f...:        tuning, see GCC manual and avr-libc documentation\r
-#  -Wall...:     warning level\r
-#  -Wa,...:      tell GCC to pass this to the assembler.\r
-#    -adhlns...: create assembler listing\r
-CPPFLAGS = -g$(DEBUG)\r
-CPPFLAGS += $(CPPDEFS)\r
-CPPFLAGS += -O$(OPT)\r
-CPPFLAGS += -funsigned-char\r
-CPPFLAGS += -funsigned-bitfields\r
-CPPFLAGS += -fpack-struct\r
-CPPFLAGS += -fshort-enums\r
-CPPFLAGS += -fno-exceptions\r
-CPPFLAGS += -Wall\r
-CPPFLAGS += -Wundef\r
-#CPPFLAGS += -mshort-calls\r
-#CPPFLAGS += -fno-unit-at-a-time\r
-#CPPFLAGS += -Wstrict-prototypes\r
-#CPPFLAGS += -Wunreachable-code\r
-#CPPFLAGS += -Wsign-compare\r
-#CPPFLAGS += -Wa,-adhlns=$(<:%.cpp=$(OBJDIR)/%.lst)\r
-CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
-#CPPFLAGS += $(CSTANDARD)\r
-\r
-\r
-#---------------- Assembler Options ----------------\r
-#  -Wa,...:   tell GCC to pass this to the assembler.\r
-#  -adhlns:   create listing\r
-#  -gstabs:   have the assembler create line number information; note that\r
-#             for use in COFF files, additional information about filenames\r
-#             and function names needs to be present in the assembler source\r
-#             files -- see avr-libc docs [FIXME: not yet described there]\r
-#  -listing-cont-lines: Sets the maximum number of continuation lines of hex\r
-#       dump that will be displayed for a given single line of source input.\r
-ASFLAGS = $(ADEFS)\r
-#ASFLAGS += -Wa,-adhlns=$(<:%.S=$(OBJDIR)/%.lst),-gstabs,--listing-cont-lines=100\r
-\r
-\r
-#---------------- Library Options ----------------\r
-# Minimalistic printf version\r
-PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min\r
-\r
-# Floating point printf version (requires MATH_LIB = -lm below)\r
-PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt\r
-\r
-# If this is left blank, then it will use the Standard printf version.\r
-PRINTF_LIB =\r
-#PRINTF_LIB = $(PRINTF_LIB_MIN)\r
-#PRINTF_LIB = $(PRINTF_LIB_FLOAT)\r
-\r
-\r
-# Minimalistic scanf version\r
-SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min\r
-\r
-# Floating point + %[ scanf version (requires MATH_LIB = -lm below)\r
-SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt\r
-\r
-# If this is left blank, then it will use the Standard scanf version.\r
-SCANF_LIB =\r
-#SCANF_LIB = $(SCANF_LIB_MIN)\r
-#SCANF_LIB = $(SCANF_LIB_FLOAT)\r
-\r
-\r
-MATH_LIB = -lm\r
-\r
-\r
-# List any extra directories to look for libraries here.\r
-#     Each directory must be seperated by a space.\r
-#     Use forward slashes for directory separators.\r
-#     For a directory that has spaces, enclose it in quotes.\r
-EXTRALIBDIRS =\r
-\r
-\r
-\r
-#---------------- External Memory Options ----------------\r
-\r
-# 64 KB of external RAM, starting after internal RAM (ATmega128!),\r
-# used for variables (.data/.bss) and heap (malloc()).\r
-#EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff\r
-\r
-# 64 KB of external RAM, starting after internal RAM (ATmega128!),\r
-# only used for heap (malloc()).\r
-#EXTMEMOPTS = -Wl,--section-start,.data=0x801100,--defsym=__heap_end=0x80ffff\r
-\r
-EXTMEMOPTS =\r
-\r
-\r
-\r
-#---------------- Linker Options ----------------\r
-#  -Wl,...:     tell GCC to pass this to linker.\r
-#    -Map:      create map file\r
-#    --cref:    add cross reference to  map file\r
-#LDFLAGS  = -Wl,-Map=$(TARGET).map,--cref\r
-LDFLAGS += -Wl,--relax\r
-LDFLAGS += -Wl,--gc-sections\r
-LDFLAGS += $(EXTMEMOPTS)\r
-LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS))\r
-LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)\r
-#LDFLAGS += -T linker_script.x\r
-\r
-\r
-\r
-#---------------- Programming Options (avrdude) ----------------\r
-\r
-# Programming hardware\r
-# Type: avrdude -c ?\r
-# to get a full listing.\r
-#\r
-AVRDUDE_PROGRAMMER = jtagmkII\r
-\r
-# com1 = serial port. Use lpt1 to connect to parallel port.\r
-AVRDUDE_PORT = usb\r
-\r
-AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex\r
-#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep\r
-\r
-\r
-# Uncomment the following if you want avrdude's erase cycle counter.\r
-# Note that this counter needs to be initialized first using -Yn,\r
-# see avrdude manual.\r
-#AVRDUDE_ERASE_COUNTER = -y\r
-\r
-# Uncomment the following if you do /not/ wish a verification to be\r
-# performed after programming the device.\r
-#AVRDUDE_NO_VERIFY = -V\r
-\r
-# Increase verbosity level.  Please use this when submitting bug\r
-# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>\r
-# to submit bug reports.\r
-#AVRDUDE_VERBOSE = -v -v\r
-\r
-AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)\r
-AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)\r
-AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)\r
-AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)\r
-\r
-\r
-\r
-#---------------- Debugging Options ----------------\r
-\r
-# For simulavr only - target MCU frequency.\r
-DEBUG_MFREQ = $(F_CPU)\r
-\r
-# Set the DEBUG_UI to either gdb or insight.\r
-# DEBUG_UI = gdb\r
-DEBUG_UI = insight\r
-\r
-# Set the debugging back-end to either avarice, simulavr.\r
-DEBUG_BACKEND = avarice\r
-#DEBUG_BACKEND = simulavr\r
-\r
-# GDB Init Filename.\r
-GDBINIT_FILE = __avr_gdbinit\r
-\r
-# When using avarice settings for the JTAG\r
-JTAG_DEV = /dev/com1\r
-\r
-# Debugging port used to communicate between GDB / avarice / simulavr.\r
-DEBUG_PORT = 4242\r
-\r
-# Debugging host used to communicate between GDB / avarice / simulavr, normally\r
-#     just set to localhost unless doing some sort of crazy debugging when\r
-#     avarice is running on a different computer.\r
-DEBUG_HOST = localhost\r
-\r
-\r
-\r
-#============================================================================\r
-\r
-\r
-# Define programs and commands.\r
-SHELL = sh\r
-CC = avr-gcc\r
-OBJCOPY = avr-objcopy\r
-OBJDUMP = avr-objdump\r
-SIZE = avr-size\r
-AR = avr-ar rcs\r
-NM = avr-nm\r
-AVRDUDE = avrdude\r
-REMOVE = rm -f\r
-REMOVEDIR = rm -rf\r
-COPY = cp\r
-WINSHELL = cmd\r
-\r
-\r
-# Define Messages\r
-# English\r
-MSG_ERRORS_NONE = Errors: none\r
-MSG_BEGIN = -------- begin --------\r
-MSG_END = --------  end  --------\r
-MSG_SIZE_BEFORE = Size before:\r
-MSG_SIZE_AFTER = Size after:\r
-MSG_COFF = Converting to AVR COFF:\r
-MSG_EXTENDED_COFF = Converting to AVR Extended COFF:\r
-MSG_FLASH = Creating load file for Flash:\r
-MSG_EEPROM = Creating load file for EEPROM:\r
-MSG_EXTENDED_LISTING = Creating Extended Listing:\r
-MSG_SYMBOL_TABLE = Creating Symbol Table:\r
-MSG_LINKING = Linking:\r
-MSG_COMPILING = Compiling C:\r
-MSG_COMPILING_CPP = Compiling C++:\r
-MSG_ASSEMBLING = Assembling:\r
-MSG_CLEANING = Cleaning project:\r
-MSG_CREATING_LIBRARY = Creating library:\r
-\r
-\r
-\r
-\r
-# Define all object files.\r
-OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o)\r
-\r
-# Define all listing files.\r
-LST = $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst)\r
-\r
-\r
-# Compiler flags to generate dependency files.\r
-#GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d\r
-\r
-\r
-# Combine all necessary flags and optional flags.\r
-# Add target processor to flags.\r
-ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)\r
-ALL_CPPFLAGS = -mmcu=$(MCU) -I. -x c++ $(CPPFLAGS) $(GENDEPFLAGS)\r
-ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)\r
-\r
-\r
-\r
-\r
-\r
-# Default target.\r
-all: begin gccversion sizebefore build sizeafter end\r
-\r
-# Change the build target to build a HEX file or a library.\r
-build: elf hex eep lss sym\r
-#build: lib\r
-\r
-\r
-elf: $(TARGET).elf\r
-hex: $(TARGET).hex\r
-eep: $(TARGET).eep\r
-lss: $(TARGET).lss\r
-sym: $(TARGET).sym\r
-LIBNAME=lib$(TARGET).a\r
-lib: $(LIBNAME)\r
-\r
-\r
-\r
-# Eye candy.\r
-# AVR Studio 3.x does not check make's exit code but relies on\r
-# the following magic strings to be generated by the compile job.\r
-begin:\r
-       @echo\r
-       @echo $(MSG_BEGIN)\r
-\r
-end:\r
-       @echo $(MSG_END)\r
-       @echo\r
-\r
-\r
-# Display size of file.\r
-HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex\r
-ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf\r
-MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )\r
-FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )\r
-\r
-\r
-sizebefore:\r
-       @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \\r
-       2>/dev/null; echo; fi\r
-\r
-sizeafter:\r
-       @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \\r
-       2>/dev/null; echo; fi\r
-\r
-\r
-\r
-# Display compiler version information.\r
-gccversion :\r
-       @$(CC) --version\r
-\r
-\r
-# Program the device.\r
-program: $(TARGET).hex $(TARGET).eep\r
-       $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)\r
-\r
-flip: $(TARGET).hex\r
-       batchisp -hardware usb -device $(MCU) -operation erase f\r
-       batchisp -hardware usb -device $(MCU) -operation loadbuffer $(TARGET).hex program\r
-       batchisp -hardware usb -device $(MCU) -operation start reset 0\r
-\r
-dfu: $(TARGET).hex\r
-       dfu-programmer $(MCU) erase\r
-       dfu-programmer $(MCU) flash $(TARGET).hex\r
-       dfu-programmer $(MCU) reset\r
-\r
-flip-ee: $(TARGET).hex $(TARGET).eep\r
-       $(COPY) $(TARGET).eep $(TARGET)eep.hex\r
-       batchisp -hardware usb -device $(MCU) -operation memory EEPROM erase\r
-       batchisp -hardware usb -device $(MCU) -operation memory EEPROM loadbuffer $(TARGET)eep.hex program\r
-       batchisp -hardware usb -device $(MCU) -operation start reset 0\r
-       $(REMOVE) $(TARGET)eep.hex\r
-\r
-dfu-ee: $(TARGET).hex $(TARGET).eep\r
-       dfu-programmer $(MCU) eeprom-flash $(TARGET).eep\r
-       dfu-programmer $(MCU) reset\r
-\r
-\r
-# Generate avr-gdb config/init file which does the following:\r
-#     define the reset signal, load the target file, connect to target, and set\r
-#     a breakpoint at main().\r
-gdb-config:\r
-       @$(REMOVE) $(GDBINIT_FILE)\r
-       @echo define reset >> $(GDBINIT_FILE)\r
-       @echo SIGNAL SIGHUP >> $(GDBINIT_FILE)\r
-       @echo end >> $(GDBINIT_FILE)\r
-       @echo file $(TARGET).elf >> $(GDBINIT_FILE)\r
-       @echo target remote $(DEBUG_HOST):$(DEBUG_PORT)  >> $(GDBINIT_FILE)\r
-ifeq ($(DEBUG_BACKEND),simulavr)\r
-       @echo load  >> $(GDBINIT_FILE)\r
-endif\r
-       @echo break main >> $(GDBINIT_FILE)\r
-\r
-debug: gdb-config $(TARGET).elf\r
-ifeq ($(DEBUG_BACKEND), avarice)\r
-       @echo Starting AVaRICE - Press enter when "waiting to connect" message displays.\r
-       @$(WINSHELL) /c start avarice --jtag $(JTAG_DEV) --erase --program --file \\r
-       $(TARGET).elf $(DEBUG_HOST):$(DEBUG_PORT)\r
-       @$(WINSHELL) /c pause\r
-\r
-else\r
-       @$(WINSHELL) /c start simulavr --gdbserver --device $(MCU) --clock-freq \\r
-       $(DEBUG_MFREQ) --port $(DEBUG_PORT)\r
-endif\r
-       @$(WINSHELL) /c start avr-$(DEBUG_UI) --command=$(GDBINIT_FILE)\r
-\r
-\r
-\r
-\r
-# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.\r
-COFFCONVERT = $(OBJCOPY) --debugging\r
-COFFCONVERT += --change-section-address .data-0x800000\r
-COFFCONVERT += --change-section-address .bss-0x800000\r
-COFFCONVERT += --change-section-address .noinit-0x800000\r
-COFFCONVERT += --change-section-address .eeprom-0x810000\r
-\r
-\r
-\r
-coff: $(TARGET).elf\r
-       @echo\r
-       @echo $(MSG_COFF) $(TARGET).cof\r
-       $(COFFCONVERT) -O coff-avr $< $(TARGET).cof\r
-\r
-\r
-extcoff: $(TARGET).elf\r
-       @echo\r
-       @echo $(MSG_EXTENDED_COFF) $(TARGET).cof\r
-       $(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof\r
-\r
-\r
-\r
-# Create final output files (.hex, .eep) from ELF output file.\r
-%.hex: %.elf\r
-       @echo\r
-       @echo $(MSG_FLASH) $@\r
-       $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock $< $@\r
-\r
-%.eep: %.elf\r
-       @echo\r
-       @echo $(MSG_EEPROM) $@\r
-       -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \\r
-       --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) $< $@ || exit 0\r
-\r
-# Create extended listing file from ELF output file.\r
-%.lss: %.elf\r
-       @echo\r
-       @echo $(MSG_EXTENDED_LISTING) $@\r
-       $(OBJDUMP) -h -S -z $< > $@\r
-\r
-# Create a symbol table from ELF output file.\r
-%.sym: %.elf\r
-       @echo\r
-       @echo $(MSG_SYMBOL_TABLE) $@\r
-       $(NM) -n $< > $@\r
-\r
-\r
-\r
-# Create library from object files.\r
-.SECONDARY : $(TARGET).a\r
-.PRECIOUS : $(OBJ)\r
-%.a: $(OBJ)\r
-       @echo\r
-       @echo $(MSG_CREATING_LIBRARY) $@\r
-       $(AR) $@ $(OBJ)\r
-\r
-\r
-# Link: create ELF output file from object files.\r
-.SECONDARY : $(TARGET).elf\r
-.PRECIOUS : $(OBJ)\r
-%.elf: $(OBJ)\r
-       @echo\r
-       @echo $(MSG_LINKING) $@\r
-       $(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS)\r
-\r
-\r
-# Compile: create object files from C source files.\r
-$(OBJDIR)/%.o : %.c\r
-       @echo\r
-       @echo $(MSG_COMPILING) $<\r
-       $(CC) -c $(ALL_CFLAGS) $< -o $@\r
-\r
-\r
-# Compile: create object files from C++ source files.\r
-$(OBJDIR)/%.o : %.cpp\r
-       @echo\r
-       @echo $(MSG_COMPILING_CPP) $<\r
-       $(CC) -c $(ALL_CPPFLAGS) $< -o $@\r
-\r
-\r
-# Compile: create assembler files from C source files.\r
-%.s : %.c\r
-       $(CC) -S $(ALL_CFLAGS) $< -o $@\r
-\r
-\r
-# Compile: create assembler files from C++ source files.\r
-%.s : %.cpp\r
-       $(CC) -S $(ALL_CPPFLAGS) $< -o $@\r
-\r
-\r
-# Assemble: create object files from assembler source files.\r
-$(OBJDIR)/%.o : %.S\r
-       @echo\r
-       @echo $(MSG_ASSEMBLING) $<\r
-       $(CC) -c $(ALL_ASFLAGS) $< -o $@\r
-\r
-\r
-# Create preprocessed source for use in sending a bug report.\r
-%.i : %.c\r
-       $(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@\r
-\r
-\r
-# Target: clean project.\r
-clean: begin clean_list end\r
-\r
-clean_list :\r
-       @echo\r
-       @echo $(MSG_CLEANING)\r
-       $(REMOVE) $(TARGET).hex\r
-       $(REMOVE) $(TARGET).eep\r
-       $(REMOVE) $(TARGET).cof\r
-       $(REMOVE) $(TARGET).elf\r
-       $(REMOVE) $(TARGET).map\r
-       $(REMOVE) $(TARGET).sym\r
-       $(REMOVE) $(TARGET).lss\r
-       $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o)\r
-       $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst)\r
-       $(REMOVE) $(SRC:.c=.s)\r
-       $(REMOVE) $(SRC:.c=.d)\r
-       $(REMOVE) $(SRC:.c=.i)\r
-       $(REMOVEDIR) .dep\r
-\r
-doxygen:\r
-       @echo Generating Project Documentation \($(TARGET)\)...\r
-       @if ( ( cat Doxygen.conf ; echo "HTML_STYLESHEET=$(LUFA_PATH)/LUFA/DoxygenPages/Style/Style.css" ) | doxygen - 2>&1 | grep -v "warning: ignoring unsupported tag" ;); then \\r
-         exit 1; \\r
-       fi;\r
-       @echo Documentation Generation Complete.\r
-\r
-clean_doxygen:\r
-       rm -rf Documentation\r
-\r
-checksource:\r
-       @for f in $(SRC) $(CPPSRC) $(ASRC); do \\r
-               if [ -f $$f ]; then \\r
-                       echo "Found Source File: $$f" ; \\r
-               else \\r
-                       echo "Source File Not Found: $$f" ; \\r
-               fi; done \r
-\r
-\r
-# Create object files directory\r
-$(shell mkdir $(OBJDIR) 2>/dev/null)\r
-\r
-\r
-# Include the dependency files.\r
--include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)\r
-\r
-\r
-# Listing of phony targets.\r
-.PHONY : all begin finish end sizebefore sizeafter gccversion \\r
-build elf hex eep lss sym coff extcoff doxygen clean          \\r
-clean_list clean_doxygen program dfu flip flip-ee dfu-ee      \\r
-debug gdb-config checksource\r
diff --git a/BuildTests/SingleUSBModeTest/makefile.test b/BuildTests/SingleUSBModeTest/makefile.test
new file mode 100644 (file)
index 0000000..800e3c3
--- /dev/null
@@ -0,0 +1,67 @@
+#
+#             LUFA Library
+#     Copyright (C) Dean Camera, 2012.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#           www.lufa-lib.org
+#
+# --------------------------------------
+#         LUFA Project Makefile.
+# --------------------------------------
+
+MCU          = 
+ARCH         = 
+BOARD        = NONE
+F_CPU        = $(F_USB)
+DEBUG_LEVEL  = 0
+
+ifeq ($(ARCH), AVR8)
+   F_USB     = 8000000
+else ifeq ($(ARCH), XMEGA)
+   F_USB     = 48000000
+else ifeq ($(ARCH), UC3)
+   F_USB     = 48000000
+endif
+
+OPTIMIZATION = 1
+TARGET       = Test
+SRC          = Test.c Dummy.S $(LUFA_SRC_USB)
+LUFA_PATH    = ../../LUFA
+
+# Generic C/C++ compiler flags
+CC_FLAGS  = -Wextra
+CC_FLAGS += -Werror
+CC_FLAGS += -Wformat=2
+CC_FLAGS += -Winit-self
+CC_FLAGS += -Wswitch-enum
+CC_FLAGS += -Wunused
+CC_FLAGS += -Wundef
+CC_FLAGS += -Wpointer-arith
+CC_FLAGS += -Wcast-align
+CC_FLAGS += -Wwrite-strings
+CC_FLAGS += -Wlogical-op
+CC_FLAGS += -Wmissing-declarations
+CC_FLAGS += -Wmissing-field-initializers
+CC_FLAGS += -Wmissing-format-attribute
+CC_FLAGS += -Woverlength-strings
+
+# Only enable rendundant declaration warnings for AVR8 target (FIXME)
+ifeq ($(ARCH), AVR8)
+CC_FLAGS += -Wredundant-decls
+endif
+
+# C compiler only flags
+C_FLAGS += -Wmissing-parameter-type
+C_FLAGS += -Wnested-externs
+
+# Potential additional warnings to enable in the future (FIXME)
+#CC_FLAGS += -Wswitch-default
+#CC_FLAGS += -Wc++-compat
+#CC_FLAGS += -Wcast-qual
+#CC_FLAGS += -Wconversion
+#CC_FLAGS += -Wjump-misses-init
+#CC_FLAGS += -pedantic
+
+# Include LUFA build script makefiles
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
\ No newline at end of file
diff --git a/BuildTests/SingleUSBModeTest/makefile.uc3 b/BuildTests/SingleUSBModeTest/makefile.uc3
deleted file mode 100644 (file)
index b86bb88..0000000
+++ /dev/null
@@ -1,487 +0,0 @@
-# Hey Emacs, this is a -*- makefile -*-\r
-#----------------------------------------------------------------------------\r
-# WinAVR Makefile Template written by Eric B. Weddington, Jörg Wunsch, et al.\r
-#  >> Modified for use with the LUFA project. <<\r
-#\r
-# Released to the Public Domain\r
-#\r
-# Additional material for this makefile was written by:\r
-# Peter Fleury\r
-# Tim Henigan\r
-# Colin O'Flynn\r
-# Reiner Patommel\r
-# Markus Pfaff\r
-# Sander Pool\r
-# Frederik Rouleau\r
-# Carlos Lamas\r
-# Dean Camera\r
-# Opendous Inc.\r
-# Denver Gingerich\r
-#\r
-#----------------------------------------------------------------------------\r
-# On command line:\r
-#\r
-# make all = Make software.\r
-#\r
-# make clean = Clean out built project files.\r
-#\r
-# make dfu = Download the hex file to the device, using dfu-programmer (must\r
-#            have dfu-programmer installed).\r
-#\r
-# make flip = Download the hex file to the device, using Atmel FLIP (must\r
-#             have Atmel FLIP installed).\r
-#\r
-# make doxygen = Generate DoxyGen documentation for the project (must have\r
-#                DoxyGen installed)\r
-#\r
-# make filename.s = Just compile filename.c into the assembler code only.\r
-#\r
-# make filename.i = Create a preprocessed source file for use in submitting\r
-#                   bug reports to the GCC project.\r
-#\r
-# To rebuild project do "make clean" then "make all".\r
-#----------------------------------------------------------------------------\r
-\r
-\r
-# MCU name\r
-MCU = uc3a3256\r
-\r
-\r
-# Targeted chip architecture (see library "Architectures" documentation)\r
-ARCH = UC3\r
-\r
-\r
-# Target board (see library "Board Types" documentation, NONE for projects not requiring\r
-# LUFA board drivers). If USER is selected, put custom board drivers in a directory called \r
-# "Board" inside the application directory.\r
-BOARD = NONE\r
-\r
-\r
-# Processor frequency.\r
-#     This will define a symbol, F_CPU, in all source code files equal to the\r
-#     processor frequency in Hz. You can then use this symbol in your source code to\r
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done\r
-#     automatically to create a 32-bit value in your source code.\r
-#\r
-#     This should be the frequency the system core runs at, after the system clock\r
-#     has been set up correctly and started.\r
-F_CPU = 12000000\r
-\r
-\r
-# USB controller master clock frequency.\r
-#     This will define a symbol, F_USB, in all source code files equal to the\r
-#     input clock frequency of the USB controller's clock generator in Hz.\r
-#\r
-#     For the UC3 chips, this should be equal to 48MHz or 96MHz.\r
-F_USB = 48000000\r
-\r
-\r
-# Output format. (can be srec, ihex, binary)\r
-FORMAT = ihex\r
-\r
-\r
-# Target file name (without extension).\r
-TARGET = Test\r
-\r
-\r
-# Object files directory\r
-#     To put object files in current directory, use a dot (.), do NOT make\r
-#     this an empty or blank macro!\r
-OBJDIR = .\r
-\r
-\r
-# Path to the LUFA library\r
-LUFA_PATH = ../..\r
-\r
-\r
-# LUFA library compile-time options and predefined tokens (add '-D' before each token)\r
-LUFA_OPTS = \r
-\r
-\r
-# Create the LUFA source path variables by including the LUFA root makefile\r
-include $(LUFA_PATH)/LUFA/makefile\r
-\r
-\r
-# List C source files here. (C dependencies are automatically generated.)\r
-SRC = Test.c                   \\r
-      $(LUFA_SRC_USB)\r
-\r
-\r
-# List C++ source files here. (C dependencies are automatically generated.)\r
-CPPSRC = \r
-\r
-\r
-# List Assembler source files here.\r
-#     Make them always end in a capital .S.  Files ending in a lowercase .s\r
-#     will not be considered source files but generated files (assembler\r
-#     output from the compiler), and will be deleted upon "make clean"!\r
-#     Even though the DOS/Win* filesystem matches both .s and .S the same,\r
-#     it will preserve the spelling of the filenames, and gcc itself does\r
-#     care about how the name is spelled on its command-line.\r
-ASRC = Dummy.S\r
-\r
-\r
-# Optimization level, can be [0, 1, 2, 3, s]. \r
-#     0 = turn off optimization. s = optimize for size.\r
-#     (Note: 3 is not always the best optimization level. See avr-libc FAQ.)\r
-OPT = 1\r
-\r
-\r
-# List any extra directories to look for include files here.\r
-#     Each directory must be seperated by a space.\r
-#     Use forward slashes for directory separators.\r
-#     For a directory that has spaces, enclose it in quotes.\r
-EXTRAINCDIRS = $(LUFA_PATH)/\r
-\r
-\r
-# Compiler flag to set the C Standard level.\r
-#     c89   = "ANSI" C\r
-#     gnu89 = c89 plus GCC extensions\r
-#     c99   = ISO C99 standard (not yet fully implemented)\r
-#     gnu99 = c99 plus GCC extensions\r
-CSTANDARD = -std=gnu99\r
-\r
-\r
-# Place -D or -U options here for C sources\r
-CDEFS  = -DF_CPU=$(F_CPU)UL\r
-CDEFS += -DF_USB=$(F_USB)UL\r
-CDEFS += -DBOARD=BOARD_$(BOARD)\r
-CDEFS += -DARCH=ARCH_$(ARCH)\r
-CDEFS += $(LUFA_OPTS)\r
-\r
-\r
-# Place -D or -U options here for ASM sources\r
-ADEFS  = -DF_CPU=$(F_CPU)\r
-ADEFS += -DF_USB=$(F_USB)UL\r
-ADEFS += -DBOARD=BOARD_$(BOARD)\r
-ADEFS += -DARCH=ARCH_$(ARCH)\r
-ADEFS += $(LUFA_OPTS)\r
-\r
-# Place -D or -U options here for C++ sources\r
-CPPDEFS  = -DF_CPU=$(F_CPU)UL\r
-CPPDEFS += -DF_USB=$(F_USB)UL\r
-CPPDEFS += -DBOARD=BOARD_$(BOARD)\r
-CPPDEFS += -DARCH=ARCH_$(ARCH)\r
-CPPDEFS += $(LUFA_OPTS)\r
-\r
-\r
-# Debugging level.\r
-DEBUG = 3\r
-\r
-\r
-#---------------- Compiler Options C ----------------\r
-#  -g*:          generate debugging information\r
-#  -O*:          optimization level\r
-#  -f...:        tuning, see GCC manual and avr-libc documentation\r
-#  -Wall...:     warning level\r
-#  -Wa,...:      tell GCC to pass this to the assembler.\r
-#    -adhlns...: create assembler listing\r
-CFLAGS = -g$(DEBUG)\r
-CFLAGS += $(CDEFS)\r
-CFLAGS += -O$(OPT)\r
-CFLAGS += -funsigned-char\r
-CFLAGS += -funsigned-bitfields\r
-CFLAGS += -ffunction-sections\r
-CFLAGS += -fno-strict-aliasing\r
-CFLAGS += -Wall\r
-CFLAGS += -Wstrict-prototypes\r
-CFLAGS += -masm-addr-pseudos\r
-#CFLAGS += -Wa,-adhlns=$(<:%.c=$(OBJDIR)/%.lst)\r
-CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
-CFLAGS += $(CSTANDARD)\r
-\r
-\r
-#---------------- Compiler Options C++ ----------------\r
-#  -g*:          generate debugging information\r
-#  -O*:          optimization level\r
-#  -f...:        tuning, see GCC manual and avr-libc documentation\r
-#  -Wall...:     warning level\r
-#  -Wa,...:      tell GCC to pass this to the assembler.\r
-#    -adhlns...: create assembler listing\r
-CPPFLAGS = -g$(DEBUG)\r
-CPPFLAGS += $(CPPDEFS)\r
-CPPFLAGS += -O$(OPT)\r
-CPPFLAGS += -funsigned-char\r
-CPPFLAGS += -funsigned-bitfields\r
-CPPFLAGS += -ffunction-sections\r
-CPPFLAGS += -fno-strict-aliasing\r
-CPPFLAGS += -fno-exceptions\r
-CPPFLAGS += -masm-addr-pseudos\r
-CPPFLAGS += -Wall\r
-CPPFLAGS += -Wundef\r
-#CPPFLAGS += -Wa,-adhlns=$(<:%.cpp=$(OBJDIR)/%.lst)\r
-CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
-#CPPFLAGS += $(CSTANDARD)\r
-\r
-\r
-#---------------- Assembler Options ----------------\r
-#  -Wa,...:   tell GCC to pass this to the assembler.\r
-#  -adhlns:   create listing\r
-#  -gstabs:   have the assembler create line number information; note that\r
-#             for use in COFF files, additional information about filenames\r
-#             and function names needs to be present in the assembler source\r
-#             files -- see avr-libc docs [FIXME: not yet described there]\r
-#  -listing-cont-lines: Sets the maximum number of continuation lines of hex \r
-#       dump that will be displayed for a given single line of source input.\r
-ASFLAGS = $(ADEFS)\r
-#ASFLAGS += -Wa,-adhlns=$(<:%.S=$(OBJDIR)/%.lst),-gstabs,--listing-cont-lines=100\r
-\r
-\r
-#---------------- Linker Options ----------------\r
-#  -Wl,...:     tell GCC to pass this to linker.\r
-#    -Map:      create map file\r
-#    --cref:    add cross reference to  map file\r
-#LDFLAGS  = -Wl,-Map=$(TARGET).map,--cref\r
-LDFLAGS += -Wl,--gc-sections --rodata-writable\r
-LDFLAGS += -Wl,--direct-data\r
-#LDFLAGS += -T linker_script.x\r
-\r
-\r
-#============================================================================\r
-\r
-\r
-# Define programs and commands.\r
-SHELL = sh\r
-CC = avr32-gcc\r
-OBJCOPY = avr32-objcopy\r
-OBJDUMP = avr32-objdump\r
-SIZE = avr32-size\r
-AR = avr32-ar rcs\r
-NM = avr32-nm\r
-REMOVE = rm -f\r
-REMOVEDIR = rm -rf\r
-COPY = cp\r
-WINSHELL = cmd\r
-\r
-\r
-# Define Messages\r
-# English\r
-MSG_ERRORS_NONE = Errors: none\r
-MSG_BEGIN = -------- begin --------\r
-MSG_END = --------  end  --------\r
-MSG_SIZE_BEFORE = Size before: \r
-MSG_SIZE_AFTER = Size after:\r
-MSG_COFF = Converting to AVR COFF:\r
-MSG_FLASH = Creating load file for Flash:\r
-MSG_EEPROM = Creating load file for EEPROM:\r
-MSG_EXTENDED_LISTING = Creating Extended Listing:\r
-MSG_SYMBOL_TABLE = Creating Symbol Table:\r
-MSG_LINKING = Linking:\r
-MSG_COMPILING = Compiling C:\r
-MSG_COMPILING_CPP = Compiling C++:\r
-MSG_ASSEMBLING = Assembling:\r
-MSG_CLEANING = Cleaning project:\r
-MSG_CREATING_LIBRARY = Creating library:\r
-\r
-\r
-\r
-\r
-# Define all object files.\r
-OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o) \r
-\r
-# Define all listing files.\r
-LST = $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst) \r
-\r
-\r
-# Compiler flags to generate dependency files.\r
-#GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d\r
-\r
-\r
-# Combine all necessary flags and optional flags.\r
-# Add target processor to flags.\r
-ALL_CFLAGS = -mpart=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)\r
-ALL_CPPFLAGS = -mpart=$(MCU) -I. -x c++ $(CPPFLAGS) $(GENDEPFLAGS)\r
-ALL_ASFLAGS = -mpart=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)\r
-\r
-\r
-\r
-\r
-\r
-# Default target.\r
-all: begin gccversion sizebefore build sizeafter end\r
-\r
-# Change the build target to build a HEX file or a library.\r
-build: elf hex lss sym\r
-#build: lib\r
-\r
-\r
-elf: $(TARGET).elf\r
-hex: $(TARGET).hex\r
-lss: $(TARGET).lss\r
-sym: $(TARGET).sym\r
-LIBNAME=lib$(TARGET).a\r
-lib: $(LIBNAME)\r
-\r
-\r
-\r
-# Eye candy.\r
-# AVR Studio 3.x does not check make's exit code but relies on\r
-# the following magic strings to be generated by the compile job.\r
-begin:\r
-       @echo\r
-       @echo $(MSG_BEGIN)\r
-\r
-end:\r
-       @echo $(MSG_END)\r
-       @echo\r
-\r
-\r
-# Display size of file.\r
-HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex\r
-ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf\r
-MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )\r
-FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )\r
-\r
-\r
-sizebefore:\r
-       @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \\r
-       2>/dev/null; echo; fi\r
-\r
-sizeafter:\r
-       @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \\r
-       2>/dev/null; echo; fi\r
-\r
-\r
-\r
-# Display compiler version information.\r
-gccversion : \r
-       @$(CC) --version\r
-\r
-\r
-# Program the device.  \r
-flip: $(TARGET).hex\r
-       batchisp -hardware usb -device $(MCU) -operation erase f\r
-       batchisp -hardware usb -device $(MCU) -operation loadbuffer $(TARGET).hex program\r
-       batchisp -hardware usb -device $(MCU) -operation start reset 0\r
-\r
-dfu: $(TARGET).hex\r
-       dfu-programmer $(MCU) erase\r
-       dfu-programmer $(MCU) flash $(TARGET).hex\r
-       dfu-programmer $(MCU) reset\r
-\r
-\r
-# Create final output files (.hex, .eep) from ELF output file.\r
-%.hex: %.elf\r
-       @echo\r
-       @echo $(MSG_FLASH) $@\r
-       $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock -R .signature $< $@\r
-\r
-# Create extended listing file from ELF output file.\r
-%.lss: %.elf\r
-       @echo\r
-       @echo $(MSG_EXTENDED_LISTING) $@\r
-       $(OBJDUMP) -h -S -z $< > $@\r
-\r
-# Create a symbol table from ELF output file.\r
-%.sym: %.elf\r
-       @echo\r
-       @echo $(MSG_SYMBOL_TABLE) $@\r
-       $(NM) -n $< > $@\r
-\r
-\r
-\r
-# Create library from object files.\r
-.SECONDARY : $(TARGET).a\r
-.PRECIOUS : $(OBJ)\r
-%.a: $(OBJ)\r
-       @echo\r
-       @echo $(MSG_CREATING_LIBRARY) $@\r
-       $(AR) $@ $(OBJ)\r
-\r
-\r
-# Link: create ELF output file from object files.\r
-.SECONDARY : $(TARGET).elf\r
-.PRECIOUS : $(OBJ)\r
-%.elf: $(OBJ)\r
-       @echo\r
-       @echo $(MSG_LINKING) $@\r
-       $(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS)\r
-\r
-\r
-# Compile: create object files from C source files.\r
-$(OBJDIR)/%.o : %.c\r
-       @echo\r
-       @echo $(MSG_COMPILING) $<\r
-       $(CC) -c $(ALL_CFLAGS) $< -o $@ \r
-\r
-\r
-# Compile: create object files from C++ source files.\r
-$(OBJDIR)/%.o : %.cpp\r
-       @echo\r
-       @echo $(MSG_COMPILING_CPP) $<\r
-       $(CC) -c $(ALL_CPPFLAGS) $< -o $@ \r
-\r
-\r
-# Compile: create assembler files from C source files.\r
-%.s : %.c\r
-       $(CC) -S $(ALL_CFLAGS) $< -o $@\r
-\r
-\r
-# Compile: create assembler files from C++ source files.\r
-%.s : %.cpp\r
-       $(CC) -S $(ALL_CPPFLAGS) $< -o $@\r
-\r
-\r
-# Assemble: create object files from assembler source files.\r
-$(OBJDIR)/%.o : %.S\r
-       @echo\r
-       @echo $(MSG_ASSEMBLING) $<\r
-       $(CC) -c $(ALL_ASFLAGS) $< -o $@\r
-\r
-\r
-# Create preprocessed source for use in sending a bug report.\r
-%.i : %.c\r
-       $(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@ \r
-\r
-\r
-# Target: clean project.\r
-clean: begin clean_list end\r
-\r
-clean_list :\r
-       @echo\r
-       @echo $(MSG_CLEANING)\r
-       $(REMOVE) $(TARGET).hex\r
-       $(REMOVE) $(TARGET).cof\r
-       $(REMOVE) $(TARGET).elf\r
-       $(REMOVE) $(TARGET).map\r
-       $(REMOVE) $(TARGET).sym\r
-       $(REMOVE) $(TARGET).lss\r
-       $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o)\r
-       $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst)\r
-       $(REMOVE) $(SRC:.c=.s)\r
-       $(REMOVE) $(SRC:.c=.d)\r
-       $(REMOVE) $(SRC:.c=.i)\r
-       $(REMOVEDIR) .dep\r
-\r
-doxygen:\r
-       @echo Generating Project Documentation \($(TARGET)\)...\r
-       @if ( ( cat Doxygen.conf ; echo "HTML_STYLESHEET=$(LUFA_PATH)/LUFA/DoxygenPages/Style/Style.css" ) | doxygen - 2>&1 | grep -v "warning: ignoring unsupported tag" ;); then \\r
-         exit 1; \\r
-       fi;\r
-       @echo Documentation Generation Complete.\r
-\r
-clean_doxygen:\r
-       rm -rf Documentation\r
-\r
-checksource:\r
-       @for f in $(SRC) $(CPPSRC) $(ASRC); do \\r
-               if [ -f $$f ]; then \\r
-                       echo "Found Source File: $$f" ; \\r
-               else \\r
-                       echo "Source File Not Found: $$f" ; \\r
-               fi; done \r
-\r
-\r
-# Create object files directory\r
-$(shell mkdir $(OBJDIR) 2>/dev/null)\r
-\r
-\r
-# Include the dependency files.\r
--include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)\r
-\r
-\r
-# Listing of phony targets.\r
-.PHONY : all begin finish end sizebefore sizeafter gccversion \\r
-build elf hex lss sym doxygen clean clean_list clean_doxygen  \\r
-dfu flip checksource\r
-\r
diff --git a/BuildTests/SingleUSBModeTest/makefile.xmega b/BuildTests/SingleUSBModeTest/makefile.xmega
deleted file mode 100644 (file)
index 868bb50..0000000
+++ /dev/null
@@ -1,706 +0,0 @@
-# Hey Emacs, this is a -*- makefile -*-\r
-#----------------------------------------------------------------------------\r
-# WinAVR Makefile Template written by Eric B. Weddington, Jörg Wunsch, et al.\r
-#  >> Modified for use with the LUFA project. <<\r
-#\r
-# Released to the Public Domain\r
-#\r
-# Additional material for this makefile was written by:\r
-# Peter Fleury\r
-# Tim Henigan\r
-# Colin O'Flynn\r
-# Reiner Patommel\r
-# Markus Pfaff\r
-# Sander Pool\r
-# Frederik Rouleau\r
-# Carlos Lamas\r
-# Dean Camera\r
-# Opendous Inc.\r
-# Denver Gingerich\r
-#\r
-#----------------------------------------------------------------------------\r
-# On command line:\r
-#\r
-# make all = Make software.\r
-#\r
-# make clean = Clean out built project files.\r
-#\r
-# make coff = Convert ELF to AVR COFF.\r
-#\r
-# make extcoff = Convert ELF to AVR Extended COFF.\r
-#\r
-# make program = Download the hex file to the device, using avrdude.\r
-#                Please customize the avrdude settings below first!\r
-#\r
-# make dfu = Download the hex file to the device, using dfu-programmer (must\r
-#            have dfu-programmer installed).\r
-#\r
-# make flip = Download the hex file to the device, using Atmel FLIP (must\r
-#             have Atmel FLIP installed).\r
-#\r
-# make dfu-ee = Download the eeprom file to the device, using dfu-programmer\r
-#               (must have dfu-programmer installed).\r
-#\r
-# make flip-ee = Download the eeprom file to the device, using Atmel FLIP\r
-#                (must have Atmel FLIP installed).\r
-#\r
-# make doxygen = Generate DoxyGen documentation for the project (must have\r
-#                DoxyGen installed)\r
-#\r
-# make debug = Start either simulavr or avarice as specified for debugging, \r
-#              with avr-gdb or avr-insight as the front end for debugging.\r
-#\r
-# make filename.s = Just compile filename.c into the assembler code only.\r
-#\r
-# make filename.i = Create a preprocessed source file for use in submitting\r
-#                   bug reports to the GCC project.\r
-#\r
-# To rebuild project do "make clean" then "make all".\r
-#----------------------------------------------------------------------------\r
-\r
-\r
-# MCU name\r
-MCU = atxmega128a1u\r
-\r
-\r
-# Targeted chip architecture (see library "Architectures" documentation)\r
-ARCH = XMEGA\r
-\r
-\r
-# Target board (see library "Board Types" documentation, NONE for projects not requiring\r
-# LUFA board drivers). If USER is selected, put custom board drivers in a directory called \r
-# "Board" inside the application directory.\r
-BOARD = NONE\r
-\r
-\r
-# Processor frequency.\r
-#     This will define a symbol, F_CPU, in all source code files equal to the\r
-#     processor frequency in Hz. You can then use this symbol in your source code to\r
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done\r
-#     automatically to create a 32-bit value in your source code.\r
-#\r
-#     This should be the frequency the system core runs at, after the system clock\r
-#     has been set up correctly and started.\r
-F_CPU = 24000000\r
-\r
-\r
-# USB controller master clock frequency.\r
-#     This will define a symbol, F_USB, in all source code files equal to the\r
-#     input clock frequency of the USB controller's clock generator in Hz.\r
-#\r
-#     For the XMEGA chips, this should be equal to a multiple of 6MHz for Low\r
-#     Speed USB mode, or a multiple of 48MHz for Full Speed USB mode.\r
-F_USB = 48000000\r
-\r
-\r
-# Output format. (can be srec, ihex, binary)\r
-FORMAT = ihex\r
-\r
-\r
-# Target file name (without extension).\r
-TARGET = Test\r
-\r
-\r
-# Object files directory\r
-#     To put object files in current directory, use a dot (.), do NOT make\r
-#     this an empty or blank macro!\r
-OBJDIR = .\r
-\r
-\r
-# Path to the LUFA library\r
-LUFA_PATH = ../..\r
-\r
-\r
-# LUFA library compile-time options and predefined tokens\r
-LUFA_OPTS  = \r
-\r
-\r
-# Create the LUFA source path variables by including the LUFA root makefile\r
-include $(LUFA_PATH)/LUFA/makefile\r
-\r
-\r
-# List C source files here. (C dependencies are automatically generated.)\r
-SRC = Test.c                   \\r
-      $(LUFA_SRC_USB)\r
-\r
-\r
-# List C++ source files here. (C dependencies are automatically generated.)\r
-CPPSRC = \r
-\r
-\r
-# List Assembler source files here.\r
-#     Make them always end in a capital .S.  Files ending in a lowercase .s\r
-#     will not be considered source files but generated files (assembler\r
-#     output from the compiler), and will be deleted upon "make clean"!\r
-#     Even though the DOS/Win* filesystem matches both .s and .S the same,\r
-#     it will preserve the spelling of the filenames, and gcc itself does\r
-#     care about how the name is spelled on its command-line.\r
-ASRC = Dummy.S\r
-\r
-\r
-# Optimization level, can be [0, 1, 2, 3, s]. \r
-#     0 = turn off optimization. s = optimize for size.\r
-#     (Note: 3 is not always the best optimization level. See avr-libc FAQ.)\r
-OPT = 1\r
-\r
-\r
-# List any extra directories to look for include files here.\r
-#     Each directory must be seperated by a space.\r
-#     Use forward slashes for directory separators.\r
-#     For a directory that has spaces, enclose it in quotes.\r
-EXTRAINCDIRS = $(LUFA_PATH)/\r
-\r
-\r
-# Compiler flag to set the C Standard level.\r
-#     c89   = "ANSI" C\r
-#     gnu89 = c89 plus GCC extensions\r
-#     c99   = ISO C99 standard (not yet fully implemented)\r
-#     gnu99 = c99 plus GCC extensions\r
-CSTANDARD = -std=gnu99\r
-\r
-\r
-# Place -D or -U options here for C sources\r
-CDEFS  = -DF_CPU=$(F_CPU)UL\r
-CDEFS += -DF_USB=$(F_USB)UL\r
-CDEFS += -DBOARD=BOARD_$(BOARD)\r
-CDEFS += -DARCH=ARCH_$(ARCH)\r
-CDEFS += $(LUFA_OPTS)\r
-\r
-\r
-# Place -D or -U options here for ASM sources\r
-ADEFS  = -DF_CPU=$(F_CPU)\r
-ADEFS += -DF_USB=$(F_USB)UL\r
-ADEFS += -DBOARD=BOARD_$(BOARD)\r
-ADEFS += -DARCH=ARCH_$(ARCH)\r
-ADEFS += $(LUFA_OPTS)\r
-\r
-# Place -D or -U options here for C++ sources\r
-CPPDEFS  = -DF_CPU=$(F_CPU)UL\r
-CPPDEFS += -DF_USB=$(F_USB)UL\r
-CPPDEFS += -DBOARD=BOARD_$(BOARD)\r
-CPPDEFS += -DARCH=ARCH_$(ARCH)\r
-CPPDEFS += $(LUFA_OPTS)\r
-\r
-\r
-# Debugging format.\r
-#     Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs.\r
-#     AVR Studio 4.10 requires dwarf-2.\r
-#     AVR [Extended] COFF format requires stabs, plus an avr-objcopy run.\r
-DEBUG = dwarf-2\r
-\r
-\r
-#---------------- Compiler Options C ----------------\r
-#  -g*:          generate debugging information\r
-#  -O*:          optimization level\r
-#  -f...:        tuning, see GCC manual and avr-libc documentation\r
-#  -Wall...:     warning level\r
-#  -Wa,...:      tell GCC to pass this to the assembler.\r
-#    -adhlns...: create assembler listing\r
-CFLAGS = -g$(DEBUG)\r
-CFLAGS += $(CDEFS)\r
-CFLAGS += -O$(OPT)\r
-CFLAGS += -funsigned-char\r
-CFLAGS += -funsigned-bitfields\r
-CFLAGS += -ffunction-sections\r
-CFLAGS += -fno-inline-small-functions\r
-CFLAGS += -fpack-struct\r
-CFLAGS += -fshort-enums\r
-CFLAGS += -fno-strict-aliasing\r
-CFLAGS += -Wall\r
-CFLAGS += -Wstrict-prototypes\r
-#CFLAGS += -Wa,-adhlns=$(<:%.c=$(OBJDIR)/%.lst)\r
-CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
-CFLAGS += $(CSTANDARD)\r
-\r
-\r
-#---------------- Compiler Options C++ ----------------\r
-#  -g*:          generate debugging information\r
-#  -O*:          optimization level\r
-#  -f...:        tuning, see GCC manual and avr-libc documentation\r
-#  -Wall...:     warning level\r
-#  -Wa,...:      tell GCC to pass this to the assembler.\r
-#    -adhlns...: create assembler listing\r
-CPPFLAGS = -g$(DEBUG)\r
-CPPFLAGS += $(CPPDEFS)\r
-CPPFLAGS += -O$(OPT)\r
-CPPFLAGS += -funsigned-char\r
-CPPFLAGS += -funsigned-bitfields\r
-CPPFLAGS += -fpack-struct\r
-CPPFLAGS += -fshort-enums\r
-CPPFLAGS += -ffunction-sections\r
-CPPFLAGS += -fno-strict-aliasing\r
-CPPFLAGS += -fno-exceptions\r
-CPPFLAGS += -Wall\r
-CPPFLAGS += -Wundef\r
-#CPPFLAGS += -Wa,-adhlns=$(<:%.cpp=$(OBJDIR)/%.lst)\r
-CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
-#CPPFLAGS += $(CSTANDARD)\r
-\r
-\r
-#---------------- Assembler Options ----------------\r
-#  -Wa,...:   tell GCC to pass this to the assembler.\r
-#  -adhlns:   create listing\r
-#  -gstabs:   have the assembler create line number information; note that\r
-#             for use in COFF files, additional information about filenames\r
-#             and function names needs to be present in the assembler source\r
-#             files -- see avr-libc docs [FIXME: not yet described there]\r
-#  -listing-cont-lines: Sets the maximum number of continuation lines of hex \r
-#       dump that will be displayed for a given single line of source input.\r
-ASFLAGS = $(ADEFS)\r
-#ASFLAGS += -Wa,-adhlns=$(<:%.S=$(OBJDIR)/%.lst),-gstabs,--listing-cont-lines=100\r
-\r
-\r
-#---------------- Library Options ----------------\r
-# Minimalistic printf version\r
-PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min\r
-\r
-# Floating point printf version (requires MATH_LIB = -lm below)\r
-PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt\r
-\r
-# If this is left blank, then it will use the Standard printf version.\r
-PRINTF_LIB = \r
-#PRINTF_LIB = $(PRINTF_LIB_MIN)\r
-#PRINTF_LIB = $(PRINTF_LIB_FLOAT)\r
-\r
-\r
-# Minimalistic scanf version\r
-SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min\r
-\r
-# Floating point + %[ scanf version (requires MATH_LIB = -lm below)\r
-SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt\r
-\r
-# If this is left blank, then it will use the Standard scanf version.\r
-SCANF_LIB = \r
-#SCANF_LIB = $(SCANF_LIB_MIN)\r
-#SCANF_LIB = $(SCANF_LIB_FLOAT)\r
-\r
-\r
-MATH_LIB = -lm\r
-\r
-\r
-# List any extra directories to look for libraries here.\r
-#     Each directory must be seperated by a space.\r
-#     Use forward slashes for directory separators.\r
-#     For a directory that has spaces, enclose it in quotes.\r
-EXTRALIBDIRS = \r
-\r
-\r
-\r
-#---------------- External Memory Options ----------------\r
-\r
-# 64 KB of external RAM, starting after internal RAM (ATmega128!),\r
-# used for variables (.data/.bss) and heap (malloc()).\r
-#EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff\r
-\r
-# 64 KB of external RAM, starting after internal RAM (ATmega128!),\r
-# only used for heap (malloc()).\r
-#EXTMEMOPTS = -Wl,--section-start,.data=0x801100,--defsym=__heap_end=0x80ffff\r
-\r
-EXTMEMOPTS =\r
-\r
-\r
-\r
-#---------------- Linker Options ----------------\r
-#  -Wl,...:     tell GCC to pass this to linker.\r
-#    -Map:      create map file\r
-#    --cref:    add cross reference to  map file\r
-#LDFLAGS  = -Wl,-Map=$(TARGET).map,--cref\r
-LDFLAGS += -Wl,--relax \r
-LDFLAGS += -Wl,--gc-sections\r
-LDFLAGS += $(EXTMEMOPTS)\r
-LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS))\r
-LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)\r
-#LDFLAGS += -T linker_script.x\r
-\r
-\r
-\r
-#---------------- Programming Options (avrdude) ----------------\r
-\r
-# Programming hardware\r
-# Type: avrdude -c ?\r
-# to get a full listing.\r
-#\r
-AVRDUDE_PROGRAMMER = jtagmkII\r
-\r
-# com1 = serial port. Use lpt1 to connect to parallel port.\r
-AVRDUDE_PORT = usb\r
-\r
-AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex\r
-#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep\r
-\r
-\r
-# Uncomment the following if you want avrdude's erase cycle counter.\r
-# Note that this counter needs to be initialized first using -Yn,\r
-# see avrdude manual.\r
-#AVRDUDE_ERASE_COUNTER = -y\r
-\r
-# Uncomment the following if you do /not/ wish a verification to be\r
-# performed after programming the device.\r
-#AVRDUDE_NO_VERIFY = -V\r
-\r
-# Increase verbosity level.  Please use this when submitting bug\r
-# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude> \r
-# to submit bug reports.\r
-#AVRDUDE_VERBOSE = -v -v\r
-\r
-AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)\r
-AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)\r
-AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)\r
-AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)\r
-\r
-\r
-\r
-#---------------- Debugging Options ----------------\r
-\r
-# For simulavr only - target MCU frequency.\r
-DEBUG_MFREQ = $(F_CPU)\r
-\r
-# Set the DEBUG_UI to either gdb or insight.\r
-# DEBUG_UI = gdb\r
-DEBUG_UI = insight\r
-\r
-# Set the debugging back-end to either avarice, simulavr.\r
-DEBUG_BACKEND = avarice\r
-#DEBUG_BACKEND = simulavr\r
-\r
-# GDB Init Filename.\r
-GDBINIT_FILE = __avr_gdbinit\r
-\r
-# When using avarice settings for the JTAG\r
-JTAG_DEV = /dev/com1\r
-\r
-# Debugging port used to communicate between GDB / avarice / simulavr.\r
-DEBUG_PORT = 4242\r
-\r
-# Debugging host used to communicate between GDB / avarice / simulavr, normally\r
-#     just set to localhost unless doing some sort of crazy debugging when \r
-#     avarice is running on a different computer.\r
-DEBUG_HOST = localhost\r
-\r
-\r
-\r
-#============================================================================\r
-\r
-\r
-# Define programs and commands.\r
-SHELL = sh\r
-CC = avr-gcc\r
-OBJCOPY = avr-objcopy\r
-OBJDUMP = avr-objdump\r
-SIZE = avr-size\r
-AR = avr-ar rcs\r
-NM = avr-nm\r
-AVRDUDE = avrdude\r
-REMOVE = rm -f\r
-REMOVEDIR = rm -rf\r
-COPY = cp\r
-WINSHELL = cmd\r
-\r
-\r
-# Define Messages\r
-# English\r
-MSG_ERRORS_NONE = Errors: none\r
-MSG_BEGIN = -------- begin --------\r
-MSG_END = --------  end  --------\r
-MSG_SIZE_BEFORE = Size before: \r
-MSG_SIZE_AFTER = Size after:\r
-MSG_COFF = Converting to AVR COFF:\r
-MSG_EXTENDED_COFF = Converting to AVR Extended COFF:\r
-MSG_FLASH = Creating load file for Flash:\r
-MSG_EEPROM = Creating load file for EEPROM:\r
-MSG_EXTENDED_LISTING = Creating Extended Listing:\r
-MSG_SYMBOL_TABLE = Creating Symbol Table:\r
-MSG_LINKING = Linking:\r
-MSG_COMPILING = Compiling C:\r
-MSG_COMPILING_CPP = Compiling C++:\r
-MSG_ASSEMBLING = Assembling:\r
-MSG_CLEANING = Cleaning project:\r
-MSG_CREATING_LIBRARY = Creating library:\r
-\r
-\r
-\r
-\r
-# Define all object files.\r
-OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o) \r
-\r
-# Define all listing files.\r
-LST = $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst) \r
-\r
-\r
-# Compiler flags to generate dependency files.\r
-#GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d\r
-\r
-\r
-# Combine all necessary flags and optional flags.\r
-# Add target processor to flags.\r
-ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)\r
-ALL_CPPFLAGS = -mmcu=$(MCU) -I. -x c++ $(CPPFLAGS) $(GENDEPFLAGS)\r
-ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)\r
-\r
-\r
-\r
-\r
-\r
-# Default target.\r
-all: begin gccversion sizebefore build sizeafter end\r
-\r
-# Change the build target to build a HEX file or a library.\r
-build: elf hex eep lss sym\r
-#build: lib\r
-\r
-\r
-elf: $(TARGET).elf\r
-hex: $(TARGET).hex\r
-eep: $(TARGET).eep\r
-lss: $(TARGET).lss\r
-sym: $(TARGET).sym\r
-LIBNAME=lib$(TARGET).a\r
-lib: $(LIBNAME)\r
-\r
-\r
-\r
-# Eye candy.\r
-# AVR Studio 3.x does not check make's exit code but relies on\r
-# the following magic strings to be generated by the compile job.\r
-begin:\r
-       @echo\r
-       @echo $(MSG_BEGIN)\r
-\r
-end:\r
-       @echo $(MSG_END)\r
-       @echo\r
-\r
-\r
-# Display size of file.\r
-HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex\r
-ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf\r
-MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )\r
-FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )\r
-\r
-\r
-sizebefore:\r
-       @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \\r
-       2>/dev/null; echo; fi\r
-\r
-sizeafter:\r
-       @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \\r
-       2>/dev/null; echo; fi\r
-\r
-\r
-\r
-# Display compiler version information.\r
-gccversion : \r
-       @$(CC) --version\r
-\r
-\r
-# Program the device.  \r
-program: $(TARGET).hex $(TARGET).eep\r
-       $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)\r
-\r
-flip: $(TARGET).hex\r
-       batchisp -hardware usb -device $(MCU) -operation erase f\r
-       batchisp -hardware usb -device $(MCU) -operation loadbuffer $(TARGET).hex program\r
-       batchisp -hardware usb -device $(MCU) -operation start reset 0\r
-\r
-dfu: $(TARGET).hex\r
-       dfu-programmer $(MCU) erase\r
-       dfu-programmer $(MCU) flash $(TARGET).hex\r
-       dfu-programmer $(MCU) reset\r
-\r
-flip-ee: $(TARGET).hex $(TARGET).eep\r
-       $(COPY) $(TARGET).eep $(TARGET)eep.hex\r
-       batchisp -hardware usb -device $(MCU) -operation memory EEPROM erase\r
-       batchisp -hardware usb -device $(MCU) -operation memory EEPROM loadbuffer $(TARGET)eep.hex program\r
-       batchisp -hardware usb -device $(MCU) -operation start reset 0\r
-       $(REMOVE) $(TARGET)eep.hex\r
-\r
-dfu-ee: $(TARGET).hex $(TARGET).eep\r
-       dfu-programmer $(MCU) eeprom-flash $(TARGET).eep\r
-       dfu-programmer $(MCU) reset\r
-\r
-\r
-# Generate avr-gdb config/init file which does the following:\r
-#     define the reset signal, load the target file, connect to target, and set \r
-#     a breakpoint at main().\r
-gdb-config: \r
-       @$(REMOVE) $(GDBINIT_FILE)\r
-       @echo define reset >> $(GDBINIT_FILE)\r
-       @echo SIGNAL SIGHUP >> $(GDBINIT_FILE)\r
-       @echo end >> $(GDBINIT_FILE)\r
-       @echo file $(TARGET).elf >> $(GDBINIT_FILE)\r
-       @echo target remote $(DEBUG_HOST):$(DEBUG_PORT)  >> $(GDBINIT_FILE)\r
-ifeq ($(DEBUG_BACKEND),simulavr)\r
-       @echo load  >> $(GDBINIT_FILE)\r
-endif\r
-       @echo break main >> $(GDBINIT_FILE)\r
-\r
-debug: gdb-config $(TARGET).elf\r
-ifeq ($(DEBUG_BACKEND), avarice)\r
-       @echo Starting AVaRICE - Press enter when "waiting to connect" message displays.\r
-       @$(WINSHELL) /c start avarice --jtag $(JTAG_DEV) --erase --program --file \\r
-       $(TARGET).elf $(DEBUG_HOST):$(DEBUG_PORT)\r
-       @$(WINSHELL) /c pause\r
-\r
-else\r
-       @$(WINSHELL) /c start simulavr --gdbserver --device $(MCU) --clock-freq \\r
-       $(DEBUG_MFREQ) --port $(DEBUG_PORT)\r
-endif\r
-       @$(WINSHELL) /c start avr-$(DEBUG_UI) --command=$(GDBINIT_FILE)\r
-\r
-\r
-\r
-\r
-# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.\r
-COFFCONVERT = $(OBJCOPY) --debugging\r
-COFFCONVERT += --change-section-address .data-0x800000\r
-COFFCONVERT += --change-section-address .bss-0x800000\r
-COFFCONVERT += --change-section-address .noinit-0x800000\r
-COFFCONVERT += --change-section-address .eeprom-0x810000\r
-\r
-\r
-\r
-coff: $(TARGET).elf\r
-       @echo\r
-       @echo $(MSG_COFF) $(TARGET).cof\r
-       $(COFFCONVERT) -O coff-avr $< $(TARGET).cof\r
-\r
-\r
-extcoff: $(TARGET).elf\r
-       @echo\r
-       @echo $(MSG_EXTENDED_COFF) $(TARGET).cof\r
-       $(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof\r
-\r
-\r
-\r
-# Create final output files (.hex, .eep) from ELF output file.\r
-%.hex: %.elf\r
-       @echo\r
-       @echo $(MSG_FLASH) $@\r
-       $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock -R .signature $< $@\r
-\r
-%.eep: %.elf\r
-       @echo\r
-       @echo $(MSG_EEPROM) $@\r
-       -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \\r
-       --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) $< $@ || exit 0\r
-\r
-# Create extended listing file from ELF output file.\r
-%.lss: %.elf\r
-       @echo\r
-       @echo $(MSG_EXTENDED_LISTING) $@\r
-       $(OBJDUMP) -h -S -z $< > $@\r
-\r
-# Create a symbol table from ELF output file.\r
-%.sym: %.elf\r
-       @echo\r
-       @echo $(MSG_SYMBOL_TABLE) $@\r
-       $(NM) -n $< > $@\r
-\r
-\r
-\r
-# Create library from object files.\r
-.SECONDARY : $(TARGET).a\r
-.PRECIOUS : $(OBJ)\r
-%.a: $(OBJ)\r
-       @echo\r
-       @echo $(MSG_CREATING_LIBRARY) $@\r
-       $(AR) $@ $(OBJ)\r
-\r
-\r
-# Link: create ELF output file from object files.\r
-.SECONDARY : $(TARGET).elf\r
-.PRECIOUS : $(OBJ)\r
-%.elf: $(OBJ)\r
-       @echo\r
-       @echo $(MSG_LINKING) $@\r
-       $(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS)\r
-\r
-\r
-# Compile: create object files from C source files.\r
-$(OBJDIR)/%.o : %.c\r
-       @echo\r
-       @echo $(MSG_COMPILING) $<\r
-       $(CC) -c $(ALL_CFLAGS) $< -o $@ \r
-\r
-\r
-# Compile: create object files from C++ source files.\r
-$(OBJDIR)/%.o : %.cpp\r
-       @echo\r
-       @echo $(MSG_COMPILING_CPP) $<\r
-       $(CC) -c $(ALL_CPPFLAGS) $< -o $@ \r
-\r
-\r
-# Compile: create assembler files from C source files.\r
-%.s : %.c\r
-       $(CC) -S $(ALL_CFLAGS) $< -o $@\r
-\r
-\r
-# Compile: create assembler files from C++ source files.\r
-%.s : %.cpp\r
-       $(CC) -S $(ALL_CPPFLAGS) $< -o $@\r
-\r
-\r
-# Assemble: create object files from assembler source files.\r
-$(OBJDIR)/%.o : %.S\r
-       @echo\r
-       @echo $(MSG_ASSEMBLING) $<\r
-       $(CC) -c $(ALL_ASFLAGS) $< -o $@\r
-\r
-\r
-# Create preprocessed source for use in sending a bug report.\r
-%.i : %.c\r
-       $(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@ \r
-\r
-\r
-# Target: clean project.\r
-clean: begin clean_list end\r
-\r
-clean_list :\r
-       @echo\r
-       @echo $(MSG_CLEANING)\r
-       $(REMOVE) $(TARGET).hex\r
-       $(REMOVE) $(TARGET).eep\r
-       $(REMOVE) $(TARGET).cof\r
-       $(REMOVE) $(TARGET).elf\r
-       $(REMOVE) $(TARGET).map\r
-       $(REMOVE) $(TARGET).sym\r
-       $(REMOVE) $(TARGET).lss\r
-       $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o)\r
-       $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst)\r
-       $(REMOVE) $(SRC:.c=.s)\r
-       $(REMOVE) $(SRC:.c=.d)\r
-       $(REMOVE) $(SRC:.c=.i)\r
-       $(REMOVEDIR) .dep\r
-\r
-doxygen:\r
-       @echo Generating Project Documentation \($(TARGET)\)...\r
-       @if ( ( cat Doxygen.conf ; echo "HTML_STYLESHEET=$(LUFA_PATH)/LUFA/DoxygenPages/Style/Style.css" ) | doxygen - 2>&1 | grep -v "warning: ignoring unsupported tag" ;); then \\r
-         exit 1; \\r
-       fi;\r
-       @echo Documentation Generation Complete.\r
-\r
-clean_doxygen:\r
-       rm -rf Documentation\r
-\r
-checksource:\r
-       @for f in $(SRC) $(CPPSRC) $(ASRC); do \\r
-               if [ -f $$f ]; then \\r
-                       echo "Found Source File: $$f" ; \\r
-               else \\r
-                       echo "Source File Not Found: $$f" ; \\r
-               fi; done \r
-\r
-\r
-# Create object files directory\r
-$(shell mkdir $(OBJDIR) 2>/dev/null)\r
-\r
-\r
-# Include the dependency files.\r
--include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)\r
-\r
-\r
-# Listing of phony targets.\r
-.PHONY : all begin finish end sizebefore sizeafter gccversion \\r
-build elf hex eep lss sym coff extcoff doxygen clean          \\r
-clean_list clean_doxygen program dfu flip flip-ee dfu-ee      \\r
-debug gdb-config checksource\r
index 1578412..6e6ed3c 100644 (file)
@@ -1,49 +1,39 @@
-#\r
-#             LUFA Library\r
-#     Copyright (C) Dean Camera, 2012.\r
-#\r
-#  dean [at] fourwalledcubicle [dot] com\r
-#           www.lufa-lib.org\r
-#\r
-\r
-# Static anlysis of the entire LUFA source tree, using the free cross-platform "cppcheck" tool.\r
-\r
-# Path to the root of the LUFA tree to scan\r
-LUFA_ROOT_PATH    = ../..\r
-\r
-# Filenames or directories (including fragments) to exclude from the analysis\r
-EXCLUDE_LIST      = FATFs/            \\r
-                    PetiteFATFs/      \\r
-                    uip/\r
-\r
-# Output message template for found warnings and errors\r
-MESSAGE_TEMPLATE  = "{file}:{line}: {severity} ({id}): {message}"\r
-\r
-# Checks to suppress so that generated warnings are discarded\r
-SUPPRESS_WARNINGS = variableScope     \\r
-                    missingInclude\r
-\r
-# Extra paths to search for include files\r
-INCLUDE_PATHS     = $(LUFA_ROOT_PATH)/LUFA/CodeTemplates/      \\r
-                                       $(LUFA_ROOT_PATH)/Projects/AVRISP-MKII/\r
-\r
-# Configuration options to pass to cppcheck\r
-CPPCHECK_OPTIONS  = --template=$(MESSAGE_TEMPLATE) $(INCLUDE_PATHS:%=-I%) $(EXCLUDE_LIST:%=-i%) --inline-suppr --force --error-exitcode=1 --std=c99\r
-\r
-\r
-all: begin staticcheck end\r
-\r
-begin:\r
-       @echo Executing build test "StaticAnalysisTest".\r
-       @echo\r
-\r
-end:\r
-       @echo Build test "StaticAnalysisTest" complete.\r
-       @echo\r
-\r
-staticcheck:\r
-       cppcheck --quiet $(CPPCHECK_OPTIONS) --check-config $(LUFA_ROOT_PATH)\r
-       cppcheck --quiet $(CPPCHECK_OPTIONS) --enable=all $(SUPPRESS_WARNINGS:%=--suppress=%) $(LUFA_ROOT_PATH)\r
-\r
-%:\r
-       
\ No newline at end of file
+#
+#             LUFA Library
+#     Copyright (C) Dean Camera, 2012.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#           www.lufa-lib.org
+#
+
+# Static anlysis of the entire LUFA source tree, using the free cross-platform "cppcheck" tool.
+
+# Path to the LUFA library core
+LUFA_PATH := ../../LUFA/
+
+CPPCHECK_EXCLUDES := FATFs/            \
+                     PetiteFATFs/      \
+                     uip/
+CPPCHECK_INCLUDES := $(patsubst %/,%,$(LUFA_PATH))/CodeTemplates/               \
+                     $(patsubst %/,%,$(LUFA_PATH))/../Projects/AVRISP-MKII/
+
+SRC               := $(patsubst %/,%,$(LUFA_PATH))/..
+
+all: begin cppcheck end
+
+begin:
+       @echo Executing build test "StaticAnalysisTest".
+       @echo
+
+end:
+       @echo Build test "StaticAnalysisTest" complete.
+       @echo
+
+%:
+       
+
+.PHONY: all begin end
+
+# Include LUFA build script makefiles
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
\ No newline at end of file
index 604b2e5..901dbad 100644 (file)
@@ -1,19 +1,24 @@
-#\r
-#             LUFA Library\r
-#     Copyright (C) Dean Camera, 2012.\r
-#\r
-#  dean [at] fourwalledcubicle [dot] com\r
-#           www.lufa-lib.org\r
-#\r
-\r
-# Makefile to build all the LUFA Build Tests. Build Tests are\r
-# used to verify the correctness of the LUFA library, and are\r
-# not intended to be modified or compiled by non-developers.\r
-\r
-all:\r
-%:\r
-       $(MAKE) -C BoardDriverTest $@\r
-       $(MAKE) -C BootloaderTest $@\r
-       $(MAKE) -C ModuleTest $@\r
-       $(MAKE) -C SingleUSBModeTest $@\r
-       $(MAKE) -C StaticAnalysisTest $@\r
+#
+#             LUFA Library
+#     Copyright (C) Dean Camera, 2012.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#           www.lufa-lib.org
+#
+
+# Makefile to build all the LUFA Build Tests. Build Tests are
+# used to verify the correctness of the LUFA library, and are
+# not intended to be modified or compiled by non-developers.
+
+all:
+
+%:
+       @echo Executing \"make $@\" on all LUFA build tests.
+       @echo
+       $(MAKE) -C BoardDriverTest $@
+       $(MAKE) -C BootloaderTest $@
+       $(MAKE) -C ModuleTest $@
+       $(MAKE) -C SingleUSBModeTest $@
+       $(MAKE) -C StaticAnalysisTest $@
+       @echo
+       @echo LUFA build test \"make $@\" operation complete.
\ No newline at end of file
index 953ecf8..66d78b8 100644 (file)
@@ -175,7 +175,7 @@ void EVENT_USB_Device_ControlRequest(void)
  *
  *  When the DataLength parameter is NULL, this callback should only indicate whether the specified operation is valid for
  *  the given endpoint index, and should return as fast as possible. When non-NULL, this value may be altered for GET operations
- *  to indicate the size of the retreived data.
+ *  to indicate the size of the retrieved data.
  *
  *  \note The length of the retrieved data stored into the Data buffer on GET operations should not exceed the initial value
  *        of the \c DataLength parameter.
@@ -243,7 +243,7 @@ bool CALLBACK_Audio_Device_GetSetEndpointProperty(USB_ClassInfo_Audio_Device_t*
  *
  *  When the DataLength parameter is NULL, this callback should only indicate whether the specified operation is valid for
  *  the given entity and should return as fast as possible. When non-NULL, this value may be altered for GET operations
- *  to indicate the size of the retreived data.
+ *  to indicate the size of the retrieved data.
  *
  *  \note The length of the retrieved data stored into the Data buffer on GET operations should not exceed the initial value
  *        of the \c DataLength parameter.
index 33f7f9b..eb8e0ad 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = AudioInput
 SRC          = $(TARGET).c Descriptors.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 82f664a..1869ac9 100644 (file)
@@ -212,7 +212,7 @@ void EVENT_USB_Device_ControlRequest(void)
  *
  *  When the DataLength parameter is NULL, this callback should only indicate whether the specified operation is valid for
  *  the given endpoint index, and should return as fast as possible. When non-NULL, this value may be altered for GET operations
- *  to indicate the size of the retreived data.
+ *  to indicate the size of the retrieved data.
  *
  *  \note The length of the retrieved data stored into the Data buffer on GET operations should not exceed the initial value
  *        of the \c DataLength parameter.
@@ -280,7 +280,7 @@ bool CALLBACK_Audio_Device_GetSetEndpointProperty(USB_ClassInfo_Audio_Device_t*
  *
  *  When the DataLength parameter is NULL, this callback should only indicate whether the specified operation is valid for
  *  the given entity and should return as fast as possible. When non-NULL, this value may be altered for GET operations
- *  to indicate the size of the retreived data.
+ *  to indicate the size of the retrieved data.
  *
  *  \note The length of the retrieved data stored into the Data buffer on GET operations should not exceed the initial value
  *        of the \c DataLength parameter.
index 5cef72c..6fa1eda 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = AudioOutput
 SRC          = $(TARGET).c Descriptors.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index dd721a7..54ef70d 100644 (file)
@@ -1,78 +1,36 @@
 ;************************************************************
 ; Windows USB CDC ACM Setup File
 ; Copyright (c) 2000 Microsoft Corporation
-
+;************************************************************
 
 [Version]
 Signature="$Windows NT$"
 Class=Ports
 ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
 Provider=%MFGNAME%
-LayoutFile=layout.inf
-CatalogFile=%MFGFILENAME%.cat
-DriverVer=11/15/2007,5.1.2600.0
+DriverVer=7/1/2012,10.0.0.0
 
 [Manufacturer]
-%MFGNAME%=DeviceList, NTamd64
-
-[DestinationDirs]
-DefaultDestDir=12
-
-
-;------------------------------------------------------------------------------
-;  Windows 2000/XP/Vista-32bit Sections
-;------------------------------------------------------------------------------
-
-[DriverInstall.nt]
-include=mdmcpq.inf
-CopyFiles=DriverCopyFiles.nt
-AddReg=DriverInstall.nt.AddReg
-
-[DriverCopyFiles.nt]
-usbser.sys,,,0x20
-
-[DriverInstall.nt.AddReg]
-HKR,,DevLoader,,*ntkern
-HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
-HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
+%MFGNAME%=DeviceList, NTx86, NTamd64, NTia64
 
-[DriverInstall.nt.Services]
-AddService=usbser, 0x00000002, DriverService.nt
-
-[DriverService.nt]
-DisplayName=%SERVICE%
-ServiceType=1
-StartType=3
-ErrorControl=1
-ServiceBinary=%12%\%DRIVERFILENAME%.sys
-
-;------------------------------------------------------------------------------
-;  Vista-64bit Sections
-;------------------------------------------------------------------------------
-
-[DriverInstall.NTamd64]
-include=mdmcpq.inf
-CopyFiles=DriverCopyFiles.NTamd64
-AddReg=DriverInstall.NTamd64.AddReg
+[SourceDisksNames]
 
-[DriverCopyFiles.NTamd64]
-%DRIVERFILENAME%.sys,,,0x20
+[SourceDisksFiles]
 
-[DriverInstall.NTamd64.AddReg]
-HKR,,DevLoader,,*ntkern
-HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
-HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
+[DestinationDirs]
+DefaultDestDir=12
 
-[DriverInstall.NTamd64.Services]
-AddService=usbser, 0x00000002, DriverService.NTamd64
+[DriverInstall]
+Include=mdmcpq.inf
+CopyFiles=FakeModemCopyFileSection
+AddReg=DriverInstall.AddReg
 
-[DriverService.NTamd64]
-DisplayName=%SERVICE%
-ServiceType=1
-StartType=3
-ErrorControl=1
-ServiceBinary=%12%\%DRIVERFILENAME%.sys
+[DriverInstall.Services]
+Include=mdmcpq.inf
+AddService=usbser, 0x00000002, LowerFilter_Service_Inst
 
+[DriverInstall.AddReg]
+HKR,,EnumPropPages32,,"msports.dll,SerialPortPropPageProvider"
 
 ;------------------------------------------------------------------------------
 ;  Vendor and Product ID Definitions
@@ -83,14 +41,14 @@ ServiceBinary=%12%\%DRIVERFILENAME%.sys
 ; Note: One INF file can be used for multiple devices with different VID and PIDs.
 ; For each supported device, append ",USB\VID_xxxx&PID_yyyy" to the end of the line.
 ;------------------------------------------------------------------------------
-[SourceDisksFiles]
-[SourceDisksNames]
 [DeviceList]
 %DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_204E&MI_00, USB\VID_03EB&PID_204E&MI_02
 
 [DeviceList.NTamd64]
 %DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_204E&MI_00, USB\VID_03EB&PID_204E&MI_02
 
+[DeviceList.NTia64]
+%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_204E&MI_00, USB\VID_03EB&PID_204E&MI_02
 
 ;------------------------------------------------------------------------------
 ;  String Definitions
@@ -98,9 +56,5 @@ ServiceBinary=%12%\%DRIVERFILENAME%.sys
 ;Modify these strings to customize your device
 ;------------------------------------------------------------------------------
 [Strings]
-MFGFILENAME="CDC_vista"
-DRIVERFILENAME ="usbser"
 MFGNAME="http://www.lufa-lib.org"
-INSTDISK="LUFA Dual CDC Driver Installer"
-DESCRIPTION="Communications Port"
-SERVICE="USB RS-232 Emulation Driver"
\ No newline at end of file
+DESCRIPTION="LUFA CDC-ACM Virtual Serial Port"
\ No newline at end of file
index 8bb500a..8bfe42a 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = DualVirtualSerial
 SRC          = $(TARGET).c Descriptors.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 783d561..b225ef5 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = GenericHID
 SRC          = $(TARGET).c Descriptors.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index fdfac0d..2f13aa9 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = Joystick
 SRC          = $(TARGET).c Descriptors.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index b6378a9..dcdec5b 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = Keyboard
 SRC          = $(TARGET).c Descriptors.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 419d0b6..632be4c 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = KeyboardMouse
 SRC          = $(TARGET).c Descriptors.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 217a109..f752bb5 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = KeyboardMouseMultiReport
 SRC          = $(TARGET).c Descriptors.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 6330047..193881b 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = MIDI
 SRC          = $(TARGET).c Descriptors.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 66d8eb2..6a47431 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = MassStorage
 SRC          = $(TARGET).c Descriptors.c Lib/DataflashManager.c Lib/SCSI.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
\ No newline at end of file
index c6feee3..44e7251 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = MassStorageKeyboard
 SRC          = $(TARGET).c Descriptors.c Lib/DataflashManager.c Lib/SCSI.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 6c6123e..2e40960 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = Mouse
 SRC          = $(TARGET).c Descriptors.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index ca555ca..ad79736 100644 (file)
@@ -112,8 +112,8 @@ void TCP_TCPTask(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo,
 
                        ConnectionStateTable[CSTableEntry].Info.SequenceNumberOut += PacketSize;
 
-                       TCPHeaderOUT->Checksum             = TCP_Checksum16(TCPHeaderOUT, ServerIPAddress,
-                                                                           ConnectionStateTable[CSTableEntry].RemoteAddress,
+                       TCPHeaderOUT->Checksum             = TCP_Checksum16(TCPHeaderOUT, &ServerIPAddress,
+                                                                           &ConnectionStateTable[CSTableEntry].RemoteAddress,
                                                                            (sizeof(TCP_Header_t) + PacketSize));
 
                        PacketSize += sizeof(TCP_Header_t);
@@ -250,7 +250,7 @@ uint8_t TCP_GetPortState(const uint16_t Port)
  *  \return Boolean true if the connection was updated or created, false otherwise (no more space in the connection state table)
  */
 bool TCP_SetConnectionState(const uint16_t Port,
-                            const IP_Address_t RemoteAddress,
+                            const IP_Address_t* RemoteAddress,
                             const uint16_t RemotePort,
                             const uint8_t State)
 {
@@ -260,7 +260,7 @@ bool TCP_SetConnectionState(const uint16_t Port,
        {
                /* Find port entry in the table */
                if ((ConnectionStateTable[CSTableEntry].Port == Port) &&
-                    IP_COMPARE(&ConnectionStateTable[CSTableEntry].RemoteAddress, &RemoteAddress) &&
+                    IP_COMPARE(&ConnectionStateTable[CSTableEntry].RemoteAddress, RemoteAddress) &&
                         ConnectionStateTable[CSTableEntry].RemotePort == RemotePort)
                {
                        ConnectionStateTable[CSTableEntry].State = State;
@@ -274,7 +274,7 @@ bool TCP_SetConnectionState(const uint16_t Port,
                if (ConnectionStateTable[CSTableEntry].State == TCP_Connection_Closed)
                {
                        ConnectionStateTable[CSTableEntry].Port          = Port;
-                       ConnectionStateTable[CSTableEntry].RemoteAddress = RemoteAddress;
+                       ConnectionStateTable[CSTableEntry].RemoteAddress = *RemoteAddress;
                        ConnectionStateTable[CSTableEntry].RemotePort    = RemotePort;
                        ConnectionStateTable[CSTableEntry].State         = State;
                        return true;
@@ -293,7 +293,7 @@ bool TCP_SetConnectionState(const uint16_t Port,
  *  \return A value from the \ref TCP_ConnectionStates_t enum
  */
 uint8_t TCP_GetConnectionState(const uint16_t Port,
-                               const IP_Address_t RemoteAddress,
+                               const IP_Address_t* RemoteAddress,
                                const uint16_t RemotePort)
 {
        /* Note, Port number should be specified in BIG endian to simplify network code */
@@ -302,7 +302,7 @@ uint8_t TCP_GetConnectionState(const uint16_t Port,
        {
                /* Find port entry in the table */
                if ((ConnectionStateTable[CSTableEntry].Port == Port) &&
-                    IP_COMPARE(&ConnectionStateTable[CSTableEntry].RemoteAddress, &RemoteAddress) &&
+                    IP_COMPARE(&ConnectionStateTable[CSTableEntry].RemoteAddress, RemoteAddress) &&
                         ConnectionStateTable[CSTableEntry].RemotePort == RemotePort)
 
                {
@@ -322,7 +322,7 @@ uint8_t TCP_GetConnectionState(const uint16_t Port,
  *  \return ConnectionInfo structure of the connection if found, NULL otherwise
  */
 TCP_ConnectionInfo_t* TCP_GetConnectionInfo(const uint16_t Port,
-                                            const IP_Address_t RemoteAddress,
+                                            const IP_Address_t* RemoteAddress,
                                             const uint16_t RemotePort)
 {
        /* Note, Port number should be specified in BIG endian to simplify network code */
@@ -331,7 +331,7 @@ TCP_ConnectionInfo_t* TCP_GetConnectionInfo(const uint16_t Port,
        {
                /* Find port entry in the table */
                if ((ConnectionStateTable[CSTableEntry].Port == Port) &&
-                    IP_COMPARE(&ConnectionStateTable[CSTableEntry].RemoteAddress, &RemoteAddress) &&
+                    IP_COMPARE(&ConnectionStateTable[CSTableEntry].RemoteAddress, RemoteAddress) &&
                         ConnectionStateTable[CSTableEntry].RemotePort == RemotePort)
                {
                        return &ConnectionStateTable[CSTableEntry].Info;
@@ -371,12 +371,12 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart,
        {
                /* Detect SYN from host to start a connection */
                if (TCPHeaderIN->Flags & TCP_FLAG_SYN)
-                 TCP_SetConnectionState(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress, TCPHeaderIN->SourcePort, TCP_Connection_Listen);
+                 TCP_SetConnectionState(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress, TCPHeaderIN->SourcePort, TCP_Connection_Listen);
 
                /* Detect RST from host to abort existing connection */
                if (TCPHeaderIN->Flags & TCP_FLAG_RST)
                {
-                       if (TCP_SetConnectionState(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress,
+                       if (TCP_SetConnectionState(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress,
                                                   TCPHeaderIN->SourcePort, TCP_Connection_Closed))
                        {
                                TCPHeaderOUT->Flags = (TCP_FLAG_RST | TCP_FLAG_ACK);
@@ -386,18 +386,18 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart,
                else
                {
                        /* Process the incoming TCP packet based on the current connection state for the sender and port */
-                       switch (TCP_GetConnectionState(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress, TCPHeaderIN->SourcePort))
+                       switch (TCP_GetConnectionState(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress, TCPHeaderIN->SourcePort))
                        {
                                case TCP_Connection_Listen:
                                        if (TCPHeaderIN->Flags == TCP_FLAG_SYN)
                                        {
                                                /* SYN connection starts a connection with a peer */
-                                               if (TCP_SetConnectionState(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress,
+                                               if (TCP_SetConnectionState(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress,
                                                                           TCPHeaderIN->SourcePort, TCP_Connection_SYNReceived))
                                                {
                                                        TCPHeaderOUT->Flags = (TCP_FLAG_SYN | TCP_FLAG_ACK);
 
-                                                       ConnectionInfo = TCP_GetConnectionInfo(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress, TCPHeaderIN->SourcePort);
+                                                       ConnectionInfo = TCP_GetConnectionInfo(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress, TCPHeaderIN->SourcePort);
 
                                                        ConnectionInfo->SequenceNumberIn  = (SwapEndian_32(TCPHeaderIN->SequenceNumber) + 1);
                                                        ConnectionInfo->SequenceNumberOut = 0;
@@ -417,10 +417,10 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart,
                                        {
                                                /* ACK during the connection process completes the connection to a peer */
 
-                                               TCP_SetConnectionState(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress,
+                                               TCP_SetConnectionState(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress,
                                                                                           TCPHeaderIN->SourcePort, TCP_Connection_Established);
 
-                                               ConnectionInfo = TCP_GetConnectionInfo(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress,
+                                               ConnectionInfo = TCP_GetConnectionInfo(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress,
                                                                                                                           TCPHeaderIN->SourcePort);
 
                                                ConnectionInfo->SequenceNumberOut++;
@@ -435,10 +435,10 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart,
                                                TCPHeaderOUT->Flags = (TCP_FLAG_FIN | TCP_FLAG_ACK);
                                                PacketResponse      = true;
 
-                                               TCP_SetConnectionState(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress,
+                                               TCP_SetConnectionState(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress,
                                                                                           TCPHeaderIN->SourcePort, TCP_Connection_CloseWait);
 
-                                               ConnectionInfo = TCP_GetConnectionInfo(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress,
+                                               ConnectionInfo = TCP_GetConnectionInfo(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress,
                                                                                                                           TCPHeaderIN->SourcePort);
 
                                                ConnectionInfo->SequenceNumberIn++;
@@ -446,7 +446,7 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart,
                                        }
                                        else if ((TCPHeaderIN->Flags == TCP_FLAG_ACK) || (TCPHeaderIN->Flags == (TCP_FLAG_ACK | TCP_FLAG_PSH)))
                                        {
-                                               ConnectionInfo = TCP_GetConnectionInfo(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress,
+                                               ConnectionInfo = TCP_GetConnectionInfo(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress,
                                                                                                                           TCPHeaderIN->SourcePort);
 
                                                /* Check if the buffer is currently in use either by a buffered data to send, or receive */
@@ -492,7 +492,7 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart,
 
                                        break;
                                case TCP_Connection_Closing:
-                                               ConnectionInfo = TCP_GetConnectionInfo(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress,
+                                               ConnectionInfo = TCP_GetConnectionInfo(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress,
                                                                                                                           TCPHeaderIN->SourcePort);
 
                                                TCPHeaderOUT->Flags = (TCP_FLAG_ACK | TCP_FLAG_FIN);
@@ -500,14 +500,14 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart,
 
                                                ConnectionInfo->Buffer.InUse = false;
 
-                                               TCP_SetConnectionState(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress,
+                                               TCP_SetConnectionState(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress,
                                                                                           TCPHeaderIN->SourcePort, TCP_Connection_FINWait1);
 
                                        break;
                                case TCP_Connection_FINWait1:
                                        if (TCPHeaderIN->Flags == (TCP_FLAG_FIN | TCP_FLAG_ACK))
                                        {
-                                               ConnectionInfo = TCP_GetConnectionInfo(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress,
+                                               ConnectionInfo = TCP_GetConnectionInfo(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress,
                                                                                                                           TCPHeaderIN->SourcePort);
 
                                                TCPHeaderOUT->Flags = TCP_FLAG_ACK;
@@ -516,12 +516,12 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart,
                                                ConnectionInfo->SequenceNumberIn++;
                                                ConnectionInfo->SequenceNumberOut++;
 
-                                               TCP_SetConnectionState(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress,
+                                               TCP_SetConnectionState(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress,
                                                                                           TCPHeaderIN->SourcePort, TCP_Connection_Closed);
                                        }
                                        else if (TCPHeaderIN->Flags == TCP_FLAG_ACK)
                                        {
-                                               TCP_SetConnectionState(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress,
+                                               TCP_SetConnectionState(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress,
                                                                                           TCPHeaderIN->SourcePort, TCP_Connection_FINWait2);
                                        }
 
@@ -529,7 +529,7 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart,
                                case TCP_Connection_FINWait2:
                                        if (TCPHeaderIN->Flags == (TCP_FLAG_FIN | TCP_FLAG_ACK))
                                        {
-                                               ConnectionInfo = TCP_GetConnectionInfo(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress,
+                                               ConnectionInfo = TCP_GetConnectionInfo(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress,
                                                                                                                           TCPHeaderIN->SourcePort);
 
                                                TCPHeaderOUT->Flags = TCP_FLAG_ACK;
@@ -538,7 +538,7 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart,
                                                ConnectionInfo->SequenceNumberIn++;
                                                ConnectionInfo->SequenceNumberOut++;
 
-                                               TCP_SetConnectionState(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress,
+                                               TCP_SetConnectionState(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress,
                                                                                           TCPHeaderIN->SourcePort, TCP_Connection_Closed);
                                        }
 
@@ -546,7 +546,7 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart,
                                case TCP_Connection_CloseWait:
                                        if (TCPHeaderIN->Flags == TCP_FLAG_ACK)
                                        {
-                                               TCP_SetConnectionState(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress,
+                                               TCP_SetConnectionState(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress,
                                                                                           TCPHeaderIN->SourcePort, TCP_Connection_Closed);
                                        }
 
@@ -564,7 +564,7 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart,
        /* Check if we need to respond to the sent packet */
        if (PacketResponse)
        {
-               ConnectionInfo = TCP_GetConnectionInfo(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress,
+               ConnectionInfo = TCP_GetConnectionInfo(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress,
                                                       TCPHeaderIN->SourcePort);
 
                TCPHeaderOUT->SourcePort           = TCPHeaderIN->DestinationPort;
@@ -582,8 +582,8 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart,
                TCPHeaderOUT->Checksum             = 0;
                TCPHeaderOUT->Reserved             = 0;
 
-               TCPHeaderOUT->Checksum             = TCP_Checksum16(TCPHeaderOUT, IPHeaderIN->DestinationAddress,
-                                                                   IPHeaderIN->SourceAddress, sizeof(TCP_Header_t));
+               TCPHeaderOUT->Checksum             = TCP_Checksum16(TCPHeaderOUT, &IPHeaderIN->DestinationAddress,
+                                                                   &IPHeaderIN->SourceAddress, sizeof(TCP_Header_t));
 
                return sizeof(TCP_Header_t);
        }
@@ -602,19 +602,19 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart,
  *  \return A 16-bit TCP checksum value
  */
 static uint16_t TCP_Checksum16(void* TCPHeaderOutStart,
-                               const IP_Address_t SourceAddress,
-                               const IP_Address_t DestinationAddress,
-                               const uint16_t TCPOutSize)
+                               const IP_Address_t* SourceAddress,
+                               const IP_Address_t* DestinationAddress,
+                               uint16_t TCPOutSize)
 {
        uint32_t Checksum = 0;
 
        /* TCP/IP checksums are the addition of the one's compliment of each word including the IP pseudo-header,
           complimented */
 
-       Checksum += ((uint16_t*)&SourceAddress)[0];
-       Checksum += ((uint16_t*)&SourceAddress)[1];
-       Checksum += ((uint16_t*)&DestinationAddress)[0];
-       Checksum += ((uint16_t*)&DestinationAddress)[1];
+       Checksum += ((uint16_t*)SourceAddress)[0];
+       Checksum += ((uint16_t*)SourceAddress)[1];
+       Checksum += ((uint16_t*)DestinationAddress)[0];
+       Checksum += ((uint16_t*)DestinationAddress)[1];
        Checksum += SwapEndian_16(PROTOCOL_TCP);
        Checksum += SwapEndian_16(TCPOutSize);
 
index f27db15..d812270 100644 (file)
                                                       void (*Handler)(TCP_ConnectionState_t*, TCP_ConnectionBuffer_t*));
                uint8_t               TCP_GetPortState(const uint16_t Port);
                bool                  TCP_SetConnectionState(const uint16_t Port,
-                                                            const IP_Address_t RemoteAddress,
+                                                            const IP_Address_t* RemoteAddress,
                                                             const uint16_t RemotePort,
                                                             const uint8_t State);
                uint8_t               TCP_GetConnectionState(const uint16_t Port,
-                                                            const IP_Address_t RemoteAddress,
+                                                            const IP_Address_t* RemoteAddress,
                                                             const uint16_t RemotePort);
                TCP_ConnectionInfo_t* TCP_GetConnectionInfo(const uint16_t Port,
-                                                           const IP_Address_t RemoteAddress,
+                                                           const IP_Address_t* RemoteAddress,
                                                            const uint16_t RemotePort);
                int16_t               TCP_ProcessTCPPacket(void* IPHeaderInStart,
                                                           void* TCPHeaderInStart,
 
                #if defined(INCLUDE_FROM_TCP_C)
                        static uint16_t TCP_Checksum16(void* TCPHeaderOutStart,
-                                                      const IP_Address_t SourceAddress,
-                                                                                  const IP_Address_t DestinationAddress,
+                                                      const IP_Address_t* SourceAddress,
+                                                      const IP_Address_t* DestinationAddress,
                                                       uint16_t TCPOutSize);
                #endif
 
index 5ec3fc2..1ce41fc 100644 (file)
@@ -18,7 +18,7 @@ OPTIMIZATION = s
 TARGET       = RNDISEthernet
 SRC          = $(TARGET).c Descriptors.c Lib/Ethernet.c Lib/ProtocolDecoders.c Lib/ICMP.c Lib/TCP.c Lib/UDP.c Lib/DHCP.c Lib/ARP.c \
                Lib/IP.c Lib/Webserver.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) $(LUFA_SRC_SERIAL)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -26,9 +26,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 3951c22..8890ba1 100644 (file)
@@ -1,78 +1,36 @@
 ;************************************************************
 ; Windows USB CDC ACM Setup File
 ; Copyright (c) 2000 Microsoft Corporation
-
+;************************************************************
 
 [Version]
 Signature="$Windows NT$"
 Class=Ports
 ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
 Provider=%MFGNAME%
-LayoutFile=layout.inf
-CatalogFile=%MFGFILENAME%.cat
-DriverVer=11/15/2007,5.1.2600.0
+DriverVer=7/1/2012,10.0.0.0
 
 [Manufacturer]
-%MFGNAME%=DeviceList, NTamd64
-
-[DestinationDirs]
-DefaultDestDir=12
-
-
-;------------------------------------------------------------------------------
-;  Windows 2000/XP/Vista-32bit Sections
-;------------------------------------------------------------------------------
-
-[DriverInstall.nt]
-include=mdmcpq.inf
-CopyFiles=DriverCopyFiles.nt
-AddReg=DriverInstall.nt.AddReg
-
-[DriverCopyFiles.nt]
-usbser.sys,,,0x20
-
-[DriverInstall.nt.AddReg]
-HKR,,DevLoader,,*ntkern
-HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
-HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
+%MFGNAME%=DeviceList, NTx86, NTamd64, NTia64
 
-[DriverInstall.nt.Services]
-AddService=usbser, 0x00000002, DriverService.nt
-
-[DriverService.nt]
-DisplayName=%SERVICE%
-ServiceType=1
-StartType=3
-ErrorControl=1
-ServiceBinary=%12%\%DRIVERFILENAME%.sys
-
-;------------------------------------------------------------------------------
-;  Vista-64bit Sections
-;------------------------------------------------------------------------------
-
-[DriverInstall.NTamd64]
-include=mdmcpq.inf
-CopyFiles=DriverCopyFiles.NTamd64
-AddReg=DriverInstall.NTamd64.AddReg
+[SourceDisksNames]
 
-[DriverCopyFiles.NTamd64]
-%DRIVERFILENAME%.sys,,,0x20
+[SourceDisksFiles]
 
-[DriverInstall.NTamd64.AddReg]
-HKR,,DevLoader,,*ntkern
-HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
-HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
+[DestinationDirs]
+DefaultDestDir=12
 
-[DriverInstall.NTamd64.Services]
-AddService=usbser, 0x00000002, DriverService.NTamd64
+[DriverInstall]
+Include=mdmcpq.inf
+CopyFiles=FakeModemCopyFileSection
+AddReg=DriverInstall.AddReg
 
-[DriverService.NTamd64]
-DisplayName=%SERVICE%
-ServiceType=1
-StartType=3
-ErrorControl=1
-ServiceBinary=%12%\%DRIVERFILENAME%.sys
+[DriverInstall.Services]
+Include=mdmcpq.inf
+AddService=usbser, 0x00000002, LowerFilter_Service_Inst
 
+[DriverInstall.AddReg]
+HKR,,EnumPropPages32,,"msports.dll,SerialPortPropPageProvider"
 
 ;------------------------------------------------------------------------------
 ;  Vendor and Product ID Definitions
@@ -83,14 +41,14 @@ ServiceBinary=%12%\%DRIVERFILENAME%.sys
 ; Note: One INF file can be used for multiple devices with different VID and PIDs.
 ; For each supported device, append ",USB\VID_xxxx&PID_yyyy" to the end of the line.
 ;------------------------------------------------------------------------------
-[SourceDisksFiles]
-[SourceDisksNames]
 [DeviceList]
 %DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_2044
 
 [DeviceList.NTamd64]
 %DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_2044
 
+[DeviceList.NTia64]
+%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_2044
 
 ;------------------------------------------------------------------------------
 ;  String Definitions
@@ -98,9 +56,5 @@ ServiceBinary=%12%\%DRIVERFILENAME%.sys
 ;Modify these strings to customize your device
 ;------------------------------------------------------------------------------
 [Strings]
-MFGFILENAME="CDC_vista"
-DRIVERFILENAME ="usbser"
 MFGNAME="http://www.lufa-lib.org"
-INSTDISK="LUFA CDC Driver Installer"
-DESCRIPTION="Communications Port"
-SERVICE="USB RS-232 Emulation Driver"
\ No newline at end of file
+DESCRIPTION="LUFA CDC-ACM Virtual Serial Port"
\ No newline at end of file
index 5c1cc1c..60b1918 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = VirtualSerial
 SRC          = $(TARGET).c Descriptors.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index dc90ffa..afe36c6 100644 (file)
@@ -1,78 +1,36 @@
 ;************************************************************
 ; Windows USB CDC ACM Setup File
 ; Copyright (c) 2000 Microsoft Corporation
-
+;************************************************************
 
 [Version]
 Signature="$Windows NT$"
 Class=Ports
 ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
 Provider=%MFGNAME%
-LayoutFile=layout.inf
-CatalogFile=%MFGFILENAME%.cat
-DriverVer=11/15/2007,5.1.2600.0
+DriverVer=7/1/2012,10.0.0.0
 
 [Manufacturer]
-%MFGNAME%=DeviceList, NTamd64
-
-[DestinationDirs]
-DefaultDestDir=12
-
-
-;------------------------------------------------------------------------------
-;  Windows 2000/XP/Vista-32bit Sections
-;------------------------------------------------------------------------------
-
-[DriverInstall.nt]
-include=mdmcpq.inf
-CopyFiles=DriverCopyFiles.nt
-AddReg=DriverInstall.nt.AddReg
-
-[DriverCopyFiles.nt]
-usbser.sys,,,0x20
-
-[DriverInstall.nt.AddReg]
-HKR,,DevLoader,,*ntkern
-HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
-HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
+%MFGNAME%=DeviceList, NTx86, NTamd64, NTia64
 
-[DriverInstall.nt.Services]
-AddService=usbser, 0x00000002, DriverService.nt
-
-[DriverService.nt]
-DisplayName=%SERVICE%
-ServiceType=1
-StartType=3
-ErrorControl=1
-ServiceBinary=%12%\%DRIVERFILENAME%.sys
-
-;------------------------------------------------------------------------------
-;  Vista-64bit Sections
-;------------------------------------------------------------------------------
-
-[DriverInstall.NTamd64]
-include=mdmcpq.inf
-CopyFiles=DriverCopyFiles.NTamd64
-AddReg=DriverInstall.NTamd64.AddReg
+[SourceDisksNames]
 
-[DriverCopyFiles.NTamd64]
-%DRIVERFILENAME%.sys,,,0x20
+[SourceDisksFiles]
 
-[DriverInstall.NTamd64.AddReg]
-HKR,,DevLoader,,*ntkern
-HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
-HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
+[DestinationDirs]
+DefaultDestDir=12
 
-[DriverInstall.NTamd64.Services]
-AddService=usbser, 0x00000002, DriverService.NTamd64
+[DriverInstall]
+Include=mdmcpq.inf
+CopyFiles=FakeModemCopyFileSection
+AddReg=DriverInstall.AddReg
 
-[DriverService.NTamd64]
-DisplayName=%SERVICE%
-ServiceType=1
-StartType=3
-ErrorControl=1
-ServiceBinary=%12%\%DRIVERFILENAME%.sys
+[DriverInstall.Services]
+Include=mdmcpq.inf
+AddService=usbser, 0x00000002, LowerFilter_Service_Inst
 
+[DriverInstall.AddReg]
+HKR,,EnumPropPages32,,"msports.dll,SerialPortPropPageProvider"
 
 ;------------------------------------------------------------------------------
 ;  Vendor and Product ID Definitions
@@ -83,14 +41,14 @@ ServiceBinary=%12%\%DRIVERFILENAME%.sys
 ; Note: One INF file can be used for multiple devices with different VID and PIDs.
 ; For each supported device, append ",USB\VID_xxxx&PID_yyyy" to the end of the line.
 ;------------------------------------------------------------------------------
-[SourceDisksFiles]
-[SourceDisksNames]
 [DeviceList]
 %DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_2068&MI_00
 
 [DeviceList.NTamd64]
 %DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_2068&MI_00
 
+[DeviceList.NTia64]
+%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_2068&MI_00
 
 ;------------------------------------------------------------------------------
 ;  String Definitions
@@ -98,9 +56,5 @@ ServiceBinary=%12%\%DRIVERFILENAME%.sys
 ;Modify these strings to customize your device
 ;------------------------------------------------------------------------------
 [Strings]
-MFGFILENAME="CDC_vista"
-DRIVERFILENAME ="usbser"
 MFGNAME="http://www.lufa-lib.org"
-INSTDISK="LUFA CDC/Mass Storage Driver Installer"
-DESCRIPTION="Communications Port"
-SERVICE="USB RS-232 Emulation Driver"
\ No newline at end of file
+DESCRIPTION="LUFA CDC-ACM Virtual Serial Port"
\ No newline at end of file
index 062846a..16a9580 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = VirtualSerialMassStorage
 SRC          = $(TARGET).c Descriptors.c Lib/DataflashManager.c Lib/SCSI.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index eca012b..f3a4352 100644 (file)
@@ -1,78 +1,36 @@
 ;************************************************************
 ; Windows USB CDC ACM Setup File
 ; Copyright (c) 2000 Microsoft Corporation
-
+;************************************************************
 
 [Version]
 Signature="$Windows NT$"
 Class=Ports
 ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
 Provider=%MFGNAME%
-LayoutFile=layout.inf
-CatalogFile=%MFGFILENAME%.cat
-DriverVer=11/15/2007,5.1.2600.0
+DriverVer=7/1/2012,10.0.0.0
 
 [Manufacturer]
-%MFGNAME%=DeviceList, NTamd64
-
-[DestinationDirs]
-DefaultDestDir=12
-
-
-;------------------------------------------------------------------------------
-;  Windows 2000/XP/Vista-32bit Sections
-;------------------------------------------------------------------------------
-
-[DriverInstall.nt]
-include=mdmcpq.inf
-CopyFiles=DriverCopyFiles.nt
-AddReg=DriverInstall.nt.AddReg
-
-[DriverCopyFiles.nt]
-usbser.sys,,,0x20
-
-[DriverInstall.nt.AddReg]
-HKR,,DevLoader,,*ntkern
-HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
-HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
+%MFGNAME%=DeviceList, NTx86, NTamd64, NTia64
 
-[DriverInstall.nt.Services]
-AddService=usbser, 0x00000002, DriverService.nt
-
-[DriverService.nt]
-DisplayName=%SERVICE%
-ServiceType=1
-StartType=3
-ErrorControl=1
-ServiceBinary=%12%\%DRIVERFILENAME%.sys
-
-;------------------------------------------------------------------------------
-;  Vista-64bit Sections
-;------------------------------------------------------------------------------
-
-[DriverInstall.NTamd64]
-include=mdmcpq.inf
-CopyFiles=DriverCopyFiles.NTamd64
-AddReg=DriverInstall.NTamd64.AddReg
+[SourceDisksNames]
 
-[DriverCopyFiles.NTamd64]
-%DRIVERFILENAME%.sys,,,0x20
+[SourceDisksFiles]
 
-[DriverInstall.NTamd64.AddReg]
-HKR,,DevLoader,,*ntkern
-HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
-HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
+[DestinationDirs]
+DefaultDestDir=12
 
-[DriverInstall.NTamd64.Services]
-AddService=usbser, 0x00000002, DriverService.NTamd64
+[DriverInstall]
+Include=mdmcpq.inf
+CopyFiles=FakeModemCopyFileSection
+AddReg=DriverInstall.AddReg
 
-[DriverService.NTamd64]
-DisplayName=%SERVICE%
-ServiceType=1
-StartType=3
-ErrorControl=1
-ServiceBinary=%12%\%DRIVERFILENAME%.sys
+[DriverInstall.Services]
+Include=mdmcpq.inf
+AddService=usbser, 0x00000002, LowerFilter_Service_Inst
 
+[DriverInstall.AddReg]
+HKR,,EnumPropPages32,,"msports.dll,SerialPortPropPageProvider"
 
 ;------------------------------------------------------------------------------
 ;  Vendor and Product ID Definitions
@@ -83,14 +41,14 @@ ServiceBinary=%12%\%DRIVERFILENAME%.sys
 ; Note: One INF file can be used for multiple devices with different VID and PIDs.
 ; For each supported device, append ",USB\VID_xxxx&PID_yyyy" to the end of the line.
 ;------------------------------------------------------------------------------
-[SourceDisksFiles]
-[SourceDisksNames]
 [DeviceList]
 %DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_2062&MI_00
 
 [DeviceList.NTamd64]
 %DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_2062&MI_00
 
+[DeviceList.NTia64]
+%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_2062&MI_00
 
 ;------------------------------------------------------------------------------
 ;  String Definitions
@@ -98,9 +56,5 @@ ServiceBinary=%12%\%DRIVERFILENAME%.sys
 ;Modify these strings to customize your device
 ;------------------------------------------------------------------------------
 [Strings]
-MFGFILENAME="CDC_vista"
-DRIVERFILENAME ="usbser"
 MFGNAME="http://www.lufa-lib.org"
-INSTDISK="LUFA CDC/Mouse Driver Installer"
-DESCRIPTION="Communications Port"
-SERVICE="USB RS-232 Emulation Driver"
\ No newline at end of file
+DESCRIPTION="LUFA CDC-ACM Virtual Serial Port"
\ No newline at end of file
index fbefe3f..e8cb8de 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = VirtualSerialMouse
 SRC          = $(TARGET).c Descriptors.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 247eb79..776288f 100644 (file)
 # custom LUFA library build options are reflected in the compiled
 # code.
 
-all:
-       $(MAKE) -s -C AudioInput clean all
-       $(MAKE) -s -C AudioOutput clean all
-       $(MAKE) -s -C DualVirtualSerial clean all
-       $(MAKE) -s -C GenericHID clean all
-       $(MAKE) -s -C Joystick clean all
-       $(MAKE) -s -C Keyboard clean all
-       $(MAKE) -s -C KeyboardMouse clean all
-       $(MAKE) -s -C KeyboardMouseMultiReport clean all
-       $(MAKE) -s -C MassStorage clean all
-       $(MAKE) -s -C MassStorageKeyboard clean all
-       $(MAKE) -s -C MIDI clean all
-       $(MAKE) -s -C Mouse clean all
-       $(MAKE) -s -C RNDISEthernet clean all
-       $(MAKE) -s -C VirtualSerial clean all
-       $(MAKE) -s -C VirtualSerialMouse clean all
-       $(MAKE) -s -C VirtualSerialMassStorage clean all
-
-%:
-       $(MAKE) -s -C AudioInput $@
-       $(MAKE) -s -C AudioOutput $@
-       $(MAKE) -s -C DualVirtualSerial $@
-       $(MAKE) -s -C GenericHID $@
-       $(MAKE) -s -C Joystick $@
-       $(MAKE) -s -C Keyboard $@
-       $(MAKE) -s -C KeyboardMouse $@
-       $(MAKE) -s -C KeyboardMouseMultiReport $@
-       $(MAKE) -s -C MassStorage $@
-       $(MAKE) -s -C MassStorageKeyboard $@
-       $(MAKE) -s -C MIDI $@
-       $(MAKE) -s -C Mouse $@
-       $(MAKE) -s -C RNDISEthernet $@
-       $(MAKE) -s -C VirtualSerial $@
-       $(MAKE) -s -C VirtualSerialMouse $@
-       $(MAKE) -s -C VirtualSerialMassStorage $@
+PROJECT_DIRECTORIES := $(shell ls -d */)
 
+# This makefile is potentially infinitely recursive if something really bad
+# happens when determining the set of project directories - hard-abort if
+# more than 10 levels deep to avoid angry emails.
+ifeq ($(MAKELEVEL), 10)
+   $(error EMERGENCY ABORT: INFINITE RECURSION DETECTED)
+endif
+
+# Need to special-case building without a per-project object directory
+ifeq ($(OBJDIR),)
+   # If no target specified, force "clean all" and disallow parallel build   
+   ifeq ($(MAKECMDGOALS),)
+      MAKECMDGOALS := clean all
+      .NOTPARALLEL:
+   endif
+
+   # If one of the targets is to build, force "clean" beforehand and disallow parallel build   
+   ifneq ($(findstring all, $(MAKECMDGOALS)),)
+      MAKECMDGOALS := clean $(MAKECMDGOALS)
+      .NOTPARALLEL:
+   endif
+endif
+
+%: $(PROJECT_DIRECTORIES)
+       @echo . > /dev/null
+
+$(PROJECT_DIRECTORIES):
+       @$(MAKE) -C $@ $(MAKECMDGOALS)
+    
+.PHONY: $(PROJECT_DIRECTORIES)
index 7aa6495..07609c0 100644 (file)
@@ -16,8 +16,9 @@ F_CPU        = 8000000
 F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = SideShow
-SRC          = $(TARGET).c Descriptors.c Lib/SideshowApplications.c Lib/SideshowCommands.c Lib/SideshowCommon.c Lib/SideshowContent.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) $(LUFA_SRC_SERIAL)
-LUFA_PATH    = ../../../../LUFA/
+SRC          = $(TARGET).c Descriptors.c Lib/SideshowApplications.c Lib/SideshowCommands.c \
+               Lib/SideshowCommon.c Lib/SideshowContent.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) $(LUFA_SRC_SERIAL)
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +26,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-#include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index e45654a..17f68f3 100644 (file)
@@ -1,84 +1,84 @@
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2012.\r
-              \r
-  dean [at] fourwalledcubicle [dot] com\r
-           www.lufa-lib.org\r
-*/\r
-\r
-/*\r
-  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-  Copyright 2010  Peter Lawrence (majbthrd [at] gmail [dot] com)\r
-\r
-  Permission to use, copy, modify, distribute, and sell this \r
-  software and its documentation for any purpose is hereby granted\r
-  without fee, provided that the above copyright notice appear in \r
-  all copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting \r
-  documentation, and that the name of the author not be used in \r
-  advertising or publicity pertaining to distribution of the \r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-/** \file\r
- *\r
- *  Header file for Descriptors.c.\r
- */\r
\r
-#ifndef _DESCRIPTORS_H_\r
-#define _DESCRIPTORS_H_\r
-\r
-       /* Includes: */\r
-               #include <avr/pgmspace.h>\r
-\r
-               #include <LUFA/Drivers/USB/USB.h>\r
-\r
-       /* Macros: */\r
-               /** Endpoint address of the TMC notification IN endpoint. */\r
-               #define TMC_NOTIFICATION_EPADDR  (ENDPOINT_DIR_IN  | 2)\r
-\r
-               /** Endpoint address of the TMC device-to-host data IN endpoint. */\r
-               #define TMC_IN_EPADDR            (ENDPOINT_DIR_IN  | 3)\r
-\r
-               /** Endpoint address of the TMC host-to-device data OUT endpoint. */\r
-               #define TMC_OUT_EPADDR           (ENDPOINT_DIR_OUT | 4)\r
-\r
-               /** Size in bytes of the TMC data endpoints. */\r
-               #define TMC_IO_EPSIZE            64\r
-\r
-               /** Size in bytes of the TMC notification endpoint. */\r
-               #define TMC_NOTIFICATION_EPSIZE  8\r
-\r
-       /* Type Defines: */\r
-               /** Type define for the device configuration descriptor structure. This must be defined in the\r
-                *  application code, as the configuration descriptor contains several sub-descriptors which\r
-                *  vary between devices, and which describe the device's usage to the host.\r
-                */\r
-               typedef struct\r
-               {\r
-                       USB_Descriptor_Configuration_Header_t Config;\r
-                       \r
-                       // Test and Measurement Interface\r
-                       USB_Descriptor_Interface_t            TM_Interface;\r
-                       USB_Descriptor_Endpoint_t             TM_DataOutEndpoint;\r
-                       USB_Descriptor_Endpoint_t             TM_DataInEndpoint;\r
-                       USB_Descriptor_Endpoint_t             TM_NotificationEndpoint;\r
-               } USB_Descriptor_Configuration_t;\r
-\r
-       /* Function Prototypes: */\r
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,\r
-                                                   const uint8_t wIndex,\r
-                                                   const void** const DescriptorAddress)\r
-                                                   ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);\r
-\r
-#endif\r
+/*
+             LUFA Library
+     Copyright (C) Dean Camera, 2012.
+              
+  dean [at] fourwalledcubicle [dot] com
+           www.lufa-lib.org
+*/
+
+/*
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+  Copyright 2010  Peter Lawrence (majbthrd [at] gmail [dot] com)
+
+  Permission to use, copy, modify, distribute, and sell this 
+  software and its documentation for any purpose is hereby granted
+  without fee, provided that the above copyright notice appear in 
+  all copies and that both that the copyright notice and this
+  permission notice and warranty disclaimer appear in supporting 
+  documentation, and that the name of the author not be used in 
+  advertising or publicity pertaining to distribution of the 
+  software without specific, written prior permission.
+
+  The author disclaim all warranties with regard to this
+  software, including all implied warranties of merchantability
+  and fitness.  In no event shall the author be liable for any
+  special, indirect or consequential damages or any damages
+  whatsoever resulting from loss of use, data or profits, whether
+  in an action of contract, negligence or other tortious action,
+  arising out of or in connection with the use or performance of
+  this software.
+*/
+
+/** \file
+ *
+ *  Header file for Descriptors.c.
+ */
+#ifndef _DESCRIPTORS_H_
+#define _DESCRIPTORS_H_
+
+       /* Includes: */
+               #include <avr/pgmspace.h>
+
+               #include <LUFA/Drivers/USB/USB.h>
+
+       /* Macros: */
+               /** Endpoint address of the TMC notification IN endpoint. */
+               #define TMC_NOTIFICATION_EPADDR  (ENDPOINT_DIR_IN  | 2)
+
+               /** Endpoint address of the TMC device-to-host data IN endpoint. */
+               #define TMC_IN_EPADDR            (ENDPOINT_DIR_IN  | 3)
+
+               /** Endpoint address of the TMC host-to-device data OUT endpoint. */
+               #define TMC_OUT_EPADDR           (ENDPOINT_DIR_OUT | 4)
+
+               /** Size in bytes of the TMC data endpoints. */
+               #define TMC_IO_EPSIZE            64
+
+               /** Size in bytes of the TMC notification endpoint. */
+               #define TMC_NOTIFICATION_EPSIZE  8
+
+       /* Type Defines: */
+               /** Type define for the device configuration descriptor structure. This must be defined in the
+                *  application code, as the configuration descriptor contains several sub-descriptors which
+                *  vary between devices, and which describe the device's usage to the host.
+                */
+               typedef struct
+               {
+                       USB_Descriptor_Configuration_Header_t Config;
+                       
+                       // Test and Measurement Interface
+                       USB_Descriptor_Interface_t            TM_Interface;
+                       USB_Descriptor_Endpoint_t             TM_DataOutEndpoint;
+                       USB_Descriptor_Endpoint_t             TM_DataInEndpoint;
+                       USB_Descriptor_Endpoint_t             TM_NotificationEndpoint;
+               } USB_Descriptor_Configuration_t;
+
+       /* Function Prototypes: */
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   const void** const DescriptorAddress)
+                                                   ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+
+#endif
 
index 5102f10..027264a 100644 (file)
@@ -71,7 +71,7 @@ static uint16_t LastTransferLength = 0;
 static uint8_t NextResponseBuffer[64];
 
 /** Indicates the length of the next response to send */
-static uint8_t NextReponseLen;
+static uint8_t NextResponseLen;
 
 /** Main program entry point. This routine contains the overall program flow, including initial
  *  setup of all components and the main program loop.
@@ -326,16 +326,16 @@ void ProcessSentMessage(uint8_t* const Data, const uint8_t Length)
        if (strncmp((char*)Data, "*IDN?", 5) == 0)
          strcpy((char*)NextResponseBuffer, "LUFA TMC DEMO");
 
-       NextReponseLen = strlen((char*)NextResponseBuffer);
+       NextResponseLen = strlen((char*)NextResponseBuffer);
 }
 
 uint8_t GetNextMessage(uint8_t* const Data)
 {
          strcpy((char*)NextResponseBuffer, "LUFA TMC DEMO");
 
-       NextReponseLen = strlen((char*)NextResponseBuffer);
+       NextResponseLen = strlen((char*)NextResponseBuffer);
 // ---
-       uint8_t DataLen = MIN(NextReponseLen, 64);
+       uint8_t DataLen = MIN(NextResponseLen, 64);
 
        strlcpy((char*)Data, (char*)NextResponseBuffer, DataLen);
 
index bd93154..9fa9f23 100644 (file)
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2012.\r
-              \r
-  dean [at] fourwalledcubicle [dot] com\r
-           www.lufa-lib.org\r
-*/\r
-\r
-/*\r
-  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, distribute, and sell this \r
-  software and its documentation for any purpose is hereby granted\r
-  without fee, provided that the above copyright notice appear in \r
-  all copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting \r
-  documentation, and that the name of the author not be used in \r
-  advertising or publicity pertaining to distribution of the \r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-#ifndef _TESTANDMEASUREMENT_H_\r
-#define _TESTANDMEASUREMENT_H_\r
-\r
-       /* Includes: */\r
-               #include <avr/io.h>\r
-               #include <avr/wdt.h>\r
-               #include <avr/power.h>\r
-               #include <avr/interrupt.h>\r
-\r
-               #include "Descriptors.h"\r
-\r
-               #include <LUFA/Drivers/USB/USB.h>\r
-               #include <LUFA/Drivers/Board/LEDs.h>\r
-\r
-       /* Macros: */\r
-               /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */\r
-               #define LEDMASK_USB_NOTREADY                  LEDS_LED1\r
-\r
-               /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */\r
-               #define LEDMASK_USB_ENUMERATING              (LEDS_LED2 | LEDS_LED3)\r
-\r
-               /** LED mask for the library LED driver, to indicate that the USB interface is ready. */\r
-               #define LEDMASK_USB_READY                    (LEDS_LED2 | LEDS_LED4)\r
-\r
-               /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */\r
-               #define LEDMASK_USB_ERROR                    (LEDS_LED1 | LEDS_LED3)\r
-               \r
-               /** LED mask for the library LED driver, to indicate that the USB interface is busy. */\r
-               #define LEDMASK_USB_BUSY                      LEDS_LED2\r
-\r
-               #define Req_InitiateAbortBulkOut              0x01\r
-               #define Req_CheckAbortBulkOutStatus           0x02\r
-               #define Req_InitiateAbortBulkIn               0x03\r
-               #define Req_CheckAbortBulkInStatus            0x04\r
-               #define Req_InitiateClear                     0x05\r
-               #define Req_CheckClearStatus                  0x06\r
-               #define Req_GetCapabilities                   0x07\r
-               #define Req_IndicatorPulse                    0x40\r
-               \r
-               #define TMC_STATUS_SUCCESS                    0x01\r
-               #define TMC_STATUS_PENDING                    0x02\r
-               #define TMC_STATUS_FAILED                     0x80\r
-               #define TMC_STATUS_TRANSFER_NOT_IN_PROGRESS   0x81\r
-               #define TMC_STATUS_SPLIT_NOT_IN_PROGRESS      0x82\r
-               #define TMC_STATUS_SPLIT_IN_PROGRESS          0x83\r
-               \r
-               #define TMC_MESSAGEID_DEV_DEP_MSG_OUT         0x01\r
-               #define TMC_MESSAGEID_DEV_DEP_MSG_IN          0x02\r
-               #define TMC_MESSAGEID_DEV_VENDOR_OUT          0x7E\r
-               #define TMC_MESSAGEID_DEV_VENDOR_IN           0x7F\r
-\r
-       /* Type Defines */\r
-               typedef struct\r
-               {\r
-                       uint8_t  Status;\r
-                       uint8_t  Reserved;\r
-\r
-                       uint16_t TMCVersion;\r
-                       \r
-                       struct\r
-                       {\r
-                               unsigned ListenOnly             : 1;\r
-                               unsigned TalkOnly               : 1;\r
-                               unsigned PulseIndicateSupported : 1;\r
-                               unsigned Reserved               : 5;\r
-                       } Interface;\r
-                       \r
-                       struct\r
-                       {\r
-                               unsigned SupportsAbortINOnMatch : 1;\r
-                               unsigned Reserved               : 7;\r
-                       } Device;\r
-                       \r
-                       uint8_t Reserved2[6];\r
-                       uint8_t Reserved3[12];                  \r
-               } TMC_Capabilities_t;\r
-               \r
-               typedef struct\r
-               {\r
-                       uint8_t LastMessageTransaction;\r
-                       uint8_t TermChar;\r
-                       uint8_t Reserved[2];\r
-               } TMC_DevOUTMessageHeader_t;\r
-\r
-               typedef struct\r
-               {\r
-                       uint8_t LastMessageTransaction;\r
-                       uint8_t Reserved[3];\r
-               } TMC_DevINMessageHeader_t;\r
-\r
-               typedef struct\r
-               {\r
-                       uint8_t  MessageID;\r
-                       uint8_t  Tag;\r
-                       uint8_t  InverseTag;\r
-                       uint8_t  Reserved;\r
-                       uint32_t TransferSize;\r
-                       \r
-                       union\r
-                       {\r
-                               TMC_DevOUTMessageHeader_t DeviceOUT;\r
-                               TMC_DevINMessageHeader_t  DeviceIN;\r
-                               uint32_t                  VendorSpecific;\r
-                       } MessageIDSpecific;\r
-               } TMC_MessageHeader_t;\r
-\r
-       /* Function Prototypes: */\r
-               void SetupHardware(void);\r
-               void TMC_Task(void);\r
-               bool ReadTMCHeader(TMC_MessageHeader_t* const MessageHeader);\r
-               bool WriteTMCHeader(TMC_MessageHeader_t* const MessageHeader);\r
-\r
-               void EVENT_USB_Device_Connect(void);\r
-               void EVENT_USB_Device_Disconnect(void);\r
-               void EVENT_USB_Device_ConfigurationChanged(void);\r
-               void EVENT_USB_Device_ControlRequest(void);\r
-\r
-#endif\r
+/*
+             LUFA Library
+     Copyright (C) Dean Camera, 2012.
+              
+  dean [at] fourwalledcubicle [dot] com
+           www.lufa-lib.org
+*/
+
+/*
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+  Permission to use, copy, modify, distribute, and sell this 
+  software and its documentation for any purpose is hereby granted
+  without fee, provided that the above copyright notice appear in 
+  all copies and that both that the copyright notice and this
+  permission notice and warranty disclaimer appear in supporting 
+  documentation, and that the name of the author not be used in 
+  advertising or publicity pertaining to distribution of the 
+  software without specific, written prior permission.
+
+  The author disclaim all warranties with regard to this
+  software, including all implied warranties of merchantability
+  and fitness.  In no event shall the author be liable for any
+  special, indirect or consequential damages or any damages
+  whatsoever resulting from loss of use, data or profits, whether
+  in an action of contract, negligence or other tortious action,
+  arising out of or in connection with the use or performance of
+  this software.
+*/
+
+#ifndef _TESTANDMEASUREMENT_H_
+#define _TESTANDMEASUREMENT_H_
+
+       /* Includes: */
+               #include <avr/io.h>
+               #include <avr/wdt.h>
+               #include <avr/power.h>
+               #include <avr/interrupt.h>
+
+               #include "Descriptors.h"
+
+               #include <LUFA/Drivers/USB/USB.h>
+               #include <LUFA/Drivers/Board/LEDs.h>
+
+       /* Macros: */
+               /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
+               #define LEDMASK_USB_NOTREADY                  LEDS_LED1
+
+               /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */
+               #define LEDMASK_USB_ENUMERATING              (LEDS_LED2 | LEDS_LED3)
+
+               /** LED mask for the library LED driver, to indicate that the USB interface is ready. */
+               #define LEDMASK_USB_READY                    (LEDS_LED2 | LEDS_LED4)
+
+               /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */
+               #define LEDMASK_USB_ERROR                    (LEDS_LED1 | LEDS_LED3)
+               
+               /** LED mask for the library LED driver, to indicate that the USB interface is busy. */
+               #define LEDMASK_USB_BUSY                      LEDS_LED2
+
+               #define Req_InitiateAbortBulkOut              0x01
+               #define Req_CheckAbortBulkOutStatus           0x02
+               #define Req_InitiateAbortBulkIn               0x03
+               #define Req_CheckAbortBulkInStatus            0x04
+               #define Req_InitiateClear                     0x05
+               #define Req_CheckClearStatus                  0x06
+               #define Req_GetCapabilities                   0x07
+               #define Req_IndicatorPulse                    0x40
+               
+               #define TMC_STATUS_SUCCESS                    0x01
+               #define TMC_STATUS_PENDING                    0x02
+               #define TMC_STATUS_FAILED                     0x80
+               #define TMC_STATUS_TRANSFER_NOT_IN_PROGRESS   0x81
+               #define TMC_STATUS_SPLIT_NOT_IN_PROGRESS      0x82
+               #define TMC_STATUS_SPLIT_IN_PROGRESS          0x83
+               
+               #define TMC_MESSAGEID_DEV_DEP_MSG_OUT         0x01
+               #define TMC_MESSAGEID_DEV_DEP_MSG_IN          0x02
+               #define TMC_MESSAGEID_DEV_VENDOR_OUT          0x7E
+               #define TMC_MESSAGEID_DEV_VENDOR_IN           0x7F
+
+       /* Type Defines */
+               typedef struct
+               {
+                       uint8_t  Status;
+                       uint8_t  Reserved;
+
+                       uint16_t TMCVersion;
+                       
+                       struct
+                       {
+                               unsigned ListenOnly             : 1;
+                               unsigned TalkOnly               : 1;
+                               unsigned PulseIndicateSupported : 1;
+                               unsigned Reserved               : 5;
+                       } Interface;
+                       
+                       struct
+                       {
+                               unsigned SupportsAbortINOnMatch : 1;
+                               unsigned Reserved               : 7;
+                       } Device;
+                       
+                       uint8_t Reserved2[6];
+                       uint8_t Reserved3[12];                  
+               } TMC_Capabilities_t;
+               
+               typedef struct
+               {
+                       uint8_t LastMessageTransaction;
+                       uint8_t TermChar;
+                       uint8_t Reserved[2];
+               } TMC_DevOUTMessageHeader_t;
+
+               typedef struct
+               {
+                       uint8_t LastMessageTransaction;
+                       uint8_t Reserved[3];
+               } TMC_DevINMessageHeader_t;
+
+               typedef struct
+               {
+                       uint8_t  MessageID;
+                       uint8_t  Tag;
+                       uint8_t  InverseTag;
+                       uint8_t  Reserved;
+                       uint32_t TransferSize;
+                       
+                       union
+                       {
+                               TMC_DevOUTMessageHeader_t DeviceOUT;
+                               TMC_DevINMessageHeader_t  DeviceIN;
+                               uint32_t                  VendorSpecific;
+                       } MessageIDSpecific;
+               } TMC_MessageHeader_t;
+
+       /* Function Prototypes: */
+               void SetupHardware(void);
+               void TMC_Task(void);
+               bool ReadTMCHeader(TMC_MessageHeader_t* const MessageHeader);
+               bool WriteTMCHeader(TMC_MessageHeader_t* const MessageHeader);
+
+               void EVENT_USB_Device_Connect(void);
+               void EVENT_USB_Device_Disconnect(void);
+               void EVENT_USB_Device_ConfigurationChanged(void);
+               void EVENT_USB_Device_ControlRequest(void);
+
+#endif
 
index 4307033..1350118 100644 (file)
@@ -17,17 +17,20 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = TestAndMeasurement
 SRC          = $(TARGET).c Descriptors.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
-LD_FLAGS     =
+LD_FLAGS     = 
 
 # Default target
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-#include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index ec2ed17..5739183 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = AudioInput
 SRC          = $(TARGET).c Descriptors.c $(LUFA_SRC_USB)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 336c758..f57433a 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = AudioOutput
 SRC          = $(TARGET).c Descriptors.c $(LUFA_SRC_USB)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index dd721a7..54ef70d 100644 (file)
@@ -1,78 +1,36 @@
 ;************************************************************
 ; Windows USB CDC ACM Setup File
 ; Copyright (c) 2000 Microsoft Corporation
-
+;************************************************************
 
 [Version]
 Signature="$Windows NT$"
 Class=Ports
 ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
 Provider=%MFGNAME%
-LayoutFile=layout.inf
-CatalogFile=%MFGFILENAME%.cat
-DriverVer=11/15/2007,5.1.2600.0
+DriverVer=7/1/2012,10.0.0.0
 
 [Manufacturer]
-%MFGNAME%=DeviceList, NTamd64
-
-[DestinationDirs]
-DefaultDestDir=12
-
-
-;------------------------------------------------------------------------------
-;  Windows 2000/XP/Vista-32bit Sections
-;------------------------------------------------------------------------------
-
-[DriverInstall.nt]
-include=mdmcpq.inf
-CopyFiles=DriverCopyFiles.nt
-AddReg=DriverInstall.nt.AddReg
-
-[DriverCopyFiles.nt]
-usbser.sys,,,0x20
-
-[DriverInstall.nt.AddReg]
-HKR,,DevLoader,,*ntkern
-HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
-HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
+%MFGNAME%=DeviceList, NTx86, NTamd64, NTia64
 
-[DriverInstall.nt.Services]
-AddService=usbser, 0x00000002, DriverService.nt
-
-[DriverService.nt]
-DisplayName=%SERVICE%
-ServiceType=1
-StartType=3
-ErrorControl=1
-ServiceBinary=%12%\%DRIVERFILENAME%.sys
-
-;------------------------------------------------------------------------------
-;  Vista-64bit Sections
-;------------------------------------------------------------------------------
-
-[DriverInstall.NTamd64]
-include=mdmcpq.inf
-CopyFiles=DriverCopyFiles.NTamd64
-AddReg=DriverInstall.NTamd64.AddReg
+[SourceDisksNames]
 
-[DriverCopyFiles.NTamd64]
-%DRIVERFILENAME%.sys,,,0x20
+[SourceDisksFiles]
 
-[DriverInstall.NTamd64.AddReg]
-HKR,,DevLoader,,*ntkern
-HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
-HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
+[DestinationDirs]
+DefaultDestDir=12
 
-[DriverInstall.NTamd64.Services]
-AddService=usbser, 0x00000002, DriverService.NTamd64
+[DriverInstall]
+Include=mdmcpq.inf
+CopyFiles=FakeModemCopyFileSection
+AddReg=DriverInstall.AddReg
 
-[DriverService.NTamd64]
-DisplayName=%SERVICE%
-ServiceType=1
-StartType=3
-ErrorControl=1
-ServiceBinary=%12%\%DRIVERFILENAME%.sys
+[DriverInstall.Services]
+Include=mdmcpq.inf
+AddService=usbser, 0x00000002, LowerFilter_Service_Inst
 
+[DriverInstall.AddReg]
+HKR,,EnumPropPages32,,"msports.dll,SerialPortPropPageProvider"
 
 ;------------------------------------------------------------------------------
 ;  Vendor and Product ID Definitions
@@ -83,14 +41,14 @@ ServiceBinary=%12%\%DRIVERFILENAME%.sys
 ; Note: One INF file can be used for multiple devices with different VID and PIDs.
 ; For each supported device, append ",USB\VID_xxxx&PID_yyyy" to the end of the line.
 ;------------------------------------------------------------------------------
-[SourceDisksFiles]
-[SourceDisksNames]
 [DeviceList]
 %DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_204E&MI_00, USB\VID_03EB&PID_204E&MI_02
 
 [DeviceList.NTamd64]
 %DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_204E&MI_00, USB\VID_03EB&PID_204E&MI_02
 
+[DeviceList.NTia64]
+%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_204E&MI_00, USB\VID_03EB&PID_204E&MI_02
 
 ;------------------------------------------------------------------------------
 ;  String Definitions
@@ -98,9 +56,5 @@ ServiceBinary=%12%\%DRIVERFILENAME%.sys
 ;Modify these strings to customize your device
 ;------------------------------------------------------------------------------
 [Strings]
-MFGFILENAME="CDC_vista"
-DRIVERFILENAME ="usbser"
 MFGNAME="http://www.lufa-lib.org"
-INSTDISK="LUFA Dual CDC Driver Installer"
-DESCRIPTION="Communications Port"
-SERVICE="USB RS-232 Emulation Driver"
\ No newline at end of file
+DESCRIPTION="LUFA CDC-ACM Virtual Serial Port"
\ No newline at end of file
index c3f1a9a..9e53253 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = DualVirtualSerial
 SRC          = $(TARGET).c Descriptors.c $(LUFA_SRC_USB)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 4579b66..691efd5 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = GenericHID
 SRC          = $(TARGET).c Descriptors.c $(LUFA_SRC_USB)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 729892e..68dc16c 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = Joystick
 SRC          = $(TARGET).c Descriptors.c $(LUFA_SRC_USB)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 31d1be6..e1783fd 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = Keyboard
 SRC          = $(TARGET).c Descriptors.c $(LUFA_SRC_USB)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 178f5ed..5a59b4d 100644 (file)
@@ -61,7 +61,6 @@
                        USB_Descriptor_Interface_t            HID2_MouseInterface;
                        USB_HID_Descriptor_HID_t              HID2_MouseHID;
                        USB_Descriptor_Endpoint_t             HID2_ReportINEndpoint;
-                       USB_Descriptor_Endpoint_t             HID2_ReportOUTEndpoint;
                } USB_Descriptor_Configuration_t;
 
        /* Macros: */
index a916659..f932a32 100644 (file)
@@ -181,7 +181,7 @@ void EVENT_USB_Device_ControlRequest(void)
 /** Processes a given Keyboard LED report from the host, and sets the board LEDs to match. Since the Keyboard
  *  LED report can be sent through either the control endpoint (via a HID SetReport request) or the HID OUT
  *  endpoint, the processing code is placed here to avoid duplicating it and potentially having different
- *  behaviour depending on the method used to sent it.
+ *  behavior depending on the method used to sent it.
  */
 void Keyboard_ProcessLEDReport(const uint8_t LEDStatus)
 {
index 697ab29..6537983 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = KeyboardMouse
 SRC          = $(TARGET).c Descriptors.c $(LUFA_SRC_USB)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 599cdb2..432ae46 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = MIDI
 SRC          = $(TARGET).c Descriptors.c $(LUFA_SRC_USB)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index f677e9f..5ad4ec0 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = MassStorage
 SRC          = $(TARGET).c Descriptors.c Lib/DataflashManager.c Lib/SCSI.c $(LUFA_SRC_USB)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index c40abfa..6df68a7 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = Mouse
 SRC          = $(TARGET).c Descriptors.c $(LUFA_SRC_USB)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 374a102..2e40cf5 100644 (file)
@@ -111,8 +111,8 @@ void TCP_Task(void)
 
                        ConnectionStateTable[CSTableEntry].Info.SequenceNumberOut += PacketSize;
 
-                       TCPHeaderOUT->Checksum             = TCP_Checksum16(TCPHeaderOUT, ServerIPAddress,
-                                                                           ConnectionStateTable[CSTableEntry].RemoteAddress,
+                       TCPHeaderOUT->Checksum             = TCP_Checksum16(TCPHeaderOUT, &ServerIPAddress,
+                                                                           &ConnectionStateTable[CSTableEntry].RemoteAddress,
                                                                            (sizeof(TCP_Header_t) + PacketSize));
 
                        PacketSize += sizeof(TCP_Header_t);
@@ -249,7 +249,7 @@ uint8_t TCP_GetPortState(const uint16_t Port)
  *  \return Boolean true if the connection was updated or created, false otherwise (no more space in the connection state table)
  */
 bool TCP_SetConnectionState(const uint16_t Port,
-                            const IP_Address_t RemoteAddress,
+                            const IP_Address_t* RemoteAddress,
                             const uint16_t RemotePort,
                             const uint8_t State)
 {
@@ -259,7 +259,7 @@ bool TCP_SetConnectionState(const uint16_t Port,
        {
                /* Find port entry in the table */
                if ((ConnectionStateTable[CSTableEntry].Port == Port) &&
-                    IP_COMPARE(&ConnectionStateTable[CSTableEntry].RemoteAddress, &RemoteAddress) &&
+                    IP_COMPARE(&ConnectionStateTable[CSTableEntry].RemoteAddress, RemoteAddress) &&
                         ConnectionStateTable[CSTableEntry].RemotePort == RemotePort)
                {
                        ConnectionStateTable[CSTableEntry].State = State;
@@ -273,7 +273,7 @@ bool TCP_SetConnectionState(const uint16_t Port,
                if (ConnectionStateTable[CSTableEntry].State == TCP_Connection_Closed)
                {
                        ConnectionStateTable[CSTableEntry].Port          = Port;
-                       ConnectionStateTable[CSTableEntry].RemoteAddress = RemoteAddress;
+                       ConnectionStateTable[CSTableEntry].RemoteAddress = *RemoteAddress;
                        ConnectionStateTable[CSTableEntry].RemotePort    = RemotePort;
                        ConnectionStateTable[CSTableEntry].State         = State;
                        return true;
@@ -292,7 +292,7 @@ bool TCP_SetConnectionState(const uint16_t Port,
  *  \return A value from the \ref TCP_ConnectionStates_t enum
  */
 uint8_t TCP_GetConnectionState(const uint16_t Port,
-                               const IP_Address_t RemoteAddress,
+                               const IP_Address_t* RemoteAddress,
                                const uint16_t RemotePort)
 {
        /* Note, Port number should be specified in BIG endian to simplify network code */
@@ -301,7 +301,7 @@ uint8_t TCP_GetConnectionState(const uint16_t Port,
        {
                /* Find port entry in the table */
                if ((ConnectionStateTable[CSTableEntry].Port == Port) &&
-                    IP_COMPARE(&ConnectionStateTable[CSTableEntry].RemoteAddress, &RemoteAddress) &&
+                    IP_COMPARE(&ConnectionStateTable[CSTableEntry].RemoteAddress, RemoteAddress) &&
                         ConnectionStateTable[CSTableEntry].RemotePort == RemotePort)
 
                {
@@ -321,7 +321,7 @@ uint8_t TCP_GetConnectionState(const uint16_t Port,
  *  \return ConnectionInfo structure of the connection if found, NULL otherwise
  */
 TCP_ConnectionInfo_t* TCP_GetConnectionInfo(const uint16_t Port,
-                                            const IP_Address_t RemoteAddress,
+                                            const IP_Address_t* RemoteAddress,
                                             const uint16_t RemotePort)
 {
        /* Note, Port number should be specified in BIG endian to simplify network code */
@@ -330,7 +330,7 @@ TCP_ConnectionInfo_t* TCP_GetConnectionInfo(const uint16_t Port,
        {
                /* Find port entry in the table */
                if ((ConnectionStateTable[CSTableEntry].Port == Port) &&
-                    IP_COMPARE(&ConnectionStateTable[CSTableEntry].RemoteAddress, &RemoteAddress) &&
+                    IP_COMPARE(&ConnectionStateTable[CSTableEntry].RemoteAddress, RemoteAddress) &&
                         ConnectionStateTable[CSTableEntry].RemotePort == RemotePort)
                {
                        return &ConnectionStateTable[CSTableEntry].Info;
@@ -370,12 +370,12 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart,
        {
                /* Detect SYN from host to start a connection */
                if (TCPHeaderIN->Flags & TCP_FLAG_SYN)
-                 TCP_SetConnectionState(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress, TCPHeaderIN->SourcePort, TCP_Connection_Listen);
+                 TCP_SetConnectionState(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress, TCPHeaderIN->SourcePort, TCP_Connection_Listen);
 
                /* Detect RST from host to abort existing connection */
                if (TCPHeaderIN->Flags & TCP_FLAG_RST)
                {
-                       if (TCP_SetConnectionState(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress,
+                       if (TCP_SetConnectionState(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress,
                                                   TCPHeaderIN->SourcePort, TCP_Connection_Closed))
                        {
                                TCPHeaderOUT->Flags = (TCP_FLAG_RST | TCP_FLAG_ACK);
@@ -385,18 +385,18 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart,
                else
                {
                        /* Process the incoming TCP packet based on the current connection state for the sender and port */
-                       switch (TCP_GetConnectionState(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress, TCPHeaderIN->SourcePort))
+                       switch (TCP_GetConnectionState(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress, TCPHeaderIN->SourcePort))
                        {
                                case TCP_Connection_Listen:
                                        if (TCPHeaderIN->Flags == TCP_FLAG_SYN)
                                        {
                                                /* SYN connection starts a connection with a peer */
-                                               if (TCP_SetConnectionState(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress,
+                                               if (TCP_SetConnectionState(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress,
                                                                           TCPHeaderIN->SourcePort, TCP_Connection_SYNReceived))
                                                {
                                                        TCPHeaderOUT->Flags = (TCP_FLAG_SYN | TCP_FLAG_ACK);
 
-                                                       ConnectionInfo = TCP_GetConnectionInfo(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress, TCPHeaderIN->SourcePort);
+                                                       ConnectionInfo = TCP_GetConnectionInfo(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress, TCPHeaderIN->SourcePort);
 
                                                        ConnectionInfo->SequenceNumberIn  = (SwapEndian_32(TCPHeaderIN->SequenceNumber) + 1);
                                                        ConnectionInfo->SequenceNumberOut = 0;
@@ -416,10 +416,10 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart,
                                        {
                                                /* ACK during the connection process completes the connection to a peer */
 
-                                               TCP_SetConnectionState(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress,
+                                               TCP_SetConnectionState(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress,
                                                                                           TCPHeaderIN->SourcePort, TCP_Connection_Established);
 
-                                               ConnectionInfo = TCP_GetConnectionInfo(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress,
+                                               ConnectionInfo = TCP_GetConnectionInfo(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress,
                                                                                                                           TCPHeaderIN->SourcePort);
 
                                                ConnectionInfo->SequenceNumberOut++;
@@ -434,10 +434,10 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart,
                                                TCPHeaderOUT->Flags = (TCP_FLAG_FIN | TCP_FLAG_ACK);
                                                PacketResponse      = true;
 
-                                               TCP_SetConnectionState(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress,
+                                               TCP_SetConnectionState(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress,
                                                                                           TCPHeaderIN->SourcePort, TCP_Connection_CloseWait);
 
-                                               ConnectionInfo = TCP_GetConnectionInfo(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress,
+                                               ConnectionInfo = TCP_GetConnectionInfo(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress,
                                                                                                                           TCPHeaderIN->SourcePort);
 
                                                ConnectionInfo->SequenceNumberIn++;
@@ -445,7 +445,7 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart,
                                        }
                                        else if ((TCPHeaderIN->Flags == TCP_FLAG_ACK) || (TCPHeaderIN->Flags == (TCP_FLAG_ACK | TCP_FLAG_PSH)))
                                        {
-                                               ConnectionInfo = TCP_GetConnectionInfo(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress,
+                                               ConnectionInfo = TCP_GetConnectionInfo(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress,
                                                                                                                           TCPHeaderIN->SourcePort);
 
                                                /* Check if the buffer is currently in use either by a buffered data to send, or receive */
@@ -491,7 +491,7 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart,
 
                                        break;
                                case TCP_Connection_Closing:
-                                               ConnectionInfo = TCP_GetConnectionInfo(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress,
+                                               ConnectionInfo = TCP_GetConnectionInfo(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress,
                                                                                                                           TCPHeaderIN->SourcePort);
 
                                                TCPHeaderOUT->Flags = (TCP_FLAG_ACK | TCP_FLAG_FIN);
@@ -499,14 +499,14 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart,
 
                                                ConnectionInfo->Buffer.InUse = false;
 
-                                               TCP_SetConnectionState(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress,
+                                               TCP_SetConnectionState(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress,
                                                                                           TCPHeaderIN->SourcePort, TCP_Connection_FINWait1);
 
                                        break;
                                case TCP_Connection_FINWait1:
                                        if (TCPHeaderIN->Flags == (TCP_FLAG_FIN | TCP_FLAG_ACK))
                                        {
-                                               ConnectionInfo = TCP_GetConnectionInfo(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress,
+                                               ConnectionInfo = TCP_GetConnectionInfo(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress,
                                                                                                                           TCPHeaderIN->SourcePort);
 
                                                TCPHeaderOUT->Flags = TCP_FLAG_ACK;
@@ -515,12 +515,12 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart,
                                                ConnectionInfo->SequenceNumberIn++;
                                                ConnectionInfo->SequenceNumberOut++;
 
-                                               TCP_SetConnectionState(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress,
+                                               TCP_SetConnectionState(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress,
                                                                                           TCPHeaderIN->SourcePort, TCP_Connection_Closed);
                                        }
                                        else if (TCPHeaderIN->Flags == TCP_FLAG_ACK)
                                        {
-                                               TCP_SetConnectionState(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress,
+                                               TCP_SetConnectionState(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress,
                                                                                           TCPHeaderIN->SourcePort, TCP_Connection_FINWait2);
                                        }
 
@@ -528,7 +528,7 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart,
                                case TCP_Connection_FINWait2:
                                        if (TCPHeaderIN->Flags == (TCP_FLAG_FIN | TCP_FLAG_ACK))
                                        {
-                                               ConnectionInfo = TCP_GetConnectionInfo(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress,
+                                               ConnectionInfo = TCP_GetConnectionInfo(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress,
                                                                                                                           TCPHeaderIN->SourcePort);
 
                                                TCPHeaderOUT->Flags = TCP_FLAG_ACK;
@@ -537,7 +537,7 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart,
                                                ConnectionInfo->SequenceNumberIn++;
                                                ConnectionInfo->SequenceNumberOut++;
 
-                                               TCP_SetConnectionState(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress,
+                                               TCP_SetConnectionState(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress,
                                                                                           TCPHeaderIN->SourcePort, TCP_Connection_Closed);
                                        }
 
@@ -545,7 +545,7 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart,
                                case TCP_Connection_CloseWait:
                                        if (TCPHeaderIN->Flags == TCP_FLAG_ACK)
                                        {
-                                               TCP_SetConnectionState(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress,
+                                               TCP_SetConnectionState(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress,
                                                                                           TCPHeaderIN->SourcePort, TCP_Connection_Closed);
                                        }
 
@@ -563,7 +563,7 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart,
        /* Check if we need to respond to the sent packet */
        if (PacketResponse)
        {
-               ConnectionInfo = TCP_GetConnectionInfo(TCPHeaderIN->DestinationPort, IPHeaderIN->SourceAddress,
+               ConnectionInfo = TCP_GetConnectionInfo(TCPHeaderIN->DestinationPort, &IPHeaderIN->SourceAddress,
                                                       TCPHeaderIN->SourcePort);
 
                TCPHeaderOUT->SourcePort           = TCPHeaderIN->DestinationPort;
@@ -581,8 +581,8 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart,
                TCPHeaderOUT->Checksum             = 0;
                TCPHeaderOUT->Reserved             = 0;
 
-               TCPHeaderOUT->Checksum             = TCP_Checksum16(TCPHeaderOUT, IPHeaderIN->DestinationAddress,
-                                                                   IPHeaderIN->SourceAddress, sizeof(TCP_Header_t));
+               TCPHeaderOUT->Checksum             = TCP_Checksum16(TCPHeaderOUT, &IPHeaderIN->DestinationAddress,
+                                                                   &IPHeaderIN->SourceAddress, sizeof(TCP_Header_t));
 
                return sizeof(TCP_Header_t);
        }
@@ -601,8 +601,8 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart,
  *  \return A 16-bit TCP checksum value
  */
 static uint16_t TCP_Checksum16(void* TCPHeaderOutStart,
-                               const IP_Address_t SourceAddress,
-                               const IP_Address_t DestinationAddress,
+                               const IP_Address_t* SourceAddress,
+                               const IP_Address_t* DestinationAddress,
                                uint16_t TCPOutSize)
 {
        uint32_t Checksum = 0;
@@ -610,10 +610,10 @@ static uint16_t TCP_Checksum16(void* TCPHeaderOutStart,
        /* TCP/IP checksums are the addition of the one's compliment of each word including the IP pseudo-header,
           complimented */
 
-       Checksum += ((uint16_t*)&SourceAddress)[0];
-       Checksum += ((uint16_t*)&SourceAddress)[1];
-       Checksum += ((uint16_t*)&DestinationAddress)[0];
-       Checksum += ((uint16_t*)&DestinationAddress)[1];
+       Checksum += ((uint16_t*)SourceAddress)[0];
+       Checksum += ((uint16_t*)SourceAddress)[1];
+       Checksum += ((uint16_t*)DestinationAddress)[0];
+       Checksum += ((uint16_t*)DestinationAddress)[1];
        Checksum += SwapEndian_16(PROTOCOL_TCP);
        Checksum += SwapEndian_16(TCPOutSize);
 
index e49433a..4f90148 100644 (file)
                                                       void (*Handler)(TCP_ConnectionState_t*, TCP_ConnectionBuffer_t*));
                uint8_t               TCP_GetPortState(const uint16_t Port);
                bool                  TCP_SetConnectionState(const uint16_t Port,
-                                                            const IP_Address_t RemoteAddress,
+                                                            const IP_Address_t* RemoteAddress,
                                                             const uint16_t RemotePort,
                                                             const uint8_t State);
                uint8_t               TCP_GetConnectionState(const uint16_t Port,
-                                                            const IP_Address_t RemoteAddress,
+                                                            const IP_Address_t* RemoteAddress,
                                                             const uint16_t RemotePort);
                TCP_ConnectionInfo_t* TCP_GetConnectionInfo(const uint16_t Port,
-                                                           const IP_Address_t RemoteAddress,
+                                                           const IP_Address_t* RemoteAddress,
                                                            const uint16_t RemotePort);
                int16_t               TCP_ProcessTCPPacket(void* IPHeaderInStart,
                                                           void* TCPHeaderInStart,
 
                #if defined(INCLUDE_FROM_TCP_C)
                        static uint16_t TCP_Checksum16(void* TCPHeaderOutStart,
-                                                      const IP_Address_t SourceAddress,
-                                                      const IP_Address_t DestinationAddress,
+                                                      const IP_Address_t* SourceAddress,
+                                                      const IP_Address_t* DestinationAddress,
                                                       uint16_t TCPOutSize);
                #endif
 
index 096f849..37f70c2 100644 (file)
@@ -18,7 +18,7 @@ OPTIMIZATION = s
 TARGET       = RNDISEthernet
 SRC          = $(TARGET).c Descriptors.c Lib/Ethernet.c Lib/ProtocolDecoders.c Lib/RNDIS.c Lib/ICMP.c Lib/TCP.c Lib/UDP.c \
                Lib/DHCP.c Lib/ARP.c Lib/IP.c Lib/Webserver.c $(LUFA_SRC_USB) $(LUFA_SRC_SERIAL)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -26,9 +26,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 3951c22..8890ba1 100644 (file)
@@ -1,78 +1,36 @@
 ;************************************************************
 ; Windows USB CDC ACM Setup File
 ; Copyright (c) 2000 Microsoft Corporation
-
+;************************************************************
 
 [Version]
 Signature="$Windows NT$"
 Class=Ports
 ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
 Provider=%MFGNAME%
-LayoutFile=layout.inf
-CatalogFile=%MFGFILENAME%.cat
-DriverVer=11/15/2007,5.1.2600.0
+DriverVer=7/1/2012,10.0.0.0
 
 [Manufacturer]
-%MFGNAME%=DeviceList, NTamd64
-
-[DestinationDirs]
-DefaultDestDir=12
-
-
-;------------------------------------------------------------------------------
-;  Windows 2000/XP/Vista-32bit Sections
-;------------------------------------------------------------------------------
-
-[DriverInstall.nt]
-include=mdmcpq.inf
-CopyFiles=DriverCopyFiles.nt
-AddReg=DriverInstall.nt.AddReg
-
-[DriverCopyFiles.nt]
-usbser.sys,,,0x20
-
-[DriverInstall.nt.AddReg]
-HKR,,DevLoader,,*ntkern
-HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
-HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
+%MFGNAME%=DeviceList, NTx86, NTamd64, NTia64
 
-[DriverInstall.nt.Services]
-AddService=usbser, 0x00000002, DriverService.nt
-
-[DriverService.nt]
-DisplayName=%SERVICE%
-ServiceType=1
-StartType=3
-ErrorControl=1
-ServiceBinary=%12%\%DRIVERFILENAME%.sys
-
-;------------------------------------------------------------------------------
-;  Vista-64bit Sections
-;------------------------------------------------------------------------------
-
-[DriverInstall.NTamd64]
-include=mdmcpq.inf
-CopyFiles=DriverCopyFiles.NTamd64
-AddReg=DriverInstall.NTamd64.AddReg
+[SourceDisksNames]
 
-[DriverCopyFiles.NTamd64]
-%DRIVERFILENAME%.sys,,,0x20
+[SourceDisksFiles]
 
-[DriverInstall.NTamd64.AddReg]
-HKR,,DevLoader,,*ntkern
-HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
-HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
+[DestinationDirs]
+DefaultDestDir=12
 
-[DriverInstall.NTamd64.Services]
-AddService=usbser, 0x00000002, DriverService.NTamd64
+[DriverInstall]
+Include=mdmcpq.inf
+CopyFiles=FakeModemCopyFileSection
+AddReg=DriverInstall.AddReg
 
-[DriverService.NTamd64]
-DisplayName=%SERVICE%
-ServiceType=1
-StartType=3
-ErrorControl=1
-ServiceBinary=%12%\%DRIVERFILENAME%.sys
+[DriverInstall.Services]
+Include=mdmcpq.inf
+AddService=usbser, 0x00000002, LowerFilter_Service_Inst
 
+[DriverInstall.AddReg]
+HKR,,EnumPropPages32,,"msports.dll,SerialPortPropPageProvider"
 
 ;------------------------------------------------------------------------------
 ;  Vendor and Product ID Definitions
@@ -83,14 +41,14 @@ ServiceBinary=%12%\%DRIVERFILENAME%.sys
 ; Note: One INF file can be used for multiple devices with different VID and PIDs.
 ; For each supported device, append ",USB\VID_xxxx&PID_yyyy" to the end of the line.
 ;------------------------------------------------------------------------------
-[SourceDisksFiles]
-[SourceDisksNames]
 [DeviceList]
 %DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_2044
 
 [DeviceList.NTamd64]
 %DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_2044
 
+[DeviceList.NTia64]
+%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_2044
 
 ;------------------------------------------------------------------------------
 ;  String Definitions
@@ -98,9 +56,5 @@ ServiceBinary=%12%\%DRIVERFILENAME%.sys
 ;Modify these strings to customize your device
 ;------------------------------------------------------------------------------
 [Strings]
-MFGFILENAME="CDC_vista"
-DRIVERFILENAME ="usbser"
 MFGNAME="http://www.lufa-lib.org"
-INSTDISK="LUFA CDC Driver Installer"
-DESCRIPTION="Communications Port"
-SERVICE="USB RS-232 Emulation Driver"
\ No newline at end of file
+DESCRIPTION="LUFA CDC-ACM Virtual Serial Port"
\ No newline at end of file
index 669cd4f..f005d19 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = VirtualSerial
 SRC          = $(TARGET).c Descriptors.c $(LUFA_SRC_USB)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 85c8605..776288f 100644 (file)
 # custom LUFA library build options are reflected in the compiled
 # code.
 
-all:
-       $(MAKE) -s -C AudioInput clean all
-       $(MAKE) -s -C AudioOutput clean all
-       $(MAKE) -s -C DualVirtualSerial clean all
-       $(MAKE) -s -C GenericHID clean all
-       $(MAKE) -s -C Joystick clean all
-       $(MAKE) -s -C Keyboard clean all
-       $(MAKE) -s -C KeyboardMouse clean all
-       $(MAKE) -s -C MassStorage clean all
-       $(MAKE) -s -C MIDI clean all
-       $(MAKE) -s -C Mouse clean all
-       $(MAKE) -s -C RNDISEthernet clean all
-       $(MAKE) -s -C VirtualSerial clean all
-
-%:
-       $(MAKE) -s -C AudioInput $@
-       $(MAKE) -s -C AudioOutput $@
-       $(MAKE) -s -C DualVirtualSerial $@
-       $(MAKE) -s -C GenericHID $@
-       $(MAKE) -s -C Joystick $@
-       $(MAKE) -s -C Keyboard $@
-       $(MAKE) -s -C KeyboardMouse $@
-       $(MAKE) -s -C MassStorage $@
-       $(MAKE) -s -C MIDI $@
-       $(MAKE) -s -C Mouse $@
-       $(MAKE) -s -C RNDISEthernet $@
-       $(MAKE) -s -C VirtualSerial $@
+PROJECT_DIRECTORIES := $(shell ls -d */)
 
+# This makefile is potentially infinitely recursive if something really bad
+# happens when determining the set of project directories - hard-abort if
+# more than 10 levels deep to avoid angry emails.
+ifeq ($(MAKELEVEL), 10)
+   $(error EMERGENCY ABORT: INFINITE RECURSION DETECTED)
+endif
+
+# Need to special-case building without a per-project object directory
+ifeq ($(OBJDIR),)
+   # If no target specified, force "clean all" and disallow parallel build   
+   ifeq ($(MAKECMDGOALS),)
+      MAKECMDGOALS := clean all
+      .NOTPARALLEL:
+   endif
+
+   # If one of the targets is to build, force "clean" beforehand and disallow parallel build   
+   ifneq ($(findstring all, $(MAKECMDGOALS)),)
+      MAKECMDGOALS := clean $(MAKECMDGOALS)
+      .NOTPARALLEL:
+   endif
+endif
+
+%: $(PROJECT_DIRECTORIES)
+       @echo . > /dev/null
+
+$(PROJECT_DIRECTORIES):
+       @$(MAKE) -C $@ $(MAKECMDGOALS)
+    
+.PHONY: $(PROJECT_DIRECTORIES)
index a04f533..f979d02 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = MouseHostDevice
 SRC          = $(TARGET).c Descriptors.c DeviceFunctions.c HostFunctions.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) $(LUFA_SRC_SERIAL)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 28e06a3..6d16493 100644 (file)
 # custom LUFA library build options are reflected in the compiled
 # code.
 
-all:
-       $(MAKE) -s -C MouseHostDevice clean all
+PROJECT_DIRECTORIES := $(shell ls -d */)
 
-%:
-       $(MAKE) -s -C MouseHostDevice $@
+# This makefile is potentially infinitely recursive if something really bad
+# happens when determining the set of project directories - hard-abort if
+# more than 10 levels deep to avoid angry emails.
+ifeq ($(MAKELEVEL), 10)
+   $(error EMERGENCY ABORT: INFINITE RECURSION DETECTED)
+endif
 
+# Need to special-case building without a per-project object directory
+ifeq ($(OBJDIR),)
+   # If no target specified, force "clean all" and disallow parallel build   
+   ifeq ($(MAKECMDGOALS),)
+      MAKECMDGOALS := clean all
+      .NOTPARALLEL:
+   endif
+
+   # If one of the targets is to build, force "clean" beforehand and disallow parallel build   
+   ifneq ($(findstring all, $(MAKECMDGOALS)),)
+      MAKECMDGOALS := clean $(MAKECMDGOALS)
+      .NOTPARALLEL:
+   endif
+endif
+
+%: $(PROJECT_DIRECTORIES)
+       @echo . > /dev/null
+
+$(PROJECT_DIRECTORIES):
+       @$(MAKE) -C $@ $(MAKECMDGOALS)
+    
+.PHONY: $(PROJECT_DIRECTORIES)
index dbfe999..aaca625 100644 (file)
@@ -16,5 +16,5 @@
 all:
 
 %:
-       $(MAKE) -C ClassDriver/ $@
+       $(MAKE) -C ClassDriver $@
 
index 4c53cc2..b1e988c 100644 (file)
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2012.\r
-\r
-  dean [at] fourwalledcubicle [dot] com\r
-           www.lufa-lib.org\r
-*/\r
-\r
-/*\r
-  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, distribute, and sell this\r
-  software and its documentation for any purpose is hereby granted\r
-  without fee, provided that the above copyright notice appear in\r
-  all copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting\r
-  documentation, and that the name of the author not be used in\r
-  advertising or publicity pertaining to distribution of the\r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-/** \file\r
- *\r
- *  Main source file for the AndroidAccessoryHost demo. This file contains the main tasks of\r
- *  the demo and is responsible for the initial application hardware configuration.\r
- */\r
-\r
-#include "AndroidAccessoryHost.h"\r
-\r
-/** LUFA Android Open Accessory Class driver interface configuration and state information. This\r
- *  structure is passed to all Android Open Accessory Class driver functions, so that multiple\r
- *  instances of the same class within a device can be differentiated from one another.\r
- */\r
-USB_ClassInfo_AOA_Host_t AndroidDevice_AOA_Interface =\r
-       {\r
-               .Config =\r
-                       {\r
-                               .DataINPipe             =\r
-                                       {\r
-                                               .Address        = (PIPE_DIR_IN  | 1),\r
-                                               .Banks          = 1,\r
-                                       },\r
-                               .DataOUTPipe            =\r
-                                       {\r
-                                               .Address        = (PIPE_DIR_OUT | 2),\r
-                                               .Banks          = 1,\r
-                                       },                              \r
-                               .PropertyStrings =\r
-                                       {\r
-                                               [AOA_STRING_Manufacturer] = "Dean Camera",\r
-                                               [AOA_STRING_Model]        = "LUFA Android Demo",\r
-                                               [AOA_STRING_Description]  = "LUFA Android Demo",\r
-                                               [AOA_STRING_Version]      = "1.0",\r
-                                               [AOA_STRING_URI]          = "http://www.lufa-lib.org",\r
-                                               [AOA_STRING_Serial]       = "0000000012345678",\r
-                                       },\r
-                       },\r
-       };\r
-\r
-\r
-/** Main program entry point. This routine configures the hardware required by the application, then\r
- *  enters a loop to run the application tasks in sequence.\r
- */\r
-int main(void)\r
-{\r
-       SetupHardware();\r
-       \r
-       puts_P(PSTR(ESC_FG_CYAN "Android Accessory Host Demo running.\r\n" ESC_FG_WHITE));\r
-\r
-       LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
-       sei();\r
-\r
-       for (;;)\r
-       {\r
-               AOAHost_Task();\r
-\r
-               AOA_Host_USBTask(&AndroidDevice_AOA_Interface);\r
-               USB_USBTask();\r
-       }\r
-}\r
-\r
-/** Configures the board hardware and chip peripherals for the demo's functionality. */\r
-void SetupHardware(void)\r
-{\r
-       /* Disable watchdog if enabled by bootloader/fuses */\r
-       MCUSR &= ~(1 << WDRF);\r
-       wdt_disable();\r
-\r
-       /* Disable clock division */\r
-       clock_prescale_set(clock_div_1);\r
-\r
-       /* Hardware Initialization */\r
-       Serial_Init(9600, false);\r
-       LEDs_Init();\r
-       USB_Init();\r
-\r
-       /* Create a stdio stream for the serial port for stdin and stdout */\r
-       Serial_CreateStream(NULL);\r
-}\r
-\r
-/** Task to manage an enumerated USB Android Accessory device once connected, to print received data\r
- *  from the device to the serial port.\r
- */\r
-void AOAHost_Task(void)\r
-{\r
-       if (USB_HostState != HOST_STATE_Configured)\r
-         return;\r
-\r
-       if (AOA_Host_BytesReceived(&AndroidDevice_AOA_Interface))\r
-       {\r
-               /* Echo received bytes from the attached device through the USART */\r
-               int16_t ReceivedByte = AOA_Host_ReceiveByte(&AndroidDevice_AOA_Interface);\r
-               if (!(ReceivedByte < 0))\r
-                 putchar(ReceivedByte);\r
-       }\r
-}\r
-\r
-/** Event handler for the USB_DeviceAttached event. This indicates that a device has been attached to the host, and\r
- *  starts the library USB task to begin the enumeration and USB management process.\r
- */\r
-void EVENT_USB_Host_DeviceAttached(void)\r
-{\r
-       puts_P(PSTR("Device Attached.\r\n"));\r
-       LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);\r
-}\r
-\r
-/** Event handler for the USB_DeviceUnattached event. This indicates that a device has been removed from the host, and\r
- *  stops the library USB task management process.\r
- */\r
-void EVENT_USB_Host_DeviceUnattached(void)\r
-{\r
-       puts_P(PSTR("\r\nDevice Unattached.\r\n"));\r
-       LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
-}\r
-\r
-/** Event handler for the USB_DeviceEnumerationComplete event. This indicates that a device has been successfully\r
- *  enumerated by the host and is now ready to be used by the application.\r
- */\r
-void EVENT_USB_Host_DeviceEnumerationComplete(void)\r
-{\r
-       LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);\r
-\r
-       USB_Descriptor_Device_t DeviceDescriptor;\r
-\r
-       if (USB_Host_GetDeviceDescriptor(&DeviceDescriptor) != HOST_SENDCONTROL_Successful)\r
-       {\r
-               puts_P(PSTR("Error Retrieving Device Descriptor.\r\n"));\r
-               LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
-               return; \r
-       }\r
-\r
-       bool NeedModeSwitch;\r
-       if (!(AOA_Host_ValidateAccessoryDevice(&AndroidDevice_AOA_Interface, &DeviceDescriptor, &NeedModeSwitch)))\r
-       {\r
-               puts_P(PSTR("Not an Android device.\r\n"));\r
-               LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
-               return;\r
-       }\r
-       \r
-       if (NeedModeSwitch)\r
-       {\r
-               puts_P(PSTR("Not in Accessory mode, switching...\r\n"));\r
-               AOA_Host_StartAccessoryMode(&AndroidDevice_AOA_Interface);\r
-               return;\r
-       }\r
-\r
-       uint16_t ConfigDescriptorSize;\r
-       uint8_t  ConfigDescriptorData[512];\r
-\r
-       if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,\r
-                                              sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)\r
-       {\r
-               puts_P(PSTR("Error Retrieving Configuration Descriptor.\r\n"));\r
-               LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
-               return;\r
-       }\r
-\r
-       if (AOA_Host_ConfigurePipes(&AndroidDevice_AOA_Interface,\r
-                                   ConfigDescriptorSize, ConfigDescriptorData) != AOA_ENUMERROR_NoError)\r
-       {\r
-               puts_P(PSTR("Attached Device Not a Valid Android Accessory Class Device.\r\n"));\r
-               LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
-               return;\r
-       }\r
-\r
-       if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)\r
-       {\r
-               puts_P(PSTR("Error Setting Device Configuration.\r\n"));\r
-               LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
-               return;\r
-       }\r
-\r
-       puts_P(PSTR("Android Device Enumerated.\r\n"));\r
-       LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
-}\r
-\r
-/** Event handler for the USB_HostError event. This indicates that a hardware error occurred while in host mode. */\r
-void EVENT_USB_Host_HostError(const uint8_t ErrorCode)\r
-{\r
-       USB_Disable();\r
-\r
-       printf_P(PSTR(ESC_FG_RED "Host Mode Error\r\n"\r
-                                " -- Error Code %d\r\n" ESC_FG_WHITE), ErrorCode);\r
-\r
-       LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
-       for(;;);\r
-}\r
-\r
-/** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while\r
- *  enumerating an attached USB device.\r
- */\r
-void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode,\r
-                                            const uint8_t SubErrorCode)\r
-{\r
-       printf_P(PSTR(ESC_FG_RED "Dev Enum Error\r\n"\r
-                                " -- Error Code %d\r\n"\r
-                                " -- Sub Error Code %d\r\n"\r
-                                " -- In State %d\r\n" ESC_FG_WHITE), ErrorCode, SubErrorCode, USB_HostState);\r
-\r
-       LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
-}\r
-\r
+/*
+             LUFA Library
+     Copyright (C) Dean Camera, 2012.
+
+  dean [at] fourwalledcubicle [dot] com
+           www.lufa-lib.org
+*/
+
+/*
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+  Permission to use, copy, modify, distribute, and sell this
+  software and its documentation for any purpose is hereby granted
+  without fee, provided that the above copyright notice appear in
+  all copies and that both that the copyright notice and this
+  permission notice and warranty disclaimer appear in supporting
+  documentation, and that the name of the author not be used in
+  advertising or publicity pertaining to distribution of the
+  software without specific, written prior permission.
+
+  The author disclaim all warranties with regard to this
+  software, including all implied warranties of merchantability
+  and fitness.  In no event shall the author be liable for any
+  special, indirect or consequential damages or any damages
+  whatsoever resulting from loss of use, data or profits, whether
+  in an action of contract, negligence or other tortious action,
+  arising out of or in connection with the use or performance of
+  this software.
+*/
+
+/** \file
+ *
+ *  Main source file for the AndroidAccessoryHost demo. This file contains the main tasks of
+ *  the demo and is responsible for the initial application hardware configuration.
+ */
+
+#include "AndroidAccessoryHost.h"
+
+/** LUFA Android Open Accessory Class driver interface configuration and state information. This
+ *  structure is passed to all Android Open Accessory Class driver functions, so that multiple
+ *  instances of the same class within a device can be differentiated from one another.
+ */
+USB_ClassInfo_AOA_Host_t AndroidDevice_AOA_Interface =
+       {
+               .Config =
+                       {
+                               .DataINPipe             =
+                                       {
+                                               .Address        = (PIPE_DIR_IN  | 1),
+                                               .Banks          = 1,
+                                       },
+                               .DataOUTPipe            =
+                                       {
+                                               .Address        = (PIPE_DIR_OUT | 2),
+                                               .Banks          = 1,
+                                       },                              
+                               .PropertyStrings =
+                                       {
+                                               [AOA_STRING_Manufacturer] = "Dean Camera",
+                                               [AOA_STRING_Model]        = "LUFA Android Demo",
+                                               [AOA_STRING_Description]  = "LUFA Android Demo",
+                                               [AOA_STRING_Version]      = "1.0",
+                                               [AOA_STRING_URI]          = "http://www.lufa-lib.org",
+                                               [AOA_STRING_Serial]       = "0000000012345678",
+                                       },
+                       },
+       };
+
+
+/** Main program entry point. This routine configures the hardware required by the application, then
+ *  enters a loop to run the application tasks in sequence.
+ */
+int main(void)
+{
+       SetupHardware();
+       
+       puts_P(PSTR(ESC_FG_CYAN "Android Accessory Host Demo running.\r\n" ESC_FG_WHITE));
+
+       LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
+       sei();
+
+       for (;;)
+       {
+               AOAHost_Task();
+
+               AOA_Host_USBTask(&AndroidDevice_AOA_Interface);
+               USB_USBTask();
+       }
+}
+
+/** Configures the board hardware and chip peripherals for the demo's functionality. */
+void SetupHardware(void)
+{
+       /* Disable watchdog if enabled by bootloader/fuses */
+       MCUSR &= ~(1 << WDRF);
+       wdt_disable();
+
+       /* Disable clock division */
+       clock_prescale_set(clock_div_1);
+
+       /* Hardware Initialization */
+       Serial_Init(9600, false);
+       LEDs_Init();
+       USB_Init();
+
+       /* Create a stdio stream for the serial port for stdin and stdout */
+       Serial_CreateStream(NULL);
+}
+
+/** Task to manage an enumerated USB Android Accessory device once connected, to print received data
+ *  from the device to the serial port.
+ */
+void AOAHost_Task(void)
+{
+       if (USB_HostState != HOST_STATE_Configured)
+         return;
+
+       if (AOA_Host_BytesReceived(&AndroidDevice_AOA_Interface))
+       {
+               /* Echo received bytes from the attached device through the USART */
+               int16_t ReceivedByte = AOA_Host_ReceiveByte(&AndroidDevice_AOA_Interface);
+               if (!(ReceivedByte < 0))
+                 putchar(ReceivedByte);
+       }
+}
+
+/** Event handler for the USB_DeviceAttached event. This indicates that a device has been attached to the host, and
+ *  starts the library USB task to begin the enumeration and USB management process.
+ */
+void EVENT_USB_Host_DeviceAttached(void)
+{
+       puts_P(PSTR("Device Attached.\r\n"));
+       LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
+}
+
+/** Event handler for the USB_DeviceUnattached event. This indicates that a device has been removed from the host, and
+ *  stops the library USB task management process.
+ */
+void EVENT_USB_Host_DeviceUnattached(void)
+{
+       puts_P(PSTR("\r\nDevice Unattached.\r\n"));
+       LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
+}
+
+/** Event handler for the USB_DeviceEnumerationComplete event. This indicates that a device has been successfully
+ *  enumerated by the host and is now ready to be used by the application.
+ */
+void EVENT_USB_Host_DeviceEnumerationComplete(void)
+{
+       LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
+
+       USB_Descriptor_Device_t DeviceDescriptor;
+
+       if (USB_Host_GetDeviceDescriptor(&DeviceDescriptor) != HOST_SENDCONTROL_Successful)
+       {
+               puts_P(PSTR("Error Retrieving Device Descriptor.\r\n"));
+               LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
+               return; 
+       }
+
+       bool NeedModeSwitch;
+       if (!(AOA_Host_ValidateAccessoryDevice(&AndroidDevice_AOA_Interface, &DeviceDescriptor, &NeedModeSwitch)))
+       {
+               puts_P(PSTR("Not an Android device.\r\n"));
+               LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
+               return;
+       }
+       
+       if (NeedModeSwitch)
+       {
+               puts_P(PSTR("Not in Accessory mode, switching...\r\n"));
+               AOA_Host_StartAccessoryMode(&AndroidDevice_AOA_Interface);
+               return;
+       }
+
+       uint16_t ConfigDescriptorSize;
+       uint8_t  ConfigDescriptorData[512];
+
+       if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,
+                                              sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)
+       {
+               puts_P(PSTR("Error Retrieving Configuration Descriptor.\r\n"));
+               LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
+               return;
+       }
+
+       if (AOA_Host_ConfigurePipes(&AndroidDevice_AOA_Interface,
+                                   ConfigDescriptorSize, ConfigDescriptorData) != AOA_ENUMERROR_NoError)
+       {
+               puts_P(PSTR("Attached Device Not a Valid Android Accessory Class Device.\r\n"));
+               LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
+               return;
+       }
+
+       if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)
+       {
+               puts_P(PSTR("Error Setting Device Configuration.\r\n"));
+               LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
+               return;
+       }
+
+       puts_P(PSTR("Android Device Enumerated.\r\n"));
+       LEDs_SetAllLEDs(LEDMASK_USB_READY);
+}
+
+/** Event handler for the USB_HostError event. This indicates that a hardware error occurred while in host mode. */
+void EVENT_USB_Host_HostError(const uint8_t ErrorCode)
+{
+       USB_Disable();
+
+       printf_P(PSTR(ESC_FG_RED "Host Mode Error\r\n"
+                                " -- Error Code %d\r\n" ESC_FG_WHITE), ErrorCode);
+
+       LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
+       for(;;);
+}
+
+/** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while
+ *  enumerating an attached USB device.
+ */
+void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode,
+                                            const uint8_t SubErrorCode)
+{
+       printf_P(PSTR(ESC_FG_RED "Dev Enum Error\r\n"
+                                " -- Error Code %d\r\n"
+                                " -- Sub Error Code %d\r\n"
+                                " -- In State %d\r\n" ESC_FG_WHITE), ErrorCode, SubErrorCode, USB_HostState);
+
+       LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
+}
+
 
index 95cecca..0000696 100644 (file)
@@ -1,78 +1,78 @@
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2012.\r
-\r
-  dean [at] fourwalledcubicle [dot] com\r
-           www.lufa-lib.org\r
-*/\r
-\r
-/*\r
-  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, distribute, and sell this\r
-  software and its documentation for any purpose is hereby granted\r
-  without fee, provided that the above copyright notice appear in\r
-  all copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting\r
-  documentation, and that the name of the author not be used in\r
-  advertising or publicity pertaining to distribution of the\r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-/** \file\r
- *\r
- *  Header file for AndroidAccessoryHost.c.\r
- */\r
-\r
-#ifndef _ANDROIDACCESSORY_HOST_H_\r
-#define _ANDROIDACCESSORY_HOST_H_\r
-\r
-       /* Includes: */\r
-               #include <avr/io.h>\r
-               #include <avr/wdt.h>\r
-               #include <avr/pgmspace.h>\r
-               #include <avr/power.h>\r
-               #include <avr/interrupt.h>\r
-               #include <stdio.h>\r
-\r
-               #include <LUFA/Drivers/Misc/TerminalCodes.h>\r
-               #include <LUFA/Drivers/Peripheral/Serial.h>\r
-               #include <LUFA/Drivers/Board/LEDs.h>\r
-               #include <LUFA/Drivers/USB/USB.h>\r
-\r
-       /* Macros: */\r
-               /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */\r
-               #define LEDMASK_USB_NOTREADY      LEDS_LED1\r
-\r
-               /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */\r
-               #define LEDMASK_USB_ENUMERATING  (LEDS_LED2 | LEDS_LED3)\r
-\r
-               /** LED mask for the library LED driver, to indicate that the USB interface is ready. */\r
-               #define LEDMASK_USB_READY        (LEDS_LED2 | LEDS_LED4)\r
-\r
-               /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */\r
-               #define LEDMASK_USB_ERROR        (LEDS_LED1 | LEDS_LED3)\r
-\r
-       /* Function Prototypes: */\r
-               void SetupHardware(void);\r
-               void AOAHost_Task(void);\r
-\r
-               void EVENT_USB_Host_HostError(const uint8_t ErrorCode);\r
-               void EVENT_USB_Host_DeviceAttached(void);\r
-               void EVENT_USB_Host_DeviceUnattached(void);\r
-               void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode,\r
-                                                           const uint8_t SubErrorCode);\r
-               void EVENT_USB_Host_DeviceEnumerationComplete(void);\r
-\r
-#endif\r
-\r
+/*
+             LUFA Library
+     Copyright (C) Dean Camera, 2012.
+
+  dean [at] fourwalledcubicle [dot] com
+           www.lufa-lib.org
+*/
+
+/*
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+  Permission to use, copy, modify, distribute, and sell this
+  software and its documentation for any purpose is hereby granted
+  without fee, provided that the above copyright notice appear in
+  all copies and that both that the copyright notice and this
+  permission notice and warranty disclaimer appear in supporting
+  documentation, and that the name of the author not be used in
+  advertising or publicity pertaining to distribution of the
+  software without specific, written prior permission.
+
+  The author disclaim all warranties with regard to this
+  software, including all implied warranties of merchantability
+  and fitness.  In no event shall the author be liable for any
+  special, indirect or consequential damages or any damages
+  whatsoever resulting from loss of use, data or profits, whether
+  in an action of contract, negligence or other tortious action,
+  arising out of or in connection with the use or performance of
+  this software.
+*/
+
+/** \file
+ *
+ *  Header file for AndroidAccessoryHost.c.
+ */
+
+#ifndef _ANDROIDACCESSORY_HOST_H_
+#define _ANDROIDACCESSORY_HOST_H_
+
+       /* Includes: */
+               #include <avr/io.h>
+               #include <avr/wdt.h>
+               #include <avr/pgmspace.h>
+               #include <avr/power.h>
+               #include <avr/interrupt.h>
+               #include <stdio.h>
+
+               #include <LUFA/Drivers/Misc/TerminalCodes.h>
+               #include <LUFA/Drivers/Peripheral/Serial.h>
+               #include <LUFA/Drivers/Board/LEDs.h>
+               #include <LUFA/Drivers/USB/USB.h>
+
+       /* Macros: */
+               /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
+               #define LEDMASK_USB_NOTREADY      LEDS_LED1
+
+               /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */
+               #define LEDMASK_USB_ENUMERATING  (LEDS_LED2 | LEDS_LED3)
+
+               /** LED mask for the library LED driver, to indicate that the USB interface is ready. */
+               #define LEDMASK_USB_READY        (LEDS_LED2 | LEDS_LED4)
+
+               /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */
+               #define LEDMASK_USB_ERROR        (LEDS_LED1 | LEDS_LED3)
+
+       /* Function Prototypes: */
+               void SetupHardware(void);
+               void AOAHost_Task(void);
+
+               void EVENT_USB_Host_HostError(const uint8_t ErrorCode);
+               void EVENT_USB_Host_DeviceAttached(void);
+               void EVENT_USB_Host_DeviceUnattached(void);
+               void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode,
+                                                           const uint8_t SubErrorCode);
+               void EVENT_USB_Host_DeviceEnumerationComplete(void);
+
+#endif
+
 
index ebdab99..ea34442 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = AndroidAccessoryHost
 SRC          = $(TARGET).c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) $(LUFA_SRC_SERIAL)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 8af0531..172d90d 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = AudioInputHost
 SRC          = $(TARGET).c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) $(LUFA_SRC_SERIAL)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index eb3b92e..0c5347d 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = AudioOutputHost
 SRC          = $(TARGET).c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) $(LUFA_SRC_SERIAL)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index ee2c4b0..e04f86b 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = JoystickHostWithParser
 SRC          = $(TARGET).c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) $(LUFA_SRC_SERIAL)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index f7ba178..6f6056a 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = KeyboardHost
 SRC          = $(TARGET).c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) $(LUFA_SRC_SERIAL)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 415af80..ef8c327 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = KeyboardHostWithParser
 SRC          = $(TARGET).c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) $(LUFA_SRC_SERIAL)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 472d19a..04a9454 100644 (file)
@@ -101,7 +101,7 @@ void SetupHardware(void)
 }
 
 /** Task to manage an enumerated USB MIDI device once connected, to display received
- *  note events from the host and send note changes in response to tbe board's joystick.
+ *  note events from the host and send note changes in response to the board's joystick.
  */
 void JoystickHost_Task(void)
 {
index eaf78f1..63cba2b 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = MIDIHost
 SRC          = $(TARGET).c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) $(LUFA_SRC_SERIAL)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 3c565ea..a626703 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = MassStorageHost
 SRC          = $(TARGET).c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) $(LUFA_SRC_SERIAL)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 5d7d2f1..0dd25b7 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = MouseHost
 SRC          = $(TARGET).c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) $(LUFA_SRC_SERIAL)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 1aa1c96..13d217d 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = MouseHostWithParser
 SRC          = $(TARGET).c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) $(LUFA_SRC_SERIAL)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 46ecd63..8ef479e 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = PrinterHost
 SRC          = $(TARGET).c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) $(LUFA_SRC_SERIAL)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index aef7992..359800c 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = RNDISEthernetHost
 SRC          = $(TARGET).c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) $(LUFA_SRC_SERIAL)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index a1780b0..72eb8f8 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = StillImageHost
 SRC          = $(TARGET).c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) $(LUFA_SRC_SERIAL)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 04c9c9a..29e5a2a 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = VirtualSerialHost
 SRC          = $(TARGET).c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) $(LUFA_SRC_SERIAL)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index aa8fa36..e33bf96 100644 (file)
 # custom LUFA library build options are reflected in the compiled
 # code.
 
-all:
-       $(MAKE) -s -C AndroidAccessoryHost clean all
-       $(MAKE) -s -C AudioInputHost clean all
-       $(MAKE) -s -C AudioOutputHost clean all
-       $(MAKE) -s -C JoystickHostWithParser clean all
-       $(MAKE) -s -C KeyboardHost clean all
-       $(MAKE) -s -C KeyboardHostWithParser clean all
-       $(MAKE) -s -C MassStorageHost clean all
-       $(MAKE) -s -C MIDIHost clean all
-       $(MAKE) -s -C MouseHost clean all
-       $(MAKE) -s -C MouseHostWithParser clean all
-       $(MAKE) -s -C PrinterHost clean all
-       $(MAKE) -s -C RNDISEthernetHost clean all
-       $(MAKE) -s -C StillImageHost clean all
-       $(MAKE) -s -C VirtualSerialHost clean all
-
-%:
-       $(MAKE) -s -C AndroidAccessoryHost $@
-       $(MAKE) -s -C AudioInputHost $@
-       $(MAKE) -s -C AudioOutputHost $@
-       $(MAKE) -s -C JoystickHostWithParser $@
-       $(MAKE) -s -C KeyboardHost $@
-       $(MAKE) -s -C KeyboardHostWithParser $@
-       $(MAKE) -s -C MassStorageHost $@
-       $(MAKE) -s -C MIDIHost $@
-       $(MAKE) -s -C MouseHost $@
-       $(MAKE) -s -C MouseHostWithParser $@
-       $(MAKE) -s -C PrinterHost $@
-       $(MAKE) -s -C RNDISEthernetHost $@
-       $(MAKE) -s -C StillImageHost $@
-       $(MAKE) -s -C VirtualSerialHost $@
+PROJECT_DIRECTORIES := $(shell ls -d */)
 
+# This makefile is potentially infinitely recursive if something really bad
+# happens when determining the set of project directories - hard-abort if
+# more than 10 levels deep to avoid angry emails.
+ifeq ($(MAKELEVEL), 10)
+   $(error EMERGENCY ABORT: INFINITE RECURSION DETECTED)
+endif
+
+# Need to special-case building without a per-project object directory
+ifeq ($(OBJDIR),)
+   # If no target specified, force "clean all" and disallow parallel build   
+   ifeq ($(MAKECMDGOALS),)
+      MAKECMDGOALS := clean all
+      .NOTPARALLEL:
+   endif
+
+   # If one of the targets is to build, force "clean" beforehand and disallow parallel build   
+   ifneq ($(findstring all, $(MAKECMDGOALS)),)
+      MAKECMDGOALS := clean $(MAKECMDGOALS)
+      .NOTPARALLEL:
+   endif
+endif
+
+%: $(PROJECT_DIRECTORIES)
+       @echo . > /dev/null
+
+$(PROJECT_DIRECTORIES):
+       @$(MAKE) -C $@ $(MAKECMDGOALS)
+    
+.PHONY: $(PROJECT_DIRECTORIES)
index 18bbeaf..baacf57 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = AndroidAccessoryHost
 SRC          = $(TARGET).c ConfigDescriptor.c DeviceDescriptor.c Lib/AndroidAccessoryCommands.c $(LUFA_SRC_USB) $(LUFA_SRC_SERIAL)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 4536ed8..e643928 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = AudioInputHost
 SRC          = $(TARGET).c ConfigDescriptor.c $(LUFA_SRC_USB) $(LUFA_SRC_SERIAL)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 817f963..effdf19 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = AudioOutputHost
 SRC          = $(TARGET).c ConfigDescriptor.c $(LUFA_SRC_USB) $(LUFA_SRC_SERIAL)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index b4aa44e..b3f0e08 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = GenericHIDHost
 SRC          = $(TARGET).c ConfigDescriptor.c $(LUFA_SRC_USB) $(LUFA_SRC_SERIAL)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 155c31c..314253e 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = JoystickHostWithParser
 SRC          = $(TARGET).c ConfigDescriptor.c HIDReport.c $(LUFA_SRC_USB) $(LUFA_SRC_SERIAL)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index bc123ce..77d5898 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = KeyboardHost
 SRC          = $(TARGET).c ConfigDescriptor.c $(LUFA_SRC_USB) $(LUFA_SRC_SERIAL)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index b083811..ded8c52 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = KeyboardHostWithParser
 SRC          = $(TARGET).c ConfigDescriptor.c HIDReport.c $(LUFA_SRC_USB) $(LUFA_SRC_SERIAL)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index c43ab0c..fa180e1 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = MIDIHost
 SRC          = $(TARGET).c ConfigDescriptor.c $(LUFA_SRC_USB) $(LUFA_SRC_SERIAL)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 390acfa..e2887f5 100644 (file)
@@ -283,7 +283,7 @@ static uint8_t MassStore_GetReturnedStatus(MS_CommandStatusWrapper_t* const SCSI
 
 /** Issues a Mass Storage class specific request to reset the attached device's Mass Storage interface,
  *  readying the device for the next CBW. The Data endpoints are cleared of any STALL condition once this
- *  command completes sucessfuly.
+ *  command completes successfully.
  *
  *  \return A value from the USB_Host_SendControlErrorCodes_t enum, or MASS_STORE_SCSI_COMMAND_FAILED if the SCSI command fails
  */
index 14f2b05..823b579 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = MassStorageHost
 SRC          = $(TARGET).c ConfigDescriptor.c Lib/MassStoreCommands.c $(LUFA_SRC_USB) $(LUFA_SRC_SERIAL)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index efb24ec..1724ca4 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = MouseHost
 SRC          = $(TARGET).c ConfigDescriptor.c $(LUFA_SRC_USB) $(LUFA_SRC_SERIAL)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 9500d98..0db7cc7 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = MouseHostWithParser
 SRC          = $(TARGET).c ConfigDescriptor.c HIDReport.c $(LUFA_SRC_USB) $(LUFA_SRC_SERIAL)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index b738f96..b840c54 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = PrinterHost
 SRC          = $(TARGET).c ConfigDescriptor.c Lib/PrinterCommands.c $(LUFA_SRC_USB) $(LUFA_SRC_SERIAL)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index baf98db..7da4d00 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = RNDISEthernetHost
 SRC          = $(TARGET).c ConfigDescriptor.c Lib/RNDISCommands.c $(LUFA_SRC_USB) $(LUFA_SRC_SERIAL)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index e01ee7e..c99387a 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = StillImageHost
 SRC          = $(TARGET).c ConfigDescriptor.c Lib/StillImageCommands.c $(LUFA_SRC_USB) $(LUFA_SRC_SERIAL)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index a2bd7da..5400e5e 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = VirtualSerialHost
 SRC          = $(TARGET).c ConfigDescriptor.c $(LUFA_SRC_USB) $(LUFA_SRC_SERIAL)
-LUFA_PATH    = ../../../../LUFA/
+LUFA_PATH    = ../../../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 8c32dc3..e33bf96 100644 (file)
 # custom LUFA library build options are reflected in the compiled
 # code.
 
-all:
-       $(MAKE) -s -C AndroidAccessoryHost clean all
-       $(MAKE) -s -C AudioInputHost clean all
-       $(MAKE) -s -C AudioOutputHost clean all
-       $(MAKE) -s -C GenericHIDHost clean all
-       $(MAKE) -s -C JoystickHostWithParser clean all
-       $(MAKE) -s -C KeyboardHost clean all
-       $(MAKE) -s -C MassStorageHost clean all
-       $(MAKE) -s -C MIDIHost clean all
-       $(MAKE) -s -C MouseHost clean all
-       $(MAKE) -s -C MouseHostWithParser clean all
-       $(MAKE) -s -C PrinterHost clean all
-       $(MAKE) -s -C RNDISEthernetHost clean all
-       $(MAKE) -s -C StillImageHost clean all
-       $(MAKE) -s -C VirtualSerialHost clean all
-
-%:
-       $(MAKE) -s -C AndroidAccessoryHost $@
-       $(MAKE) -s -C AudioInputHost $@
-       $(MAKE) -s -C AudioOutputHost $@
-       $(MAKE) -s -C GenericHIDHost $@
-       $(MAKE) -s -C JoystickHostWithParser $@
-       $(MAKE) -s -C KeyboardHost $@
-       $(MAKE) -s -C KeyboardHostWithParser $@
-       $(MAKE) -s -C MassStorageHost $@
-       $(MAKE) -s -C MIDIHost $@
-       $(MAKE) -s -C MouseHost $@
-       $(MAKE) -s -C MouseHostWithParser $@
-       $(MAKE) -s -C PrinterHost $@
-       $(MAKE) -s -C RNDISEthernetHost $@
-       $(MAKE) -s -C StillImageHost $@
-       $(MAKE) -s -C VirtualSerialHost $@
+PROJECT_DIRECTORIES := $(shell ls -d */)
 
+# This makefile is potentially infinitely recursive if something really bad
+# happens when determining the set of project directories - hard-abort if
+# more than 10 levels deep to avoid angry emails.
+ifeq ($(MAKELEVEL), 10)
+   $(error EMERGENCY ABORT: INFINITE RECURSION DETECTED)
+endif
+
+# Need to special-case building without a per-project object directory
+ifeq ($(OBJDIR),)
+   # If no target specified, force "clean all" and disallow parallel build   
+   ifeq ($(MAKECMDGOALS),)
+      MAKECMDGOALS := clean all
+      .NOTPARALLEL:
+   endif
+
+   # If one of the targets is to build, force "clean" beforehand and disallow parallel build   
+   ifneq ($(findstring all, $(MAKECMDGOALS)),)
+      MAKECMDGOALS := clean $(MAKECMDGOALS)
+      .NOTPARALLEL:
+   endif
+endif
+
+%: $(PROJECT_DIRECTORIES)
+       @echo . > /dev/null
+
+$(PROJECT_DIRECTORIES):
+       @$(MAKE) -C $@ $(MAKECMDGOALS)
+    
+.PHONY: $(PROJECT_DIRECTORIES)
index 4fa506c..3928121 100644 (file)
@@ -1 +1 @@
-<Project name="LUFA"><Folder name="Demos"><Folder name="Device"><Folder name="ClassDriver"><Folder name="AudioInput"><Folder name="Config"><File path="Demos\Device\ClassDriver\AudioInput\Config\LUFAConfig.h"></File><File path="Demos\Device\ClassDriver\AudioInput\Config\AppConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Device\ClassDriver\AudioOutput\Config\LUFAConfig.h"></File><File path="Demos\Device\ClassDriver\AudioOutput\Config\AppConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Device\ClassDriver\DualVirtualSerial\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Device\ClassDriver\GenericHID\Config\LUFAConfig.h"></File><File path="Demos\Device\ClassDriver\GenericHID\Config\AppConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Device\ClassDriver\Joystick\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Device\ClassDriver\Keyboard\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Device\ClassDriver\KeyboardMouse\Config\LUFAConfig.h"></File></Folder><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="KeyboardMouseMultiReport"><Folder name="Config"><File path="Demos\Device\ClassDriver\KeyboardMouseMultiReport\Config\LUFAConfig.h"></File></Folder><File path="Demos\Device\ClassDriver\KeyboardMouseMultiReport\Descriptors.c"></File><File path="Demos\Device\ClassDriver\KeyboardMouseMultiReport\Descriptors.h"></File><File path="Demos\Device\ClassDriver\KeyboardMouseMultiReport\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\KeyboardMouseMultiReport\KeyboardMouseMultiReport.c"></File><File path="Demos\Device\ClassDriver\KeyboardMouseMultiReport\KeyboardMouseMultiReport.h"></File><File path="Demos\Device\ClassDriver\KeyboardMouseMultiReport\KeyboardMouseMultiReport.txt"></File><File path="Demos\Device\ClassDriver\KeyboardMouseMultiReport\makefile"></File></Folder><Folder name="MassStorage"><Folder name="Config"><File path="Demos\Device\ClassDriver\MassStorage\Config\LUFAConfig.h"></File><File path="Demos\Device\ClassDriver\MassStorage\Config\AppConfig.h"></File></Folder><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="Config"><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Config\LUFAConfig.h"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Config\AppConfig.h"></File></Folder><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></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"><Folder name="Config"><File path="Demos\Device\ClassDriver\MIDI\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Device\ClassDriver\Mouse\Config\LUFAConfig.h"></File></Folder><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="Config"><File path="Demos\Device\ClassDriver\RNDISEthernet\Config\LUFAConfig.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Config\AppConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Device\ClassDriver\VirtualSerial\Config\LUFAConfig.h"></File></Folder><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="VirtualSerialMassStorage"><Folder name="Config"><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\Config\LUFAConfig.h"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\Config\AppConfig.h"></File></Folder><Folder name="Lib"><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\Lib\DataflashManager.c"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\Lib\DataflashManager.h"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\Lib\SCSI.c"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\Lib\SCSI.h"></File></Folder><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\LUFA VirtualSerialMassStorage.inf"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\makefile"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\VirtualSerialMassStorage.c"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\VirtualSerialMassStorage.h"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\VirtualSerialMassStorage.txt"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\Descriptors.c"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\Descriptors.h"></File></Folder><Folder name="VirtualSerialMouse"><Folder name="Config"><File path="Demos\Device\ClassDriver\VirtualSerialMouse\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Device\LowLevel\AudioInput\Config\LUFAConfig.h"></File><File path="Demos\Device\LowLevel\AudioInput\Config\AppConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Device\LowLevel\AudioOutput\Config\LUFAConfig.h"></File><File path="Demos\Device\LowLevel\AudioOutput\Config\AppConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Device\LowLevel\DualVirtualSerial\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Device\LowLevel\GenericHID\Config\LUFAConfig.h"></File><File path="Demos\Device\LowLevel\GenericHID\Config\AppConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Device\LowLevel\Joystick\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Device\LowLevel\Keyboard\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Device\LowLevel\KeyboardMouse\Config\LUFAConfig.h"></File></Folder><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="Config"><File path="Demos\Device\LowLevel\MassStorage\Config\LUFAConfig.h"></File><File path="Demos\Device\LowLevel\MassStorage\Config\AppConfig.h"></File></Folder><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></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"><Folder name="Config"><File path="Demos\Device\LowLevel\MIDI\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Device\LowLevel\Mouse\Config\LUFAConfig.h"></File></Folder><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="Config"><File path="Demos\Device\LowLevel\RNDISEthernet\Config\LUFAConfig.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Config\AppConfig.h"></File></Folder><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\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"><Folder name="Config"><File path="Demos\Device\LowLevel\VirtualSerial\Config\LUFAConfig.h"></File></Folder><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="Config"><File path="Demos\Device\Incomplete\Sideshow\Config\LUFAConfig.h"></File></Folder><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 name="TestAndMeasurement"><Folder name="Config"><File path="Demos\Device\Incomplete\TestAndMeasurement\Config\LUFAConfig.h"></File></Folder><File path="Demos\Device\Incomplete\TestAndMeasurement\Descriptors.c"></File><File path="Demos\Device\Incomplete\TestAndMeasurement\Descriptors.h"></File><File path="Demos\Device\Incomplete\TestAndMeasurement\TestAndMeasurement.c"></File><File path="Demos\Device\Incomplete\TestAndMeasurement\TestAndMeasurement.h"></File><File path="Demos\Device\Incomplete\TestAndMeasurement\makefile"></File></Folder></Folder><File path="Demos\Device\makefile"></File></Folder><Folder name="Host"><Folder name="ClassDriver"><Folder name="AndroidAccessoryHost"><Folder name="Config"><File path="Demos\Host\ClassDriver\AndroidAccessoryHost\Config\LUFAConfig.h"></File></Folder><File path="Demos\Host\ClassDriver\AndroidAccessoryHost\AndroidAccessoryHost.c"></File><File path="Demos\Host\ClassDriver\AndroidAccessoryHost\AndroidAccessoryHost.h"></File><File path="Demos\Host\ClassDriver\AndroidAccessoryHost\AndroidAccessoryHost.txt"></File><File path="Demos\Host\ClassDriver\AndroidAccessoryHost\makefile"></File><File path="Demos\Host\ClassDriver\AndroidAccessoryHost\Doxygen.conf"></File></Folder><Folder name="AudioInputHost"><Folder name="Config"><File path="Demos\Host\ClassDriver\AudioInputHost\Config\LUFAConfig.h"></File></Folder><File path="Demos\Host\ClassDriver\AudioInputHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\AudioInputHost\makefile"></File><File path="Demos\Host\ClassDriver\AudioInputHost\AudioInputHost.c"></File><File path="Demos\Host\ClassDriver\AudioInputHost\AudioInputHost.h"></File><File path="Demos\Host\ClassDriver\AudioInputHost\AudioInputHost.txt"></File></Folder><Folder name="AudioOutputHost"><Folder name="Config"><File path="Demos\Host\ClassDriver\AudioOutputHost\Config\LUFAConfig.h"></File><File path="Demos\Host\ClassDriver\AudioOutputHost\Config\AppConfig.h"></File></Folder><File path="Demos\Host\ClassDriver\AudioOutputHost\AudioOutputHost.c"></File><File path="Demos\Host\ClassDriver\AudioOutputHost\AudioOutputHost.h"></File><File path="Demos\Host\ClassDriver\AudioOutputHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\AudioOutputHost\makefile"></File><File path="Demos\Host\ClassDriver\AudioOutputHost\AudioOutputHost.txt"></File></Folder><Folder name="JoystickHostWithParser"><Folder name="Config"><File path="Demos\Host\ClassDriver\JoystickHostWithParser\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Host\ClassDriver\KeyboardHost\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\Config\LUFAConfig.h"></File></Folder><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="MassStorageHost"><Folder name="Config"><File path="Demos\Host\ClassDriver\MassStorageHost\Config\LUFAConfig.h"></File></Folder><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="MIDIHost"><Folder name="Config"><File path="Demos\Host\ClassDriver\MIDIHost\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Host\ClassDriver\MouseHost\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Host\ClassDriver\MouseHostWithParser\Config\LUFAConfig.h"></File></Folder><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="PrinterHost"><Folder name="Config"><File path="Demos\Host\ClassDriver\PrinterHost\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Host\ClassDriver\RNDISEthernetHost\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Host\ClassDriver\StillImageHost\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Host\ClassDriver\VirtualSerialHost\Config\LUFAConfig.h"></File></Folder><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="AndroidAccessoryHost"><Folder name="Config"><File path="Demos\Host\LowLevel\AndroidAccessoryHost\Config\LUFAConfig.h"></File></Folder><Folder name="Lib"><File path="Demos\Host\LowLevel\AndroidAccessoryHost\Lib\AndroidAccessoryCommands.c"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\Lib\AndroidAccessoryCommands.h"></File></Folder><File path="Demos\Host\LowLevel\AndroidAccessoryHost\AndroidAccessoryHost.c"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\AndroidAccessoryHost.h"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\DeviceDescriptor.c"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\DeviceDescriptor.h"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\makefile"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\AndroidAccessoryHost.txt"></File></Folder><Folder name="AudioInputHost"><Folder name="Config"><File path="Demos\Host\LowLevel\AudioInputHost\Config\LUFAConfig.h"></File></Folder><File path="Demos\Host\LowLevel\AudioInputHost\AudioInputHost.c"></File><File path="Demos\Host\LowLevel\AudioInputHost\AudioInputHost.h"></File><File path="Demos\Host\LowLevel\AudioInputHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\AudioInputHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\AudioInputHost\makefile"></File><File path="Demos\Host\LowLevel\AudioInputHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\AudioInputHost\AudioInputHost.txt"></File></Folder><Folder name="AudioOutputHost"><Folder name="Config"><File path="Demos\Host\LowLevel\AudioOutputHost\Config\LUFAConfig.h"></File><File path="Demos\Host\LowLevel\AudioOutputHost\Config\AppConfig.h"></File></Folder><File path="Demos\Host\LowLevel\AudioOutputHost\AudioOutputHost.c"></File><File path="Demos\Host\LowLevel\AudioOutputHost\AudioOutputHost.h"></File><File path="Demos\Host\LowLevel\AudioOutputHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\AudioOutputHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\AudioOutputHost\makefile"></File><File path="Demos\Host\LowLevel\AudioOutputHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\AudioOutputHost\AudioOutputHost.txt"></File></Folder><Folder name="GenericHIDHost"><Folder name="Config"><File path="Demos\Host\LowLevel\GenericHIDHost\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Host\LowLevel\JoystickHostWithParser\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Host\LowLevel\KeyboardHost\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Host\LowLevel\KeyboardHostWithParser\Config\LUFAConfig.h"></File></Folder><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="Config"><File path="Demos\Host\LowLevel\MassStorageHost\Config\LUFAConfig.h"></File></Folder><Folder name="Lib"><File path="Demos\Host\LowLevel\MassStorageHost\Lib\MassStoreCommands.c"></File><File path="Demos\Host\LowLevel\MassStorageHost\Lib\MassStoreCommands.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"><Folder name="Config"><File path="Demos\Host\LowLevel\MIDIHost\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Host\LowLevel\MouseHost\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Host\LowLevel\MouseHostWithParser\Config\LUFAConfig.h"></File></Folder><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="Config"><File path="Demos\Host\LowLevel\PrinterHost\Config\LUFAConfig.h"></File></Folder><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="Config"><File path="Demos\Host\LowLevel\RNDISEthernetHost\Config\LUFAConfig.h"></File></Folder><Folder name="Lib"><File path="Demos\Host\LowLevel\RNDISEthernetHost\Lib\RNDISCommands.c"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\Lib\RNDISCommands.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="Config"><File path="Demos\Host\LowLevel\StillImageHost\Config\LUFAConfig.h"></File></Folder><Folder name="Lib"><File path="Demos\Host\LowLevel\StillImageHost\Lib\StillImageCommands.c"></File><File path="Demos\Host\LowLevel\StillImageHost\Lib\StillImageCommands.h"></File><File path="Demos\Host\LowLevel\StillImageHost\Lib\PIMACodes.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"><Folder name="Config"><File path="Demos\Host\LowLevel\VirtualSerialHost\Config\LUFAConfig.h"></File></Folder><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><File path="Demos\Host\makefile"></File></Folder><Folder name="DualRole"><Folder name="ClassDriver"><Folder name="MouseHostDevice"><Folder name="Config"><File path="Demos\DualRole\ClassDriver\MouseHostDevice\Config\LUFAConfig.h"></File></Folder><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="Build"><File path="LUFA\Build\lufa.avrdude.in"></File><File path="LUFA\Build\lufa.build.in"></File><File path="LUFA\Build\lufa.core.in"></File><File path="LUFA\Build\lufa.dfu.in"></File><File path="LUFA\Build\lufa.doxygen.in"></File><File path="LUFA\Build\lufa.sources.in"></File></Folder><Folder name="CodeTemplates"><Folder name="DriverStubs"><File path="LUFA\CodeTemplates\DriverStubs\Buttons.h"></File><File path="LUFA\CodeTemplates\DriverStubs\Dataflash.h"></File><File path="LUFA\CodeTemplates\DriverStubs\Joystick.h"></File><File path="LUFA\CodeTemplates\DriverStubs\LEDs.h"></File></Folder><File path="LUFA\CodeTemplates\makefile_template.avr8"></File><File path="LUFA\CodeTemplates\makefile_template.uc3"></File><File path="LUFA\CodeTemplates\makefile_template.xmega"></File><File path="LUFA\CodeTemplates\LUFAConfig.h"></File><File path="LUFA\CodeTemplates\makefile_template"></File></Folder><Folder name="Common"><File path="LUFA\Common\Common.h"></File><File path="LUFA\Common\BoardTypes.h"></File><File path="LUFA\Common\Attributes.h"></File><File path="LUFA\Common\Architectures.h"></File><File path="LUFA\Common\Endianness.h"></File><File path="LUFA\Common\CompilerSpecific.h"></File><File path="LUFA\Common\ArchitectureSpecific.h"></File></Folder><Folder name="DoxygenPages"><Folder name="Style"><File path="LUFA\DoxygenPages\Style\Footer.htm"></File><File path="LUFA\DoxygenPages\Style\Style.css"></File></Folder><Folder name="Images"><Folder name="AS5_AS6_Import"><File path="LUFA\DoxygenPages\Images\AS5_AS6_Import\AS5_AS6_Import_Step1.png"></File><File path="LUFA\DoxygenPages\Images\AS5_AS6_Import\AS5_AS6_Import_Step2.png"></File><File path="LUFA\DoxygenPages\Images\AS5_AS6_Import\AS5_AS6_Import_Step3.png"></File><File path="LUFA\DoxygenPages\Images\AS5_AS6_Import\AS5_AS6_Import_Step4.png"></File><File path="LUFA\DoxygenPages\Images\AS5_AS6_Import\AS5_AS6_Import_Step5_1.png"></File><File path="LUFA\DoxygenPages\Images\AS5_AS6_Import\AS5_AS6_Import_Step5_2.png"></File><File path="LUFA\DoxygenPages\Images\AS5_AS6_Import\AS5_AS6_Import_Step5_3.png"></File></Folder><File path="LUFA\DoxygenPages\Images\Author.jpg"></File><File path="LUFA\DoxygenPages\Images\LUFA.png"></File><File path="LUFA\DoxygenPages\Images\LUFA_thumb.png"></File></Folder><File path="LUFA\DoxygenPages\BuildingLinkableLibraries.txt"></File><File path="LUFA\DoxygenPages\ChangeLog.txt"></File><File path="LUFA\DoxygenPages\CompileTimeTokens.txt"></File><File path="LUFA\DoxygenPages\CompilingApps.txt"></File><File path="LUFA\DoxygenPages\ConfiguringApps.txt"></File><File path="LUFA\DoxygenPages\DevelopingWithLUFA.txt"></File><File path="LUFA\DoxygenPages\DeviceSupport.txt"></File><File path="LUFA\DoxygenPages\DirectorySummaries.txt"></File><File path="LUFA\DoxygenPages\Donating.txt"></File><File path="LUFA\DoxygenPages\FutureChanges.txt"></File><File path="LUFA\DoxygenPages\GettingStarted.txt"></File><File path="LUFA\DoxygenPages\Groups.txt"></File><File path="LUFA\DoxygenPages\LibraryResources.txt"></File><File path="LUFA\DoxygenPages\LicenseInfo.txt"></File><File path="LUFA\DoxygenPages\LUFAPoweredProjects.txt"></File><File path="LUFA\DoxygenPages\MainPage.txt"></File><File path="LUFA\DoxygenPages\MigrationInformation.txt"></File><File path="LUFA\DoxygenPages\ProgrammingApps.txt"></File><File path="LUFA\DoxygenPages\SoftwareBootloaderJump.txt"></File><File path="LUFA\DoxygenPages\VIDAndPIDValues.txt"></File><File path="LUFA\DoxygenPages\WritingBoardDrivers.txt"></File><File path="LUFA\DoxygenPages\ExportingLibrary.txt"></File><File path="LUFA\DoxygenPages\KnownIssues.txt"></File></Folder><Folder name="Drivers"><Folder name="USB"><Folder name="Class"><Folder name="Device"><File path="LUFA\Drivers\USB\Class\Device\AudioClassDevice.c"></File><File path="LUFA\Drivers\USB\Class\Device\AudioClassDevice.h"></File><File path="LUFA\Drivers\USB\Class\Device\CDCClassDevice.c"></File><File path="LUFA\Drivers\USB\Class\Device\CDCClassDevice.h"></File><File path="LUFA\Drivers\USB\Class\Device\HIDClassDevice.c"></File><File path="LUFA\Drivers\USB\Class\Device\HIDClassDevice.h"></File><File path="LUFA\Drivers\USB\Class\Device\MassStorageClassDevice.c"></File><File path="LUFA\Drivers\USB\Class\Device\MassStorageClassDevice.h"></File><File path="LUFA\Drivers\USB\Class\Device\MIDIClassDevice.c"></File><File path="LUFA\Drivers\USB\Class\Device\MIDIClassDevice.h"></File><File path="LUFA\Drivers\USB\Class\Device\RNDISClassDevice.c"></File><File path="LUFA\Drivers\USB\Class\Device\RNDISClassDevice.h"></File></Folder><Folder name="Host"><File path="LUFA\Drivers\USB\Class\Host\AudioClassHost.c"></File><File path="LUFA\Drivers\USB\Class\Host\AudioClassHost.h"></File><File path="LUFA\Drivers\USB\Class\Host\CDCClassHost.c"></File><File path="LUFA\Drivers\USB\Class\Host\CDCClassHost.h"></File><File path="LUFA\Drivers\USB\Class\Host\HIDClassHost.c"></File><File path="LUFA\Drivers\USB\Class\Host\HIDClassHost.h"></File><File path="LUFA\Drivers\USB\Class\Host\MassStorageClassHost.c"></File><File path="LUFA\Drivers\USB\Class\Host\MassStorageClassHost.h"></File><File path="LUFA\Drivers\USB\Class\Host\MIDIClassHost.c"></File><File path="LUFA\Drivers\USB\Class\Host\MIDIClassHost.h"></File><File path="LUFA\Drivers\USB\Class\Host\PrinterClassHost.c"></File><File path="LUFA\Drivers\USB\Class\Host\PrinterClassHost.h"></File><File path="LUFA\Drivers\USB\Class\Host\RNDISClassHost.c"></File><File path="LUFA\Drivers\USB\Class\Host\RNDISClassHost.h"></File><File path="LUFA\Drivers\USB\Class\Host\StillImageClassHost.c"></File><File path="LUFA\Drivers\USB\Class\Host\StillImageClassHost.h"></File><File path="LUFA\Drivers\USB\Class\Host\AndroidAccessoryClassHost.c"></File><File path="LUFA\Drivers\USB\Class\Host\AndroidAccessoryClassHost.h"></File></Folder><Folder name="Common"><File path="LUFA\Drivers\USB\Class\Common\AudioClassCommon.h"></File><File path="LUFA\Drivers\USB\Class\Common\CDCClassCommon.h"></File><File path="LUFA\Drivers\USB\Class\Common\HIDClassCommon.h"></File><File path="LUFA\Drivers\USB\Class\Common\HIDParser.c"></File><File path="LUFA\Drivers\USB\Class\Common\HIDParser.h"></File><File path="LUFA\Drivers\USB\Class\Common\HIDReportData.h"></File><File path="LUFA\Drivers\USB\Class\Common\MassStorageClassCommon.h"></File><File path="LUFA\Drivers\USB\Class\Common\MIDIClassCommon.h"></File><File path="LUFA\Drivers\USB\Class\Common\PrinterClassCommon.h"></File><File path="LUFA\Drivers\USB\Class\Common\RNDISClassCommon.h"></File><File path="LUFA\Drivers\USB\Class\Common\StillImageClassCommon.h"></File><File path="LUFA\Drivers\USB\Class\Common\AndroidAccessoryClassCommon.h"></File></Folder><File path="LUFA\Drivers\USB\Class\AudioClass.h"></File><File path="LUFA\Drivers\USB\Class\CDCClass.h"></File><File path="LUFA\Drivers\USB\Class\HIDClass.h"></File><File path="LUFA\Drivers\USB\Class\MassStorageClass.h"></File><File path="LUFA\Drivers\USB\Class\MIDIClass.h"></File><File path="LUFA\Drivers\USB\Class\PrinterClass.h"></File><File path="LUFA\Drivers\USB\Class\RNDISClass.h"></File><File path="LUFA\Drivers\USB\Class\StillImageClass.h"></File><File path="LUFA\Drivers\USB\Class\AndroidAccessoryClass.h"></File></Folder><Folder name="Core"><Folder name="AVR8"><Folder name="Template"><File path="LUFA\Drivers\USB\Core\AVR8\Template\Template_Endpoint_Control_R.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\Template\Template_Endpoint_Control_W.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\Template\Template_Endpoint_RW.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\Template\Template_Pipe_RW.c"></File></Folder><File path="LUFA\Drivers\USB\Core\AVR8\Device_AVR8.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\Device_AVR8.h"></File><File path="LUFA\Drivers\USB\Core\AVR8\Endpoint_AVR8.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\Endpoint_AVR8.h"></File><File path="LUFA\Drivers\USB\Core\AVR8\Host_AVR8.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\Host_AVR8.h"></File><File path="LUFA\Drivers\USB\Core\AVR8\OTG_AVR8.h"></File><File path="LUFA\Drivers\USB\Core\AVR8\Pipe_AVR8.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\Pipe_AVR8.h"></File><File path="LUFA\Drivers\USB\Core\AVR8\USBController_AVR8.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\USBController_AVR8.h"></File><File path="LUFA\Drivers\USB\Core\AVR8\USBInterrupt_AVR8.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\USBInterrupt_AVR8.h"></File><File path="LUFA\Drivers\USB\Core\AVR8\EndpointStream_AVR8.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\EndpointStream_AVR8.h"></File><File path="LUFA\Drivers\USB\Core\AVR8\PipeStream_AVR8.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\PipeStream_AVR8.h"></File></Folder><Folder name="UC3"><Folder name="Template"><File path="LUFA\Drivers\USB\Core\UC3\Template\Template_Endpoint_Control_R.c"></File><File path="LUFA\Drivers\USB\Core\UC3\Template\Template_Endpoint_Control_W.c"></File><File path="LUFA\Drivers\USB\Core\UC3\Template\Template_Endpoint_RW.c"></File><File path="LUFA\Drivers\USB\Core\UC3\Template\Template_Pipe_RW.c"></File></Folder><File path="LUFA\Drivers\USB\Core\UC3\Device_UC3.c"></File><File path="LUFA\Drivers\USB\Core\UC3\Device_UC3.h"></File><File path="LUFA\Drivers\USB\Core\UC3\Endpoint_UC3.c"></File><File path="LUFA\Drivers\USB\Core\UC3\Endpoint_UC3.h"></File><File path="LUFA\Drivers\USB\Core\UC3\Pipe_UC3.c"></File><File path="LUFA\Drivers\USB\Core\UC3\Pipe_UC3.h"></File><File path="LUFA\Drivers\USB\Core\UC3\USBController_UC3.c"></File><File path="LUFA\Drivers\USB\Core\UC3\USBController_UC3.h"></File><File path="LUFA\Drivers\USB\Core\UC3\USBInterrupt_UC3.c"></File><File path="LUFA\Drivers\USB\Core\UC3\USBInterrupt_UC3.h"></File><File path="LUFA\Drivers\USB\Core\UC3\Host_UC3.c"></File><File path="LUFA\Drivers\USB\Core\UC3\Host_UC3.h"></File><File path="LUFA\Drivers\USB\Core\UC3\EndpointStream_UC3.c"></File><File path="LUFA\Drivers\USB\Core\UC3\EndpointStream_UC3.h"></File><File path="LUFA\Drivers\USB\Core\UC3\PipeStream_UC3.c"></File><File path="LUFA\Drivers\USB\Core\UC3\PipeStream_UC3.h"></File></Folder><Folder name="XMEGA"><Folder name="Template"><File path="LUFA\Drivers\USB\Core\XMEGA\Template\Template_Endpoint_Control_R.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\Template\Template_Endpoint_Control_W.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\Template\Template_Endpoint_RW.c"></File></Folder><File path="LUFA\Drivers\USB\Core\XMEGA\Device_XMEGA.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\Device_XMEGA.h"></File><File path="LUFA\Drivers\USB\Core\XMEGA\Endpoint_XMEGA.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\Endpoint_XMEGA.h"></File><File path="LUFA\Drivers\USB\Core\XMEGA\EndpointStream_XMEGA.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\EndpointStream_XMEGA.h"></File><File path="LUFA\Drivers\USB\Core\XMEGA\Host_XMEGA.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\Pipe_XMEGA.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\PipeStream_XMEGA.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\USBController_XMEGA.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\USBController_XMEGA.h"></File><File path="LUFA\Drivers\USB\Core\XMEGA\USBInterrupt_XMEGA.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\USBInterrupt_XMEGA.h"></File></Folder><File path="LUFA\Drivers\USB\Core\ConfigDescriptor.c"></File><File path="LUFA\Drivers\USB\Core\ConfigDescriptor.h"></File><File path="LUFA\Drivers\USB\Core\DeviceStandardReq.c"></File><File path="LUFA\Drivers\USB\Core\DeviceStandardReq.h"></File><File path="LUFA\Drivers\USB\Core\Events.c"></File><File path="LUFA\Drivers\USB\Core\Events.h"></File><File path="LUFA\Drivers\USB\Core\HostStandardReq.c"></File><File path="LUFA\Drivers\USB\Core\HostStandardReq.h"></File><File path="LUFA\Drivers\USB\Core\StdDescriptors.h"></File><File path="LUFA\Drivers\USB\Core\StdRequestType.h"></File><File path="LUFA\Drivers\USB\Core\USBMode.h"></File><File path="LUFA\Drivers\USB\Core\USBTask.c"></File><File path="LUFA\Drivers\USB\Core\USBTask.h"></File><File path="LUFA\Drivers\USB\Core\Device.h"></File><File path="LUFA\Drivers\USB\Core\Endpoint.h"></File><File path="LUFA\Drivers\USB\Core\Host.h"></File><File path="LUFA\Drivers\USB\Core\Pipe.h"></File><File path="LUFA\Drivers\USB\Core\USBController.h"></File><File path="LUFA\Drivers\USB\Core\USBInterrupt.h"></File><File path="LUFA\Drivers\USB\Core\OTG.h"></File><File path="LUFA\Drivers\USB\Core\EndpointStream.h"></File><File path="LUFA\Drivers\USB\Core\PipeStream.h"></File></Folder><File path="LUFA\Drivers\USB\USB.h"></File></Folder><Folder name="Misc"><File path="LUFA\Drivers\Misc\TerminalCodes.h"></File><File path="LUFA\Drivers\Misc\RingBuffer.h"></File><File path="LUFA\Drivers\Misc\AT45DB321C.h"></File><File path="LUFA\Drivers\Misc\AT45DB642D.h"></File></Folder><Folder name="Board"><Folder name="AVR8"><Folder name="ADAFRUITU4"><File path="LUFA\Drivers\Board\AVR8\ADAFRUITU4\LEDs.h"></File></Folder><Folder name="ATAVRUSBRF01"><File path="LUFA\Drivers\Board\AVR8\ATAVRUSBRF01\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\ATAVRUSBRF01\LEDs.h"></File></Folder><Folder name="BENITO"><File path="LUFA\Drivers\Board\AVR8\BENITO\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\BENITO\LEDs.h"></File></Folder><Folder name="BIGMULTIO"><File path="LUFA\Drivers\Board\AVR8\BIGMULTIO\LEDs.h"></File></Folder><Folder name="BLACKCAT"><File path="LUFA\Drivers\Board\AVR8\BLACKCAT\LEDs.h"></File></Folder><Folder name="BUI"><File path="LUFA\Drivers\Board\AVR8\BUI\LEDs.h"></File></Folder><Folder name="BUMBLEB"><File path="LUFA\Drivers\Board\AVR8\BUMBLEB\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\BUMBLEB\Joystick.h"></File><File path="LUFA\Drivers\Board\AVR8\BUMBLEB\LEDs.h"></File></Folder><Folder name="CULV3"><File path="LUFA\Drivers\Board\AVR8\CULV3\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\CULV3\LEDs.h"></File></Folder><Folder name="DUCE"><File path="LUFA\Drivers\Board\AVR8\DUCE\LEDs.h"></File></Folder><Folder name="EVK527"><File path="LUFA\Drivers\Board\AVR8\EVK527\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\EVK527\Dataflash.h"></File><File path="LUFA\Drivers\Board\AVR8\EVK527\Joystick.h"></File><File path="LUFA\Drivers\Board\AVR8\EVK527\LEDs.h"></File></Folder><Folder name="JMDBU2"><File path="LUFA\Drivers\Board\AVR8\JMDBU2\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\JMDBU2\LEDs.h"></File></Folder><Folder name="MAXIMUS"><File path="LUFA\Drivers\Board\AVR8\MAXIMUS\LEDs.h"></File></Folder><Folder name="MICROPENDOUS"><File path="LUFA\Drivers\Board\AVR8\MICROPENDOUS\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\MICROPENDOUS\LEDs.h"></File></Folder><Folder name="MICROSIN162"><File path="LUFA\Drivers\Board\AVR8\MICROSIN162\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\MICROSIN162\LEDs.h"></File></Folder><Folder name="MINIMUS"><File path="LUFA\Drivers\Board\AVR8\MINIMUS\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\MINIMUS\LEDs.h"></File></Folder><Folder name="MULTIO"><File path="LUFA\Drivers\Board\AVR8\MULTIO\LEDs.h"></File></Folder><Folder name="OLIMEX32U4"><File path="LUFA\Drivers\Board\AVR8\OLIMEX32U4\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\OLIMEX32U4\LEDs.h"></File></Folder><Folder name="OLIMEX162"><File path="LUFA\Drivers\Board\AVR8\OLIMEX162\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\OLIMEX162\LEDs.h"></File></Folder><Folder name="OLIMEXT32U4"><File path="LUFA\Drivers\Board\AVR8\OLIMEXT32U4\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\OLIMEXT32U4\LEDs.h"></File></Folder><Folder name="RZUSBSTICK"><File path="LUFA\Drivers\Board\AVR8\RZUSBSTICK\LEDs.h"></File></Folder><Folder name="SPARKFUN8U2"><File path="LUFA\Drivers\Board\AVR8\SPARKFUN8U2\LEDs.h"></File></Folder><Folder name="STK525"><File path="LUFA\Drivers\Board\AVR8\STK525\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\STK525\Dataflash.h"></File><File path="LUFA\Drivers\Board\AVR8\STK525\Joystick.h"></File><File path="LUFA\Drivers\Board\AVR8\STK525\LEDs.h"></File></Folder><Folder name="STK526"><File path="LUFA\Drivers\Board\AVR8\STK526\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\STK526\Dataflash.h"></File><File path="LUFA\Drivers\Board\AVR8\STK526\Joystick.h"></File><File path="LUFA\Drivers\Board\AVR8\STK526\LEDs.h"></File></Folder><Folder name="TEENSY"><File path="LUFA\Drivers\Board\AVR8\TEENSY\LEDs.h"></File></Folder><Folder name="TUL"><File path="LUFA\Drivers\Board\AVR8\TUL\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\TUL\LEDs.h"></File></Folder><Folder name="UDIP"><File path="LUFA\Drivers\Board\AVR8\UDIP\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\UDIP\LEDs.h"></File></Folder><Folder name="UNO"><File path="LUFA\Drivers\Board\AVR8\UNO\LEDs.h"></File></Folder><Folder name="USB2AX"><File path="LUFA\Drivers\Board\AVR8\USB2AX\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\USB2AX\LEDs.h"></File></Folder><Folder name="USBFOO"><File path="LUFA\Drivers\Board\AVR8\USBFOO\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\USBFOO\LEDs.h"></File></Folder><Folder name="USBKEY"><File path="LUFA\Drivers\Board\AVR8\USBKEY\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\USBKEY\Dataflash.h"></File><File path="LUFA\Drivers\Board\AVR8\USBKEY\Joystick.h"></File><File path="LUFA\Drivers\Board\AVR8\USBKEY\LEDs.h"></File></Folder><Folder name="USBTINYMKII"><File path="LUFA\Drivers\Board\AVR8\USBTINYMKII\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\USBTINYMKII\LEDs.h"></File></Folder><Folder name="XPLAIN"><File path="LUFA\Drivers\Board\AVR8\XPLAIN\Dataflash.h"></File><File path="LUFA\Drivers\Board\AVR8\XPLAIN\LEDs.h"></File></Folder></Folder><Folder name="UC3"><Folder name="EVK1100"><File path="LUFA\Drivers\Board\UC3\EVK1100\Buttons.h"></File><File path="LUFA\Drivers\Board\UC3\EVK1100\Joystick.h"></File><File path="LUFA\Drivers\Board\UC3\EVK1100\LEDs.h"></File></Folder><Folder name="EVK1101"><File path="LUFA\Drivers\Board\UC3\EVK1101\Buttons.h"></File><File path="LUFA\Drivers\Board\UC3\EVK1101\Joystick.h"></File><File path="LUFA\Drivers\Board\UC3\EVK1101\LEDs.h"></File></Folder><Folder name="EVK1104"><File path="LUFA\Drivers\Board\UC3\EVK1104\Buttons.h"></File><File path="LUFA\Drivers\Board\UC3\EVK1104\LEDs.h"></File></Folder></Folder><Folder name="XMEGA"><Folder name="A3BU_XPLAINED"><File path="LUFA\Drivers\Board\XMEGA\A3BU_XPLAINED\Buttons.h"></File><File path="LUFA\Drivers\Board\XMEGA\A3BU_XPLAINED\LEDs.h"></File><File path="LUFA\Drivers\Board\XMEGA\A3BU_XPLAINED\Dataflash.h"></File></Folder><Folder name="B1_XPLAINED"><File path="LUFA\Drivers\Board\XMEGA\B1_XPLAINED\Buttons.h"></File><File path="LUFA\Drivers\Board\XMEGA\B1_XPLAINED\LEDs.h"></File><File path="LUFA\Drivers\Board\XMEGA\B1_XPLAINED\Dataflash.h"></File></Folder></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="AVR8"><File path="LUFA\Drivers\Peripheral\AVR8\ADC_AVR8.h"></File><File path="LUFA\Drivers\Peripheral\AVR8\Serial_AVR8.c"></File><File path="LUFA\Drivers\Peripheral\AVR8\Serial_AVR8.h"></File><File path="LUFA\Drivers\Peripheral\AVR8\SPI_AVR8.h"></File><File path="LUFA\Drivers\Peripheral\AVR8\TWI_AVR8.c"></File><File path="LUFA\Drivers\Peripheral\AVR8\TWI_AVR8.h"></File><File path="LUFA\Drivers\Peripheral\AVR8\SerialSPI_AVR8.h"></File></Folder><Folder name="UC3"></Folder><Folder name="XMEGA"><File path="LUFA\Drivers\Peripheral\XMEGA\SPI_XMEGA.h"></File><File path="LUFA\Drivers\Peripheral\XMEGA\Serial_XMEGA.c"></File><File path="LUFA\Drivers\Peripheral\XMEGA\Serial_XMEGA.h"></File><File path="LUFA\Drivers\Peripheral\XMEGA\SerialSPI_XMEGA.h"></File></Folder><File path="LUFA\Drivers\Peripheral\ADC.h"></File><File path="LUFA\Drivers\Peripheral\TWI.h"></File><File path="LUFA\Drivers\Peripheral\Serial.h"></File><File path="LUFA\Drivers\Peripheral\SPI.h"></File><File path="LUFA\Drivers\Peripheral\SerialSPI.h"></File></Folder></Folder><Folder name="Platform"><Folder name="AVR8"></Folder><Folder name="UC3"><File path="LUFA\Platform\UC3\InterruptManagement.h"></File><File path="LUFA\Platform\UC3\InterruptManagement.c"></File><File path="LUFA\Platform\UC3\Exception.S"></File><File path="LUFA\Platform\UC3\ClockManagement.h"></File></Folder><Folder name="XMEGA"><File path="LUFA\Platform\XMEGA\ClockManagement.h"></File></Folder></Folder><File path="LUFA\makefile"></File><File path="LUFA\Version.h"></File><File path="LUFA\Doxygen.conf"></File><File path="LUFA\License.txt"></File></Folder><Folder name="Bootloaders"><Folder name="CDC"><Folder name="Config"><File path="Bootloaders\CDC\Config\LUFAConfig.h"></File><File path="Bootloaders\CDC\Config\AppConfig.h"></File></Folder><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><File path="Bootloaders\CDC\BootloaderAPI.c"></File><File path="Bootloaders\CDC\BootloaderAPI.h"></File><File path="Bootloaders\CDC\BootloaderAPITable.S"></File></Folder><Folder name="DFU"><Folder name="Config"><File path="Bootloaders\DFU\Config\LUFAConfig.h"></File><File path="Bootloaders\DFU\Config\AppConfig.h"></File></Folder><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><File path="Bootloaders\DFU\BootloaderAPI.c"></File><File path="Bootloaders\DFU\BootloaderAPI.h"></File><File path="Bootloaders\DFU\BootloaderAPITable.S"></File></Folder><Folder name="HID"><Folder name="Config"><File path="Bootloaders\HID\Config\LUFAConfig.h"></File></Folder><Folder name="HostLoaderApp"><File path="Bootloaders\HID\HostLoaderApp\gpl3.txt"></File><File path="Bootloaders\HID\HostLoaderApp\Makefile"></File><File path="Bootloaders\HID\HostLoaderApp\Makefile.bsd"></File><File path="Bootloaders\HID\HostLoaderApp\hid_bootloader_cli.c"></File></Folder><File path="Bootloaders\HID\Descriptors.c"></File><File path="Bootloaders\HID\Descriptors.h"></File><File path="Bootloaders\HID\makefile"></File><File path="Bootloaders\HID\BootloaderHID.txt"></File><File path="Bootloaders\HID\BootloaderHID.c"></File><File path="Bootloaders\HID\BootloaderHID.h"></File><File path="Bootloaders\HID\Doxygen.conf"></File></Folder><File path="Bootloaders\makefile"></File></Folder><Folder name="Projects"><Folder name="AVRISP-MKII"><Folder name="Config"><File path="Projects\AVRISP-MKII\Config\AppConfig.h"></File><File path="Projects\AVRISP-MKII\Config\LUFAConfig.h"></File></Folder><Folder name="Lib"><Folder name="ISP"><File path="Projects\AVRISP-MKII\Lib\ISP\ISPProtocol.c"></File><File path="Projects\AVRISP-MKII\Lib\ISP\ISPProtocol.h"></File><File path="Projects\AVRISP-MKII\Lib\ISP\ISPTarget.c"></File><File path="Projects\AVRISP-MKII\Lib\ISP\ISPTarget.h"></File></Folder><Folder name="XPROG"><File path="Projects\AVRISP-MKII\Lib\XPROG\TINYNVM.c"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\TINYNVM.h"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\XMEGANVM.c"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\XMEGANVM.h"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\XPROGProtocol.c"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\XPROGProtocol.h"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\XPROGTarget.c"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\XPROGTarget.h"></File></Folder><File path="Projects\AVRISP-MKII\Lib\V2Protocol.c"></File><File path="Projects\AVRISP-MKII\Lib\V2Protocol.h"></File><File path="Projects\AVRISP-MKII\Lib\V2ProtocolConstants.h"></File><File path="Projects\AVRISP-MKII\Lib\V2ProtocolParams.c"></File><File path="Projects\AVRISP-MKII\Lib\V2ProtocolParams.h"></File></Folder><File path="Projects\AVRISP-MKII\Doxygen.conf"></File><File path="Projects\AVRISP-MKII\makefile"></File><File path="Projects\AVRISP-MKII\AVRISP-MKII.c"></File><File path="Projects\AVRISP-MKII\AVRISP-MKII.h"></File><File path="Projects\AVRISP-MKII\AVRISP-MKII.txt"></File><File path="Projects\AVRISP-MKII\AVRISPDescriptors.c"></File><File path="Projects\AVRISP-MKII\AVRISPDescriptors.h"></File></Folder><Folder name="Benito"><Folder name="Config"><File path="Projects\Benito\Config\LUFAConfig.h"></File><File path="Projects\Benito\Config\AppConfig.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="HIDReportViewer"><Folder name="Config"><File path="Projects\HIDReportViewer\Config\LUFAConfig.h"></File></Folder><File path="Projects\HIDReportViewer\HIDReportViewer.c"></File><File path="Projects\HIDReportViewer\HIDReportViewer.h"></File><File path="Projects\HIDReportViewer\makefile"></File><File path="Projects\HIDReportViewer\HIDReportViewer.txt"></File><File path="Projects\HIDReportViewer\Doxygen.conf"></File></Folder><Folder name="LEDNotifier"><Folder name="Config"><File path="Projects\LEDNotifier\Config\LUFAConfig.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="Config"><File path="Projects\Magstripe\Config\AppConfig.h"></File><File path="Projects\Magstripe\Config\LUFAConfig.h"></File></Folder><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="MediaController"><Folder name="Config"><File path="Projects\MediaController\Config\LUFAConfig.h"></File></Folder><File path="Projects\MediaController\Descriptors.c"></File><File path="Projects\MediaController\Descriptors.h"></File><File path="Projects\MediaController\Doxygen.conf"></File><File path="Projects\MediaController\makefile"></File><File path="Projects\MediaController\MediaController.c"></File><File path="Projects\MediaController\MediaController.h"></File><File path="Projects\MediaController\MediaController.txt"></File></Folder><Folder name="MIDIToneGenerator"><Folder name="Config"><File path="Projects\MIDIToneGenerator\Config\LUFAConfig.h"></File><File path="Projects\MIDIToneGenerator\Config\AppConfig.h"></File></Folder><File path="Projects\MIDIToneGenerator\Descriptors.c"></File><File path="Projects\MIDIToneGenerator\Descriptors.h"></File><File path="Projects\MIDIToneGenerator\makefile"></File><File path="Projects\MIDIToneGenerator\MIDIToneGenerator.c"></File><File path="Projects\MIDIToneGenerator\MIDIToneGenerator.h"></File><File path="Projects\MIDIToneGenerator\MIDIToneGenerator.txt"></File><File path="Projects\MIDIToneGenerator\Doxygen.conf"></File></Folder><Folder name="MissileLauncher"><Folder name="Config"><File path="Projects\MissileLauncher\Config\LUFAConfig.h"></File></Folder><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="RelayBoard"><Folder name="Config"><File path="Projects\RelayBoard\Config\LUFAConfig.h"></File></Folder><File path="Projects\RelayBoard\Descriptors.c"></File><File path="Projects\RelayBoard\Descriptors.h"></File><File path="Projects\RelayBoard\Doxygen.conf"></File><File path="Projects\RelayBoard\makefile"></File><File path="Projects\RelayBoard\RelayBoard.c"></File><File path="Projects\RelayBoard\RelayBoard.h"></File><File path="Projects\RelayBoard\RelayBoard.txt"></File></Folder><Folder name="SerialToLCD"><Folder name="Config"><File path="Projects\SerialToLCD\Config\LUFAConfig.h"></File></Folder><Folder name="Lib"><File path="Projects\SerialToLCD\Lib\HD44780.c"></File><File path="Projects\SerialToLCD\Lib\HD44780.h"></File></Folder><File path="Projects\SerialToLCD\Descriptors.c"></File><File path="Projects\SerialToLCD\Descriptors.h"></File><File path="Projects\SerialToLCD\makefile"></File><File path="Projects\SerialToLCD\SerialToLCD.c"></File><File path="Projects\SerialToLCD\SerialToLCD.h"></File><File path="Projects\SerialToLCD\SerialToLCD.txt"></File><File path="Projects\SerialToLCD\Doxygen.conf"></File></Folder><Folder name="TempDataLogger"><Folder name="Config"><File path="Projects\TempDataLogger\Config\LUFAConfig.h"></File><File path="Projects\TempDataLogger\Config\AppConfig.h"></File></Folder><Folder name="Lib"><Folder name="FATFs"><File path="Projects\TempDataLogger\Lib\FATFs\diskio.c"></File><File path="Projects\TempDataLogger\Lib\FATFs\diskio.h"></File><File path="Projects\TempDataLogger\Lib\FATFs\ff.c"></File><File path="Projects\TempDataLogger\Lib\FATFs\ff.h"></File><File path="Projects\TempDataLogger\Lib\FATFs\ffconf.h"></File><File path="Projects\TempDataLogger\Lib\FATFs\integer.h"></File></Folder><File path="Projects\TempDataLogger\Lib\DataflashManager.c"></File><File path="Projects\TempDataLogger\Lib\DataflashManager.h"></File><File path="Projects\TempDataLogger\Lib\DS1307.c"></File><File path="Projects\TempDataLogger\Lib\DS1307.h"></File><File path="Projects\TempDataLogger\Lib\SCSI.c"></File><File path="Projects\TempDataLogger\Lib\SCSI.h"></File></Folder><Folder name="TempLogHostApp"><File path="Projects\TempDataLogger\TempLogHostApp\DataLoggerSettings.cs"></File><File path="Projects\TempDataLogger\TempLogHostApp\DataLoggerSettings.Designer.cs"></File><File path="Projects\TempDataLogger\TempLogHostApp\DataLoggerSettings.resx"></File><File path="Projects\TempDataLogger\TempLogHostApp\Program.cs"></File><File path="Projects\TempDataLogger\TempLogHostApp\TempLoggerHostApp.csproj"></File></Folder><File path="Projects\TempDataLogger\Descriptors.c"></File><File path="Projects\TempDataLogger\Descriptors.h"></File><File path="Projects\TempDataLogger\Doxygen.conf"></File><File path="Projects\TempDataLogger\makefile"></File><File path="Projects\TempDataLogger\TempDataLogger.c"></File><File path="Projects\TempDataLogger\TempDataLogger.h"></File><File path="Projects\TempDataLogger\TemperatureDataLogger.txt"></File></Folder><Folder name="USBtoSerial"><Folder name="Config"><File path="Projects\USBtoSerial\Config\LUFAConfig.h"></File></Folder><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><File path="Projects\USBtoSerial\Descriptors.c"></File></Folder><Folder name="Webserver"><Folder name="Config"><File path="Projects\Webserver\Config\LUFAConfig.h"></File><File path="Projects\Webserver\Config\AppConfig.h"></File></Folder><Folder name="Lib"><Folder name="uip"><File path="Projects\Webserver\Lib\uip\clock.c"></File><File path="Projects\Webserver\Lib\uip\clock.h"></File><File path="Projects\Webserver\Lib\uip\timer.c"></File><File path="Projects\Webserver\Lib\uip\timer.h"></File><File path="Projects\Webserver\Lib\uip\uip.c"></File><File path="Projects\Webserver\Lib\uip\uip.h"></File><File path="Projects\Webserver\Lib\uip\uip_arp.c"></File><File path="Projects\Webserver\Lib\uip\uip_arp.h"></File><File path="Projects\Webserver\Lib\uip\uipopt.h"></File><File path="Projects\Webserver\Lib\uip\uip-split.c"></File><File path="Projects\Webserver\Lib\uip\uip-split.h"></File></Folder><Folder name="FATFs"><File path="Projects\Webserver\Lib\FATFs\diskio.c"></File><File path="Projects\Webserver\Lib\FATFs\diskio.h"></File><File path="Projects\Webserver\Lib\FATFs\ff.c"></File><File path="Projects\Webserver\Lib\FATFs\ff.h"></File><File path="Projects\Webserver\Lib\FATFs\ffconf.h"></File><File path="Projects\Webserver\Lib\FATFs\integer.h"></File></Folder><File path="Projects\Webserver\Lib\DataflashManager.c"></File><File path="Projects\Webserver\Lib\DataflashManager.h"></File><File path="Projects\Webserver\Lib\uIPManagement.c"></File><File path="Projects\Webserver\Lib\uIPManagement.h"></File><File path="Projects\Webserver\Lib\HTTPServerApp.c"></File><File path="Projects\Webserver\Lib\HTTPServerApp.h"></File><File path="Projects\Webserver\Lib\SCSI.c"></File><File path="Projects\Webserver\Lib\SCSI.h"></File><File path="Projects\Webserver\Lib\TELNETServerApp.c"></File><File path="Projects\Webserver\Lib\TELNETServerApp.h"></File><File path="Projects\Webserver\Lib\DHCPClientApp.c"></File><File path="Projects\Webserver\Lib\DHCPClientApp.h"></File><File path="Projects\Webserver\Lib\DHCPCommon.h"></File><File path="Projects\Webserver\Lib\DHCPServerApp.c"></File><File path="Projects\Webserver\Lib\DHCPServerApp.h"></File><File path="Projects\Webserver\Lib\DHCPCommon.c"></File></Folder><File path="Projects\Webserver\makefile"></File><File path="Projects\Webserver\Webserver.c"></File><File path="Projects\Webserver\Webserver.h"></File><File path="Projects\Webserver\Doxygen.conf"></File><File path="Projects\Webserver\Webserver.txt"></File><File path="Projects\Webserver\Descriptors.c"></File><File path="Projects\Webserver\Descriptors.h"></File><File path="Projects\Webserver\USBHostMode.c"></File><File path="Projects\Webserver\USBHostMode.h"></File><File path="Projects\Webserver\USBDeviceMode.c"></File><File path="Projects\Webserver\USBDeviceMode.h"></File><File path="Projects\Webserver\LUFA Webserver RNDIS.inf"></File></Folder><Folder name="XPLAINBridge"><Folder name="Config"><File path="Projects\XPLAINBridge\Config\AppConfig.h"></File><File path="Projects\XPLAINBridge\Config\LUFAConfig.h"></File></Folder><Folder name="Lib"><File path="Projects\XPLAINBridge\Lib\SoftUART.c"></File><File path="Projects\XPLAINBridge\Lib\SoftUART.h"></File></Folder><File path="Projects\XPLAINBridge\XPLAINBridge.txt"></File><File path="Projects\XPLAINBridge\XPLAINBridge.h"></File><File path="Projects\XPLAINBridge\XPLAINBridge.c"></File><File path="Projects\XPLAINBridge\USARTDescriptors.h"></File><File path="Projects\XPLAINBridge\USARTDescriptors.c"></File><File path="Projects\XPLAINBridge\makefile"></File><File path="Projects\XPLAINBridge\LUFA XPLAIN Bridge.inf"></File><File path="Projects\XPLAINBridge\Doxygen.conf"></File></Folder><File path="Projects\makefile"></File></Folder><Folder name="BuildTests"><Folder name="BoardDriverTest"><Folder name="Board"><File path="BuildTests\BoardDriverTest\Board\Buttons.h"></File><File path="BuildTests\BoardDriverTest\Board\Dataflash.h"></File><File path="BuildTests\BoardDriverTest\Board\Joystick.h"></File><File path="BuildTests\BoardDriverTest\Board\LEDs.h"></File></Folder><File path="BuildTests\BoardDriverTest\BoardDeviceMap.cfg"></File><File path="BuildTests\BoardDriverTest\makefile"></File><File path="BuildTests\BoardDriverTest\makefile.avr8"></File><File path="BuildTests\BoardDriverTest\makefile.uc3"></File><File path="BuildTests\BoardDriverTest\makefile.xmega"></File><File path="BuildTests\BoardDriverTest\Test.c"></File></Folder><Folder name="BootloaderTest"><File path="BuildTests\BootloaderTest\BootloaderDeviceMap.cfg"></File><File path="BuildTests\BootloaderTest\makefile"></File></Folder><Folder name="ModuleTest"><File path="BuildTests\ModuleTest\makefile"></File><File path="BuildTests\ModuleTest\makefile.avr8"></File><File path="BuildTests\ModuleTest\makefile.uc3"></File><File path="BuildTests\ModuleTest\makefile.xmega"></File><File path="BuildTests\ModuleTest\Modules.h"></File><File path="BuildTests\ModuleTest\Test_C.c"></File><File path="BuildTests\ModuleTest\Test_CPP.cpp"></File><File path="BuildTests\ModuleTest\Dummy.S"></File></Folder><Folder name="SingleUSBModeTest"><File path="BuildTests\SingleUSBModeTest\makefile"></File><File path="BuildTests\SingleUSBModeTest\makefile.avr8"></File><File path="BuildTests\SingleUSBModeTest\makefile.uc3"></File><File path="BuildTests\SingleUSBModeTest\makefile.xmega"></File><File path="BuildTests\SingleUSBModeTest\Test.c"></File><File path="BuildTests\SingleUSBModeTest\Dummy.S"></File></Folder><Folder name="StaticAnalysisTest"><File path="BuildTests\StaticAnalysisTest\makefile"></File></Folder><File path="BuildTests\makefile"></File></Folder><Folder name="Maintenance"><File path="Maintenance\makefile"></File><File path="Maintenance\AS4Template.aps"></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"><Folder name="Config"><File path="Demos\Device\ClassDriver\AudioInput\Config\LUFAConfig.h"></File><File path="Demos\Device\ClassDriver\AudioInput\Config\AppConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Device\ClassDriver\AudioOutput\Config\LUFAConfig.h"></File><File path="Demos\Device\ClassDriver\AudioOutput\Config\AppConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Device\ClassDriver\DualVirtualSerial\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Device\ClassDriver\GenericHID\Config\LUFAConfig.h"></File><File path="Demos\Device\ClassDriver\GenericHID\Config\AppConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Device\ClassDriver\Joystick\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Device\ClassDriver\Keyboard\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Device\ClassDriver\KeyboardMouse\Config\LUFAConfig.h"></File></Folder><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="KeyboardMouseMultiReport"><Folder name="Config"><File path="Demos\Device\ClassDriver\KeyboardMouseMultiReport\Config\LUFAConfig.h"></File></Folder><File path="Demos\Device\ClassDriver\KeyboardMouseMultiReport\Descriptors.c"></File><File path="Demos\Device\ClassDriver\KeyboardMouseMultiReport\Descriptors.h"></File><File path="Demos\Device\ClassDriver\KeyboardMouseMultiReport\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\KeyboardMouseMultiReport\KeyboardMouseMultiReport.c"></File><File path="Demos\Device\ClassDriver\KeyboardMouseMultiReport\KeyboardMouseMultiReport.h"></File><File path="Demos\Device\ClassDriver\KeyboardMouseMultiReport\KeyboardMouseMultiReport.txt"></File><File path="Demos\Device\ClassDriver\KeyboardMouseMultiReport\makefile"></File></Folder><Folder name="MassStorage"><Folder name="Config"><File path="Demos\Device\ClassDriver\MassStorage\Config\LUFAConfig.h"></File><File path="Demos\Device\ClassDriver\MassStorage\Config\AppConfig.h"></File></Folder><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="Config"><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Config\LUFAConfig.h"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Config\AppConfig.h"></File></Folder><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></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"><Folder name="Config"><File path="Demos\Device\ClassDriver\MIDI\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Device\ClassDriver\Mouse\Config\LUFAConfig.h"></File></Folder><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="Config"><File path="Demos\Device\ClassDriver\RNDISEthernet\Config\LUFAConfig.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Config\AppConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Device\ClassDriver\VirtualSerial\Config\LUFAConfig.h"></File></Folder><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="VirtualSerialMassStorage"><Folder name="Config"><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\Config\LUFAConfig.h"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\Config\AppConfig.h"></File></Folder><Folder name="Lib"><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\Lib\DataflashManager.c"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\Lib\DataflashManager.h"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\Lib\SCSI.c"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\Lib\SCSI.h"></File></Folder><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\LUFA VirtualSerialMassStorage.inf"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\makefile"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\VirtualSerialMassStorage.c"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\VirtualSerialMassStorage.h"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\VirtualSerialMassStorage.txt"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\Descriptors.c"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\Descriptors.h"></File></Folder><Folder name="VirtualSerialMouse"><Folder name="Config"><File path="Demos\Device\ClassDriver\VirtualSerialMouse\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Device\LowLevel\AudioInput\Config\LUFAConfig.h"></File><File path="Demos\Device\LowLevel\AudioInput\Config\AppConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Device\LowLevel\AudioOutput\Config\LUFAConfig.h"></File><File path="Demos\Device\LowLevel\AudioOutput\Config\AppConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Device\LowLevel\DualVirtualSerial\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Device\LowLevel\GenericHID\Config\LUFAConfig.h"></File><File path="Demos\Device\LowLevel\GenericHID\Config\AppConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Device\LowLevel\Joystick\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Device\LowLevel\Keyboard\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Device\LowLevel\KeyboardMouse\Config\LUFAConfig.h"></File></Folder><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="Config"><File path="Demos\Device\LowLevel\MassStorage\Config\LUFAConfig.h"></File><File path="Demos\Device\LowLevel\MassStorage\Config\AppConfig.h"></File></Folder><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></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"><Folder name="Config"><File path="Demos\Device\LowLevel\MIDI\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Device\LowLevel\Mouse\Config\LUFAConfig.h"></File></Folder><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="Config"><File path="Demos\Device\LowLevel\RNDISEthernet\Config\LUFAConfig.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Config\AppConfig.h"></File></Folder><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\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"><Folder name="Config"><File path="Demos\Device\LowLevel\VirtualSerial\Config\LUFAConfig.h"></File></Folder><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="Config"><File path="Demos\Device\Incomplete\Sideshow\Config\LUFAConfig.h"></File></Folder><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 name="TestAndMeasurement"><Folder name="Config"><File path="Demos\Device\Incomplete\TestAndMeasurement\Config\LUFAConfig.h"></File></Folder><File path="Demos\Device\Incomplete\TestAndMeasurement\Descriptors.c"></File><File path="Demos\Device\Incomplete\TestAndMeasurement\Descriptors.h"></File><File path="Demos\Device\Incomplete\TestAndMeasurement\TestAndMeasurement.c"></File><File path="Demos\Device\Incomplete\TestAndMeasurement\TestAndMeasurement.h"></File><File path="Demos\Device\Incomplete\TestAndMeasurement\makefile"></File></Folder></Folder><File path="Demos\Device\makefile"></File></Folder><Folder name="Host"><Folder name="ClassDriver"><Folder name="AndroidAccessoryHost"><Folder name="Config"><File path="Demos\Host\ClassDriver\AndroidAccessoryHost\Config\LUFAConfig.h"></File></Folder><File path="Demos\Host\ClassDriver\AndroidAccessoryHost\AndroidAccessoryHost.c"></File><File path="Demos\Host\ClassDriver\AndroidAccessoryHost\AndroidAccessoryHost.h"></File><File path="Demos\Host\ClassDriver\AndroidAccessoryHost\AndroidAccessoryHost.txt"></File><File path="Demos\Host\ClassDriver\AndroidAccessoryHost\makefile"></File><File path="Demos\Host\ClassDriver\AndroidAccessoryHost\Doxygen.conf"></File></Folder><Folder name="AudioInputHost"><Folder name="Config"><File path="Demos\Host\ClassDriver\AudioInputHost\Config\LUFAConfig.h"></File></Folder><File path="Demos\Host\ClassDriver\AudioInputHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\AudioInputHost\makefile"></File><File path="Demos\Host\ClassDriver\AudioInputHost\AudioInputHost.c"></File><File path="Demos\Host\ClassDriver\AudioInputHost\AudioInputHost.h"></File><File path="Demos\Host\ClassDriver\AudioInputHost\AudioInputHost.txt"></File></Folder><Folder name="AudioOutputHost"><Folder name="Config"><File path="Demos\Host\ClassDriver\AudioOutputHost\Config\LUFAConfig.h"></File><File path="Demos\Host\ClassDriver\AudioOutputHost\Config\AppConfig.h"></File></Folder><File path="Demos\Host\ClassDriver\AudioOutputHost\AudioOutputHost.c"></File><File path="Demos\Host\ClassDriver\AudioOutputHost\AudioOutputHost.h"></File><File path="Demos\Host\ClassDriver\AudioOutputHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\AudioOutputHost\makefile"></File><File path="Demos\Host\ClassDriver\AudioOutputHost\AudioOutputHost.txt"></File></Folder><Folder name="JoystickHostWithParser"><Folder name="Config"><File path="Demos\Host\ClassDriver\JoystickHostWithParser\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Host\ClassDriver\KeyboardHost\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\Config\LUFAConfig.h"></File></Folder><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="MassStorageHost"><Folder name="Config"><File path="Demos\Host\ClassDriver\MassStorageHost\Config\LUFAConfig.h"></File></Folder><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="MIDIHost"><Folder name="Config"><File path="Demos\Host\ClassDriver\MIDIHost\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Host\ClassDriver\MouseHost\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Host\ClassDriver\MouseHostWithParser\Config\LUFAConfig.h"></File></Folder><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="PrinterHost"><Folder name="Config"><File path="Demos\Host\ClassDriver\PrinterHost\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Host\ClassDriver\RNDISEthernetHost\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Host\ClassDriver\StillImageHost\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Host\ClassDriver\VirtualSerialHost\Config\LUFAConfig.h"></File></Folder><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="AndroidAccessoryHost"><Folder name="Config"><File path="Demos\Host\LowLevel\AndroidAccessoryHost\Config\LUFAConfig.h"></File></Folder><Folder name="Lib"><File path="Demos\Host\LowLevel\AndroidAccessoryHost\Lib\AndroidAccessoryCommands.c"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\Lib\AndroidAccessoryCommands.h"></File></Folder><File path="Demos\Host\LowLevel\AndroidAccessoryHost\AndroidAccessoryHost.c"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\AndroidAccessoryHost.h"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\DeviceDescriptor.c"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\DeviceDescriptor.h"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\makefile"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\AndroidAccessoryHost.txt"></File></Folder><Folder name="AudioInputHost"><Folder name="Config"><File path="Demos\Host\LowLevel\AudioInputHost\Config\LUFAConfig.h"></File></Folder><File path="Demos\Host\LowLevel\AudioInputHost\AudioInputHost.c"></File><File path="Demos\Host\LowLevel\AudioInputHost\AudioInputHost.h"></File><File path="Demos\Host\LowLevel\AudioInputHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\AudioInputHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\AudioInputHost\makefile"></File><File path="Demos\Host\LowLevel\AudioInputHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\AudioInputHost\AudioInputHost.txt"></File></Folder><Folder name="AudioOutputHost"><Folder name="Config"><File path="Demos\Host\LowLevel\AudioOutputHost\Config\LUFAConfig.h"></File><File path="Demos\Host\LowLevel\AudioOutputHost\Config\AppConfig.h"></File></Folder><File path="Demos\Host\LowLevel\AudioOutputHost\AudioOutputHost.c"></File><File path="Demos\Host\LowLevel\AudioOutputHost\AudioOutputHost.h"></File><File path="Demos\Host\LowLevel\AudioOutputHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\AudioOutputHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\AudioOutputHost\makefile"></File><File path="Demos\Host\LowLevel\AudioOutputHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\AudioOutputHost\AudioOutputHost.txt"></File></Folder><Folder name="GenericHIDHost"><Folder name="Config"><File path="Demos\Host\LowLevel\GenericHIDHost\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Host\LowLevel\JoystickHostWithParser\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Host\LowLevel\KeyboardHost\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Host\LowLevel\KeyboardHostWithParser\Config\LUFAConfig.h"></File></Folder><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="Config"><File path="Demos\Host\LowLevel\MassStorageHost\Config\LUFAConfig.h"></File></Folder><Folder name="Lib"><File path="Demos\Host\LowLevel\MassStorageHost\Lib\MassStoreCommands.c"></File><File path="Demos\Host\LowLevel\MassStorageHost\Lib\MassStoreCommands.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"><Folder name="Config"><File path="Demos\Host\LowLevel\MIDIHost\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Host\LowLevel\MouseHost\Config\LUFAConfig.h"></File></Folder><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"><Folder name="Config"><File path="Demos\Host\LowLevel\MouseHostWithParser\Config\LUFAConfig.h"></File></Folder><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="Config"><File path="Demos\Host\LowLevel\PrinterHost\Config\LUFAConfig.h"></File></Folder><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="Config"><File path="Demos\Host\LowLevel\RNDISEthernetHost\Config\LUFAConfig.h"></File></Folder><Folder name="Lib"><File path="Demos\Host\LowLevel\RNDISEthernetHost\Lib\RNDISCommands.c"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\Lib\RNDISCommands.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="Config"><File path="Demos\Host\LowLevel\StillImageHost\Config\LUFAConfig.h"></File></Folder><Folder name="Lib"><File path="Demos\Host\LowLevel\StillImageHost\Lib\StillImageCommands.c"></File><File path="Demos\Host\LowLevel\StillImageHost\Lib\StillImageCommands.h"></File><File path="Demos\Host\LowLevel\StillImageHost\Lib\PIMACodes.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"><Folder name="Config"><File path="Demos\Host\LowLevel\VirtualSerialHost\Config\LUFAConfig.h"></File></Folder><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><File path="Demos\Host\makefile"></File></Folder><Folder name="DualRole"><Folder name="ClassDriver"><Folder name="MouseHostDevice"><Folder name="Config"><File path="Demos\DualRole\ClassDriver\MouseHostDevice\Config\LUFAConfig.h"></File></Folder><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="Build"><Folder name="HID_EEPROM_Loader"><File path="LUFA\Build\HID_EEPROM_Loader\HID_EEPROM_Loader.c"></File><File path="LUFA\Build\HID_EEPROM_Loader\makefile"></File></Folder><File path="LUFA\Build\lufa_atprogram.mk"></File><File path="LUFA\Build\lufa_avrdude.mk"></File><File path="LUFA\Build\lufa_build.mk"></File><File path="LUFA\Build\lufa_core.mk"></File><File path="LUFA\Build\lufa_cppcheck.mk"></File><File path="LUFA\Build\lufa_dfu.mk"></File><File path="LUFA\Build\lufa_doxygen.mk"></File><File path="LUFA\Build\lufa_hid.mk"></File><File path="LUFA\Build\lufa_sources.mk"></File></Folder><Folder name="CodeTemplates"><Folder name="DriverStubs"><File path="LUFA\CodeTemplates\DriverStubs\Buttons.h"></File><File path="LUFA\CodeTemplates\DriverStubs\Dataflash.h"></File><File path="LUFA\CodeTemplates\DriverStubs\Joystick.h"></File><File path="LUFA\CodeTemplates\DriverStubs\LEDs.h"></File></Folder><File path="LUFA\CodeTemplates\makefile_template"></File><File path="LUFA\CodeTemplates\LUFAConfig.h"></File></Folder><Folder name="Common"><File path="LUFA\Common\Common.h"></File><File path="LUFA\Common\BoardTypes.h"></File><File path="LUFA\Common\Attributes.h"></File><File path="LUFA\Common\Architectures.h"></File><File path="LUFA\Common\Endianness.h"></File><File path="LUFA\Common\CompilerSpecific.h"></File><File path="LUFA\Common\ArchitectureSpecific.h"></File></Folder><Folder name="DoxygenPages"><Folder name="Style"><File path="LUFA\DoxygenPages\Style\Footer.htm"></File><File path="LUFA\DoxygenPages\Style\Style.css"></File></Folder><Folder name="Images"><Folder name="AS5_AS6_Import"><File path="LUFA\DoxygenPages\Images\AS5_AS6_Import\AS5_AS6_Import_Step1.png"></File><File path="LUFA\DoxygenPages\Images\AS5_AS6_Import\AS5_AS6_Import_Step2.png"></File><File path="LUFA\DoxygenPages\Images\AS5_AS6_Import\AS5_AS6_Import_Step3.png"></File><File path="LUFA\DoxygenPages\Images\AS5_AS6_Import\AS5_AS6_Import_Step4.png"></File><File path="LUFA\DoxygenPages\Images\AS5_AS6_Import\AS5_AS6_Import_Step5_1.png"></File><File path="LUFA\DoxygenPages\Images\AS5_AS6_Import\AS5_AS6_Import_Step5_2.png"></File><File path="LUFA\DoxygenPages\Images\AS5_AS6_Import\AS5_AS6_Import_Step5_3.png"></File></Folder><File path="LUFA\DoxygenPages\Images\Author.jpg"></File><File path="LUFA\DoxygenPages\Images\LUFA.png"></File><File path="LUFA\DoxygenPages\Images\LUFA_thumb.png"></File></Folder><File path="LUFA\DoxygenPages\BuildingLinkableLibraries.txt"></File><File path="LUFA\DoxygenPages\ChangeLog.txt"></File><File path="LUFA\DoxygenPages\CompileTimeTokens.txt"></File><File path="LUFA\DoxygenPages\CompilingApps.txt"></File><File path="LUFA\DoxygenPages\ConfiguringApps.txt"></File><File path="LUFA\DoxygenPages\DevelopingWithLUFA.txt"></File><File path="LUFA\DoxygenPages\DeviceSupport.txt"></File><File path="LUFA\DoxygenPages\DirectorySummaries.txt"></File><File path="LUFA\DoxygenPages\Donating.txt"></File><File path="LUFA\DoxygenPages\FutureChanges.txt"></File><File path="LUFA\DoxygenPages\GettingStarted.txt"></File><File path="LUFA\DoxygenPages\Groups.txt"></File><File path="LUFA\DoxygenPages\LibraryResources.txt"></File><File path="LUFA\DoxygenPages\LicenseInfo.txt"></File><File path="LUFA\DoxygenPages\LUFAPoweredProjects.txt"></File><File path="LUFA\DoxygenPages\MainPage.txt"></File><File path="LUFA\DoxygenPages\MigrationInformation.txt"></File><File path="LUFA\DoxygenPages\ProgrammingApps.txt"></File><File path="LUFA\DoxygenPages\SoftwareBootloaderJump.txt"></File><File path="LUFA\DoxygenPages\VIDAndPIDValues.txt"></File><File path="LUFA\DoxygenPages\WritingBoardDrivers.txt"></File><File path="LUFA\DoxygenPages\ExportingLibrary.txt"></File><File path="LUFA\DoxygenPages\KnownIssues.txt"></File><File path="LUFA\DoxygenPages\BuildSystem.txt"></File></Folder><Folder name="Drivers"><Folder name="USB"><Folder name="Class"><Folder name="Device"><File path="LUFA\Drivers\USB\Class\Device\AudioClassDevice.c"></File><File path="LUFA\Drivers\USB\Class\Device\AudioClassDevice.h"></File><File path="LUFA\Drivers\USB\Class\Device\CDCClassDevice.c"></File><File path="LUFA\Drivers\USB\Class\Device\CDCClassDevice.h"></File><File path="LUFA\Drivers\USB\Class\Device\HIDClassDevice.c"></File><File path="LUFA\Drivers\USB\Class\Device\HIDClassDevice.h"></File><File path="LUFA\Drivers\USB\Class\Device\MassStorageClassDevice.c"></File><File path="LUFA\Drivers\USB\Class\Device\MassStorageClassDevice.h"></File><File path="LUFA\Drivers\USB\Class\Device\MIDIClassDevice.c"></File><File path="LUFA\Drivers\USB\Class\Device\MIDIClassDevice.h"></File><File path="LUFA\Drivers\USB\Class\Device\RNDISClassDevice.c"></File><File path="LUFA\Drivers\USB\Class\Device\RNDISClassDevice.h"></File></Folder><Folder name="Host"><File path="LUFA\Drivers\USB\Class\Host\AudioClassHost.c"></File><File path="LUFA\Drivers\USB\Class\Host\AudioClassHost.h"></File><File path="LUFA\Drivers\USB\Class\Host\CDCClassHost.c"></File><File path="LUFA\Drivers\USB\Class\Host\CDCClassHost.h"></File><File path="LUFA\Drivers\USB\Class\Host\HIDClassHost.c"></File><File path="LUFA\Drivers\USB\Class\Host\HIDClassHost.h"></File><File path="LUFA\Drivers\USB\Class\Host\MassStorageClassHost.c"></File><File path="LUFA\Drivers\USB\Class\Host\MassStorageClassHost.h"></File><File path="LUFA\Drivers\USB\Class\Host\MIDIClassHost.c"></File><File path="LUFA\Drivers\USB\Class\Host\MIDIClassHost.h"></File><File path="LUFA\Drivers\USB\Class\Host\PrinterClassHost.c"></File><File path="LUFA\Drivers\USB\Class\Host\PrinterClassHost.h"></File><File path="LUFA\Drivers\USB\Class\Host\RNDISClassHost.c"></File><File path="LUFA\Drivers\USB\Class\Host\RNDISClassHost.h"></File><File path="LUFA\Drivers\USB\Class\Host\StillImageClassHost.c"></File><File path="LUFA\Drivers\USB\Class\Host\StillImageClassHost.h"></File><File path="LUFA\Drivers\USB\Class\Host\AndroidAccessoryClassHost.c"></File><File path="LUFA\Drivers\USB\Class\Host\AndroidAccessoryClassHost.h"></File></Folder><Folder name="Common"><File path="LUFA\Drivers\USB\Class\Common\AudioClassCommon.h"></File><File path="LUFA\Drivers\USB\Class\Common\CDCClassCommon.h"></File><File path="LUFA\Drivers\USB\Class\Common\HIDClassCommon.h"></File><File path="LUFA\Drivers\USB\Class\Common\HIDParser.c"></File><File path="LUFA\Drivers\USB\Class\Common\HIDParser.h"></File><File path="LUFA\Drivers\USB\Class\Common\HIDReportData.h"></File><File path="LUFA\Drivers\USB\Class\Common\MassStorageClassCommon.h"></File><File path="LUFA\Drivers\USB\Class\Common\MIDIClassCommon.h"></File><File path="LUFA\Drivers\USB\Class\Common\PrinterClassCommon.h"></File><File path="LUFA\Drivers\USB\Class\Common\RNDISClassCommon.h"></File><File path="LUFA\Drivers\USB\Class\Common\StillImageClassCommon.h"></File><File path="LUFA\Drivers\USB\Class\Common\AndroidAccessoryClassCommon.h"></File></Folder><File path="LUFA\Drivers\USB\Class\AudioClass.h"></File><File path="LUFA\Drivers\USB\Class\CDCClass.h"></File><File path="LUFA\Drivers\USB\Class\HIDClass.h"></File><File path="LUFA\Drivers\USB\Class\MassStorageClass.h"></File><File path="LUFA\Drivers\USB\Class\MIDIClass.h"></File><File path="LUFA\Drivers\USB\Class\PrinterClass.h"></File><File path="LUFA\Drivers\USB\Class\RNDISClass.h"></File><File path="LUFA\Drivers\USB\Class\StillImageClass.h"></File><File path="LUFA\Drivers\USB\Class\AndroidAccessoryClass.h"></File></Folder><Folder name="Core"><Folder name="AVR8"><Folder name="Template"><File path="LUFA\Drivers\USB\Core\AVR8\Template\Template_Endpoint_Control_R.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\Template\Template_Endpoint_Control_W.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\Template\Template_Endpoint_RW.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\Template\Template_Pipe_RW.c"></File></Folder><File path="LUFA\Drivers\USB\Core\AVR8\Device_AVR8.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\Device_AVR8.h"></File><File path="LUFA\Drivers\USB\Core\AVR8\Endpoint_AVR8.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\Endpoint_AVR8.h"></File><File path="LUFA\Drivers\USB\Core\AVR8\Host_AVR8.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\Host_AVR8.h"></File><File path="LUFA\Drivers\USB\Core\AVR8\OTG_AVR8.h"></File><File path="LUFA\Drivers\USB\Core\AVR8\Pipe_AVR8.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\Pipe_AVR8.h"></File><File path="LUFA\Drivers\USB\Core\AVR8\USBController_AVR8.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\USBController_AVR8.h"></File><File path="LUFA\Drivers\USB\Core\AVR8\USBInterrupt_AVR8.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\USBInterrupt_AVR8.h"></File><File path="LUFA\Drivers\USB\Core\AVR8\EndpointStream_AVR8.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\EndpointStream_AVR8.h"></File><File path="LUFA\Drivers\USB\Core\AVR8\PipeStream_AVR8.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\PipeStream_AVR8.h"></File></Folder><Folder name="UC3"><Folder name="Template"><File path="LUFA\Drivers\USB\Core\UC3\Template\Template_Endpoint_Control_R.c"></File><File path="LUFA\Drivers\USB\Core\UC3\Template\Template_Endpoint_Control_W.c"></File><File path="LUFA\Drivers\USB\Core\UC3\Template\Template_Endpoint_RW.c"></File><File path="LUFA\Drivers\USB\Core\UC3\Template\Template_Pipe_RW.c"></File></Folder><File path="LUFA\Drivers\USB\Core\UC3\Device_UC3.c"></File><File path="LUFA\Drivers\USB\Core\UC3\Device_UC3.h"></File><File path="LUFA\Drivers\USB\Core\UC3\Endpoint_UC3.c"></File><File path="LUFA\Drivers\USB\Core\UC3\Endpoint_UC3.h"></File><File path="LUFA\Drivers\USB\Core\UC3\Pipe_UC3.c"></File><File path="LUFA\Drivers\USB\Core\UC3\Pipe_UC3.h"></File><File path="LUFA\Drivers\USB\Core\UC3\USBController_UC3.c"></File><File path="LUFA\Drivers\USB\Core\UC3\USBController_UC3.h"></File><File path="LUFA\Drivers\USB\Core\UC3\USBInterrupt_UC3.c"></File><File path="LUFA\Drivers\USB\Core\UC3\USBInterrupt_UC3.h"></File><File path="LUFA\Drivers\USB\Core\UC3\Host_UC3.c"></File><File path="LUFA\Drivers\USB\Core\UC3\Host_UC3.h"></File><File path="LUFA\Drivers\USB\Core\UC3\EndpointStream_UC3.c"></File><File path="LUFA\Drivers\USB\Core\UC3\EndpointStream_UC3.h"></File><File path="LUFA\Drivers\USB\Core\UC3\PipeStream_UC3.c"></File><File path="LUFA\Drivers\USB\Core\UC3\PipeStream_UC3.h"></File></Folder><Folder name="XMEGA"><Folder name="Template"><File path="LUFA\Drivers\USB\Core\XMEGA\Template\Template_Endpoint_Control_R.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\Template\Template_Endpoint_Control_W.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\Template\Template_Endpoint_RW.c"></File></Folder><File path="LUFA\Drivers\USB\Core\XMEGA\Device_XMEGA.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\Device_XMEGA.h"></File><File path="LUFA\Drivers\USB\Core\XMEGA\Endpoint_XMEGA.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\Endpoint_XMEGA.h"></File><File path="LUFA\Drivers\USB\Core\XMEGA\EndpointStream_XMEGA.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\EndpointStream_XMEGA.h"></File><File path="LUFA\Drivers\USB\Core\XMEGA\Host_XMEGA.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\Pipe_XMEGA.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\PipeStream_XMEGA.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\USBController_XMEGA.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\USBController_XMEGA.h"></File><File path="LUFA\Drivers\USB\Core\XMEGA\USBInterrupt_XMEGA.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\USBInterrupt_XMEGA.h"></File></Folder><File path="LUFA\Drivers\USB\Core\ConfigDescriptor.c"></File><File path="LUFA\Drivers\USB\Core\ConfigDescriptor.h"></File><File path="LUFA\Drivers\USB\Core\DeviceStandardReq.c"></File><File path="LUFA\Drivers\USB\Core\DeviceStandardReq.h"></File><File path="LUFA\Drivers\USB\Core\Events.c"></File><File path="LUFA\Drivers\USB\Core\Events.h"></File><File path="LUFA\Drivers\USB\Core\HostStandardReq.c"></File><File path="LUFA\Drivers\USB\Core\HostStandardReq.h"></File><File path="LUFA\Drivers\USB\Core\StdDescriptors.h"></File><File path="LUFA\Drivers\USB\Core\StdRequestType.h"></File><File path="LUFA\Drivers\USB\Core\USBMode.h"></File><File path="LUFA\Drivers\USB\Core\USBTask.c"></File><File path="LUFA\Drivers\USB\Core\USBTask.h"></File><File path="LUFA\Drivers\USB\Core\Device.h"></File><File path="LUFA\Drivers\USB\Core\Endpoint.h"></File><File path="LUFA\Drivers\USB\Core\Host.h"></File><File path="LUFA\Drivers\USB\Core\Pipe.h"></File><File path="LUFA\Drivers\USB\Core\USBController.h"></File><File path="LUFA\Drivers\USB\Core\USBInterrupt.h"></File><File path="LUFA\Drivers\USB\Core\OTG.h"></File><File path="LUFA\Drivers\USB\Core\EndpointStream.h"></File><File path="LUFA\Drivers\USB\Core\PipeStream.h"></File></Folder><File path="LUFA\Drivers\USB\USB.h"></File></Folder><Folder name="Misc"><File path="LUFA\Drivers\Misc\TerminalCodes.h"></File><File path="LUFA\Drivers\Misc\RingBuffer.h"></File><File path="LUFA\Drivers\Misc\AT45DB321C.h"></File><File path="LUFA\Drivers\Misc\AT45DB642D.h"></File></Folder><Folder name="Board"><Folder name="AVR8"><Folder name="ADAFRUITU4"><File path="LUFA\Drivers\Board\AVR8\ADAFRUITU4\LEDs.h"></File></Folder><Folder name="ATAVRUSBRF01"><File path="LUFA\Drivers\Board\AVR8\ATAVRUSBRF01\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\ATAVRUSBRF01\LEDs.h"></File></Folder><Folder name="BENITO"><File path="LUFA\Drivers\Board\AVR8\BENITO\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\BENITO\LEDs.h"></File></Folder><Folder name="BIGMULTIO"><File path="LUFA\Drivers\Board\AVR8\BIGMULTIO\LEDs.h"></File></Folder><Folder name="BLACKCAT"><File path="LUFA\Drivers\Board\AVR8\BLACKCAT\LEDs.h"></File></Folder><Folder name="BUI"><File path="LUFA\Drivers\Board\AVR8\BUI\LEDs.h"></File></Folder><Folder name="BUMBLEB"><File path="LUFA\Drivers\Board\AVR8\BUMBLEB\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\BUMBLEB\Joystick.h"></File><File path="LUFA\Drivers\Board\AVR8\BUMBLEB\LEDs.h"></File></Folder><Folder name="CULV3"><File path="LUFA\Drivers\Board\AVR8\CULV3\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\CULV3\LEDs.h"></File></Folder><Folder name="DUCE"><File path="LUFA\Drivers\Board\AVR8\DUCE\LEDs.h"></File></Folder><Folder name="EVK527"><File path="LUFA\Drivers\Board\AVR8\EVK527\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\EVK527\Dataflash.h"></File><File path="LUFA\Drivers\Board\AVR8\EVK527\Joystick.h"></File><File path="LUFA\Drivers\Board\AVR8\EVK527\LEDs.h"></File></Folder><Folder name="JMDBU2"><File path="LUFA\Drivers\Board\AVR8\JMDBU2\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\JMDBU2\LEDs.h"></File></Folder><Folder name="MAXIMUS"><File path="LUFA\Drivers\Board\AVR8\MAXIMUS\LEDs.h"></File></Folder><Folder name="MICROPENDOUS"><File path="LUFA\Drivers\Board\AVR8\MICROPENDOUS\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\MICROPENDOUS\LEDs.h"></File></Folder><Folder name="MICROSIN162"><File path="LUFA\Drivers\Board\AVR8\MICROSIN162\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\MICROSIN162\LEDs.h"></File></Folder><Folder name="MINIMUS"><File path="LUFA\Drivers\Board\AVR8\MINIMUS\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\MINIMUS\LEDs.h"></File></Folder><Folder name="MULTIO"><File path="LUFA\Drivers\Board\AVR8\MULTIO\LEDs.h"></File></Folder><Folder name="OLIMEX32U4"><File path="LUFA\Drivers\Board\AVR8\OLIMEX32U4\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\OLIMEX32U4\LEDs.h"></File></Folder><Folder name="OLIMEX162"><File path="LUFA\Drivers\Board\AVR8\OLIMEX162\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\OLIMEX162\LEDs.h"></File></Folder><Folder name="OLIMEXT32U4"><File path="LUFA\Drivers\Board\AVR8\OLIMEXT32U4\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\OLIMEXT32U4\LEDs.h"></File></Folder><Folder name="RZUSBSTICK"><File path="LUFA\Drivers\Board\AVR8\RZUSBSTICK\LEDs.h"></File></Folder><Folder name="SPARKFUN8U2"><File path="LUFA\Drivers\Board\AVR8\SPARKFUN8U2\LEDs.h"></File></Folder><Folder name="STK525"><File path="LUFA\Drivers\Board\AVR8\STK525\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\STK525\Dataflash.h"></File><File path="LUFA\Drivers\Board\AVR8\STK525\Joystick.h"></File><File path="LUFA\Drivers\Board\AVR8\STK525\LEDs.h"></File></Folder><Folder name="STK526"><File path="LUFA\Drivers\Board\AVR8\STK526\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\STK526\Dataflash.h"></File><File path="LUFA\Drivers\Board\AVR8\STK526\Joystick.h"></File><File path="LUFA\Drivers\Board\AVR8\STK526\LEDs.h"></File></Folder><Folder name="TEENSY"><File path="LUFA\Drivers\Board\AVR8\TEENSY\LEDs.h"></File></Folder><Folder name="TUL"><File path="LUFA\Drivers\Board\AVR8\TUL\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\TUL\LEDs.h"></File></Folder><Folder name="UDIP"><File path="LUFA\Drivers\Board\AVR8\UDIP\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\UDIP\LEDs.h"></File></Folder><Folder name="UNO"><File path="LUFA\Drivers\Board\AVR8\UNO\LEDs.h"></File></Folder><Folder name="USB2AX"><File path="LUFA\Drivers\Board\AVR8\USB2AX\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\USB2AX\LEDs.h"></File></Folder><Folder name="USBFOO"><File path="LUFA\Drivers\Board\AVR8\USBFOO\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\USBFOO\LEDs.h"></File></Folder><Folder name="USBKEY"><File path="LUFA\Drivers\Board\AVR8\USBKEY\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\USBKEY\Dataflash.h"></File><File path="LUFA\Drivers\Board\AVR8\USBKEY\Joystick.h"></File><File path="LUFA\Drivers\Board\AVR8\USBKEY\LEDs.h"></File></Folder><Folder name="USBTINYMKII"><File path="LUFA\Drivers\Board\AVR8\USBTINYMKII\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\USBTINYMKII\LEDs.h"></File></Folder><Folder name="XPLAIN"><File path="LUFA\Drivers\Board\AVR8\XPLAIN\Dataflash.h"></File><File path="LUFA\Drivers\Board\AVR8\XPLAIN\LEDs.h"></File></Folder></Folder><Folder name="UC3"><Folder name="EVK1100"><File path="LUFA\Drivers\Board\UC3\EVK1100\Buttons.h"></File><File path="LUFA\Drivers\Board\UC3\EVK1100\Joystick.h"></File><File path="LUFA\Drivers\Board\UC3\EVK1100\LEDs.h"></File></Folder><Folder name="EVK1101"><File path="LUFA\Drivers\Board\UC3\EVK1101\Buttons.h"></File><File path="LUFA\Drivers\Board\UC3\EVK1101\Joystick.h"></File><File path="LUFA\Drivers\Board\UC3\EVK1101\LEDs.h"></File></Folder><Folder name="EVK1104"><File path="LUFA\Drivers\Board\UC3\EVK1104\Buttons.h"></File><File path="LUFA\Drivers\Board\UC3\EVK1104\LEDs.h"></File></Folder></Folder><Folder name="XMEGA"><Folder name="A3BU_XPLAINED"><File path="LUFA\Drivers\Board\XMEGA\A3BU_XPLAINED\Buttons.h"></File><File path="LUFA\Drivers\Board\XMEGA\A3BU_XPLAINED\LEDs.h"></File><File path="LUFA\Drivers\Board\XMEGA\A3BU_XPLAINED\Dataflash.h"></File></Folder><Folder name="B1_XPLAINED"><File path="LUFA\Drivers\Board\XMEGA\B1_XPLAINED\Buttons.h"></File><File path="LUFA\Drivers\Board\XMEGA\B1_XPLAINED\LEDs.h"></File><File path="LUFA\Drivers\Board\XMEGA\B1_XPLAINED\Dataflash.h"></File></Folder></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="AVR8"><File path="LUFA\Drivers\Peripheral\AVR8\ADC_AVR8.h"></File><File path="LUFA\Drivers\Peripheral\AVR8\Serial_AVR8.c"></File><File path="LUFA\Drivers\Peripheral\AVR8\Serial_AVR8.h"></File><File path="LUFA\Drivers\Peripheral\AVR8\SPI_AVR8.h"></File><File path="LUFA\Drivers\Peripheral\AVR8\TWI_AVR8.c"></File><File path="LUFA\Drivers\Peripheral\AVR8\TWI_AVR8.h"></File><File path="LUFA\Drivers\Peripheral\AVR8\SerialSPI_AVR8.h"></File></Folder><Folder name="UC3"></Folder><Folder name="XMEGA"><File path="LUFA\Drivers\Peripheral\XMEGA\SPI_XMEGA.h"></File><File path="LUFA\Drivers\Peripheral\XMEGA\Serial_XMEGA.c"></File><File path="LUFA\Drivers\Peripheral\XMEGA\Serial_XMEGA.h"></File><File path="LUFA\Drivers\Peripheral\XMEGA\SerialSPI_XMEGA.h"></File></Folder><File path="LUFA\Drivers\Peripheral\ADC.h"></File><File path="LUFA\Drivers\Peripheral\TWI.h"></File><File path="LUFA\Drivers\Peripheral\Serial.h"></File><File path="LUFA\Drivers\Peripheral\SPI.h"></File><File path="LUFA\Drivers\Peripheral\SerialSPI.h"></File></Folder></Folder><Folder name="Platform"><Folder name="AVR8"></Folder><Folder name="UC3"><File path="LUFA\Platform\UC3\InterruptManagement.h"></File><File path="LUFA\Platform\UC3\InterruptManagement.c"></File><File path="LUFA\Platform\UC3\Exception.S"></File><File path="LUFA\Platform\UC3\ClockManagement.h"></File></Folder><Folder name="XMEGA"><File path="LUFA\Platform\XMEGA\ClockManagement.h"></File></Folder><File path="LUFA\Platform\Platform.h"></File></Folder><File path="LUFA\makefile"></File><File path="LUFA\Version.h"></File><File path="LUFA\Doxygen.conf"></File><File path="LUFA\License.txt"></File></Folder><Folder name="Bootloaders"><Folder name="CDC"><Folder name="Config"><File path="Bootloaders\CDC\Config\LUFAConfig.h"></File><File path="Bootloaders\CDC\Config\AppConfig.h"></File></Folder><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><File path="Bootloaders\CDC\BootloaderAPI.c"></File><File path="Bootloaders\CDC\BootloaderAPI.h"></File><File path="Bootloaders\CDC\BootloaderAPITable.S"></File></Folder><Folder name="DFU"><Folder name="Config"><File path="Bootloaders\DFU\Config\LUFAConfig.h"></File><File path="Bootloaders\DFU\Config\AppConfig.h"></File></Folder><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><File path="Bootloaders\DFU\BootloaderAPI.c"></File><File path="Bootloaders\DFU\BootloaderAPI.h"></File><File path="Bootloaders\DFU\BootloaderAPITable.S"></File></Folder><Folder name="HID"><Folder name="Config"><File path="Bootloaders\HID\Config\LUFAConfig.h"></File></Folder><Folder name="HostLoaderApp"><File path="Bootloaders\HID\HostLoaderApp\gpl3.txt"></File><File path="Bootloaders\HID\HostLoaderApp\Makefile"></File><File path="Bootloaders\HID\HostLoaderApp\Makefile.bsd"></File><File path="Bootloaders\HID\HostLoaderApp\hid_bootloader_cli.c"></File></Folder><File path="Bootloaders\HID\Descriptors.c"></File><File path="Bootloaders\HID\Descriptors.h"></File><File path="Bootloaders\HID\makefile"></File><File path="Bootloaders\HID\BootloaderHID.txt"></File><File path="Bootloaders\HID\BootloaderHID.c"></File><File path="Bootloaders\HID\BootloaderHID.h"></File><File path="Bootloaders\HID\Doxygen.conf"></File></Folder><File path="Bootloaders\makefile"></File></Folder><Folder name="Projects"><Folder name="AVRISP-MKII"><Folder name="Config"><File path="Projects\AVRISP-MKII\Config\AppConfig.h"></File><File path="Projects\AVRISP-MKII\Config\LUFAConfig.h"></File></Folder><Folder name="Lib"><Folder name="ISP"><File path="Projects\AVRISP-MKII\Lib\ISP\ISPProtocol.c"></File><File path="Projects\AVRISP-MKII\Lib\ISP\ISPProtocol.h"></File><File path="Projects\AVRISP-MKII\Lib\ISP\ISPTarget.c"></File><File path="Projects\AVRISP-MKII\Lib\ISP\ISPTarget.h"></File></Folder><Folder name="XPROG"><File path="Projects\AVRISP-MKII\Lib\XPROG\TINYNVM.c"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\TINYNVM.h"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\XMEGANVM.c"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\XMEGANVM.h"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\XPROGProtocol.c"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\XPROGProtocol.h"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\XPROGTarget.c"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\XPROGTarget.h"></File></Folder><File path="Projects\AVRISP-MKII\Lib\V2Protocol.c"></File><File path="Projects\AVRISP-MKII\Lib\V2Protocol.h"></File><File path="Projects\AVRISP-MKII\Lib\V2ProtocolConstants.h"></File><File path="Projects\AVRISP-MKII\Lib\V2ProtocolParams.c"></File><File path="Projects\AVRISP-MKII\Lib\V2ProtocolParams.h"></File></Folder><File path="Projects\AVRISP-MKII\Doxygen.conf"></File><File path="Projects\AVRISP-MKII\makefile"></File><File path="Projects\AVRISP-MKII\AVRISP-MKII.c"></File><File path="Projects\AVRISP-MKII\AVRISP-MKII.h"></File><File path="Projects\AVRISP-MKII\AVRISP-MKII.txt"></File><File path="Projects\AVRISP-MKII\AVRISPDescriptors.c"></File><File path="Projects\AVRISP-MKII\AVRISPDescriptors.h"></File></Folder><Folder name="Benito"><Folder name="Config"><File path="Projects\Benito\Config\LUFAConfig.h"></File><File path="Projects\Benito\Config\AppConfig.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="HIDReportViewer"><Folder name="Config"><File path="Projects\HIDReportViewer\Config\LUFAConfig.h"></File></Folder><File path="Projects\HIDReportViewer\HIDReportViewer.c"></File><File path="Projects\HIDReportViewer\HIDReportViewer.h"></File><File path="Projects\HIDReportViewer\makefile"></File><File path="Projects\HIDReportViewer\HIDReportViewer.txt"></File><File path="Projects\HIDReportViewer\Doxygen.conf"></File></Folder><Folder name="LEDNotifier"><Folder name="Config"><File path="Projects\LEDNotifier\Config\LUFAConfig.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="Config"><File path="Projects\Magstripe\Config\AppConfig.h"></File><File path="Projects\Magstripe\Config\LUFAConfig.h"></File></Folder><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="MediaController"><Folder name="Config"><File path="Projects\MediaController\Config\LUFAConfig.h"></File></Folder><File path="Projects\MediaController\Descriptors.c"></File><File path="Projects\MediaController\Descriptors.h"></File><File path="Projects\MediaController\Doxygen.conf"></File><File path="Projects\MediaController\makefile"></File><File path="Projects\MediaController\MediaController.c"></File><File path="Projects\MediaController\MediaController.h"></File><File path="Projects\MediaController\MediaController.txt"></File></Folder><Folder name="MIDIToneGenerator"><Folder name="Config"><File path="Projects\MIDIToneGenerator\Config\LUFAConfig.h"></File><File path="Projects\MIDIToneGenerator\Config\AppConfig.h"></File></Folder><File path="Projects\MIDIToneGenerator\Descriptors.c"></File><File path="Projects\MIDIToneGenerator\Descriptors.h"></File><File path="Projects\MIDIToneGenerator\makefile"></File><File path="Projects\MIDIToneGenerator\MIDIToneGenerator.c"></File><File path="Projects\MIDIToneGenerator\MIDIToneGenerator.h"></File><File path="Projects\MIDIToneGenerator\MIDIToneGenerator.txt"></File><File path="Projects\MIDIToneGenerator\Doxygen.conf"></File></Folder><Folder name="MissileLauncher"><Folder name="Config"><File path="Projects\MissileLauncher\Config\LUFAConfig.h"></File></Folder><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="RelayBoard"><Folder name="Config"><File path="Projects\RelayBoard\Config\LUFAConfig.h"></File></Folder><File path="Projects\RelayBoard\Descriptors.c"></File><File path="Projects\RelayBoard\Descriptors.h"></File><File path="Projects\RelayBoard\Doxygen.conf"></File><File path="Projects\RelayBoard\makefile"></File><File path="Projects\RelayBoard\RelayBoard.c"></File><File path="Projects\RelayBoard\RelayBoard.h"></File><File path="Projects\RelayBoard\RelayBoard.txt"></File></Folder><Folder name="SerialToLCD"><Folder name="Config"><File path="Projects\SerialToLCD\Config\LUFAConfig.h"></File></Folder><Folder name="Lib"><File path="Projects\SerialToLCD\Lib\HD44780.c"></File><File path="Projects\SerialToLCD\Lib\HD44780.h"></File></Folder><File path="Projects\SerialToLCD\Descriptors.c"></File><File path="Projects\SerialToLCD\Descriptors.h"></File><File path="Projects\SerialToLCD\makefile"></File><File path="Projects\SerialToLCD\SerialToLCD.c"></File><File path="Projects\SerialToLCD\SerialToLCD.h"></File><File path="Projects\SerialToLCD\SerialToLCD.txt"></File><File path="Projects\SerialToLCD\Doxygen.conf"></File></Folder><Folder name="TempDataLogger"><Folder name="Config"><File path="Projects\TempDataLogger\Config\LUFAConfig.h"></File><File path="Projects\TempDataLogger\Config\AppConfig.h"></File></Folder><Folder name="Lib"><Folder name="FATFs"><File path="Projects\TempDataLogger\Lib\FATFs\diskio.c"></File><File path="Projects\TempDataLogger\Lib\FATFs\diskio.h"></File><File path="Projects\TempDataLogger\Lib\FATFs\ff.c"></File><File path="Projects\TempDataLogger\Lib\FATFs\ff.h"></File><File path="Projects\TempDataLogger\Lib\FATFs\ffconf.h"></File><File path="Projects\TempDataLogger\Lib\FATFs\integer.h"></File></Folder><File path="Projects\TempDataLogger\Lib\DataflashManager.c"></File><File path="Projects\TempDataLogger\Lib\DataflashManager.h"></File><File path="Projects\TempDataLogger\Lib\DS1307.c"></File><File path="Projects\TempDataLogger\Lib\DS1307.h"></File><File path="Projects\TempDataLogger\Lib\SCSI.c"></File><File path="Projects\TempDataLogger\Lib\SCSI.h"></File></Folder><Folder name="TempLogHostApp"><File path="Projects\TempDataLogger\TempLogHostApp\DataLoggerSettings.cs"></File><File path="Projects\TempDataLogger\TempLogHostApp\DataLoggerSettings.Designer.cs"></File><File path="Projects\TempDataLogger\TempLogHostApp\DataLoggerSettings.resx"></File><File path="Projects\TempDataLogger\TempLogHostApp\Program.cs"></File><File path="Projects\TempDataLogger\TempLogHostApp\TempLoggerHostApp.csproj"></File></Folder><File path="Projects\TempDataLogger\Descriptors.c"></File><File path="Projects\TempDataLogger\Descriptors.h"></File><File path="Projects\TempDataLogger\Doxygen.conf"></File><File path="Projects\TempDataLogger\makefile"></File><File path="Projects\TempDataLogger\TempDataLogger.c"></File><File path="Projects\TempDataLogger\TempDataLogger.h"></File><File path="Projects\TempDataLogger\TemperatureDataLogger.txt"></File></Folder><Folder name="USBtoSerial"><Folder name="Config"><File path="Projects\USBtoSerial\Config\LUFAConfig.h"></File></Folder><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><File path="Projects\USBtoSerial\Descriptors.c"></File></Folder><Folder name="Webserver"><Folder name="Config"><File path="Projects\Webserver\Config\LUFAConfig.h"></File><File path="Projects\Webserver\Config\AppConfig.h"></File></Folder><Folder name="Lib"><Folder name="uip"><File path="Projects\Webserver\Lib\uip\clock.c"></File><File path="Projects\Webserver\Lib\uip\clock.h"></File><File path="Projects\Webserver\Lib\uip\timer.c"></File><File path="Projects\Webserver\Lib\uip\timer.h"></File><File path="Projects\Webserver\Lib\uip\uip.c"></File><File path="Projects\Webserver\Lib\uip\uip.h"></File><File path="Projects\Webserver\Lib\uip\uip_arp.c"></File><File path="Projects\Webserver\Lib\uip\uip_arp.h"></File><File path="Projects\Webserver\Lib\uip\uipopt.h"></File><File path="Projects\Webserver\Lib\uip\uip-split.c"></File><File path="Projects\Webserver\Lib\uip\uip-split.h"></File></Folder><Folder name="FATFs"><File path="Projects\Webserver\Lib\FATFs\diskio.c"></File><File path="Projects\Webserver\Lib\FATFs\diskio.h"></File><File path="Projects\Webserver\Lib\FATFs\ff.c"></File><File path="Projects\Webserver\Lib\FATFs\ff.h"></File><File path="Projects\Webserver\Lib\FATFs\ffconf.h"></File><File path="Projects\Webserver\Lib\FATFs\integer.h"></File></Folder><File path="Projects\Webserver\Lib\DataflashManager.c"></File><File path="Projects\Webserver\Lib\DataflashManager.h"></File><File path="Projects\Webserver\Lib\uIPManagement.c"></File><File path="Projects\Webserver\Lib\uIPManagement.h"></File><File path="Projects\Webserver\Lib\HTTPServerApp.c"></File><File path="Projects\Webserver\Lib\HTTPServerApp.h"></File><File path="Projects\Webserver\Lib\SCSI.c"></File><File path="Projects\Webserver\Lib\SCSI.h"></File><File path="Projects\Webserver\Lib\TELNETServerApp.c"></File><File path="Projects\Webserver\Lib\TELNETServerApp.h"></File><File path="Projects\Webserver\Lib\DHCPClientApp.c"></File><File path="Projects\Webserver\Lib\DHCPClientApp.h"></File><File path="Projects\Webserver\Lib\DHCPCommon.h"></File><File path="Projects\Webserver\Lib\DHCPServerApp.c"></File><File path="Projects\Webserver\Lib\DHCPServerApp.h"></File><File path="Projects\Webserver\Lib\DHCPCommon.c"></File></Folder><File path="Projects\Webserver\makefile"></File><File path="Projects\Webserver\Webserver.c"></File><File path="Projects\Webserver\Webserver.h"></File><File path="Projects\Webserver\Doxygen.conf"></File><File path="Projects\Webserver\Webserver.txt"></File><File path="Projects\Webserver\Descriptors.c"></File><File path="Projects\Webserver\Descriptors.h"></File><File path="Projects\Webserver\USBHostMode.c"></File><File path="Projects\Webserver\USBHostMode.h"></File><File path="Projects\Webserver\USBDeviceMode.c"></File><File path="Projects\Webserver\USBDeviceMode.h"></File><File path="Projects\Webserver\LUFA Webserver RNDIS.inf"></File></Folder><Folder name="XPLAINBridge"><Folder name="Config"><File path="Projects\XPLAINBridge\Config\AppConfig.h"></File><File path="Projects\XPLAINBridge\Config\LUFAConfig.h"></File></Folder><Folder name="Lib"><File path="Projects\XPLAINBridge\Lib\SoftUART.c"></File><File path="Projects\XPLAINBridge\Lib\SoftUART.h"></File></Folder><File path="Projects\XPLAINBridge\XPLAINBridge.txt"></File><File path="Projects\XPLAINBridge\XPLAINBridge.h"></File><File path="Projects\XPLAINBridge\XPLAINBridge.c"></File><File path="Projects\XPLAINBridge\USARTDescriptors.h"></File><File path="Projects\XPLAINBridge\USARTDescriptors.c"></File><File path="Projects\XPLAINBridge\makefile"></File><File path="Projects\XPLAINBridge\LUFA XPLAIN Bridge.inf"></File><File path="Projects\XPLAINBridge\Doxygen.conf"></File></Folder><File path="Projects\makefile"></File></Folder><Folder name="BuildTests"><Folder name="BoardDriverTest"><Folder name="Board"><File path="BuildTests\BoardDriverTest\Board\Buttons.h"></File><File path="BuildTests\BoardDriverTest\Board\Dataflash.h"></File><File path="BuildTests\BoardDriverTest\Board\Joystick.h"></File><File path="BuildTests\BoardDriverTest\Board\LEDs.h"></File></Folder><File path="BuildTests\BoardDriverTest\BoardDeviceMap.cfg"></File><File path="BuildTests\BoardDriverTest\makefile"></File><File path="BuildTests\BoardDriverTest\Test.c"></File><File path="BuildTests\BoardDriverTest\makefile.test"></File></Folder><Folder name="BootloaderTest"><File path="BuildTests\BootloaderTest\BootloaderDeviceMap.cfg"></File><File path="BuildTests\BootloaderTest\makefile"></File></Folder><Folder name="ModuleTest"><File path="BuildTests\ModuleTest\makefile"></File><File path="BuildTests\ModuleTest\Modules.h"></File><File path="BuildTests\ModuleTest\Test_C.c"></File><File path="BuildTests\ModuleTest\Test_CPP.cpp"></File><File path="BuildTests\ModuleTest\Dummy.S"></File><File path="BuildTests\ModuleTest\makefile.test"></File></Folder><Folder name="SingleUSBModeTest"><File path="BuildTests\SingleUSBModeTest\makefile"></File><File path="BuildTests\SingleUSBModeTest\Test.c"></File><File path="BuildTests\SingleUSBModeTest\Dummy.S"></File><File path="BuildTests\SingleUSBModeTest\makefile.test"></File></Folder><Folder name="StaticAnalysisTest"><File path="BuildTests\StaticAnalysisTest\makefile"></File></Folder><File path="BuildTests\makefile"></File></Folder><Folder name="Maintenance"><File path="Maintenance\makefile"></File><File path="Maintenance\AS4Template.aps"></File></Folder><File path="makefile"></File><File path="README.txt"></File></Project>
\ No newline at end of file
diff --git a/LUFA/Build/HID_EEPROM_Loader/HID_EEPROM_Loader.c b/LUFA/Build/HID_EEPROM_Loader/HID_EEPROM_Loader.c
new file mode 100644 (file)
index 0000000..2d20153
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+             LUFA Library
+     Copyright (C) Dean Camera, 2012.
+
+  dean [at] fourwalledcubicle [dot] com
+           www.lufa-lib.org
+*/
+
+/*
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+  Permission to use, copy, modify, distribute, and sell this
+  software and its documentation for any purpose is hereby granted
+  without fee, provided that the above copyright notice appear in
+  all copies and that both that the copyright notice and this
+  permission notice and warranty disclaimer appear in supporting
+  documentation, and that the name of the author not be used in
+  advertising or publicity pertaining to distribution of the
+  software without specific, written prior permission.
+
+  The author disclaim all warranties with regard to this
+  software, including all implied warranties of merchantability
+  and fitness.  In no event shall the author be liable for any
+  special, indirect or consequential damages or any damages
+  whatsoever resulting from loss of use, data or profits, whether
+  in an action of contract, negligence or other tortious action,
+  arising out of or in connection with the use or performance of
+  this software.
+*/
+
+/** \file
+ *
+ *  Special application to extract an EEPROM image stored in FLASH memory, and
+ *  copy it to the device EEPROM. This application is designed to be used with
+ *  the HID build system module of LUFA to program the EEPROM of a target device
+ *  that uses the HID bootloader protocol, which does not have native EEPROM
+ *  programming support.
+ */
+
+#include <avr/io.h>
+#include <avr/eeprom.h>
+#include <avr/pgmspace.h>
+
+/* References to the binary EEPROM data linked in the AVR's FLASH memory space */
+extern const char _binary_InputEEData_bin_start[];
+extern const char _binary_InputEEData_bin_end[];
+extern const char _binary_InputEEData_bin_size[];
+
+/* Friendly names for the embedded binary data stored in FLASH memory space */
+#define InputEEData       _binary_InputEEData_bin_start
+#define InputEEData_size  ((int)_binary_InputEEData_bin_size)
+
+int main(void)
+{
+       /* Copy out the embedded EEPROM data from FLASH to EEPROM memory space */
+       for (uint16_t i = 0; i < InputEEData_size; i++)
+         eeprom_update_byte((uint8_t*)i, pgm_read_byte(&InputEEData[i]));
+
+       /* Infinite loop once complete */
+       for (;;);
+}
diff --git a/LUFA/Build/HID_EEPROM_Loader/makefile b/LUFA/Build/HID_EEPROM_Loader/makefile
new file mode 100644 (file)
index 0000000..f6dcbea
--- /dev/null
@@ -0,0 +1,40 @@
+#\r
+#             LUFA Library\r
+#     Copyright (C) Dean Camera, 2012.\r
+#\r
+#  dean [at] fourwalledcubicle [dot] com\r
+#           www.lufa-lib.org\r
+#\r
+# --------------------------------------\r
+#         LUFA Project Makefile.\r
+# --------------------------------------\r
+\r
+MCU          = at90usb1287\r
+ARCH         = AVR8\r
+F_CPU        = 1000000\r
+F_USB        = $(F_CPU)\r
+OPTIMIZATION = s\r
+TARGET       = HID_EEPROM_Loader\r
+SRC          = $(TARGET).c\r
+LUFA_PATH    = ../../../LUFA\r
+CC_FLAGS     = \r
+LD_FLAGS     =\r
+OBJECT_FILES = InputEEData.o\r
+\r
+# Default target\r
+all:\r
+\r
+# Determine the AVR sub-architecture of the build main application object file\r
+FIND_AVR_SUBARCH = avr$(shell avr-objdump -f $(TARGET).o | grep architecture | cut -d':' -f3 | cut -d',' -f1)\r
+\r
+# Create a linkable object file with the input binary EEPROM data stored in the FLASH section\r
+InputEEData.o: InputEEData.bin $(TARGET).o $(MAKEFILE_LIST)\r
+       @echo $(MSG_OBJCPY_CMD) Converting \"$<\" to a object file \"$@\"\r
+       avr-objcopy -I binary -O elf32-avr -B $(call FIND_AVR_SUBARCH) --rename-section .data=.progmem.data,contents,alloc,readonly,data $< $@\r
+\r
+# Include LUFA build script makefiles\r
+include $(LUFA_PATH)/Build/lufa_core.mk\r
+include $(LUFA_PATH)/Build/lufa_build.mk\r
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk\r
+include $(LUFA_PATH)/Build/lufa_doxygen.mk\r
+include $(LUFA_PATH)/Build/lufa_hid.mk\r
diff --git a/LUFA/Build/lufa.avrdude.in b/LUFA/Build/lufa.avrdude.in
deleted file mode 100644 (file)
index f16a772..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-#\r
-#             LUFA Library\r
-#     Copyright (C) Dean Camera, 2012.\r
-#\r
-#  dean [at] fourwalledcubicle [dot] com\r
-#           www.lufa-lib.org\r
-#\r
-\r
-LUFA_BUILD_MODULES += AVRDUDE\r
-LUFA_BUILD_TARGETS += program\r
-\r
-# -----------------------------------------------------------------------------\r
-#               LUFA DFU Bootloader Buildsystem Makefile Module.\r
-# -----------------------------------------------------------------------------\r
-# DESCRIPTION:\r
-#   Provides a set of targets to re-program a device using the open source\r
-#   avr-dude utility.\r
-# -----------------------------------------------------------------------------\r
-# TARGETS:\r
-#\r
-#    program                   - Program target with application using avr-dude\r
-#\r
-# MANDATORY PARAMETERS:\r
-#\r
-#    MCU                       - Microcontroller device model name\r
-#    TARGET                    - Application name\r
-#\r
-# OPTIONAL PARAMETERS:\r
-#\r
-#    AVRDUDE_PROGRAMMER        - Name of programming hardware to use\r
-#    AVRDUDE_PORT              - Name of communication port to use\r
-#    AVRDUDE_FLAGS             - Flags to pass to avr-dude\r
-#\r
-# -----------------------------------------------------------------------------\r
-\r
-# Output Messages\r
-MSG_AVRDUDE_CMD   = '  [AVRDUDE]  :'\r
-\r
-# Default values of user-supplied variables\r
-AVRDUDE_PROGRAMMER  ?= jtagicemkii\r
-AVRDUDE_PORT        ?= usb\r
-AVRDUDE_FLAGS       ?= -U flash:w:$(TARGET).hex\r
-\r
-# Sanity check the user MCU and TARGET makefile options\r
-ifeq ($(MCU),)\r
-   $(error Makefile MCU value not set.)\r
-endif\r
-ifeq ($(TARGET),)\r
-   $(error Makefile TARGET value not set.)\r
-endif\r
-\r
-program: $(TARGET).hex\r
-       @echo $(MSG_AVRDUDE_CMD) Programming device \"$(MCU)\" with settings \"$(AVRDUDE_FLAGS)\" using \"$(AVRDUDE_PROGRAMMER)\" on port \"$(AVRDUDE_PORT)\"\r
-       avrdude -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) $(AVRDUDE_FLAGS)\r
diff --git a/LUFA/Build/lufa.build.in b/LUFA/Build/lufa.build.in
deleted file mode 100644 (file)
index e9921ef..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-#\r
-#             LUFA Library\r
-#     Copyright (C) Dean Camera, 2012.\r
-#\r
-#  dean [at] fourwalledcubicle [dot] com\r
-#           www.lufa-lib.org\r
-#\r
-\r
-LUFA_BUILD_MODULES += BUILD\r
-LUFA_BUILD_TARGETS += size checksource all elf hex clean\r
-\r
-# -----------------------------------------------------------------------------\r
-#               LUFA Compiler Buildsystem Makefile Module.\r
-# -----------------------------------------------------------------------------\r
-# DESCRIPTION:\r
-#   Provides a set of targets to build a C, C++ and/or Assembly application\r
-#   via the AVR-GCC compiler.\r
-# -----------------------------------------------------------------------------\r
-# TARGETS:\r
-#\r
-#    size                      - List application size\r
-#    checksource               - Check existance of listed input source files\r
-#    all                       - Build application and list size\r
-#    elf                       - Build application ELF debug object file\r
-#    hex                       - Build application HEX object files\r
-#    clean                     - Remove output files\r
-#\r
-# MANDATORY PARAMETERS:\r
-#\r
-#    TARGET                    - Application name\r
-#    ARCH                      - Device architecture name\r
-#    MCU                       - Microcontroller device model name\r
-#    SRC                       - List of input source files (.c, .cpp/.c++, .S)\r
-#    F_USB                     - Speed of the input clock of the USB controller\r
-#                                in Hz\r
-#    LUFA_PATH                 - Path to the LUFA library core\r
-#\r
-# OPTIONAL PARAMETERS:\r
-#\r
-#    BOARD                     - LUFA board hardware\r
-#    OPTIMIZATION              - Optimization level\r
-#    C_STANDARD                - C Language Standard to use\r
-#    CPP_STANDARD              - C++ Language Standard to use\r
-#    F_CPU                     - Speed of the CPU, in Hz\r
-#    CC_FLAGS                  - Flags to pass to the compiler\r
-#    LD_FLAGS                  - Flags to pass to the linker\r
-#\r
-# -----------------------------------------------------------------------------\r
-\r
-# Output Messages\r
-MSG_BUILD_BEGIN = Begin compilation of project \"$(TARGET)\"...\r
-MSG_BUILD_END   = Finished building project \"$(TARGET)\"...\r
-MSG_COMPILE_CMD = '  [CC]      :'\r
-MSG_REMOVE_CMD  = '  [RM]      :'\r
-MSG_LINKER_CMD  = '  [LNK]     :'\r
-MSG_SIZE_CMD    = '  [SIZE]    :'\r
-MSG_OBJCPY_CMD  = '  [OBJCPY]  :'\r
-MSG_OBJDMP_CMD  = '  [OBJDMP]  :'\r
-\r
-# Sanity check the user MCU, TARGET, ARCH, SRC, F_USB and LUFA_PATH makefile options\r
-ifeq ($(TARGET),)\r
-   $(error Makefile TARGET value not set.)\r
-endif\r
-ifeq ($(ARCH),)\r
-   $(error Makefile ARCH value not set.)\r
-endif\r
-ifeq ($(MCU),)\r
-   $(error Makefile MCU value not set.)\r
-endif\r
-ifeq ($(SRC),)\r
-   $(error Makefile SRC value not set.)\r
-endif\r
-ifeq ($(F_USB),)\r
-   $(error Makefile F_USB value not set.)\r
-endif\r
-ifeq ($(LUFA_PATH),)\r
-   $(error Makefile LUFA_PATH value not set.)\r
-endif\r
-\r
-# Default values of user-supplied variables\r
-BOARD         ?= NONE\r
-OPTIMIZATION  ?= s\r
-F_CPU         ?=\r
-C_STANDARD    ?= c99\r
-CPP_STANDARD  ?= c++98\r
-\r
-# Convert input source file list to differentiate them by type\r
-C_SOURCE   = $(filter %.c, $(SRC))\r
-CPP_SOURCE = $(filter %.cpp, $(SRC)) $(filter %.c++, $(SRC))\r
-ASM_SOURCE = $(filter %.S, $(SRC))\r
-\r
-# Convert input source filenames into a list of required output object files\r
-OBJECT_FILES = $(C_SOURCE:%.c=%.o) $(CPP_SOURCE:%.c++=%.o) $(CPP_SOURCE:%.c++=%.o) $(ASM_SOURCE:%.S=%.o)\r
-\r
-# Create a list of flags to pass to the compiler\r
-CC_FLAGS += -mmcu=$(MCU) -I. -I$(LUFA_PATH)/.. -gdwarf-2 -pipe\r
-CC_FLAGS += -Wall -Wstrict-prototypes\r
-CC_FLAGS += -fno-strict-aliasing -funsigned-char -funsigned-bitfields -ffunction-sections -fshort-enums -fno-inline-small-functions -fpack-struct -fshort-enums\r
-CC_FLAGS += -DARCH=ARCH_$(ARCH) -DBOARD=BOARD_$(BOARD) -DF_USB=$(F_USB)UL\r
-ifneq ($(F_CPU),)\r
-   CC_FLAGS += -DF_CPU=$(F_CPU)UL\r
-endif\r
-\r
-# Create a list of flags to pass to the linker\r
-LD_FLAGS += -Wl,-Map=$(TARGET).map,--cref -Wl,--relax -Wl,--gc-sections -lm\r
-\r
-# Create a list of unknown source file types, if any are found throw an error\r
-UNKNOWN_SOURCE = $(filter-out $(C_SOURCE) $(CPP_SOURCE) $(ASM_SOURCE), $(SRC))\r
-ifneq ($(UNKNOWN_SOURCE),)\r
-   $(error Unknown input source formats: $(UNKNOWN_SOURCE))\r
-endif\r
-\r
-# Determine flags to pass to the size utility based on its reported features\r
-SIZE_MCU_FLAG    = $(shell avr-size --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )\r
-SIZE_FORMAT_FLAG = $(shell avr-size --help | grep -- --format=.*avr > /dev/null && echo --format=avr )\r
-\r
-\r
-begin:\r
-       @echo ""\r
-       @echo $(MSG_BUILD_BEGIN)\r
-       \r
-end:\r
-       @echo $(MSG_BUILD_END)\r
-       @echo ""\r
-\r
-checksource:\r
-       @for f in $(SRC) $(CPPSRC) $(ASRC); do \\r
-               if [ -f $$f ]; then \\r
-                       echo "Found Source File: $$f" ; \\r
-               else \\r
-                       echo "Source File Not Found: $$f" ; \\r
-               fi; \\r
-        done\r
-\r
-size:\r
-       @echo $(MSG_SIZE_CMD) Determining size of \"$(TARGET).elf\"\r
-       @if test -f $(TARGET).elf; then \\r
-           avr-size $(SIZE_MCU_FLAG) $(SIZE_FORMAT_FLAG) $(TARGET).elf ; 2>/dev/null; \\r
-        fi\r
-\r
-.PHONY: begin hex lss end size\r
-all: begin hex end size\r
-\r
-elf: $(TARGET).elf\r
-hex: $(TARGET).hex $(TARGET).eep\r
-lss: $(TARGET).lss\r
-\r
-%.o: %.c\r
-       @echo $(MSG_COMPILE_CMD) Compiling C file \"$^\"\r
-       avr-gcc -c $(CC_FLAGS) -O$(OPTIMIZATION) --std=$(C_STANDARD) $< -o $@\r
-\r
-%.o: %.cpp\r
-%.o: %.c++\r
-       @echo $(MSG_COMPILE_CMD) Compiling C++ file \"$^\"\r
-       avr-gcc -c $(CC_FLAGS) -O$(OPTIMIZATION) --std=$(CPP_STANDARD) -x c++ $< -o $@\r
-       \r
-%.o: %.S\r
-       @echo $(MSG_COMPILE_CMD) Assembling \"$^\"\r
-       avr-gcc -c $(CC_FLAGS) -x assembler-with-cpp $< -o $@\r
-\r
-.PRECIOUS : $(OBJECT_FILES)\r
-%.elf: $(OBJECT_FILES)\r
-       @echo $(MSG_LINKER_CMD) Linking object files into \"$@\"\r
-       avr-gcc $^ $(CC_FLAGS) $(LD_FLAGS) -o $@ \r
-\r
-%.hex: %.elf\r
-       @echo $(MSG_OBJCPY_CMD) Extracting HEX file data from \"$@\"\r
-       avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature $< $@\r
-\r
-%.eep: %.elf\r
-       @echo $(MSG_OBJCPY_CMD) Extracting EEP file data from \"$@\"\r
-       avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings -O ihex $< $@ || exit 0\r
-\r
-%.lss: %.elf\r
-       @echo $(MSG_OBJDMP_CMD) Extracting LSS file data from \"$@\"\r
-       avr-objdump -h -S -z $< > $@\r
-\r
-clean:\r
-       @echo $(MSG_REMOVE_CMD) Removing object files \"$(OBJECT_FILES)\"\r
-       rm -f $(OBJECT_FILES)\r
-       @echo $(MSG_REMOVE_CMD) Removing output files \"$(TARGET).elf $(TARGET).hex $(TARGET).eep $(TARGET).map $(TARGET).lss\"\r
-       rm -f $(TARGET).elf $(TARGET).hex $(TARGET).eep $(TARGET).map $(TARGET).lss\r
diff --git a/LUFA/Build/lufa.core.in b/LUFA/Build/lufa.core.in
deleted file mode 100644 (file)
index 71c35e0..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-#\r
-#             LUFA Library\r
-#     Copyright (C) Dean Camera, 2012.\r
-#\r
-#  dean [at] fourwalledcubicle [dot] com\r
-#           www.lufa-lib.org\r
-#\r
-\r
-LUFA_BUILD_MODULES += CORE\r
-LUFA_BUILD_TARGETS += list_targets list_modules help\r
-\r
-# -----------------------------------------------------------------------------\r
-#               LUFA Core Buildsystem Makefile Module.\r
-# -----------------------------------------------------------------------------\r
-# DESCRIPTION:\r
-#   Provides a set of core build targets for the LUFA buildsystem\r
-# -----------------------------------------------------------------------------\r
-# TARGETS:\r
-#\r
-#    info                      - Build system information\r
-#    help                      - Build system help\r
-#    list_targets              - List all build targets\r
-#    list_modules              - List all build modules\r
-#\r
-# MANDATORY PARAMETERS:\r
-#\r
-#    (None)\r
-#\r
-# OPTIONAL PARAMETERS:\r
-#\r
-#    (None)\r
-#\r
-# -----------------------------------------------------------------------------\r
-\r
-info:\r
-       @echo "==================================================================="\r
-       @echo "                  LUFA Build System 2.0                            "\r
-       @echo "      (C) Dean Camera { dean @ fourwalledcubicle . com }           "\r
-       @echo "==================================================================="\r
-\r
-.PHONY: info\r
-help: info\r
-       @echo "DESCRIPTION:                                                       "\r
-       @echo " This build system is a set of makefile modules for (GNU) Make, to "\r
-       @echo " provide a simple system for building LUFA powered applications.   "\r
-       @echo " Each makefile module can be included from within a user makefile, "\r
-       @echo " to expose the build rules documented in the comments at the top of"\r
-       @echo " each build module.                                                "\r
-       @echo "                                                                   "\r
-       @echo "USAGE:                                                             "     \r
-       @echo " To execute a rule, define all variables indicated in the desired  "\r
-       @echo " module as a required parameter before including the build module  "\r
-       @echo " in your project makefile. Parameters marked as optional will      "\r
-       @echo " assume a default value in the module if not user-assigned.        "\r
-       @echo "==================================================================="\r
-       @echo "  Currently Used Modules in this application:                      "\r
-       @echo "                                                                   "\r
-       @echo "    [" $(sort $(LUFA_BUILD_MODULES)) "]"\r
-       @echo "                                                                   "\r
-       @echo "                                                                   "\r
-       @echo "  Currently Available Build Targets in this application:           "\r
-       @echo "                                                                   "\r
-       @echo "    [" $(sort $(LUFA_BUILD_TARGETS)) "]"\r
-       @echo "==================================================================="\r
-       @echo "        The LUFA BuildSystem 2.0 - Powered By Unicorns (tm)        "\r
-       @echo "==================================================================="\r
-       \r
-list_targets:\r
-       @echo Currently Available Build Targets: $(sort $(LUFA_BUILD_TARGETS))\r
-       \r
-list_modules:\r
-       @echo Currently Build Modules: $(sort $(LUFA_BUILD_MODULES))\r
-\r
diff --git a/LUFA/Build/lufa.dfu.in b/LUFA/Build/lufa.dfu.in
deleted file mode 100644 (file)
index f04472e..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-#\r
-#             LUFA Library\r
-#     Copyright (C) Dean Camera, 2012.\r
-#\r
-#  dean [at] fourwalledcubicle [dot] com\r
-#           www.lufa-lib.org\r
-#\r
-\r
-LUFA_BUILD_MODULES += DFU\r
-LUFA_BUILD_TARGETS += flip flip-ee dfu dfu-ee\r
-\r
-# -----------------------------------------------------------------------------\r
-#               LUFA DFU Bootloader Buildsystem Makefile Module.\r
-# -----------------------------------------------------------------------------\r
-# DESCRIPTION:\r
-#   Provides a set of targets to re-program a device currently running a DFU\r
-#   class bootloader with a project's FLASH and EEPROM files.\r
-# -----------------------------------------------------------------------------\r
-# TARGETS:\r
-#\r
-#    flip                      - Program FLASH into target via Atmel FLIP\r
-#    flip-ee                   - Program EEPROM into target via Atmel FLIP\r
-#    dfu                       - Program FLASH into target via dfu-programmer\r
-#    dfu-ee                    - Program EEPROM into target via dfu-programmer\r
-#\r
-# MANDATORY PARAMETERS:\r
-#\r
-#    MCU                       - Microcontroller device model name\r
-#    TARGET                    - Application name\r
-#\r
-# OPTIONAL PARAMETERS:\r
-#\r
-#    (None)\r
-#\r
-# -----------------------------------------------------------------------------\r
-\r
-# Output Messages\r
-MSG_DFU_CMD   = '  [DFU]     :'\r
-\r
-# Sanity check the user MCU and TARGET makefile options\r
-ifeq ($(MCU),)\r
-   $(error Makefile MCU value not set.)\r
-endif\r
-ifeq ($(TARGET),)\r
-   $(error Makefile TARGET value not set.)\r
-endif\r
-\r
-flip: $(TARGET).hex\r
-       @echo $(MSG_DFU_CMD) Programming FLASH with batchisp using \"$(TARGET).hex\"\r
-       batchisp -hardware usb -device $(MCU) -operation erase f\r
-       batchisp -hardware usb -device $(MCU) -operation loadbuffer $(TARGET).hex program\r
-       batchisp -hardware usb -device $(MCU) -operation start reset 0\r
-\r
-flip-ee: $(TARGET).eep\r
-       cp $(TARGET).eep $(TARGET)eep.hex\r
-       @echo $(MSG_DFU_CMD) Programming EEPROM with batchisp using \"$(TARGET).eep\"\r
-       batchisp -hardware usb -device $(MCU) -operation memory EEPROM erase\r
-       batchisp -hardware usb -device $(MCU) -operation memory EEPROM loadbuffer $(TARGET)eep.hex program\r
-       batchisp -hardware usb -device $(MCU) -operation start reset 0\r
-       rm $(TARGET)eep.hex\r
-       \r
-dfu: $(TARGET).hex\r
-       @echo $(MSG_DFU_CMD) Programming FLASH with dfu-programmer using \"$(TARGET).hex\"\r
-       dfu-programmer $(MCU) erase\r
-       dfu-programmer $(MCU) flash $(TARGET).hex\r
-       dfu-programmer $(MCU) reset\r
-\r
-dfu-ee: $(TARGET).hex $(TARGET).eep\r
-       @echo $(MSG_DFU_CMD) Programming EEPROM with dfu-programmer using \"$(TARGET).eep\"\r
-       dfu-programmer $(MCU) eeprom-flash $(TARGET).eep\r
-       dfu-programmer $(MCU) reset
\ No newline at end of file
diff --git a/LUFA/Build/lufa.doxygen.in b/LUFA/Build/lufa.doxygen.in
deleted file mode 100644 (file)
index 9efbbcb..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#\r
-#             LUFA Library\r
-#     Copyright (C) Dean Camera, 2012.\r
-#\r
-#  dean [at] fourwalledcubicle [dot] com\r
-#           www.lufa-lib.org\r
-#\r
-\r
-LUFA_BUILD_MODULES += DOXYGEN\r
-LUFA_BUILD_TARGETS += doxygen\r
-\r
-# -----------------------------------------------------------------------------\r
-#                 LUFA Doxygen Buildsystem Makefile Module.\r
-# -----------------------------------------------------------------------------\r
-# DESCRIPTION:\r
-#   Provides a set of targets to automatically build Doxygen documentation for\r
-#   a project (see www.doxygen.org).\r
-# -----------------------------------------------------------------------------\r
-# TARGETS:\r
-#\r
-#    doxygen                   - Build Doxygen Documentation\r
-#\r
-# MANDATORY PARAMETERS:\r
-#\r
-#    (None)\r
-#\r
-# OPTIONAL PARAMETERS:\r
-#\r
-#    DOXYGEN_CONF              - Doxygen configuration filename\r
-#    DOXYGEN_FAIL_ON_WARNING   - Set to Y to fail the build on Doxygen warnings,\r
-#                                N to continue even if warnings occur\r
-#    DOXYGEN_OVERRIDE_PARAMS   - Parameters to override in the doxygen\r
-#                                configuration file\r
-# -----------------------------------------------------------------------------\r
-\r
-# Output Messages\r
-MSG_DOXYGEN_CMD   = '  [DOXYGEN] :'\r
-\r
-# Default values of user-supplied variables\r
-DOXYGEN_CONF            ?= Doxygen.conf\r
-DOXYGEN_FAIL_ON_WARNING ?= Y\r
-DOXYGEN_OVERRIDE_PARAMS ?= QUIET=YES\r
-\r
-# Determine Doxygen invocation command\r
-DOXYGEN_CMD = ( cat Doxygen.conf ; $(DOXYGEN_OVERRIDE_PARAMS:%=echo "%";)) | doxygen -\r
-ifeq ($(DOXYGEN_FAIL_ON_WARNING), Y)\r
-    DOXYGEN_CMD = if ( ( cat Doxygen.conf $(DOXYGEN_OVERRIDE_PARAMS:%=; echo "%") ) | doxygen - 2>&1 | grep -v "warning: ignoring unsupported tag" ;); then exit 1; fi;\r
-endif\r
-\r
-doxygen:\r
-       @echo $(MSG_DOXYGEN_CMD) Configuration file \"$(DOXYGEN_CONF)\" with parameters \"$(DOXYGEN_OVERRIDE_PARAMS)\"\r
-       $(DOXYGEN_CMD)\r
diff --git a/LUFA/Build/lufa.sources.in b/LUFA/Build/lufa.sources.in
deleted file mode 100644 (file)
index 9985933..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-#\r
-#             LUFA Library\r
-#     Copyright (C) Dean Camera, 2012.\r
-#\r
-#  dean [at] fourwalledcubicle [dot] com\r
-#           www.lufa-lib.org\r
-#\r
-\r
-LUFA_BUILD_MODULES += SOURCES\r
-LUFA_BUILD_TARGETS += \r
-\r
-# -----------------------------------------------------------------------------\r
-#               LUFA Sources Buildsystem Makefile Module.\r
-# -----------------------------------------------------------------------------\r
-# DESCRIPTION:\r
-#   Provides a set of makefile variables for the various LUFA module sources.\r
-#   Once included, the sources required to use a given LUFA module will become\r
-#   available using the makefile variable names listed in the LUFA project\r
-#   documentation.\r
-# -----------------------------------------------------------------------------\r
-# TARGETS:\r
-#\r
-#    (None)\r
-#\r
-# MANDATORY PARAMETERS:\r
-#\r
-#    LUFA_PATH                 - Path to the LUFA library core\r
-#    ARCH                      - Device architecture name\r
-#\r
-# OPTIONAL PARAMETERS:\r
-#\r
-#    (None)\r
-#\r
-# -----------------------------------------------------------------------------\r
-\r
-# Sanity check the user LUFA_PATH and ARCH makefile options\r
-ifeq ($(LUFA_PATH),)\r
-   $(error Makefile LUFA_PATH value not set.)\r
-endif\r
-ifeq ($(ARCH),)\r
-   $(error Makefile ARCH value not set.)\r
-endif\r
-\r
-# Allow LUFA_ROOT_PATH to be overridden elsewhere to support legacy LUFA makefiles\r
-LUFA_ROOT_PATH ?= $(LUFA_PATH)\r
-\r
-# Construct LUFA module source variables\r
-LUFA_SRC_USB           = $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Device_$(ARCH).c          \\r
-                         $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Endpoint_$(ARCH).c        \\r
-                         $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Host_$(ARCH).c            \\r
-                         $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Pipe_$(ARCH).c            \\r
-                         $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/USBController_$(ARCH).c   \\r
-                         $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/USBInterrupt_$(ARCH).c    \\r
-                         $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/EndpointStream_$(ARCH).c  \\r
-                         $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/PipeStream_$(ARCH).c      \\r
-                         $(LUFA_ROOT_PATH)/Drivers/USB/Core/ConfigDescriptor.c                \\r
-                         $(LUFA_ROOT_PATH)/Drivers/USB/Core/DeviceStandardReq.c               \\r
-                         $(LUFA_ROOT_PATH)/Drivers/USB/Core/Events.c                          \\r
-                         $(LUFA_ROOT_PATH)/Drivers/USB/Core/HostStandardReq.c                 \\r
-                         $(LUFA_ROOT_PATH)/Drivers/USB/Core/USBTask.c                         \\r
-                         $(LUFA_ROOT_PATH)/Drivers/USB/Class/Common/HIDParser.c\r
-LUFA_SRC_USBCLASS      = $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/AudioClassDevice.c        \\r
-                         $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/CDCClassDevice.c          \\r
-                         $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/HIDClassDevice.c          \\r
-                         $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/MassStorageClassDevice.c  \\r
-                         $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/MIDIClassDevice.c         \\r
-                         $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/RNDISClassDevice.c        \\r
-                         $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/AndroidAccessoryClassHost.c \\r
-                         $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/AudioClassHost.c            \\r
-                         $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/CDCClassHost.c              \\r
-                         $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/HIDClassHost.c              \\r
-                         $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/MassStorageClassHost.c      \\r
-                         $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/MIDIClassHost.c             \\r
-                         $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/PrinterClassHost.c          \\r
-                         $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/RNDISClassHost.c            \\r
-                         $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/StillImageClassHost.c\r
-LUFA_SRC_TEMPERATURE   = $(LUFA_ROOT_PATH)/Drivers/Board/Temperature.c\r
-LUFA_SRC_SERIAL        = $(LUFA_ROOT_PATH)/Drivers/Peripheral/$(ARCH)/Serial_$(ARCH).c\r
-LUFA_SRC_TWI           = $(LUFA_ROOT_PATH)/Drivers/Peripheral/$(ARCH)/TWI_$(ARCH).c\r
-\r
-# Build a list of all available module sources\r
-LUFA_SRC_ALL_FILES     = $(LUFA_SRC_USB)            \\r
-                         $(LUFA_SRC_USBCLASS)       \\r
-                         $(LUFA_SRC_TEMPERATURE)    \\r
-                         $(LUFA_SRC_SERIAL)         \\r
-                         $(LUFA_SRC_TWI)
\ No newline at end of file
diff --git a/LUFA/Build/lufa_atprogram.mk b/LUFA/Build/lufa_atprogram.mk
new file mode 100644 (file)
index 0000000..f9f5dfc
--- /dev/null
@@ -0,0 +1,101 @@
+#
+#             LUFA Library
+#     Copyright (C) Dean Camera, 2012.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#           www.lufa-lib.org
+#
+
+LUFA_BUILD_MODULES         += ATPROGRAM
+LUFA_BUILD_TARGETS         += atprogram atprogram-ee
+LUFA_BUILD_MANDATORY_VARS  += MCU TARGET
+LUFA_BUILD_OPTIONAL_VARS   += ATPROGRAM_PROGRAMMER ATPROGRAM_INTERFACE ATPROGRAM_PORT
+LUFA_BUILD_PROVIDED_VARS   += 
+LUFA_BUILD_PROVIDED_MACROS += 
+
+# -----------------------------------------------------------------------------
+#             LUFA ATPROGRAM Programmer Buildsystem Makefile Module.
+# -----------------------------------------------------------------------------
+# DESCRIPTION:
+#   Provides a set of targets to re-program a device using the Atmel atprogram
+#   utility in AVR Studio 5.x and Atmel Studio 6.0 onwards.
+# -----------------------------------------------------------------------------
+# TARGETS:
+#
+#    atprogram                 - Program target FLASH with application using
+#                                atprogram
+#    atprogram-ee              - Program target EEPROM with application data
+#                                using atprogram
+#
+# MANDATORY PARAMETERS:
+#
+#    MCU                       - Microcontroller device model name
+#    TARGET                    - Application name
+#
+# OPTIONAL PARAMETERS:
+#
+#    ATPROGRAM_PROGRAMMER      - Name of programming hardware to use
+#    ATPROGRAM_INTERFACE       - Name of programming interface to use
+#    ATPROGRAM_PORT            - Name of communication port to use
+#
+# PROVIDED VARIABLES:
+#
+#    (None)
+#
+# PROVIDED MACROS:
+#
+#    (None)
+#
+# -----------------------------------------------------------------------------
+
+SHELL = /bin/sh
+
+ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
+ERROR_IF_EMPTY   ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
+ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
+
+# Default values of optionally user-supplied variables
+ATPROGRAM_PROGRAMMER ?= jtagice3
+ATPROGRAM_INTERFACE  ?= jtag
+ATPROGRAM_PORT       ?= 
+
+# Sanity check user supplied values
+$(foreach MANDATORY_VAR, $(LUFA_BUILD_MANDATORY_VARS), $(call ERROR_IF_UNSET, $(MANDATORY_VAR)))
+$(call ERROR_IF_EMPTY, MCU)
+$(call ERROR_IF_EMPTY, TARGET)
+$(call ERROR_IF_EMPTY, ATPROGRAM_PROGRAMMER)
+$(call ERROR_IF_EMPTY, ATPROGRAM_INTERFACE)
+
+# Output Messages
+MSG_ATPROGRAM_CMD    := ' [ATPRGRM] :'
+
+# Construct base atprogram command flags
+BASE_ATPROGRAM_FLAGS := --tool $(ATPROGRAM_PROGRAMMER) --interface $(ATPROGRAM_INTERFACE) --device $(MCU)
+ifneq ($(ATPROGRAM_PORT),)
+   BASE_ATPROGRAM_FLAGS += --port $(ATPROGRAM_PORT)
+endif
+
+# Construct the flags to use for the various memory spaces
+ifeq ($(ARCH), AVR8)
+   ATPROGRAM_FLASH_FLAGS  := --chiperase --flash
+   ATPROGRAM_EEPROM_FLAGS := --eeprom
+else ifeq ($(ARCH), XMEGA)
+   ATPROGRAM_FLASH_FLAGS  := --erase --flash
+   ATPROGRAM_EEPROM_FLAGS := --eeprom
+else ifeq ($(ARCH), UC3)
+   ATPROGRAM_FLASH_FLAGS  := --erase
+   ATPROGRAM_EEPROM_FLAGS := --eeprom
+else
+   $(error Unsupported architecture "$(ARCH)")
+endif
+
+atprogram: $(TARGET).elf $(MAKEFILE_LIST)
+       @echo $(MSG_ATPROGRAM_CMD) Programming device \"$(MCU)\" FLASH using \"$(ATPROGRAM_PROGRAMMER)\"
+       atprogram $(BASE_ATPROGRAM_FLAGS) program $(ATPROGRAM_FLASH_FLAGS) --file $<
+
+atprogram-ee: $(TARGET).elf $(MAKEFILE_LIST)
+       @echo $(MSG_ATPROGRAM_CMD) Programming device \"$(MCU)\" EEPROM using \"$(ATPROGRAM_PROGRAMMER)\"
+       atprogram $(BASE_ATPROGRAM_FLAGS) program $(ATPROGRAM_EEPROM_FLAGS) --file $<
+       
+# Phony build targets for this module
+.PHONY: atprogram atprogram-ee
diff --git a/LUFA/Build/lufa_avrdude.mk b/LUFA/Build/lufa_avrdude.mk
new file mode 100644 (file)
index 0000000..21f93ef
--- /dev/null
@@ -0,0 +1,84 @@
+#
+#             LUFA Library
+#     Copyright (C) Dean Camera, 2012.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#           www.lufa-lib.org
+#
+
+LUFA_BUILD_MODULES         += AVRDUDE
+LUFA_BUILD_TARGETS         += avrdude avrdude-ee
+LUFA_BUILD_MANDATORY_VARS  += MCU TARGET
+LUFA_BUILD_OPTIONAL_VARS   += AVRDUDE_PROGRAMMER AVRDUDE_PORT AVRDUDE_FLAGS
+LUFA_BUILD_PROVIDED_VARS   += 
+LUFA_BUILD_PROVIDED_MACROS += 
+
+# -----------------------------------------------------------------------------
+#             LUFA AVRDUDE Programmer Buildsystem Makefile Module.
+# -----------------------------------------------------------------------------
+# DESCRIPTION:
+#   Provides a set of targets to re-program a device using the open source
+#   avr-dude utility.
+# -----------------------------------------------------------------------------
+# TARGETS:
+#
+#    avrdude                   - Program target FLASH with application using
+#                                avrdude
+#    avrdude-ee                - Program target EEPROM with application data
+#                                using avrdude
+#
+# MANDATORY PARAMETERS:
+#
+#    MCU                       - Microcontroller device model name
+#    TARGET                    - Application name
+#
+# OPTIONAL PARAMETERS:
+#
+#    AVRDUDE_PROGRAMMER        - Name of programming hardware to use
+#    AVRDUDE_PORT              - Name of communication port to use
+#    AVRDUDE_FLAGS             - Flags to pass to avr-dude
+#
+# PROVIDED VARIABLES:
+#
+#    (None)
+#
+# PROVIDED MACROS:
+#
+#    (None)
+#
+# -----------------------------------------------------------------------------
+
+SHELL = /bin/sh
+
+ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
+ERROR_IF_EMPTY   ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
+ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
+
+# Default values of optionally user-supplied variables
+AVRDUDE_PROGRAMMER ?= jtagicemkii
+AVRDUDE_PORT       ?= usb
+AVRDUDE_FLAGS      ?= 
+
+# Sanity check user supplied values
+$(foreach MANDATORY_VAR, $(LUFA_BUILD_MANDATORY_VARS), $(call ERROR_IF_UNSET, $(MANDATORY_VAR)))
+$(call ERROR_IF_EMPTY, MCU)
+$(call ERROR_IF_EMPTY, TARGET)
+$(call ERROR_IF_EMPTY, AVRDUDE_PROGRAMMER)
+$(call ERROR_IF_EMPTY, AVRDUDE_PORT)
+
+# Output Messages
+MSG_AVRDUDE_CMD    := ' [AVRDUDE] :'
+
+# Construct base avrdude command flags
+BASE_AVRDUDE_FLAGS := -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)
+
+avrdude: $(TARGET).hex $(MAKEFILE_LIST)
+       @echo $(MSG_AVRDUDE_CMD) Programming device \"$(MCU)\" FLASH with settings \"$(AVRDUDE_FLASH_FLAGS)\" using \"$(AVRDUDE_PROGRAMMER)\" on port \"$(AVRDUDE_PORT)\"
+       avrdude $(BASE_AVRDUDE_FLAGS) -U flash:w:$< $(AVRDUDE_FLAGS)
+
+avrdude-ee: $(TARGET).eep $(MAKEFILE_LIST)
+       @echo $(MSG_AVRDUDE_CMD) Programming device \"$(MCU)\" EEPROM with settings \"$(AVRDUDE_EEP_FLAGS)\" using \"$(AVRDUDE_PROGRAMMER)\" on port \"$(AVRDUDE_PORT)\"
+       avrdude $(BASE_AVRDUDE_FLAGS) -U eeprom:w:$< $(AVRDUDE_FLAGS)
+
+# Phony build targets for this module
+.PHONY: avrdude avrdude-ee
diff --git a/LUFA/Build/lufa_build.mk b/LUFA/Build/lufa_build.mk
new file mode 100644 (file)
index 0000000..bed98c2
--- /dev/null
@@ -0,0 +1,296 @@
+#
+#             LUFA Library
+#     Copyright (C) Dean Camera, 2012.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#           www.lufa-lib.org
+#
+
+LUFA_BUILD_MODULES         += BUILD
+LUFA_BUILD_TARGETS         += size check-source symbol-sizes all lib elf hex lss clean mostlyclean
+LUFA_BUILD_MANDATORY_VARS  += TARGET ARCH MCU SRC F_USB LUFA_PATH
+LUFA_BUILD_OPTIONAL_VARS   += BOARD OPTIMIZATION C_STANDARD CPP_STANDARD F_CPU C_FLAGS CPP_FLAGS ASM_FLAGS CC_FLAGS LD_FLAGS OBJDIR OBJECT_FILES DEBUG_TYPE DEBUG_LEVEL
+LUFA_BUILD_PROVIDED_VARS   += 
+LUFA_BUILD_PROVIDED_MACROS += 
+
+# -----------------------------------------------------------------------------
+#               LUFA GCC Compiler Buildsystem Makefile Module.
+# -----------------------------------------------------------------------------
+# DESCRIPTION:
+#   Provides a set of targets to build a C, C++ and/or Assembly application
+#   via the AVR-GCC compiler.
+# -----------------------------------------------------------------------------
+# TARGETS:
+#
+#    size                      - List built application size
+#    symbol-sizes              - Print application symbols from the binary ELF
+#                                file as a list sorted by size in bytes
+#    check-source              - Print a list of SRC source files that cannot
+#                                be found
+#    all                       - Build application and list size
+#    lib                       - Build and archive source files into a library
+#    elf                       - Build application ELF debug object file
+#    hex                       - Build application HEX object files
+#    lss                       - Build application LSS assembly listing file
+#    clean                     - Remove all project intermediatary and binary
+#                                output files
+#    mostlyclean               - Remove intermediatary output files, but
+#                                preserve binaries
+#
+# MANDATORY PARAMETERS:
+#
+#    TARGET                    - Application name
+#    ARCH                      - Device architecture name
+#    MCU                       - Microcontroller device model name
+#    SRC                       - List of input source files (*.c, *.cpp, *.S)
+#    F_USB                     - Speed of the input clock of the USB controller
+#                                in Hz
+#    LUFA_PATH                 - Path to the LUFA library core
+#
+# OPTIONAL PARAMETERS:
+#
+#    BOARD                     - LUFA board hardware
+#    OPTIMIZATION              - Optimization level
+#    C_STANDARD                - C Language Standard to use
+#    CPP_STANDARD              - C++ Language Standard to use
+#    F_CPU                     - Speed of the CPU, in Hz
+#    C_FLAGS                   - Flags to pass to the C compiler only
+#    CPP_FLAGS                 - Flags to pass to the C++ compiler only
+#    ASM_FLAGS                 - Flags to pass to the assembler only
+#    CC_FLAGS                  - Common flags to pass to the C/C++ compiler and
+#                                assembler
+#    LD_FLAGS                  - Flags to pass to the linker
+#    OBJDIR                    - Directory for the output object and dependency
+#                                files; if equal to ".", the output files will
+#                                be generated in the same folder as the sources
+#    OBJECT_FILES              - Extra object files to link in to the binaries
+#    DEBUG_FORMAT              - Format of the debugging information to
+#                                generate in the compiled object files
+#    DEBUG_LEVEL               - Level the debugging information to generate in
+#                                the compiled object files
+#
+# PROVIDED VARIABLES:
+#
+#    (None)
+#
+# PROVIDED MACROS:
+#
+#    (None)
+#
+# -----------------------------------------------------------------------------
+
+SHELL = /bin/sh
+
+ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
+ERROR_IF_EMPTY   ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
+ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
+
+# Default values of optionally user-supplied variables
+BOARD           ?= NONE
+OPTIMIZATION    ?= s
+F_CPU           ?=
+C_STANDARD      ?= gnu99
+CPP_STANDARD    ?= gnu++98
+C_FLAGS         ?=
+CPP_FLAGS       ?=
+ASM_FLAGS       ?=
+CC_FLAGS        ?=
+OBJDIR          ?= .
+OBJECT_FILES    ?=
+DEBUG_FORMAT    ?= dwarf-2
+DEBUG_LEVEL     ?= 3
+
+# Sanity check user supplied values
+$(foreach MANDATORY_VAR, $(LUFA_BUILD_MANDATORY_VARS), $(call ERROR_IF_UNSET, $(MANDATORY_VAR)))
+$(call ERROR_IF_EMPTY, MCU)
+$(call ERROR_IF_EMPTY, TARGET)
+$(call ERROR_IF_EMPTY, ARCH)
+$(call ERROR_IF_EMPTY, F_USB)
+$(call ERROR_IF_EMPTY, LUFA_PATH)
+$(call ERROR_IF_EMPTY, BOARD)
+$(call ERROR_IF_EMPTY, OPTIMIZATION)
+$(call ERROR_IF_EMPTY, C_STANDARD)
+$(call ERROR_IF_EMPTY, CPP_STANDARD)
+$(call ERROR_IF_EMPTY, OBJDIR)
+$(call ERROR_IF_EMPTY, DEBUG_FORMAT)
+$(call ERROR_IF_EMPTY, DEBUG_LEVEL)
+
+# Determine the utility prefix to use for the selected architecture
+ifeq ($(ARCH), AVR8)
+   CROSS        := avr
+else ifeq ($(ARCH), XMEGA)
+   CROSS        := avr
+   $(warning The XMEGA device support is currently EXPERIMENTAL (incomplete and/or non-functional), and is included for preview purposes only.)
+else ifeq ($(ARCH), UC3)
+   CROSS        := avr32
+   $(warning The UC3 device support is currently EXPERIMENTAL (incomplete and/or non-functional), and is included for preview purposes only.)
+else
+   $(error Unsupported architecture "$(ARCH)")
+endif
+
+# Output Messages
+MSG_COMPILE_CMD  := ' [GCC]     :'
+MSG_ASSEMBLE_CMD := ' [GAS]     :'
+MSG_NM_CMD       := ' [NM]      :'
+MSG_REMOVE_CMD   := ' [RM]      :'
+MSG_LINK_CMD     := ' [LNK]     :'
+MSG_ARCHIVE_CMD  := ' [AR]      :'
+MSG_SIZE_CMD     := ' [SIZE]    :'
+MSG_OBJCPY_CMD   := ' [OBJCPY]  :'
+MSG_OBJDMP_CMD   := ' [OBJDMP]  :'
+
+# Convert input source file list to differentiate them by type
+C_SOURCE   := $(filter %.c, $(SRC))
+CPP_SOURCE := $(filter %.cpp, $(SRC))
+ASM_SOURCE := $(filter %.S, $(SRC))
+
+# Create a list of unknown source file types, if any are found throw an error
+UNKNOWN_SOURCE := $(filter-out $(C_SOURCE) $(CPP_SOURCE) $(ASM_SOURCE), $(SRC))
+ifneq ($(UNKNOWN_SOURCE),)
+   $(error Unknown input source file formats: $(UNKNOWN_SOURCE))
+endif
+
+# Convert input source filenames into a list of required output object files
+OBJECT_FILES += $(addsuffix .o, $(basename $(SRC)))
+ifneq ($(OBJDIR),.)
+   $(shell mkdir $(OBJDIR) 2> /dev/null)   
+   VPATH           += $(dir $(SRC))
+   OBJECT_FILES    := $(addprefix $(patsubst %/,%,$(OBJDIR))/, $(notdir $(OBJECT_FILES)))
+   
+   # Check if any object file (without path) appears more than once in the object file list
+   ifneq ($(words $(sort $(OBJECT_FILES))), $(words $(OBJECT_FILES)))
+       $(error Cannot build with OBJDIR parameter set - one or more object file name is not unique)
+   endif
+endif
+
+# Create a list of dependency files from the list of object files
+DEPENDENCY_FILES := $(OBJECT_FILES:%.o=%.d)
+
+# Create a list of common flags to pass to the compiler/linker/assembler
+BASE_CC_FLAGS    := -pipe -g$(DEBUG_FORMAT) -g$(DEBUG_LEVEL)
+ifeq ($(ARCH), AVR8)
+   BASE_CC_FLAGS += -mmcu=$(MCU) -fshort-enums -fno-inline-small-functions -fpack-struct
+else ifeq ($(ARCH), XMEGA)
+   BASE_CC_FLAGS += -mmcu=$(MCU) -fshort-enums -fno-inline-small-functions -fpack-struct
+else ifeq ($(ARCH), UC3)
+   BASE_CC_FLAGS += -mpart=$(MCU:at32%=%) -masm-addr-pseudos
+endif
+BASE_CC_FLAGS += -Wall -fno-strict-aliasing -funsigned-char -funsigned-bitfields -ffunction-sections
+BASE_CC_FLAGS += -I. -I$(patsubst %/,%,$(LUFA_PATH))/..
+BASE_CC_FLAGS += -DARCH=ARCH_$(ARCH) -DBOARD=BOARD_$(BOARD) -DF_USB=$(F_USB)UL
+ifneq ($(F_CPU),)
+   BASE_CC_FLAGS += -DF_CPU=$(F_CPU)UL
+endif
+
+# Additional language specific compiler flags
+BASE_C_FLAGS   := -x c -O$(OPTIMIZATION) -std=$(C_STANDARD) -Wstrict-prototypes
+BASE_CPP_FLAGS := -x c++ -O$(OPTIMIZATION) -std=$(CPP_STANDARD)
+BASE_ASM_FLAGS := -x assembler-with-cpp
+
+# Create a list of flags to pass to the linker
+BASE_LD_FLAGS := -lm -Wl,-Map=$(TARGET).map,--cref -Wl,--gc-sections -Wl,--relax 
+ifeq ($(ARCH), AVR8)
+   BASE_LD_FLAGS += -mmcu=$(MCU)
+else ifeq ($(ARCH), XMEGA)
+   BASE_LD_FLAGS += -mmcu=$(MCU)
+else ifeq ($(ARCH), UC3)
+   BASE_LD_FLAGS += -mpart=$(MCU:at32%=%) --rodata-writable --direct-data
+endif
+
+# Determine flags to pass to the size utility based on its reported features (only invoke if size target required)
+size: SIZE_MCU_FLAG    := $(shell $(CROSS)-size --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+size: SIZE_FORMAT_FLAG := $(shell $(CROSS)-size --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
+
+build_begin:
+       @echo ""
+       @echo Begin compilation of project \"$(TARGET)\"...
+       @echo ""
+       
+build_end:
+       @echo Finished building project \"$(TARGET)\".
+       @echo ""
+
+gcc-version:
+       @$(CROSS)-gcc --version
+
+check-source:
+       @for f in $(SRC); do \
+               if [ ! -f $$f ]; then \
+                       echo "Error: Source file not found: $$f"; \
+                       exit 1; \
+               fi; \
+        done
+
+size: $(TARGET).elf
+       @echo $(MSG_SIZE_CMD) Determining size of \"$<\"
+       @echo ""
+       $(CROSS)-size $(SIZE_MCU_FLAG) $(SIZE_FORMAT_FLAG) $< ; 2>/dev/null;
+
+symbol-sizes: $(TARGET).elf
+       @echo $(MSG_NM_CMD) Extracting \"$<\" symbols with decimal byte sizes
+       $(CROSS)-nm --size-sort --demangle --radix=d $<
+
+mostlyclean:
+       @echo $(MSG_REMOVE_CMD) Removing object files of \"$(TARGET)\"
+       rm -f $(OBJECT_FILES)
+       @echo $(MSG_REMOVE_CMD) Removing dependency files of \"$(TARGET)\"
+       rm -f $(DEPENDENCY_FILES)
+
+clean: mostlyclean
+       @echo $(MSG_REMOVE_CMD) Removing output files of \"$(TARGET)\"
+       rm -f $(TARGET).elf $(TARGET).hex $(TARGET).eep $(TARGET).map $(TARGET).lss $(TARGET).sym $(TARGET).a
+
+all: build_begin check-source gcc-version elf hex lss sym size build_end
+
+lib: lib$(TARGET).a
+elf: $(TARGET).elf
+hex: $(TARGET).hex $(TARGET).eep
+lss: $(TARGET).lss
+sym: $(TARGET).sym
+
+$(OBJDIR)/%.o: %.c $(MAKEFILE_LIST)
+       @echo $(MSG_COMPILE_CMD) Compiling C file \"$(notdir $<)\"
+       $(CROSS)-gcc -c $(BASE_CC_FLAGS) $(BASE_C_FLAGS) $(CC_FLAGS) $(C_FLAGS) -MMD -MP -MF $(@:%.o=%.d) $< -o $@
+
+$(OBJDIR)/%.o: %.cpp $(MAKEFILE_LIST)
+       @echo $(MSG_COMPILE_CMD) Compiling C++ file \"$(notdir $<)\"
+       $(CROSS)-gcc -c $(BASE_CC_FLAGS) $(BASE_CPP_FLAGS) $(CC_FLAGS) $(CPP_FLAGS) -MMD -MP -MF $(@:%.o=%.d) $< -o $@
+       
+$(OBJDIR)/%.o: %.S $(MAKEFILE_LIST)
+       @echo $(MSG_ASSEMBLE_CMD) Assembling \"$(notdir $<)\"
+       $(CROSS)-gcc -c $(BASE_CC_FLAGS) $(BASE_ASM_FLAGS) $(CC_FLAGS) $(ASM_FLAGS) -MMD -MP -MF $(@:%.o=%.d) $< -o $@
+
+.PRECIOUS  : $(OBJECT_FILES)
+.SECONDARY : %.a
+%.a: $(OBJECT_FILES)
+       @echo $(MSG_ARCHIVE_CMD) Archiving object files into \"$@\"
+       $(CROSS)-ar rcs $@ $(OBJECT_FILES)
+
+.PRECIOUS  : $(OBJECT_FILES)
+.SECONDARY : %.elf
+%.elf: $(OBJECT_FILES)
+       @echo $(MSG_LINK_CMD) Linking object files into \"$@\"
+       $(CROSS)-gcc $(BASE_LD_FLAGS) $(LD_FLAGS) $^ -o $@
+
+%.hex: %.elf
+       @echo $(MSG_OBJCPY_CMD) Extracting HEX file data from \"$<\"
+       $(CROSS)-objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature $< $@
+
+%.eep: %.elf
+       @echo $(MSG_OBJCPY_CMD) Extracting EEP file data from \"$<\"
+       $(CROSS)-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings -O ihex $< $@ || exit 0
+
+%.lss: %.elf
+       @echo $(MSG_OBJDMP_CMD) Extracting LSS file data from \"$<\"
+       $(CROSS)-objdump -h -S -z $< > $@
+
+%.sym: %.elf
+       @echo $(MSG_NM_CMD) Extracting SYM file data from \"$<\"
+       $(CROSS)-nm -n $< > $@
+
+# Include build dependency files
+-include $(DEPENDENCY_FILES)
+
+# Phony build targets for this module
+.PHONY: build_begin build_end gcc-version check-source size symbol-sizes lib elf hex lss clean mostlyclean
diff --git a/LUFA/Build/lufa_core.mk b/LUFA/Build/lufa_core.mk
new file mode 100644 (file)
index 0000000..f44b407
--- /dev/null
@@ -0,0 +1,152 @@
+#
+#             LUFA Library
+#     Copyright (C) Dean Camera, 2012.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#           www.lufa-lib.org
+#
+
+LUFA_BUILD_MODULES         += CORE
+LUFA_BUILD_TARGETS         += help list_targets list_modules list_mandatory list_optional list_provided list_macros
+LUFA_BUILD_MANDATORY_VARS  += 
+LUFA_BUILD_OPTIONAL_VARS   += 
+LUFA_BUILD_PROVIDED_VARS   += 
+LUFA_BUILD_PROVIDED_MACROS += 
+
+# -----------------------------------------------------------------------------
+#               LUFA Core Build System Makefile Module.
+# -----------------------------------------------------------------------------
+# DESCRIPTION:
+#   Provides a set of core build targets for the LUFA build system
+# -----------------------------------------------------------------------------
+# TARGETS:
+#
+#    help                      - Build system help
+#    list_targets              - List all build targets
+#    list_modules              - List all build modules
+#    list_mandatory            - List all mandatory make variables required by
+#                                the included build modules of the application
+#    list_optional             - List all optional make variables required by
+#                                the included build modules of the application
+#    list_provided             - List all provided make variables from the
+#                                included build modules of the application
+#    list_macros               - List all provided make macros from the
+#                                included build modules of the application
+#
+# MANDATORY PARAMETERS:
+#
+#    (None)
+#
+# OPTIONAL PARAMETERS:
+#
+#    (None)
+#
+# PROVIDED VARIABLES:
+#
+#    (None)
+#
+# PROVIDED MACROS:
+#
+#    (None)
+#
+# -----------------------------------------------------------------------------
+
+SHELL = /bin/sh
+
+# Build sorted and filtered lists of the included build module data
+SORTED_LUFA_BUILD_MODULES   = $(sort $(LUFA_BUILD_MODULES))
+SORTED_LUFA_BUILD_TARGETS   = $(sort $(LUFA_BUILD_TARGETS))
+SORTED_LUFA_MANDATORY_VARS  = $(sort $(LUFA_BUILD_MANDATORY_VARS))
+SORTED_LUFA_OPTIONAL_VARS   = $(filter-out $(SORTED_LUFA_MANDATORY_VARS), $(sort $(LUFA_BUILD_OPTIONAL_VARS)))
+SORTED_LUFA_PROVIDED_VARS   = $(sort $(LUFA_BUILD_PROVIDED_VARS))
+SORTED_LUFA_PROVIDED_MACROS = $(sort $(LUFA_BUILD_PROVIDED_MACROS))
+
+# Create printable versions of the sorted build module data (use "(None)" when no data is available)
+PRINTABLE_LUFA_BUILD_MODULES   = $(if $(strip $(SORTED_LUFA_BUILD_MODULES)), $(SORTED_LUFA_BUILD_MODULES), (None))
+PRINTABLE_LUFA_BUILD_TARGETS   = $(if $(strip $(SORTED_LUFA_BUILD_TARGETS)), $(SORTED_LUFA_BUILD_TARGETS), (None))
+PRINTABLE_LUFA_MANDATORY_VARS  = $(if $(strip $(SORTED_LUFA_MANDATORY_VARS)), $(SORTED_LUFA_MANDATORY_VARS), (None))
+PRINTABLE_LUFA_OPTIONAL_VARS   = $(if $(strip $(SORTED_LUFA_OPTIONAL_VARS)), $(SORTED_LUFA_OPTIONAL_VARS), (None))
+PRINTABLE_LUFA_PROVIDED_VARS   = $(if $(strip $(SORTED_LUFA_PROVIDED_VARS)), $(SORTED_LUFA_PROVIDED_VARS), (None))
+PRINTABLE_LUFA_PROVIDED_MACROS = $(if $(strip $(SORTED_LUFA_PROVIDED_MACROS)), $(SORTED_LUFA_PROVIDED_MACROS), (None))
+
+help:
+       @echo "==================================================================="
+       @echo "                       LUFA Build System 2.0                       "
+       @echo "      (C) Dean Camera, 2012 { dean @ fourwalledcubicle . com }     "
+       @echo "==================================================================="
+       @echo "DESCRIPTION:                                                       "
+       @echo " This build system is a set of makefile modules for (GNU) Make, to "
+       @echo " provide a simple system for building LUFA powered applications.   "
+       @echo " Each makefile module can be included from within a user makefile, "
+       @echo " to expose the build rules documented in the comments at the top of"
+       @echo " each build module.                                                "
+       @echo "                                                                   "
+       @echo "USAGE:                                                             "     
+       @echo " To execute a rule, define all variables indicated in the desired  "
+       @echo " module as a required parameter before including the build module  "
+       @echo " in your project makefile. Parameters marked as optional will      "
+       @echo " assume a default value in the modules if not user-assigned.       "
+       @echo "                                                                   "
+       @echo " By default the target output shows both a friendly summary, as    "
+       @echo " well as the actual invoked command. To suppress the output of the "
+       @echo " invoked commands and show only the friendly command output, run   "
+       @echo " make with the \"-s\" switch added before the target(s).           "             
+       @echo "==================================================================="
+       @echo "                                                                   "
+       @echo "  Currently used build system modules in this application:         "
+       @echo "                                                                   "
+       @printf " %b" "$(PRINTABLE_LUFA_BUILD_MODULES:%=   - %\n)"
+       @echo "                                                                   "
+       @echo "                                                                   "
+       @echo "  Currently available build targets in this application:           "
+       @echo "                                                                   "
+       @printf " %b" "$(PRINTABLE_LUFA_BUILD_TARGETS:%=   - %\n)"
+       @echo "                                                                   "
+       @echo "                                                                   "
+       @echo "  Mandatory variables required by the selected build Modules:      "
+       @echo "                                                                   "
+       @printf " %b" "$(PRINTABLE_LUFA_MANDATORY_VARS:%=   - %\n)"
+       @echo "                                                                   "
+       @echo "                                                                   "
+       @echo "  Optional variables required by the selected build Modules:       "
+       @echo "                                                                   "
+       @printf " %b" "$(PRINTABLE_LUFA_OPTIONAL_VARS:%=   - %\n)"
+       @echo "                                                                   "
+       @echo "                                                                   "
+       @echo "  Variables provided by the selected build Modules:                "
+       @echo "                                                                   "
+       @printf " %b" "$(PRINTABLE_LUFA_PROVIDED_VARS:%=   - %\n)"
+       @echo "                                                                   "
+       @echo "                                                                   "
+       @echo "  Macros provided by the selected build Modules:                   "
+       @echo "                                                                   "
+       @printf " %b" "$(PRINTABLE_LUFA_PROVIDED_MACROS:%=   - %\n)"
+       @echo "                                                                   "
+       @echo "==================================================================="
+       @echo "        The LUFA BuildSystem 2.0 - Powered By Unicorns (tm)        "
+       @echo "==================================================================="
+       
+list_modules:
+       @echo Currently Used Build System Modules: $(PRINTABLE_LUFA_BUILD_MODULES)
+
+list_targets:
+       @echo Currently Available Build Targets: $(PRINTABLE_LUFA_BUILD_TARGETS)        
+
+list_mandatory:
+       @echo Mandatory Variables for Included Modules: $(PRINTABLE_LUFA_MANDATORY_VARS)
+       
+list_optional:
+       @echo Optional Variables for Included Modules: $(PRINTABLE_LUFA_OPTIONAL_VARS)
+
+list_provided:
+       @echo Variables Provided by the Included Modules: $(PRINTABLE_LUFA_PROVIDED_VARS)
+
+list_macros:
+       @echo Macros Provided by the Included Modules: $(PRINTABLE_LUFA_PROVIDED_MACROS)
+
+# Disable default in-built make rules (those that are needed are explicitly
+# defined, and doing so has performance benefits when recursively building)
+.SUFFIXES:
+
+# Phony build targets for this module
+.PHONY: help list_modules list_targets list_mandatory list_optional list_provided list_macros
diff --git a/LUFA/Build/lufa_cppcheck.mk b/LUFA/Build/lufa_cppcheck.mk
new file mode 100644 (file)
index 0000000..1593a42
--- /dev/null
@@ -0,0 +1,104 @@
+#
+#             LUFA Library
+#     Copyright (C) Dean Camera, 2012.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#           www.lufa-lib.org
+#
+
+LUFA_BUILD_MODULES         += CPPCHECK
+LUFA_BUILD_TARGETS         += cppcheck cppcheck-config
+LUFA_BUILD_MANDATORY_VARS  += SRC
+LUFA_BUILD_OPTIONAL_VARS   += CPPCHECK_INCLUDES CPPCHECK_EXCLUDES CPPCHECK_MSG_TEMPLATE CPPCHECK_ENABLE \
+                              CPPCHECK_SUPPRESS CPPCHECK_FAIL_ON_WARNING CPPCHECK_QUIET CPPCHECK_FLAGS
+LUFA_BUILD_PROVIDED_VARS   += 
+LUFA_BUILD_PROVIDED_MACROS += 
+
+# -----------------------------------------------------------------------------
+#                LUFA CPPCheck Buildsystem Makefile Module.
+# -----------------------------------------------------------------------------
+# DESCRIPTION:
+#   Provides a set of targets to scan a project with the free "cppcheck" static
+#   analysis tool, to check for code errors at runtime (see http://cppcheck.sourceforge.net).
+# -----------------------------------------------------------------------------
+# TARGETS:
+#
+#    cppcheck                  - Scan the project with CPPCheck
+#    cppcheck-config           - Use CPPCheck to look for missing include files
+#
+# MANDATORY PARAMETERS:
+#
+#    SRC                       - List of source files to statically analyze
+#
+# OPTIONAL PARAMETERS:
+#
+#    CPPCHECK_INCLUDES         - Extra include paths to search for missing
+#                                header files
+#    CPPCHECK_EXCLUDES         - Source file paths to exclude checking (can be
+#                                a path fragment if desired)
+#    CPPCHECK_MSG_TEMPLATE     - Template for cppcheck error and warning output
+#    CPPCHECK_ENABLE           - General cppcheck category checks to enable
+#    CPPCHECK_SUPPRESS         - Specific cppcheck warnings to disable by ID
+#    CPPCHECK_FAIL_ON_WARNING  - Set to Y to fail the build on cppcheck
+#                                warnings, N to continue even if warnings occur
+#    CPPCHECK_QUIET            - Enable cppcheck verbose or quiet output mode
+#    CPPCHECK_FLAGS            - Additional flags to pass to cppcheck
+#
+# PROVIDED VARIABLES:
+#
+#    (None)
+#
+# PROVIDED MACROS:
+#
+#    (None)
+#
+# -----------------------------------------------------------------------------
+
+SHELL = /bin/sh
+
+ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
+ERROR_IF_EMPTY   ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
+ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
+
+# Default values of optionally user-supplied variables
+CPPCHECK_INCLUDES            ?=
+CPPCHECK_EXCLUDES            ?=
+CPPCHECK_MSG_TEMPLATE        ?= {file}:{line}: {severity} ({id}): {message}
+CPPCHECK_ENABLE              ?= all
+CPPCHECK_SUPPRESS            ?= variableScope missingInclude
+CPPCHECK_FAIL_ON_WARNING     ?= Y
+CPPCHECK_QUIET               ?= Y
+CPPCHECK_FLAGS               ?= 
+
+# Sanity check user supplied values
+$(foreach MANDATORY_VAR, $(LUFA_BUILD_MANDATORY_VARS), $(call ERROR_IF_UNSET, $(MANDATORY_VAR)))
+$(call ERROR_IF_EMPTY, SRC)
+$(call ERROR_IF_EMPTY, CPPCHECK_MSG_TEMPLATE)
+$(call ERROR_IF_EMPTY, CPPCHECK_ENABLE)
+$(call ERROR_IF_NONBOOL, CPPCHECK_FAIL_ON_WARNING)
+$(call ERROR_IF_NONBOOL, CPPCHECK_QUIET)
+
+# Build a default argument list for cppcheck
+BASE_CPPCHECK_FLAGS := --template="$(CPPCHECK_MSG_TEMPLATE)" $(CPPCHECK_INCLUDES:%=-I%) $(CPPCHECK_EXCLUDES:%=-i%) --inline-suppr --force --std=c99
+
+# Sanity check parameters and construct additional command line arguments to cppcheck
+ifeq ($(CPPCHECK_FAIL_ON_WARNING), Y)
+   BASE_CPPCHECK_FLAGS += --error-exitcode=1
+endif
+ifeq ($(CPPCHECK_QUIET), Y)
+   BASE_CPPCHECK_FLAGS += --quiet
+endif
+
+# Output Messages
+MSG_CPPCHECK_CMD         := ' [CPPCHECK]:'
+
+cppcheck-config:
+       @echo $(MSG_CPPCHECK_CMD) Checking cppcheck configuration check on source files
+       cppcheck $(BASE_CPPCHECK_FLAGS) --check-config $(CPPCHECK_FLAGS) $(SRC)
+
+cppcheck:
+       @echo $(MSG_CPPCHECK_CMD) Performing static analysis on source files
+       cppcheck $(BASE_CPPCHECK_FLAGS) --enable=$(CPPCHECK_ENABLE) $(CPPCHECK_SUPPRESS:%=--suppress=%) $(CPPCHECK_FLAGS) $(SRC)
+
+# Phony build targets for this module
+.PHONY: cppcheck-config cppcheck
diff --git a/LUFA/Build/lufa_dfu.mk b/LUFA/Build/lufa_dfu.mk
new file mode 100644 (file)
index 0000000..ba75f14
--- /dev/null
@@ -0,0 +1,93 @@
+#
+#             LUFA Library
+#     Copyright (C) Dean Camera, 2012.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#           www.lufa-lib.org
+#
+
+LUFA_BUILD_MODULES         += DFU
+LUFA_BUILD_TARGETS         += flip flip-ee dfu dfu-ee
+LUFA_BUILD_MANDATORY_VARS  += MCU TARGET
+LUFA_BUILD_OPTIONAL_VARS   += 
+LUFA_BUILD_PROVIDED_VARS   += 
+LUFA_BUILD_PROVIDED_MACROS += 
+
+# -----------------------------------------------------------------------------
+#               LUFA DFU Bootloader Buildsystem Makefile Module.
+# -----------------------------------------------------------------------------
+# DESCRIPTION:
+#   Provides a set of targets to re-program a device currently running a DFU
+#   class bootloader with a project's FLASH and EEPROM files.
+# -----------------------------------------------------------------------------
+# TARGETS:
+#
+#    flip                      - Program FLASH into target via Atmel FLIP
+#    flip-ee                   - Program EEPROM into target via Atmel FLIP
+#    dfu                       - Program FLASH into target via dfu-programmer
+#    dfu-ee                    - Program EEPROM into target via dfu-programmer
+#
+# MANDATORY PARAMETERS:
+#
+#    MCU                       - Microcontroller device model name
+#    TARGET                    - Application name
+#
+# OPTIONAL PARAMETERS:
+#
+#    (None)
+#
+# PROVIDED VARIABLES:
+#
+#    (None)
+#
+# PROVIDED MACROS:
+#
+#    (None)
+#
+# -----------------------------------------------------------------------------
+
+SHELL = /bin/sh
+
+ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
+ERROR_IF_EMPTY   ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
+ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
+
+# Sanity-check values of mandatory user-supplied variables
+$(foreach MANDATORY_VAR, $(LUFA_BUILD_MANDATORY_VARS), $(call ERROR_IF_UNSET, $(MANDATORY_VAR)))
+$(call ERROR_IF_EMPTY, MCU)
+$(call ERROR_IF_EMPTY, TARGET)
+
+# Output Messages
+MSG_COPY_CMD   := ' [CP]      :'
+MSG_REMOVE_CMD := ' [RM]      :'
+MSG_DFU_CMD    := ' [DFU]     :'
+
+flip: $(TARGET).hex $(MAKEFILE_LIST)
+       @echo $(MSG_DFU_CMD) Programming FLASH with batchisp using \"$<\"
+       batchisp -hardware usb -device $(MCU) -operation erase f
+       batchisp -hardware usb -device $(MCU) -operation loadbuffer $< program
+       batchisp -hardware usb -device $(MCU) -operation start reset 0
+
+flip-ee: $(TARGET).eep $(MAKEFILE_LIST)
+       @echo $(MSG_DFU_CMD) Copying EEP file to temporary file \"$<.hex\"
+       cp $< $<.hex
+       @echo $(MSG_DFU_CMD) Programming EEPROM with batchisp using \"$<.hex\"
+       batchisp -hardware usb -device $(MCU) -operation memory EEPROM erase
+       batchisp -hardware usb -device $(MCU) -operation memory EEPROM loadbuffer $<.hex program
+       batchisp -hardware usb -device $(MCU) -operation start reset 0
+       @echo $(MSG_DFU_CMD) Removing temporary file \"$<.hex\"
+       rm $<.hex
+       
+dfu: $(TARGET).hex $(MAKEFILE_LIST)
+       @echo $(MSG_DFU_CMD) Programming FLASH with dfu-programmer using \"$<\"
+       dfu-programmer $(MCU) erase
+       dfu-programmer $(MCU) flash $<
+       dfu-programmer $(MCU) reset
+
+dfu-ee: $(TARGET).eep $(MAKEFILE_LIST)
+       @echo $(MSG_DFU_CMD) Programming EEPROM with dfu-programmer using \"$<\"
+       dfu-programmer $(MCU) eeprom-flash $<
+       dfu-programmer $(MCU) reset
+       
+# Phony build targets for this module
+.PHONY: flip flip-ee dfu dfu-ee
diff --git a/LUFA/Build/lufa_doxygen.mk b/LUFA/Build/lufa_doxygen.mk
new file mode 100644 (file)
index 0000000..7f73343
--- /dev/null
@@ -0,0 +1,81 @@
+#
+#             LUFA Library
+#     Copyright (C) Dean Camera, 2012.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#           www.lufa-lib.org
+#
+
+LUFA_BUILD_MODULES         += DOXYGEN
+LUFA_BUILD_TARGETS         += doxygen
+LUFA_BUILD_MANDATORY_VARS  += LUFA_PATH
+LUFA_BUILD_OPTIONAL_VARS   += DOXYGEN_CONF DOXYGEN_FAIL_ON_WARNING DOXYGEN_OVERRIDE_PARAMS
+LUFA_BUILD_PROVIDED_VARS   += 
+LUFA_BUILD_PROVIDED_MACROS += 
+
+# -----------------------------------------------------------------------------
+#                 LUFA Doxygen Buildsystem Makefile Module.
+# -----------------------------------------------------------------------------
+# DESCRIPTION:
+#   Provides a set of targets to automatically build Doxygen documentation for
+#   a project (see www.doxygen.org).
+# -----------------------------------------------------------------------------
+# TARGETS:
+#
+#    doxygen                   - Build Doxygen Documentation
+#
+# MANDATORY PARAMETERS:
+#
+#    LUFA_PATH                 - Path to the LUFA library core
+#
+# OPTIONAL PARAMETERS:
+#
+#    DOXYGEN_CONF              - Doxygen configuration filename
+#    DOXYGEN_FAIL_ON_WARNING   - Set to Y to fail the build on Doxygen warnings,
+#                                N to continue even if warnings occur
+#    DOXYGEN_OVERRIDE_PARAMS   - Parameters to override in the doxygen
+#                                configuration file
+# PROVIDED VARIABLES:
+#
+#    (None)
+#
+# PROVIDED MACROS:
+#
+#    (None)
+#
+# -----------------------------------------------------------------------------
+
+SHELL = /bin/sh
+
+ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
+ERROR_IF_EMPTY   ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
+ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
+
+# Default values of optionally user-supplied variables
+DOXYGEN_CONF            ?= Doxygen.conf
+DOXYGEN_FAIL_ON_WARNING ?= Y
+DOXYGEN_OVERRIDE_PARAMS ?= QUIET=YES HTML_STYLESHEET=$(patsubst %/,%,$(LUFA_PATH))/DoxygenPages/Style/Style.css
+
+# Sanity check user supplied values
+$(foreach MANDATORY_VAR, $(LUFA_BUILD_MANDATORY_VARS), $(call ERROR_IF_UNSET, $(MANDATORY_VAR)))
+$(call ERROR_IF_EMPTY, DOXYGEN_CONF)
+$(call ERROR_IF_EMPTY, LUFA_PATH)
+$(call ERROR_IF_NONBOOL, DOXYGEN_FAIL_ON_WARNING)
+
+# Output Messages
+MSG_DOXYGEN_CMD         := ' [DOXYGEN] :'
+
+# Determine Doxygen invocation command
+BASE_DOXYGEN_CMD := ( cat $(DOXYGEN_CONF) $(DOXYGEN_OVERRIDE_PARAMS:%=; echo "%") ) | doxygen -
+ifeq ($(DOXYGEN_FAIL_ON_WARNING), Y)
+   DOXYGEN_CMD := if ( $(BASE_DOXYGEN_CMD) 2>&1 | grep -v "warning: ignoring unsupported tag" ;); then exit 1; fi;
+else
+   DOXYGEN_CMD := $(BASE_DOXYGEN_CMD)
+endif
+
+doxygen:
+       @echo $(MSG_DOXYGEN_CMD) Configuration file \"$(DOXYGEN_CONF)\" with parameters \"$(DOXYGEN_OVERRIDE_PARAMS)\"
+       $(DOXYGEN_CMD)
+
+# Phony build targets for this module
+.PHONY: doxygen
diff --git a/LUFA/Build/lufa_hid.mk b/LUFA/Build/lufa_hid.mk
new file mode 100644 (file)
index 0000000..a74197a
--- /dev/null
@@ -0,0 +1,88 @@
+#
+#             LUFA Library
+#     Copyright (C) Dean Camera, 2012.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#           www.lufa-lib.org
+#
+
+LUFA_BUILD_MODULES         += HID
+LUFA_BUILD_TARGETS         += hid hid-ee teensy teensy-ee
+LUFA_BUILD_MANDATORY_VARS  += MCU TARGET
+LUFA_BUILD_OPTIONAL_VARS   += 
+LUFA_BUILD_PROVIDED_VARS   += 
+LUFA_BUILD_PROVIDED_MACROS += 
+
+# -----------------------------------------------------------------------------
+#               LUFA HID Bootloader Buildsystem Makefile Module.
+# -----------------------------------------------------------------------------
+# DESCRIPTION:
+#   Provides a set of targets to re-program a device currently running a HID
+#   class bootloader with a project's FLASH files.
+# -----------------------------------------------------------------------------
+# TARGETS:
+#
+#    hid                       - Program FLASH into target via
+#                                hid_bootloader_cli
+#    hid-ee                    - Program EEPROM into target via a temporary
+#                                AVR application and hid_bootloader_cli
+#    teensy                    - Program FLASH into target via
+#                                teensy_loader_cli
+#    teensy-ee                 - Program EEPROM into target via a temporary
+#                                AVR application and teensy_loader_cli
+#
+# MANDATORY PARAMETERS:
+#
+#    MCU                       - Microcontroller device model name
+#    TARGET                    - Application name
+#
+# OPTIONAL PARAMETERS:
+#
+#    (None)
+#
+# PROVIDED VARIABLES:
+#
+#    (None)
+#
+# PROVIDED MACROS:
+#
+#    (None)
+#
+# -----------------------------------------------------------------------------
+
+ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
+ERROR_IF_EMPTY   ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
+ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
+
+# Sanity-check values of mandatory user-supplied variables
+$(foreach MANDATORY_VAR, $(LUFA_BUILD_MANDATORY_VARS), $(call ERROR_IF_UNSET, $(MANDATORY_VAR)))
+$(call ERROR_IF_EMPTY, MCU)
+$(call ERROR_IF_EMPTY, TARGET)
+
+# Output Messages
+MSG_HID_BOOTLOADER_CMD := ' [HID]     :'
+MSG_OBJCPY_CMD         := ' [OBJCPY]  :'
+MSG_MAKE_CMD           := ' [MAKE]    :'
+
+hid: $(TARGET).hex $(MAKEFILE_LIST)
+       @echo $(MSG_HID_BOOTLOADER_CMD) Programming FLASH with hid_bootloader_cli using \"$<\"
+       hid_bootloader_cli -mmcu=$(MCU) -v $<
+
+hid-ee: $(TARGET).eep $(MAKEFILE_LIST)
+       @echo $(MSG_OBJCPY_CMD) Converting \"$<\" to a binary file \"InputEEData.bin\"
+       avr-objcopy -I ihex -O binary $< $(patsubst %/,%,$(LUFA_PATH))/Build/HID_EEPROM_Loader/InputEEData.bin
+       @echo $(MSG_MAKE_CMD) Making EEPROM loader application for \"$<\"
+       make -C $(patsubst %/,%,$(LUFA_PATH))/Build/HID_EEPROM_Loader/ MCU=$(MCU) clean hid
+
+teensy: $(TARGET).hex $(MAKEFILE_LIST)
+       @echo $(MSG_HID_BOOTLOADER_CMD) Programming FLASH with teensy_loader_cli using \"$<\"
+       teensy_loader_cli -mmcu=$(MCU) -v $<
+
+teensy-ee: $(TARGET).hex $(MAKEFILE_LIST)
+       @echo $(MSG_OBJCPY_CMD) Converting \"$<\" to a binary file \"InputEEData.bin\"
+       avr-objcopy -I ihex -O binary $< $(patsubst %/,%,$(LUFA_PATH))/Build/HID_EEPROM_Loader/InputEEData.bin
+       @echo $(MSG_MAKE_CMD) Making EEPROM loader application for \"$<\"
+       make -s -C $(patsubst %/,%,$(LUFA_PATH))/Build/HID_EEPROM_Loader/ MCU=$(MCU) clean hid-teensy
+       
+# Phony build targets for this module
+.PHONY: hid hid-ee teensy teensy-ee
diff --git a/LUFA/Build/lufa_sources.mk b/LUFA/Build/lufa_sources.mk
new file mode 100644 (file)
index 0000000..0e026c5
--- /dev/null
@@ -0,0 +1,116 @@
+#
+#             LUFA Library
+#     Copyright (C) Dean Camera, 2012.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#           www.lufa-lib.org
+#
+
+LUFA_BUILD_MODULES         += SOURCES
+LUFA_BUILD_TARGETS         += 
+LUFA_BUILD_MANDATORY_VARS  += LUFA_PATH ARCH
+LUFA_BUILD_OPTIONAL_VARS   += 
+LUFA_BUILD_PROVIDED_VARS   += LUFA_SRC_USB LUFA_SRC_USBCLASS LUFA_SRC_TEMPERATURE LUFA_SRC_SERIAL LUFA_SRC_TWI LUFA_SRC_PLATFORM
+LUFA_BUILD_PROVIDED_MACROS += 
+
+# -----------------------------------------------------------------------------
+#               LUFA Sources Buildsystem Makefile Module.
+# -----------------------------------------------------------------------------
+# DESCRIPTION:
+#   Provides a set of makefile variables for the various LUFA module sources.
+#   Once included, the sources required to use a given LUFA module will become
+#   available using the makefile variable names listed in the LUFA project
+#   documentation.
+# -----------------------------------------------------------------------------
+# TARGETS:
+#
+#    (None)
+#
+# MANDATORY PARAMETERS:
+#
+#    LUFA_PATH                 - Path to the LUFA library core
+#    ARCH                      - Device architecture name
+#
+# OPTIONAL PARAMETERS:
+#
+#    (None)
+#
+# PROVIDED VARIABLES:
+#
+#    LUFA_SRC_USB              - List of LUFA USB driver source files
+#    LUFA_SRC_USBCLASS         - List of LUFA USB Class driver source files
+#    LUFA_SRC_TEMPERATURE      - List of LUFA temperature sensor driver source
+#                                files
+#    LUFA_SRC_SERIAL           - List of LUFA Serial U(S)ART driver source files
+#    LUFA_SRC_TWI              - List of LUFA TWI driver source files
+#    LUFA_SRC_PLATFORM         - List of LUFA architecture specific platform
+#                                management source files
+#
+# PROVIDED MACROS:
+#
+#    (None)
+#
+# -----------------------------------------------------------------------------
+
+SHELL = /bin/sh
+
+ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
+ERROR_IF_EMPTY   ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
+ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
+
+# Sanity check user supplied values
+$(foreach MANDATORY_VAR, $(LUFA_BUILD_MANDATORY_VARS), $(call ERROR_IF_UNSET, $(MANDATORY_VAR)))
+$(call ERROR_IF_EMPTY, LUFA_PATH)
+$(call ERROR_IF_EMPTY, ARCH)
+
+# Allow LUFA_ROOT_PATH to be overridden elsewhere to support legacy LUFA makefiles
+LUFA_ROOT_PATH ?= $(patsubst %/,%,$(LUFA_PATH))
+
+# Construct LUFA module source variables
+LUFA_SRC_USB         := $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Device_$(ARCH).c          \
+                        $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Endpoint_$(ARCH).c        \
+                        $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Host_$(ARCH).c            \
+                        $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Pipe_$(ARCH).c            \
+                        $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/USBController_$(ARCH).c   \
+                        $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/USBInterrupt_$(ARCH).c    \
+                        $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/EndpointStream_$(ARCH).c  \
+                        $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/PipeStream_$(ARCH).c      \
+                        $(LUFA_ROOT_PATH)/Drivers/USB/Core/ConfigDescriptors.c               \
+                        $(LUFA_ROOT_PATH)/Drivers/USB/Core/DeviceStandardReq.c               \
+                        $(LUFA_ROOT_PATH)/Drivers/USB/Core/Events.c                          \
+                        $(LUFA_ROOT_PATH)/Drivers/USB/Core/HostStandardReq.c                 \
+                        $(LUFA_ROOT_PATH)/Drivers/USB/Core/USBTask.c                         \
+                        $(LUFA_ROOT_PATH)/Drivers/USB/Class/Common/HIDParser.c
+LUFA_SRC_USBCLASS    := $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/AudioClassDevice.c        \
+                        $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/CDCClassDevice.c          \
+                        $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/HIDClassDevice.c          \
+                        $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/MassStorageClassDevice.c  \
+                        $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/MIDIClassDevice.c         \
+                        $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/RNDISClassDevice.c        \
+                        $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/AndroidAccessoryClassHost.c \
+                        $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/AudioClassHost.c            \
+                        $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/CDCClassHost.c              \
+                        $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/HIDClassHost.c              \
+                        $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/MassStorageClassHost.c      \
+                        $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/MIDIClassHost.c             \
+                        $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/PrinterClassHost.c          \
+                        $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/RNDISClassHost.c            \
+                        $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/StillImageClassHost.c
+LUFA_SRC_TEMPERATURE := $(LUFA_ROOT_PATH)/Drivers/Board/Temperature.c
+LUFA_SRC_SERIAL      := $(LUFA_ROOT_PATH)/Drivers/Peripheral/$(ARCH)/Serial_$(ARCH).c
+LUFA_SRC_TWI         := $(LUFA_ROOT_PATH)/Drivers/Peripheral/$(ARCH)/TWI_$(ARCH).c
+
+ifeq ($(ARCH), UC3)
+   LUFA_SRC_PLATFORM := $(LUFA_ROOT_PATH)/Platform/UC3/Exception.S   \
+                        $(LUFA_ROOT_PATH)/Platform/UC3/InterruptManagement.c
+else
+   LUFA_SRC_PLATFORM :=
+endif
+
+# Build a list of all available module sources
+LUFA_SRC_ALL_FILES   := $(LUFA_SRC_USB)            \
+                        $(LUFA_SRC_USBCLASS)       \
+                        $(LUFA_SRC_TEMPERATURE)    \
+                        $(LUFA_SRC_SERIAL)         \
+                        $(LUFA_SRC_TWI)            \
+                                           $(LUFA_SRC_PLATFORM)
index 0c9dca3..06882dc 100644 (file)
 //             #define DEVICE_STATE_AS_GPIOR            {Insert Value Here}
 //             #define FIXED_NUM_CONFIGURATIONS         {Insert Value Here}
 //             #define CONTROL_ONLY_DEVICE
+//             #define MAX_ENDPOINT_INDEX               {Insert Value Here}
 //             #define NO_DEVICE_REMOTE_WAKEUP
 //             #define NO_DEVICE_SELF_POWER
 
index 6f3c1c7..655408a 100644 (file)
@@ -1,33 +1,36 @@
-#\r
-#             LUFA Library\r
-#     Copyright (C) Dean Camera, 2012.\r
-#\r
-#  dean [at] fourwalledcubicle [dot] com\r
-#           www.lufa-lib.org\r
-#\r
-# --------------------------------------\r
-#         LUFA Project Makefile.\r
-# --------------------------------------\r
-\r
-MCU          = at90usb1287\r
-ARCH         = AVR8\r
-BOARD        = USBKEY\r
-F_CPU        = 8000000\r
-F_USB        = $(F_CPU)\r
-OPTIMIZATION = s\r
-TARGET       = Target\r
-SRC          = $(TARGET).c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)\r
-LUFA_PATH    = ../../LUFA/\r
-CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/\r
-LD_FLAGS     =\r
-\r
-# Default target\r
-all:\r
-\r
-# Include LUFA build script makefiles\r
-include $(LUFA_PATH)/Build/lufa.core.in\r
-include $(LUFA_PATH)/Build/lufa.sources.in\r
-include $(LUFA_PATH)/Build/lufa.build.in\r
-include $(LUFA_PATH)/Build/lufa.doxygen.in\r
-include $(LUFA_PATH)/Build/lufa.dfu.in\r
-include $(LUFA_PATH)/Build/lufa.avrdude.in\r
+#
+#             LUFA Library
+#     Copyright (C) Dean Camera, 2012.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#           www.lufa-lib.org
+#
+# --------------------------------------
+#         LUFA Project Makefile.
+# --------------------------------------
+
+MCU          = at90usb1287
+ARCH         = AVR8
+BOARD        = USBKEY
+F_CPU        = 8000000
+F_USB        = $(F_CPU)
+OPTIMIZATION = s
+TARGET       = Target
+SRC          = $(TARGET).c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) $(LUFA_SRC_PLATFORM)
+LUFA_PATH    = ../../LUFA
+CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig
+LD_FLAGS     =
+
+# Default target
+all:
+
+# Include LUFA build script makefiles
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
diff --git a/LUFA/CodeTemplates/makefile_template.avr8 b/LUFA/CodeTemplates/makefile_template.avr8
deleted file mode 100644 (file)
index bdae557..0000000
+++ /dev/null
@@ -1,715 +0,0 @@
-# Hey Emacs, this is a -*- makefile -*-
-#----------------------------------------------------------------------------
-# WinAVR Makefile Template written by Eric B. Weddington, Jörg Wunsch, et al.
-#  >> Modified for use with the LUFA project. <<
-#
-# Released to the Public Domain
-#
-# Additional material for this makefile was written by:
-# Peter Fleury
-# Tim Henigan
-# Colin O'Flynn
-# Reiner Patommel
-# Markus Pfaff
-# Sander Pool
-# Frederik Rouleau
-# Carlos Lamas
-# Dean Camera
-# Opendous Inc.
-# Denver Gingerich
-#
-#----------------------------------------------------------------------------
-# On command line:
-#
-# make all = Make software.
-#
-# make clean = Clean out built project files.
-#
-# make coff = Convert ELF to AVR COFF.
-#
-# make extcoff = Convert ELF to AVR Extended COFF.
-#
-# make program = Download the hex file to the device, using avrdude.
-#                Please customize the avrdude settings below first!
-#
-# make dfu = Download the hex file to the device, using dfu-programmer (must
-#            have dfu-programmer installed).
-#
-# make flip = Download the hex file to the device, using Atmel FLIP (must
-#             have Atmel FLIP installed).
-#
-# make dfu-ee = Download the eeprom file to the device, using dfu-programmer
-#               (must have dfu-programmer installed).
-#
-# make flip-ee = Download the eeprom file to the device, using Atmel FLIP
-#                (must have Atmel FLIP installed).
-#
-# make doxygen = Generate DoxyGen documentation for the project (must have
-#                DoxyGen installed)
-#
-# make debug = Start either simulavr or avarice as specified for debugging, 
-#              with avr-gdb or avr-insight as the front end for debugging.
-#
-# make filename.s = Just compile filename.c into the assembler code only.
-#
-# make filename.i = Create a preprocessed source file for use in submitting
-#                   bug reports to the GCC project.
-#
-# To rebuild project do "make clean" then "make all".
-#----------------------------------------------------------------------------
-
-
-# MCU name
-MCU = ### INSERT NAME OF MICROCONTROLLER MODEL HERE ###
-
-
-# Targeted chip architecture (see library "Architectures" documentation)
-ARCH = AVR8
-
-
-# Target board (see library "Board Types" documentation, NONE for projects not requiring
-# LUFA board drivers). If USER is selected, put custom board drivers in a directory called 
-# "Board" inside the application directory.
-BOARD = ### INSERT NAME OF BOARD HERE, OR NONE IF NO BOARD DRIVERS USED ###
-
-
-# Processor frequency.
-#     This will define a symbol, F_CPU, in all source code files equal to the 
-#     processor frequency in Hz. You can then use this symbol in your source code to 
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-#     automatically to create a 32-bit value in your source code.
-#
-#     This will be an integer division of F_CLOCK below, as it is sourced by
-#     F_CLOCK after it has run through any CPU prescalers. Note that this value
-#     does not *change* the processor frequency - it should merely be updated to
-#     reflect the processor speed set externally so that the code can use accurate
-#     software delays.
-F_CPU = ### INSERT PRESCALED SYSTEM CLOCK SPEED HERE, IN HZ ###
-
-
-# Input clock frequency.
-#     This will define a symbol, F_USB, in all source code files equal to the 
-#     input clock frequency (before any prescaling is performed) in Hz. This value may
-#     differ from F_CPU if prescaling is used on the latter, and is required as the
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-#     at the end, this will be done automatically to create a 32-bit value in your
-#     source code.
-#
-#     If no clock division is performed on the input clock inside the AVR (via the
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = ### INSERT CLOCK TO USB MODULE HERE, IN HZ ###
-
-
-# Output format. (can be srec, ihex, binary)
-FORMAT = ihex
-
-
-# Target file name (without extension).
-TARGET = ### INSERT NAME OF MAIN FILENAME HERE, WITHOUT EXTENSION ###
-
-
-# Object files directory
-#     To put object files in current directory, use a dot (.), do NOT make
-#     this an empty or blank macro!
-OBJDIR = .
-
-
-# Path to the LUFA library
-LUFA_PATH = ### INSERT PATH TO LUFA LIBRARY RELATIVE TO PROJECT DIRECTORY HERE ###
-
-
-# LUFA library compile-time options and predefined tokens (add '-D' before each token)
-LUFA_OPTS = ### INSERT LUFA COMPILE TIME TOKENS HERE ###
-
-
-# Create the LUFA source path variables by including the LUFA root makefile
-include $(LUFA_PATH)/LUFA/makefile
-
-
-# List C source files here. (C dependencies are automatically generated.)
-SRC = $(TARGET).c                                                 \
-         $(LUFA_SRC_USB)                                             \
-         $(LUFA_SRC_USBCLASS)
-      ### INSERT ADDITIONAL PROJECT SOURCE FILENAMES OR LUFA MODULE NAMES HERE ###
-
-
-# List C++ source files here. (C dependencies are automatically generated.)
-CPPSRC = 
-
-
-# List Assembler source files here.
-#     Make them always end in a capital .S.  Files ending in a lowercase .s
-#     will not be considered source files but generated files (assembler
-#     output from the compiler), and will be deleted upon "make clean"!
-#     Even though the DOS/Win* filesystem matches both .s and .S the same,
-#     it will preserve the spelling of the filenames, and gcc itself does
-#     care about how the name is spelled on its command-line.
-ASRC =
-
-
-# Optimization level, can be [0, 1, 2, 3, s]. 
-#     0 = turn off optimization. s = optimize for size.
-#     (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
-OPT = s
-
-
-# List any extra directories to look for include files here.
-#     Each directory must be seperated by a space.
-#     Use forward slashes for directory separators.
-#     For a directory that has spaces, enclose it in quotes.
-EXTRAINCDIRS = $(LUFA_PATH)/
-
-
-# Compiler flag to set the C Standard level.
-#     c89   = "ANSI" C
-#     gnu89 = c89 plus GCC extensions
-#     c99   = ISO C99 standard (not yet fully implemented)
-#     gnu99 = c99 plus GCC extensions
-CSTANDARD = -std=gnu99
-
-
-# Place -D or -U options here for C sources
-CDEFS  = -DF_CPU=$(F_CPU)UL
-CDEFS += -DF_USB=$(F_USB)UL
-CDEFS += -DBOARD=BOARD_$(BOARD)
-CDEFS += -DARCH=ARCH_$(ARCH)
-CDEFS += $(LUFA_OPTS)
-
-
-# Place -D or -U options here for ASM sources
-ADEFS  = -DF_CPU=$(F_CPU)
-ADEFS += -DF_USB=$(F_USB)UL
-ADEFS += -DBOARD=BOARD_$(BOARD)
-ADEFS += -DARCH=ARCH_$(ARCH)
-ADEFS += $(LUFA_OPTS)
-
-# Place -D or -U options here for C++ sources
-CPPDEFS  = -DF_CPU=$(F_CPU)UL
-CPPDEFS += -DF_USB=$(F_USB)UL
-CPPDEFS += -DBOARD=BOARD_$(BOARD)
-CPPDEFS += -DARCH=ARCH_$(ARCH)
-CPPDEFS += $(LUFA_OPTS)
-
-
-# Debugging format.
-#     Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs.
-#     AVR Studio 4.10 requires dwarf-2.
-#     AVR [Extended] COFF format requires stabs, plus an avr-objcopy run.
-DEBUG = dwarf-2
-
-
-#---------------- Compiler Options C ----------------
-#  -g*:          generate debugging information
-#  -O*:          optimization level
-#  -f...:        tuning, see GCC manual and avr-libc documentation
-#  -Wall...:     warning level
-#  -Wa,...:      tell GCC to pass this to the assembler.
-#    -adhlns...: create assembler listing
-CFLAGS = -g$(DEBUG)
-CFLAGS += $(CDEFS)
-CFLAGS += -O$(OPT)
-CFLAGS += -funsigned-char
-CFLAGS += -funsigned-bitfields
-CFLAGS += -ffunction-sections
-CFLAGS += -fno-inline-small-functions
-CFLAGS += -fpack-struct
-CFLAGS += -fshort-enums
-CFLAGS += -fno-strict-aliasing
-CFLAGS += -Wall
-CFLAGS += -Wstrict-prototypes
-CFLAGS += -Wa,-adhlns=$(<:%.c=$(OBJDIR)/%.lst)
-CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
-CFLAGS += $(CSTANDARD)
-
-
-#---------------- Compiler Options C++ ----------------
-#  -g*:          generate debugging information
-#  -O*:          optimization level
-#  -f...:        tuning, see GCC manual and avr-libc documentation
-#  -Wall...:     warning level
-#  -Wa,...:      tell GCC to pass this to the assembler.
-#    -adhlns...: create assembler listing
-CPPFLAGS = -g$(DEBUG)
-CPPFLAGS += $(CPPDEFS)
-CPPFLAGS += -O$(OPT)
-CPPFLAGS += -funsigned-char
-CPPFLAGS += -funsigned-bitfields
-CPPFLAGS += -fpack-struct
-CPPFLAGS += -fshort-enums
-CPPFLAGS += -ffunction-sections
-CPPFLAGS += -fno-strict-aliasing
-CPPFLAGS += -fno-exceptions
-CPPFLAGS += -Wall
-CPPFLAGS += -Wundef
-CPPFLAGS += -Wa,-adhlns=$(<:%.cpp=$(OBJDIR)/%.lst)
-CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
-#CPPFLAGS += $(CSTANDARD)
-
-
-#---------------- Assembler Options ----------------
-#  -Wa,...:   tell GCC to pass this to the assembler.
-#  -adhlns:   create listing
-#  -gstabs:   have the assembler create line number information; note that
-#             for use in COFF files, additional information about filenames
-#             and function names needs to be present in the assembler source
-#             files -- see avr-libc docs [FIXME: not yet described there]
-#  -listing-cont-lines: Sets the maximum number of continuation lines of hex 
-#       dump that will be displayed for a given single line of source input.
-ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:%.S=$(OBJDIR)/%.lst),-gstabs,--listing-cont-lines=100
-
-
-#---------------- Library Options ----------------
-# Minimalistic printf version
-PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min
-
-# Floating point printf version (requires MATH_LIB = -lm below)
-PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt
-
-# If this is left blank, then it will use the Standard printf version.
-PRINTF_LIB = 
-#PRINTF_LIB = $(PRINTF_LIB_MIN)
-#PRINTF_LIB = $(PRINTF_LIB_FLOAT)
-
-
-# Minimalistic scanf version
-SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min
-
-# Floating point + %[ scanf version (requires MATH_LIB = -lm below)
-SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt
-
-# If this is left blank, then it will use the Standard scanf version.
-SCANF_LIB = 
-#SCANF_LIB = $(SCANF_LIB_MIN)
-#SCANF_LIB = $(SCANF_LIB_FLOAT)
-
-
-MATH_LIB = -lm
-
-
-# List any extra directories to look for libraries here.
-#     Each directory must be seperated by a space.
-#     Use forward slashes for directory separators.
-#     For a directory that has spaces, enclose it in quotes.
-EXTRALIBDIRS = 
-
-
-
-#---------------- External Memory Options ----------------
-
-# 64 KB of external RAM, starting after internal RAM (ATmega128!),
-# used for variables (.data/.bss) and heap (malloc()).
-#EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff
-
-# 64 KB of external RAM, starting after internal RAM (ATmega128!),
-# only used for heap (malloc()).
-#EXTMEMOPTS = -Wl,--section-start,.data=0x801100,--defsym=__heap_end=0x80ffff
-
-EXTMEMOPTS =
-
-
-
-#---------------- Linker Options ----------------
-#  -Wl,...:     tell GCC to pass this to linker.
-#    -Map:      create map file
-#    --cref:    add cross reference to  map file
-LDFLAGS  = -Wl,-Map=$(TARGET).map,--cref
-LDFLAGS += -Wl,--relax 
-LDFLAGS += -Wl,--gc-sections
-LDFLAGS += $(EXTMEMOPTS)
-LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS))
-LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)
-#LDFLAGS += -T linker_script.x
-
-
-
-#---------------- Programming Options (avrdude) ----------------
-
-# Programming hardware
-# Type: avrdude -c ?
-# to get a full listing.
-#
-AVRDUDE_PROGRAMMER = jtagmkII
-
-# com1 = serial port. Use lpt1 to connect to parallel port.
-AVRDUDE_PORT = usb
-
-AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex
-#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
-
-
-# Uncomment the following if you want avrdude's erase cycle counter.
-# Note that this counter needs to be initialized first using -Yn,
-# see avrdude manual.
-#AVRDUDE_ERASE_COUNTER = -y
-
-# Uncomment the following if you do /not/ wish a verification to be
-# performed after programming the device.
-#AVRDUDE_NO_VERIFY = -V
-
-# Increase verbosity level.  Please use this when submitting bug
-# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude> 
-# to submit bug reports.
-#AVRDUDE_VERBOSE = -v -v
-
-AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)
-AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)
-AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)
-AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)
-
-
-
-#---------------- Debugging Options ----------------
-
-# For simulavr only - target MCU frequency.
-DEBUG_MFREQ = $(F_CPU)
-
-# Set the DEBUG_UI to either gdb or insight.
-# DEBUG_UI = gdb
-DEBUG_UI = insight
-
-# Set the debugging back-end to either avarice, simulavr.
-DEBUG_BACKEND = avarice
-#DEBUG_BACKEND = simulavr
-
-# GDB Init Filename.
-GDBINIT_FILE = __avr_gdbinit
-
-# When using avarice settings for the JTAG
-JTAG_DEV = /dev/com1
-
-# Debugging port used to communicate between GDB / avarice / simulavr.
-DEBUG_PORT = 4242
-
-# Debugging host used to communicate between GDB / avarice / simulavr, normally
-#     just set to localhost unless doing some sort of crazy debugging when 
-#     avarice is running on a different computer.
-DEBUG_HOST = localhost
-
-
-
-#============================================================================
-
-
-# Define programs and commands.
-SHELL = sh
-CC = avr-gcc
-OBJCOPY = avr-objcopy
-OBJDUMP = avr-objdump
-SIZE = avr-size
-AR = avr-ar rcs
-NM = avr-nm
-AVRDUDE = avrdude
-REMOVE = rm -f
-REMOVEDIR = rm -rf
-COPY = cp
-WINSHELL = cmd
-
-
-# Define Messages
-# English
-MSG_ERRORS_NONE = Errors: none
-MSG_BEGIN = -------- begin --------
-MSG_END = --------  end  --------
-MSG_SIZE_BEFORE = Size before: 
-MSG_SIZE_AFTER = Size after:
-MSG_COFF = Converting to AVR COFF:
-MSG_EXTENDED_COFF = Converting to AVR Extended COFF:
-MSG_FLASH = Creating load file for Flash:
-MSG_EEPROM = Creating load file for EEPROM:
-MSG_EXTENDED_LISTING = Creating Extended Listing:
-MSG_SYMBOL_TABLE = Creating Symbol Table:
-MSG_LINKING = Linking:
-MSG_COMPILING = Compiling C:
-MSG_COMPILING_CPP = Compiling C++:
-MSG_ASSEMBLING = Assembling:
-MSG_CLEANING = Cleaning project:
-MSG_CREATING_LIBRARY = Creating library:
-
-
-
-
-# Define all object files.
-OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o) 
-
-# Define all listing files.
-LST = $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst) 
-
-
-# Compiler flags to generate dependency files.
-GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d
-
-
-# Combine all necessary flags and optional flags.
-# Add target processor to flags.
-ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)
-ALL_CPPFLAGS = -mmcu=$(MCU) -I. -x c++ $(CPPFLAGS) $(GENDEPFLAGS)
-ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
-
-
-
-
-
-# Default target.
-all: begin gccversion sizebefore build sizeafter end
-
-# Change the build target to build a HEX file or a library.
-build: elf hex eep lss sym
-#build: lib
-
-
-elf: $(TARGET).elf
-hex: $(TARGET).hex
-eep: $(TARGET).eep
-lss: $(TARGET).lss
-sym: $(TARGET).sym
-LIBNAME=lib$(TARGET).a
-lib: $(LIBNAME)
-
-
-
-# Eye candy.
-# AVR Studio 3.x does not check make's exit code but relies on
-# the following magic strings to be generated by the compile job.
-begin:
-       @echo
-       @echo $(MSG_BEGIN)
-
-end:
-       @echo $(MSG_END)
-       @echo
-
-
-# Display size of file.
-HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
-MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
-FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
-
-
-sizebefore:
-       @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
-       2>/dev/null; echo; fi
-
-sizeafter:
-       @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \
-       2>/dev/null; echo; fi
-
-
-
-# Display compiler version information.
-gccversion : 
-       @$(CC) --version
-
-
-# Program the device.  
-program: $(TARGET).hex $(TARGET).eep
-       $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)
-
-flip: $(TARGET).hex
-       batchisp -hardware usb -device $(MCU) -operation erase f
-       batchisp -hardware usb -device $(MCU) -operation loadbuffer $(TARGET).hex program
-       batchisp -hardware usb -device $(MCU) -operation start reset 0
-
-dfu: $(TARGET).hex
-       dfu-programmer $(MCU) erase
-       dfu-programmer $(MCU) flash $(TARGET).hex
-       dfu-programmer $(MCU) reset
-
-flip-ee: $(TARGET).hex $(TARGET).eep
-       $(COPY) $(TARGET).eep $(TARGET)eep.hex
-       batchisp -hardware usb -device $(MCU) -operation memory EEPROM erase
-       batchisp -hardware usb -device $(MCU) -operation memory EEPROM loadbuffer $(TARGET)eep.hex program
-       batchisp -hardware usb -device $(MCU) -operation start reset 0
-       $(REMOVE) $(TARGET)eep.hex
-
-dfu-ee: $(TARGET).hex $(TARGET).eep
-       dfu-programmer $(MCU) eeprom-flash $(TARGET).eep
-       dfu-programmer $(MCU) reset
-
-
-# Generate avr-gdb config/init file which does the following:
-#     define the reset signal, load the target file, connect to target, and set 
-#     a breakpoint at main().
-gdb-config: 
-       @$(REMOVE) $(GDBINIT_FILE)
-       @echo define reset >> $(GDBINIT_FILE)
-       @echo SIGNAL SIGHUP >> $(GDBINIT_FILE)
-       @echo end >> $(GDBINIT_FILE)
-       @echo file $(TARGET).elf >> $(GDBINIT_FILE)
-       @echo target remote $(DEBUG_HOST):$(DEBUG_PORT)  >> $(GDBINIT_FILE)
-ifeq ($(DEBUG_BACKEND),simulavr)
-       @echo load  >> $(GDBINIT_FILE)
-endif
-       @echo break main >> $(GDBINIT_FILE)
-
-debug: gdb-config $(TARGET).elf
-ifeq ($(DEBUG_BACKEND), avarice)
-       @echo Starting AVaRICE - Press enter when "waiting to connect" message displays.
-       @$(WINSHELL) /c start avarice --jtag $(JTAG_DEV) --erase --program --file \
-       $(TARGET).elf $(DEBUG_HOST):$(DEBUG_PORT)
-       @$(WINSHELL) /c pause
-
-else
-       @$(WINSHELL) /c start simulavr --gdbserver --device $(MCU) --clock-freq \
-       $(DEBUG_MFREQ) --port $(DEBUG_PORT)
-endif
-       @$(WINSHELL) /c start avr-$(DEBUG_UI) --command=$(GDBINIT_FILE)
-
-
-
-
-# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.
-COFFCONVERT = $(OBJCOPY) --debugging
-COFFCONVERT += --change-section-address .data-0x800000
-COFFCONVERT += --change-section-address .bss-0x800000
-COFFCONVERT += --change-section-address .noinit-0x800000
-COFFCONVERT += --change-section-address .eeprom-0x810000
-
-
-
-coff: $(TARGET).elf
-       @echo
-       @echo $(MSG_COFF) $(TARGET).cof
-       $(COFFCONVERT) -O coff-avr $< $(TARGET).cof
-
-
-extcoff: $(TARGET).elf
-       @echo
-       @echo $(MSG_EXTENDED_COFF) $(TARGET).cof
-       $(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof
-
-
-
-# Create final output files (.hex, .eep) from ELF output file.
-%.hex: %.elf
-       @echo
-       @echo $(MSG_FLASH) $@
-       $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock -R .signature $< $@
-
-%.eep: %.elf
-       @echo
-       @echo $(MSG_EEPROM) $@
-       -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
-       --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) $< $@ || exit 0
-
-# Create extended listing file from ELF output file.
-%.lss: %.elf
-       @echo
-       @echo $(MSG_EXTENDED_LISTING) $@
-       $(OBJDUMP) -h -S -z $< > $@
-
-# Create a symbol table from ELF output file.
-%.sym: %.elf
-       @echo
-       @echo $(MSG_SYMBOL_TABLE) $@
-       $(NM) -n $< > $@
-
-
-
-# Create library from object files.
-.SECONDARY : $(TARGET).a
-.PRECIOUS : $(OBJ)
-%.a: $(OBJ)
-       @echo
-       @echo $(MSG_CREATING_LIBRARY) $@
-       $(AR) $@ $(OBJ)
-
-
-# Link: create ELF output file from object files.
-.SECONDARY : $(TARGET).elf
-.PRECIOUS : $(OBJ)
-%.elf: $(OBJ)
-       @echo
-       @echo $(MSG_LINKING) $@
-       $(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS)
-
-
-# Compile: create object files from C source files.
-$(OBJDIR)/%.o : %.c
-       @echo
-       @echo $(MSG_COMPILING) $<
-       $(CC) -c $(ALL_CFLAGS) $< -o $@ 
-
-
-# Compile: create object files from C++ source files.
-$(OBJDIR)/%.o : %.cpp
-       @echo
-       @echo $(MSG_COMPILING_CPP) $<
-       $(CC) -c $(ALL_CPPFLAGS) $< -o $@ 
-
-
-# Compile: create assembler files from C source files.
-%.s : %.c
-       $(CC) -S $(ALL_CFLAGS) $< -o $@
-
-
-# Compile: create assembler files from C++ source files.
-%.s : %.cpp
-       $(CC) -S $(ALL_CPPFLAGS) $< -o $@
-
-
-# Assemble: create object files from assembler source files.
-$(OBJDIR)/%.o : %.S
-       @echo
-       @echo $(MSG_ASSEMBLING) $<
-       $(CC) -c $(ALL_ASFLAGS) $< -o $@
-
-
-# Create preprocessed source for use in sending a bug report.
-%.i : %.c
-       $(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@ 
-
-
-# Target: clean project.
-clean: begin clean_list end
-
-clean_list :
-       @echo
-       @echo $(MSG_CLEANING)
-       $(REMOVE) $(TARGET).hex
-       $(REMOVE) $(TARGET).eep
-       $(REMOVE) $(TARGET).cof
-       $(REMOVE) $(TARGET).elf
-       $(REMOVE) $(TARGET).map
-       $(REMOVE) $(TARGET).sym
-       $(REMOVE) $(TARGET).lss
-       $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o)
-       $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst)
-       $(REMOVE) $(SRC:.c=.s)
-       $(REMOVE) $(SRC:.c=.d)
-       $(REMOVE) $(SRC:.c=.i)
-       $(REMOVEDIR) .dep
-
-doxygen:
-       @echo Generating Project Documentation \($(TARGET)\)...
-       @if ( ( cat Doxygen.conf ; echo "HTML_STYLESHEET=$(LUFA_PATH)/LUFA/DoxygenPages/Style/Style.css" ) | doxygen - 2>&1 | grep -v "warning: ignoring unsupported tag" ;); then \
-         exit 1; \
-       fi;
-       @echo Documentation Generation Complete.
-
-clean_doxygen:
-       rm -rf Documentation
-
-checksource:
-       @for f in $(SRC) $(CPPSRC) $(ASRC); do \
-               if [ -f $$f ]; then \
-                       echo "Found Source File: $$f" ; \
-               else \
-                       echo "Source File Not Found: $$f" ; \
-               fi; done 
-
-
-# Create object files directory
-$(shell mkdir $(OBJDIR) 2>/dev/null)
-
-
-# Include the dependency files.
--include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
-
-
-# Listing of phony targets.
-.PHONY : all begin finish end sizebefore sizeafter gccversion \
-build elf hex eep lss sym coff extcoff doxygen clean          \
-clean_list clean_doxygen program dfu flip flip-ee dfu-ee      \
-debug gdb-config checksource
diff --git a/LUFA/CodeTemplates/makefile_template.uc3 b/LUFA/CodeTemplates/makefile_template.uc3
deleted file mode 100644 (file)
index 1a9dff9..0000000
+++ /dev/null
@@ -1,489 +0,0 @@
-# Hey Emacs, this is a -*- makefile -*-
-#----------------------------------------------------------------------------
-# WinAVR Makefile Template written by Eric B. Weddington, Jörg Wunsch, et al.
-#  >> Modified for use with the LUFA project. <<
-#
-# Released to the Public Domain
-#
-# Additional material for this makefile was written by:
-# Peter Fleury
-# Tim Henigan
-# Colin O'Flynn
-# Reiner Patommel
-# Markus Pfaff
-# Sander Pool
-# Frederik Rouleau
-# Carlos Lamas
-# Dean Camera
-# Opendous Inc.
-# Denver Gingerich
-#
-#----------------------------------------------------------------------------
-# On command line:
-#
-# make all = Make software.
-#
-# make clean = Clean out built project files.
-#
-# make dfu = Download the hex file to the device, using dfu-programmer (must
-#            have dfu-programmer installed).
-#
-# make flip = Download the hex file to the device, using Atmel FLIP (must
-#             have Atmel FLIP installed).
-#
-# make doxygen = Generate DoxyGen documentation for the project (must have
-#                DoxyGen installed)
-#
-# make filename.s = Just compile filename.c into the assembler code only.
-#
-# make filename.i = Create a preprocessed source file for use in submitting
-#                   bug reports to the GCC project.
-#
-# To rebuild project do "make clean" then "make all".
-#----------------------------------------------------------------------------
-
-
-# MCU name
-MCU = ### INSERT NAME OF MICROCONTROLLER MODEL HERE ###
-
-
-# Targeted chip architecture (see library "Architectures" documentation)
-ARCH = UC3
-
-
-# Target board (see library "Board Types" documentation, NONE for projects not requiring
-# LUFA board drivers). If USER is selected, put custom board drivers in a directory called 
-# "Board" inside the application directory.
-BOARD = ### INSERT NAME OF BOARD HERE, OR NONE IF NO BOARD DRIVERS USED ###
-
-
-# Processor frequency.
-#     This will define a symbol, F_CPU, in all source code files equal to the
-#     processor frequency in Hz. You can then use this symbol in your source code to
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-#     automatically to create a 32-bit value in your source code.
-#
-#     This should be the frequency the system core runs at, after the system clock
-#     has been set up correctly and started.
-F_CPU = ### INSERT PRESCALED SYSTEM CLOCK SPEED HERE, IN HZ ###
-
-
-# USB controller master clock frequency.
-#     This will define a symbol, F_USB, in all source code files equal to the
-#     input clock frequency of the USB controller's clock generator in Hz.
-#
-#     For the UC3 chips, this should be equal to 48MHz or 96MHz.
-F_USB = ### INSERT CLOCK TO USB MODULE HERE, IN HZ ###
-
-
-# Output format. (can be srec, ihex, binary)
-FORMAT = ihex
-
-
-# Target file name (without extension).
-TARGET = ### INSERT NAME OF MAIN FILENAME HERE, WITHOUT EXTENSION ###
-
-
-# Object files directory
-#     To put object files in current directory, use a dot (.), do NOT make
-#     this an empty or blank macro!
-OBJDIR = .
-
-
-# Path to the LUFA library
-LUFA_PATH = ### INSERT PATH TO LUFA LIBRARY RELATIVE TO PROJECT DIRECTORY HERE ###
-
-
-# LUFA library compile-time options and predefined tokens (add '-D' before each token)
-LUFA_OPTS = ### INSERT LUFA COMPILE TIME TOKENS HERE ###
-
-
-# Create the LUFA source path variables by including the LUFA root makefile
-include $(LUFA_PATH)/LUFA/makefile
-
-
-# List C source files here. (C dependencies are automatically generated.)
-SRC = $(TARGET).c                                                 \
-         $(LUFA_SRC_USB)                                             \
-         $(LUFA_SRC_USBCLASS)
-      ### INSERT ADDITIONAL PROJECT SOURCE FILENAMES OR LUFA MODULE NAMES HERE ###
-
-
-# List C++ source files here. (C dependencies are automatically generated.)
-CPPSRC = 
-
-
-# List Assembler source files here.
-#     Make them always end in a capital .S.  Files ending in a lowercase .s
-#     will not be considered source files but generated files (assembler
-#     output from the compiler), and will be deleted upon "make clean"!
-#     Even though the DOS/Win* filesystem matches both .s and .S the same,
-#     it will preserve the spelling of the filenames, and gcc itself does
-#     care about how the name is spelled on its command-line.
-ASRC =
-
-
-# Optimization level, can be [0, 1, 2, 3, s]. 
-#     0 = turn off optimization. s = optimize for size.
-#     (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
-OPT = s
-
-
-# List any extra directories to look for include files here.
-#     Each directory must be seperated by a space.
-#     Use forward slashes for directory separators.
-#     For a directory that has spaces, enclose it in quotes.
-EXTRAINCDIRS = $(LUFA_PATH)/
-
-
-# Compiler flag to set the C Standard level.
-#     c89   = "ANSI" C
-#     gnu89 = c89 plus GCC extensions
-#     c99   = ISO C99 standard (not yet fully implemented)
-#     gnu99 = c99 plus GCC extensions
-CSTANDARD = -std=gnu99
-
-
-# Place -D or -U options here for C sources
-CDEFS  = -DF_CPU=$(F_CPU)UL
-CDEFS += -DF_USB=$(F_USB)UL
-CDEFS += -DBOARD=BOARD_$(BOARD)
-CDEFS += -DARCH=ARCH_$(ARCH)
-CDEFS += $(LUFA_OPTS)
-
-
-# Place -D or -U options here for ASM sources
-ADEFS  = -DF_CPU=$(F_CPU)
-ADEFS += -DF_USB=$(F_USB)UL
-ADEFS += -DBOARD=BOARD_$(BOARD)
-ADEFS += -DARCH=ARCH_$(ARCH)
-ADEFS += $(LUFA_OPTS)
-
-# Place -D or -U options here for C++ sources
-CPPDEFS  = -DF_CPU=$(F_CPU)UL
-CPPDEFS += -DF_USB=$(F_USB)UL
-CPPDEFS += -DBOARD=BOARD_$(BOARD)
-CPPDEFS += -DARCH=ARCH_$(ARCH)
-CPPDEFS += $(LUFA_OPTS)
-
-
-# Debugging level.
-DEBUG = 3
-
-
-#---------------- Compiler Options C ----------------
-#  -g*:          generate debugging information
-#  -O*:          optimization level
-#  -f...:        tuning, see GCC manual and avr-libc documentation
-#  -Wall...:     warning level
-#  -Wa,...:      tell GCC to pass this to the assembler.
-#    -adhlns...: create assembler listing
-CFLAGS = -g$(DEBUG)
-CFLAGS += $(CDEFS)
-CFLAGS += -O$(OPT)
-CFLAGS += -funsigned-char
-CFLAGS += -funsigned-bitfields
-CFLAGS += -ffunction-sections
-CFLAGS += -fno-strict-aliasing
-CFLAGS += -Wall
-CFLAGS += -Wstrict-prototypes
-CFLAGS += -masm-addr-pseudos
-#CFLAGS += -Wa,-adhlns=$(<:%.c=$(OBJDIR)/%.lst)
-CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
-CFLAGS += $(CSTANDARD)
-
-
-#---------------- Compiler Options C++ ----------------
-#  -g*:          generate debugging information
-#  -O*:          optimization level
-#  -f...:        tuning, see GCC manual and avr-libc documentation
-#  -Wall...:     warning level
-#  -Wa,...:      tell GCC to pass this to the assembler.
-#    -adhlns...: create assembler listing
-CPPFLAGS = -g$(DEBUG)
-CPPFLAGS += $(CPPDEFS)
-CPPFLAGS += -O$(OPT)
-CPPFLAGS += -funsigned-char
-CPPFLAGS += -funsigned-bitfields
-CPPFLAGS += -ffunction-sections
-CPPFLAGS += -fno-strict-aliasing
-CPPFLAGS += -fno-exceptions
-CPPFLAGS += -masm-addr-pseudos
-CPPFLAGS += -Wall
-CPPFLAGS += -Wundef
-#CPPFLAGS += -Wa,-adhlns=$(<:%.cpp=$(OBJDIR)/%.lst)
-CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
-#CPPFLAGS += $(CSTANDARD)
-
-
-#---------------- Assembler Options ----------------
-#  -Wa,...:   tell GCC to pass this to the assembler.
-#  -adhlns:   create listing
-#  -gstabs:   have the assembler create line number information; note that
-#             for use in COFF files, additional information about filenames
-#             and function names needs to be present in the assembler source
-#             files -- see avr-libc docs [FIXME: not yet described there]
-#  -listing-cont-lines: Sets the maximum number of continuation lines of hex 
-#       dump that will be displayed for a given single line of source input.
-ASFLAGS = $(ADEFS)
-#ASFLAGS += -Wa,-adhlns=$(<:%.S=$(OBJDIR)/%.lst),-gstabs,--listing-cont-lines=100
-
-
-#---------------- Linker Options ----------------
-#  -Wl,...:     tell GCC to pass this to linker.
-#    -Map:      create map file
-#    --cref:    add cross reference to  map file
-LDFLAGS  = -Wl,-Map=$(TARGET).map,--cref
-LDFLAGS += -Wl,--gc-sections --rodata-writable
-LDFLAGS += -Wl,--direct-data
-#LDFLAGS += -T linker_script.x
-
-
-#============================================================================
-
-
-# Define programs and commands.
-SHELL = sh
-CC = avr32-gcc
-OBJCOPY = avr32-objcopy
-OBJDUMP = avr32-objdump
-SIZE = avr32-size
-AR = avr32-ar rcs
-NM = avr32-nm
-REMOVE = rm -f
-REMOVEDIR = rm -rf
-COPY = cp
-WINSHELL = cmd
-
-
-# Define Messages
-# English
-MSG_ERRORS_NONE = Errors: none
-MSG_BEGIN = -------- begin --------
-MSG_END = --------  end  --------
-MSG_SIZE_BEFORE = Size before: 
-MSG_SIZE_AFTER = Size after:
-MSG_COFF = Converting to AVR COFF:
-MSG_FLASH = Creating load file for Flash:
-MSG_EEPROM = Creating load file for EEPROM:
-MSG_EXTENDED_LISTING = Creating Extended Listing:
-MSG_SYMBOL_TABLE = Creating Symbol Table:
-MSG_LINKING = Linking:
-MSG_COMPILING = Compiling C:
-MSG_COMPILING_CPP = Compiling C++:
-MSG_ASSEMBLING = Assembling:
-MSG_CLEANING = Cleaning project:
-MSG_CREATING_LIBRARY = Creating library:
-
-
-
-
-# Define all object files.
-OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o) 
-
-# Define all listing files.
-LST = $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst) 
-
-
-# Compiler flags to generate dependency files.
-GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d
-
-
-# Combine all necessary flags and optional flags.
-# Add target processor to flags.
-ALL_CFLAGS = -mpart=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)
-ALL_CPPFLAGS = -mpart=$(MCU) -I. -x c++ $(CPPFLAGS) $(GENDEPFLAGS)
-ALL_ASFLAGS = -mpart=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
-
-
-
-
-
-# Default target.
-all: begin gccversion sizebefore build sizeafter end
-
-# Change the build target to build a HEX file or a library.
-build: elf hex lss sym
-#build: lib
-
-
-elf: $(TARGET).elf
-hex: $(TARGET).hex
-lss: $(TARGET).lss
-sym: $(TARGET).sym
-LIBNAME=lib$(TARGET).a
-lib: $(LIBNAME)
-
-
-
-# Eye candy.
-# AVR Studio 3.x does not check make's exit code but relies on
-# the following magic strings to be generated by the compile job.
-begin:
-       @echo
-       @echo $(MSG_BEGIN)
-
-end:
-       @echo $(MSG_END)
-       @echo
-
-
-# Display size of file.
-HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
-MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
-FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
-
-
-sizebefore:
-       @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
-       2>/dev/null; echo; fi
-
-sizeafter:
-       @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \
-       2>/dev/null; echo; fi
-
-
-
-# Display compiler version information.
-gccversion : 
-       @$(CC) --version
-
-
-# Program the device.  
-flip: $(TARGET).hex
-       batchisp -hardware usb -device $(MCU) -operation erase f
-       batchisp -hardware usb -device $(MCU) -operation loadbuffer $(TARGET).hex program
-       batchisp -hardware usb -device $(MCU) -operation start reset 0
-
-dfu: $(TARGET).hex
-       dfu-programmer $(MCU) erase
-       dfu-programmer $(MCU) flash $(TARGET).hex
-       dfu-programmer $(MCU) reset
-
-
-# Create final output files (.hex, .eep) from ELF output file.
-%.hex: %.elf
-       @echo
-       @echo $(MSG_FLASH) $@
-       $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock -R .signature $< $@
-
-# Create extended listing file from ELF output file.
-%.lss: %.elf
-       @echo
-       @echo $(MSG_EXTENDED_LISTING) $@
-       $(OBJDUMP) -h -S -z $< > $@
-
-# Create a symbol table from ELF output file.
-%.sym: %.elf
-       @echo
-       @echo $(MSG_SYMBOL_TABLE) $@
-       $(NM) -n $< > $@
-
-
-
-# Create library from object files.
-.SECONDARY : $(TARGET).a
-.PRECIOUS : $(OBJ)
-%.a: $(OBJ)
-       @echo
-       @echo $(MSG_CREATING_LIBRARY) $@
-       $(AR) $@ $(OBJ)
-
-
-# Link: create ELF output file from object files.
-.SECONDARY : $(TARGET).elf
-.PRECIOUS : $(OBJ)
-%.elf: $(OBJ)
-       @echo
-       @echo $(MSG_LINKING) $@
-       $(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS)
-
-
-# Compile: create object files from C source files.
-$(OBJDIR)/%.o : %.c
-       @echo
-       @echo $(MSG_COMPILING) $<
-       $(CC) -c $(ALL_CFLAGS) $< -o $@ 
-
-
-# Compile: create object files from C++ source files.
-$(OBJDIR)/%.o : %.cpp
-       @echo
-       @echo $(MSG_COMPILING_CPP) $<
-       $(CC) -c $(ALL_CPPFLAGS) $< -o $@ 
-
-
-# Compile: create assembler files from C source files.
-%.s : %.c
-       $(CC) -S $(ALL_CFLAGS) $< -o $@
-
-
-# Compile: create assembler files from C++ source files.
-%.s : %.cpp
-       $(CC) -S $(ALL_CPPFLAGS) $< -o $@
-
-
-# Assemble: create object files from assembler source files.
-$(OBJDIR)/%.o : %.S
-       @echo
-       @echo $(MSG_ASSEMBLING) $<
-       $(CC) -c $(ALL_ASFLAGS) $< -o $@
-
-
-# Create preprocessed source for use in sending a bug report.
-%.i : %.c
-       $(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@ 
-
-
-# Target: clean project.
-clean: begin clean_list end
-
-clean_list :
-       @echo
-       @echo $(MSG_CLEANING)
-       $(REMOVE) $(TARGET).hex
-       $(REMOVE) $(TARGET).cof
-       $(REMOVE) $(TARGET).elf
-       $(REMOVE) $(TARGET).map
-       $(REMOVE) $(TARGET).sym
-       $(REMOVE) $(TARGET).lss
-       $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o)
-       $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst)
-       $(REMOVE) $(SRC:.c=.s)
-       $(REMOVE) $(SRC:.c=.d)
-       $(REMOVE) $(SRC:.c=.i)
-       $(REMOVEDIR) .dep
-
-doxygen:
-       @echo Generating Project Documentation \($(TARGET)\)...
-       @if ( ( cat Doxygen.conf ; echo "HTML_STYLESHEET=$(LUFA_PATH)/LUFA/DoxygenPages/Style/Style.css" ) | doxygen - 2>&1 | grep -v "warning: ignoring unsupported tag" ;); then \
-         exit 1; \
-       fi;
-       @echo Documentation Generation Complete.
-
-clean_doxygen:
-       rm -rf Documentation
-
-checksource:
-       @for f in $(SRC) $(CPPSRC) $(ASRC); do \
-               if [ -f $$f ]; then \
-                       echo "Found Source File: $$f" ; \
-               else \
-                       echo "Source File Not Found: $$f" ; \
-               fi; done 
-
-
-# Create object files directory
-$(shell mkdir $(OBJDIR) 2>/dev/null)
-
-
-# Include the dependency files.
--include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
-
-
-# Listing of phony targets.
-.PHONY : all begin finish end sizebefore sizeafter gccversion \
-build elf hex lss sym doxygen clean clean_list clean_doxygen  \
-dfu flip checksource
-
diff --git a/LUFA/CodeTemplates/makefile_template.xmega b/LUFA/CodeTemplates/makefile_template.xmega
deleted file mode 100644 (file)
index 4f10f84..0000000
+++ /dev/null
@@ -1,707 +0,0 @@
-# Hey Emacs, this is a -*- makefile -*-
-#----------------------------------------------------------------------------
-# WinAVR Makefile Template written by Eric B. Weddington, Jörg Wunsch, et al.
-#  >> Modified for use with the LUFA project. <<
-#
-# Released to the Public Domain
-#
-# Additional material for this makefile was written by:
-# Peter Fleury
-# Tim Henigan
-# Colin O'Flynn
-# Reiner Patommel
-# Markus Pfaff
-# Sander Pool
-# Frederik Rouleau
-# Carlos Lamas
-# Dean Camera
-# Opendous Inc.
-# Denver Gingerich
-#
-#----------------------------------------------------------------------------
-# On command line:
-#
-# make all = Make software.
-#
-# make clean = Clean out built project files.
-#
-# make coff = Convert ELF to AVR COFF.
-#
-# make extcoff = Convert ELF to AVR Extended COFF.
-#
-# make program = Download the hex file to the device, using avrdude.
-#                Please customize the avrdude settings below first!
-#
-# make dfu = Download the hex file to the device, using dfu-programmer (must
-#            have dfu-programmer installed).
-#
-# make flip = Download the hex file to the device, using Atmel FLIP (must
-#             have Atmel FLIP installed).
-#
-# make dfu-ee = Download the eeprom file to the device, using dfu-programmer
-#               (must have dfu-programmer installed).
-#
-# make flip-ee = Download the eeprom file to the device, using Atmel FLIP
-#                (must have Atmel FLIP installed).
-#
-# make doxygen = Generate DoxyGen documentation for the project (must have
-#                DoxyGen installed)
-#
-# make debug = Start either simulavr or avarice as specified for debugging, 
-#              with avr-gdb or avr-insight as the front end for debugging.
-#
-# make filename.s = Just compile filename.c into the assembler code only.
-#
-# make filename.i = Create a preprocessed source file for use in submitting
-#                   bug reports to the GCC project.
-#
-# To rebuild project do "make clean" then "make all".
-#----------------------------------------------------------------------------
-
-
-# MCU name
-MCU = ### INSERT NAME OF MICROCONTROLLER MODEL HERE ###
-
-
-# Targeted chip architecture (see library "Architectures" documentation)
-ARCH = XMEGA
-
-
-# Target board (see library "Board Types" documentation, NONE for projects not requiring
-# LUFA board drivers). If USER is selected, put custom board drivers in a directory called 
-# "Board" inside the application directory.
-BOARD = ### INSERT NAME OF BOARD HERE, OR NONE IF NO BOARD DRIVERS USED ###
-
-
-# Processor frequency.
-#     This will define a symbol, F_CPU, in all source code files equal to the
-#     processor frequency in Hz. You can then use this symbol in your source code to
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-#     automatically to create a 32-bit value in your source code.
-#
-#     This should be the frequency the system core runs at, after the system clock
-#     has been set up correctly and started.
-F_CPU = ### INSERT PRESCALED SYSTEM CLOCK SPEED HERE, IN HZ ###
-
-
-# USB controller master clock frequency.
-#     This will define a symbol, F_USB, in all source code files equal to the
-#     input clock frequency of the USB controller's clock generator in Hz.
-#
-#     For the XMEGA chips, this should be equal to a multiple of 6MHz for Low
-#     Speed USB mode, or a multiple of 48MHz for Full Speed USB mode.
-F_USB = ### INSERT CLOCK TO USB MODULE HERE, IN HZ ###
-
-
-# Output format. (can be srec, ihex, binary)
-FORMAT = ihex
-
-
-# Target file name (without extension).
-TARGET = ### INSERT NAME OF MAIN FILENAME HERE, WITHOUT EXTENSION ###
-
-
-# Object files directory
-#     To put object files in current directory, use a dot (.), do NOT make
-#     this an empty or blank macro!
-OBJDIR = .
-
-
-# Path to the LUFA library
-LUFA_PATH = ### INSERT PATH TO LUFA LIBRARY RELATIVE TO PROJECT DIRECTORY HERE ###
-
-
-# LUFA library compile-time options and predefined tokens (add '-D' before each token)
-LUFA_OPTS = ### INSERT LUFA COMPILE TIME TOKENS HERE ###
-
-
-# Create the LUFA source path variables by including the LUFA root makefile
-include $(LUFA_PATH)/LUFA/makefile
-
-
-# List C source files here. (C dependencies are automatically generated.)
-SRC = $(TARGET).c                                                 \
-         $(LUFA_SRC_USB)                                             \
-         $(LUFA_SRC_USBCLASS)
-      ### INSERT ADDITIONAL PROJECT SOURCE FILENAMES OR LUFA MODULE NAMES HERE ###
-
-
-# List C++ source files here. (C dependencies are automatically generated.)
-CPPSRC = 
-
-
-# List Assembler source files here.
-#     Make them always end in a capital .S.  Files ending in a lowercase .s
-#     will not be considered source files but generated files (assembler
-#     output from the compiler), and will be deleted upon "make clean"!
-#     Even though the DOS/Win* filesystem matches both .s and .S the same,
-#     it will preserve the spelling of the filenames, and gcc itself does
-#     care about how the name is spelled on its command-line.
-ASRC =
-
-
-# Optimization level, can be [0, 1, 2, 3, s]. 
-#     0 = turn off optimization. s = optimize for size.
-#     (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
-OPT = s
-
-
-# List any extra directories to look for include files here.
-#     Each directory must be seperated by a space.
-#     Use forward slashes for directory separators.
-#     For a directory that has spaces, enclose it in quotes.
-EXTRAINCDIRS = $(LUFA_PATH)/
-
-
-# Compiler flag to set the C Standard level.
-#     c89   = "ANSI" C
-#     gnu89 = c89 plus GCC extensions
-#     c99   = ISO C99 standard (not yet fully implemented)
-#     gnu99 = c99 plus GCC extensions
-CSTANDARD = -std=gnu99
-
-
-# Place -D or -U options here for C sources
-CDEFS  = -DF_CPU=$(F_CPU)UL
-CDEFS += -DF_USB=$(F_USB)UL
-CDEFS += -DBOARD=BOARD_$(BOARD)
-CDEFS += -DARCH=ARCH_$(ARCH)
-CDEFS += $(LUFA_OPTS)
-
-
-# Place -D or -U options here for ASM sources
-ADEFS  = -DF_CPU=$(F_CPU)
-ADEFS += -DF_USB=$(F_USB)UL
-ADEFS += -DBOARD=BOARD_$(BOARD)
-ADEFS += -DARCH=ARCH_$(ARCH)
-ADEFS += $(LUFA_OPTS)
-
-# Place -D or -U options here for C++ sources
-CPPDEFS  = -DF_CPU=$(F_CPU)UL
-CPPDEFS += -DF_USB=$(F_USB)UL
-CPPDEFS += -DBOARD=BOARD_$(BOARD)
-CPPDEFS += -DARCH=ARCH_$(ARCH)
-CPPDEFS += $(LUFA_OPTS)
-
-
-# Debugging format.
-#     Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs.
-#     AVR Studio 4.10 requires dwarf-2.
-#     AVR [Extended] COFF format requires stabs, plus an avr-objcopy run.
-DEBUG = dwarf-2
-
-
-#---------------- Compiler Options C ----------------
-#  -g*:          generate debugging information
-#  -O*:          optimization level
-#  -f...:        tuning, see GCC manual and avr-libc documentation
-#  -Wall...:     warning level
-#  -Wa,...:      tell GCC to pass this to the assembler.
-#    -adhlns...: create assembler listing
-CFLAGS = -g$(DEBUG)
-CFLAGS += $(CDEFS)
-CFLAGS += -O$(OPT)
-CFLAGS += -funsigned-char
-CFLAGS += -funsigned-bitfields
-CFLAGS += -ffunction-sections
-CFLAGS += -fno-inline-small-functions
-CFLAGS += -fpack-struct
-CFLAGS += -fshort-enums
-CFLAGS += -fno-strict-aliasing
-CFLAGS += -Wall
-CFLAGS += -Wstrict-prototypes
-CFLAGS += -Wa,-adhlns=$(<:%.c=$(OBJDIR)/%.lst)
-CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
-CFLAGS += $(CSTANDARD)
-
-
-#---------------- Compiler Options C++ ----------------
-#  -g*:          generate debugging information
-#  -O*:          optimization level
-#  -f...:        tuning, see GCC manual and avr-libc documentation
-#  -Wall...:     warning level
-#  -Wa,...:      tell GCC to pass this to the assembler.
-#    -adhlns...: create assembler listing
-CPPFLAGS = -g$(DEBUG)
-CPPFLAGS += $(CPPDEFS)
-CPPFLAGS += -O$(OPT)
-CPPFLAGS += -funsigned-char
-CPPFLAGS += -funsigned-bitfields
-CPPFLAGS += -fpack-struct
-CPPFLAGS += -fshort-enums
-CPPFLAGS += -ffunction-sections
-CPPFLAGS += -fno-strict-aliasing
-CPPFLAGS += -fno-exceptions
-CPPFLAGS += -Wall
-CPPFLAGS += -Wundef
-CPPFLAGS += -Wa,-adhlns=$(<:%.cpp=$(OBJDIR)/%.lst)
-CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
-#CPPFLAGS += $(CSTANDARD)
-
-
-#---------------- Assembler Options ----------------
-#  -Wa,...:   tell GCC to pass this to the assembler.
-#  -adhlns:   create listing
-#  -gstabs:   have the assembler create line number information; note that
-#             for use in COFF files, additional information about filenames
-#             and function names needs to be present in the assembler source
-#             files -- see avr-libc docs [FIXME: not yet described there]
-#  -listing-cont-lines: Sets the maximum number of continuation lines of hex 
-#       dump that will be displayed for a given single line of source input.
-ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:%.S=$(OBJDIR)/%.lst),-gstabs,--listing-cont-lines=100
-
-
-#---------------- Library Options ----------------
-# Minimalistic printf version
-PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min
-
-# Floating point printf version (requires MATH_LIB = -lm below)
-PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt
-
-# If this is left blank, then it will use the Standard printf version.
-PRINTF_LIB = 
-#PRINTF_LIB = $(PRINTF_LIB_MIN)
-#PRINTF_LIB = $(PRINTF_LIB_FLOAT)
-
-
-# Minimalistic scanf version
-SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min
-
-# Floating point + %[ scanf version (requires MATH_LIB = -lm below)
-SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt
-
-# If this is left blank, then it will use the Standard scanf version.
-SCANF_LIB = 
-#SCANF_LIB = $(SCANF_LIB_MIN)
-#SCANF_LIB = $(SCANF_LIB_FLOAT)
-
-
-MATH_LIB = -lm
-
-
-# List any extra directories to look for libraries here.
-#     Each directory must be seperated by a space.
-#     Use forward slashes for directory separators.
-#     For a directory that has spaces, enclose it in quotes.
-EXTRALIBDIRS = 
-
-
-
-#---------------- External Memory Options ----------------
-
-# 64 KB of external RAM, starting after internal RAM (ATmega128!),
-# used for variables (.data/.bss) and heap (malloc()).
-#EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff
-
-# 64 KB of external RAM, starting after internal RAM (ATmega128!),
-# only used for heap (malloc()).
-#EXTMEMOPTS = -Wl,--section-start,.data=0x801100,--defsym=__heap_end=0x80ffff
-
-EXTMEMOPTS =
-
-
-
-#---------------- Linker Options ----------------
-#  -Wl,...:     tell GCC to pass this to linker.
-#    -Map:      create map file
-#    --cref:    add cross reference to  map file
-LDFLAGS  = -Wl,-Map=$(TARGET).map,--cref
-LDFLAGS += -Wl,--relax 
-LDFLAGS += -Wl,--gc-sections
-LDFLAGS += $(EXTMEMOPTS)
-LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS))
-LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)
-#LDFLAGS += -T linker_script.x
-
-
-
-#---------------- Programming Options (avrdude) ----------------
-
-# Programming hardware
-# Type: avrdude -c ?
-# to get a full listing.
-#
-AVRDUDE_PROGRAMMER = jtagmkII
-
-# com1 = serial port. Use lpt1 to connect to parallel port.
-AVRDUDE_PORT = usb
-
-AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex
-#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
-
-
-# Uncomment the following if you want avrdude's erase cycle counter.
-# Note that this counter needs to be initialized first using -Yn,
-# see avrdude manual.
-#AVRDUDE_ERASE_COUNTER = -y
-
-# Uncomment the following if you do /not/ wish a verification to be
-# performed after programming the device.
-#AVRDUDE_NO_VERIFY = -V
-
-# Increase verbosity level.  Please use this when submitting bug
-# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude> 
-# to submit bug reports.
-#AVRDUDE_VERBOSE = -v -v
-
-AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)
-AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)
-AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)
-AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)
-
-
-
-#---------------- Debugging Options ----------------
-
-# For simulavr only - target MCU frequency.
-DEBUG_MFREQ = $(F_CPU)
-
-# Set the DEBUG_UI to either gdb or insight.
-# DEBUG_UI = gdb
-DEBUG_UI = insight
-
-# Set the debugging back-end to either avarice, simulavr.
-DEBUG_BACKEND = avarice
-#DEBUG_BACKEND = simulavr
-
-# GDB Init Filename.
-GDBINIT_FILE = __avr_gdbinit
-
-# When using avarice settings for the JTAG
-JTAG_DEV = /dev/com1
-
-# Debugging port used to communicate between GDB / avarice / simulavr.
-DEBUG_PORT = 4242
-
-# Debugging host used to communicate between GDB / avarice / simulavr, normally
-#     just set to localhost unless doing some sort of crazy debugging when 
-#     avarice is running on a different computer.
-DEBUG_HOST = localhost
-
-
-
-#============================================================================
-
-
-# Define programs and commands.
-SHELL = sh
-CC = avr-gcc
-OBJCOPY = avr-objcopy
-OBJDUMP = avr-objdump
-SIZE = avr-size
-AR = avr-ar rcs
-NM = avr-nm
-AVRDUDE = avrdude
-REMOVE = rm -f
-REMOVEDIR = rm -rf
-COPY = cp
-WINSHELL = cmd
-
-
-# Define Messages
-# English
-MSG_ERRORS_NONE = Errors: none
-MSG_BEGIN = -------- begin --------
-MSG_END = --------  end  --------
-MSG_SIZE_BEFORE = Size before: 
-MSG_SIZE_AFTER = Size after:
-MSG_COFF = Converting to AVR COFF:
-MSG_EXTENDED_COFF = Converting to AVR Extended COFF:
-MSG_FLASH = Creating load file for Flash:
-MSG_EEPROM = Creating load file for EEPROM:
-MSG_EXTENDED_LISTING = Creating Extended Listing:
-MSG_SYMBOL_TABLE = Creating Symbol Table:
-MSG_LINKING = Linking:
-MSG_COMPILING = Compiling C:
-MSG_COMPILING_CPP = Compiling C++:
-MSG_ASSEMBLING = Assembling:
-MSG_CLEANING = Cleaning project:
-MSG_CREATING_LIBRARY = Creating library:
-
-
-
-
-# Define all object files.
-OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o) 
-
-# Define all listing files.
-LST = $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst) 
-
-
-# Compiler flags to generate dependency files.
-GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d
-
-
-# Combine all necessary flags and optional flags.
-# Add target processor to flags.
-ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)
-ALL_CPPFLAGS = -mmcu=$(MCU) -I. -x c++ $(CPPFLAGS) $(GENDEPFLAGS)
-ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
-
-
-
-
-
-# Default target.
-all: begin gccversion sizebefore build sizeafter end
-
-# Change the build target to build a HEX file or a library.
-build: elf hex eep lss sym
-#build: lib
-
-
-elf: $(TARGET).elf
-hex: $(TARGET).hex
-eep: $(TARGET).eep
-lss: $(TARGET).lss
-sym: $(TARGET).sym
-LIBNAME=lib$(TARGET).a
-lib: $(LIBNAME)
-
-
-
-# Eye candy.
-# AVR Studio 3.x does not check make's exit code but relies on
-# the following magic strings to be generated by the compile job.
-begin:
-       @echo
-       @echo $(MSG_BEGIN)
-
-end:
-       @echo $(MSG_END)
-       @echo
-
-
-# Display size of file.
-HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
-MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
-FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
-
-
-sizebefore:
-       @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
-       2>/dev/null; echo; fi
-
-sizeafter:
-       @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \
-       2>/dev/null; echo; fi
-
-
-
-# Display compiler version information.
-gccversion : 
-       @$(CC) --version
-
-
-# Program the device.  
-program: $(TARGET).hex $(TARGET).eep
-       $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)
-
-flip: $(TARGET).hex
-       batchisp -hardware usb -device $(MCU) -operation erase f
-       batchisp -hardware usb -device $(MCU) -operation loadbuffer $(TARGET).hex program
-       batchisp -hardware usb -device $(MCU) -operation start reset 0
-
-dfu: $(TARGET).hex
-       dfu-programmer $(MCU) erase
-       dfu-programmer $(MCU) flash $(TARGET).hex
-       dfu-programmer $(MCU) reset
-
-flip-ee: $(TARGET).hex $(TARGET).eep
-       $(COPY) $(TARGET).eep $(TARGET)eep.hex
-       batchisp -hardware usb -device $(MCU) -operation memory EEPROM erase
-       batchisp -hardware usb -device $(MCU) -operation memory EEPROM loadbuffer $(TARGET)eep.hex program
-       batchisp -hardware usb -device $(MCU) -operation start reset 0
-       $(REMOVE) $(TARGET)eep.hex
-
-dfu-ee: $(TARGET).hex $(TARGET).eep
-       dfu-programmer $(MCU) eeprom-flash $(TARGET).eep
-       dfu-programmer $(MCU) reset
-
-
-# Generate avr-gdb config/init file which does the following:
-#     define the reset signal, load the target file, connect to target, and set 
-#     a breakpoint at main().
-gdb-config: 
-       @$(REMOVE) $(GDBINIT_FILE)
-       @echo define reset >> $(GDBINIT_FILE)
-       @echo SIGNAL SIGHUP >> $(GDBINIT_FILE)
-       @echo end >> $(GDBINIT_FILE)
-       @echo file $(TARGET).elf >> $(GDBINIT_FILE)
-       @echo target remote $(DEBUG_HOST):$(DEBUG_PORT)  >> $(GDBINIT_FILE)
-ifeq ($(DEBUG_BACKEND),simulavr)
-       @echo load  >> $(GDBINIT_FILE)
-endif
-       @echo break main >> $(GDBINIT_FILE)
-
-debug: gdb-config $(TARGET).elf
-ifeq ($(DEBUG_BACKEND), avarice)
-       @echo Starting AVaRICE - Press enter when "waiting to connect" message displays.
-       @$(WINSHELL) /c start avarice --jtag $(JTAG_DEV) --erase --program --file \
-       $(TARGET).elf $(DEBUG_HOST):$(DEBUG_PORT)
-       @$(WINSHELL) /c pause
-
-else
-       @$(WINSHELL) /c start simulavr --gdbserver --device $(MCU) --clock-freq \
-       $(DEBUG_MFREQ) --port $(DEBUG_PORT)
-endif
-       @$(WINSHELL) /c start avr-$(DEBUG_UI) --command=$(GDBINIT_FILE)
-
-
-
-
-# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.
-COFFCONVERT = $(OBJCOPY) --debugging
-COFFCONVERT += --change-section-address .data-0x800000
-COFFCONVERT += --change-section-address .bss-0x800000
-COFFCONVERT += --change-section-address .noinit-0x800000
-COFFCONVERT += --change-section-address .eeprom-0x810000
-
-
-
-coff: $(TARGET).elf
-       @echo
-       @echo $(MSG_COFF) $(TARGET).cof
-       $(COFFCONVERT) -O coff-avr $< $(TARGET).cof
-
-
-extcoff: $(TARGET).elf
-       @echo
-       @echo $(MSG_EXTENDED_COFF) $(TARGET).cof
-       $(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof
-
-
-
-# Create final output files (.hex, .eep) from ELF output file.
-%.hex: %.elf
-       @echo
-       @echo $(MSG_FLASH) $@
-       $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock -R .signature $< $@
-
-%.eep: %.elf
-       @echo
-       @echo $(MSG_EEPROM) $@
-       -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
-       --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) $< $@ || exit 0
-
-# Create extended listing file from ELF output file.
-%.lss: %.elf
-       @echo
-       @echo $(MSG_EXTENDED_LISTING) $@
-       $(OBJDUMP) -h -S -z $< > $@
-
-# Create a symbol table from ELF output file.
-%.sym: %.elf
-       @echo
-       @echo $(MSG_SYMBOL_TABLE) $@
-       $(NM) -n $< > $@
-
-
-
-# Create library from object files.
-.SECONDARY : $(TARGET).a
-.PRECIOUS : $(OBJ)
-%.a: $(OBJ)
-       @echo
-       @echo $(MSG_CREATING_LIBRARY) $@
-       $(AR) $@ $(OBJ)
-
-
-# Link: create ELF output file from object files.
-.SECONDARY : $(TARGET).elf
-.PRECIOUS : $(OBJ)
-%.elf: $(OBJ)
-       @echo
-       @echo $(MSG_LINKING) $@
-       $(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS)
-
-
-# Compile: create object files from C source files.
-$(OBJDIR)/%.o : %.c
-       @echo
-       @echo $(MSG_COMPILING) $<
-       $(CC) -c $(ALL_CFLAGS) $< -o $@ 
-
-
-# Compile: create object files from C++ source files.
-$(OBJDIR)/%.o : %.cpp
-       @echo
-       @echo $(MSG_COMPILING_CPP) $<
-       $(CC) -c $(ALL_CPPFLAGS) $< -o $@ 
-
-
-# Compile: create assembler files from C source files.
-%.s : %.c
-       $(CC) -S $(ALL_CFLAGS) $< -o $@
-
-
-# Compile: create assembler files from C++ source files.
-%.s : %.cpp
-       $(CC) -S $(ALL_CPPFLAGS) $< -o $@
-
-
-# Assemble: create object files from assembler source files.
-$(OBJDIR)/%.o : %.S
-       @echo
-       @echo $(MSG_ASSEMBLING) $<
-       $(CC) -c $(ALL_ASFLAGS) $< -o $@
-
-
-# Create preprocessed source for use in sending a bug report.
-%.i : %.c
-       $(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@ 
-
-
-# Target: clean project.
-clean: begin clean_list end
-
-clean_list :
-       @echo
-       @echo $(MSG_CLEANING)
-       $(REMOVE) $(TARGET).hex
-       $(REMOVE) $(TARGET).eep
-       $(REMOVE) $(TARGET).cof
-       $(REMOVE) $(TARGET).elf
-       $(REMOVE) $(TARGET).map
-       $(REMOVE) $(TARGET).sym
-       $(REMOVE) $(TARGET).lss
-       $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o)
-       $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst)
-       $(REMOVE) $(SRC:.c=.s)
-       $(REMOVE) $(SRC:.c=.d)
-       $(REMOVE) $(SRC:.c=.i)
-       $(REMOVEDIR) .dep
-
-doxygen:
-       @echo Generating Project Documentation \($(TARGET)\)...
-       @if ( ( cat Doxygen.conf ; echo "HTML_STYLESHEET=$(LUFA_PATH)/LUFA/DoxygenPages/Style/Style.css" ) | doxygen - 2>&1 | grep -v "warning: ignoring unsupported tag" ;); then \
-         exit 1; \
-       fi;
-       @echo Documentation Generation Complete.
-
-clean_doxygen:
-       rm -rf Documentation
-
-checksource:
-       @for f in $(SRC) $(CPPSRC) $(ASRC); do \
-               if [ -f $$f ]; then \
-                       echo "Found Source File: $$f" ; \
-               else \
-                       echo "Source File Not Found: $$f" ; \
-               fi; done 
-
-
-# Create object files directory
-$(shell mkdir $(OBJDIR) 2>/dev/null)
-
-
-# Include the dependency files.
--include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
-
-
-# Listing of phony targets.
-.PHONY : all begin finish end sizebefore sizeafter gccversion \
-build elf hex eep lss sym coff extcoff doxygen clean          \
-clean_list clean_doxygen program dfu flip flip-ee dfu-ee      \
-debug gdb-config checksource
index f7dca66..9b719a2 100644 (file)
                /* Macros: */
                        #if (ARCH == ARCH_AVR8) || (ARCH == ARCH_XMEGA) || defined(__DOXYGEN__)
                                #if (ARCH == ARCH_AVR8) || defined(__DOXYGEN__)
+                                       /** Re-enables the AVR's JTAG bus in software, until a system reset. This will re-enable JTAG debugging
+                                        *  interface after is has been disabled in software via \ref JTAG_DISABLE().
+                                        *
+                                        *  \note This macro is not available for all architectures.
+                                        */
+                                       #define JTAG_ENABLE()                  MACROS{                                      \
+                                                                                                                                       __asm__ __volatile__ (               \
+                                                                                                                                       "in __tmp_reg__,__SREG__" "\n\t"     \
+                                                                                                                                       "cli" "\n\t"                         \
+                                                                                                                                       "out %1, %0" "\n\t"                  \
+                                                                                                                                       "out __SREG__, __tmp_reg__" "\n\t"   \
+                                                                                                                                       "out %1, %0" "\n\t"                  \
+                                                                                                                                       :                                    \
+                                                                                                                                       : "r" (MCUCR & ~(1 << JTD)),         \
+                                                                                                                                         "M" (_SFR_IO_ADDR(MCUCR))          \
+                                                                                                                                       : "r0");                             \
+                                                                                                                       }MACROE
+
                                        /** Disables the AVR's JTAG bus in software, until a system reset. This will override the current JTAG
                                         *  status as set by the JTAGEN fuse, disabling JTAG debugging and reverting the JTAG pins back to GPIO
                                         *  mode.
@@ -79,7 +97,7 @@
                                                                                                                                        "out __SREG__, __tmp_reg__" "\n\t"   \
                                                                                                                                        "out %1, %0" "\n\t"                  \
                                                                                                                                        :                                    \
-                                                                                                                                       : "r" (1 << JTD),                    \
+                                                                                                                                       : "r" (MCUCR | (1 << JTD)),          \
                                                                                                                                          "M" (_SFR_IO_ADDR(MCUCR))          \
                                                                                                                                        : "r0");                             \
                                                                                                                        }MACROE
index f4040b2..b058eed 100644 (file)
 
                        /** Forces the compiler to not automatically zero the given global variable on startup, so that the
                         *  current RAM contents is retained. Under most conditions this value will be random due to the
-                        *  behaviour of volatile memory once power is removed, but may be used in some specific circumstances,
+                        *  behavior of volatile memory once power is removed, but may be used in some specific circumstances,
                         *  like the passing of values back after a system watchdog reset.
                         */
                        #define ATTR_NO_INIT                     __attribute__ ((section (".noinit")))
index 54d7386..d2d657a 100644 (file)
                        #include "Endianness.h"
                #elif (ARCH == ARCH_UC3)
                        #include <avr32/io.h>
+                       #include <math.h>
 
                        // === TODO: Find abstracted way to handle these ===
-                       #define PROGMEM                  const
+                       #define PROGMEM                  
                        #define pgm_read_byte(x)         *x
                        #define memcmp_P(...)            memcmp(__VA_ARGS__)
                        #define memcpy_P(...)            memcpy(__VA_ARGS__)
index 5c3bf65..5280ae9 100644 (file)
@@ -728,7 +728,7 @@ EXCLUDE_SYMBOLS        = _* \
 # directories that contain example code fragments that are included (see
 # the \include command).
 
-EXAMPLE_PATH           = ../
+EXAMPLE_PATH           = ./ CodeTemplates/
 
 # If the value of the EXAMPLE_PATH tag contains directories, you can use the
 # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
diff --git a/LUFA/DoxygenPages/BuildSystem.txt b/LUFA/DoxygenPages/BuildSystem.txt
new file mode 100644 (file)
index 0000000..c30a88b
--- /dev/null
@@ -0,0 +1,846 @@
+/** \file\r
+ *\r
+ *  This file contains special DoxyGen information for the generation of the main page and other special\r
+ *  documentation pages. It is not a project source file.\r
+ */\r
+\r
+/** \page Page_BuildSystem The LUFA Build System\r
+ *\r
+ *  \section Sec_BuildSystemOverview Overview of the LUFA Build System\r
+ *  The LUFA build system is an attempt at making a set of re-usable, modular build make files which\r
+ *  can be referenced in a LUFA powered project, to minimise the amount of code required in an\r
+ *  application makefile. The system is written in GNU Make, and each module is independant of\r
+ *  one-another.\r
+ *\r
+ *  For details on the prerequisites needed for Linux and Windows machines to be able to use the LUFA\r
+ *  build system, see \ref Sec_Prerequisites.\r
+ *\r
+ *  To use a LUFA build system module, simply add an include to your project makefile:\r
+ *  \code\r
+ *  include $(LUFA_PATH)/Build/lufa_core.mk\r
+ *  \endcode\r
+ *\r
+ *  And the associated build module targets will be added to your project's build makefile automatically.\r
+ *  To call a build target, run <tt>make {TARGET_NAME}</tt> from the command line, substituting in\r
+ *  the appropriate target name.\r
+ *\r
+ *  \see \ref Sec_AppConfigParams for a copy of the sample LUFA project makefile.\r
+ *\r
+ *  Each build module may have one or more mandatory parameters (GNU Make variables) which <i>must</i>\r
+ *  be supplied in the project makefile for the module to work, and one or more optional parameters which\r
+ *  may be defined and which will assume a sensible default if not.\r
+ *\r
+ *  \section SSec_BuildSystemModules Available Modules\r
+ *\r
+ *  The following modules are included in this LUFA release:\r
+ *\r
+ *  \li \subpage Page_BuildModule_ATPROGRAM - Device Programming\r
+ *  \li \subpage Page_BuildModule_AVRDUDE - Device Programming\r
+ *  \li \subpage Page_BuildModule_BUILD - Compiling/Assembling/Linking\r
+ *  \li \subpage Page_BuildModule_CORE - Core Build System Functions\r
+ *  \li \subpage Page_BuildModule_CPPCHECK - Static Code Analysis\r
+ *  \li \subpage Page_BuildModule_DFU - Device Programming\r
+ *  \li \subpage Page_BuildModule_DOXYGEN - Automated Source Code Documentation\r
+ *  \li \subpage Page_BuildModule_HID - Device Programming\r
+ *  \li \subpage Page_BuildModule_SOURCES - LUFA Module Source Code Variables\r
+ */\r
\r
+ /** \page Page_BuildModule_BUILD The BUILD build module\r
+ *\r
+ *  The BUILD LUFA build system module, providing targets for the compilation,\r
+ *  assembling and linking of an application from source code into binary files\r
+ *  suitable for programming into a target device.\r
+ *\r
+ *  To use this module in your application makefile, add the following code:\r
+ *  \code\r
+ *  include $(LUFA_PATH)/Build/lufa_build.mk\r
+ *  \endcode\r
+ *\r
+ *  \section SSec_BuildModule_BUILD_Requirements Requirements\r
+ *  This module requires the the architecture appropriate binaries of the GCC compiler are  available in your\r
+ *  system's <b>PATH</b> variable. The GCC compiler and associated toolchain is distributed in Atmel AVR Studio\r
+ *  5.x and Atmel Studio 6.x installation directories, as well as in many third party distribution packages.\r
+ *\r
+ *  \section SSec_BuildModule_BUILD_Targets Targets\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><tt>size</tt></td>\r
+ *    <td>Display size of the compiled application FLASH and SRAM segments.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>symbol-sizes</tt></td>\r
+ *    <td>Display a size-sorted list of symbols from the compiled application, in decimal bytes.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>check-source</tt></td>\r
+ *    <td>Display a list of input SRC source files which cannot be found (if any).</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>lib</tt></td>\r
+ *    <td>Build and archive all source files into a library A binary file.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>all</tt></td>\r
+ *    <td>Build and link the application into ELF debug and HEX binary files.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>elf</tt></td>\r
+ *    <td>Build and link the application into an ELF debug file.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>hex</tt></td>\r
+ *    <td>Build and link the application and produce HEX and EEP binary files.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>lss</tt></td>\r
+ *    <td>Build and link the application and produce a LSS source code/assembly code mixed listing file.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>clean</tt></td>\r
+ *    <td>Remove all intermediatary files and binary output files.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>mostlyclean</tt></td>\r
+ *    <td>Remove all intermediatary files but preserve any binary output files.</td>\r
+ *   </tr>\r
+ *  </table>\r
+ *\r
+ *  \section SSec_BuildModule_BUILD_MandatoryParams Mandatory Parameters\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><tt>TARGET</tt></td>\r
+ *    <td>Name of the application output file prefix (e.g. <tt>TestApplication</tt>).</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>ARCH</tt></td>\r
+ *    <td>Architecture of the target processor (see \ref Page_DeviceSupport).</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>MCU</tt></td>\r
+ *    <td>Name of the Atmel processor model (e.g. <tt>at90usb1287</tt>).</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>SRC</tt></td>\r
+ *    <td>List of relative or absolute paths to the application C (.c), C++ (.cpp) and Assembly (.S) source files.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>F_USB</tt></td>\r
+ *    <td>Speed in Hz of the input clock frequency to the target's USB controller.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>LUFA_PATH</tt></td>\r
+ *    <td>Path to the LUFA library core, either relative or absolute (e.g. <tt>../LUFA-000000/LUFA/</tt>).</td>\r
+ *   </tr>\r
+ *  </table>\r
+ *\r
+ *  \section SSec_BuildModule_BUILD_OptionalParams Optional Parameters\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><tt>BOARD</tt></td>\r
+ *    <td>LUFA board hardware drivers to use (see \ref Page_DeviceSupport).</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>OPTIMIZATION</tt></td>\r
+ *    <td>Optimization level to use when compiling source files (see GCC manual).</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>C_STANDARD</tt></td>\r
+ *    <td>Version of the C standard to apply when compiling C++ source files (see GCC manual).</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>CPP_STANDARD</tt></td>\r
+ *    <td>Version of the C++ standard to apply when compiling C++ source files (see GCC manual).</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>DEBUG_FORMAT</tt></td>\r
+ *    <td>Format of the debug information to embed in the generated object files (see GCC manual).</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>DEBUG_LEVEL</tt></td>\r
+ *    <td>Level of the debugging information to embed in the generated object files (see GCC manual).</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>F_CPU</tt></td>\r
+ *    <td>Speed of the processor CPU clock, in Hz.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>C_FLAGS</tt></td>\r
+ *    <td>Flags to pass to the C compiler only, after the automatically generated flags.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>CPP_FLAGS</tt></td>\r
+ *    <td>Flags to pass to the C++ compiler only, after the automatically generated flags.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>ASM_FLAGS</tt></td>\r
+ *    <td>Flags to pass to the assembler only, after the automatically generated flags.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>CC_FLAGS</tt></td>\r
+ *    <td>Common flags to pass to the C/C++ compiler and assembler, after the automatically generated flags.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>LD_FLAGS</tt></td>\r
+ *    <td>Flags to pass to the linker, after the automatically generated flags.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>OBJDIR</tt></td>\r
+ *    <td>Directory to place the generated object and dependency files. If set to "." the same folder as the source file will be used.\r
+ *        \note When this option is enabled, all source filenames <b>must</b> be unique.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>OBJECT_FILES</tt></td>\r
+ *    <td>List of additional object files that should be linked into the resulting binary.</td>\r
+ *   </tr>\r
+ *  </table>\r
+ *\r
+ *  \section SSec_BuildModule_BUILD_ProvidedVariables Module Provided Variables\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><i>None</i></td>\r
+ *   </tr>\r
+ *  </table> \r
+ *\r
+ *  \section SSec_BuildModule_BUILD_ProvidedMacros Module Provided Macros\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><i>None</i></td>\r
+ *   </tr>\r
+ *  </table>\r
+ */\r
+\r
+/** \page Page_BuildModule_CORE The CORE build module\r
+ *\r
+ *  The core LUFA build system module, providing common build system help and information targets.\r
+ *\r
+ *  To use this module in your application makefile, add the following code:\r
+ *  \code\r
+ *  include $(LUFA_PATH)/Build/lufa_core.mk\r
+ *  \endcode\r
+ *\r
+ *  \section SSec_BuildModule_CORE_Requirements Requirements\r
+ *  This module has no requirements outside a standard *nix shell like environment; the <tt>sh</tt>\r
+ *  shell, GNU <tt>make</tt> and *nix CoreUtils (<tt>echo</tt>, <tt>printf</tt>, etc.).\r
+ *\r
+ *  \section SSec_BuildModule_CORE_Targets Targets\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><tt>help</tt></td>\r
+ *    <td>Display build system help and configuration information.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>list_targets</tt></td>\r
+ *    <td>List all available build targets from the build system.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>list_modules</tt></td>\r
+ *    <td>List all available build modules from the build system.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>list_mandatory</tt></td>\r
+ *    <td>List all mandatory parameters required by the included modules.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>list_optional</tt></td>\r
+ *    <td>List all optional parameters required by the included modules.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>list_provided</tt></td>\r
+ *    <td>List all variables provided by the included modules.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>list_macros</tt></td>\r
+ *    <td>List all macros provided by the included modules.</td>\r
+ *   </tr>\r
+ *  </table>\r
+ *\r
+ *  \section SSec_BuildModule_CORE_MandatoryParams Mandatory Parameters\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><i>None</i></td>\r
+ *   </tr>\r
+ *  </table>\r
+ *\r
+ *  \section SSec_BuildModule_CORE_OptionalParams Optional Parameters\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><i>None</i></td>\r
+ *   </tr>\r
+ *  </table>\r
+ *\r
+ *  \section SSec_BuildModule_CORE_ProvidedVariables Module Provided Variables\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><i>None</i></td>\r
+ *   </tr>\r
+ *  </table> \r
+ *\r
+ *  \section SSec_BuildModule_CORE_ProvidedMacros Module Provided Macros\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><i>None</i></td>\r
+ *   </tr>\r
+ *  </table>\r
+ */\r
+\r
+/** \page Page_BuildModule_ATPROGRAM The ATPROGRAM build module\r
+ *\r
+ *  The ATPROGRAM programming utility LUFA build system module, providing targets to reprogram an\r
+ *  Atmel processor FLASH and EEPROM memories with a project's compiled binary output files.\r
+ *\r
+ *  To use this module in your application makefile, add the following code:\r
+ *  \code\r
+ *  include $(LUFA_PATH)/Build/lufa_atprogram.mk\r
+ *  \endcode\r
+ *\r
+ *  \section SSec_BuildModule_ATPROGRAM_Requirements Requirements\r
+ *  This module requires the <tt>atprogram.exe</tt> utility to be available in your system's <b>PATH</b>\r
+ *  variable. The <tt>atprogram.exe</tt> utility is distributed in Atmel AVR Studio 5.x and Atmel Studio 6.x\r
+ *  inside the application install folder's "\avrdbg" subdirectory.\r
+ *\r
+ *  \section SSec_BuildModule_ATPROGRAM_Targets Targets\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><tt>atprogram</tt></td>\r
+ *    <td>Program the device FLASH memory with the application's executable data.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>atprogram-ee</tt></td>\r
+ *    <td>Program the device EEPROM memory with the application's EEPROM data.</td>\r
+ *   </tr>\r
+ *  </table>\r
+ *\r
+ *  \section SSec_BuildModule_ATPROGRAM_MandatoryParams Mandatory Parameters\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><tt>MCU</tt></td>\r
+ *    <td>Name of the Atmel processor model (e.g. <tt>at90usb1287</tt>).</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>TARGET</tt></td>\r
+ *    <td>Name of the application output file prefix (e.g. <tt>TestApplication</tt>).</td>\r
+ *   </tr>\r
+ *  </table>\r
+ *\r
+ *  \section SSec_BuildModule_ATPROGRAM_OptionalParams Optional Parameters\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><tt>ATPROGRAM_PROGRAMMER</tt></td>\r
+ *    <td>Name of the Atmel programmer or debugger tool to communicate with (e.g. <tt>jtagice3</tt>).</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>ATPROGRAM_INTERFACE</tt></td>\r
+ *    <td>Name of the programming interface to use when programming the target (e.g. <tt>spi</tt>).</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>ATPROGRAM_PORT</tt></td>\r
+ *    <td>Name of the communication port to use when when programming with a serially connected tool (e.g. <tt>COM2</tt>).</td>\r
+ *   </tr>\r
+ *  </table>\r
+ *\r
+ *  \section SSec_BuildModule_ATPROGRAM_ProvidedVariables Module Provided Variables\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><i>None</i></td>\r
+ *   </tr>\r
+ *  </table> \r
+ *\r
+ *  \section SSec_BuildModule_ATPROGRAM_ProvidedMacros Module Provided Macros\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><i>None</i></td>\r
+ *   </tr>\r
+ *  </table>\r
+ */\r
+\r
+/** \page Page_BuildModule_AVRDUDE The AVRDUDE build module\r
+ *\r
+ *  The AVRDUDE programming utility LUFA build system module, providing targets to reprogram an\r
+ *  Atmel processor FLASH and EEPROM memories with a project's compiled binary output files.\r
+ *\r
+ *  To use this module in your application makefile, add the following code:\r
+ *  \code\r
+ *  include $(LUFA_PATH)/Build/lufa_avrdude.mk\r
+ *  \endcode\r
+ *\r
+ *  \section SSec_BuildModule_AVRDUDE_Requirements Requirements\r
+ *  This module requires the <tt>avrdude</tt> utility to be available in your system's <b>PATH</b>\r
+ *  variable. The <tt>avrdude</tt> utility is distributed in the old WinAVR project releases for\r
+ *  Windows (<a>winavr.sourceforge.net</a>) or can be installed on *nix systems via the project's\r
+ *  source code (<a>https://savannah.nongnu.org/projects/avrdude</a>) or through the package manager.\r
+ *\r
+ *  \section SSec_BuildModule_AVRDUDE_Targets Targets\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><tt>avrdude</tt></td>\r
+ *    <td>Program the device FLASH memory with the application's executable data.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>avrdude</tt></td>\r
+ *    <td>Program the device EEPROM memory with the application's EEPROM data.</td>\r
+ *   </tr>\r
+ *  </table>\r
+ *\r
+ *  \section SSec_BuildModule_AVRDUDE_MandatoryParams Mandatory Parameters\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><tt>MCU</tt></td>\r
+ *    <td>Name of the Atmel processor model (e.g. <tt>at90usb1287</tt>).</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>TARGET</tt></td>\r
+ *    <td>Name of the application output file prefix (e.g. <tt>TestApplication</tt>).</td>\r
+ *   </tr>\r
+ *  </table>\r
+ *\r
+ *  \section SSec_BuildModule_AVRDUDE_OptionalParams Optional Parameters\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><tt>AVRDUDE_PROGRAMMER</tt></td>\r
+ *    <td>Name of the programmer or debugger tool to communicate with (e.g. <tt>jtagicemkii</tt>).</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>ATPROGRAM_PORT</tt></td>\r
+ *    <td>Name of the communication port to use when when programming with the connected tool (e.g. <tt>COM2</tt>, <tt>/dev/ttyUSB0</tt> or <tt>usb</tt>).</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>ATPROGRAM_FLAGS</tt></td>\r
+ *    <td>Additional flags to pass to avrdude when programming, applied after the automatically generated flags.</td>\r
+ *   </tr>\r
+ *  </table>\r
+ *\r
+ *  \section SSec_BuildModule_AVRDUDE_ProvidedVariables Module Provided Variables\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><i>None</i></td>\r
+ *   </tr>\r
+ *  </table> \r
+ *\r
+ *  \section SSec_BuildModule_AVRDUDE_ProvidedMacros Module Provided Macros\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><i>None</i></td>\r
+ *   </tr>\r
+ *  </table>\r
+ */\r
\r
+ /** \page Page_BuildModule_CPPCHECK The CPPCHECK build module\r
+ *\r
+ *  The CPPCHECK programming utility LUFA build system module, providing targets to statically\r
+ *  analyze C and C++ source code for errors and performance/style issues.\r
+ *\r
+ *  To use this module in your application makefile, add the following code:\r
+ *  \code\r
+ *  include $(LUFA_PATH)/Build/lufa_cppcheck.mk\r
+ *  \endcode\r
+ *\r
+ *  \section SSec_BuildModule_CPPCHECK_Requirements Requirements\r
+ *  This module requires the <tt>cppcheck</tt> utility to be available in your system's <b>PATH</b>\r
+ *  variable. The <tt>cppcheck</tt> utility is distributed through the project's home page\r
+ *  (<a>http://cppcheck.sourceforge.net</a>) for Windows, and can be installed on *nix systems via\r
+ *  the project's source code or through the package manager.\r
+ *\r
+ *  \section SSec_BuildModule_CPPCHECK_Targets Targets\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><tt>cppcheck</tt></td>\r
+ *    <td>Statically analyze the project source code for issues.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>cppcheck-config</tt></td>\r
+ *    <td>Check the <tt>cppcheck</tt> configuration - scan source code and warn about missing header files and other issues.</td>\r
+ *   </tr>\r
+ *  </table>\r
+ *\r
+ *  \section SSec_BuildModule_CPPCHECK_MandatoryParams Mandatory Parameters\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><tt>SRC</tt></td>\r
+ *    <td>List of source files to statically analyze.</td>\r
+ *   </tr>\r
+ *  </table>\r
+ *\r
+ *  \section SSec_BuildModule_CPPCHECK_OptionalParams Optional Parameters\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><tt>CPPCHECK_INCLUDES</tt></td>\r
+ *    <td>Path of extra directories to check when attemting to resolve C/C++ header file includes.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>CPPCHECK_EXCLUDES</tt></td>\r
+ *    <td>Paths or path fragments to exclude when analyzing.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>CPPCHECK_MSG_TEMPLATE</tt></td>\r
+ *    <td>Output message template to use when printing errors, warnings and information (see <tt>cppcheck</tt> documentation).</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>CPPCHECK_ENABLE</tt></td>\r
+ *    <td>Analysis rule categories to enable (see <tt>cppcheck</tt> documentation).</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>CPPCHECK_SUPPRESS</tt></td>\r
+ *    <td>Specific analysis rules to suppress (see <tt>cppcheck</tt> documentation).</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>CPPCHECK_FAIL_ON_WARNING</tt></td>\r
+ *    <td>Set to <b>Y</b> to fail the analysis job with an error exit code if warnings are found, <b>N</b> to continue without failing.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>CPPCHECK_QUIET</tt></td>\r
+ *    <td>Set to <b>Y</b> to suppress all output except warnings and errors, <b>N</b> to show verbose output information.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>CPPCHECK_FLAGS</tt></td>\r
+ *    <td>Extra flags to pass to <tt>cppcheck</tt>, after the automatically generated flags.</td>\r
+ *   </tr>\r
+ *  </table>\r
+ *\r
+ *  \section SSec_BuildModule_CPPCHECK_ProvidedVariables Module Provided Variables\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><i>None</i></td>\r
+ *   </tr>\r
+ *  </table> \r
+ *\r
+ *  \section SSec_BuildModule_CPPCHECK_ProvidedMacros Module Provided Macros\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><i>None</i></td>\r
+ *   </tr>\r
+ *  </table>\r
+ */\r
\r
+ /** \page Page_BuildModule_DFU The DFU build module\r
+ *\r
+ *  The DFU programming utility LUFA build system module, providing targets to reprogram an\r
+ *  Atmel processor FLASH and EEPROM memories with a project's compiled binary output files.\r
+ *  This module requires a DFU class bootloader to be running in the target, compatible with\r
+ *  the DFU bootloader protocol as published by Atmel.\r
+ *\r
+ *  To use this module in your application makefile, add the following code:\r
+ *  \code\r
+ *  include $(LUFA_PATH)/Build/lufa_dfu.mk\r
+ *  \endcode\r
+ *\r
+ *  \section SSec_BuildModule_DFU_Requirements Requirements\r
+ *  This module requires either the <tt>batchisp</tt> utility from Atmel's FLIP utility, or the open\r
+ *  source <tt>dfu-programmer</tt> utility (<a>http://dfu-programmer.sourceforge.net/</a>) to be\r
+ *  available in your system's <b>PATH</b> variable. On *nix systems the <tt>dfu-programmer</tt> utility\r
+ *  can be installed via the project's source code or through the package manager.\r
+ *\r
+ *  \section SSec_BuildModule_DFU_Targets Targets\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><tt>dfu</tt></td>\r
+ *    <td>Program the device FLASH memory with the application's executable data using <tt>dfu-programmer</tt>.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>dfu-ee</tt></td>\r
+ *    <td>Program the device EEPROM memory with the application's EEPROM data using <tt>dfu-programmer</tt>.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>flip</tt></td>\r
+ *    <td>Program the device FLASH memory with the application's executable data using <tt>batchisp</tt>.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>flip-ee</tt></td>\r
+ *    <td>Program the device EEPROM memory with the application's EEPROM data using <tt>batchisp</tt>.</td>\r
+ *   </tr>\r
+ *  </table>\r
+ *\r
+ *  \section SSec_BuildModule_DFU_MandatoryParams Mandatory Parameters\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><tt>MCU</tt></td>\r
+ *    <td>Name of the Atmel processor model (e.g. <tt>at90usb1287</tt>).</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>TARGET</tt></td>\r
+ *    <td>Name of the application output file prefix (e.g. <tt>TestApplication</tt>).</td>\r
+ *   </tr>\r
+ *  </table>\r
+ *\r
+ *  \section SSec_BuildModule_DFU_OptionalParams Optional Parameters\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><i>None</i></td>\r
+ *   </tr>\r
+ *  </table>\r
+ *\r
+ *  \section SSec_BuildModule_DFU_ProvidedVariables Module Provided Variables\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><i>None</i></td>\r
+ *   </tr>\r
+ *  </table> \r
+ *\r
+ *  \section SSec_BuildModule_DFU_ProvidedMacros Module Provided Macros\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><i>None</i></td>\r
+ *   </tr>\r
+ *  </table>\r
+ */\r
\r
+ /** \page Page_BuildModule_DOXYGEN The DOXYGEN build module\r
+ *\r
+ *  The DOXYGEN code documentation utility LUFA build system module, providing targets to generate\r
+ *  project HTML and other format documentation from a set of source files that include special\r
+ *  Doxygen comments.\r
+ *\r
+ *  To use this module in your application makefile, add the following code:\r
+ *  \code\r
+ *  include $(LUFA_PATH)/Build/lufa_doxygen.mk\r
+ *  \endcode\r
+ *\r
+ *  \section SSec_BuildModule_DOXYGEN_Requirements Requirements\r
+ *  This module requires the <tt>doxygen</tt> utility from the Doxygen website\r
+ *  (<a>http://www.stack.nl/~dimitri/doxygen/</a>) to be available in your system's <b>PATH</b>\r
+ *  variable. On *nix systems the <tt>doxygen</tt> utility can be installed via the project's source\r
+ *  code or through the package manager.\r
+ *\r
+ *  \section SSec_BuildModule_DOXYGEN_Targets Targets\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><tt>doxygen</tt></td>\r
+ *    <td>Generate project documentation.</td>\r
+ *   </tr>\r
+ *  </table>\r
+ *\r
+ *  \section SSec_BuildModule_DOXYGEN_MandatoryParams Mandatory Parameters\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><tt>LUFA_PATH</tt></td>\r
+ *    <td>Path to the LUFA library core, either relative or absolute (e.g. <tt>../LUFA-000000/LUFA/</tt>).</td>\r
+ *   </tr>\r
+ *  </table>\r
+ *\r
+ *  \section SSec_BuildModule_DOXYGEN_OptionalParams Optional Parameters\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><tt>DOXYGEN_CONF</tt></td>\r
+ *    <td>Name and path of the base Doxygen configuration file for the project.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>DOXYGEN_FAIL_ON_WARNING</tt></td>\r
+ *    <td>Set to <b>Y</b> to fail the generation with an error exit code if warnings are found other than unsupported configuration parameters, <b>N</b> to continue without failing.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>DOXYGEN_OVERRIDE_PARAMS</tt></td>\r
+ *    <td>Extra Doxygen configuration parameters to apply, overriding the corresponding config entry in the project's configuration file (e.g. <tt>QUIET=YES</tt>).</td>\r
+ *   </tr>\r
+ *  </table>\r
+ *\r
+ *  \section SSec_BuildModule_DOXYGEN_ProvidedVariables Module Provided Variables\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><i>None</i></td>\r
+ *   </tr>\r
+ *  </table> \r
+ *\r
+ *  \section SSec_BuildModule_DOXYGEN_ProvidedMacros Module Provided Macros\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><i>None</i></td>\r
+ *   </tr>\r
+ *  </table>\r
+ */\r
\r
+ /** \page Page_BuildModule_HID The HID build module\r
+ *\r
+ *  The HID programming utility LUFA build system module, providing targets to reprogram an\r
+ *  Atmel processor's FLASH memory with a project's compiled binary output file. This module\r
+ *  requires a HID class bootloader to be running in the target, using a protocol compatible\r
+ *  with the PJRC "HalfKay" protocol (<a>http://www.pjrc.com/teensy/halfkay_protocol.html</a>).\r
+ *\r
+ *  To use this module in your application makefile, add the following code:\r
+ *  \code\r
+ *  include $(LUFA_PATH)/Build/lufa_hid.mk\r
+ *  \endcode\r
+ *\r
+ *  \section SSec_BuildModule_HID_Requirements Requirements\r
+ *  This module requires either the <tt>hid_bootloader_cli</tt> utility from the included LUFA HID\r
+ *  class bootloader API subdirectory, or the <tt>teensy_loader_cli</tt> utility from PJRC\r
+ *  (<a>http://www.pjrc.com/teensy/loader_cli.html</a>) to be available in your system's <b>PATH</b>\r
+ *  variable.\r
+ *\r
+ *  \section SSec_BuildModule_HID_Targets Targets\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><tt>hid</tt></td>\r
+ *    <td>Program the device FLASH memory with the application's executable data using <tt>hid_bootloader_cli</tt>.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>hid-ee</tt></td>\r
+ *    <td>Program the device EEPROM memory with the application's EEPROM data using <tt>hid_bootloader_cli</tt> and\r
+ *        a temporary AVR application programmed into the target's FLASH.\r
+ *        \note This will erase the currently loaded application in the target.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>teensy</tt></td>\r
+ *    <td>Program the device FLASH memory with the application's executable data using <tt>teensy_loader_cli</tt>.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>teensy-ee</tt></td>\r
+ *    <td>Program the device EEPROM memory with the application's EEPROM data using <tt>teensy_loader_cli</tt> and\r
+ *        a temporary AVR application programmed into the target's FLASH.\r
+ *        \note This will erase the currently loaded application in the target.</td>\r
+ *   </tr>\r
+ *  </table>\r
+ *\r
+ *  \section SSec_BuildModule_HID_MandatoryParams Mandatory Parameters\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><tt>MCU</tt></td>\r
+ *    <td>Name of the Atmel processor model (e.g. <tt>at90usb1287</tt>).</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>TARGET</tt></td>\r
+ *    <td>Name of the application output file prefix (e.g. <tt>TestApplication</tt>).</td>\r
+ *   </tr>\r
+ *  </table>\r
+ *\r
+ *  \section SSec_BuildModule_HID_OptionalParams Optional Parameters\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><i>None</i></td>\r
+ *   </tr>\r
+ *  </table>\r
+ *\r
+ *  \section SSec_BuildModule_HID_ProvidedVariables Module Provided Variables\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><i>None</i></td>\r
+ *   </tr>\r
+ *  </table> \r
+ *\r
+ *  \section SSec_BuildModule_HID_ProvidedMacros Module Provided Macros\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><i>None</i></td>\r
+ *   </tr>\r
+ *  </table>\r
+ */\r
\r
+ /** \page Page_BuildModule_SOURCES The SOURCES build module\r
+ *\r
+ *  The SOURCES LUFA build system module, providing variables listing the various LUFA source files\r
+ *  required to be build by a project for a given LUFA module. This module gives a way to reference\r
+ *  LUFA source files symbollically, so that changes to the library structure do not break the library\r
+ *  makefile.\r
+ *\r
+ *  To use this module in your application makefile, add the following code:\r
+ *  \code\r
+ *  include $(LUFA_PATH)/Build/lufa_sources.mk\r
+ *  \endcode\r
+ *\r
+ *  \section SSec_BuildModule_SOURCES_Requirements Requirements\r
+ *  None.\r
+ *\r
+ *  \section SSec_BuildModule_SOURCES_Targets Targets\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><i>None</i></td>\r
+ *   </tr>\r
+ *  </table>\r
+ *\r
+ *  \section SSec_BuildModule_SOURCES_MandatoryParams Mandatory Parameters\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><tt>LUFA_PATH</tt></td>\r
+ *    <td>Path to the LUFA library core, either relative or absolute (e.g. <tt>../LUFA-000000/LUFA/</tt>).</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>ARCH</tt></td>\r
+ *    <td>Architecture of the target processor (see \ref Page_DeviceSupport).</td>\r
+ *   </tr>\r
+ *  </table>\r
+ *\r
+ *  \section SSec_BuildModule_SOURCES_OptionalParams Optional Parameters\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><i>None</i></td>\r
+ *   </tr>\r
+ *  </table>\r
+ *\r
+ *  \section SSec_BuildModule_SOURCES_ProvidedVariables Module Provided Variables\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><tt>LUFA_SRC_USB</tt></td>\r
+ *    <td>List of LUFA USB driver source files.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>LUFA_SRC_USBCLASS</tt></td>\r
+ *    <td>List of LUFA USB Class driver source files.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>LUFA_SRC_TEMPERATURE</tt></td>\r
+ *    <td>List of LUFA temperature sensor driver source files.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>LUFA_SRC_SERIAL</tt></td>\r
+ *    <td>List of LUFA Serial U(S)ART driver source files.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>LUFA_SRC_TWI</tt></td>\r
+ *    <td>List of LUFA TWI driver source files.</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><tt>LUFA_SRC_PLATFORM</tt></td>\r
+ *    <td>List of LUFA architecture specific platform management source files.</td>\r
+ *   </tr> \r
+ *  </table> \r
+ *\r
+ *  \section SSec_BuildModule_SOURCES_ProvidedMacros Module Provided Macros\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><i>None</i></td>\r
+ *   </tr>\r
+ *  </table>\r
+ */\r
index 14c9ef0..999af82 100644 (file)
@@ -6,7 +6,7 @@
 
  /** \page Page_ChangeLog Project Changelog
   *
-  *  \section Sec_ChangeLogXXXXXX Version XXXXXX
+  *  \section Sec_ChangeLog120730 Version 120730 (BETA)
   *  <b>New:</b>
   *  - Core:
   *   - Added new, revamped modular build system with new makefile templates
@@ -18,7 +18,8 @@
   *   - Added new Pipe_ConfigurePipeTable() function
   *   - Added build test to verify correct compilation of all board drivers using all driver APIs
   *   - Added build test to verify correct compilation of all bootloaders using all supported devices  
-  *   - Added build test to verify that there are no detectable errors in the codebase via static analysis 
+  *   - Added build test to verify that there are no detectable errors in the codebase via static analysis
+  *   - Added new JTAG_ENABLE() macro for the AVR8 architecture
   *  - Library Applications:
   *   - Modified the CDC Host demos to set a default CDC Line Encoding on enumerated devices
   *   - Added Dataflash operational checks and aborts to all projects using the Dataflash to ensure it is working correctly before use
@@ -66,6 +67,8 @@
   *     the stack (thanks to Jonathan Hudgins)
   *   - Fixed broken MIDI host driver MIDI_Host_ReceiveEventPacket() function due to not unfreezing the MIDI data IN pipe before use (thanks to Michael Brown)
   *   - Fixed swapped Little Endian/Big Endian endpoint and pipe write code for the UC3 devices (thanks to Andrew Chu)
+  *   - Fixed the JTAG_DISABLE() macro clearing all other bits in MCUSR when called
+  *   - Fixed incorrect Micropendous board LED driver LEDs_SetAllLEDs() and LEDs_ChangeLEDs() function implementations (thanks to MitchJS)
   *  - Library Applications:
   *   - Fixed error in the AVRISP-MKII programmer when ISP mode is used at 64KHz (thanks to Ben R. Porter)
   *   - Fixed AVRISP-MKII programmer project failing to compile for the U4 chips when VTARGET_ADC_CHANNEL is defined to an invalid channel and NO_VTARGET_DETECT is
@@ -75,6 +78,8 @@
   *   - Fixed CDC and DFU bootloaders API function offsets incorrect on some devices (thanks to Rod DeMay)
   *   - Fixed incorrect DFU version number reported to the host in the  DFU bootloader descriptors (thanks to Georg Glock)
   *   - Fixed incorrect version hundredths value encoding in VERSION_BCD() macro (thanks to Georg Glock)
+  *   - Fixed invalid configuration descriptor in the low level KeyboardMouse device demo (thanks to Jun Wako)
+  *   - Fixed CDC and DFU bootloaders API page erase and write function failures (thanks to Martin Lambert)
   *
   *  \section Sec_ChangeLog120219 Version 120219
   *  <b>New:</b>
index 8c348dd..79c4cd4 100644 (file)
  *    is through control endpoint requests. Defining this token will remove several features related to the selection and control of device
  *    endpoints internally, saving space. Generally, this is usually only useful in (some) bootloaders and is best avoided.
  *
+ *  - <b>MAX_ENDPOINT_INDEX</b> - (\ref Group_Device) - <i>XMEGA Only</i> \n
+ *    Defining this value to the highest index (not address - this excludes the direction flag) endpoint within the device will restrict the
+ *    number of FIFOs created internally for the endpoint buffers, reducing the total RAM usage.
+ *
  *  - <b>INTERRUPT_CONTROL_ENDPOINT</b> - (\ref Group_USBManagement) - <i>All Architectures</i> \n
  *    Some applications prefer to not call the USB_USBTask() management task regularly while in device mode, as it can complicate code significantly.
  *    Instead, when device mode is used this token can be passed to the library via the -D switch to allow the library to manage the USB control
index bbed994..40e03a7 100644 (file)
@@ -37,7 +37,7 @@
  *  each individual demo, bootloader and project folder, as well as scripts in the Demos/, Bootloaders/, Projects/
  *  and the LUFA root directory. Compilation of projects can be started from any of the above directories, with a build
  *  started from an upper directory in the directory structure executing build of all child directories under it. This
- *  means that while a build inside a particular demo directory will build only that particular demo, a build stated from
+ *  means that while a build inside a particular demo directory will build only that particular demo, a build started from
  *  the /Demos/ directory will build all LUFA demo projects sequentially.
  *
  *  To build a project from the source via the command line, the command <b>"make all"</b> should be executed from the command
@@ -45,4 +45,6 @@
  *  diagnostic output files), execute <b>"make clean"</b>. Once a "make all" has been run and no errors were encountered, the
  *  resulting binary will be located in the generated ".HEX" file. If your project makes use of pre-initialized EEPROM
  *  variables, the generated ".EEP" file will contain the project's EEPROM data.
+ *
+ *  \see \ref Page_BuildSystem for information on the LUFA build system.
  */
index 6caf185..976927a 100644 (file)
@@ -8,44 +8,54 @@
  *
  *  If the target microcontroller model, architecture, clock speed, board or other settings are different from the current
  *  settings, they must be changed and the project recompiled from the source code before being programmed into the microcontroller.
- *  Most project configuration options are located in the "makefile" build script inside each LUFA application's folder, however
- *  some demo or application-specific configuration settings (such as the output format in the AudioOut demo) are located in one or
- *  more of the source files of the project. See each project's individual documentation for application-specific configuration
- *  values.
+ *  Most project configuration options are located in the <tt>makefile</tt> build script inside each LUFA application's folder,
+ *  however some demo or application-specific configuration settings are located in one or more of the source files of the project.
+ *  See each project's individual documentation for application-specific configuration values.
  *
  *  Each project "makefile" contains all the script and configuration data required to compile each project. When opened with
  *  any regular basic text editor such as Notepad or WordPad (ensure that the save format is a pure ASCII text format) the
  *  build configuration settings may be altered.
  *
- *  Inside each makefile, a number of configuration variables are located, with the format "<VARIABLE NAME> = <VALUE>". For
- *  each application, the important variables which should be altered are:
+ *  \see \ref Page_BuildSystem for information on the LUFA build system.
+ *
+ *  \section Sec_AppConfigParams The Default Application Template
+ *
+ *  Below is a copy of the default LUFA application makefile, which can be used as a template for each application.
+ *
+ *  \verbinclude makefile_template
+ *
+ *  Inside each makefile, a number of configuration variables are listed with the syntax "<VARIABLE NAME> = <VALUE>". For
+ *  each application, the important standard variables which should be altered are:
  *
  *    - <b>MCU</b>, the target processor model
  *    - <b>ARCH</b>, the target microcontroller architecture
  *    - <b>BOARD</b>, the target board hardware
  *    - <b>F_CPU</b>, the target CPU master clock frequency, after any prescaling
  *    - <b>F_USB</b>, the target raw input clock to the USB module of the processor
- *    - <b>CDEFS</b>, the C preprocessor defines which configure options the source code
- *    - <b>LUFA_PATH</b>, the path to the LUFA library source code
- *    - <b>LUFA_OPTS</b>, the compile time LUFA options which configure the library features
+ *    - <b>OPTIMIZATION</b>, the level of optimization to compile with
+ *    - <b>TARGET</b>, the name of the target output binary and other files
+ *    - <b>SRC</b>, the list of source files to compile/assemble/link
+ *    - <b>LUFA_PATH</b>, the path to the LUFA library core source code
+ *    - <b>CC_FLAGS</b>, the common command line flags to pass to the C/C++ compiler, assembler and linker
+ *    - <b>LD_FLAGS</b>, the command line flags to pass to the linker
  *
  *  These values should be changed to reflect the build hardware.
  *
- *  \section Sec_MCU The MCU Parameter
+ *  \subsection SSec_MCU The MCU Parameter
  *  This parameter indicates the target microcontroller model for the compiled application. This should be set to the model of the target
  *  microcontroller (such as the AT90USB1287, or the ATMEGA32U4), in all lower-case (e.g. "at90usb1287"). Note that not all demos support all the
  *  microcontroller models and architectures, as they may make use of peripherals or modes only present in some devices.
  *
  *  For supported processor models, see \ref Page_DeviceSupport.
  *
- *  \section Sec_ARCH The ARCH Parameter
+ *  \subsection SSec_ARCH The ARCH Parameter
  *  This parameter indicates the target microcontroller architecture the library is to be compiled for. Different microcontroller
  *  architectures require different source files to be compiled into the final binary, and so this option must be set to the correct
  *  architecture for the selected platform.
  *
  *  For supported processor architectures, see \ref Page_DeviceSupport.
  *
- *  \section Sec_BOARD The BOARD Parameter
+ *  \subsection SSec_BOARD The BOARD Parameter
  *  This parameter indicates the target board hardware for the compiled application. Some LUFA library drivers are board-specific,
  *  such as the LED driver, and the library needs to know the layout of the target board. If you are using one of the board models listed
  *  on the main library page, change this parameter to the board name in all UPPER-case.
  *
  *  For boards with built in hardware driver support within the LUFA library, see \ref Page_DeviceSupport.
  *
- *  \section Sec_F_CPU The F_CPU Parameter
+ *  \subsection SSec_F_CPU The F_CPU Parameter
  *  This parameter indicates the target microcontroller's main CPU clock frequency, in Hz. This is used by many libraries (and applications) for
  *  timing related purposes, and should reflect the actual CPU speed after any prescaling or adjustments are performed.
  *
- *  \section Sec_F_USB The F_USB Parameter
+ *  \subsection SSec_F_USB The F_USB Parameter
  *  This parameter indicates the raw input clock frequency to the USB module within the microcontroller in Hz. This may be very different on some platforms
  *  to the main CPU clock or other peripheral/bus clocks.
  *
- *  \section Sec_CDEFS The CDEFS Parameter
- *  Many applications have features which can be controlled by the defining of specially named preprocessor tokens at the point of compilation - for example,
- *  an application might use a compile time token to turn on or off optional or mutually exclusive portions of code. Preprocessor tokens can be
- *  defined here by listing each one with the -D command line switch, and each token can optionally be defined to a specific value. When defined in the
- *  project makefile, these behave as if they were defined in every source file via a normal preprocessor define statement.
+ *  \subsection SSec_OPTIMIZATION The OPTIMIZATION Parameter
+ *  This parameter indicates the level of optimization to use when compiling the application. This will allow you to compile with an optimization level
+ *  supported by GCC, from <tt>0</tt> (no optimization) to <tt>3</tt> (fastest runtime optimization) or <tt>s</tt> (smallest size).
  *
- *  Most applications will actually have multiple CDEF lines, which are concatenated together with the "+=" operator. This ensures that large
- *  numbers of configuration options remain readable by splitting up groups of options into separate lines.
+ *  \subsection SSec_TARGET The TARGET Parameter
+ *  This parameter indicates the application target name, which is used as the base filename for the build binary and debugging files. This will be the
+ *  name of the output files once linked together into the final application, ready to load into the target.
  *
- *  \section Sec_LUFA_PATH The LUFA_PATH Parameter
+ *  \subsection SSec_SRC The SRC Parameter
+ *  This parameter indicates the source files used to compile the application, as a list of C (<tt>*.c</tt>), C++ (<tt>*.cpp</tt>) and Assembly (<tt>*.S</tt>) files. Note that
+ *  all assembly files must end in a <b>capital</b> .S extension, as lowercase .s files are reserved for GCC intermediate files.
+ *
+ *  \subsection SSec_LUFA_PATH The LUFA_PATH Parameter
  *  As each LUFA program requires the LUFA library source code to compile correctly, the application must know where the LUFA library is located. This
- *  value specifies the path to the LUFA library base relative to the path of the project makefile.
- *
- *  \section Sec_LUFA_OPTS The LUFA_OPTS Parameter
- *  This value is similar to the CDEFS parameter listed elsewhere -- indeed, it is simply a convenient place to group LUFA related tokens away from the
- *  application's compile time tokens. Normally, these options do not need to be altered to allow an application to compile and run correctly on a
- *  different board or microcontroller to the current configuration - if the options are incorrect, then the demo is most likely incompatible with the chosen
- *  microcontroller model and cannot be made to function through the altering of the makefile settings alone (or at all). Settings such as the USB mode
- *  (device, host or both), the USB interface speed and other LUFA configuration options can be set here - see \ref Page_TokenSummary documentation for details
- *  on the available LUFA compile time configuration options.
+ *  value specifies the path to the LUFA library core. This path may be relative or absolute, however note than even under Windows based systems the
+ *  forward-slash (/) path seperator must be used.
+ *
+ *  \subsection SSec_CC_FLAGS The CC_FLAGS Parameter
+ *  This parameter lists the compiler flags passed to the C/C++ compiler, the assembler and the linker. These are used as-is directly to GCC and thus
+ *  must match GCC's command line options as given in the GCC manual. This variable may be used to define tokens directly on the command line, enable or
+ *  disable warnings, adjust the target-specific tuning parameters or other options.
+ *
+ *  \subsection SSec_LD_FLAGS The LD_FLAGS Parameter
+ *  This parameter lists the linker flags passed exclusively to the linker. These are used as-is directly to GCC and thus must match GCC's command line
+ *  linker options as given in the GCC manual. This variable may be used to create or relocate custom data sections, or enable linker specific behaviors.
  */
index 6dc851a..e669e28 100644 (file)
@@ -11,6 +11,7 @@
  *  information on compile-time tuning of the library and other developer-related sections.
  *
  *  <b>Subsections:</b>
+ *  \li \subpage Page_BuildSystem - The LUFA Buildsystem
  *  \li \subpage Page_TokenSummary - Summary of Compile Time Tokens
  *  \li \subpage Page_Migration - Migrating from an Older LUFA Version
  *  \li \subpage Page_VIDPID - Allocated USB VID and PID Values
index 37a9200..165f115 100644 (file)
  
 /**
  *  \page Page_UC3Support Atmel 32-Bit UC3 AVR (UC3)
- *  Note: <i>The AVR32 UC3 device support is currently <b>experimental</b>, and is included for preview purposes only.</i>
+ *
+ *  \warning The AVR32 UC3 device support is currently <b>experimental</b>, and is included for preview purposes only.
  *
  *  \section Sec_UC3Support_Devices Supported Microcontroller Models
  *
  
 /**
  *  \page Page_XMEGASupport Atmel USB XMEGA AVR (XMEGA)
- *  Note: <i>The XMEGA device support is currently <b>experimental</b> (incomplete and/or non-functional), and is included for preview purposes only.</i>
+ *
+ *  \warning The XMEGA device support is currently <b>experimental</b> (incomplete and/or non-functional), and is included for preview purposes only.
  *
  *  \section Sec_XMEGASupport_Devices Supported Microcontroller Models
  *
index 0f45c23..d4c1cbe 100644 (file)
-/** \file\r
- *\r
- *  This file contains special DoxyGen information for the generation of the main page and other special\r
- *  documentation pages. It is not a project source file.\r
- */\r
-\r
-/** \page Page_ExportingLibrary Exporting the Library for IDE Use\r
- *\r
- *  While LUFA was designed to allow for easy compilation in a makefile driven environment,\r
- *  it is possible to export the library into a form suitable for drop-in use inside of an\r
- *  IDE.\r
- *\r
- *  \section Sec_LibraryExport Exporting the Library\r
- *  An export of the library is at its most basic, a direct copy of the main "LUFA" source folder from the\r
- *  root download folder; this contains the library core which can be re-used within external projects.\r
- *  However, as many IDEs attempt to automatically compile all included source files, it is neccesary to\r
- *  exclude some directories and files from the library core export to allow for easier integration into\r
- *  an IDE project.\r
- *\r
- *  \subsection SSec_ManualExport Manual Export\r
- *  To manually export the library core, copy over the main LUFA library folder from the LUFA root directory,\r
- *  renaming as desired. Within the library core folder, the following directories should be removed or\r
- *  excluded from your IDE import:\r
- *   - Documentation/\r
- *   - DoxygenPages/\r
- *   - CodeTemplates/\r
- *\r
- *  If required, files from the CodeTemplates/ subdirectory may be copied to your IDE project as needed.\r
- *\r
- *  The resulting copy of the library may then be imported into your chosen IDE according to the instructions\r
- *  shown in \ref Sec_LibraryImport.\r
- *\r
- *  \subsection SSec_AutomaticExport Automatic Export\r
- *  If desired, the steps indicated in \ref SSec_ManualExport may be automatically performed, by running the\r
- *  command <b><code>make export_tar</code></b> from the command line. This will generate two .tar files in the\r
- *  current directory, named <code>LUFA_XXXXXX.tar</code> and <code>LUFA_XXXXXX_Code_Templates.tar</code> (where "XXXXXX" is\r
- *  the version of the library being exported). The first archive contains the exported LUFA core with the\r
- *  non-required files removed, while the second contains an archived copy of the code template files for the\r
- *  current LUFA version.\r
- *\r
- *  The resulting archived copy of the library may then be extracted to your chosen IDE project source directory\r
- *  and imported according to the instructions shown in \ref Sec_LibraryImport.\r
- *\r
- *  \section Sec_LibraryImport Importing the Library\r
- *  An exported copy of the library may be imported wholesale into an IDE project, if the instructions detailed\r
- *  in \ref Sec_LibraryExport are followed.\r
- *\r
- *  Specific instructions for importing an exported version of LUFA into various IDEs are listed below.\r
- *\r
- *  \subsection SSec_AS56_Import Importing into AVRStudio 5/Atmel Studio 6\r
- *  To import LUFA into a new or existing project, the following steps must be followed.\r
- *\r
- *  \subsubsection SSSec_AS56_Import_Step1 Copy over the exported library\r
- *  Copy over the exported library archive created via the steps listed in \ref Sec_LibraryExport to your AS5/AS6\r
- *  project directory.\r
- *\r
- *  \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step1.png\r
- *\r
- *  \subsubsection SSSec_AS56_Import_Step2 Extract exported library\r
- *  Extract out the contents of the archive to a new folder. This may be any name you wish, however keep in mind\r
- *  that this name will need to be referenced within your user application under most circumstances. It is\r
- *  suggested that this folder be named "LUFA", or "LUFA" followed by the version string for easy reference.\r
- *\r
- *  \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step2.png\r
- *\r
- *  \subsubsection SSSec_AS56_Import_Step3 Add the library files\r
- *  Open your AVRStudio 5/Atmel Studio 6 project. From the "Solution Explorer" pane, click the "Show All Files"\r
- *  button on the toolbar to display ghosted icons of files and folders located in the project source directory\r
- *  that are not currently added to the project.\r
- *\r
- *  \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step3.png\r
- *\r
- *  Right-click the ghosted version of the extracted LUFA export folder in the Solution Explorer pane, and\r
- *  choose the "Add to Project" option from the context menu. This will add the entire LUFA source tree to the\r
- *  current project.\r
- *\r
- *  \subsubsection SSSec_AS56_Import_Step4 Open Project Toolchain Properties\r
- *  In the Solution Explorer pane, click the project node, and press the "Properties" button in the toolbar to\r
- *  open the Project Properties window. This window allows you to configure the various project global compiler,\r
- *  assembler and linker options.\r
- *\r
- *  \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step4.png\r
- * \r
- *  Click the "Toolchain" tab on the left side of the Project Properties window.\r
- *\r
- *  \subsubsection SSSec_AS56_Import_Step5 Configure Project Toolchain Properties\r
- *\r
- *  In the GNU C Compiler section, open the "Symbols" page. Click the "Add Item" button to the top-right of the\r
- *  "Defined Symbols" section to add new symbols.\r
- *\r
- *  At a minimum, you will need to define the following symbols (for more information on these symbols, see\r
- *  \ref Page_ConfiguringApps):\r
- *   - ARCH\r
- *   - F_CPU\r
- *   - F_USB\r
- *   - BOARD\r
- *  \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step5_1.png\r
- *\r
- *  Next, open the GNU C Compiler section's "Optimization" page. Ensure that the option to prepare functions for\r
- *  garbage collection is enabled.\r
- *  \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step5_2.png\r
- *\r
- *  Finally, in the GNU C Linker section, open the "Optimization" page. Ensure that the option to garbage collect\r
- *  unused sections is selected.\r
- *  \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step5_3.png\r
- */\r
+/** \file
+ *
+ *  This file contains special DoxyGen information for the generation of the main page and other special
+ *  documentation pages. It is not a project source file.
+ */
+
+/** \page Page_ExportingLibrary Exporting the Library for IDE Use
+ *
+ *  While LUFA was designed to allow for easy compilation in a makefile driven environment,
+ *  it is possible to export the library into a form suitable for drop-in use inside of an
+ *  IDE.
+ *
+ *  \section Sec_LibraryExport Exporting the Library
+ *  An export of the library is at its most basic, a direct copy of the main "LUFA" source folder from the
+ *  root download folder; this contains the library core which can be re-used within external projects.
+ *  However, as many IDEs attempt to automatically compile all included source files, it is neccesary to
+ *  exclude some directories and files from the library core export to allow for easier integration into
+ *  an IDE project.
+ *
+ *  \subsection SSec_ManualExport Manual Export
+ *  To manually export the library core, copy over the main LUFA library folder from the LUFA root directory,
+ *  renaming as desired. Within the library core folder, the following directories should be removed or
+ *  excluded from your IDE import:
+ *   - Documentation/
+ *   - DoxygenPages/
+ *   - CodeTemplates/
+ *
+ *  If required, files from the CodeTemplates/ subdirectory may be copied to your IDE project as needed.
+ *
+ *  The resulting copy of the library may then be imported into your chosen IDE according to the instructions
+ *  shown in \ref Sec_LibraryImport.
+ *
+ *  \subsection SSec_AutomaticExport Automatic Export
+ *  If desired, the steps indicated in \ref SSec_ManualExport may be automatically performed, by running the
+ *  command <b><code>make export_tar</code></b> from the command line. This will generate two .tar files in the
+ *  current directory, named <code>LUFA_YYMMDD.tar</code> and <code>LUFA_YYMMDD_Code_Templates.tar</code> (where
+ *  "YYMMDD" is the version of the library being exported). The first archive contains the exported LUFA core
+ *  with the non-required files removed, while the second contains an archived copy of the code template files 
+ *  for the current LUFA version.
+ *
+ *  The resulting archived copy of the library may then be extracted to your chosen IDE project source directory
+ *  and imported according to the instructions shown in \ref Sec_LibraryImport.
+ *
+ *  \section Sec_LibraryImport Importing the Library
+ *  An exported copy of the library may be imported wholesale into an IDE project, if the instructions detailed
+ *  in \ref Sec_LibraryExport are followed.
+ *
+ *  Specific instructions for importing an exported version of LUFA into various IDEs are listed below.
+ *
+ *  \subsection SSec_AS56_Import Importing into AVRStudio 5/Atmel Studio 6
+ *  To import LUFA into a new or existing project, the following steps must be followed.
+ *
+ *  \subsubsection SSSec_AS56_Import_Step1 Copy over the exported library
+ *  Copy over the exported library archive created via the steps listed in \ref Sec_LibraryExport to your AS5/AS6
+ *  project directory.
+ *
+ *  \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step1.png
+ *
+ *  \subsubsection SSSec_AS56_Import_Step2 Extract exported library
+ *  Extract out the contents of the archive to a new folder. This may be any name you wish, however keep in mind
+ *  that this name will need to be referenced within your user application under most circumstances. It is
+ *  suggested that this folder be named "LUFA", or "LUFA" followed by the version string for easy reference.
+ *
+ *  \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step2.png
+ *
+ *  \subsubsection SSSec_AS56_Import_Step3 Add the library files
+ *  Open your AVRStudio 5/Atmel Studio 6 project. From the "Solution Explorer" pane, click the "Show All Files"
+ *  button on the toolbar to display ghosted icons of files and folders located in the project source directory
+ *  that are not currently added to the project.
+ *
+ *  \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step3.png
+ *
+ *  Right-click the ghosted version of the extracted LUFA export folder in the Solution Explorer pane, and
+ *  choose the "Add to Project" option from the context menu. This will add the entire LUFA source tree to the
+ *  current project.
+ *
+ *  \subsubsection SSSec_AS56_Import_Step4 Open Project Toolchain Properties
+ *  In the Solution Explorer pane, click the project node, and press the "Properties" button in the toolbar to
+ *  open the Project Properties window. This window allows you to configure the various project global compiler,
+ *  assembler and linker options.
+ *
+ *  \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step4.png
+ * 
+ *  Click the "Toolchain" tab on the left side of the Project Properties window.
+ *
+ *  \subsubsection SSSec_AS56_Import_Step5 Configure Project Toolchain Properties
+ *
+ *  In the GNU C Compiler section, open the "Symbols" page. Click the "Add Item" button to the top-right of the
+ *  "Defined Symbols" section to add new symbols.
+ *
+ *  At a minimum, you will need to define the following symbols (for more information on these symbols, see
+ *  \ref Page_ConfiguringApps):
+ *   - ARCH
+ *   - F_CPU
+ *   - F_USB
+ *   - BOARD
+ *  \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step5_1.png
+ *
+ *  Next, open the GNU C Compiler section's "Optimization" page. Ensure that the option to prepare functions for
+ *  garbage collection is enabled.
+ *  \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step5_2.png
+ *
+ *  Finally, in the GNU C Linker section, open the "Optimization" page. Ensure that the option to garbage collect
+ *  unused sections is selected.
+ *  \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step5_3.png
+ */
index d0453a2..edc4f53 100644 (file)
@@ -15,9 +15,7 @@
   *  - Code Features
   *      -# Add hub support when in Host mode for multiple devices
   *      -# Investigate virtual hubs when in device mode instead of composite devices
-  *      -# Change makefiles to allow for absolute LUFA location to be used
   *      -# Re-add interrupt Pipe/Endpoint support
-  *      -# Add makefile includes to reduce boilerplate in user makefiles
   *      -# Update stream APIs to use DMA transfers on supported architectures
   *      -# Pull out third party libraries into a separate folder and reference them as required
   *      -# Add a LUFA_YIELD macro for integration into a third-party RTOS
index 321779d..e6ad884 100644 (file)
  *  Miscellaneous driver Functions, macros, variables, enums and types.
  */
 
-/** \defgroup Group_PlatformDrivers System Platform Drivers
- *
- *  Drivers relating to the general architecture platform, such as clock setup and interrupt management.
- */
-
 /** \defgroup Group_PlatformDrivers_AVR8 AVR8
  *  \ingroup Group_PlatformDrivers
  *
index 9b64814..cbe761e 100644 (file)
@@ -1,40 +1,44 @@
-/** \file\r
- *\r
- *  This file contains special DoxyGen information for the generation of the main page and other special\r
- *  documentation pages. It is not a project source file.\r
- */\r
-\r
- /** \page Page_KnownIssues Known Issues\r
-  *  The following are known issues present in each official LUFA release. This list should contain all known\r
-  *  issues in the library. Most of these issues should be corrected in the future release - see\r
-  *  \ref Page_FutureChanges for a list of planned changes in future releases.\r
-  *\r
-  *  \section Sec_KnownIssuesXXXXXX Version XXXXXX\r
-  *  - AVR8 Architecture\r
-  *    - No known issues.\r
-  *  - XMEGA Architecture\r
-  *    - No demos, bootloaders or projects have been ported for the XMEGA devices in the current release,\r
-  *      although the architecture is supported in the LUFA core library.\r
-  *    - Endpoints of more than 64 bytes are not currently supported in this release.\r
-  *    - Isochronous endpoints are not currently supported in this release. As a result, the audio class\r
-  *      cannot be used on XMEGA devices.\r
-  *    - Multiple-bank endpoints are not currently supported in this release.\r
-  *    - Early revisions of the ATXMEGA128A1U are incompatible with LUFA, due to their various errata\r
-  *      relating to the USB controller.\r
-  *  - UC3 Architecture\r
-  *    - No demos, bootloaders or projects have been ported for the UC3 devices in the current release,\r
-  *      although the architecture is supported in the LUFA core library.\r
-  *    - DMA transfers to and from the USB controller are not yet implemented for this release.\r
-  *    - The UC3C, UC3D and UC3L sub-families of UC3 are not currently supported by the library due to their\r
-  *      altered USB controller design.\r
-  *    - The various \c CreateStream() functions for creating standard \c <stdio.h> compatible virtual file\r
-  *      streams are not available on the UC3 architecture, due to a lack of suitable library support.\r
-  *  - Architecture Independant\r
-  *    - The HID parser fails for array type elements that have a MIN and MAX usage applied; each element\r
-  *      in the array will receive a unique incrementing usage from the MIN value, up to MAX.\r
-  *    - The current application makefiles do not work if the output directory is not the same directory\r
-  *      as the makefile itself.\r
-  *    - The LUFA library is not watchdog aware, and thus timeouts are possible if short periods are used\r
-  *      and a lengthy USB operation is initiated.\r
-  */\r
-\r
+/** \file
+ *
+ *  This file contains special DoxyGen information for the generation of the main page and other special
+ *  documentation pages. It is not a project source file.
+ */
+
+ /** \page Page_KnownIssues Known Issues
+  *  The following are known issues present in each official LUFA release. This list should contain all known
+  *  issues in the library. Most of these issues should be corrected in the future release - see
+  *  \ref Page_FutureChanges for a list of planned changes in future releases.
+  *
+  *  \section Sec_KnownIssues120730 Version 120730 (BETA)
+  *  - AVR8 Architecture
+  *    - No known issues.
+  *  - UC3 Architecture
+  *    \warning The UC3 device support is currently <b>experimental</b> (incomplete and/or non-functional), and is included for preview purposes only. \n
+  *
+  *    - No demos, bootloaders or projects have been ported for the UC3 devices in the current release,
+  *      although the architecture is supported in the LUFA core library.
+  *    - DMA transfers to and from the USB controller are not yet implemented for this release.
+  *    - The UC3C, UC3D and UC3L sub-families of UC3 are not currently supported by the library due to their
+  *      altered USB controller design.
+  *    - The various \c CreateStream() functions for creating standard \c <stdio.h> compatible virtual file
+  *      streams are not available on the UC3 architecture, due to a lack of suitable library support.
+  *  - XMEGA Architecture
+  *    \warning The XMEGA device support is currently <b>experimental</b> (incomplete and/or non-functional), and is included for preview purposes only.
+  *
+  *    - No demos, bootloaders or projects have been ported for the XMEGA devices in the current release,
+  *      although the architecture is supported in the LUFA core library.
+  *    - Endpoints of more than 64 bytes are not currently supported in this release.
+  *    - Isochronous endpoints are not currently supported in this release. As a result, the audio class
+  *      cannot be used on XMEGA devices.
+  *    - Multiple-bank endpoints are not currently supported in this release.
+  *    - Early revisions of the ATXMEGA128A1U are incompatible with LUFA, due to their various errata
+  *      relating to the USB controller.
+  *  - Architecture Independent
+  *    - The HID parser fails for array type elements that have a MIN and MAX usage applied; each element
+  *      in the array will receive a unique incrementing usage from the MIN value, up to MAX.
+  *    - The LUFA library is not watchdog aware, and thus timeouts are possible if short periods are used
+  *      and a lengthy USB operation is initiated.
+  *  - Build System
+  *    - No known issues.
+  */
+
index 841776b..7d514aa 100644 (file)
  *  \li Estick JTAG, an ARM JTAG debugger: http://code.google.com/p/estick-jtag/
  *  \li "Fingerlicking Wingdinger" (WARNING: Bad language if no Javascript), a MIDI controller: http://noisybox.net/electronics/wingdinger/
  *  \li Flyatar, a real-time fly tracking system: https://github.com/peterpolidoro/Flyatar
+ *  \li FootJoy, a 22 button, 6-axis josystick with keyboard and mouse modes: https://bitbucket.org/sirbrialliance/foot-joy/
  *  \li Gamecube controller to USB adapter: https://www.facebook.com/media/set/?set=a.10150202447076304.310536.688776303&l=df53851c50 
  *  \li Garmin GPS USB to NMEA standard serial sentence translator: http://github.com/nall/garmin-transmogrifier/tree/master
  *  \li Generic HID Device Creator: http://generichid.sourceforge.net/
  *  \li Generic HID Open Source Framework: http://www.waitingforfriday.com/index.php/USB_Generic_HID_Open_Source_Framework_for_Atmel_AVR_and_Windows
  *  \li Ghetto Drum, a MIDI drum controller: http://noisybox.net/art/gdrum/
+ *  \li GPS enabled lap timer for vehicles: http://www.assembla.com/code/ironlung/subversion/nodes/trunk/LapTimer
  *  \li Hardware Volume Control: https://github.com/davidk/hw-volume-control
  *  \li Hiduino, a USB-MIDI replacement firmware for the Arduino Uno: http://code.google.com/p/hiduino/
  *  \li Ikea RGB LED USB modification: http://slashhome.se/p/projects/id/ikea_dioder_usb/#project
@@ -81,6 +83,7 @@
  *  \li Motherboard BIOS flasher: http://www.coreboot.org/InSystemFlasher
  *  \li Multi-button Joystick (French): http://logicien-parfait.fr/dokuwiki/doku.php?id=projet:joystick
  *  \li Music Playing Alarm Clock (Tutorial): http://www.instructables.com/id/Music-Playing-Alarm-Clock/
+ *  \li Nehebkau, Laptop Controlled Keyboard and Mouse: http://www.frank-zhao.com/cache/nehebkau.php
  *  \li NeroJTAG, a JTAG dongle: https://github.com/makestuff/neroJtag
  *  \li NES Controller USB modification: http://projects.peterpolidoro.net/video/NESUSB.htm
  *  \li Nikon wireless camera remote control (Norwegian): http://hekta.org/~hpe1119/
  *  \li SDR1, a Software Defined Radio firmware: https://code.google.com/p/sdr-mk1/
  *  \li SEGA Megadrive/Genesis Development Cartridge: http://www.makestuff.eu/wordpress/?page_id=398
  *  \li Serial Line bus analyser: http://www.pjrc.com/teensy/projects/SerialAnalyzer.html
+ *  \li SNES custom FLASH ROM: http://electrifiedfoolingmachine.co/?page_id=633
  *  \li Smartcard Detective: https://code.google.com/p/smartcarddetective/
  *  \li SmartportVHD Apple II Mass Storage adapter: http://pcedric3.free.fr/SmartportVHD/
  *  \li Single LED Matrix Display: http://guysoft.wordpress.com/2009/10/08/bumble-b/
  *  \li Arduino Uno, the official Arduino board: http://www.arduino.cc
  *  \li ARPS Locator: http://la3t.hamradio.no/lab//?id=tracker_en
  *  \li AsTeRICS assistive technologies project, HID actuator: http://www.asterics.eu
+ *  \li Ceberus, a MadCatz Xbox 360 arcade stick modifier: http://www.phreakmods.com/products/cerberus
  *  \li CFFA3000, a CompactFlash interface for the Apple II: http://www.dreher.net/CFforAppleII
  *  \li Digital Survey Instruments Magnetometer and Pointer: http://www.digitalsurveyinstruments.com/
  *  \li FinchRobot, a robot designed for educational use: http://www.finchrobot.com/
  *  \li RFI21.1EU UHF RFID reader: http://www.metra.cz/rfid/uhf-rfid-ctecky/rfi21-1eu-uhf-rfid-ctecka.htm
  *  \li SmartCardDetective, a Smart Card analysis tool: http://www.smartcarddetective.com/
  *  \li USBTINY-MKII, an AVRISP-MKII Clone AVR Programmer: http://tom-itx.dyndns.org:81/~webpage/boards/USBTiny_Mkii/USBTiny_Mkii_index.php
+ *  \li UDS18B20 USB Temperature sensor: http://toughlog.org/uds18b20/
  *  \li VMeter, a USB MIDI touch strip controller: http://www.vmeter.net/
  *  \li XMEGA Development Board, using LUFA as an On-Board Programmer: http://xmega.mattair.net/
  *  \li Zeptoprog, a multifunction AVR programmer: http://www.mattairtech.com/index.php/featured/zeptoprog.html
index f0fd9b2..f97e768 100644 (file)
@@ -10,7 +10,7 @@
  *  to the next version released. It does not indicate all new additions to the library in each version change, only
  *  areas relevant to making older projects compatible with the API changes of each new release.
  *
- *  \section Sec_MigrationXXXXXX Migrating from 120219 to XXXXXX
+ *  \section Sec_Migration120730 Migrating from 120219 to 120730 (BETA)
  *  <b>Device Mode</b>
  *    - The device mode Audio Class driver now requires an additional configuration parameter, the Audio Control interface index. Existing applications should
  *      be adjusted to specify the additional configuration parameter.
@@ -44,6 +44,9 @@
  *    - The MIDI class driver \ref MIDI_EventPacket_t event packet no longer contains seperate \c CableIndex and \c Command entries; these have been combined
  *      into a single \c Event element which can be contructed using the new macro \ref MIDI_EVENT(). Existing applications should use the new macro and structure
  *      element name.
+ *    - The library "LUFA/Drivers/USB/Core/ConfigDescriptor.c" source file has been renamed "LUFA/Drivers/USB/Core/ConfigDescriptors.c" as this was clashing with
+ *      files in some low level host mode demo applications, preventing parallel project builds. If you are referencing the project source files directly instead
+ *      of using the makefile module names, you will need to adjust your project makefile.
  *
  *  \section Sec_Migration120219 Migrating from 111009 to 120219
  *  <b>USB Core</b>
index c1b2181..4759ac8 100644 (file)
@@ -9,8 +9,8 @@
  *  Once you have built an application, you will need a way to program in the resulting ".HEX" file (and, if your
  *  application uses EEPROM variables with initial values, also a ".EEP" file) into your USB AVR. Normally, the
  *  reprogramming of an AVR device must be performed using a special piece of programming hardware, through one of the
- *  supported AVR programming protocols - ISP, HVSP, HVPP, JTAG or dW. This can be done through a custom programmer,
- *  a third party programmer, or an official Atmel AVR tool - for more information, see the Atmel.com website.
+ *  supported AVR programming protocols - ISP, HVSP, HVPP, JTAG, dW or PDI. This can be done through a custom programmer,
+ *  a third party programmer, or an official Atmel AVR tool - for more information, see the <a>atmel.com</a> website.
  *
  *  Alternatively, you can use the bootloader. From the Atmel factory, each USB AVR comes preloaded with the Atmel
  *  DFU (Device Firmware Update) class bootloader, a small piece of AVR firmware which allows the remainder of the
  *  or broken without an external programming device. They have disadvantages however; they cannot change the fuses of
  *  the AVR (special configuration settings that control the operation of the chip itself) and a small portion of the
  *  AVR's FLASH program memory must be reserved to contain the bootloader firmware, and thus cannot be used by the
- *  loaded application. Atmel's DFU bootloader is either 4KB (for the smaller USB AVRs) or 8KB (for the larger USB AVRs).
+ *  loaded application.
  *
  *  If you wish to use the DFU bootloader to program in your application, refer to your DFU programmer's documentation.
  *  Atmel provides a free utility called FLIP which is USB AVR compatible, and an open source (Linux compatible)
  *  alternative exists called "dfu-programmer".
+ *
+ *  \see \ref Page_BuildModule_DFU for information on the LUFA build system DFU module, for automatic DFU bootloader
+ *  programming makefile targets.
  */
index b64f9de..b69cac7 100644 (file)
-@media print\r
- {\r
-       #top\r
-       {\r
-               display:none;\r
-       }\r
-\r
-       #side-nav\r
-       {\r
-               display:none;\r
-       }\r
-\r
-       #nav-path\r
-       {\r
-               display:none;\r
-       }\r
-\r
-       body\r
-       {\r
-               overflow:visible;\r
-       }\r
-\r
-       h1,h2,h3,h4,h5,h6\r
-       {\r
-               page-break-after:avoid;\r
-       }\r
-\r
-       .summary\r
-       {\r
-               display:none;\r
-       }\r
-\r
-       .memitem\r
-       {\r
-               page-break-inside:avoid;\r
-       }\r
-\r
-       #doc-content\r
-       {\r
-               display:inline;\r
-               height:auto !important;\r
-               margin-left:0 !important;\r
-               overflow:inherit;\r
-               width:auto !important;\r
-       }\r
-       \r
-       .fragment\r
-       {\r
-               background-color: #FFFFFF !important;\r
-       }       \r
-}\r
-\r
-body,table,div,p,dl\r
-{\r
-       font-family:Lucida Grande, Verdana, Geneva, Arial, sans-serif;\r
-       font-size:13px;\r
-       line-height:1.3;\r
-}\r
-\r
-div.contents p\r
-{\r
-       padding-left:12px;\r
-}\r
-\r
-div.contents table.memberdecls,.paramname\r
-{\r
-       font-family:Consolas, Monaco, courier, sans-serif;\r
-       font-size:105%;\r
-       padding-right:20px;\r
-}\r
-\r
-.title\r
-{\r
-       font-size:150%;\r
-       font-weight:bold;\r
-       margin:10px 2px;\r
-}\r
-\r
-h1\r
-{\r
-       font-size:25px;\r
-       margin-bottom:10px;\r
-}\r
-\r
-h2\r
-{\r
-       color:#42657B;\r
-       font-family:Lucida Grande, Verdana, Geneva, Arial, sans-serif;\r
-       font-size:17px;\r
-}\r
-\r
-h3\r
-{\r
-       font-family:Lucida Grande, Verdana, Geneva, Arial, sans-serif;\r
-       font-size:15px;\r
-}\r
-\r
-h4\r
-{\r
-       font-family:Lucida Grande, Verdana, Geneva, Arial, sans-serif;\r
-       font-size:13px;\r
-}\r
-\r
-dt\r
-{\r
-       font-weight:bold;\r
-}\r
-\r
-div.multicol\r
-{\r
-       -moz-column-count:3px;\r
-       -moz-column-gap:1em;\r
-       -webkit-column-count:3px;\r
-       -webkit-column-gap:1em;\r
-}\r
-\r
-p.startli,p.startdd,p.starttd\r
-{\r
-       margin-top:2px;\r
-}\r
-\r
-p.endli\r
-{\r
-       margin-bottom:0;\r
-}\r
-\r
-p.enddd\r
-{\r
-       margin-bottom:4px;\r
-}\r
-\r
-p.endtd\r
-{\r
-       margin-bottom:2px;\r
-}\r
-\r
-caption\r
-{\r
-       font-weight:bold;\r
-}\r
-\r
-span.legend\r
-{\r
-       font-size:70%;\r
-       text-align:center;\r
-}\r
-\r
-h3.version\r
-{\r
-       font-size:90%;\r
-       text-align:center;\r
-}\r
-\r
-div.qindex,div.navtab\r
-{\r
-       background-color:#EAEFF7;\r
-       border:1px solid #9EB3DC;\r
-       text-align:center;\r
-}\r
-\r
-div.qindex,div.navpath\r
-{\r
-       line-height:140%;\r
-       width:100%;\r
-}\r
-\r
-div.navtab\r
-{\r
-       margin-right:15px;\r
-}\r
-\r
-a\r
-{\r
-       color:#355594;\r
-       font-weight:normal;\r
-       text-decoration:none;\r
-}\r
-\r
-.contents a:visited\r
-{\r
-       color:#3D62AB;\r
-}\r
-\r
-a:hover\r
-{\r
-       text-decoration:underline;\r
-}\r
-\r
-a.qindex\r
-{\r
-       font-weight:bold;\r
-}\r
-\r
-a.qindexHL\r
-{\r
-       background-color:#97ADD9;\r
-       border:1px double #7F9BD1;\r
-       color:#ffffff;\r
-       font-weight:bold;\r
-}\r
-\r
-.contents a.qindexHL:visited\r
-{\r
-       color:#ffffff;\r
-}\r
-\r
-a.el\r
-{\r
-       font-weight:bold;\r
-}\r
-\r
-a.code,a.code:visited\r
-{\r
-       color:#4665A2;\r
-}\r
-\r
-a.codeRef,a.codeRef:visited\r
-{\r
-       color:#4665A2;\r
-}\r
-\r
-dl.el\r
-{\r
-       margin-left:-1cm;\r
-}\r
-\r
-pre.fragment {\r
-        border: 1px solid #C4CFE5;\r
-        background-color: #FBFCFD;\r
-        padding: 4px 6px;\r
-        margin: 4px 8px 4px 2px;\r
-        overflow: auto;\r
-        word-wrap: break-word;\r
-        font-size:  9pt;\r
-        line-height: 125%;\r
-        font-family: monospace, fixed;\r
-        font-size: 105%;\r
-}\r
-\r
-div.fragment {\r
-       padding: 4px;\r
-       margin: 4px;\r
-       background-color: #FBFCFD;\r
-       border: 1px solid #C4CFE5;\r
-}\r
-\r
-div.line {\r
-       font-family: monospace, fixed;\r
-       font-size: 13px;\r
-       line-height: 1.0;\r
-       text-wrap: unrestricted;\r
-       white-space: -moz-pre-wrap; /* Moz */\r
-       white-space: -pre-wrap;     /* Opera 4-6 */\r
-       white-space: -o-pre-wrap;   /* Opera 7 */\r
-       white-space: pre-wrap;      /* CSS3  */\r
-       word-wrap: break-word;      /* IE 5.5+ */\r
-       text-indent: -53px;\r
-       padding-left: 53px;\r
-       padding-bottom: 0px;\r
-       margin: 0px;\r
-}\r
-\r
-span.lineno {\r
-       padding-right: 4px;\r
-       text-align: right;\r
-       border-right: 2px solid #0F0;\r
-       background-color: #E8E8E8;\r
-       white-space: pre;\r
-}\r
-span.lineno a {\r
-       background-color: #D8D8D8;\r
-}\r
-\r
-span.lineno a:hover {\r
-       background-color: #C8C8C8;\r
-}\r
-\r
-div.ah\r
-{\r
-       -moz-border-radius:.5em;\r
-       -moz-box-shadow:rgba(0, 0, 0, 0.15) 2px 2px 2px;\r
-       -webkit-border-radius:.5em;\r
-       -webkit-box-shadow:2px 2px 3px #999;\r
-       background-color:black;\r
-       background-image:0;\r
-       border:solid thin #333;\r
-       border-radius:0.5em;\r
-       box-shadow:2px 2px 3px #999;\r
-       color:#ffffff;\r
-       font-weight:bold;\r
-       margin-bottom:3px;\r
-       margin-top:3px;\r
-       padding:0.2em;\r
-}\r
-\r
-div.groupHeader\r
-{\r
-       font-weight:bold;\r
-       margin-left:16px;\r
-       margin-top:12px;\r
-}\r
-\r
-div.groupText\r
-{\r
-       font-style:italic;\r
-       margin-left:16px;\r
-}\r
-\r
-body\r
-{\r
-       background-color:white;\r
-       color:black;\r
-       margin:0;\r
-}\r
-\r
-div.contents\r
-{\r
-       margin-left:8px;\r
-       margin-right:8px;\r
-       margin-top:10px;\r
-}\r
-\r
-td.indexkey\r
-{\r
-       background-color:#EAEFF7;\r
-       border:1px solid #C1CEE8;\r
-       font-weight:bold;\r
-       margin:2px 0;\r
-       padding:2px 10px;\r
-       vertical-align:top;\r
-       white-space:nowrap;\r
-}\r
-\r
-td.indexvalue\r
-{\r
-       background-color:#EAEFF7;\r
-       border:1px solid #C1CEE8;\r
-       margin:2px 0;\r
-       padding:2px 10px;\r
-}\r
-\r
-tr.memlist\r
-{\r
-       background-color:#EDF1F8;\r
-}\r
-\r
-p.formulaDsp\r
-{\r
-       text-align:center;\r
-}\r
-\r
-img.formulaInl\r
-{\r
-       vertical-align:middle;\r
-}\r
-\r
-div.center\r
-{\r
-       margin-bottom:0;\r
-       margin-top:0;\r
-       padding:0;\r
-       text-align:center;\r
-}\r
-\r
-div.center img\r
-{\r
-       border:0;\r
-}\r
-\r
-address.footer\r
-{\r
-       padding-right:12px;\r
-       text-align:right;\r
-}\r
-\r
-img.footer\r
-{\r
-       border:0;\r
-       vertical-align:middle;\r
-}\r
-\r
-span.keyword\r
-{\r
-       color:#008000;\r
-}\r
-\r
-span.keywordtype\r
-{\r
-       color:#604020;\r
-}\r
-\r
-span.keywordflow\r
-{\r
-       color:#e08000;\r
-}\r
-\r
-span.comment\r
-{\r
-       color:#008000;\r
-}\r
-\r
-span.preprocessor\r
-{\r
-       color:#806020;\r
-}\r
-\r
-span.stringliteral\r
-{\r
-       color:#002080;\r
-}\r
-\r
-span.charliteral\r
-{\r
-       color:#008080;\r
-}\r
-\r
-span.vhdldigit\r
-{\r
-       color:#ff00ff;\r
-}\r
-\r
-span.vhdlchar\r
-{\r
-       color:#000000;\r
-}\r
-\r
-span.vhdlkeyword\r
-{\r
-       color:#700070;\r
-}\r
-\r
-span.vhdllogic\r
-{\r
-       color:#ff0000;\r
-}\r
-\r
-blockquote\r
-{\r
-       background-color:#F6F8FC;\r
-       border-left:2px solid #97ADD9;\r
-       margin:0 24px 0 4px;\r
-       padding:0 12px 0 16px;\r
-}\r
-\r
-td.tiny\r
-{\r
-       font-size:75%;\r
-}\r
-\r
-.dirtab\r
-{\r
-       border:1px solid #9EB3DC;\r
-       border-collapse:collapse;\r
-       padding:4px;\r
-}\r
-\r
-th.dirtab\r
-{\r
-       background:#EAEFF7;\r
-       font-weight:bold;\r
-}\r
-\r
-hr\r
-{\r
-       border:none;\r
-       border-top:1px solid #4067B4;\r
-       height:0;\r
-}\r
-\r
-hr.footer\r
-{\r
-       height:1px;\r
-}\r
-\r
-table.memberdecls\r
-{\r
-       border-spacing:0;\r
-       padding:0;\r
-}\r
-\r
-.mdescLeft,.mdescRight,.memItemLeft,.memItemRight,.memTemplItemLeft,.memTemplItemRight,.memTemplParams\r
-{\r
-       background-color:#F9FAFC;\r
-       border:none;\r
-       margin:4px;\r
-       padding:1px 0 0 8px;\r
-}\r
-\r
-.mdescLeft,.mdescRight\r
-{\r
-       color:#555;\r
-       padding:0 8px 4px;\r
-}\r
-\r
-.memItemLeft,.memItemRight,.memTemplParams\r
-{\r
-       border-top:1px solid #C1CEE8;\r
-}\r
-\r
-.memItemLeft,.memTemplItemLeft\r
-{\r
-       white-space:nowrap;\r
-}\r
-\r
-.memItemRight\r
-{\r
-       width:100%;\r
-}\r
-\r
-.memTemplParams\r
-{\r
-       color:#3D62AB;\r
-       white-space:nowrap;\r
-}\r
-\r
-.memtemplate\r
-{\r
-       color:#3D62AB;\r
-       font-size:80%;\r
-       font-weight:normal;\r
-       margin-left:9px;\r
-}\r
-\r
-.memnav\r
-{\r
-       background-color:#EAEFF7;\r
-       border:1px solid #9EB3DC;\r
-       margin:2px 15px 2px 2px;\r
-       padding:2px;\r
-       text-align:center;\r
-}\r
-\r
-.mempage\r
-{\r
-       width:100%;\r
-}\r
-\r
-.memitem\r
-{\r
-       margin-bottom:10px;\r
-       margin-right:5px;\r
-       padding:0;\r
-}\r
-\r
-.memname\r
-{\r
-       font-weight:bold;\r
-       margin-left:6px;\r
-       white-space:nowrap;\r
-}\r
-\r
-.memproto,dl.reflist dt\r
-{\r
-       -moz-border-radius-topleft:8px;\r
-       -moz-border-radius-topright:8px;\r
-       -moz-box-shadow:rgba(0, 0, 0, 0.15) 5px 5px 5px;\r
-       -webkit-border-top-left-radius:8px;\r
-       -webkit-border-top-right-radius:8px;\r
-       -webkit-box-shadow:5px 5px 5px rgba(0, 0, 0, 0.15);\r
-       background-color:#E1E7F4;\r
-       background-image:url('nav_f.png');\r
-       background-repeat:repeat-x;\r
-       border-left:1px solid #A3B7DE;\r
-       border-right:1px solid #A3B7DE;\r
-       border-top:1px solid #A3B7DE;\r
-       border-top-left-radius:8px;\r
-       border-top-right-radius:8px;\r
-       box-shadow:5px 5px 5px rgba(0, 0, 0, 0.15);\r
-       color:#20335A;\r
-       font-weight:bold;\r
-       padding:6px 0;\r
-       text-shadow:0 1px 1px rgba(255, 255, 255, 0.9);\r
-}\r
-\r
-.memdoc,dl.reflist dd\r
-{\r
-       -moz-border-radius-bottomleft:8px;\r
-       -moz-border-radius-bottomright:8px;\r
-       -moz-box-shadow:rgba(0, 0, 0, 0.15) 5px 5px 5px;\r
-       -webkit-border-bottom-left-radius:8px;\r
-       -webkit-border-bottom-right-radius:8px;\r
-       -webkit-box-shadow:5px 5px 5px rgba(0, 0, 0, 0.15);\r
-       background-color:#FBFCFD;\r
-       background-image:0 color-stop(0.6,#FFFFFF), color-stop(0.60,#FFFFFF), color-stop(0.95,#F6F8FC), to(#EDF1F8));\r
-       border-bottom:1px solid #A3B7DE;\r
-       border-bottom-left-radius:8px;\r
-       border-bottom-right-radius:8px;\r
-       border-left:1px solid #A3B7DE;\r
-       border-right:1px solid #A3B7DE;\r
-       border-top-width:0;\r
-       box-shadow:5px 5px 5px rgba(0, 0, 0, 0.15);\r
-       padding:2px 5px;\r
-}\r
-\r
-dl.reflist dt\r
-{\r
-       padding:5px;\r
-}\r
-\r
-dl.reflist dd\r
-{\r
-       margin:0 0 10px;\r
-       padding:5px;\r
-}\r
-\r
-.paramkey\r
-{\r
-       text-align:right;\r
-}\r
-\r
-.paramtype\r
-{\r
-       white-space:nowrap;\r
-}\r
-\r
-.paramname\r
-{\r
-       color:#602020;\r
-       white-space:nowrap;\r
-}\r
-\r
-.paramname em\r
-{\r
-       font-style:normal;\r
-}\r
-\r
-.params,.retval,.exception,.tparams\r
-{\r
-       border-spacing:6px 2px;\r
-}\r
-\r
-.params .paramname,.retval .paramname\r
-{\r
-       font-weight:bold;\r
-       vertical-align:top;\r
-}\r
-\r
-.params .paramtype\r
-{\r
-       font-style:italic;\r
-       vertical-align:top;\r
-}\r
-\r
-.params .paramdir\r
-{\r
-       font-family:"courier new",courier,monospace;\r
-       vertical-align:top;\r
-}\r
-\r
-.ftvtree\r
-{\r
-       font-family:sans-serif;\r
-       margin:0;\r
-}\r
-\r
-.directory\r
-{\r
-       font-size:9pt;\r
-       font-weight:bold;\r
-       margin:5px;\r
-}\r
-\r
-.directory h3\r
-{\r
-       font-size:11pt;\r
-       margin:1em 0 0;\r
-}\r
-\r
-.directory > h3\r
-{\r
-       margin-top:0;\r
-}\r
-\r
-.directory p\r
-{\r
-       margin:0;\r
-       white-space:nowrap;\r
-}\r
-\r
-.directory div\r
-{\r
-       display:none;\r
-       margin:0;\r
-}\r
-\r
-.directory img\r
-{\r
-       vertical-align:-30%;\r
-}\r
-\r
-.directory-alt\r
-{\r
-       font-size:100%;\r
-       font-weight:bold;\r
-}\r
-\r
-.directory-alt h3\r
-{\r
-       font-size:11pt;\r
-       margin:1em 0 0;\r
-}\r
-\r
-.directory-alt > h3\r
-{\r
-       margin-top:0;\r
-}\r
-\r
-.directory-alt p\r
-{\r
-       margin:0;\r
-       white-space:nowrap;\r
-}\r
-\r
-.directory-alt div\r
-{\r
-       display:none;\r
-       margin:0;\r
-}\r
-\r
-.directory-alt img\r
-{\r
-       vertical-align:-30%;\r
-}\r
-\r
-div.dynheader\r
-{\r
-       margin-top:8px;\r
-}\r
-\r
-address\r
-{\r
-       color:#253B67;\r
-       font-style:normal;\r
-}\r
-\r
-table.doxtable\r
-{\r
-       border-collapse:collapse;\r
-       margin-bottom:4px;\r
-       margin-top:4px;\r
-}\r
-\r
-table.doxtable td,table.doxtable th\r
-{\r
-       border:1px solid #273F6D;\r
-       padding:3px 7px 2px;\r
-}\r
-\r
-table.doxtable th\r
-{\r
-       background-color:#304D86;\r
-       color:#FFFFFF;\r
-       font-size:110%;\r
-       padding-bottom:4px;\r
-       padding-top:5px;\r
-}\r
-\r
-table.fieldtable\r
-{\r
-       -moz-border-radius:4px;\r
-       -moz-box-shadow:rgba(0, 0, 0, 0.15) 2px 2px 2px;\r
-       -webkit-border-radius:4px;\r
-       -webkit-box-shadow:2px 2px 2px rgba(0, 0, 0, 0.15);\r
-       border:1px solid #A3B7DE;\r
-       border-radius:4px;\r
-       border-spacing:0;\r
-       box-shadow:2px 2px 2px rgba(0, 0, 0, 0.15);\r
-       margin-bottom:10px;\r
-       width:100%;\r
-}\r
-\r
-.fieldtable td,.fieldtable th\r
-{\r
-       padding:3px 7px 2px;\r
-}\r
-\r
-.fieldtable td.fieldtype,.fieldtable td.fieldname\r
-{\r
-       border-bottom:1px solid #A3B7DE;\r
-       border-right:1px solid #A3B7DE;\r
-       vertical-align:top;\r
-       white-space:nowrap;\r
-}\r
-\r
-.fieldtable td.fielddoc\r
-{\r
-       border-bottom:1px solid #A3B7DE;\r
-       width:100%;\r
-}\r
-\r
-.fieldtable tr:last-child td\r
-{\r
-       border-bottom:none;\r
-}\r
-\r
-.fieldtable th\r
-{\r
-       -moz-border-radius-topleft:4px;\r
-       -moz-border-radius-topright:4px;\r
-       -webkit-border-top-left-radius:4px;\r
-       -webkit-border-top-right-radius:4px;\r
-       background-color:#E1E7F4;\r
-       background-image:url('nav_f.png');\r
-       background-repeat:repeat-x;\r
-       border-bottom:1px solid #A3B7DE;\r
-       border-top-left-radius:4px;\r
-       border-top-right-radius:4px;\r
-       color:#20335A;\r
-       font-size:90%;\r
-       padding-bottom:4px;\r
-       padding-top:5px;\r
-       text-align:left;\r
-}\r
-\r
-.tabsearch\r
-{\r
-       background-image:url('tab_b.png');\r
-       font-size:13px;\r
-       height:36px;\r
-       left:10px;\r
-       overflow:hidden;\r
-       top:0;\r
-       z-index:101;\r
-}\r
-\r
-.navpath ul\r
-{\r
-       background-image:url('tab_b.png');\r
-       background-repeat:repeat-x;\r
-       border:solid 1px #BFCCE8;\r
-       color:#839ED2;\r
-       font-size:11px;\r
-       height:30px;\r
-       line-height:30px;\r
-       margin:0;\r
-       overflow:hidden;\r
-       padding:0;\r
-}\r
-\r
-.navpath li\r
-{\r
-       background-image:url('bc_s.png');\r
-       background-position:right;\r
-       background-repeat:no-repeat;\r
-       color:#2F4B83;\r
-       float:left;\r
-       list-style-type:none;\r
-       padding-left:10px;\r
-       padding-right:15px;\r
-}\r
-\r
-.navpath li.navelem a\r
-{\r
-       display:block;\r
-       height:32px;\r
-       outline:none;\r
-       text-decoration:none;\r
-}\r
-\r
-.navpath li.navelem a:hover\r
-{\r
-       color:#6081C5;\r
-}\r
-\r
-.navpath li.footer\r
-{\r
-       background-image:none;\r
-       background-position:right;\r
-       background-repeat:no-repeat;\r
-       color:#2F4B83;\r
-       float:right;\r
-       font-size:8pt;\r
-       list-style-type:none;\r
-       padding-left:10px;\r
-       padding-right:15px;\r
-}\r
-\r
-div.summary\r
-{\r
-       float:right;\r
-       font-size:8pt;\r
-       padding-right:5px;\r
-       text-align:right;\r
-       width:50%;\r
-}\r
-\r
-div.summary a\r
-{\r
-       white-space:nowrap;\r
-}\r
-\r
-div.ingroups\r
-{\r
-       font-size:8pt;\r
-       margin-left:5px;\r
-       padding-left:5px;\r
-       text-align:left;\r
-       width:50%;\r
-}\r
-\r
-div.ingroups a\r
-{\r
-       white-space:nowrap;\r
-}\r
-\r
-div.header\r
-{\r
-       background-color:#F9FAFC;\r
-       background-image:url('nav_h.png');\r
-       background-repeat:repeat-x;\r
-       border-bottom:1px solid #C1CEE8;\r
-       margin:0;\r
-}\r
-\r
-div.headertitle\r
-{\r
-       padding:5px 5px 5px 7px;\r
-}\r
-\r
-dl\r
-{\r
-       padding:0 0 0 10px;\r
-}\r
-\r
-dl.section\r
-{\r
-       border-left:4px solid;\r
-       padding:0 0 0 6px;\r
-}\r
-\r
-dl.note\r
-{\r
-       border-color:#D0C000;\r
-}\r
-\r
-dl.warning,dl.attention\r
-{\r
-       border-color:#FF0000;\r
-}\r
-\r
-dl.pre,dl.post,dl.invariant\r
-{\r
-       border-color:#00D000;\r
-}\r
-\r
-dl.deprecated\r
-{\r
-       border-color:#505050;\r
-}\r
-\r
-dl.todo\r
-{\r
-       border-color:#00C0E0;\r
-}\r
-\r
-dl.test\r
-{\r
-       border-color:#3030E0;\r
-}\r
-\r
-dl.bug\r
-{\r
-       border-color:#C08050;\r
-}\r
-\r
-dl.section dd\r
-{\r
-       margin-bottom:6px;\r
-}\r
-\r
-#projectlogo\r
-{\r
-       border-collapse:separate;\r
-       text-align:center;\r
-       vertical-align:bottom;\r
-       padding-left: 20px;\r
-}\r
-\r
-#projectlogo img\r
-{\r
-       border:0 none;\r
-}\r
-\r
-#projectname\r
-{\r
-       font:280% Arial, sans-serif;\r
-       margin:0;\r
-       padding-left:20px;\r
-}\r
-\r
-#projectbrief\r
-{\r
-       font:120% Tahoma, Arial, sans-serif;\r
-       margin:0;\r
-       padding:0;\r
-}\r
-\r
-#projectnumber:before\r
-{\r
-       content:"Version ";\r
-}\r
-\r
-#projectnumber\r
-{\r
-       font:50% Tahoma, Arial, sans-serif;\r
-       margin:0;\r
-       padding:0;\r
-}\r
-\r
-#titlearea\r
-{\r
-       margin:0;\r
-       padding:0;\r
-       width:100%;\r
-       background-color:#E1E7F4;\r
-       background-image:url('nav_f.png');\r
-       background-repeat:repeat-x;\r
-       color:#20335A;\r
-       font-weight:bold;\r
-       text-shadow:0 1px 1px rgba(255, 255, 255, 0.9);\r
-}\r
-\r
-.image\r
-{\r
-       text-align:center;\r
-}\r
-\r
-.dotgraph\r
-{\r
-       text-align:center;\r
-}\r
-\r
-.mscgraph\r
-{\r
-       text-align:center;\r
-}\r
-\r
-.caption\r
-{\r
-       font-weight:bold;\r
-}\r
-\r
-div.zoom\r
-{\r
-       border:1px solid #8AA3D4;\r
-}\r
-\r
-dl.citelist\r
-{\r
-       margin-bottom:50px;\r
-}\r
-\r
-dl.citelist dt\r
-{\r
-       color:#2C477C;\r
-       float:left;\r
-       font-weight:bold;\r
-       margin-right:10px;\r
-       padding:5px;\r
-}\r
-\r
-dl.citelist dd\r
-{\r
-       margin:2px 0;\r
-       padding:5px 0;\r
-}\r
-\r
-div.toc\r
-{\r
-       background-color:#F4F6FB;\r
-       border:1px solid #D6DFF0;\r
-       border-radius:7px 7px 7px 7px;\r
-       float:right;\r
-       height:auto;\r
-       margin:0 20px 10px 10px;\r
-       padding:14px 25px;\r
-       width:200px;\r
-}\r
-\r
-div.toc li\r
-{\r
-       background:url("bdwn.png") no-repeat scroll 0 5px transparent;\r
-       font:10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif;\r
-       margin-top:5px;\r
-       padding-left:10px;\r
-       padding-top:2px;\r
-}\r
-\r
-div.toc h3\r
-{\r
-       border-bottom:0 none;\r
-       color:#3D62AB;\r
-       font:bold 12px/1.2 Arial,FreeSans,sans-serif;\r
-       margin:0;\r
-}\r
-\r
-div.toc ul\r
-{\r
-       border:medium none;\r
-       list-style:none outside none;\r
-       padding:0;\r
-}\r
-\r
-div.toc li.level1\r
-{\r
-       margin-left:0;\r
-}\r
-\r
-div.toc li.level2\r
-{\r
-       margin-left:15px;\r
-}\r
-\r
-div.toc li.level3\r
-{\r
-       margin-left:30px;\r
-}\r
-\r
-div.toc li.level4\r
-{\r
-       margin-left:45px;\r
-}\r
+@media print
+ {
+       #top
+       {
+               display:none;
+       }
+
+       #side-nav
+       {
+               display:none;
+       }
+
+       #nav-path
+       {
+               display:none;
+       }
+
+       body
+       {
+               overflow:visible;
+       }
+
+       h1,h2,h3,h4,h5,h6
+       {
+               page-break-after:avoid;
+       }
+
+       .summary
+       {
+               display:none;
+       }
+
+       .memitem
+       {
+               page-break-inside:avoid;
+       }
+
+       #doc-content
+       {
+               display:inline;
+               height:auto !important;
+               margin-left:0 !important;
+               overflow:inherit;
+               width:auto !important;
+       }
+       
+       .fragment
+       {
+               background-color: #FFFFFF !important;
+       }       
+}
+
+body,table,div,p,dl
+{
+       font-family:Lucida Grande, Verdana, Geneva, Arial, sans-serif;
+       font-size:13px;
+       line-height:1.3;
+}
+
+div.contents p
+{
+       padding-left:12px;
+}
+
+div.contents table.memberdecls,.paramname
+{
+       font-family:Consolas, Monaco, courier, sans-serif;
+       font-size:105%;
+       padding-right:20px;
+}
+
+.title
+{
+       font-size:150%;
+       font-weight:bold;
+       margin:10px 2px;
+}
+
+h1
+{
+       font-size:25px;
+       margin-bottom:10px;
+}
+
+h2
+{
+       color:#42657B;
+       font-family:Lucida Grande, Verdana, Geneva, Arial, sans-serif;
+       font-size:17px;
+}
+
+h3
+{
+       font-family:Lucida Grande, Verdana, Geneva, Arial, sans-serif;
+       font-size:15px;
+}
+
+h4
+{
+       font-family:Lucida Grande, Verdana, Geneva, Arial, sans-serif;
+       font-size:13px;
+}
+
+dt
+{
+       font-weight:bold;
+}
+
+div.multicol
+{
+       -moz-column-count:3px;
+       -moz-column-gap:1em;
+       -webkit-column-count:3px;
+       -webkit-column-gap:1em;
+}
+
+p.startli,p.startdd,p.starttd
+{
+       margin-top:2px;
+}
+
+p.endli
+{
+       margin-bottom:0;
+}
+
+p.enddd
+{
+       margin-bottom:4px;
+}
+
+p.endtd
+{
+       margin-bottom:2px;
+}
+
+caption
+{
+       font-weight:bold;
+}
+
+span.legend
+{
+       font-size:70%;
+       text-align:center;
+}
+
+h3.version
+{
+       font-size:90%;
+       text-align:center;
+}
+
+div.qindex,div.navtab
+{
+       background-color:#EAEFF7;
+       border:1px solid #9EB3DC;
+       text-align:center;
+}
+
+div.qindex,div.navpath
+{
+       line-height:140%;
+       width:100%;
+}
+
+div.navtab
+{
+       margin-right:15px;
+}
+
+a
+{
+       color:#355594;
+       font-weight:normal;
+       text-decoration:none;
+}
+
+.contents a:visited
+{
+       color:#3D62AB;
+}
+
+a:hover
+{
+       text-decoration:underline;
+}
+
+a.qindex
+{
+       font-weight:bold;
+}
+
+a.qindexHL
+{
+       background-color:#97ADD9;
+       border:1px double #7F9BD1;
+       color:#ffffff;
+       font-weight:bold;
+}
+
+.contents a.qindexHL:visited
+{
+       color:#ffffff;
+}
+
+a.el
+{
+       font-weight:bold;
+}
+
+a.code,a.code:visited
+{
+       color:#4665A2;
+}
+
+a.codeRef,a.codeRef:visited
+{
+       color:#4665A2;
+}
+
+dl.el
+{
+       margin-left:-1cm;
+}
+
+pre.fragment {
+        border: 1px solid #C4CFE5;
+        background-color: #FBFCFD;
+        padding: 4px 6px;
+        margin: 4px 8px 4px 2px;
+        overflow: auto;
+        word-wrap: break-word;
+        font-size:  9pt;
+        line-height: 125%;
+        font-family: monospace, fixed;
+        font-size: 105%;
+}
+
+div.fragment {
+       padding: 4px;
+       margin: 4px;
+       background-color: #FBFCFD;
+       border: 1px solid #C4CFE5;
+}
+
+div.line {
+       font-family: monospace, fixed;
+       font-size: 13px;
+       line-height: 1.0;
+       text-wrap: unrestricted;
+       white-space: -moz-pre-wrap; /* Moz */
+       white-space: -pre-wrap;     /* Opera 4-6 */
+       white-space: -o-pre-wrap;   /* Opera 7 */
+       white-space: pre-wrap;      /* CSS3  */
+       word-wrap: break-word;      /* IE 5.5+ */
+       text-indent: -53px;
+       padding-left: 53px;
+       padding-bottom: 0px;
+       margin: 0px;
+}
+
+span.lineno {
+       padding-right: 4px;
+       text-align: right;
+       border-right: 2px solid #0F0;
+       background-color: #E8E8E8;
+       white-space: pre;
+}
+span.lineno a {
+       background-color: #D8D8D8;
+}
+
+span.lineno a:hover {
+       background-color: #C8C8C8;
+}
+
+div.ah
+{
+       -moz-border-radius:.5em;
+       -moz-box-shadow:rgba(0, 0, 0, 0.15) 2px 2px 2px;
+       -webkit-border-radius:.5em;
+       -webkit-box-shadow:2px 2px 3px #999;
+       background-color:black;
+       background-image:0;
+       border:solid thin #333;
+       border-radius:0.5em;
+       box-shadow:2px 2px 3px #999;
+       color:#ffffff;
+       font-weight:bold;
+       margin-bottom:3px;
+       margin-top:3px;
+       padding:0.2em;
+}
+
+div.groupHeader
+{
+       font-weight:bold;
+       margin-left:16px;
+       margin-top:12px;
+}
+
+div.groupText
+{
+       font-style:italic;
+       margin-left:16px;
+}
+
+body
+{
+       background-color:white;
+       color:black;
+       margin:0;
+}
+
+div.contents
+{
+       margin-left:8px;
+       margin-right:8px;
+       margin-top:10px;
+}
+
+td.indexkey
+{
+       background-color:#EAEFF7;
+       border:1px solid #C1CEE8;
+       font-weight:bold;
+       margin:2px 0;
+       padding:2px 10px;
+       vertical-align:top;
+       white-space:nowrap;
+}
+
+td.indexvalue
+{
+       background-color:#EAEFF7;
+       border:1px solid #C1CEE8;
+       margin:2px 0;
+       padding:2px 10px;
+}
+
+tr.memlist
+{
+       background-color:#EDF1F8;
+}
+
+p.formulaDsp
+{
+       text-align:center;
+}
+
+img.formulaInl
+{
+       vertical-align:middle;
+}
+
+div.center
+{
+       margin-bottom:0;
+       margin-top:0;
+       padding:0;
+       text-align:center;
+}
+
+div.center img
+{
+       border:0;
+}
+
+address.footer
+{
+       padding-right:12px;
+       text-align:right;
+}
+
+img.footer
+{
+       border:0;
+       vertical-align:middle;
+}
+
+span.keyword
+{
+       color:#008000;
+}
+
+span.keywordtype
+{
+       color:#604020;
+}
+
+span.keywordflow
+{
+       color:#e08000;
+}
+
+span.comment
+{
+       color:#008000;
+}
+
+span.preprocessor
+{
+       color:#806020;
+}
+
+span.stringliteral
+{
+       color:#002080;
+}
+
+span.charliteral
+{
+       color:#008080;
+}
+
+span.vhdldigit
+{
+       color:#ff00ff;
+}
+
+span.vhdlchar
+{
+       color:#000000;
+}
+
+span.vhdlkeyword
+{
+       color:#700070;
+}
+
+span.vhdllogic
+{
+       color:#ff0000;
+}
+
+blockquote
+{
+       background-color:#F6F8FC;
+       border-left:2px solid #97ADD9;
+       margin:0 24px 0 4px;
+       padding:0 12px 0 16px;
+}
+
+td.tiny
+{
+       font-size:75%;
+}
+
+.dirtab
+{
+       border:1px solid #9EB3DC;
+       border-collapse:collapse;
+       padding:4px;
+}
+
+th.dirtab
+{
+       background:#EAEFF7;
+       font-weight:bold;
+}
+
+hr
+{
+       border:none;
+       border-top:1px solid #4067B4;
+       height:0;
+}
+
+hr.footer
+{
+       height:1px;
+}
+
+table.memberdecls
+{
+       border-spacing:0;
+       padding:0;
+}
+
+.mdescLeft,.mdescRight,.memItemLeft,.memItemRight,.memTemplItemLeft,.memTemplItemRight,.memTemplParams
+{
+       background-color:#F9FAFC;
+       border:none;
+       margin:4px;
+       padding:1px 0 0 8px;
+}
+
+.mdescLeft,.mdescRight
+{
+       color:#555;
+       padding:0 8px 4px;
+}
+
+.memItemLeft,.memItemRight,.memTemplParams
+{
+       border-top:1px solid #C1CEE8;
+}
+
+.memItemLeft,.memTemplItemLeft
+{
+       white-space:nowrap;
+}
+
+.memItemRight
+{
+       width:100%;
+}
+
+.memTemplParams
+{
+       color:#3D62AB;
+       white-space:nowrap;
+}
+
+.memtemplate
+{
+       color:#3D62AB;
+       font-size:80%;
+       font-weight:normal;
+       margin-left:9px;
+}
+
+.memnav
+{
+       background-color:#EAEFF7;
+       border:1px solid #9EB3DC;
+       margin:2px 15px 2px 2px;
+       padding:2px;
+       text-align:center;
+}
+
+.mempage
+{
+       width:100%;
+}
+
+.memitem
+{
+       margin-bottom:10px;
+       margin-right:5px;
+       padding:0;
+}
+
+.memname
+{
+       font-weight:bold;
+       margin-left:6px;
+       white-space:nowrap;
+}
+
+.memproto,dl.reflist dt
+{
+       -moz-border-radius-topleft:8px;
+       -moz-border-radius-topright:8px;
+       -moz-box-shadow:rgba(0, 0, 0, 0.15) 5px 5px 5px;
+       -webkit-border-top-left-radius:8px;
+       -webkit-border-top-right-radius:8px;
+       -webkit-box-shadow:5px 5px 5px rgba(0, 0, 0, 0.15);
+       background-color:#E1E7F4;
+       background-image:url('nav_f.png');
+       background-repeat:repeat-x;
+       border-left:1px solid #A3B7DE;
+       border-right:1px solid #A3B7DE;
+       border-top:1px solid #A3B7DE;
+       border-top-left-radius:8px;
+       border-top-right-radius:8px;
+       box-shadow:5px 5px 5px rgba(0, 0, 0, 0.15);
+       color:#20335A;
+       font-weight:bold;
+       padding:6px 0;
+       text-shadow:0 1px 1px rgba(255, 255, 255, 0.9);
+}
+
+.memdoc,dl.reflist dd
+{
+       -moz-border-radius-bottomleft:8px;
+       -moz-border-radius-bottomright:8px;
+       -moz-box-shadow:rgba(0, 0, 0, 0.15) 5px 5px 5px;
+       -webkit-border-bottom-left-radius:8px;
+       -webkit-border-bottom-right-radius:8px;
+       -webkit-box-shadow:5px 5px 5px rgba(0, 0, 0, 0.15);
+       background-color:#FBFCFD;
+       background-image:0 color-stop(0.6,#FFFFFF), color-stop(0.60,#FFFFFF), color-stop(0.95,#F6F8FC), to(#EDF1F8));
+       border-bottom:1px solid #A3B7DE;
+       border-bottom-left-radius:8px;
+       border-bottom-right-radius:8px;
+       border-left:1px solid #A3B7DE;
+       border-right:1px solid #A3B7DE;
+       border-top-width:0;
+       box-shadow:5px 5px 5px rgba(0, 0, 0, 0.15);
+       padding:2px 5px;
+}
+
+dl.reflist dt
+{
+       padding:5px;
+}
+
+dl.reflist dd
+{
+       margin:0 0 10px;
+       padding:5px;
+}
+
+.paramkey
+{
+       text-align:right;
+}
+
+.paramtype
+{
+       white-space:nowrap;
+}
+
+.paramname
+{
+       color:#602020;
+       white-space:nowrap;
+}
+
+.paramname em
+{
+       font-style:normal;
+}
+
+.params,.retval,.exception,.tparams
+{
+       border-spacing:6px 2px;
+}
+
+.params .paramname,.retval .paramname
+{
+       font-weight:bold;
+       vertical-align:top;
+}
+
+.params .paramtype
+{
+       font-style:italic;
+       vertical-align:top;
+}
+
+.params .paramdir
+{
+       font-family:"courier new",courier,monospace;
+       vertical-align:top;
+}
+
+.ftvtree
+{
+       font-family:sans-serif;
+       margin:0;
+}
+
+.directory
+{
+       font-size:9pt;
+       font-weight:bold;
+       margin:5px;
+}
+
+.directory h3
+{
+       font-size:11pt;
+       margin:1em 0 0;
+}
+
+.directory > h3
+{
+       margin-top:0;
+}
+
+.directory p
+{
+       margin:0;
+       white-space:nowrap;
+}
+
+.directory div
+{
+       display:none;
+       margin:0;
+}
+
+.directory img
+{
+       vertical-align:-30%;
+}
+
+.directory-alt
+{
+       font-size:100%;
+       font-weight:bold;
+}
+
+.directory-alt h3
+{
+       font-size:11pt;
+       margin:1em 0 0;
+}
+
+.directory-alt > h3
+{
+       margin-top:0;
+}
+
+.directory-alt p
+{
+       margin:0;
+       white-space:nowrap;
+}
+
+.directory-alt div
+{
+       display:none;
+       margin:0;
+}
+
+.directory-alt img
+{
+       vertical-align:-30%;
+}
+
+div.dynheader
+{
+       margin-top:8px;
+}
+
+address
+{
+       color:#253B67;
+       font-style:normal;
+}
+
+table.doxtable
+{
+       border-collapse:collapse;
+       margin-bottom:4px;
+       margin-top:4px;
+}
+
+table.doxtable td,table.doxtable th
+{
+       border:1px solid #273F6D;
+       padding:3px 7px 2px;
+}
+
+table.doxtable th
+{
+       background-color:#304D86;
+       color:#FFFFFF;
+       font-size:110%;
+       padding-bottom:4px;
+       padding-top:5px;
+}
+
+table.fieldtable
+{
+       -moz-border-radius:4px;
+       -moz-box-shadow:rgba(0, 0, 0, 0.15) 2px 2px 2px;
+       -webkit-border-radius:4px;
+       -webkit-box-shadow:2px 2px 2px rgba(0, 0, 0, 0.15);
+       border:1px solid #A3B7DE;
+       border-radius:4px;
+       border-spacing:0;
+       box-shadow:2px 2px 2px rgba(0, 0, 0, 0.15);
+       margin-bottom:10px;
+       width:100%;
+}
+
+.fieldtable td,.fieldtable th
+{
+       padding:3px 7px 2px;
+}
+
+.fieldtable td.fieldtype,.fieldtable td.fieldname
+{
+       border-bottom:1px solid #A3B7DE;
+       border-right:1px solid #A3B7DE;
+       vertical-align:top;
+       white-space:nowrap;
+}
+
+.fieldtable td.fielddoc
+{
+       border-bottom:1px solid #A3B7DE;
+       width:100%;
+}
+
+.fieldtable tr:last-child td
+{
+       border-bottom:none;
+}
+
+.fieldtable th
+{
+       -moz-border-radius-topleft:4px;
+       -moz-border-radius-topright:4px;
+       -webkit-border-top-left-radius:4px;
+       -webkit-border-top-right-radius:4px;
+       background-color:#E1E7F4;
+       background-image:url('nav_f.png');
+       background-repeat:repeat-x;
+       border-bottom:1px solid #A3B7DE;
+       border-top-left-radius:4px;
+       border-top-right-radius:4px;
+       color:#20335A;
+       font-size:90%;
+       padding-bottom:4px;
+       padding-top:5px;
+       text-align:left;
+}
+
+.tabsearch
+{
+       background-image:url('tab_b.png');
+       font-size:13px;
+       height:36px;
+       left:10px;
+       overflow:hidden;
+       top:0;
+       z-index:101;
+}
+
+.navpath ul
+{
+       background-image:url('tab_b.png');
+       background-repeat:repeat-x;
+       border:solid 1px #BFCCE8;
+       color:#839ED2;
+       font-size:11px;
+       height:30px;
+       line-height:30px;
+       margin:0;
+       overflow:hidden;
+       padding:0;
+}
+
+.navpath li
+{
+       background-image:url('bc_s.png');
+       background-position:right;
+       background-repeat:no-repeat;
+       color:#2F4B83;
+       float:left;
+       list-style-type:none;
+       padding-left:10px;
+       padding-right:15px;
+}
+
+.navpath li.navelem a
+{
+       display:block;
+       height:32px;
+       outline:none;
+       text-decoration:none;
+}
+
+.navpath li.navelem a:hover
+{
+       color:#6081C5;
+}
+
+.navpath li.footer
+{
+       background-image:none;
+       background-position:right;
+       background-repeat:no-repeat;
+       color:#2F4B83;
+       float:right;
+       font-size:8pt;
+       list-style-type:none;
+       padding-left:10px;
+       padding-right:15px;
+}
+
+div.summary
+{
+       float:right;
+       font-size:8pt;
+       padding-right:5px;
+       text-align:right;
+       width:50%;
+}
+
+div.summary a
+{
+       white-space:nowrap;
+}
+
+div.ingroups
+{
+       font-size:8pt;
+       margin-left:5px;
+       padding-left:5px;
+       text-align:left;
+       width:50%;
+}
+
+div.ingroups a
+{
+       white-space:nowrap;
+}
+
+div.header
+{
+       background-color:#F9FAFC;
+       background-image:url('nav_h.png');
+       background-repeat:repeat-x;
+       border-bottom:1px solid #C1CEE8;
+       margin:0;
+}
+
+div.headertitle
+{
+       padding:5px 5px 5px 7px;
+}
+
+dl
+{
+       padding:0 0 0 10px;
+}
+
+dl.section
+{
+       border-left:4px solid;
+       padding:0 0 0 6px;
+}
+
+dl.note
+{
+       border-color:#D0C000;
+}
+
+dl.warning,dl.attention
+{
+       border-color:#FF0000;
+}
+
+dl.pre,dl.post,dl.invariant
+{
+       border-color:#00D000;
+}
+
+dl.deprecated
+{
+       border-color:#505050;
+}
+
+dl.todo
+{
+       border-color:#00C0E0;
+}
+
+dl.test
+{
+       border-color:#3030E0;
+}
+
+dl.bug
+{
+       border-color:#C08050;
+}
+
+dl.section dd
+{
+       margin-bottom:6px;
+}
+
+#projectlogo
+{
+       border-collapse:separate;
+       text-align:center;
+       vertical-align:bottom;
+       padding-left: 20px;
+}
+
+#projectlogo img
+{
+       border:0 none;
+}
+
+#projectname
+{
+       font:280% Arial, sans-serif;
+       margin:0;
+       padding-left:20px;
+}
+
+#projectbrief
+{
+       font:120% Tahoma, Arial, sans-serif;
+       margin:0;
+       padding:0;
+}
+
+#projectnumber:before
+{
+       content:"Version ";
+}
+
+#projectnumber
+{
+       font:50% Tahoma, Arial, sans-serif;
+       margin:0;
+       padding:0;
+}
+
+#titlearea
+{
+       margin:0;
+       padding:0;
+       width:100%;
+       background-color:#E1E7F4;
+       background-image:url('nav_f.png');
+       background-repeat:repeat-x;
+       color:#20335A;
+       font-weight:bold;
+       text-shadow:0 1px 1px rgba(255, 255, 255, 0.9);
+}
+
+.image
+{
+       text-align:center;
+}
+
+.dotgraph
+{
+       text-align:center;
+}
+
+.mscgraph
+{
+       text-align:center;
+}
+
+.caption
+{
+       font-weight:bold;
+}
+
+div.zoom
+{
+       border:1px solid #8AA3D4;
+}
+
+dl.citelist
+{
+       margin-bottom:50px;
+}
+
+dl.citelist dt
+{
+       color:#2C477C;
+       float:left;
+       font-weight:bold;
+       margin-right:10px;
+       padding:5px;
+}
+
+dl.citelist dd
+{
+       margin:2px 0;
+       padding:5px 0;
+}
+
+div.toc
+{
+       background-color:#F4F6FB;
+       border:1px solid #D6DFF0;
+       border-radius:7px 7px 7px 7px;
+       float:right;
+       height:auto;
+       margin:0 20px 10px 10px;
+       padding:14px 25px;
+       width:200px;
+}
+
+div.toc li
+{
+       background:url("bdwn.png") no-repeat scroll 0 5px transparent;
+       font:10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif;
+       margin-top:5px;
+       padding-left:10px;
+       padding-top:2px;
+}
+
+div.toc h3
+{
+       border-bottom:0 none;
+       color:#3D62AB;
+       font:bold 12px/1.2 Arial,FreeSans,sans-serif;
+       margin:0;
+}
+
+div.toc ul
+{
+       border:medium none;
+       list-style:none outside none;
+       padding:0;
+}
+
+div.toc li.level1
+{
+       margin-left:0;
+}
+
+div.toc li.level2
+{
+       margin-left:15px;
+}
+
+div.toc li.level3
+{
+       margin-left:30px;
+}
+
+div.toc li.level4
+{
+       margin-left:45px;
+}
index 89516dc..bafedcc 100644 (file)
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2012.\r
-\r
-  dean [at] fourwalledcubicle [dot] com\r
-           www.lufa-lib.org\r
-*/\r
-\r
-/*\r
-  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, distribute, and sell this\r
-  software and its documentation for any purpose is hereby granted\r
-  without fee, provided that the above copyright notice appear in\r
-  all copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting\r
-  documentation, and that the name of the author not be used in\r
-  advertising or publicity pertaining to distribution of the\r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-/** \file\r
- *  \brief Board specific LED driver header for the Bitwizard Big-Multio.\r
- *  \copydetails Group_LEDs_BIGMULTIO\r
- *\r
- *  \note This file should not be included directly. It is automatically included as needed by the LEDs driver\r
- *        dispatch header located in LUFA/Drivers/Board/LEDs.h.\r
- */\r
-\r
-/** \ingroup Group_LEDs\r
- *  \defgroup Group_LEDs_BIGMULTIO BIGMULTIO\r
- *  \brief Board specific LED driver header for the Bitwizard Big-Multio.\r
- *\r
- *  Board specific LED driver header for the Bitwizard Big-Multio (http://www.bitwizard.nl/wiki/index.php/Usbbigmultio).\r
- *\r
- *  <table>\r
- *    <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>\r
- *    <tr><td>LEDS_LED1</td><td>Unknown</td><td>LED0</td><td>High</td><td>PORTF.6</td></tr>\r
- *    <tr><td>LEDS_LED2</td><td>Unknown</td><td>LED1</td><td>High</td><td>PORTF.7</td></tr>\r
- *    <tr><td>LEDS_LED3</td><td>Unknown</td><td>LED2</td><td>High</td><td>PORTE.2</td></tr>\r
- *  </table>\r
- *\r
- *  @{\r
- */\r
-\r
-#ifndef __LEDS_BIGMULTIO_H__\r
-#define __LEDS_BIGMULTIO_H__\r
-\r
-       /* Includes: */\r
-               #include "../../../../Common/Common.h"\r
-\r
-       /* Enable C linkage for C++ Compilers: */\r
-               #if defined(__cplusplus)\r
-                       extern "C" {\r
-               #endif\r
-\r
-       /* Preprocessor Checks: */\r
-               #if !defined(__INCLUDE_FROM_LEDS_H)\r
-                       #error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead.\r
-               #endif\r
-\r
-       /* Private Interface - For use in library only: */\r
-       #if !defined(__DOXYGEN__)\r
-               /* Macros: */\r
-                       #define LEDS_PORTF_LEDS       (LEDS_LED1 | LEDS_LED2)\r
-                       #define LEDS_PORTE_LEDS       LEDS_LED3\r
-       #endif\r
-\r
-       /* Public Interface - May be used in end-application: */\r
-               /* Macros: */\r
-                       /** LED mask for the first LED on the board. */\r
-                       #define LEDS_LED1        (1 << 6)\r
-\r
-                       /** LED mask for the second LED on the board. */\r
-                       #define LEDS_LED2        (1 << 7)\r
-\r
-                       /** LED mask for the second LED on the board. */\r
-                       #define LEDS_LED3        (1 << 2)\r
-\r
-                       /** LED mask for all the LEDs on the board. */\r
-                       #define LEDS_ALL_LEDS    (LEDS_LED1 | LEDS_LED2 | LEDS_LED3)\r
-\r
-                       /** LED mask for none of the board LEDs. */\r
-                       #define LEDS_NO_LEDS     0\r
-\r
-               /* Inline Functions: */\r
-               #if !defined(__DOXYGEN__)\r
-                       static inline void LEDs_Init(void)\r
-                       {\r
-                               DDRF  |=  LEDS_PORTF_LEDS;\r
-                               DDRE  |=  LEDS_PORTE_LEDS;\r
-                       \r
-                               PORTF &= ~LEDS_PORTF_LEDS;\r
-                               PORTE &= ~LEDS_PORTE_LEDS;\r
-                       }\r
-\r
-                       static inline void LEDs_Disable(void)\r
-                       {\r
-                               DDRF  |=  LEDS_PORTF_LEDS;\r
-                               DDRE  |=  LEDS_PORTE_LEDS;\r
-                       \r
-                               PORTF &= ~LEDS_PORTF_LEDS;\r
-                               PORTE &= ~LEDS_PORTE_LEDS;\r
-                       }\r
-\r
-                       static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)\r
-                       {\r
-                               PORTF |= (LEDMask & LEDS_PORTF_LEDS);\r
-                               PORTE |= (LEDMask & LEDS_PORTE_LEDS);\r
-                       }\r
-\r
-                       static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)\r
-                       {\r
-                               PORTF &= ~(LEDMask & LEDS_PORTF_LEDS);\r
-                               PORTE &= ~(LEDMask & LEDS_PORTE_LEDS);\r
-                       }\r
-\r
-                       static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)\r
-                       {\r
-                               PORTF = (PORTF & ~LEDS_PORTF_LEDS) | (LEDMask & LEDS_PORTF_LEDS);\r
-                               PORTE = (PORTE & ~LEDS_PORTE_LEDS) | (LEDMask & LEDS_PORTE_LEDS);\r
-                       }\r
-\r
-                       static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,\r
-                                                          const uint8_t ActiveMask)\r
-                       {\r
-                               PORTF = (PORTF & ~(LEDMask & LEDS_PORTF_LEDS)) | (ActiveMask & LEDS_PORTF_LEDS);\r
-                               PORTE = (PORTE & ~(LEDMask & LEDS_PORTE_LEDS)) | (ActiveMask & LEDS_PORTE_LEDS);\r
-                       }\r
-\r
-                       static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)\r
-                       {\r
-                               PINF  = (LEDMask & LEDS_PORTF_LEDS);\r
-                               PINE  = (LEDMask & LEDS_PORTE_LEDS);\r
-                       }\r
-\r
-                       static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;\r
-                       static inline uint8_t LEDs_GetLEDs(void)\r
-                       {\r
-                               return ((PORTF & LEDS_PORTF_LEDS) | (PORTE & LEDS_PORTE_LEDS));\r
-                       }\r
-               #endif\r
-\r
-       /* Disable C linkage for C++ Compilers: */\r
-               #if defined(__cplusplus)\r
-                       }\r
-               #endif\r
-\r
-#endif\r
-\r
-/** @} */\r
-\r
+/*
+             LUFA Library
+     Copyright (C) Dean Camera, 2012.
+
+  dean [at] fourwalledcubicle [dot] com
+           www.lufa-lib.org
+*/
+
+/*
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+  Permission to use, copy, modify, distribute, and sell this
+  software and its documentation for any purpose is hereby granted
+  without fee, provided that the above copyright notice appear in
+  all copies and that both that the copyright notice and this
+  permission notice and warranty disclaimer appear in supporting
+  documentation, and that the name of the author not be used in
+  advertising or publicity pertaining to distribution of the
+  software without specific, written prior permission.
+
+  The author disclaim all warranties with regard to this
+  software, including all implied warranties of merchantability
+  and fitness.  In no event shall the author be liable for any
+  special, indirect or consequential damages or any damages
+  whatsoever resulting from loss of use, data or profits, whether
+  in an action of contract, negligence or other tortious action,
+  arising out of or in connection with the use or performance of
+  this software.
+*/
+
+/** \file
+ *  \brief Board specific LED driver header for the Bitwizard Big-Multio.
+ *  \copydetails Group_LEDs_BIGMULTIO
+ *
+ *  \note This file should not be included directly. It is automatically included as needed by the LEDs driver
+ *        dispatch header located in LUFA/Drivers/Board/LEDs.h.
+ */
+
+/** \ingroup Group_LEDs
+ *  \defgroup Group_LEDs_BIGMULTIO BIGMULTIO
+ *  \brief Board specific LED driver header for the Bitwizard Big-Multio.
+ *
+ *  Board specific LED driver header for the Bitwizard Big-Multio (http://www.bitwizard.nl/wiki/index.php/Usbbigmultio).
+ *
+ *  <table>
+ *    <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ *    <tr><td>LEDS_LED1</td><td>Unknown</td><td>LED0</td><td>High</td><td>PORTF.6</td></tr>
+ *    <tr><td>LEDS_LED2</td><td>Unknown</td><td>LED1</td><td>High</td><td>PORTF.7</td></tr>
+ *    <tr><td>LEDS_LED3</td><td>Unknown</td><td>LED2</td><td>High</td><td>PORTE.2</td></tr>
+ *  </table>
+ *
+ *  @{
+ */
+
+#ifndef __LEDS_BIGMULTIO_H__
+#define __LEDS_BIGMULTIO_H__
+
+       /* Includes: */
+               #include "../../../../Common/Common.h"
+
+       /* Enable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       extern "C" {
+               #endif
+
+       /* Preprocessor Checks: */
+               #if !defined(__INCLUDE_FROM_LEDS_H)
+                       #error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead.
+               #endif
+
+       /* Private Interface - For use in library only: */
+       #if !defined(__DOXYGEN__)
+               /* Macros: */
+                       #define LEDS_PORTF_LEDS       (LEDS_LED1 | LEDS_LED2)
+                       #define LEDS_PORTE_LEDS       LEDS_LED3
+       #endif
+
+       /* Public Interface - May be used in end-application: */
+               /* Macros: */
+                       /** LED mask for the first LED on the board. */
+                       #define LEDS_LED1        (1 << 6)
+
+                       /** LED mask for the second LED on the board. */
+                       #define LEDS_LED2        (1 << 7)
+
+                       /** LED mask for the second LED on the board. */
+                       #define LEDS_LED3        (1 << 2)
+
+                       /** LED mask for all the LEDs on the board. */
+                       #define LEDS_ALL_LEDS    (LEDS_LED1 | LEDS_LED2 | LEDS_LED3)
+
+                       /** LED mask for none of the board LEDs. */
+                       #define LEDS_NO_LEDS     0
+
+               /* Inline Functions: */
+               #if !defined(__DOXYGEN__)
+                       static inline void LEDs_Init(void)
+                       {
+                               DDRF  |=  LEDS_PORTF_LEDS;
+                               DDRE  |=  LEDS_PORTE_LEDS;
+                       
+                               PORTF &= ~LEDS_PORTF_LEDS;
+                               PORTE &= ~LEDS_PORTE_LEDS;
+                       }
+
+                       static inline void LEDs_Disable(void)
+                       {
+                               DDRF  |=  LEDS_PORTF_LEDS;
+                               DDRE  |=  LEDS_PORTE_LEDS;
+                       
+                               PORTF &= ~LEDS_PORTF_LEDS;
+                               PORTE &= ~LEDS_PORTE_LEDS;
+                       }
+
+                       static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
+                       {
+                               PORTF |= (LEDMask & LEDS_PORTF_LEDS);
+                               PORTE |= (LEDMask & LEDS_PORTE_LEDS);
+                       }
+
+                       static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
+                       {
+                               PORTF &= ~(LEDMask & LEDS_PORTF_LEDS);
+                               PORTE &= ~(LEDMask & LEDS_PORTE_LEDS);
+                       }
+
+                       static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
+                       {
+                               PORTF = (PORTF & ~LEDS_PORTF_LEDS) | (LEDMask & LEDS_PORTF_LEDS);
+                               PORTE = (PORTE & ~LEDS_PORTE_LEDS) | (LEDMask & LEDS_PORTE_LEDS);
+                       }
+
+                       static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,
+                                                          const uint8_t ActiveMask)
+                       {
+                               PORTF = (PORTF & ~(LEDMask & LEDS_PORTF_LEDS)) | (ActiveMask & LEDS_PORTF_LEDS);
+                               PORTE = (PORTE & ~(LEDMask & LEDS_PORTE_LEDS)) | (ActiveMask & LEDS_PORTE_LEDS);
+                       }
+
+                       static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
+                       {
+                               PINF  = (LEDMask & LEDS_PORTF_LEDS);
+                               PINE  = (LEDMask & LEDS_PORTE_LEDS);
+                       }
+
+                       static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
+                       static inline uint8_t LEDs_GetLEDs(void)
+                       {
+                               return ((PORTF & LEDS_PORTF_LEDS) | (PORTE & LEDS_PORTE_LEDS));
+                       }
+               #endif
+
+       /* Disable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       }
+               #endif
+
+#endif
+
+/** @} */
+
index 731d1b0..60d81b7 100644 (file)
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2012.\r
-\r
-  dean [at] fourwalledcubicle [dot] com\r
-           www.lufa-lib.org\r
-*/\r
-\r
-/*\r
-  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, distribute, and sell this\r
-  software and its documentation for any purpose is hereby granted\r
-  without fee, provided that the above copyright notice appear in\r
-  all copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting\r
-  documentation, and that the name of the author not be used in\r
-  advertising or publicity pertaining to distribution of the\r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-/** \file\r
- *  \brief Board specific Buttons driver header for the Micropendous series boards.\r
- *  \copydetails Group_Buttons_MICROPENDOUS_32U2\r
- *\r
- *  \note This file should not be included directly. It is automatically included as needed by the Buttons driver\r
- *        dispatch header located in LUFA/Drivers/Board/Buttons.h.\r
- */\r
-\r
-/** \ingroup Group_Buttons\r
- *  \defgroup Group_Buttons_MICROPENDOUS_A MICROPENDOUS_A\r
- *  \brief Board specific Button driver header for the Micropendous A (https://code.google.com/p/micropendous/wiki/MicropendousA).\r
- *\r
- *  See \ref Group_Buttons_MICROPENDOUS_32U2 for more details.\r
- */\r
-\r
-/** \ingroup Group_Buttons\r
- *  \defgroup Group_Buttons_MICROPENDOUS_1 MICROPENDOUS_1\r
- *  \brief Board specific Button driver header for the Micropendous 1 (https://code.google.com/p/micropendous/wiki/Micropendous1).\r
- *\r
- *  See \ref Group_Buttons_MICROPENDOUS_32U2 for more details.\r
- */\r
-\r
-/** \ingroup Group_Buttons\r
- *  \defgroup Group_Buttons_MICROPENDOUS_2 MICROPENDOUS_2\r
- *  \brief Board specific Button driver header for the Micropendous 2 (https://code.google.com/p/micropendous/wiki/Micropendous2).\r
- *\r
- *  See \ref Group_Buttons_MICROPENDOUS_32U2 for more details.\r
- */\r
\r
-/** \ingroup Group_Buttons\r
- *  \defgroup Group_Buttons_MICROPENDOUS_3 MICROPENDOUS_3\r
- *  \brief Board specific Button driver header for the Micropendous 3 (https://code.google.com/p/micropendous/wiki/Micropendous3).\r
- *\r
- *  See \ref Group_Buttons_MICROPENDOUS_32U2 for more details.\r
- */\r
\r
-/** \ingroup Group_Buttons\r
- *  \defgroup Group_Buttons_MICROPENDOUS_4 MICROPENDOUS_4\r
- *  \brief Board specific Button driver header for the Micropendous 4 (https://code.google.com/p/micropendous/wiki/Micropendous4).\r
- *\r
- *  See \ref Group_Buttons_MICROPENDOUS_32U2 for more details.\r
- */\r
-\r
-/** \ingroup Group_Buttons\r
- *  \defgroup Group_Buttons_MICROPENDOUS_DIP MICROPENDOUS_DIP\r
- *  \brief Board specific Button driver header for the Micropendous DIP (https://code.google.com/p/micropendous/wiki/MicropendousDIP).\r
- *\r
- *  See \ref Group_Buttons_MICROPENDOUS_32U2 for more details.\r
- */\r
-\r
-/** \ingroup Group_Buttons\r
- *  \defgroup Group_Buttons_MICROPENDOUS_REV1 MICROPENDOUS_REV1\r
- *  \brief Board specific Button driver header for the Micropendous Arduino-like Revision 1 (https://code.google.com/p/micropendous/wiki/Micropendous).\r
- *\r
- *  See \ref Group_Buttons_MICROPENDOUS_32U2 for more details.\r
- */\r
-\r
-/** \ingroup Group_Buttons\r
- *  \defgroup Group_Buttons_MICROPENDOUS_REV2 MICROPENDOUS_REV2\r
- *  \brief Board specific Button driver header for the Micropendous Arduino-like Revision 2 (https://code.google.com/p/micropendous/wiki/Micropendous).\r
- *\r
- *  See \ref Group_Buttons_MICROPENDOUS_32U2 for more details.\r
- */\r
-\r
-/** \ingroup Group_Buttons\r
- *  \defgroup Group_Buttons_MICROPENDOUS_32U2 MICROPENDOUS_32U2\r
- *  \brief Board specific Buttons driver header for the Micropendous 32U2.\r
- *\r
- *  \note There are multiple supported Micropendous boards, compile with <code>BOARD = MICROPENDOUS_{VERSION}</code>.\r
- *\r
- *  Board specific Buttons driver header for the Micropendous 32U2 (https://code.google.com/p/micropendous/wiki/Micropendous_32U2).\r
- *\r
- *  <b>BOARD_MICROPENDOUS_1 and BOARD_MICROPENDOUS_32U2</b>:\r
- *  <table>\r
- *    <tr><th>Name</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>\r
- *    <tr><td>BUTTONS_BUTTON1</td><td>HWB Button</td><td>Low</td><td>PORTD.7</td></tr>\r
- *  </table>\r
- *\r
- *  <b>Other Revisions</b>:\r
- *  <table>\r
- *    <tr><th>Name</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>\r
- *    <tr><td>BUTTONS_BUTTON1</td><td>HWB Button</td><td>Low</td><td>PORTE.2</td></tr>\r
- *  </table>\r
- *\r
- *  @{\r
- */\r
-\r
-#ifndef __BUTTONS_MICROPENDOUS_H__\r
-#define __BUTTONS_MICROPENDOUS_H__\r
-\r
-       /* Includes: */\r
-               #include "../../../../Common/Common.h"\r
-\r
-       /* Enable C linkage for C++ Compilers: */\r
-               #if defined(__cplusplus)\r
-                       extern "C" {\r
-               #endif\r
-\r
-       /* Preprocessor Checks: */\r
-               #if !defined(__INCLUDE_FROM_BUTTONS_H)\r
-                       #error Do not include this file directly. Include LUFA/Drivers/Board/Buttons.h instead.\r
-               #endif\r
-\r
-       /* Private Interface - For use in library only: */\r
-       #if !defined(__DOXYGEN__)\r
-               #if (BOARD == BOARD_MICROPENDOUS_32U2)\r
-                       #define _BOARD_BUTTON1_MASK             (1 << 7)\r
-                       #define _BOARD_BUTTON_PORTLETTER        D\r
-               #elif (BOARD == BOARD_MICROPENDOUS_A)\r
-                       #define _BOARD_BUTTON1_MASK             (1 << 2)\r
-                       #define _BOARD_BUTTON_PORTLETTER        E\r
-               #elif (BOARD == BOARD_MICROPENDOUS_1)\r
-                       #define _BOARD_BUTTON1_MASK             (1 << 7)\r
-                       #define _BOARD_BUTTON_PORTLETTER        D\r
-               #elif (BOARD == BOARD_MICROPENDOUS_2)\r
-                       #define _BOARD_BUTTON1_MASK             (1 << 2)\r
-                       #define _BOARD_BUTTON_PORTLETTER        E\r
-               #elif (BOARD == BOARD_MICROPENDOUS_3)\r
-                       #define _BOARD_BUTTON1_MASK             (1 << 2)\r
-                       #define _BOARD_BUTTON_PORTLETTER        E\r
-               #elif (BOARD == BOARD_MICROPENDOUS_4)\r
-                       #define _BOARD_BUTTON1_MASK             (1 << 2)\r
-                       #define _BOARD_BUTTON_PORTLETTER        E\r
-               #elif (BOARD == BOARD_MICROPENDOUS_DIP)\r
-                       #define _BOARD_BUTTON1_MASK             (1 << 2)\r
-                       #define _BOARD_BUTTON_PORTLETTER        E\r
-               #elif (BOARD == BOARD_MICROPENDOUS_REV1)\r
-                       #define _BOARD_BUTTON1_MASK             (1 << 2)\r
-                       #define _BOARD_BUTTON_PORTLETTER        E\r
-               #elif (BOARD == BOARD_MICROPENDOUS_REV2)\r
-                       #define _BOARD_BUTTON1_MASK             (1 << 2)\r
-                       #define _BOARD_BUTTON_PORTLETTER        E\r
-               #endif\r
-               \r
-               #define _BOARD_BUTTON_CONCAT2(Reg, Letter)  Reg ## Letter\r
-               #define _BOARD_BUTTON_CONCAT(Reg, Letter)   _BOARD_BUTTON_CONCAT2(Reg, Letter)\r
-\r
-               #define _BOARD_BUTTON_PORT                 _BOARD_BUTTON_CONCAT(PORT, _BOARD_BUTTON_PORTLETTER)\r
-               #define _BOARD_BUTTON_PIN                  _BOARD_BUTTON_CONCAT(PIN,  _BOARD_BUTTON_PORTLETTER)\r
-               #define _BOARD_BUTTON_DDR                  _BOARD_BUTTON_CONCAT(DDR,  _BOARD_BUTTON_PORTLETTER)\r
-       #endif\r
-\r
-       /* Public Interface - May be used in end-application: */\r
-               /* Macros: */\r
-                       /** Button mask for the first button on the board. */\r
-                       #define BUTTONS_BUTTON1                _BOARD_BUTTON1_MASK\r
-\r
-               /* Inline Functions: */\r
-               #if !defined(__DOXYGEN__)\r
-                       static inline void Buttons_Init(void)\r
-                       {\r
-                               _BOARD_BUTTON_DDR  &= ~BUTTONS_BUTTON1;\r
-                               _BOARD_BUTTON_PORT |=  BUTTONS_BUTTON1;\r
-                       }\r
-\r
-                       static inline void Buttons_Disable(void)\r
-                       {\r
-                               _BOARD_BUTTON_DDR  &= ~BUTTONS_BUTTON1;\r
-                               _BOARD_BUTTON_PORT &= ~BUTTONS_BUTTON1;\r
-                       }\r
-\r
-                       static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;\r
-                       static inline uint8_t Buttons_GetStatus(void)\r
-                       {\r
-                               return ((_BOARD_BUTTON_PIN & BUTTONS_BUTTON1) ^ BUTTONS_BUTTON1);\r
-                       }\r
-               #endif\r
-\r
-       /* Disable C linkage for C++ Compilers: */\r
-               #if defined(__cplusplus)\r
-                       }\r
-               #endif\r
-\r
-#endif\r
-\r
-/** @} */\r
-\r
+/*
+             LUFA Library
+     Copyright (C) Dean Camera, 2012.
+
+  dean [at] fourwalledcubicle [dot] com
+           www.lufa-lib.org
+*/
+
+/*
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+  Permission to use, copy, modify, distribute, and sell this
+  software and its documentation for any purpose is hereby granted
+  without fee, provided that the above copyright notice appear in
+  all copies and that both that the copyright notice and this
+  permission notice and warranty disclaimer appear in supporting
+  documentation, and that the name of the author not be used in
+  advertising or publicity pertaining to distribution of the
+  software without specific, written prior permission.
+
+  The author disclaim all warranties with regard to this
+  software, including all implied warranties of merchantability
+  and fitness.  In no event shall the author be liable for any
+  special, indirect or consequential damages or any damages
+  whatsoever resulting from loss of use, data or profits, whether
+  in an action of contract, negligence or other tortious action,
+  arising out of or in connection with the use or performance of
+  this software.
+*/
+
+/** \file
+ *  \brief Board specific Buttons driver header for the Micropendous series boards.
+ *  \copydetails Group_Buttons_MICROPENDOUS_32U2
+ *
+ *  \note This file should not be included directly. It is automatically included as needed by the Buttons driver
+ *        dispatch header located in LUFA/Drivers/Board/Buttons.h.
+ */
+
+/** \ingroup Group_Buttons
+ *  \defgroup Group_Buttons_MICROPENDOUS_A MICROPENDOUS_A
+ *  \brief Board specific Button driver header for the Micropendous A (https://code.google.com/p/micropendous/wiki/MicropendousA).
+ *
+ *  See \ref Group_Buttons_MICROPENDOUS_32U2 for more details.
+ */
+
+/** \ingroup Group_Buttons
+ *  \defgroup Group_Buttons_MICROPENDOUS_1 MICROPENDOUS_1
+ *  \brief Board specific Button driver header for the Micropendous 1 (https://code.google.com/p/micropendous/wiki/Micropendous1).
+ *
+ *  See \ref Group_Buttons_MICROPENDOUS_32U2 for more details.
+ */
+
+/** \ingroup Group_Buttons
+ *  \defgroup Group_Buttons_MICROPENDOUS_2 MICROPENDOUS_2
+ *  \brief Board specific Button driver header for the Micropendous 2 (https://code.google.com/p/micropendous/wiki/Micropendous2).
+ *
+ *  See \ref Group_Buttons_MICROPENDOUS_32U2 for more details.
+ */
+/** \ingroup Group_Buttons
+ *  \defgroup Group_Buttons_MICROPENDOUS_3 MICROPENDOUS_3
+ *  \brief Board specific Button driver header for the Micropendous 3 (https://code.google.com/p/micropendous/wiki/Micropendous3).
+ *
+ *  See \ref Group_Buttons_MICROPENDOUS_32U2 for more details.
+ */
+/** \ingroup Group_Buttons
+ *  \defgroup Group_Buttons_MICROPENDOUS_4 MICROPENDOUS_4
+ *  \brief Board specific Button driver header for the Micropendous 4 (https://code.google.com/p/micropendous/wiki/Micropendous4).
+ *
+ *  See \ref Group_Buttons_MICROPENDOUS_32U2 for more details.
+ */
+
+/** \ingroup Group_Buttons
+ *  \defgroup Group_Buttons_MICROPENDOUS_DIP MICROPENDOUS_DIP
+ *  \brief Board specific Button driver header for the Micropendous DIP (https://code.google.com/p/micropendous/wiki/MicropendousDIP).
+ *
+ *  See \ref Group_Buttons_MICROPENDOUS_32U2 for more details.
+ */
+
+/** \ingroup Group_Buttons
+ *  \defgroup Group_Buttons_MICROPENDOUS_REV1 MICROPENDOUS_REV1
+ *  \brief Board specific Button driver header for the Micropendous Arduino-like Revision 1 (https://code.google.com/p/micropendous/wiki/Micropendous).
+ *
+ *  See \ref Group_Buttons_MICROPENDOUS_32U2 for more details.
+ */
+
+/** \ingroup Group_Buttons
+ *  \defgroup Group_Buttons_MICROPENDOUS_REV2 MICROPENDOUS_REV2
+ *  \brief Board specific Button driver header for the Micropendous Arduino-like Revision 2 (https://code.google.com/p/micropendous/wiki/Micropendous).
+ *
+ *  See \ref Group_Buttons_MICROPENDOUS_32U2 for more details.
+ */
+
+/** \ingroup Group_Buttons
+ *  \defgroup Group_Buttons_MICROPENDOUS_32U2 MICROPENDOUS_32U2
+ *  \brief Board specific Buttons driver header for the Micropendous 32U2.
+ *
+ *  \note There are multiple supported Micropendous boards, compile with <code>BOARD = MICROPENDOUS_{VERSION}</code>.
+ *
+ *  Board specific Buttons driver header for the Micropendous 32U2 (https://code.google.com/p/micropendous/wiki/Micropendous_32U2).
+ *
+ *  <b>BOARD_MICROPENDOUS_1 and BOARD_MICROPENDOUS_32U2</b>:
+ *  <table>
+ *    <tr><th>Name</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ *    <tr><td>BUTTONS_BUTTON1</td><td>HWB Button</td><td>Low</td><td>PORTD.7</td></tr>
+ *  </table>
+ *
+ *  <b>Other Revisions</b>:
+ *  <table>
+ *    <tr><th>Name</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ *    <tr><td>BUTTONS_BUTTON1</td><td>HWB Button</td><td>Low</td><td>PORTE.2</td></tr>
+ *  </table>
+ *
+ *  @{
+ */
+
+#ifndef __BUTTONS_MICROPENDOUS_H__
+#define __BUTTONS_MICROPENDOUS_H__
+
+       /* Includes: */
+               #include "../../../../Common/Common.h"
+
+       /* Enable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       extern "C" {
+               #endif
+
+       /* Preprocessor Checks: */
+               #if !defined(__INCLUDE_FROM_BUTTONS_H)
+                       #error Do not include this file directly. Include LUFA/Drivers/Board/Buttons.h instead.
+               #endif
+
+       /* Private Interface - For use in library only: */
+       #if !defined(__DOXYGEN__)
+               #if (BOARD == BOARD_MICROPENDOUS_32U2)
+                       #define _BOARD_BUTTON1_MASK             (1 << 7)
+                       #define _BOARD_BUTTON_PORTLETTER        D
+               #elif (BOARD == BOARD_MICROPENDOUS_A)
+                       #define _BOARD_BUTTON1_MASK             (1 << 2)
+                       #define _BOARD_BUTTON_PORTLETTER        E
+               #elif (BOARD == BOARD_MICROPENDOUS_1)
+                       #define _BOARD_BUTTON1_MASK             (1 << 7)
+                       #define _BOARD_BUTTON_PORTLETTER        D
+               #elif (BOARD == BOARD_MICROPENDOUS_2)
+                       #define _BOARD_BUTTON1_MASK             (1 << 2)
+                       #define _BOARD_BUTTON_PORTLETTER        E
+               #elif (BOARD == BOARD_MICROPENDOUS_3)
+                       #define _BOARD_BUTTON1_MASK             (1 << 2)
+                       #define _BOARD_BUTTON_PORTLETTER        E
+               #elif (BOARD == BOARD_MICROPENDOUS_4)
+                       #define _BOARD_BUTTON1_MASK             (1 << 2)
+                       #define _BOARD_BUTTON_PORTLETTER        E
+               #elif (BOARD == BOARD_MICROPENDOUS_DIP)
+                       #define _BOARD_BUTTON1_MASK             (1 << 2)
+                       #define _BOARD_BUTTON_PORTLETTER        E
+               #elif (BOARD == BOARD_MICROPENDOUS_REV1)
+                       #define _BOARD_BUTTON1_MASK             (1 << 2)
+                       #define _BOARD_BUTTON_PORTLETTER        E
+               #elif (BOARD == BOARD_MICROPENDOUS_REV2)
+                       #define _BOARD_BUTTON1_MASK             (1 << 2)
+                       #define _BOARD_BUTTON_PORTLETTER        E
+               #endif
+               
+               #define _BOARD_BUTTON_CONCAT2(Reg, Letter)  Reg ## Letter
+               #define _BOARD_BUTTON_CONCAT(Reg, Letter)   _BOARD_BUTTON_CONCAT2(Reg, Letter)
+
+               #define _BOARD_BUTTON_PORT                 _BOARD_BUTTON_CONCAT(PORT, _BOARD_BUTTON_PORTLETTER)
+               #define _BOARD_BUTTON_PIN                  _BOARD_BUTTON_CONCAT(PIN,  _BOARD_BUTTON_PORTLETTER)
+               #define _BOARD_BUTTON_DDR                  _BOARD_BUTTON_CONCAT(DDR,  _BOARD_BUTTON_PORTLETTER)
+       #endif
+
+       /* Public Interface - May be used in end-application: */
+               /* Macros: */
+                       /** Button mask for the first button on the board. */
+                       #define BUTTONS_BUTTON1                _BOARD_BUTTON1_MASK
+
+               /* Inline Functions: */
+               #if !defined(__DOXYGEN__)
+                       static inline void Buttons_Init(void)
+                       {
+                               _BOARD_BUTTON_DDR  &= ~BUTTONS_BUTTON1;
+                               _BOARD_BUTTON_PORT |=  BUTTONS_BUTTON1;
+                       }
+
+                       static inline void Buttons_Disable(void)
+                       {
+                               _BOARD_BUTTON_DDR  &= ~BUTTONS_BUTTON1;
+                               _BOARD_BUTTON_PORT &= ~BUTTONS_BUTTON1;
+                       }
+
+                       static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
+                       static inline uint8_t Buttons_GetStatus(void)
+                       {
+                               return ((_BOARD_BUTTON_PIN & BUTTONS_BUTTON1) ^ BUTTONS_BUTTON1);
+                       }
+               #endif
+
+       /* Disable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       }
+               #endif
+
+#endif
+
+/** @} */
+
 
index 60a4993..2d5bad4 100644 (file)
 
                        static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
                        {
-                               _BOARD_LED_PORT = ((PORTF & ~LEDS_ALL_LEDS) | LEDMask);
+                               _BOARD_LED_PORT = ((_BOARD_LED_PORT & ~LEDS_ALL_LEDS) | LEDMask);
                        }
 
                        static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,
                                                           const uint8_t ActiveMask)
                        {
-                               _BOARD_LED_PORT = ((PORTF & ~LEDMask) | ActiveMask);
+                               _BOARD_LED_PORT = ((_BOARD_LED_PORT & ~LEDMask) | ActiveMask);
                        }
 
                        static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
index 64f68a5..14809df 100644 (file)
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2012.\r
-\r
-  dean [at] fourwalledcubicle [dot] com\r
-           www.lufa-lib.org\r
-*/\r
-\r
-/*\r
-  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, distribute, and sell this\r
-  software and its documentation for any purpose is hereby granted\r
-  without fee, provided that the above copyright notice appear in\r
-  all copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting\r
-  documentation, and that the name of the author not be used in\r
-  advertising or publicity pertaining to distribution of the\r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-/** \file\r
- *  \brief Board specific LED driver header for the Bitwizard Multio.\r
- *  \copydetails Group_LEDs_MULTIO\r
- *\r
- *  \note This file should not be included directly. It is automatically included as needed by the LEDs driver\r
- *        dispatch header located in LUFA/Drivers/Board/LEDs.h.\r
- */\r
-\r
-/** \ingroup Group_LEDs\r
- *  \defgroup Group_LEDs_MULTIO MULTIO\r
- *  \brief Board specific LED driver header for the Bitwizard Multio.\r
- *\r
- *  Board specific LED driver header for the Bitwizard Multio (http://www.bitwizard.nl/wiki/index.php/USB-multio).\r
- *\r
- *  <table>\r
- *    <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>\r
- *    <tr><td>LEDS_LED1</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTD.0</td></tr>\r
- *    <tr><td>LEDS_LED2</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTC.2</td></tr>\r
- *    <tr><td>LEDS_LED3</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTD.7</td></tr>\r
- *  </table>\r
- *\r
- *  @{\r
- */\r
-\r
-#ifndef __LEDS_MULTIO_H__\r
-#define __LEDS_MULTIO_H__\r
-\r
-       /* Includes: */\r
-               #include "../../../../Common/Common.h"\r
-\r
-       /* Enable C linkage for C++ Compilers: */\r
-               #if defined(__cplusplus)\r
-                       extern "C" {\r
-               #endif\r
-\r
-       /* Preprocessor Checks: */\r
-               #if !defined(__INCLUDE_FROM_LEDS_H)\r
-                       #error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead.\r
-               #endif\r
-\r
-       /* Private Interface - For use in library only: */\r
-       #if !defined(__DOXYGEN__)\r
-               /* Macros: */\r
-                       #define LEDS_PORTD_LEDS       (LEDS_LED1 | LEDS_LED3)\r
-                       #define LEDS_PORTC_LEDS       LEDS_LED2\r
-       #endif\r
-\r
-       /* Public Interface - May be used in end-application: */\r
-               /* Macros: */\r
-                       /** LED mask for the first LED on the board. */\r
-                       #define LEDS_LED1        (1 << 0)\r
-\r
-                       /** LED mask for the second LED on the board. */\r
-                       #define LEDS_LED2        (1 << 2)\r
-\r
-                       /** LED mask for the second LED on the board. */\r
-                       #define LEDS_LED3        (1 << 7)\r
-\r
-                       /** LED mask for all the LEDs on the board. */\r
-                       #define LEDS_ALL_LEDS    (LEDS_LED1 | LEDS_LED2 | LEDS_LED3)\r
-\r
-                       /** LED mask for none of the board LEDs. */\r
-                       #define LEDS_NO_LEDS     0\r
-\r
-               /* Inline Functions: */\r
-               #if !defined(__DOXYGEN__)\r
-                       static inline void LEDs_Init(void)\r
-                       {\r
-                               DDRD  |=  LEDS_PORTD_LEDS;\r
-                               DDRC  |=  LEDS_PORTC_LEDS;\r
-                       \r
-                               PORTD &= ~LEDS_PORTD_LEDS;\r
-                               PORTC &= ~LEDS_PORTC_LEDS;\r
-                       }\r
-\r
-                       static inline void LEDs_Disable(void)\r
-                       {\r
-                               DDRD  |=  LEDS_PORTD_LEDS;\r
-                               DDRC  |=  LEDS_PORTC_LEDS;\r
-                       \r
-                               PORTD &= ~LEDS_PORTD_LEDS;\r
-                               PORTC &= ~LEDS_PORTC_LEDS;\r
-                       }\r
-\r
-                       static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)\r
-                       {\r
-                               PORTD |= (LEDMask & LEDS_PORTD_LEDS);\r
-                               PORTC |= (LEDMask & LEDS_PORTC_LEDS);\r
-                       }\r
-\r
-                       static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)\r
-                       {\r
-                               PORTD &= ~(LEDMask & LEDS_PORTD_LEDS);\r
-                               PORTC &= ~(LEDMask & LEDS_PORTC_LEDS);\r
-                       }\r
-\r
-                       static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)\r
-                       {\r
-                               PORTD = (PORTD & ~LEDS_PORTD_LEDS) | (LEDMask & LEDS_PORTD_LEDS);\r
-                               PORTC = (PORTC & ~LEDS_PORTC_LEDS) | (LEDMask & LEDS_PORTC_LEDS);\r
-                       }\r
-\r
-                       static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,\r
-                                                          const uint8_t ActiveMask)\r
-                       {\r
-                               PORTD = (PORTD & ~(LEDMask & LEDS_PORTD_LEDS)) | (ActiveMask & LEDS_PORTD_LEDS);\r
-                               PORTC = (PORTC & ~(LEDMask & LEDS_PORTC_LEDS)) | (ActiveMask & LEDS_PORTC_LEDS);\r
-                       }\r
-\r
-                       static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)\r
-                       {\r
-                               PIND  = (LEDMask & LEDS_PORTD_LEDS);\r
-                               PINC  = (LEDMask & LEDS_PORTC_LEDS);\r
-                       }\r
-\r
-                       static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;\r
-                       static inline uint8_t LEDs_GetLEDs(void)\r
-                       {\r
-                               return ((PORTD & LEDS_PORTD_LEDS) | (PORTC & LEDS_PORTC_LEDS));\r
-                       }\r
-               #endif\r
-\r
-       /* Disable C linkage for C++ Compilers: */\r
-               #if defined(__cplusplus)\r
-                       }\r
-               #endif\r
-\r
-#endif\r
-\r
-/** @} */\r
-\r
+/*
+             LUFA Library
+     Copyright (C) Dean Camera, 2012.
+
+  dean [at] fourwalledcubicle [dot] com
+           www.lufa-lib.org
+*/
+
+/*
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+  Permission to use, copy, modify, distribute, and sell this
+  software and its documentation for any purpose is hereby granted
+  without fee, provided that the above copyright notice appear in
+  all copies and that both that the copyright notice and this
+  permission notice and warranty disclaimer appear in supporting
+  documentation, and that the name of the author not be used in
+  advertising or publicity pertaining to distribution of the
+  software without specific, written prior permission.
+
+  The author disclaim all warranties with regard to this
+  software, including all implied warranties of merchantability
+  and fitness.  In no event shall the author be liable for any
+  special, indirect or consequential damages or any damages
+  whatsoever resulting from loss of use, data or profits, whether
+  in an action of contract, negligence or other tortious action,
+  arising out of or in connection with the use or performance of
+  this software.
+*/
+
+/** \file
+ *  \brief Board specific LED driver header for the Bitwizard Multio.
+ *  \copydetails Group_LEDs_MULTIO
+ *
+ *  \note This file should not be included directly. It is automatically included as needed by the LEDs driver
+ *        dispatch header located in LUFA/Drivers/Board/LEDs.h.
+ */
+
+/** \ingroup Group_LEDs
+ *  \defgroup Group_LEDs_MULTIO MULTIO
+ *  \brief Board specific LED driver header for the Bitwizard Multio.
+ *
+ *  Board specific LED driver header for the Bitwizard Multio (http://www.bitwizard.nl/wiki/index.php/USB-multio).
+ *
+ *  <table>
+ *    <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ *    <tr><td>LEDS_LED1</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTD.0</td></tr>
+ *    <tr><td>LEDS_LED2</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTC.2</td></tr>
+ *    <tr><td>LEDS_LED3</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTD.7</td></tr>
+ *  </table>
+ *
+ *  @{
+ */
+
+#ifndef __LEDS_MULTIO_H__
+#define __LEDS_MULTIO_H__
+
+       /* Includes: */
+               #include "../../../../Common/Common.h"
+
+       /* Enable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       extern "C" {
+               #endif
+
+       /* Preprocessor Checks: */
+               #if !defined(__INCLUDE_FROM_LEDS_H)
+                       #error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead.
+               #endif
+
+       /* Private Interface - For use in library only: */
+       #if !defined(__DOXYGEN__)
+               /* Macros: */
+                       #define LEDS_PORTD_LEDS       (LEDS_LED1 | LEDS_LED3)
+                       #define LEDS_PORTC_LEDS       LEDS_LED2
+       #endif
+
+       /* Public Interface - May be used in end-application: */
+               /* Macros: */
+                       /** LED mask for the first LED on the board. */
+                       #define LEDS_LED1        (1 << 0)
+
+                       /** LED mask for the second LED on the board. */
+                       #define LEDS_LED2        (1 << 2)
+
+                       /** LED mask for the second LED on the board. */
+                       #define LEDS_LED3        (1 << 7)
+
+                       /** LED mask for all the LEDs on the board. */
+                       #define LEDS_ALL_LEDS    (LEDS_LED1 | LEDS_LED2 | LEDS_LED3)
+
+                       /** LED mask for none of the board LEDs. */
+                       #define LEDS_NO_LEDS     0
+
+               /* Inline Functions: */
+               #if !defined(__DOXYGEN__)
+                       static inline void LEDs_Init(void)
+                       {
+                               DDRD  |=  LEDS_PORTD_LEDS;
+                               DDRC  |=  LEDS_PORTC_LEDS;
+                       
+                               PORTD &= ~LEDS_PORTD_LEDS;
+                               PORTC &= ~LEDS_PORTC_LEDS;
+                       }
+
+                       static inline void LEDs_Disable(void)
+                       {
+                               DDRD  |=  LEDS_PORTD_LEDS;
+                               DDRC  |=  LEDS_PORTC_LEDS;
+                       
+                               PORTD &= ~LEDS_PORTD_LEDS;
+                               PORTC &= ~LEDS_PORTC_LEDS;
+                       }
+
+                       static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
+                       {
+                               PORTD |= (LEDMask & LEDS_PORTD_LEDS);
+                               PORTC |= (LEDMask & LEDS_PORTC_LEDS);
+                       }
+
+                       static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
+                       {
+                               PORTD &= ~(LEDMask & LEDS_PORTD_LEDS);
+                               PORTC &= ~(LEDMask & LEDS_PORTC_LEDS);
+                       }
+
+                       static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
+                       {
+                               PORTD = (PORTD & ~LEDS_PORTD_LEDS) | (LEDMask & LEDS_PORTD_LEDS);
+                               PORTC = (PORTC & ~LEDS_PORTC_LEDS) | (LEDMask & LEDS_PORTC_LEDS);
+                       }
+
+                       static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,
+                                                          const uint8_t ActiveMask)
+                       {
+                               PORTD = (PORTD & ~(LEDMask & LEDS_PORTD_LEDS)) | (ActiveMask & LEDS_PORTD_LEDS);
+                               PORTC = (PORTC & ~(LEDMask & LEDS_PORTC_LEDS)) | (ActiveMask & LEDS_PORTC_LEDS);
+                       }
+
+                       static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
+                       {
+                               PIND  = (LEDMask & LEDS_PORTD_LEDS);
+                               PINC  = (LEDMask & LEDS_PORTC_LEDS);
+                       }
+
+                       static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
+                       static inline uint8_t LEDs_GetLEDs(void)
+                       {
+                               return ((PORTD & LEDS_PORTD_LEDS) | (PORTC & LEDS_PORTC_LEDS));
+                       }
+               #endif
+
+       /* Disable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       }
+               #endif
+
+#endif
+
+/** @} */
+
index 73d05a5..cb0eecd 100644 (file)
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2012.\r
-\r
-  dean [at] fourwalledcubicle [dot] com\r
-           www.lufa-lib.org\r
-*/\r
-\r
-/*\r
-  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, distribute, and sell this\r
-  software and its documentation for any purpose is hereby granted\r
-  without fee, provided that the above copyright notice appear in\r
-  all copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting\r
-  documentation, and that the name of the author not be used in\r
-  advertising or publicity pertaining to distribution of the\r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-/** \file\r
- *  \brief Board specific Buttons driver header for the Paranoid Studio USB2AX.\r
- *  \copydetails Group_Buttons_USB2AX\r
- *\r
- *  \note This file should not be included directly. It is automatically included as needed by the Buttons driver\r
- *        dispatch header located in LUFA/Drivers/Board/Buttons.h.\r
- */\r
-\r
-/** \ingroup Group_Buttons\r
- *  \defgroup Group_Buttons_USB2AX_V3 USB2AX_V3\r
- *  \brief Board specific Button driver header for the Paranoid Studio USB2AX revision 3.\r
- *\r
- *  See \ref Group_Buttons_USB2AX for more details.\r
- */\r
-\r
-/** \ingroup Group_Buttons\r
- *  \defgroup Group_Buttons_USB2AX USB2AX\r
- *  \brief Board specific Buttons driver header for the Paranoid Studio USB2AX.\r
- *\r
- *  \note For version 3 USB2AX boards, compile with <code>BOARD = USB2AX_V3</code>.\r
- *\r
- *  Board specific Buttons driver header for the Paranoid Studio USB2AX (http://paranoidstudio.assembla.com/wiki/show/paranoidstudio/USB2AX).\r
- *\r
- *  <table>\r
- *    <tr><th>Name</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>\r
- *    <tr><td>BUTTONS_BUTTON1</td><td>HWB Button</td><td>Low</td><td>PORTD.7</td></tr>\r
- *  </table>\r
- *\r
- *  @{\r
- */\r
-\r
-#ifndef __BUTTONS_USB2AX_H__\r
-#define __BUTTONS_USB2AX_H__\r
-\r
-       /* Includes: */\r
-               #include "../../../../Common/Common.h"\r
-\r
-       /* Enable C linkage for C++ Compilers: */\r
-               #if defined(__cplusplus)\r
-                       extern "C" {\r
-               #endif\r
-\r
-       /* Preprocessor Checks: */\r
-               #if !defined(__INCLUDE_FROM_BUTTONS_H)\r
-                       #error Do not include this file directly. Include LUFA/Drivers/Board/Buttons.h instead.\r
-               #endif\r
-\r
-       /* Public Interface - May be used in end-application: */\r
-               /* Macros: */\r
-                       /** Button mask for the first button on the board. */\r
-                       #define BUTTONS_BUTTON1      (1 << 7)\r
-\r
-               /* Inline Functions: */\r
-               #if !defined(__DOXYGEN__)\r
-                       static inline void Buttons_Init(void)\r
-                       {\r
-                               DDRD  &= ~BUTTONS_BUTTON1;\r
-                               PORTD |=  BUTTONS_BUTTON1;\r
-                       }\r
-\r
-                       static inline void Buttons_Disable(void)\r
-                       {\r
-                               DDRD  &= ~BUTTONS_BUTTON1;\r
-                               PORTD &= ~BUTTONS_BUTTON1;\r
-                       }\r
-\r
-                       static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;\r
-                       static inline uint8_t Buttons_GetStatus(void)\r
-                       {\r
-                               return ((PIND & BUTTONS_BUTTON1) ^ BUTTONS_BUTTON1);\r
-                       }\r
-               #endif\r
-\r
-       /* Disable C linkage for C++ Compilers: */\r
-               #if defined(__cplusplus)\r
-                       }\r
-               #endif\r
-\r
-#endif\r
-\r
-/** @} */\r
-\r
+/*
+             LUFA Library
+     Copyright (C) Dean Camera, 2012.
+
+  dean [at] fourwalledcubicle [dot] com
+           www.lufa-lib.org
+*/
+
+/*
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+  Permission to use, copy, modify, distribute, and sell this
+  software and its documentation for any purpose is hereby granted
+  without fee, provided that the above copyright notice appear in
+  all copies and that both that the copyright notice and this
+  permission notice and warranty disclaimer appear in supporting
+  documentation, and that the name of the author not be used in
+  advertising or publicity pertaining to distribution of the
+  software without specific, written prior permission.
+
+  The author disclaim all warranties with regard to this
+  software, including all implied warranties of merchantability
+  and fitness.  In no event shall the author be liable for any
+  special, indirect or consequential damages or any damages
+  whatsoever resulting from loss of use, data or profits, whether
+  in an action of contract, negligence or other tortious action,
+  arising out of or in connection with the use or performance of
+  this software.
+*/
+
+/** \file
+ *  \brief Board specific Buttons driver header for the Paranoid Studio USB2AX.
+ *  \copydetails Group_Buttons_USB2AX
+ *
+ *  \note This file should not be included directly. It is automatically included as needed by the Buttons driver
+ *        dispatch header located in LUFA/Drivers/Board/Buttons.h.
+ */
+
+/** \ingroup Group_Buttons
+ *  \defgroup Group_Buttons_USB2AX_V3 USB2AX_V3
+ *  \brief Board specific Button driver header for the Paranoid Studio USB2AX revision 3.
+ *
+ *  See \ref Group_Buttons_USB2AX for more details.
+ */
+
+/** \ingroup Group_Buttons
+ *  \defgroup Group_Buttons_USB2AX USB2AX
+ *  \brief Board specific Buttons driver header for the Paranoid Studio USB2AX.
+ *
+ *  \note For version 3 USB2AX boards, compile with <code>BOARD = USB2AX_V3</code>.
+ *
+ *  Board specific Buttons driver header for the Paranoid Studio USB2AX (http://paranoidstudio.assembla.com/wiki/show/paranoidstudio/USB2AX).
+ *
+ *  <table>
+ *    <tr><th>Name</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ *    <tr><td>BUTTONS_BUTTON1</td><td>HWB Button</td><td>Low</td><td>PORTD.7</td></tr>
+ *  </table>
+ *
+ *  @{
+ */
+
+#ifndef __BUTTONS_USB2AX_H__
+#define __BUTTONS_USB2AX_H__
+
+       /* Includes: */
+               #include "../../../../Common/Common.h"
+
+       /* Enable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       extern "C" {
+               #endif
+
+       /* Preprocessor Checks: */
+               #if !defined(__INCLUDE_FROM_BUTTONS_H)
+                       #error Do not include this file directly. Include LUFA/Drivers/Board/Buttons.h instead.
+               #endif
+
+       /* Public Interface - May be used in end-application: */
+               /* Macros: */
+                       /** Button mask for the first button on the board. */
+                       #define BUTTONS_BUTTON1      (1 << 7)
+
+               /* Inline Functions: */
+               #if !defined(__DOXYGEN__)
+                       static inline void Buttons_Init(void)
+                       {
+                               DDRD  &= ~BUTTONS_BUTTON1;
+                               PORTD |=  BUTTONS_BUTTON1;
+                       }
+
+                       static inline void Buttons_Disable(void)
+                       {
+                               DDRD  &= ~BUTTONS_BUTTON1;
+                               PORTD &= ~BUTTONS_BUTTON1;
+                       }
+
+                       static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
+                       static inline uint8_t Buttons_GetStatus(void)
+                       {
+                               return ((PIND & BUTTONS_BUTTON1) ^ BUTTONS_BUTTON1);
+                       }
+               #endif
+
+       /* Disable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       }
+               #endif
+
+#endif
+
+/** @} */
+
 
index 12fa73c..364c88d 100644 (file)
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2012.\r
-\r
-  dean [at] fourwalledcubicle [dot] com\r
-           www.lufa-lib.org\r
-*/\r
-\r
-/*\r
-  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, distribute, and sell this\r
-  software and its documentation for any purpose is hereby granted\r
-  without fee, provided that the above copyright notice appear in\r
-  all copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting\r
-  documentation, and that the name of the author not be used in\r
-  advertising or publicity pertaining to distribution of the\r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-/** \file\r
- *  \brief Board specific LED driver header for the Paranoid Studio USB2AX.\r
- *  \copydetails Group_LEDs_USB2AX\r
- *\r
- *  \note This file should not be included directly. It is automatically included as needed by the LEDs driver\r
- *        dispatch header located in LUFA/Drivers/Board/LEDs.h.\r
- */\r
\r
-/** \ingroup Group_LEDs\r
- *  \defgroup Group_LEDs_USB2AX_V3 USB2AX_V3\r
- *  \brief Board specific LED driver header for the Paranoid Studio USB2AX revision 3.\r
- *\r
- *  See \ref Group_LEDs_USB2AX for more details.\r
- */\r
-\r
-/** \ingroup Group_LEDs\r
- *  \defgroup Group_LEDs_USB2AX USB2AX\r
- *  \brief Board specific LED driver header for the Paranoid Studio USB2AX.\r
- *\r
- *  \note For version 3 USB2AX boards, compile with <code>BOARD = USB2AX_V3</code>.\r
- *\r
- *  Board specific LED driver header for the Paranoid Studio USB2AX (http://paranoidstudio.assembla.com/wiki/show/paranoidstudio/USB2AX).\r
- *\r
- *  <b>USB2AX</b>:\r
- *  <table>\r
- *    <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>\r
- *    <tr><td>LEDS_LED1</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTC.6</td></tr>\r
- *  </table>\r
- *\r
- *  <b>USB2AX_V3</b>:\r
- *  <table>\r
- *    <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>\r
- *    <tr><td>LEDS_LED1</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTD.1</td></tr>\r
- *  </table>\r
- *\r
- *  @{\r
- */\r
-\r
-#ifndef __LEDS_USB2AX_H__\r
-#define __LEDS_USB2AX_H__\r
-\r
-       /* Includes: */\r
-               #include "../../../../Common/Common.h"\r
-\r
-       /* Enable C linkage for C++ Compilers: */\r
-               #if defined(__cplusplus)\r
-                       extern "C" {\r
-               #endif\r
-\r
-       /* Preprocessor Checks: */\r
-               #if !defined(__INCLUDE_FROM_LEDS_H)\r
-                       #error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead.\r
-               #endif\r
-\r
-       /* Private Interface - For use in library only: */\r
-       #if !defined(__DOXYGEN__)\r
-               /* Macros: */\r
-                       #if (BOARD == BOARD_USB2AX)\r
-                               #define USB2AX_LEDS_LED1   (1 << 6)\r
-                       #else\r
-                               #define USB2AX_LEDS_LED1   (1 << 1)                     \r
-                       #endif\r
-       #endif\r
-\r
-       /* Public Interface - May be used in end-application: */\r
-               /* Macros: */\r
-                       /** LED mask for the first LED on the board. */\r
-                       #define LEDS_LED1        USB2AX_LEDS_LED1\r
-\r
-                       /** LED mask for all the LEDs on the board. */\r
-                       #define LEDS_ALL_LEDS    LEDS_LED1\r
-\r
-                       /** LED mask for none of the board LEDs. */\r
-                       #define LEDS_NO_LEDS     0\r
-\r
-               /* Inline Functions: */\r
-               #if !defined(__DOXYGEN__)\r
-                       static inline void LEDs_Init(void)\r
-                       {\r
-                               #if (BOARD == BOARD_USB2AX)\r
-                               DDRC  |=  LEDS_ALL_LEDS;\r
-                               PORTC &= ~LEDS_ALL_LEDS;                                \r
-                               #else\r
-                               DDRD  |=  LEDS_ALL_LEDS;\r
-                               PORTD &= ~LEDS_ALL_LEDS;                                \r
-                               #endif                          \r
-                       }\r
-\r
-                       static inline void LEDs_Disable(void)\r
-                       {\r
-                               #if (BOARD == BOARD_USB2AX)\r
-                               DDRC  &= ~LEDS_ALL_LEDS;\r
-                               PORTC &= ~LEDS_ALL_LEDS;                                \r
-                               #else\r
-                               DDRD  &= ~LEDS_ALL_LEDS;\r
-                               PORTD &= ~LEDS_ALL_LEDS;                                \r
-                               #endif                          \r
-                       }\r
-\r
-                       static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)\r
-                       {\r
-                               #if (BOARD == BOARD_USB2AX)\r
-                               PORTC |= LEDMask;                               \r
-                               #else\r
-                               PORTD |= LEDMask;\r
-                               #endif\r
-                       }\r
-\r
-                       static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)\r
-                       {\r
-                               #if (BOARD == BOARD_USB2AX)\r
-                               PORTC &= ~LEDMask;\r
-                               #else\r
-                               PORTD &= ~LEDMask;\r
-                               #endif\r
-                       }\r
-\r
-                       static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)\r
-                       {\r
-                               #if (BOARD == BOARD_USB2AX)\r
-                               PORTC = ((PORTC & ~LEDS_ALL_LEDS) | LEDMask);                           \r
-                               #else\r
-                               PORTD = ((PORTD & ~LEDS_ALL_LEDS) | LEDMask);\r
-                               #endif\r
-                       }\r
-\r
-                       static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,\r
-                                                          const uint8_t ActiveMask)\r
-                       {\r
-                               #if (BOARD == BOARD_USB2AX)\r
-                               PORTC = ((PORTC & ~LEDMask) | ActiveMask);                              \r
-                               #else\r
-                               PORTD = ((PORTD & ~LEDMask) | ActiveMask);\r
-                               #endif\r
-                       }\r
-\r
-                       static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)\r
-                       {\r
-                               #if (BOARD == BOARD_USB2AX)\r
-                               PINC  = LEDMask;                                \r
-                               #else\r
-                               PIND  = LEDMask;\r
-                               #endif\r
-                       }\r
-\r
-                       static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;\r
-                       static inline uint8_t LEDs_GetLEDs(void)\r
-                       {\r
-                               #if (BOARD == BOARD_USB2AX)\r
-                               return (PORTC & LEDS_ALL_LEDS);                         \r
-                               #else\r
-                               return (PORTD & LEDS_ALL_LEDS);\r
-                               #endif\r
-                       }\r
-               #endif\r
-\r
-       /* Disable C linkage for C++ Compilers: */\r
-               #if defined(__cplusplus)\r
-                       }\r
-               #endif\r
-\r
-#endif\r
-\r
-/** @} */\r
-\r
+/*
+             LUFA Library
+     Copyright (C) Dean Camera, 2012.
+
+  dean [at] fourwalledcubicle [dot] com
+           www.lufa-lib.org
+*/
+
+/*
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+  Permission to use, copy, modify, distribute, and sell this
+  software and its documentation for any purpose is hereby granted
+  without fee, provided that the above copyright notice appear in
+  all copies and that both that the copyright notice and this
+  permission notice and warranty disclaimer appear in supporting
+  documentation, and that the name of the author not be used in
+  advertising or publicity pertaining to distribution of the
+  software without specific, written prior permission.
+
+  The author disclaim all warranties with regard to this
+  software, including all implied warranties of merchantability
+  and fitness.  In no event shall the author be liable for any
+  special, indirect or consequential damages or any damages
+  whatsoever resulting from loss of use, data or profits, whether
+  in an action of contract, negligence or other tortious action,
+  arising out of or in connection with the use or performance of
+  this software.
+*/
+
+/** \file
+ *  \brief Board specific LED driver header for the Paranoid Studio USB2AX.
+ *  \copydetails Group_LEDs_USB2AX
+ *
+ *  \note This file should not be included directly. It is automatically included as needed by the LEDs driver
+ *        dispatch header located in LUFA/Drivers/Board/LEDs.h.
+ */
+/** \ingroup Group_LEDs
+ *  \defgroup Group_LEDs_USB2AX_V3 USB2AX_V3
+ *  \brief Board specific LED driver header for the Paranoid Studio USB2AX revision 3.
+ *
+ *  See \ref Group_LEDs_USB2AX for more details.
+ */
+
+/** \ingroup Group_LEDs
+ *  \defgroup Group_LEDs_USB2AX USB2AX
+ *  \brief Board specific LED driver header for the Paranoid Studio USB2AX.
+ *
+ *  \note For version 3 USB2AX boards, compile with <code>BOARD = USB2AX_V3</code>.
+ *
+ *  Board specific LED driver header for the Paranoid Studio USB2AX (http://paranoidstudio.assembla.com/wiki/show/paranoidstudio/USB2AX).
+ *
+ *  <b>USB2AX</b>:
+ *  <table>
+ *    <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ *    <tr><td>LEDS_LED1</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTC.6</td></tr>
+ *  </table>
+ *
+ *  <b>USB2AX_V3</b>:
+ *  <table>
+ *    <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ *    <tr><td>LEDS_LED1</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTD.1</td></tr>
+ *  </table>
+ *
+ *  @{
+ */
+
+#ifndef __LEDS_USB2AX_H__
+#define __LEDS_USB2AX_H__
+
+       /* Includes: */
+               #include "../../../../Common/Common.h"
+
+       /* Enable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       extern "C" {
+               #endif
+
+       /* Preprocessor Checks: */
+               #if !defined(__INCLUDE_FROM_LEDS_H)
+                       #error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead.
+               #endif
+
+       /* Private Interface - For use in library only: */
+       #if !defined(__DOXYGEN__)
+               /* Macros: */
+                       #if (BOARD == BOARD_USB2AX)
+                               #define USB2AX_LEDS_LED1   (1 << 6)
+                       #else
+                               #define USB2AX_LEDS_LED1   (1 << 1)                     
+                       #endif
+       #endif
+
+       /* Public Interface - May be used in end-application: */
+               /* Macros: */
+                       /** LED mask for the first LED on the board. */
+                       #define LEDS_LED1        USB2AX_LEDS_LED1
+
+                       /** LED mask for all the LEDs on the board. */
+                       #define LEDS_ALL_LEDS    LEDS_LED1
+
+                       /** LED mask for none of the board LEDs. */
+                       #define LEDS_NO_LEDS     0
+
+               /* Inline Functions: */
+               #if !defined(__DOXYGEN__)
+                       static inline void LEDs_Init(void)
+                       {
+                               #if (BOARD == BOARD_USB2AX)
+                               DDRC  |=  LEDS_ALL_LEDS;
+                               PORTC &= ~LEDS_ALL_LEDS;                                
+                               #else
+                               DDRD  |=  LEDS_ALL_LEDS;
+                               PORTD &= ~LEDS_ALL_LEDS;                                
+                               #endif                          
+                       }
+
+                       static inline void LEDs_Disable(void)
+                       {
+                               #if (BOARD == BOARD_USB2AX)
+                               DDRC  &= ~LEDS_ALL_LEDS;
+                               PORTC &= ~LEDS_ALL_LEDS;                                
+                               #else
+                               DDRD  &= ~LEDS_ALL_LEDS;
+                               PORTD &= ~LEDS_ALL_LEDS;                                
+                               #endif                          
+                       }
+
+                       static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
+                       {
+                               #if (BOARD == BOARD_USB2AX)
+                               PORTC |= LEDMask;                               
+                               #else
+                               PORTD |= LEDMask;
+                               #endif
+                       }
+
+                       static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
+                       {
+                               #if (BOARD == BOARD_USB2AX)
+                               PORTC &= ~LEDMask;
+                               #else
+                               PORTD &= ~LEDMask;
+                               #endif
+                       }
+
+                       static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
+                       {
+                               #if (BOARD == BOARD_USB2AX)
+                               PORTC = ((PORTC & ~LEDS_ALL_LEDS) | LEDMask);                           
+                               #else
+                               PORTD = ((PORTD & ~LEDS_ALL_LEDS) | LEDMask);
+                               #endif
+                       }
+
+                       static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,
+                                                          const uint8_t ActiveMask)
+                       {
+                               #if (BOARD == BOARD_USB2AX)
+                               PORTC = ((PORTC & ~LEDMask) | ActiveMask);                              
+                               #else
+                               PORTD = ((PORTD & ~LEDMask) | ActiveMask);
+                               #endif
+                       }
+
+                       static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
+                       {
+                               #if (BOARD == BOARD_USB2AX)
+                               PINC  = LEDMask;                                
+                               #else
+                               PIND  = LEDMask;
+                               #endif
+                       }
+
+                       static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
+                       static inline uint8_t LEDs_GetLEDs(void)
+                       {
+                               #if (BOARD == BOARD_USB2AX)
+                               return (PORTC & LEDS_ALL_LEDS);                         
+                               #else
+                               return (PORTD & LEDS_ALL_LEDS);
+                               #endif
+                       }
+               #endif
+
+       /* Disable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       }
+               #endif
+
+#endif
+
+/** @} */
+
 
index 1b70a6b..73ccb41 100644 (file)
                 */
                static inline void Buttons_Init(void);
 
-               /** Disables the buttons driver, releasing the I/O pins back to their default high-impedence input mode. */
+               /** Disables the buttons driver, releasing the I/O pins back to their default high-impedance input mode. */
                static inline void Buttons_Disable(void);
 
                /** Returns a mask indicating which board buttons are currently pressed.
index 63d28e8..2f90a9c 100644 (file)
                 */
                static inline void Joystick_Init(void);
 
-               /** Disables the joystick driver, releasing the I/O pins back to their default high-impedence input mode. */
+               /** Disables the joystick driver, releasing the I/O pins back to their default high-impedance input mode. */
                static inline void Joystick_Disable(void);
 
                /** Returns the current status of the joystick, as a mask indicating the direction the joystick is
index 97cb81a..21f89aa 100644 (file)
@@ -63,7 +63,7 @@
  *
  *  \note To make code as compatible as possible, it is assumed that all boards carry a minimum of four LEDs. If
  *        a board contains less than four LEDs, the remaining LED masks are defined to 0 so as to have no effect.
- *        If other behaviour is desired, either alias the remaining LED masks to existing LED masks via the -D
+ *        If other behavior is desired, either alias the remaining LED masks to existing LED masks via the -D
  *        switch in the project makefile, or alias them to nothing in the makefile to cause compilation errors when
  *        a non-existing LED is referenced in application code. Note that this means that it is possible to make
  *        compatible code for a board with no LEDs by making a board LED driver (see \ref Page_WritingBoardDrivers)
                 */
                static inline void LEDs_Init(void);
 
-               /** Disables the board LED driver, releasing the I/O pins back to their default high-impedence input mode. */
+               /** Disables the board LED driver, releasing the I/O pins back to their default high-impedance input mode. */
                static inline void LEDs_Disable(void);
 
                /** Turns on the LEDs specified in the given LED mask.
index 8971479..f1a9b99 100644 (file)
@@ -98,7 +98,7 @@
                        static inline uint32_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
                        static inline uint32_t Buttons_GetStatus(void)
                        {
-                               return (~(AVR32_GPIO.port[JOY_MOVE_PORT].pvr & (BUTTONS_BUTTON1 | BUTTONS_BUTTON2)));
+                               return (~(AVR32_GPIO.port[BUTTONS_PORT].pvr & (BUTTONS_BUTTON1 | BUTTONS_BUTTON2)));
                        }
                #endif
 
index c04d2ba..d85fddc 100644 (file)
                                #define ADC_INT_TEMP_SENS           ((1 << 8) | (0x07 << MUX0))
                        #endif
 
-                       /** MUX mask define for the internal 1.1V bandgap channel of the ADC. See \ref ADC_StartReading() and \ref ADC_GetChannelReading(). */
+                       /** MUX mask define for the internal 1.1V band-gap channel of the ADC. See \ref ADC_StartReading() and \ref ADC_GetChannelReading(). */
                        #define ADC_1100MV_BANDGAP              (0x1E << MUX0)
 
                        /** Retrieves the ADC MUX mask for the given ADC channel number.
index 3cede60..7b1fbfc 100644 (file)
@@ -1,76 +1,76 @@
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2012.\r
-\r
-  dean [at] fourwalledcubicle [dot] com\r
-           www.lufa-lib.org\r
-*/\r
-\r
-/*\r
-  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, distribute, and sell this\r
-  software and its documentation for any purpose is hereby granted\r
-  without fee, provided that the above copyright notice appear in\r
-  all copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting\r
-  documentation, and that the name of the author not be used in\r
-  advertising or publicity pertaining to distribution of the\r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-/** \file\r
- *  \brief Master include file for the library USB Android Open Accessory Class driver.\r
- *\r
- *  Master include file for the library USB Android Open Accessory Class driver, for both host and device modes, where available.\r
- *\r
- *  This file should be included in all user projects making use of this optional class driver, instead of\r
- *  including any headers in the USB/ClassDriver/Device, USB/ClassDriver/Host or USB/ClassDriver/Common subdirectories.\r
- */\r
-\r
-/** \ingroup Group_USBClassDrivers\r
- *  \defgroup Group_USBClassAOA Android Open Accessory Class Driver\r
- *\r
- *  \section Sec_Dependencies Module Source Dependencies\r
- *  The following files must be built with any user project that uses this module:\r
- *    - LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.c <i>(Makefile source module name: LUFA_SRC_USBCLASS)</i>\r
- *\r
- *  \section Sec_ModDescription Module Description\r
- *  Android Open Accessory Class Driver module. This module contains an internal implementation of the USB Android Open Accessory\r
- *  Class, for Host USB mode. User applications can use this class driver instead of implementing the Android Open Accessory Class\r
- *  manually via the low-level LUFA APIs.\r
- *\r
- *  This module is designed to simplify the user code by exposing only the required interface needed to interface with\r
- *  Host using the USB Android Open Accessory Class.\r
- *\r
- *  @{\r
- */\r
-\r
-#ifndef _AOA_CLASS_H_\r
-#define _AOA_CLASS_H_\r
-\r
-       /* Macros: */\r
-               #define __INCLUDE_FROM_USB_DRIVER\r
-               #define __INCLUDE_FROM_AOA_DRIVER\r
-\r
-       /* Includes: */\r
-               #include "../Core/USBMode.h"\r
-\r
-               #if defined(USB_CAN_BE_HOST)\r
-                       #include "Host/AndroidAccessoryClassHost.h"\r
-               #endif\r
-\r
-#endif\r
-\r
-/** @} */\r
-\r
+/*
+             LUFA Library
+     Copyright (C) Dean Camera, 2012.
+
+  dean [at] fourwalledcubicle [dot] com
+           www.lufa-lib.org
+*/
+
+/*
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+  Permission to use, copy, modify, distribute, and sell this
+  software and its documentation for any purpose is hereby granted
+  without fee, provided that the above copyright notice appear in
+  all copies and that both that the copyright notice and this
+  permission notice and warranty disclaimer appear in supporting
+  documentation, and that the name of the author not be used in
+  advertising or publicity pertaining to distribution of the
+  software without specific, written prior permission.
+
+  The author disclaim all warranties with regard to this
+  software, including all implied warranties of merchantability
+  and fitness.  In no event shall the author be liable for any
+  special, indirect or consequential damages or any damages
+  whatsoever resulting from loss of use, data or profits, whether
+  in an action of contract, negligence or other tortious action,
+  arising out of or in connection with the use or performance of
+  this software.
+*/
+
+/** \file
+ *  \brief Master include file for the library USB Android Open Accessory Class driver.
+ *
+ *  Master include file for the library USB Android Open Accessory Class driver, for both host and device modes, where available.
+ *
+ *  This file should be included in all user projects making use of this optional class driver, instead of
+ *  including any headers in the USB/ClassDriver/Device, USB/ClassDriver/Host or USB/ClassDriver/Common subdirectories.
+ */
+
+/** \ingroup Group_USBClassDrivers
+ *  \defgroup Group_USBClassAOA Android Open Accessory Class Driver
+ *
+ *  \section Sec_Dependencies Module Source Dependencies
+ *  The following files must be built with any user project that uses this module:
+ *    - LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.c <i>(Makefile source module name: LUFA_SRC_USBCLASS)</i>
+ *
+ *  \section Sec_ModDescription Module Description
+ *  Android Open Accessory Class Driver module. This module contains an internal implementation of the USB Android Open Accessory
+ *  Class, for Host USB mode. User applications can use this class driver instead of implementing the Android Open Accessory Class
+ *  manually via the low-level LUFA APIs.
+ *
+ *  This module is designed to simplify the user code by exposing only the required interface needed to interface with
+ *  Host using the USB Android Open Accessory Class.
+ *
+ *  @{
+ */
+
+#ifndef _AOA_CLASS_H_
+#define _AOA_CLASS_H_
+
+       /* Macros: */
+               #define __INCLUDE_FROM_USB_DRIVER
+               #define __INCLUDE_FROM_AOA_DRIVER
+
+       /* Includes: */
+               #include "../Core/USBMode.h"
+
+               #if defined(USB_CAN_BE_HOST)
+                       #include "Host/AndroidAccessoryClassHost.h"
+               #endif
+
+#endif
+
+/** @} */
+
 
index c1c0e8d..dc1289d 100644 (file)
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2012.\r
-\r
-  dean [at] fourwalledcubicle [dot] com\r
-           www.lufa-lib.org\r
-*/\r
-\r
-/*\r
-  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, distribute, and sell this\r
-  software and its documentation for any purpose is hereby granted\r
-  without fee, provided that the above copyright notice appear in\r
-  all copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting\r
-  documentation, and that the name of the author not be used in\r
-  advertising or publicity pertaining to distribution of the\r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-/** \file\r
- *  \brief Common definitions and declarations for the library USB Android Open Accessory Class driver.\r
- *\r
- *  Common definitions and declarations for the library USB Android Open Accessory Class driver.\r
- *\r
- *  \note This file should not be included directly. It is automatically included as needed by the USB module driver\r
- *        dispatch header located in LUFA/Drivers/USB.h.\r
- */\r
-\r
-/** \ingroup Group_USBClassAOA\r
- *  \defgroup Group_USBClassAOACommon  Common Class Definitions\r
- *\r
- *  \section Sec_ModDescription Module Description\r
- *  Constants, Types and Enum definitions that are common to both Device and Host modes for the USB\r
- *  Android Open Accessory Class.\r
- *\r
- *  @{\r
- */\r
-\r
-#ifndef _AOA_CLASS_COMMON_H_\r
-#define _AOA_CLASS_COMMON_H_\r
-\r
-       /* Includes: */\r
-               #include "../../Core/StdDescriptors.h"\r
-\r
-       /* Enable C linkage for C++ Compilers: */\r
-               #if defined(__cplusplus)\r
-                       extern "C" {\r
-               #endif\r
-\r
-       /* Preprocessor Checks: */\r
-               #if !defined(__INCLUDE_FROM_AOA_DRIVER)\r
-                       #error Do not include this file directly. Include LUFA/Drivers/USB.h instead.\r
-               #endif\r
-\r
-       /* Macros: */\r
-               /** Product ID value in a Device Descriptor to indicate an Android device in Open Accessory mode. */\r
-               #define ANDROID_ACCESSORY_PRODUCT_ID        0x2D00\r
-\r
-               /** Product ID value in a Device Descriptor to indicate an Android device in Open Accessory and Android Debug mode. */\r
-               #define ANDROID_ACCESSORY_ADB_PRODUCT_ID    0x2D01\r
-\r
-       /* Enums: */\r
-               /** Enum for possible Class, Subclass and Protocol values of device and interface descriptors relating to the\r
-                *  Android Open Accessory class.\r
-                */\r
-               enum AOA_Descriptor_ClassSubclassProtocol_t\r
-               {\r
-                       AOA_CSCP_AOADataClass    = 0xFF, /**< Descriptor Class value indicating that the device or interface\r
-                                                         *   belongs to the AOA data class.\r
-                                                         */\r
-                       AOA_CSCP_AOADataSubclass = 0xFF, /**< Descriptor Subclass value indicating that the device or interface\r
-                                                         *   belongs to AOA data subclass.\r
-                                                         */\r
-                       AOA_CSCP_AOADataProtocol = 0x00, /**< Descriptor Protocol value indicating that the device or interface\r
-                                                         *   belongs to the AOA data class protocol.\r
-                                                         */\r
-               };\r
-\r
-               /** Enum for the Android Open Accessory class specific control requests that can be issued by the USB bus host. */\r
-               enum AOA_ClassRequests_t\r
-               {\r
-                       AOA_REQ_GetAccessoryProtocol    = 0x33, /**< Android Open Accessory control request to retrieve the device's supported Accessory Protocol version. */\r
-                       AOA_REQ_SendString              = 0x34, /**< Android Open Accessory control request to set an accessory property string in the device. */\r
-                       AOA_REQ_StartAccessoryMode      = 0x35, /**< Android Open Accessory control request to switch the device into Accessory mode. */\r
-               };\r
-\r
-               /** Enum for the possible Android Open Accessory property string indexes. */\r
-               enum AOA_Strings_t\r
-               {\r
-                       AOA_STRING_Manufacturer         = 0, /**< Index of the Manufacturer property string. */\r
-                       AOA_STRING_Model                = 1, /**< Index of the Model Name property string. */\r
-                       AOA_STRING_Description          = 2, /**< Index of the Description property string. */\r
-                       AOA_STRING_Version              = 3, /**< Index of the Version Number property string. */\r
-                       AOA_STRING_URI                  = 4, /**< Index of the URI Information property string. */\r
-                       AOA_STRING_Serial               = 5, /**< Index of the Serial Number property string. */\r
-                       \r
-                       #if !defined(__DOXYGEN__)\r
-                       AOA_STRING_TOTAL_STRINGS\r
-                       #endif\r
-               };\r
-               \r
-               /** Enum for the possible Android Open Accessory protocol versions. */\r
-               enum AOA_Protocols_t\r
-               {\r
-                       AOA_PROTOCOL_AccessoryV1        = 0x0001, /**< Android Open Accessory version 1. */\r
-               };\r
-\r
-       /* Disable C linkage for C++ Compilers: */\r
-               #if defined(__cplusplus)\r
-                       }\r
-               #endif\r
-\r
-#endif\r
-\r
-/** @} */\r
-\r
+/*
+             LUFA Library
+     Copyright (C) Dean Camera, 2012.
+
+  dean [at] fourwalledcubicle [dot] com
+           www.lufa-lib.org
+*/
+
+/*
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+  Permission to use, copy, modify, distribute, and sell this
+  software and its documentation for any purpose is hereby granted
+  without fee, provided that the above copyright notice appear in
+  all copies and that both that the copyright notice and this
+  permission notice and warranty disclaimer appear in supporting
+  documentation, and that the name of the author not be used in
+  advertising or publicity pertaining to distribution of the
+  software without specific, written prior permission.
+
+  The author disclaim all warranties with regard to this
+  software, including all implied warranties of merchantability
+  and fitness.  In no event shall the author be liable for any
+  special, indirect or consequential damages or any damages
+  whatsoever resulting from loss of use, data or profits, whether
+  in an action of contract, negligence or other tortious action,
+  arising out of or in connection with the use or performance of
+  this software.
+*/
+
+/** \file
+ *  \brief Common definitions and declarations for the library USB Android Open Accessory Class driver.
+ *
+ *  Common definitions and declarations for the library USB Android Open Accessory Class driver.
+ *
+ *  \note This file should not be included directly. It is automatically included as needed by the USB module driver
+ *        dispatch header located in LUFA/Drivers/USB.h.
+ */
+
+/** \ingroup Group_USBClassAOA
+ *  \defgroup Group_USBClassAOACommon  Common Class Definitions
+ *
+ *  \section Sec_ModDescription Module Description
+ *  Constants, Types and Enum definitions that are common to both Device and Host modes for the USB
+ *  Android Open Accessory Class.
+ *
+ *  @{
+ */
+
+#ifndef _AOA_CLASS_COMMON_H_
+#define _AOA_CLASS_COMMON_H_
+
+       /* Includes: */
+               #include "../../Core/StdDescriptors.h"
+
+       /* Enable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       extern "C" {
+               #endif
+
+       /* Preprocessor Checks: */
+               #if !defined(__INCLUDE_FROM_AOA_DRIVER)
+                       #error Do not include this file directly. Include LUFA/Drivers/USB.h instead.
+               #endif
+
+       /* Macros: */
+               /** Product ID value in a Device Descriptor to indicate an Android device in Open Accessory mode. */
+               #define ANDROID_ACCESSORY_PRODUCT_ID        0x2D00
+
+               /** Product ID value in a Device Descriptor to indicate an Android device in Open Accessory and Android Debug mode. */
+               #define ANDROID_ACCESSORY_ADB_PRODUCT_ID    0x2D01
+
+       /* Enums: */
+               /** Enum for possible Class, Subclass and Protocol values of device and interface descriptors relating to the
+                *  Android Open Accessory class.
+                */
+               enum AOA_Descriptor_ClassSubclassProtocol_t
+               {
+                       AOA_CSCP_AOADataClass    = 0xFF, /**< Descriptor Class value indicating that the device or interface
+                                                         *   belongs to the AOA data class.
+                                                         */
+                       AOA_CSCP_AOADataSubclass = 0xFF, /**< Descriptor Subclass value indicating that the device or interface
+                                                         *   belongs to AOA data subclass.
+                                                         */
+                       AOA_CSCP_AOADataProtocol = 0x00, /**< Descriptor Protocol value indicating that the device or interface
+                                                         *   belongs to the AOA data class protocol.
+                                                         */
+               };
+
+               /** Enum for the Android Open Accessory class specific control requests that can be issued by the USB bus host. */
+               enum AOA_ClassRequests_t
+               {
+                       AOA_REQ_GetAccessoryProtocol    = 0x33, /**< Android Open Accessory control request to retrieve the device's supported Accessory Protocol version. */
+                       AOA_REQ_SendString              = 0x34, /**< Android Open Accessory control request to set an accessory property string in the device. */
+                       AOA_REQ_StartAccessoryMode      = 0x35, /**< Android Open Accessory control request to switch the device into Accessory mode. */
+               };
+
+               /** Enum for the possible Android Open Accessory property string indexes. */
+               enum AOA_Strings_t
+               {
+                       AOA_STRING_Manufacturer         = 0, /**< Index of the Manufacturer property string. */
+                       AOA_STRING_Model                = 1, /**< Index of the Model Name property string. */
+                       AOA_STRING_Description          = 2, /**< Index of the Description property string. */
+                       AOA_STRING_Version              = 3, /**< Index of the Version Number property string. */
+                       AOA_STRING_URI                  = 4, /**< Index of the URI Information property string. */
+                       AOA_STRING_Serial               = 5, /**< Index of the Serial Number property string. */
+                       
+                       #if !defined(__DOXYGEN__)
+                       AOA_STRING_TOTAL_STRINGS
+                       #endif
+               };
+               
+               /** Enum for the possible Android Open Accessory protocol versions. */
+               enum AOA_Protocols_t
+               {
+                       AOA_PROTOCOL_AccessoryV1        = 0x0001, /**< Android Open Accessory version 1. */
+               };
+
+       /* Disable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       }
+               #endif
+
+#endif
+
+/** @} */
+
 
index a8bfc78..52c5a1a 100644 (file)
                         *
                         *  When the DataLength parameter is NULL, this callback should only indicate whether the specified operation is valid for
                         *  the given endpoint index, and should return as fast as possible. When non-NULL, this value may be altered for GET operations
-                        *  to indicate the size of the retreived data.
+                        *  to indicate the size of the retrieved data.
                         *
                         *  \note The length of the retrieved data stored into the Data buffer on GET operations should not exceed the initial value
                         *        of the \c DataLength parameter.
                         *
                         *  When the DataLength parameter is NULL, this callback should only indicate whether the specified operation is valid for
                         *  the given entity and should return as fast as possible. When non-NULL, this value may be altered for GET operations
-                        *  to indicate the size of the retreived data.
+                        *  to indicate the size of the retrieved data.
                         *
                         *  \note The length of the retrieved data stored into the Data buffer on GET operations should not exceed the initial value
                         *        of the \c DataLength parameter.
index 508c234..3304775 100644 (file)
                         */
                        void CDC_Device_SendControlLineStateChange(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
 
+                       #if defined(FDEV_SETUP_STREAM) || defined(__DOXYGEN__)
                        /** Creates a standard character stream for the given CDC Device instance so that it can be used with all the regular
                         *  functions in the standard <stdio.h> library that accept a \c FILE stream as a destination (e.g. \c fprintf()). The created
                         *  stream is bidirectional and can be used for both input and output functions.
                         */
                        void CDC_Device_CreateBlockingStream(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo,
                                                             FILE* const Stream) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
-
+                       #endif
+                       
        /* Private Interface - For use in library only: */
        #if !defined(__DOXYGEN__)
                /* Function Prototypes: */
index 2703600..52aa9a1 100644 (file)
 
 
                        /** Flushes the MIDI send buffer, sending any queued MIDI events to the host. This should be called to override the
-                        *  \ref MIDI_Device_SendEventPacket() function's packing behaviour, to flush queued events.
+                        *  \ref MIDI_Device_SendEventPacket() function's packing behavior, to flush queued events.
                         *
                         *  \param[in,out] MIDIInterfaceInfo  Pointer to a structure containing a MIDI Class configuration and state.
                         *
index 7c564e0..f71fa2b 100644 (file)
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2012.\r
-\r
-  dean [at] fourwalledcubicle [dot] com\r
-           www.lufa-lib.org\r
-*/\r
-\r
-/*\r
-  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, distribute, and sell this\r
-  software and its documentation for any purpose is hereby granted\r
-  without fee, provided that the above copyright notice appear in\r
-  all copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting\r
-  documentation, and that the name of the author not be used in\r
-  advertising or publicity pertaining to distribution of the\r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-#define  __INCLUDE_FROM_USB_DRIVER\r
-#include "../../Core/USBMode.h"\r
-\r
-#if defined(USB_CAN_BE_HOST)\r
-\r
-#define  __INCLUDE_FROM_AOA_DRIVER\r
-#define  __INCLUDE_FROM_ANDROIDACCESSORY_HOST_C\r
-#include "AndroidAccessoryClassHost.h"\r
-\r
-bool AOA_Host_ValidateAccessoryDevice(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,\r
-                                      const USB_Descriptor_Device_t* const DeviceDescriptor,\r
-                                      bool* const NeedModeSwitch)\r
-{\r
-       (void)AOAInterfaceInfo;\r
-\r
-       if (DeviceDescriptor->Header.Type != DTYPE_Device)\r
-         return false;\r
-\r
-       *NeedModeSwitch = ((DeviceDescriptor->ProductID != ANDROID_ACCESSORY_PRODUCT_ID) &&\r
-                          (DeviceDescriptor->ProductID != ANDROID_ACCESSORY_ADB_PRODUCT_ID));\r
-\r
-       return true;\r
-}\r
-\r
-uint8_t AOA_Host_ConfigurePipes(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,\r
-                                uint16_t ConfigDescriptorSize,\r
-                                void* ConfigDescriptorData)\r
-{\r
-       USB_Descriptor_Endpoint_t*  DataINEndpoint  = NULL;\r
-       USB_Descriptor_Endpoint_t*  DataOUTEndpoint = NULL;\r
-       USB_Descriptor_Interface_t* AOAInterface    = NULL;\r
-\r
-       memset(&AOAInterfaceInfo->State, 0x00, sizeof(AOAInterfaceInfo->State));\r
-\r
-       if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration)\r
-         return AOA_ENUMERROR_InvalidConfigDescriptor;\r
-       \r
-       if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,\r
-                                     DCOMP_AOA_Host_NextAndroidAccessoryInterface) != DESCRIPTOR_SEARCH_COMP_Found)\r
-       {\r
-               return AOA_ENUMERROR_NoCompatibleInterfaceFound;\r
-       }\r
-       \r
-       AOAInterface = DESCRIPTOR_PCAST(ConfigDescriptorData, USB_Descriptor_Interface_t);\r
-\r
-       while (!(DataINEndpoint) || !(DataOUTEndpoint))\r
-       {\r
-               if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,\r
-                                             DCOMP_AOA_Host_NextInterfaceBulkEndpoint) != DESCRIPTOR_SEARCH_COMP_Found)\r
-               {\r
-                       return AOA_ENUMERROR_NoCompatibleInterfaceFound;\r
-               }\r
-\r
-               USB_Descriptor_Endpoint_t* EndpointData = DESCRIPTOR_PCAST(ConfigDescriptorData, USB_Descriptor_Endpoint_t);\r
-\r
-               if ((EndpointData->EndpointAddress & ENDPOINT_DIR_MASK) == ENDPOINT_DIR_IN)\r
-                 DataINEndpoint  = EndpointData;\r
-               else\r
-                 DataOUTEndpoint = EndpointData;\r
-       }\r
-\r
-       AOAInterfaceInfo->Config.DataINPipe.Size  = le16_to_cpu(DataINEndpoint->EndpointSize);\r
-       AOAInterfaceInfo->Config.DataINPipe.EndpointAddress = DataINEndpoint->EndpointAddress;\r
-       AOAInterfaceInfo->Config.DataINPipe.Type  = EP_TYPE_BULK;\r
-       \r
-       AOAInterfaceInfo->Config.DataOUTPipe.Size = le16_to_cpu(DataOUTEndpoint->EndpointSize);\r
-       AOAInterfaceInfo->Config.DataOUTPipe.EndpointAddress = DataOUTEndpoint->EndpointAddress;\r
-       AOAInterfaceInfo->Config.DataOUTPipe.Type = EP_TYPE_BULK;\r
-       \r
-       if (!(Pipe_ConfigurePipeTable(&AOAInterfaceInfo->Config.DataINPipe, 1)))\r
-         return false;\r
-       \r
-       if (!(Pipe_ConfigurePipeTable(&AOAInterfaceInfo->Config.DataOUTPipe, 1)))\r
-         return false;\r
-\r
-       AOAInterfaceInfo->State.IsActive        = true;\r
-       AOAInterfaceInfo->State.InterfaceNumber = AOAInterface->InterfaceNumber;\r
-\r
-       return AOA_ENUMERROR_NoError;\r
-}\r
-\r
-static uint8_t DCOMP_AOA_Host_NextAndroidAccessoryInterface(void* const CurrentDescriptor)\r
-{\r
-       USB_Descriptor_Header_t* Header = DESCRIPTOR_PCAST(CurrentDescriptor, USB_Descriptor_Header_t);\r
-\r
-       if (Header->Type == DTYPE_Interface)\r
-       {\r
-               USB_Descriptor_Interface_t* Interface = DESCRIPTOR_PCAST(CurrentDescriptor, USB_Descriptor_Interface_t);\r
-\r
-               if ((Interface->Class    == AOA_CSCP_AOADataClass)    &&\r
-                   (Interface->SubClass == AOA_CSCP_AOADataSubclass) &&\r
-                   (Interface->Protocol == AOA_CSCP_AOADataProtocol))\r
-               {\r
-                       return DESCRIPTOR_SEARCH_Found;\r
-               }\r
-       }\r
-\r
-       return DESCRIPTOR_SEARCH_NotFound;\r
-}\r
-\r
-static uint8_t DCOMP_AOA_Host_NextInterfaceBulkEndpoint(void* const CurrentDescriptor)\r
-{\r
-       USB_Descriptor_Header_t* Header = DESCRIPTOR_PCAST(CurrentDescriptor, USB_Descriptor_Header_t);\r
-\r
-       if (Header->Type == DTYPE_Endpoint)\r
-       {\r
-               USB_Descriptor_Endpoint_t* Endpoint = DESCRIPTOR_PCAST(CurrentDescriptor, USB_Descriptor_Endpoint_t);\r
-\r
-               uint8_t EndpointType = (Endpoint->Attributes & EP_TYPE_MASK);\r
-\r
-               if ((EndpointType == EP_TYPE_BULK) && (!(Pipe_IsEndpointBound(Endpoint->EndpointAddress))))\r
-                 return DESCRIPTOR_SEARCH_Found;\r
-       }\r
-       else if (Header->Type == DTYPE_Interface)\r
-       {\r
-               return DESCRIPTOR_SEARCH_Fail;\r
-       }\r
-\r
-       return DESCRIPTOR_SEARCH_NotFound;\r
-}\r
-\r
-void AOA_Host_USBTask(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo)\r
-{\r
-       if ((USB_HostState != HOST_STATE_Configured) || !(AOAInterfaceInfo->State.IsActive))\r
-         return;\r
-\r
-       #if !defined(NO_CLASS_DRIVER_AUTOFLUSH)\r
-       AOA_Host_Flush(AOAInterfaceInfo);\r
-       #endif\r
-}\r
-\r
-uint8_t AOA_Host_StartAccessoryMode(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo)\r
-{\r
-       uint8_t ErrorCode;\r
-       \r
-       uint16_t AccessoryProtocol;\r
-       if ((ErrorCode = AOA_Host_GetAccessoryProtocol(&AccessoryProtocol)) != HOST_WAITERROR_Successful)\r
-         return ErrorCode;\r
-\r
-       if (AccessoryProtocol != CPU_TO_LE16(AOA_PROTOCOL_AccessoryV1))\r
-         return AOA_ERROR_LOGICAL_CMD_FAILED;\r
-\r
-       for (uint8_t PropertyIndex = 0; PropertyIndex < AOA_STRING_TOTAL_STRINGS; PropertyIndex++)\r
-       {\r
-               if ((ErrorCode = AOA_Host_SendPropertyString(AOAInterfaceInfo, PropertyIndex)) != HOST_WAITERROR_Successful)\r
-                 return ErrorCode;\r
-       }\r
-\r
-       USB_ControlRequest = (USB_Request_Header_t)\r
-       {\r
-               .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_VENDOR | REQREC_DEVICE),\r
-               .bRequest      = AOA_REQ_StartAccessoryMode,\r
-               .wValue        = 0,\r
-               .wIndex        = 0,\r
-               .wLength       = 0,\r
-       };\r
-\r
-       Pipe_SelectPipe(PIPE_CONTROLPIPE);\r
-       return USB_Host_SendControlRequest(NULL);       \r
-}\r
-\r
-static uint8_t AOA_Host_GetAccessoryProtocol(uint16_t* const Protocol)\r
-{\r
-       USB_ControlRequest = (USB_Request_Header_t)\r
-       {\r
-               .bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_VENDOR | REQREC_DEVICE),\r
-               .bRequest      = AOA_REQ_GetAccessoryProtocol,\r
-               .wValue        = 0,\r
-               .wIndex        = 0,\r
-               .wLength       = sizeof(uint16_t),\r
-       };\r
-\r
-       Pipe_SelectPipe(PIPE_CONTROLPIPE);\r
-       return USB_Host_SendControlRequest(Protocol);\r
-}\r
-\r
-static uint8_t AOA_Host_SendPropertyString(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,\r
-                                           const uint8_t StringIndex)\r
-{      \r
-       const char* String = AOAInterfaceInfo->Config.PropertyStrings[StringIndex];\r
-       \r
-       if (String == NULL)\r
-         String = "";\r
-\r
-       USB_ControlRequest = (USB_Request_Header_t)\r
-       {\r
-               .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_VENDOR | REQREC_DEVICE),\r
-               .bRequest      = AOA_REQ_SendString,\r
-               .wValue        = 0,\r
-               .wIndex        = StringIndex,\r
-               .wLength       = (strlen(String) + 1),\r
-       };\r
-\r
-       Pipe_SelectPipe(PIPE_CONTROLPIPE);\r
-       return USB_Host_SendControlRequest((char*)String);\r
-}\r
-\r
-uint8_t AOA_Host_SendData(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,\r
-                          const uint8_t* const Buffer,\r
-                          const uint16_t Length)\r
-{\r
-       if ((USB_HostState != HOST_STATE_Configured) || !(AOAInterfaceInfo->State.IsActive))\r
-         return PIPE_READYWAIT_DeviceDisconnected;\r
-\r
-       uint8_t ErrorCode;\r
-\r
-       Pipe_SelectPipe(AOAInterfaceInfo->Config.DataOUTPipe.Address);\r
-\r
-       Pipe_Unfreeze();\r
-       ErrorCode = Pipe_Write_Stream_LE(Buffer, Length, NULL);\r
-       Pipe_Freeze();\r
-\r
-       return ErrorCode;\r
-}\r
-\r
-uint8_t AOA_Host_SendString(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,\r
-                            const char* const String)\r
-{\r
-       if ((USB_HostState != HOST_STATE_Configured) || !(AOAInterfaceInfo->State.IsActive))\r
-         return PIPE_READYWAIT_DeviceDisconnected;\r
-\r
-       uint8_t ErrorCode;\r
-\r
-       Pipe_SelectPipe(AOAInterfaceInfo->Config.DataOUTPipe.Address);\r
-\r
-       Pipe_Unfreeze();\r
-       ErrorCode = Pipe_Write_Stream_LE(String, strlen(String), NULL);\r
-       Pipe_Freeze();\r
-\r
-       return ErrorCode;\r
-}\r
-\r
-uint8_t AOA_Host_SendByte(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,\r
-                          const uint8_t Data)\r
-{\r
-       if ((USB_HostState != HOST_STATE_Configured) || !(AOAInterfaceInfo->State.IsActive))\r
-         return PIPE_READYWAIT_DeviceDisconnected;\r
-\r
-       uint8_t ErrorCode;\r
-\r
-       Pipe_SelectPipe(AOAInterfaceInfo->Config.DataOUTPipe.Address);\r
-       Pipe_Unfreeze();\r
-\r
-       if (!(Pipe_IsReadWriteAllowed()))\r
-       {\r
-               Pipe_ClearOUT();\r
-\r
-               if ((ErrorCode = Pipe_WaitUntilReady()) != PIPE_READYWAIT_NoError)\r
-                 return ErrorCode;\r
-       }\r
-\r
-       Pipe_Write_8(Data);\r
-       Pipe_Freeze();\r
-\r
-       return PIPE_READYWAIT_NoError;\r
-}\r
-\r
-uint16_t AOA_Host_BytesReceived(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo)\r
-{\r
-       if ((USB_HostState != HOST_STATE_Configured) || !(AOAInterfaceInfo->State.IsActive))\r
-         return 0;\r
-\r
-       Pipe_SelectPipe(AOAInterfaceInfo->Config.DataINPipe.Address);\r
-       Pipe_Unfreeze();\r
-\r
-       if (Pipe_IsINReceived())\r
-       {\r
-               if (!(Pipe_BytesInPipe()))\r
-               {\r
-                       Pipe_ClearIN();\r
-                       Pipe_Freeze();\r
-                       return 0;\r
-               }\r
-               else\r
-               {\r
-                       Pipe_Freeze();\r
-                       return Pipe_BytesInPipe();\r
-               }\r
-       }\r
-       else\r
-       {\r
-               Pipe_Freeze();\r
-\r
-               return 0;\r
-       }\r
-}\r
-\r
-int16_t AOA_Host_ReceiveByte(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo)\r
-{\r
-       if ((USB_HostState != HOST_STATE_Configured) || !(AOAInterfaceInfo->State.IsActive))\r
-         return -1;\r
-\r
-       int16_t ReceivedByte = -1;\r
-\r
-       Pipe_SelectPipe(AOAInterfaceInfo->Config.DataINPipe.Address);\r
-       Pipe_Unfreeze();\r
-\r
-       if (Pipe_IsINReceived())\r
-       {\r
-               if (Pipe_BytesInPipe())\r
-                 ReceivedByte = Pipe_Read_8();\r
-\r
-               if (!(Pipe_BytesInPipe()))\r
-                 Pipe_ClearIN();\r
-       }\r
-\r
-       Pipe_Freeze();\r
-\r
-       return ReceivedByte;\r
-}\r
-\r
-uint8_t AOA_Host_Flush(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo)\r
-{\r
-       if ((USB_HostState != HOST_STATE_Configured) || !(AOAInterfaceInfo->State.IsActive))\r
-         return PIPE_READYWAIT_DeviceDisconnected;\r
-\r
-       uint8_t ErrorCode;\r
-\r
-       Pipe_SelectPipe(AOAInterfaceInfo->Config.DataOUTPipe.Address);\r
-       Pipe_Unfreeze();\r
-\r
-       if (!(Pipe_BytesInPipe()))\r
-         return PIPE_READYWAIT_NoError;\r
-\r
-       bool BankFull = !(Pipe_IsReadWriteAllowed());\r
-\r
-       Pipe_ClearOUT();\r
-\r
-       if (BankFull)\r
-       {\r
-               if ((ErrorCode = Pipe_WaitUntilReady()) != PIPE_READYWAIT_NoError)\r
-                 return ErrorCode;\r
-\r
-               Pipe_ClearOUT();\r
-       }\r
-\r
-       Pipe_Freeze();\r
-\r
-       return PIPE_READYWAIT_NoError;\r
-}\r
-\r
-#if defined(FDEV_SETUP_STREAM)\r
-void AOA_Host_CreateStream(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,\r
-                           FILE* const Stream)\r
-{\r
-       *Stream = (FILE)FDEV_SETUP_STREAM(AOA_Host_putchar, AOA_Host_getchar, _FDEV_SETUP_RW);\r
-       fdev_set_udata(Stream, AOAInterfaceInfo);\r
-}\r
-\r
-void AOA_Host_CreateBlockingStream(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,\r
-                                   FILE* const Stream)\r
-{\r
-       *Stream = (FILE)FDEV_SETUP_STREAM(AOA_Host_putchar, AOA_Host_getchar_Blocking, _FDEV_SETUP_RW);\r
-       fdev_set_udata(Stream, AOAInterfaceInfo);\r
-}\r
-\r
-static int AOA_Host_putchar(char c,\r
-                            FILE* Stream)\r
-{\r
-       return AOA_Host_SendByte((USB_ClassInfo_AOA_Host_t*)fdev_get_udata(Stream), c) ? _FDEV_ERR : 0;\r
-}\r
-\r
-static int AOA_Host_getchar(FILE* Stream)\r
-{\r
-       int16_t ReceivedByte = AOA_Host_ReceiveByte((USB_ClassInfo_AOA_Host_t*)fdev_get_udata(Stream));\r
-\r
-       if (ReceivedByte < 0)\r
-         return _FDEV_EOF;\r
-\r
-       return ReceivedByte;\r
-}\r
-\r
-static int AOA_Host_getchar_Blocking(FILE* Stream)\r
-{\r
-       int16_t ReceivedByte;\r
-\r
-       while ((ReceivedByte = AOA_Host_ReceiveByte((USB_ClassInfo_AOA_Host_t*)fdev_get_udata(Stream))) < 0)\r
-       {\r
-               if (USB_HostState == HOST_STATE_Unattached)\r
-                 return _FDEV_EOF;\r
-\r
-               AOA_Host_USBTask((USB_ClassInfo_AOA_Host_t*)fdev_get_udata(Stream));\r
-               USB_USBTask();\r
-       }\r
-\r
-       return ReceivedByte;\r
-}\r
-#endif\r
-\r
-#endif\r
-\r
+/*
+             LUFA Library
+     Copyright (C) Dean Camera, 2012.
+
+  dean [at] fourwalledcubicle [dot] com
+           www.lufa-lib.org
+*/
+
+/*
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+  Permission to use, copy, modify, distribute, and sell this
+  software and its documentation for any purpose is hereby granted
+  without fee, provided that the above copyright notice appear in
+  all copies and that both that the copyright notice and this
+  permission notice and warranty disclaimer appear in supporting
+  documentation, and that the name of the author not be used in
+  advertising or publicity pertaining to distribution of the
+  software without specific, written prior permission.
+
+  The author disclaim all warranties with regard to this
+  software, including all implied warranties of merchantability
+  and fitness.  In no event shall the author be liable for any
+  special, indirect or consequential damages or any damages
+  whatsoever resulting from loss of use, data or profits, whether
+  in an action of contract, negligence or other tortious action,
+  arising out of or in connection with the use or performance of
+  this software.
+*/
+
+#define  __INCLUDE_FROM_USB_DRIVER
+#include "../../Core/USBMode.h"
+
+#if defined(USB_CAN_BE_HOST)
+
+#define  __INCLUDE_FROM_AOA_DRIVER
+#define  __INCLUDE_FROM_ANDROIDACCESSORY_HOST_C
+#include "AndroidAccessoryClassHost.h"
+
+bool AOA_Host_ValidateAccessoryDevice(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,
+                                      const USB_Descriptor_Device_t* const DeviceDescriptor,
+                                      bool* const NeedModeSwitch)
+{
+       (void)AOAInterfaceInfo;
+
+       if (DeviceDescriptor->Header.Type != DTYPE_Device)
+         return false;
+
+       *NeedModeSwitch = ((DeviceDescriptor->ProductID != ANDROID_ACCESSORY_PRODUCT_ID) &&
+                          (DeviceDescriptor->ProductID != ANDROID_ACCESSORY_ADB_PRODUCT_ID));
+
+       return true;
+}
+
+uint8_t AOA_Host_ConfigurePipes(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,
+                                uint16_t ConfigDescriptorSize,
+                                void* ConfigDescriptorData)
+{
+       USB_Descriptor_Endpoint_t*  DataINEndpoint  = NULL;
+       USB_Descriptor_Endpoint_t*  DataOUTEndpoint = NULL;
+       USB_Descriptor_Interface_t* AOAInterface    = NULL;
+
+       memset(&AOAInterfaceInfo->State, 0x00, sizeof(AOAInterfaceInfo->State));
+
+       if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration)
+         return AOA_ENUMERROR_InvalidConfigDescriptor;
+       
+       if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,
+                                     DCOMP_AOA_Host_NextAndroidAccessoryInterface) != DESCRIPTOR_SEARCH_COMP_Found)
+       {
+               return AOA_ENUMERROR_NoCompatibleInterfaceFound;
+       }
+       
+       AOAInterface = DESCRIPTOR_PCAST(ConfigDescriptorData, USB_Descriptor_Interface_t);
+
+       while (!(DataINEndpoint) || !(DataOUTEndpoint))
+       {
+               if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,
+                                             DCOMP_AOA_Host_NextInterfaceBulkEndpoint) != DESCRIPTOR_SEARCH_COMP_Found)
+               {
+                       return AOA_ENUMERROR_NoCompatibleInterfaceFound;
+               }
+
+               USB_Descriptor_Endpoint_t* EndpointData = DESCRIPTOR_PCAST(ConfigDescriptorData, USB_Descriptor_Endpoint_t);
+
+               if ((EndpointData->EndpointAddress & ENDPOINT_DIR_MASK) == ENDPOINT_DIR_IN)
+                 DataINEndpoint  = EndpointData;
+               else
+                 DataOUTEndpoint = EndpointData;
+       }
+
+       AOAInterfaceInfo->Config.DataINPipe.Size  = le16_to_cpu(DataINEndpoint->EndpointSize);
+       AOAInterfaceInfo->Config.DataINPipe.EndpointAddress = DataINEndpoint->EndpointAddress;
+       AOAInterfaceInfo->Config.DataINPipe.Type  = EP_TYPE_BULK;
+       
+       AOAInterfaceInfo->Config.DataOUTPipe.Size = le16_to_cpu(DataOUTEndpoint->EndpointSize);
+       AOAInterfaceInfo->Config.DataOUTPipe.EndpointAddress = DataOUTEndpoint->EndpointAddress;
+       AOAInterfaceInfo->Config.DataOUTPipe.Type = EP_TYPE_BULK;
+       
+       if (!(Pipe_ConfigurePipeTable(&AOAInterfaceInfo->Config.DataINPipe, 1)))
+         return false;
+       
+       if (!(Pipe_ConfigurePipeTable(&AOAInterfaceInfo->Config.DataOUTPipe, 1)))
+         return false;
+
+       AOAInterfaceInfo->State.IsActive        = true;
+       AOAInterfaceInfo->State.InterfaceNumber = AOAInterface->InterfaceNumber;
+
+       return AOA_ENUMERROR_NoError;
+}
+
+static uint8_t DCOMP_AOA_Host_NextAndroidAccessoryInterface(void* const CurrentDescriptor)
+{
+       USB_Descriptor_Header_t* Header = DESCRIPTOR_PCAST(CurrentDescriptor, USB_Descriptor_Header_t);
+
+       if (Header->Type == DTYPE_Interface)
+       {
+               USB_Descriptor_Interface_t* Interface = DESCRIPTOR_PCAST(CurrentDescriptor, USB_Descriptor_Interface_t);
+
+               if ((Interface->Class    == AOA_CSCP_AOADataClass)    &&
+                   (Interface->SubClass == AOA_CSCP_AOADataSubclass) &&
+                   (Interface->Protocol == AOA_CSCP_AOADataProtocol))
+               {
+                       return DESCRIPTOR_SEARCH_Found;
+               }
+       }
+
+       return DESCRIPTOR_SEARCH_NotFound;
+}
+
+static uint8_t DCOMP_AOA_Host_NextInterfaceBulkEndpoint(void* const CurrentDescriptor)
+{
+       USB_Descriptor_Header_t* Header = DESCRIPTOR_PCAST(CurrentDescriptor, USB_Descriptor_Header_t);
+
+       if (Header->Type == DTYPE_Endpoint)
+       {
+               USB_Descriptor_Endpoint_t* Endpoint = DESCRIPTOR_PCAST(CurrentDescriptor, USB_Descriptor_Endpoint_t);
+
+               uint8_t EndpointType = (Endpoint->Attributes & EP_TYPE_MASK);
+
+               if ((EndpointType == EP_TYPE_BULK) && (!(Pipe_IsEndpointBound(Endpoint->EndpointAddress))))
+                 return DESCRIPTOR_SEARCH_Found;
+       }
+       else if (Header->Type == DTYPE_Interface)
+       {
+               return DESCRIPTOR_SEARCH_Fail;
+       }
+
+       return DESCRIPTOR_SEARCH_NotFound;
+}
+
+void AOA_Host_USBTask(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo)
+{
+       if ((USB_HostState != HOST_STATE_Configured) || !(AOAInterfaceInfo->State.IsActive))
+         return;
+
+       #if !defined(NO_CLASS_DRIVER_AUTOFLUSH)
+       AOA_Host_Flush(AOAInterfaceInfo);
+       #endif
+}
+
+uint8_t AOA_Host_StartAccessoryMode(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo)
+{
+       uint8_t ErrorCode;
+       
+       uint16_t AccessoryProtocol;
+       if ((ErrorCode = AOA_Host_GetAccessoryProtocol(&AccessoryProtocol)) != HOST_WAITERROR_Successful)
+         return ErrorCode;
+
+       if (AccessoryProtocol != CPU_TO_LE16(AOA_PROTOCOL_AccessoryV1))
+         return AOA_ERROR_LOGICAL_CMD_FAILED;
+
+       for (uint8_t PropertyIndex = 0; PropertyIndex < AOA_STRING_TOTAL_STRINGS; PropertyIndex++)
+       {
+               if ((ErrorCode = AOA_Host_SendPropertyString(AOAInterfaceInfo, PropertyIndex)) != HOST_WAITERROR_Successful)
+                 return ErrorCode;
+       }
+
+       USB_ControlRequest = (USB_Request_Header_t)
+       {
+               .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_VENDOR | REQREC_DEVICE),
+               .bRequest      = AOA_REQ_StartAccessoryMode,
+               .wValue        = 0,
+               .wIndex        = 0,
+               .wLength       = 0,
+       };
+
+       Pipe_SelectPipe(PIPE_CONTROLPIPE);
+       return USB_Host_SendControlRequest(NULL);       
+}
+
+static uint8_t AOA_Host_GetAccessoryProtocol(uint16_t* const Protocol)
+{
+       USB_ControlRequest = (USB_Request_Header_t)
+       {
+               .bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_VENDOR | REQREC_DEVICE),
+               .bRequest      = AOA_REQ_GetAccessoryProtocol,
+               .wValue        = 0,
+               .wIndex        = 0,
+               .wLength       = sizeof(uint16_t),
+       };
+
+       Pipe_SelectPipe(PIPE_CONTROLPIPE);
+       return USB_Host_SendControlRequest(Protocol);
+}
+
+static uint8_t AOA_Host_SendPropertyString(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,
+                                           const uint8_t StringIndex)
+{      
+       const char* String = AOAInterfaceInfo->Config.PropertyStrings[StringIndex];
+       
+       if (String == NULL)
+         String = "";
+
+       USB_ControlRequest = (USB_Request_Header_t)
+       {
+               .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_VENDOR | REQREC_DEVICE),
+               .bRequest      = AOA_REQ_SendString,
+               .wValue        = 0,
+               .wIndex        = StringIndex,
+               .wLength       = (strlen(String) + 1),
+       };
+
+       Pipe_SelectPipe(PIPE_CONTROLPIPE);
+       return USB_Host_SendControlRequest((char*)String);
+}
+
+uint8_t AOA_Host_SendData(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,
+                          const uint8_t* const Buffer,
+                          const uint16_t Length)
+{
+       if ((USB_HostState != HOST_STATE_Configured) || !(AOAInterfaceInfo->State.IsActive))
+         return PIPE_READYWAIT_DeviceDisconnected;
+
+       uint8_t ErrorCode;
+
+       Pipe_SelectPipe(AOAInterfaceInfo->Config.DataOUTPipe.Address);
+
+       Pipe_Unfreeze();
+       ErrorCode = Pipe_Write_Stream_LE(Buffer, Length, NULL);
+       Pipe_Freeze();
+
+       return ErrorCode;
+}
+
+uint8_t AOA_Host_SendString(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,
+                            const char* const String)
+{
+       if ((USB_HostState != HOST_STATE_Configured) || !(AOAInterfaceInfo->State.IsActive))
+         return PIPE_READYWAIT_DeviceDisconnected;
+
+       uint8_t ErrorCode;
+
+       Pipe_SelectPipe(AOAInterfaceInfo->Config.DataOUTPipe.Address);
+
+       Pipe_Unfreeze();
+       ErrorCode = Pipe_Write_Stream_LE(String, strlen(String), NULL);
+       Pipe_Freeze();
+
+       return ErrorCode;
+}
+
+uint8_t AOA_Host_SendByte(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,
+                          const uint8_t Data)
+{
+       if ((USB_HostState != HOST_STATE_Configured) || !(AOAInterfaceInfo->State.IsActive))
+         return PIPE_READYWAIT_DeviceDisconnected;
+
+       uint8_t ErrorCode;
+
+       Pipe_SelectPipe(AOAInterfaceInfo->Config.DataOUTPipe.Address);
+       Pipe_Unfreeze();
+
+       if (!(Pipe_IsReadWriteAllowed()))
+       {
+               Pipe_ClearOUT();
+
+               if ((ErrorCode = Pipe_WaitUntilReady()) != PIPE_READYWAIT_NoError)
+                 return ErrorCode;
+       }
+
+       Pipe_Write_8(Data);
+       Pipe_Freeze();
+
+       return PIPE_READYWAIT_NoError;
+}
+
+uint16_t AOA_Host_BytesReceived(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo)
+{
+       if ((USB_HostState != HOST_STATE_Configured) || !(AOAInterfaceInfo->State.IsActive))
+         return 0;
+
+       Pipe_SelectPipe(AOAInterfaceInfo->Config.DataINPipe.Address);
+       Pipe_Unfreeze();
+
+       if (Pipe_IsINReceived())
+       {
+               if (!(Pipe_BytesInPipe()))
+               {
+                       Pipe_ClearIN();
+                       Pipe_Freeze();
+                       return 0;
+               }
+               else
+               {
+                       Pipe_Freeze();
+                       return Pipe_BytesInPipe();
+               }
+       }
+       else
+       {
+               Pipe_Freeze();
+
+               return 0;
+       }
+}
+
+int16_t AOA_Host_ReceiveByte(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo)
+{
+       if ((USB_HostState != HOST_STATE_Configured) || !(AOAInterfaceInfo->State.IsActive))
+         return -1;
+
+       int16_t ReceivedByte = -1;
+
+       Pipe_SelectPipe(AOAInterfaceInfo->Config.DataINPipe.Address);
+       Pipe_Unfreeze();
+
+       if (Pipe_IsINReceived())
+       {
+               if (Pipe_BytesInPipe())
+                 ReceivedByte = Pipe_Read_8();
+
+               if (!(Pipe_BytesInPipe()))
+                 Pipe_ClearIN();
+       }
+
+       Pipe_Freeze();
+
+       return ReceivedByte;
+}
+
+uint8_t AOA_Host_Flush(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo)
+{
+       if ((USB_HostState != HOST_STATE_Configured) || !(AOAInterfaceInfo->State.IsActive))
+         return PIPE_READYWAIT_DeviceDisconnected;
+
+       uint8_t ErrorCode;
+
+       Pipe_SelectPipe(AOAInterfaceInfo->Config.DataOUTPipe.Address);
+       Pipe_Unfreeze();
+
+       if (!(Pipe_BytesInPipe()))
+         return PIPE_READYWAIT_NoError;
+
+       bool BankFull = !(Pipe_IsReadWriteAllowed());
+
+       Pipe_ClearOUT();
+
+       if (BankFull)
+       {
+               if ((ErrorCode = Pipe_WaitUntilReady()) != PIPE_READYWAIT_NoError)
+                 return ErrorCode;
+
+               Pipe_ClearOUT();
+       }
+
+       Pipe_Freeze();
+
+       return PIPE_READYWAIT_NoError;
+}
+
+#if defined(FDEV_SETUP_STREAM)
+void AOA_Host_CreateStream(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,
+                           FILE* const Stream)
+{
+       *Stream = (FILE)FDEV_SETUP_STREAM(AOA_Host_putchar, AOA_Host_getchar, _FDEV_SETUP_RW);
+       fdev_set_udata(Stream, AOAInterfaceInfo);
+}
+
+void AOA_Host_CreateBlockingStream(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,
+                                   FILE* const Stream)
+{
+       *Stream = (FILE)FDEV_SETUP_STREAM(AOA_Host_putchar, AOA_Host_getchar_Blocking, _FDEV_SETUP_RW);
+       fdev_set_udata(Stream, AOAInterfaceInfo);
+}
+
+static int AOA_Host_putchar(char c,
+                            FILE* Stream)
+{
+       return AOA_Host_SendByte((USB_ClassInfo_AOA_Host_t*)fdev_get_udata(Stream), c) ? _FDEV_ERR : 0;
+}
+
+static int AOA_Host_getchar(FILE* Stream)
+{
+       int16_t ReceivedByte = AOA_Host_ReceiveByte((USB_ClassInfo_AOA_Host_t*)fdev_get_udata(Stream));
+
+       if (ReceivedByte < 0)
+         return _FDEV_EOF;
+
+       return ReceivedByte;
+}
+
+static int AOA_Host_getchar_Blocking(FILE* Stream)
+{
+       int16_t ReceivedByte;
+
+       while ((ReceivedByte = AOA_Host_ReceiveByte((USB_ClassInfo_AOA_Host_t*)fdev_get_udata(Stream))) < 0)
+       {
+               if (USB_HostState == HOST_STATE_Unattached)
+                 return _FDEV_EOF;
+
+               AOA_Host_USBTask((USB_ClassInfo_AOA_Host_t*)fdev_get_udata(Stream));
+               USB_USBTask();
+       }
+
+       return ReceivedByte;
+}
+#endif
+
+#endif
+
 
index 678feda..c437a4b 100644 (file)
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2012.\r
-\r
-  dean [at] fourwalledcubicle [dot] com\r
-           www.lufa-lib.org\r
-*/\r
-\r
-/*\r
-  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, distribute, and sell this\r
-  software and its documentation for any purpose is hereby granted\r
-  without fee, provided that the above copyright notice appear in\r
-  all copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting\r
-  documentation, and that the name of the author not be used in\r
-  advertising or publicity pertaining to distribution of the\r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-/** \file\r
- *  \brief Host mode driver for the library USB Android Open Accessory Class driver.\r
- *\r
- *  Host mode driver for the library USB Android Open Accessory Class driver.\r
- *\r
- *  \note This file should not be included directly. It is automatically included as needed by the USB module driver\r
- *        dispatch header located in LUFA/Drivers/USB.h.\r
- */\r
-\r
-/** \ingroup Group_USBClassAOA\r
- *  \defgroup Group_USBClassAndroidAccessoryHost Android Open Accessory Class Host Mode Driver\r
- *\r
- *  \section Sec_Dependencies Module Source Dependencies\r
- *  The following files must be built with any user project that uses this module:\r
- *    - LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.c <i>(Makefile source module name: LUFA_SRC_USBCLASS)</i>\r
- *\r
- *  \section Sec_ModDescription Module Description\r
- *  Host Mode USB Class driver framework interface, for the Android Open Accessory USB Class driver.\r
- *\r
- *  @{\r
- */\r
-\r
-#ifndef __AOA_CLASS_HOST_H__\r
-#define __AOA_CLASS_HOST_H__\r
-\r
-       /* Includes: */\r
-               #include "../../USB.h"\r
-               #include "../Common/AndroidAccessoryClassCommon.h"\r
-\r
-               #include <stdio.h>\r
-\r
-       /* Enable C linkage for C++ Compilers: */\r
-               #if defined(__cplusplus)\r
-                       extern "C" {\r
-               #endif\r
-\r
-       /* Preprocessor Checks: */\r
-               #if !defined(__INCLUDE_FROM_AOA_DRIVER)\r
-                       #error Do not include this file directly. Include LUFA/Drivers/USB.h instead.\r
-               #endif\r
-\r
-       /* Public Interface - May be used in end-application: */\r
-               /* Macros: */\r
-                       /** Error code for some Android Open Accessory Host functions, indicating a logical (and not hardware) error. */\r
-                       #define AOA_ERROR_LOGICAL_CMD_FAILED              0x80\r
-\r
-               /* Type Defines: */\r
-                       /** \brief Android Open Accessory Class Host Mode Configuration and State Structure.\r
-                        *\r
-                        *  Class state structure. An instance of this structure should be made within the user application,\r
-                        *  and passed to each of the Android Open Accessory class driver functions as the \c AOAInterfaceInfo\r
-                        *  parameter. This stores each Android Open Accessory interface's configuration and state information.\r
-                        */\r
-                       typedef struct\r
-                       {\r
-                               struct\r
-                               {\r
-                                       USB_Pipe_Table_t DataINPipe; /**< Data IN Pipe configuration table. */\r
-                                       USB_Pipe_Table_t DataOUTPipe; /**< Data OUT Pipe configuration table. */\r
-                                       \r
-                                       char*    PropertyStrings[AOA_STRING_TOTAL_STRINGS]; /**< Android Accessory property strings, sent to identify the accessory when the\r
-                                                                                            *   Android device is switched into Open Accessory mode. */\r
-                               } Config; /**< Config data for the USB class interface within the device. All elements in this section\r
-                                          *   <b>must</b> be set or the interface will fail to enumerate and operate correctly.\r
-                                          */\r
-                               struct\r
-                               {\r
-                                       bool IsActive; /**< Indicates if the current interface instance is connected to an attached device, valid\r
-                                                       *   after \ref AOA_Host_ConfigurePipes() is called and the Host state machine is in the\r
-                                                       *   Configured state.\r
-                                                       */\r
-                                       uint8_t  InterfaceNumber; /**< Interface index of the AOA interface within the attached device. */\r
-                               } State; /**< State data for the USB class interface within the device. All elements in this section\r
-                                                 *   <b>may</b> be set to initial values, but may also be ignored to default to sane values when\r
-                                                 *   the interface is enumerated.\r
-                                                 */\r
-                       } USB_ClassInfo_AOA_Host_t;\r
-\r
-               /* Enums: */\r
-                       /** Enum for the possible error codes returned by the \ref AOA_Host_ConfigurePipes() function. */\r
-                       enum AOA_Host_EnumerationFailure_ErrorCodes_t\r
-                       {\r
-                               AOA_ENUMERROR_NoError                    = 0, /**< Configuration Descriptor was processed successfully. */\r
-                               AOA_ENUMERROR_InvalidConfigDescriptor    = 1, /**< The device returned an invalid Configuration Descriptor. */\r
-                               AOA_ENUMERROR_NoCompatibleInterfaceFound = 2, /**< A compatible Android Open Accessory interface was not found in the device's Configuration Descriptor. */\r
-                               AOA_ENUMERROR_PipeConfigurationFailed    = 3, /**< One or more pipes for the specified interface could not be configured correctly. */\r
-                       };\r
-\r
-               /* Function Prototypes: */\r
-                       /** General management task for a given Android Open Accessory host class interface, required for the correct operation of the interface.\r
-                        *  This should be called frequently in the main program loop, before the master USB management task \ref USB_USBTask().\r
-                        *\r
-                        *  \param[in,out] AOAInterfaceInfo  Pointer to a structure containing an Android Open Accessory Class host configuration and state.\r
-                        */\r
-                       void AOA_Host_USBTask(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** Validates a device descriptor, to check if the device is a valid Android device, and if it is currently in Android Open Accessory mode.\r
-                        *\r
-                        *  \param[in,out] AOAInterfaceInfo  Pointer to a structure containing an AOA Class host configuration and state.\r
-                        *  \param[in]     DeviceDescriptor  Pointer a buffer containing the attached device's Device Descriptor.\r
-                        *  \param[out]    NeedModeSwitch    Pointer to a boolean where the mode switch requirement of the attached device is to be stored.\r
-                        *\r
-                        *  \return Boolean \c true if the attached device is a valid Android device, \c false otherwise.\r
-                        */\r
-                       bool AOA_Host_ValidateAccessoryDevice(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,\r
-                                                  const USB_Descriptor_Device_t* const DeviceDescriptor,\r
-                                                             bool* const NeedModeSwitch) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2) ATTR_NON_NULL_PTR_ARG(3);\r
-\r
-                       /** Host interface configuration routine, to configure a given Android Open Accessory host interface instance using the Configuration\r
-                        *  Descriptor read from an attached USB device. This function automatically updates the given Android Open Accessory Host instance's\r
-                        *  state values and configures the pipes required to communicate with the interface if it is found within the device. This should be\r
-                        *  called once after the stack has enumerated the attached device, while the host state machine is in the Addressed state.\r
-                        *\r
-                        *  \param[in,out] AOAInterfaceInfo      Pointer to a structure containing an AOA Class host configuration and state.\r
-                        *  \param[in]     ConfigDescriptorSize  Length of the attached device's Configuration Descriptor.\r
-                        *  \param[in]     ConfigDescriptorData  Pointer to a buffer containing the attached device's Configuration Descriptor.\r
-                        *\r
-                        *  \return A value from the \ref AOA_Host_EnumerationFailure_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t AOA_Host_ConfigurePipes(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,\r
-                                                       uint16_t ConfigDescriptorSize,\r
-                                                       void* ConfigDescriptorData) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3);\r
-                                                                          \r
-                       /** Starts Accessory Mode in the attached Android device. This function will validate the device's Android Open Accessory protocol\r
-                        *  version, send the configured property strings, and request a switch to Android Open Accessory mode.\r
-                        *\r
-                        *  \param[in,out] AOAInterfaceInfo  Pointer to a structure containing an AOA Class host configuration and state.\r
-                        *\r
-                        *  \return A value from the \ref USB_Host_SendControlErrorCodes_t enum, or \ref AOA_ERROR_LOGICAL_CMD_FAILED if a logical error occured..\r
-                        */\r
-                       uint8_t AOA_Host_StartAccessoryMode(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** Sends a given data buffer to the attached USB device, if connected. If a device is not connected when the function is\r
-                        *  called, the data will be discarded. Bytes will be queued for transmission to the device until either the pipe bank\r
-                        *  becomes full, or the \ref AOA_Host_Flush() function is called to flush the pending data to the device. This allows for\r
-                        *  multiple bytes to be packed into a single pipe packet, increasing data throughput.\r
-                        *\r
-                        *  \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the\r
-                        *       call will fail.\r
-                        *\r
-                        *  \param[in,out] AOAInterfaceInfo  Pointer to a structure containing a AOA Class host configuration and state.\r
-                        *  \param[in]     Buffer            Pointer to a buffer containing the data to send to the device.\r
-                        *  \param[in]     Length            Length of the data to send to the device.\r
-                        *\r
-                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t AOA_Host_SendData(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,\r
-                                                 const uint8_t* const Buffer,\r
-                                                 const uint16_t Length);\r
-\r
-                       /** Sends a given null-terminated string to the attached USB device, if connected. If a device is not connected when the\r
-                        *  function is called, the string is discarded. Bytes will be queued for transmission to the device until either the pipe\r
-                        *  bank becomes full, or the \ref AOA_Host_Flush() function is called to flush the pending data to the device. This allows\r
-                        *  for multiple bytes to be packed into a single pipe packet, increasing data throughput.\r
-                        *\r
-                        *  \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the\r
-                        *       call will fail.\r
-                        *\r
-                        *  \param[in,out] AOAInterfaceInfo  Pointer to a structure containing a AOA Class host configuration and state.\r
-                        *  \param[in]     String            Pointer to the null terminated string to send to the device.\r
-                        *\r
-                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t AOA_Host_SendString(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,\r
-                                                   const char* const String) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);\r
-\r
-                       /** Sends a given byte to the attached USB device, if connected. If a device is not connected when the function is called, the\r
-                        *  byte is discarded. Bytes will be queued for transmission to the device until either the pipe bank becomes full, or the\r
-                        *  \ref AOA_Host_Flush() function is called to flush the pending data to the host. This allows for multiple bytes to be\r
-                        *  packed into a single pipe packet, increasing data throughput.\r
-                        *\r
-                        *  \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the\r
-                        *       call will fail.\r
-                        *\r
-                        *  \param[in,out] AOAInterfaceInfo  Pointer to a structure containing a AOA Class host configuration and state.\r
-                        *  \param[in]     Data              Byte of data to send to the device.\r
-                        *\r
-                        *  \return A value from the \ref Pipe_WaitUntilReady_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t AOA_Host_SendByte(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,\r
-                                                 const uint8_t Data) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** Determines the number of bytes received by the AOA interface from the device, waiting to be read. This indicates the number\r
-                        *  of bytes in the IN pipe bank only, and thus the number of calls to \ref AOA_Host_ReceiveByte() which are guaranteed to succeed\r
-                        *  immediately. If multiple bytes are to be received, they should be buffered by the user application, as the pipe bank will not be\r
-                        *  released back to the USB controller until all bytes are read.\r
-                        *\r
-                        *  \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the\r
-                        *       call will fail.\r
-                        *\r
-                        *  \param[in,out] AOAInterfaceInfo  Pointer to a structure containing a AOA Class host configuration and state.\r
-                        *\r
-                        *  \return Total number of buffered bytes received from the device.\r
-                        */\r
-                       uint16_t AOA_Host_BytesReceived(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** Reads a byte of data from the device. If no data is waiting to be read of if a USB device is not connected, the function\r
-                        *  returns a negative value. The \ref AOA_Host_BytesReceived() function may be queried in advance to determine how many bytes\r
-                        *  are currently buffered in the AOA interface's data receive pipe.\r
-                        *\r
-                        *  \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the\r
-                        *       call will fail.\r
-                        *\r
-                        *  \param[in,out] AOAInterfaceInfo  Pointer to a structure containing a AOA Class host configuration and state.\r
-                        *\r
-                        *  \return Next received byte from the device, or a negative value if no data received.\r
-                        */\r
-                       int16_t AOA_Host_ReceiveByte(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** Flushes any data waiting to be sent, ensuring that the send buffer is cleared.\r
-                        *\r
-                        *  \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the\r
-                        *       call will fail.\r
-                        *\r
-                        *  \param[in,out] AOAInterfaceInfo  Pointer to a structure containing a AOA Class host configuration and state.\r
-                        *\r
-                        *  \return A value from the \ref Pipe_WaitUntilReady_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t AOA_Host_Flush(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** Creates a standard character stream for the given AOA Device instance so that it can be used with all the regular\r
-                        *  functions in the standard \c <stdio.h> library that accept a \c FILE stream as a destination (e.g. \c fprintf). The created\r
-                        *  stream is bidirectional and can be used for both input and output functions.\r
-                        *\r
-                        *  Reading data from this stream is non-blocking, i.e. in most instances, complete strings cannot be read in by a single\r
-                        *  fetch, as the endpoint will not be ready at some point in the transmission, aborting the transfer. However, this may\r
-                        *  be used when the read data is processed byte-per-bye (via \c getc()) or when the user application will implement its own\r
-                        *  line buffering.\r
-                        *\r
-                        *  \note The created stream can be given as \c stdout if desired to direct the standard output from all \c <stdio.h> functions\r
-                        *        to the given AOA interface.\r
-                        *        \n\n\r
-                        *\r
-                        *  \note This function is not available on all microcontroller architectures.\r
-                        *\r
-                        *  \param[in,out] AOAInterfaceInfo  Pointer to a structure containing a AOA Class configuration and state.\r
-                        *  \param[in,out] Stream            Pointer to a FILE structure where the created stream should be placed.\r
-                        */\r
-                       void AOA_Host_CreateStream(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,\r
-                                                  FILE* const Stream);\r
-\r
-                       /** Identical to \ref AOA_Host_CreateStream(), except that reads are blocking until the calling stream function terminates\r
-                        *  the transfer. While blocking, the USB and AOA service tasks are called repeatedly to maintain USB communications.\r
-                        *\r
-                        *  \note This function is not available on all microcontroller architectures.\r
-                        *\r
-                        *  \param[in,out] AOAInterfaceInfo  Pointer to a structure containing a AOA Class configuration and state.\r
-                        *  \param[in,out] Stream            Pointer to a FILE structure where the created stream should be placed.\r
-                        */\r
-                       void AOA_Host_CreateBlockingStream(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,\r
-                                                          FILE* const Stream);\r
-\r
-       /* Private Interface - For use in library only: */\r
-       #if !defined(__DOXYGEN__)\r
-               /* Function Prototypes: */\r
-                       #if defined(__INCLUDE_FROM_ANDROIDACCESSORY_HOST_C)\r
-                               #if defined(FDEV_SETUP_STREAM)\r
-                               static int AOA_Host_putchar(char c,\r
-                                                           FILE* Stream) ATTR_NON_NULL_PTR_ARG(2);\r
-                               static int AOA_Host_getchar(FILE* Stream) ATTR_NON_NULL_PTR_ARG(1);\r
-                               static int AOA_Host_getchar_Blocking(FILE* Stream) ATTR_NON_NULL_PTR_ARG(1);\r
-                               #endif\r
-\r
-                               static uint8_t AOA_Host_GetAccessoryProtocol(uint16_t* const Protocol) ATTR_NON_NULL_PTR_ARG(1);\r
-                               static uint8_t AOA_Host_SendPropertyString(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,\r
-                                                                      const uint8_t StringIndex) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                               static uint8_t DCOMP_AOA_Host_NextAndroidAccessoryInterface(void* const CurrentDescriptor)\r
-                                                                                           ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(1);\r
-                               static uint8_t DCOMP_AOA_Host_NextInterfaceBulkEndpoint(void* const CurrentDescriptor)\r
-                                                                                       ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(1);\r
-                       #endif\r
-       #endif\r
-\r
-       /* Disable C linkage for C++ Compilers: */\r
-               #if defined(__cplusplus)\r
-                       }\r
-               #endif\r
-\r
-#endif\r
-\r
-/** @} */\r
-\r
+/*
+             LUFA Library
+     Copyright (C) Dean Camera, 2012.
+
+  dean [at] fourwalledcubicle [dot] com
+           www.lufa-lib.org
+*/
+
+/*
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+  Permission to use, copy, modify, distribute, and sell this
+  software and its documentation for any purpose is hereby granted
+  without fee, provided that the above copyright notice appear in
+  all copies and that both that the copyright notice and this
+  permission notice and warranty disclaimer appear in supporting
+  documentation, and that the name of the author not be used in
+  advertising or publicity pertaining to distribution of the
+  software without specific, written prior permission.
+
+  The author disclaim all warranties with regard to this
+  software, including all implied warranties of merchantability
+  and fitness.  In no event shall the author be liable for any
+  special, indirect or consequential damages or any damages
+  whatsoever resulting from loss of use, data or profits, whether
+  in an action of contract, negligence or other tortious action,
+  arising out of or in connection with the use or performance of
+  this software.
+*/
+
+/** \file
+ *  \brief Host mode driver for the library USB Android Open Accessory Class driver.
+ *
+ *  Host mode driver for the library USB Android Open Accessory Class driver.
+ *
+ *  \note This file should not be included directly. It is automatically included as needed by the USB module driver
+ *        dispatch header located in LUFA/Drivers/USB.h.
+ */
+
+/** \ingroup Group_USBClassAOA
+ *  \defgroup Group_USBClassAndroidAccessoryHost Android Open Accessory Class Host Mode Driver
+ *
+ *  \section Sec_Dependencies Module Source Dependencies
+ *  The following files must be built with any user project that uses this module:
+ *    - LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.c <i>(Makefile source module name: LUFA_SRC_USBCLASS)</i>
+ *
+ *  \section Sec_ModDescription Module Description
+ *  Host Mode USB Class driver framework interface, for the Android Open Accessory USB Class driver.
+ *
+ *  @{
+ */
+
+#ifndef __AOA_CLASS_HOST_H__
+#define __AOA_CLASS_HOST_H__
+
+       /* Includes: */
+               #include "../../USB.h"
+               #include "../Common/AndroidAccessoryClassCommon.h"
+
+               #include <stdio.h>
+
+       /* Enable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       extern "C" {
+               #endif
+
+       /* Preprocessor Checks: */
+               #if !defined(__INCLUDE_FROM_AOA_DRIVER)
+                       #error Do not include this file directly. Include LUFA/Drivers/USB.h instead.
+               #endif
+
+       /* Public Interface - May be used in end-application: */
+               /* Macros: */
+                       /** Error code for some Android Open Accessory Host functions, indicating a logical (and not hardware) error. */
+                       #define AOA_ERROR_LOGICAL_CMD_FAILED              0x80
+
+               /* Type Defines: */
+                       /** \brief Android Open Accessory Class Host Mode Configuration and State Structure.
+                        *
+                        *  Class state structure. An instance of this structure should be made within the user application,
+                        *  and passed to each of the Android Open Accessory class driver functions as the \c AOAInterfaceInfo
+                        *  parameter. This stores each Android Open Accessory interface's configuration and state information.
+                        */
+                       typedef struct
+                       {
+                               struct
+                               {
+                                       USB_Pipe_Table_t DataINPipe; /**< Data IN Pipe configuration table. */
+                                       USB_Pipe_Table_t DataOUTPipe; /**< Data OUT Pipe configuration table. */
+                                       
+                                       char*    PropertyStrings[AOA_STRING_TOTAL_STRINGS]; /**< Android Accessory property strings, sent to identify the accessory when the
+                                                                                            *   Android device is switched into Open Accessory mode. */
+                               } Config; /**< Config data for the USB class interface within the device. All elements in this section
+                                          *   <b>must</b> be set or the interface will fail to enumerate and operate correctly.
+                                          */
+                               struct
+                               {
+                                       bool IsActive; /**< Indicates if the current interface instance is connected to an attached device, valid
+                                                       *   after \ref AOA_Host_ConfigurePipes() is called and the Host state machine is in the
+                                                       *   Configured state.
+                                                       */
+                                       uint8_t  InterfaceNumber; /**< Interface index of the AOA interface within the attached device. */
+                               } State; /**< State data for the USB class interface within the device. All elements in this section
+                                                 *   <b>may</b> be set to initial values, but may also be ignored to default to sane values when
+                                                 *   the interface is enumerated.
+                                                 */
+                       } USB_ClassInfo_AOA_Host_t;
+
+               /* Enums: */
+                       /** Enum for the possible error codes returned by the \ref AOA_Host_ConfigurePipes() function. */
+                       enum AOA_Host_EnumerationFailure_ErrorCodes_t
+                       {
+                               AOA_ENUMERROR_NoError                    = 0, /**< Configuration Descriptor was processed successfully. */
+                               AOA_ENUMERROR_InvalidConfigDescriptor    = 1, /**< The device returned an invalid Configuration Descriptor. */
+                               AOA_ENUMERROR_NoCompatibleInterfaceFound = 2, /**< A compatible Android Open Accessory interface was not found in the device's Configuration Descriptor. */
+                               AOA_ENUMERROR_PipeConfigurationFailed    = 3, /**< One or more pipes for the specified interface could not be configured correctly. */
+                       };
+
+               /* Function Prototypes: */
+                       /** General management task for a given Android Open Accessory host class interface, required for the correct operation of the interface.
+                        *  This should be called frequently in the main program loop, before the master USB management task \ref USB_USBTask().
+                        *
+                        *  \param[in,out] AOAInterfaceInfo  Pointer to a structure containing an Android Open Accessory Class host configuration and state.
+                        */
+                       void AOA_Host_USBTask(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** Validates a device descriptor, to check if the device is a valid Android device, and if it is currently in Android Open Accessory mode.
+                        *
+                        *  \param[in,out] AOAInterfaceInfo  Pointer to a structure containing an AOA Class host configuration and state.
+                        *  \param[in]     DeviceDescriptor  Pointer a buffer containing the attached device's Device Descriptor.
+                        *  \param[out]    NeedModeSwitch    Pointer to a boolean where the mode switch requirement of the attached device is to be stored.
+                        *
+                        *  \return Boolean \c true if the attached device is a valid Android device, \c false otherwise.
+                        */
+                       bool AOA_Host_ValidateAccessoryDevice(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,
+                                                  const USB_Descriptor_Device_t* const DeviceDescriptor,
+                                                             bool* const NeedModeSwitch) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2) ATTR_NON_NULL_PTR_ARG(3);
+
+                       /** Host interface configuration routine, to configure a given Android Open Accessory host interface instance using the Configuration
+                        *  Descriptor read from an attached USB device. This function automatically updates the given Android Open Accessory Host instance's
+                        *  state values and configures the pipes required to communicate with the interface if it is found within the device. This should be
+                        *  called once after the stack has enumerated the attached device, while the host state machine is in the Addressed state.
+                        *
+                        *  \param[in,out] AOAInterfaceInfo      Pointer to a structure containing an AOA Class host configuration and state.
+                        *  \param[in]     ConfigDescriptorSize  Length of the attached device's Configuration Descriptor.
+                        *  \param[in]     ConfigDescriptorData  Pointer to a buffer containing the attached device's Configuration Descriptor.
+                        *
+                        *  \return A value from the \ref AOA_Host_EnumerationFailure_ErrorCodes_t enum.
+                        */
+                       uint8_t AOA_Host_ConfigurePipes(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,
+                                                       uint16_t ConfigDescriptorSize,
+                                                       void* ConfigDescriptorData) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3);
+                                                                          
+                       /** Starts Accessory Mode in the attached Android device. This function will validate the device's Android Open Accessory protocol
+                        *  version, send the configured property strings, and request a switch to Android Open Accessory mode.
+                        *
+                        *  \param[in,out] AOAInterfaceInfo  Pointer to a structure containing an AOA Class host configuration and state.
+                        *
+                        *  \return A value from the \ref USB_Host_SendControlErrorCodes_t enum, or \ref AOA_ERROR_LOGICAL_CMD_FAILED if a logical error occurred..
+                        */
+                       uint8_t AOA_Host_StartAccessoryMode(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** Sends a given data buffer to the attached USB device, if connected. If a device is not connected when the function is
+                        *  called, the data will be discarded. Bytes will be queued for transmission to the device until either the pipe bank
+                        *  becomes full, or the \ref AOA_Host_Flush() function is called to flush the pending data to the device. This allows for
+                        *  multiple bytes to be packed into a single pipe packet, increasing data throughput.
+                        *
+                        *  \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the
+                        *       call will fail.
+                        *
+                        *  \param[in,out] AOAInterfaceInfo  Pointer to a structure containing a AOA Class host configuration and state.
+                        *  \param[in]     Buffer            Pointer to a buffer containing the data to send to the device.
+                        *  \param[in]     Length            Length of the data to send to the device.
+                        *
+                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t AOA_Host_SendData(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,
+                                                 const uint8_t* const Buffer,
+                                                 const uint16_t Length);
+
+                       /** Sends a given null-terminated string to the attached USB device, if connected. If a device is not connected when the
+                        *  function is called, the string is discarded. Bytes will be queued for transmission to the device until either the pipe
+                        *  bank becomes full, or the \ref AOA_Host_Flush() function is called to flush the pending data to the device. This allows
+                        *  for multiple bytes to be packed into a single pipe packet, increasing data throughput.
+                        *
+                        *  \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the
+                        *       call will fail.
+                        *
+                        *  \param[in,out] AOAInterfaceInfo  Pointer to a structure containing a AOA Class host configuration and state.
+                        *  \param[in]     String            Pointer to the null terminated string to send to the device.
+                        *
+                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t AOA_Host_SendString(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,
+                                                   const char* const String) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
+
+                       /** Sends a given byte to the attached USB device, if connected. If a device is not connected when the function is called, the
+                        *  byte is discarded. Bytes will be queued for transmission to the device until either the pipe bank becomes full, or the
+                        *  \ref AOA_Host_Flush() function is called to flush the pending data to the host. This allows for multiple bytes to be
+                        *  packed into a single pipe packet, increasing data throughput.
+                        *
+                        *  \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the
+                        *       call will fail.
+                        *
+                        *  \param[in,out] AOAInterfaceInfo  Pointer to a structure containing a AOA Class host configuration and state.
+                        *  \param[in]     Data              Byte of data to send to the device.
+                        *
+                        *  \return A value from the \ref Pipe_WaitUntilReady_ErrorCodes_t enum.
+                        */
+                       uint8_t AOA_Host_SendByte(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,
+                                                 const uint8_t Data) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** Determines the number of bytes received by the AOA interface from the device, waiting to be read. This indicates the number
+                        *  of bytes in the IN pipe bank only, and thus the number of calls to \ref AOA_Host_ReceiveByte() which are guaranteed to succeed
+                        *  immediately. If multiple bytes are to be received, they should be buffered by the user application, as the pipe bank will not be
+                        *  released back to the USB controller until all bytes are read.
+                        *
+                        *  \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the
+                        *       call will fail.
+                        *
+                        *  \param[in,out] AOAInterfaceInfo  Pointer to a structure containing a AOA Class host configuration and state.
+                        *
+                        *  \return Total number of buffered bytes received from the device.
+                        */
+                       uint16_t AOA_Host_BytesReceived(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** Reads a byte of data from the device. If no data is waiting to be read of if a USB device is not connected, the function
+                        *  returns a negative value. The \ref AOA_Host_BytesReceived() function may be queried in advance to determine how many bytes
+                        *  are currently buffered in the AOA interface's data receive pipe.
+                        *
+                        *  \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the
+                        *       call will fail.
+                        *
+                        *  \param[in,out] AOAInterfaceInfo  Pointer to a structure containing a AOA Class host configuration and state.
+                        *
+                        *  \return Next received byte from the device, or a negative value if no data received.
+                        */
+                       int16_t AOA_Host_ReceiveByte(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** Flushes any data waiting to be sent, ensuring that the send buffer is cleared.
+                        *
+                        *  \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the
+                        *       call will fail.
+                        *
+                        *  \param[in,out] AOAInterfaceInfo  Pointer to a structure containing a AOA Class host configuration and state.
+                        *
+                        *  \return A value from the \ref Pipe_WaitUntilReady_ErrorCodes_t enum.
+                        */
+                       uint8_t AOA_Host_Flush(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** Creates a standard character stream for the given AOA Device instance so that it can be used with all the regular
+                        *  functions in the standard \c <stdio.h> library that accept a \c FILE stream as a destination (e.g. \c fprintf). The created
+                        *  stream is bidirectional and can be used for both input and output functions.
+                        *
+                        *  Reading data from this stream is non-blocking, i.e. in most instances, complete strings cannot be read in by a single
+                        *  fetch, as the endpoint will not be ready at some point in the transmission, aborting the transfer. However, this may
+                        *  be used when the read data is processed byte-per-bye (via \c getc()) or when the user application will implement its own
+                        *  line buffering.
+                        *
+                        *  \note The created stream can be given as \c stdout if desired to direct the standard output from all \c <stdio.h> functions
+                        *        to the given AOA interface.
+                        *        \n\n
+                        *
+                        *  \note This function is not available on all microcontroller architectures.
+                        *
+                        *  \param[in,out] AOAInterfaceInfo  Pointer to a structure containing a AOA Class configuration and state.
+                        *  \param[in,out] Stream            Pointer to a FILE structure where the created stream should be placed.
+                        */
+                       void AOA_Host_CreateStream(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,
+                                                  FILE* const Stream);
+
+                       /** Identical to \ref AOA_Host_CreateStream(), except that reads are blocking until the calling stream function terminates
+                        *  the transfer. While blocking, the USB and AOA service tasks are called repeatedly to maintain USB communications.
+                        *
+                        *  \note This function is not available on all microcontroller architectures.
+                        *
+                        *  \param[in,out] AOAInterfaceInfo  Pointer to a structure containing a AOA Class configuration and state.
+                        *  \param[in,out] Stream            Pointer to a FILE structure where the created stream should be placed.
+                        */
+                       void AOA_Host_CreateBlockingStream(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,
+                                                          FILE* const Stream);
+
+       /* Private Interface - For use in library only: */
+       #if !defined(__DOXYGEN__)
+               /* Function Prototypes: */
+                       #if defined(__INCLUDE_FROM_ANDROIDACCESSORY_HOST_C)
+                               #if defined(FDEV_SETUP_STREAM)
+                               static int AOA_Host_putchar(char c,
+                                                           FILE* Stream) ATTR_NON_NULL_PTR_ARG(2);
+                               static int AOA_Host_getchar(FILE* Stream) ATTR_NON_NULL_PTR_ARG(1);
+                               static int AOA_Host_getchar_Blocking(FILE* Stream) ATTR_NON_NULL_PTR_ARG(1);
+                               #endif
+
+                               static uint8_t AOA_Host_GetAccessoryProtocol(uint16_t* const Protocol) ATTR_NON_NULL_PTR_ARG(1);
+                               static uint8_t AOA_Host_SendPropertyString(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,
+                                                                      const uint8_t StringIndex) ATTR_NON_NULL_PTR_ARG(1);
+
+                               static uint8_t DCOMP_AOA_Host_NextAndroidAccessoryInterface(void* const CurrentDescriptor)
+                                                                                           ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(1);
+                               static uint8_t DCOMP_AOA_Host_NextInterfaceBulkEndpoint(void* const CurrentDescriptor)
+                                                                                       ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(1);
+                       #endif
+       #endif
+
+       /* Disable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       }
+               #endif
+
+#endif
+
+/** @} */
+
 
index 4d79ed9..b70a502 100644 (file)
                         */
                        uint8_t CDC_Host_Flush(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
 
+                       #if defined(FDEV_SETUP_STREAM) || defined(__DOXYGEN__)
                        /** Creates a standard character stream for the given CDC Device instance so that it can be used with all the regular
                         *  functions in the standard \c <stdio.h> library that accept a \c FILE stream as a destination (e.g. \c fprintf). The created
                         *  stream is bidirectional and can be used for both input and output functions.
                         */
                        void CDC_Host_CreateBlockingStream(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo,
                                                           FILE* const Stream);
-
+                       #endif
+                       
                        /** CDC class driver event for a control line state change on a CDC host interface. This event fires each time the device notifies
                         *  the host of a control line state change (containing the virtual serial control line states, such as DCD) and may be hooked in the
                         *  user program by declaring a handler function with the same name and parameters listed here. The new control line states
index 882cc31..21868d9 100644 (file)
                        uint8_t HID_Host_SetBootProtocol(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Sets the idle period for the attached HID device to the specified interval. The HID idle period determines the rate
-                        *  at which the device should send a report, when no state changes have ocurred; i.e. on HID keyboards, this sets the
+                        *  at which the device should send a report, when no state changes have occurred; i.e. on HID keyboards, this sets the
                         *  hardware key repeat interval.
                         *
                         *  \param[in,out] HIDInterfaceInfo  Pointer to a structure containing a HID Class host configuration and state.
index b9e8611..06ede7f 100644 (file)
                                                          MIDI_EventPacket_t* const Event) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
 
                        /** Flushes the MIDI send buffer, sending any queued MIDI events to the device. This should be called to override the
-                        *  \ref MIDI_Host_SendEventPacket() function's packing behaviour, to flush queued events. Events are queued into the
+                        *  \ref MIDI_Host_SendEventPacket() function's packing behavior, to flush queued events. Events are queued into the
                         *  pipe bank until either the pipe bank is full, or \ref MIDI_Host_Flush() is called. This allows for multiple MIDI
                         *  events to be packed into a single pipe packet, increasing data throughput.
                         *
index 0117a1d..a267be1 100644 (file)
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2012.\r
-              \r
-  dean [at] fourwalledcubicle [dot] com\r
-           www.lufa-lib.org\r
-*/\r
-\r
-/*\r
-  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, distribute, and sell this \r
-  software and its documentation for any purpose is hereby granted\r
-  without fee, provided that the above copyright notice appear in \r
-  all copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting \r
-  documentation, and that the name of the author not be used in \r
-  advertising or publicity pertaining to distribution of the \r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-#include "../../../../Common/Common.h"\r
-#if (ARCH == ARCH_AVR8)\r
-\r
-#define  __INCLUDE_FROM_USB_DRIVER\r
-#include "../USBMode.h"\r
-\r
-#if defined(USB_CAN_BE_DEVICE)\r
-\r
-#include "EndpointStream_AVR8.h"\r
-\r
-#if !defined(CONTROL_ONLY_DEVICE)\r
-uint8_t Endpoint_Discard_Stream(uint16_t Length,\r
-                                uint16_t* const BytesProcessed)\r
-{\r
-       uint8_t  ErrorCode;\r
-       uint16_t BytesInTransfer = 0;\r
-       \r
-       if ((ErrorCode = Endpoint_WaitUntilReady()))\r
-         return ErrorCode;\r
-         \r
-       if (BytesProcessed != NULL)\r
-         Length -= *BytesProcessed;\r
-\r
-       while (Length)\r
-       {\r
-               if (!(Endpoint_IsReadWriteAllowed()))\r
-               {\r
-                       Endpoint_ClearOUT();\r
-\r
-                       if (BytesProcessed != NULL)\r
-                       {\r
-                               *BytesProcessed += BytesInTransfer;\r
-                               return ENDPOINT_RWSTREAM_IncompleteTransfer;\r
-                       }\r
-\r
-                       if ((ErrorCode = Endpoint_WaitUntilReady()))\r
-                         return ErrorCode;\r
-               }\r
-               else\r
-               {\r
-                       Endpoint_Discard_8();\r
-\r
-                       Length--;\r
-                       BytesInTransfer++;\r
-               }\r
-       }\r
-       \r
-       return ENDPOINT_RWSTREAM_NoError;\r
-}\r
-\r
-uint8_t Endpoint_Null_Stream(uint16_t Length,\r
-                             uint16_t* const BytesProcessed)\r
-{\r
-       uint8_t  ErrorCode;\r
-       uint16_t BytesInTransfer = 0;\r
-       \r
-       if ((ErrorCode = Endpoint_WaitUntilReady()))\r
-         return ErrorCode;\r
-         \r
-       if (BytesProcessed != NULL)\r
-         Length -= *BytesProcessed;\r
-\r
-       while (Length)\r
-       {\r
-               if (!(Endpoint_IsReadWriteAllowed()))\r
-               {\r
-                       Endpoint_ClearIN();\r
-\r
-                       if (BytesProcessed != NULL)\r
-                       {\r
-                               *BytesProcessed += BytesInTransfer;\r
-                               return ENDPOINT_RWSTREAM_IncompleteTransfer;\r
-                       }\r
-\r
-                       if ((ErrorCode = Endpoint_WaitUntilReady()))\r
-                         return ErrorCode;\r
-               }\r
-               else\r
-               {\r
-                       Endpoint_Write_8(0);\r
-\r
-                       Length--;\r
-                       BytesInTransfer++;\r
-               }\r
-       }\r
-       \r
-       return ENDPOINT_RWSTREAM_NoError;\r
-}\r
-\r
-/* The following abuses the C preprocessor in order to copy-paste common code with slight alterations,\r
- * so that the code needs to be written once. It is a crude form of templating to reduce code maintenance. */\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Stream_LE\r
-#define  TEMPLATE_BUFFER_TYPE                      const void*\r
-#define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(*BufferPtr)\r
-#include "Template/Template_Endpoint_RW.c"\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Stream_BE\r
-#define  TEMPLATE_BUFFER_TYPE                      const void*\r
-#define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(*BufferPtr)\r
-#include "Template/Template_Endpoint_RW.c"\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Stream_LE\r
-#define  TEMPLATE_BUFFER_TYPE                      void*\r
-#define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearOUT()\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Endpoint_Read_8()\r
-#include "Template/Template_Endpoint_RW.c"\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Stream_BE\r
-#define  TEMPLATE_BUFFER_TYPE                      void*\r
-#define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearOUT()\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Endpoint_Read_8()\r
-#include "Template/Template_Endpoint_RW.c"\r
-\r
-#if defined(ARCH_HAS_FLASH_ADDRESS_SPACE)\r
-       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_PStream_LE\r
-       #define  TEMPLATE_BUFFER_TYPE                      const void*\r
-       #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()\r
-       #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
-       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(pgm_read_byte(BufferPtr))\r
-       #include "Template/Template_Endpoint_RW.c"\r
-\r
-       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_PStream_BE\r
-       #define  TEMPLATE_BUFFER_TYPE                      const void*\r
-       #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()\r
-       #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
-       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(pgm_read_byte(BufferPtr))\r
-       #include "Template/Template_Endpoint_RW.c"\r
-#endif\r
-\r
-#if defined(ARCH_HAS_EEPROM_ADDRESS_SPACE)\r
-       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_EStream_LE\r
-       #define  TEMPLATE_BUFFER_TYPE                      const void*\r
-       #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()\r
-       #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
-       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(eeprom_read_byte(BufferPtr))\r
-       #include "Template/Template_Endpoint_RW.c"\r
-\r
-       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_EStream_BE\r
-       #define  TEMPLATE_BUFFER_TYPE                      const void*\r
-       #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()\r
-       #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
-       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(eeprom_read_byte(BufferPtr))\r
-       #include "Template/Template_Endpoint_RW.c"\r
-\r
-       #define  TEMPLATE_FUNC_NAME                        Endpoint_Read_EStream_LE\r
-       #define  TEMPLATE_BUFFER_TYPE                      void*\r
-       #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearOUT()\r
-       #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
-       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         eeprom_update_byte(BufferPtr, Endpoint_Read_8())\r
-       #include "Template/Template_Endpoint_RW.c"\r
-\r
-       #define  TEMPLATE_FUNC_NAME                        Endpoint_Read_EStream_BE\r
-       #define  TEMPLATE_BUFFER_TYPE                      void*\r
-       #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearOUT()\r
-       #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
-       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         eeprom_update_byte(BufferPtr, Endpoint_Read_8())\r
-       #include "Template/Template_Endpoint_RW.c"\r
-#endif\r
-\r
-#endif\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_Stream_LE\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(*BufferPtr)\r
-#include "Template/Template_Endpoint_Control_W.c"\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_Stream_BE\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(*BufferPtr)\r
-#include "Template/Template_Endpoint_Control_W.c"\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Control_Stream_LE\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Endpoint_Read_8()\r
-#include "Template/Template_Endpoint_Control_R.c"\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Control_Stream_BE\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Endpoint_Read_8()\r
-#include "Template/Template_Endpoint_Control_R.c"\r
-\r
-#if defined(ARCH_HAS_FLASH_ADDRESS_SPACE)\r
-       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_PStream_LE\r
-       #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
-       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(pgm_read_byte(BufferPtr))\r
-       #include "Template/Template_Endpoint_Control_W.c"\r
-\r
-       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_PStream_BE\r
-       #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
-       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(pgm_read_byte(BufferPtr))\r
-       #include "Template/Template_Endpoint_Control_W.c"\r
-#endif\r
-\r
-#if defined(ARCH_HAS_EEPROM_ADDRESS_SPACE)\r
-       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_EStream_LE\r
-       #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
-       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(eeprom_read_byte(BufferPtr))\r
-       #include "Template/Template_Endpoint_Control_W.c"\r
-\r
-       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_EStream_BE\r
-       #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
-       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(eeprom_read_byte(BufferPtr))\r
-       #include "Template/Template_Endpoint_Control_W.c"\r
-\r
-       #define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Control_EStream_LE\r
-       #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
-       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         eeprom_update_byte(BufferPtr, Endpoint_Read_8())\r
-       #include "Template/Template_Endpoint_Control_R.c"\r
-\r
-       #define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Control_EStream_BE\r
-       #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
-       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         eeprom_update_byte(BufferPtr, Endpoint_Read_8())\r
-       #include "Template/Template_Endpoint_Control_R.c"\r
-#endif\r
-\r
+/*
+             LUFA Library
+     Copyright (C) Dean Camera, 2012.
+              
+  dean [at] fourwalledcubicle [dot] com
+           www.lufa-lib.org
+*/
+
+/*
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+  Permission to use, copy, modify, distribute, and sell this 
+  software and its documentation for any purpose is hereby granted
+  without fee, provided that the above copyright notice appear in 
+  all copies and that both that the copyright notice and this
+  permission notice and warranty disclaimer appear in supporting 
+  documentation, and that the name of the author not be used in 
+  advertising or publicity pertaining to distribution of the 
+  software without specific, written prior permission.
+
+  The author disclaim all warranties with regard to this
+  software, including all implied warranties of merchantability
+  and fitness.  In no event shall the author be liable for any
+  special, indirect or consequential damages or any damages
+  whatsoever resulting from loss of use, data or profits, whether
+  in an action of contract, negligence or other tortious action,
+  arising out of or in connection with the use or performance of
+  this software.
+*/
+
+#include "../../../../Common/Common.h"
+#if (ARCH == ARCH_AVR8)
+
+#define  __INCLUDE_FROM_USB_DRIVER
+#include "../USBMode.h"
+
+#if defined(USB_CAN_BE_DEVICE)
+
+#include "EndpointStream_AVR8.h"
+
+#if !defined(CONTROL_ONLY_DEVICE)
+uint8_t Endpoint_Discard_Stream(uint16_t Length,
+                                uint16_t* const BytesProcessed)
+{
+       uint8_t  ErrorCode;
+       uint16_t BytesInTransfer = 0;
+       
+       if ((ErrorCode = Endpoint_WaitUntilReady()))
+         return ErrorCode;
+         
+       if (BytesProcessed != NULL)
+         Length -= *BytesProcessed;
+
+       while (Length)
+       {
+               if (!(Endpoint_IsReadWriteAllowed()))
+               {
+                       Endpoint_ClearOUT();
+
+                       if (BytesProcessed != NULL)
+                       {
+                               *BytesProcessed += BytesInTransfer;
+                               return ENDPOINT_RWSTREAM_IncompleteTransfer;
+                       }
+
+                       if ((ErrorCode = Endpoint_WaitUntilReady()))
+                         return ErrorCode;
+               }
+               else
+               {
+                       Endpoint_Discard_8();
+
+                       Length--;
+                       BytesInTransfer++;
+               }
+       }
+       
+       return ENDPOINT_RWSTREAM_NoError;
+}
+
+uint8_t Endpoint_Null_Stream(uint16_t Length,
+                             uint16_t* const BytesProcessed)
+{
+       uint8_t  ErrorCode;
+       uint16_t BytesInTransfer = 0;
+       
+       if ((ErrorCode = Endpoint_WaitUntilReady()))
+         return ErrorCode;
+         
+       if (BytesProcessed != NULL)
+         Length -= *BytesProcessed;
+
+       while (Length)
+       {
+               if (!(Endpoint_IsReadWriteAllowed()))
+               {
+                       Endpoint_ClearIN();
+
+                       if (BytesProcessed != NULL)
+                       {
+                               *BytesProcessed += BytesInTransfer;
+                               return ENDPOINT_RWSTREAM_IncompleteTransfer;
+                       }
+
+                       if ((ErrorCode = Endpoint_WaitUntilReady()))
+                         return ErrorCode;
+               }
+               else
+               {
+                       Endpoint_Write_8(0);
+
+                       Length--;
+                       BytesInTransfer++;
+               }
+       }
+       
+       return ENDPOINT_RWSTREAM_NoError;
+}
+
+/* The following abuses the C preprocessor in order to copy-paste common code with slight alterations,
+ * so that the code needs to be written once. It is a crude form of templating to reduce code maintenance. */
+
+#define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Stream_LE
+#define  TEMPLATE_BUFFER_TYPE                      const void*
+#define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()
+#define  TEMPLATE_BUFFER_OFFSET(Length)            0
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(*BufferPtr)
+#include "Template/Template_Endpoint_RW.c"
+
+#define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Stream_BE
+#define  TEMPLATE_BUFFER_TYPE                      const void*
+#define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()
+#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(*BufferPtr)
+#include "Template/Template_Endpoint_RW.c"
+
+#define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Stream_LE
+#define  TEMPLATE_BUFFER_TYPE                      void*
+#define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearOUT()
+#define  TEMPLATE_BUFFER_OFFSET(Length)            0
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Endpoint_Read_8()
+#include "Template/Template_Endpoint_RW.c"
+
+#define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Stream_BE
+#define  TEMPLATE_BUFFER_TYPE                      void*
+#define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearOUT()
+#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Endpoint_Read_8()
+#include "Template/Template_Endpoint_RW.c"
+
+#if defined(ARCH_HAS_FLASH_ADDRESS_SPACE)
+       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_PStream_LE
+       #define  TEMPLATE_BUFFER_TYPE                      const void*
+       #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()
+       #define  TEMPLATE_BUFFER_OFFSET(Length)            0
+       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(pgm_read_byte(BufferPtr))
+       #include "Template/Template_Endpoint_RW.c"
+
+       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_PStream_BE
+       #define  TEMPLATE_BUFFER_TYPE                      const void*
+       #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()
+       #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)
+       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(pgm_read_byte(BufferPtr))
+       #include "Template/Template_Endpoint_RW.c"
+#endif
+
+#if defined(ARCH_HAS_EEPROM_ADDRESS_SPACE)
+       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_EStream_LE
+       #define  TEMPLATE_BUFFER_TYPE                      const void*
+       #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()
+       #define  TEMPLATE_BUFFER_OFFSET(Length)            0
+       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(eeprom_read_byte(BufferPtr))
+       #include "Template/Template_Endpoint_RW.c"
+
+       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_EStream_BE
+       #define  TEMPLATE_BUFFER_TYPE                      const void*
+       #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()
+       #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)
+       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(eeprom_read_byte(BufferPtr))
+       #include "Template/Template_Endpoint_RW.c"
+
+       #define  TEMPLATE_FUNC_NAME                        Endpoint_Read_EStream_LE
+       #define  TEMPLATE_BUFFER_TYPE                      void*
+       #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearOUT()
+       #define  TEMPLATE_BUFFER_OFFSET(Length)            0
+       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         eeprom_update_byte(BufferPtr, Endpoint_Read_8())
+       #include "Template/Template_Endpoint_RW.c"
+
+       #define  TEMPLATE_FUNC_NAME                        Endpoint_Read_EStream_BE
+       #define  TEMPLATE_BUFFER_TYPE                      void*
+       #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearOUT()
+       #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)
+       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         eeprom_update_byte(BufferPtr, Endpoint_Read_8())
+       #include "Template/Template_Endpoint_RW.c"
 #endif
 
-#endif\r
+#endif
+
+#define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_Stream_LE
+#define  TEMPLATE_BUFFER_OFFSET(Length)            0
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(*BufferPtr)
+#include "Template/Template_Endpoint_Control_W.c"
+
+#define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_Stream_BE
+#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(*BufferPtr)
+#include "Template/Template_Endpoint_Control_W.c"
+
+#define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Control_Stream_LE
+#define  TEMPLATE_BUFFER_OFFSET(Length)            0
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Endpoint_Read_8()
+#include "Template/Template_Endpoint_Control_R.c"
+
+#define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Control_Stream_BE
+#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Endpoint_Read_8()
+#include "Template/Template_Endpoint_Control_R.c"
+
+#if defined(ARCH_HAS_FLASH_ADDRESS_SPACE)
+       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_PStream_LE
+       #define  TEMPLATE_BUFFER_OFFSET(Length)            0
+       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(pgm_read_byte(BufferPtr))
+       #include "Template/Template_Endpoint_Control_W.c"
+
+       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_PStream_BE
+       #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)
+       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(pgm_read_byte(BufferPtr))
+       #include "Template/Template_Endpoint_Control_W.c"
+#endif
+
+#if defined(ARCH_HAS_EEPROM_ADDRESS_SPACE)
+       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_EStream_LE
+       #define  TEMPLATE_BUFFER_OFFSET(Length)            0
+       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(eeprom_read_byte(BufferPtr))
+       #include "Template/Template_Endpoint_Control_W.c"
+
+       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_EStream_BE
+       #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)
+       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(eeprom_read_byte(BufferPtr))
+       #include "Template/Template_Endpoint_Control_W.c"
+
+       #define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Control_EStream_LE
+       #define  TEMPLATE_BUFFER_OFFSET(Length)            0
+       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         eeprom_update_byte(BufferPtr, Endpoint_Read_8())
+       #include "Template/Template_Endpoint_Control_R.c"
+
+       #define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Control_EStream_BE
+       #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)
+       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         eeprom_update_byte(BufferPtr, Endpoint_Read_8())
+       #include "Template/Template_Endpoint_Control_R.c"
+#endif
+
+#endif
+
+#endif
index 072d859..eb1f928 100644 (file)
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2012.\r
-              \r
-  dean [at] fourwalledcubicle [dot] com\r
-           www.lufa-lib.org\r
-*/\r
-\r
-/*\r
-  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, distribute, and sell this \r
-  software and its documentation for any purpose is hereby granted\r
-  without fee, provided that the above copyright notice appear in \r
-  all copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting \r
-  documentation, and that the name of the author not be used in \r
-  advertising or publicity pertaining to distribution of the \r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-/** \file\r
- *  \brief Endpoint data stream transmission and reception management for the AVR8 microcontrollers.\r
- *  \copydetails Group_EndpointStreamRW_AVR8\r
- *\r
- *  \note This file should not be included directly. It is automatically included as needed by the USB driver\r
- *        dispatch header located in LUFA/Drivers/USB/USB.h.\r
- */\r
-\r
-/** \ingroup Group_EndpointStreamRW\r
- *  \defgroup Group_EndpointStreamRW_AVR8 Read/Write of Multi-Byte Streams (AVR8)\r
- *  \brief Endpoint data stream transmission and reception management for the Atmel AVR8 architecture.\r
- *\r
- *  Functions, macros, variables, enums and types related to data reading and writing of data streams from\r
- *  and to endpoints.\r
- *\r
- *  @{\r
- */ \r
-\r
-#ifndef __ENDPOINT_STREAM_AVR8_H__\r
-#define __ENDPOINT_STREAM_AVR8_H__\r
-\r
-       /* Includes: */\r
-               #include "../../../../Common/Common.h"\r
-               #include "../USBMode.h"         \r
-               #include "../USBTask.h"\r
-               \r
-       /* Enable C linkage for C++ Compilers: */\r
-               #if defined(__cplusplus)\r
-                       extern "C" {\r
-               #endif\r
-\r
-       /* Preprocessor Checks: */\r
-               #if !defined(__INCLUDE_FROM_USB_DRIVER)\r
-                       #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.\r
-               #endif\r
-\r
-       /* Public Interface - May be used in end-application: */\r
-               /* Function Prototypes: */\r
-                       /** \name Stream functions for null data */\r
-                       //@{\r
-\r
-                       /** Reads and discards the given number of bytes from the currently selected endpoint's bank,\r
-                        *  discarding fully read packets from the host as needed. The last packet is not automatically\r
-                        *  discarded once the remaining bytes has been read; the user is responsible for manually\r
-                        *  discarding the last packet from the host via the \ref Endpoint_ClearOUT() macro.\r
-                        *\r
-                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once,\r
-                        *  failing or succeeding as a single unit. If the BytesProcessed parameter points to a valid\r
-                        *  storage location, the transfer will instead be performed as a series of chunks. Each time\r
-                        *  the endpoint bank becomes empty while there is still data to process (and after the current\r
-                        *  packet has been acknowledged) the BytesProcessed location will be updated with the total number\r
-                        *  of bytes processed in the stream, and the function will exit with an error code of\r
-                        *  \ref ENDPOINT_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed\r
-                        *  in the user code - to continue the transfer, call the function again with identical parameters\r
-                        *  and it will resume until the BytesProcessed value reaches the total transfer length.\r
-                        *\r
-                        *  <b>Single Stream Transfer Example:</b>\r
-                        *  \code\r
-                        *  uint8_t ErrorCode;\r
-                        *  \r
-                        *  if ((ErrorCode = Endpoint_Discard_Stream(512, NULL)) != ENDPOINT_RWSTREAM_NoError)\r
-                        *  {\r
-                        *       // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  <b>Partial Stream Transfers Example:</b>\r
-                        *  \code\r
-                        *  uint8_t  ErrorCode;\r
-                        *  uint16_t BytesProcessed;\r
-                        *  \r
-                        *  BytesProcessed = 0;\r
-                        *  while ((ErrorCode = Endpoint_Discard_Stream(512, &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)\r
-                        *  {\r
-                        *      // Stream not yet complete - do other actions here, abort if required\r
-                        *  }\r
-                        *  \r
-                        *  if (ErrorCode != ENDPOINT_RWSTREAM_NoError)\r
-                        *  {\r
-                        *      // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  \note This routine should not be used on CONTROL type endpoints.\r
-                        *\r
-                        *  \param[in] Length          Number of bytes to discard via the currently selected endpoint.\r
-                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current\r
-                        *                             transaction should be updated, \c NULL if the entire stream should be read at once.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Discard_Stream(uint16_t Length,\r
-                                                       uint16_t* const BytesProcessed);\r
-\r
-                       /** Writes a given number of zeroed bytes to the currently selected endpoint's bank, sending\r
-                        *  full packets to the host as needed. The last packet is not automatically sent once the \r
-                        *  remaining bytes have been written; the user is responsible for manually sending the last\r
-                        *  packet to the host via the \ref Endpoint_ClearIN() macro.\r
-                        *\r
-                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once,\r
-                        *  failing or succeeding as a single unit. If the BytesProcessed parameter points to a valid\r
-                        *  storage location, the transfer will instead be performed as a series of chunks. Each time\r
-                        *  the endpoint bank becomes full while there is still data to process (and after the current\r
-                        *  packet transmission has been initiated) the BytesProcessed location will be updated with the\r
-                        *  total number of bytes processed in the stream, and the function will exit with an error code of\r
-                        *  \ref ENDPOINT_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed\r
-                        *  in the user code - to continue the transfer, call the function again with identical parameters\r
-                        *  and it will resume until the BytesProcessed value reaches the total transfer length.\r
-                        *\r
-                        *  <b>Single Stream Transfer Example:</b>\r
-                        *  \code\r
-                        *  uint8_t ErrorCode;\r
-                        *  \r
-                        *  if ((ErrorCode = Endpoint_Null_Stream(512, NULL)) != ENDPOINT_RWSTREAM_NoError)\r
-                        *  {\r
-                        *       // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  <b>Partial Stream Transfers Example:</b>\r
-                        *  \code\r
-                        *  uint8_t  ErrorCode;\r
-                        *  uint16_t BytesProcessed;\r
-                        *  \r
-                        *  BytesProcessed = 0;\r
-                        *  while ((ErrorCode = Endpoint_Null_Stream(512, &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)\r
-                        *  {\r
-                        *      // Stream not yet complete - do other actions here, abort if required\r
-                        *  }\r
-                        *  \r
-                        *  if (ErrorCode != ENDPOINT_RWSTREAM_NoError)\r
-                        *  {\r
-                        *      // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  \note This routine should not be used on CONTROL type endpoints.\r
-                        *\r
-                        *  \param[in] Length          Number of zero bytes to send via the currently selected endpoint.\r
-                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current\r
-                        *                             transaction should be updated, \c NULL if the entire stream should be read at once.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Null_Stream(uint16_t Length,\r
-                                                    uint16_t* const BytesProcessed);\r
-\r
-                       //@}\r
-\r
-                       /** \name Stream functions for RAM source/destination data */\r
-                       //@{\r
-               \r
-                       /** Writes the given number of bytes to the endpoint from the given buffer in little endian,\r
-                        *  sending full packets to the host as needed. The last packet filled is not automatically sent;\r
-                        *  the user is responsible for manually sending the last written packet to the host via the\r
-                        *  \ref Endpoint_ClearIN() macro.\r
-                        *\r
-                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once,\r
-                        *  failing or succeeding as a single unit. If the BytesProcessed parameter points to a valid\r
-                        *  storage location, the transfer will instead be performed as a series of chunks. Each time\r
-                        *  the endpoint bank becomes full while there is still data to process (and after the current\r
-                        *  packet transmission has been initiated) the BytesProcessed location will be updated with the\r
-                        *  total number of bytes processed in the stream, and the function will exit with an error code of\r
-                        *  \ref ENDPOINT_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed\r
-                        *  in the user code - to continue the transfer, call the function again with identical parameters\r
-                        *  and it will resume until the BytesProcessed value reaches the total transfer length.\r
-                        *\r
-                        *  <b>Single Stream Transfer Example:</b>\r
-                        *  \code\r
-                        *  uint8_t DataStream[512];\r
-                        *  uint8_t ErrorCode;\r
-                        *  \r
-                        *  if ((ErrorCode = Endpoint_Write_Stream_LE(DataStream, sizeof(DataStream),\r
-                        *                                            NULL)) != ENDPOINT_RWSTREAM_NoError)\r
-                        *  {\r
-                        *       // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  <b>Partial Stream Transfers Example:</b>\r
-                        *  \code\r
-                        *  uint8_t  DataStream[512];\r
-                        *  uint8_t  ErrorCode;\r
-                        *  uint16_t BytesProcessed;\r
-                        *\r
-                        *  BytesProcessed = 0;\r
-                        *  while ((ErrorCode = Endpoint_Write_Stream_LE(DataStream, sizeof(DataStream),\r
-                        *                                               &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)\r
-                        *  {\r
-                        *      // Stream not yet complete - do other actions here, abort if required\r
-                        *  }\r
-                        *\r
-                        *  if (ErrorCode != ENDPOINT_RWSTREAM_NoError)\r
-                        *  {\r
-                        *      // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  \note This routine should not be used on CONTROL type endpoints.\r
-                        *\r
-                        *  \param[in] Buffer          Pointer to the source data buffer to read from.\r
-                        *  \param[in] Length          Number of bytes to read for the currently selected endpoint into the buffer.\r
-                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current\r
-                        *                             transaction should be updated, \c NULL if the entire stream should be written at once.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Write_Stream_LE(const void* const Buffer,\r
-                                                        uint16_t Length,\r
-                                                        uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** Writes the given number of bytes to the endpoint from the given buffer in big endian,\r
-                        *  sending full packets to the host as needed. The last packet filled is not automatically sent;\r
-                        *  the user is responsible for manually sending the last written packet to the host via the\r
-                        *  \ref Endpoint_ClearIN() macro.\r
-                        *\r
-                        *  \note This routine should not be used on CONTROL type endpoints.\r
-                        *\r
-                        *  \param[in] Buffer          Pointer to the source data buffer to read from.\r
-                        *  \param[in] Length          Number of bytes to read for the currently selected endpoint into the buffer.\r
-                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current\r
-                        *                             transaction should be updated, \c NULL if the entire stream should be written at once.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Write_Stream_BE(const void* const Buffer,\r
-                                                        uint16_t Length,\r
-                                                        uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-                       \r
-                       /** Reads the given number of bytes from the endpoint from the given buffer in little endian,\r
-                        *  discarding fully read packets from the host as needed. The last packet is not automatically\r
-                        *  discarded once the remaining bytes has been read; the user is responsible for manually\r
-                        *  discarding the last packet from the host via the \ref Endpoint_ClearOUT() macro.\r
-                        *\r
-                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once,\r
-                        *  failing or succeeding as a single unit. If the BytesProcessed parameter points to a valid\r
-                        *  storage location, the transfer will instead be performed as a series of chunks. Each time\r
-                        *  the endpoint bank becomes empty while there is still data to process (and after the current\r
-                        *  packet has been acknowledged) the BytesProcessed location will be updated with the total number\r
-                        *  of bytes processed in the stream, and the function will exit with an error code of\r
-                        *  \ref ENDPOINT_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed\r
-                        *  in the user code - to continue the transfer, call the function again with identical parameters\r
-                        *  and it will resume until the BytesProcessed value reaches the total transfer length.\r
-                        *\r
-                        *  <b>Single Stream Transfer Example:</b>\r
-                        *  \code\r
-                        *  uint8_t DataStream[512];\r
-                        *  uint8_t ErrorCode;\r
-                        *  \r
-                        *  if ((ErrorCode = Endpoint_Read_Stream_LE(DataStream, sizeof(DataStream),\r
-                        *                                           NULL)) != ENDPOINT_RWSTREAM_NoError)\r
-                        *  {\r
-                        *       // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  <b>Partial Stream Transfers Example:</b>\r
-                        *  \code\r
-                        *  uint8_t  DataStream[512];\r
-                        *  uint8_t  ErrorCode;\r
-                        *  uint16_t BytesProcessed;\r
-                        *  \r
-                        *  BytesProcessed = 0;\r
-                        *  while ((ErrorCode = Endpoint_Read_Stream_LE(DataStream, sizeof(DataStream),\r
-                        *                                              &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)\r
-                        *  {\r
-                        *      // Stream not yet complete - do other actions here, abort if required\r
-                        *  }\r
-                        *  \r
-                        *  if (ErrorCode != ENDPOINT_RWSTREAM_NoError)\r
-                        *  {\r
-                        *      // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  \note This routine should not be used on CONTROL type endpoints.\r
-                        *\r
-                        *  \param[out] Buffer          Pointer to the destination data buffer to write to.\r
-                        *  \param[in]  Length          Number of bytes to send via the currently selected endpoint.\r
-                        *  \param[in]  BytesProcessed  Pointer to a location where the total number of bytes processed in the current\r
-                        *                              transaction should be updated, \c NULL if the entire stream should be read at once.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Read_Stream_LE(void* const Buffer,\r
-                                                       uint16_t Length,\r
-                                                       uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** Reads the given number of bytes from the endpoint from the given buffer in big endian,\r
-                        *  discarding fully read packets from the host as needed. The last packet is not automatically\r
-                        *  discarded once the remaining bytes has been read; the user is responsible for manually\r
-                        *  discarding the last packet from the host via the \ref Endpoint_ClearOUT() macro.\r
-                        *\r
-                        *  \note This routine should not be used on CONTROL type endpoints.\r
-                        *\r
-                        *  \param[out] Buffer          Pointer to the destination data buffer to write to.\r
-                        *  \param[in]  Length          Number of bytes to send via the currently selected endpoint.\r
-                        *  \param[in]  BytesProcessed  Pointer to a location where the total number of bytes processed in the current\r
-                        *                              transaction should be updated, \c NULL if the entire stream should be read at once.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Read_Stream_BE(void* const Buffer,\r
-                                                       uint16_t Length,\r
-                                                       uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** Writes the given number of bytes to the CONTROL type endpoint from the given buffer in little endian,\r
-                        *  sending full packets to the host as needed. The host OUT acknowledgement is not automatically cleared\r
-                        *  in both failure and success states; the user is responsible for manually clearing the setup OUT to\r
-                        *  finalize the transfer via the \ref Endpoint_ClearOUT() macro.\r
-                        *\r
-                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt\r
-                        *        to clear the status stage when using this routine in a control transaction.\r
-                        *        \n\n\r
-                        *\r
-                        *  \note This routine should only be used on CONTROL type endpoints.\r
-                        *\r
-                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained\r
-                        *           together; i.e. the entire stream data must be read or written at the one time.\r
-                        *\r
-                        *  \param[in] Buffer  Pointer to the source data buffer to read from.\r
-                        *  \param[in] Length  Number of bytes to read for the currently selected endpoint into the buffer.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Write_Control_Stream_LE(const void* const Buffer,\r
-                                                                uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** Writes the given number of bytes to the CONTROL type endpoint from the given buffer in big endian,\r
-                        *  sending full packets to the host as needed. The host OUT acknowledgement is not automatically cleared\r
-                        *  in both failure and success states; the user is responsible for manually clearing the setup OUT to\r
-                        *  finalize the transfer via the \ref Endpoint_ClearOUT() macro.\r
-                        *\r
-                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt\r
-                        *        to clear the status stage when using this routine in a control transaction.\r
-                        *        \n\n\r
-                        *\r
-                        *  \note This routine should only be used on CONTROL type endpoints.\r
-                        *\r
-                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained\r
-                        *           together; i.e. the entire stream data must be read or written at the one time.\r
-                        *\r
-                        *  \param[in] Buffer  Pointer to the source data buffer to read from.\r
-                        *  \param[in] Length  Number of bytes to read for the currently selected endpoint into the buffer.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Write_Control_Stream_BE(const void* const Buffer,\r
-                                                                uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** Reads the given number of bytes from the CONTROL endpoint from the given buffer in little endian,\r
-                        *  discarding fully read packets from the host as needed. The device IN acknowledgement is not\r
-                        *  automatically sent after success or failure states; the user is responsible for manually sending the\r
-                        *  setup IN to finalize the transfer via the \ref Endpoint_ClearIN() macro.\r
-                        *\r
-                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt\r
-                        *        to clear the status stage when using this routine in a control transaction.\r
-                        *        \n\n\r
-                        *\r
-                        *  \note This routine should only be used on CONTROL type endpoints.\r
-                        *\r
-                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained\r
-                        *           together; i.e. the entire stream data must be read or written at the one time.\r
-                        *\r
-                        *  \param[out] Buffer  Pointer to the destination data buffer to write to.\r
-                        *  \param[in]  Length  Number of bytes to send via the currently selected endpoint.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Read_Control_Stream_LE(void* const Buffer,\r
-                                                               uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** Reads the given number of bytes from the CONTROL endpoint from the given buffer in big endian,\r
-                        *  discarding fully read packets from the host as needed. The device IN acknowledgement is not\r
-                        *  automatically sent after success or failure states; the user is responsible for manually sending the\r
-                        *  setup IN to finalize the transfer via the \ref Endpoint_ClearIN() macro.\r
-                        *\r
-                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt\r
-                        *        to clear the status stage when using this routine in a control transaction.\r
-                        *        \n\n\r
-                        *\r
-                        *  \note This routine should only be used on CONTROL type endpoints.\r
-                        *\r
-                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained\r
-                        *           together; i.e. the entire stream data must be read or written at the one time.\r
-                        *\r
-                        *  \param[out] Buffer  Pointer to the destination data buffer to write to.\r
-                        *  \param[in]  Length  Number of bytes to send via the currently selected endpoint.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Read_Control_Stream_BE(void* const Buffer,\r
-                                                               uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);\r
-                       //@}\r
-\r
-                       /** \name Stream functions for EEPROM source/destination data */\r
-                       //@{\r
-\r
-                       /** EEPROM buffer source version of \ref Endpoint_Write_Stream_LE().\r
-                        *\r
-                        *  \param[in] Buffer          Pointer to the source data buffer to read from.\r
-                        *  \param[in] Length          Number of bytes to read for the currently selected endpoint into the buffer.\r
-                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current\r
-                        *                             transaction should be updated, \c NULL if the entire stream should be written at once.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Write_EStream_LE(const void* const Buffer,\r
-                                                         uint16_t Length,\r
-                                                         uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** EEPROM buffer source version of \ref Endpoint_Write_Stream_BE().\r
-                        *\r
-                        *  \param[in] Buffer          Pointer to the source data buffer to read from.\r
-                        *  \param[in] Length          Number of bytes to read for the currently selected endpoint into the buffer.\r
-                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current\r
-                        *                             transaction should be updated, \c NULL if the entire stream should be written at once.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Write_EStream_BE(const void* const Buffer,\r
-                                                         uint16_t Length,\r
-                                                         uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** EEPROM buffer destination version of \ref Endpoint_Read_Stream_LE().\r
-                        *\r
-                        *  \param[out] Buffer          Pointer to the destination data buffer to write to, located in EEPROM memory space.\r
-                        *  \param[in]  Length          Number of bytes to send via the currently selected endpoint.\r
-                        *  \param[in]  BytesProcessed  Pointer to a location where the total number of bytes processed in the current\r
-                        *                              transaction should be updated, \c NULL if the entire stream should be read at once.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Read_EStream_LE(void* const Buffer,\r
-                                                        uint16_t Length,\r
-                                                        uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** EEPROM buffer destination version of \ref Endpoint_Read_Stream_BE().\r
-                        *\r
-                        *  \param[out] Buffer          Pointer to the destination data buffer to write to, located in EEPROM memory space.\r
-                        *  \param[in]  Length          Number of bytes to send via the currently selected endpoint.\r
-                        *  \param[in]  BytesProcessed  Pointer to a location where the total number of bytes processed in the current\r
-                        *                              transaction should be updated, \c NULL if the entire stream should be read at once.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Read_EStream_BE(void* const Buffer,\r
-                                                        uint16_t Length,\r
-                                                        uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** EEPROM buffer source version of Endpoint_Write_Control_Stream_LE.\r
-                        *\r
-                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt\r
-                        *        to clear the status stage when using this routine in a control transaction.\r
-                        *        \n\n\r
-                        *\r
-                        *  \note This routine should only be used on CONTROL type endpoints.\r
-                        *        \n\n\r
-                        *\r
-                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained\r
-                        *           together; i.e. the entire stream data must be read or written at the one time.\r
-                        *\r
-                        *  \param[in] Buffer  Pointer to the source data buffer to read from.\r
-                        *  \param[in] Length  Number of bytes to read for the currently selected endpoint into the buffer.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Write_Control_EStream_LE(const void* const Buffer,\r
-                                                                 uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** EEPROM buffer source version of \ref Endpoint_Write_Control_Stream_BE().\r
-                        *\r
-                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt\r
-                        *        to clear the status stage when using this routine in a control transaction.\r
-                        *        \n\n\r
-                        *\r
-                        *  \note This routine should only be used on CONTROL type endpoints.\r
-                        *        \n\n\r
-                        *\r
-                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained\r
-                        *           together; i.e. the entire stream data must be read or written at the one time.\r
-                        *\r
-                        *  \param[in] Buffer  Pointer to the source data buffer to read from.\r
-                        *  \param[in] Length  Number of bytes to read for the currently selected endpoint into the buffer.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Write_Control_EStream_BE(const void* const Buffer,\r
-                                                                 uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** EEPROM buffer source version of \ref Endpoint_Read_Control_Stream_LE().\r
-                        *\r
-                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt\r
-                        *        to clear the status stage when using this routine in a control transaction.\r
-                        *        \n\n\r
-                        *\r
-                        *  \note This routine should only be used on CONTROL type endpoints.\r
-                        *        \n\n\r
-                        *\r
-                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained\r
-                        *           together; i.e. the entire stream data must be read or written at the one time.\r
-                        *\r
-                        *  \param[out] Buffer  Pointer to the destination data buffer to write to.\r
-                        *  \param[in]  Length  Number of bytes to send via the currently selected endpoint.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Read_Control_EStream_LE(void* const Buffer,\r
-                                                                uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** EEPROM buffer source version of \ref Endpoint_Read_Control_Stream_BE().\r
-                        *\r
-                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt\r
-                        *        to clear the status stage when using this routine in a control transaction.\r
-                        *        \n\n\r
-                        *\r
-                        *  \note This routine should only be used on CONTROL type endpoints.\r
-                        *        \n\n\r
-                        *\r
-                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained\r
-                        *           together; i.e. the entire stream data must be read or written at the one time.\r
-                        *\r
-                        *  \param[out] Buffer  Pointer to the destination data buffer to write to.\r
-                        *  \param[in]  Length  Number of bytes to send via the currently selected endpoint.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Read_Control_EStream_BE(void* const Buffer,\r
-                                                                uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);\r
-                       //@}\r
-\r
-                       /** \name Stream functions for PROGMEM source/destination data */\r
-                       //@{\r
-\r
-                       /** FLASH buffer source version of \ref Endpoint_Write_Stream_LE().\r
-                        *\r
-                        *  \pre The FLASH data must be located in the first 64KB of FLASH for this function to work correctly.\r
-                        *\r
-                        *  \param[in] Buffer          Pointer to the source data buffer to read from.\r
-                        *  \param[in] Length          Number of bytes to read for the currently selected endpoint into the buffer.\r
-                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current\r
-                        *                             transaction should be updated, \c NULL if the entire stream should be written at once.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Write_PStream_LE(const void* const Buffer,\r
-                                                         uint16_t Length,\r
-                                                         uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** FLASH buffer source version of \ref Endpoint_Write_Stream_BE().\r
-                        *\r
-                        *  \pre The FLASH data must be located in the first 64KB of FLASH for this function to work correctly.\r
-                        *\r
-                        *  \param[in] Buffer          Pointer to the source data buffer to read from.\r
-                        *  \param[in] Length          Number of bytes to read for the currently selected endpoint into the buffer.\r
-                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current\r
-                        *                             transaction should be updated, \c NULL if the entire stream should be written at once.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Write_PStream_BE(const void* const Buffer,\r
-                                                         uint16_t Length,\r
-                                                         uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** FLASH buffer source version of \ref Endpoint_Write_Control_Stream_LE().\r
-                        *\r
-                        *  \pre The FLASH data must be located in the first 64KB of FLASH for this function to work correctly.\r
-                        *\r
-                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt\r
-                        *        to clear the status stage when using this routine in a control transaction.\r
-                        *        \n\n\r
-                        *\r
-                        *  \note This routine should only be used on CONTROL type endpoints.\r
-                        *        \n\n\r
-                        *\r
-                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained\r
-                        *           together; i.e. the entire stream data must be read or written at the one time.\r
-                        *\r
-                        *  \param[in] Buffer  Pointer to the source data buffer to read from.\r
-                        *  \param[in] Length  Number of bytes to read for the currently selected endpoint into the buffer.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Write_Control_PStream_LE(const void* const Buffer,\r
-                                                                 uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** FLASH buffer source version of \ref Endpoint_Write_Control_Stream_BE().\r
-                        *\r
-                        *  \pre The FLASH data must be located in the first 64KB of FLASH for this function to work correctly.\r
-                        *\r
-                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt\r
-                        *        to clear the status stage when using this routine in a control transaction.\r
-                        *        \n\n\r
-                        *\r
-                        *  \note This routine should only be used on CONTROL type endpoints.\r
-                        *        \n\n\r
-                        *\r
-                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained\r
-                        *           together; i.e. the entire stream data must be read or written at the one time.\r
-                        *\r
-                        *  \param[in] Buffer  Pointer to the source data buffer to read from.\r
-                        *  \param[in] Length  Number of bytes to read for the currently selected endpoint into the buffer.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Write_Control_PStream_BE(const void* const Buffer,\r
-                                                                 uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);\r
-                       //@}\r
-\r
-       /* Disable C linkage for C++ Compilers: */\r
-               #if defined(__cplusplus)\r
-                       }\r
-               #endif\r
-               \r
-#endif\r
-\r
-/** @} */\r
+/*
+             LUFA Library
+     Copyright (C) Dean Camera, 2012.
+              
+  dean [at] fourwalledcubicle [dot] com
+           www.lufa-lib.org
+*/
+
+/*
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+  Permission to use, copy, modify, distribute, and sell this 
+  software and its documentation for any purpose is hereby granted
+  without fee, provided that the above copyright notice appear in 
+  all copies and that both that the copyright notice and this
+  permission notice and warranty disclaimer appear in supporting 
+  documentation, and that the name of the author not be used in 
+  advertising or publicity pertaining to distribution of the 
+  software without specific, written prior permission.
+
+  The author disclaim all warranties with regard to this
+  software, including all implied warranties of merchantability
+  and fitness.  In no event shall the author be liable for any
+  special, indirect or consequential damages or any damages
+  whatsoever resulting from loss of use, data or profits, whether
+  in an action of contract, negligence or other tortious action,
+  arising out of or in connection with the use or performance of
+  this software.
+*/
+
+/** \file
+ *  \brief Endpoint data stream transmission and reception management for the AVR8 microcontrollers.
+ *  \copydetails Group_EndpointStreamRW_AVR8
+ *
+ *  \note This file should not be included directly. It is automatically included as needed by the USB driver
+ *        dispatch header located in LUFA/Drivers/USB/USB.h.
+ */
+
+/** \ingroup Group_EndpointStreamRW
+ *  \defgroup Group_EndpointStreamRW_AVR8 Read/Write of Multi-Byte Streams (AVR8)
+ *  \brief Endpoint data stream transmission and reception management for the Atmel AVR8 architecture.
+ *
+ *  Functions, macros, variables, enums and types related to data reading and writing of data streams from
+ *  and to endpoints.
+ *
+ *  @{
+ */ 
+
+#ifndef __ENDPOINT_STREAM_AVR8_H__
+#define __ENDPOINT_STREAM_AVR8_H__
+
+       /* Includes: */
+               #include "../../../../Common/Common.h"
+               #include "../USBMode.h"         
+               #include "../USBTask.h"
+               
+       /* Enable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       extern "C" {
+               #endif
+
+       /* Preprocessor Checks: */
+               #if !defined(__INCLUDE_FROM_USB_DRIVER)
+                       #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.
+               #endif
+
+       /* Public Interface - May be used in end-application: */
+               /* Function Prototypes: */
+                       /** \name Stream functions for null data */
+                       //@{
+
+                       /** Reads and discards the given number of bytes from the currently selected endpoint's bank,
+                        *  discarding fully read packets from the host as needed. The last packet is not automatically
+                        *  discarded once the remaining bytes has been read; the user is responsible for manually
+                        *  discarding the last packet from the host via the \ref Endpoint_ClearOUT() macro.
+                        *
+                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once,
+                        *  failing or succeeding as a single unit. If the BytesProcessed parameter points to a valid
+                        *  storage location, the transfer will instead be performed as a series of chunks. Each time
+                        *  the endpoint bank becomes empty while there is still data to process (and after the current
+                        *  packet has been acknowledged) the BytesProcessed location will be updated with the total number
+                        *  of bytes processed in the stream, and the function will exit with an error code of
+                        *  \ref ENDPOINT_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed
+                        *  in the user code - to continue the transfer, call the function again with identical parameters
+                        *  and it will resume until the BytesProcessed value reaches the total transfer length.
+                        *
+                        *  <b>Single Stream Transfer Example:</b>
+                        *  \code
+                        *  uint8_t ErrorCode;
+                        *  
+                        *  if ((ErrorCode = Endpoint_Discard_Stream(512, NULL)) != ENDPOINT_RWSTREAM_NoError)
+                        *  {
+                        *       // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  <b>Partial Stream Transfers Example:</b>
+                        *  \code
+                        *  uint8_t  ErrorCode;
+                        *  uint16_t BytesProcessed;
+                        *  
+                        *  BytesProcessed = 0;
+                        *  while ((ErrorCode = Endpoint_Discard_Stream(512, &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)
+                        *  {
+                        *      // Stream not yet complete - do other actions here, abort if required
+                        *  }
+                        *  
+                        *  if (ErrorCode != ENDPOINT_RWSTREAM_NoError)
+                        *  {
+                        *      // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  \note This routine should not be used on CONTROL type endpoints.
+                        *
+                        *  \param[in] Length          Number of bytes to discard via the currently selected endpoint.
+                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current
+                        *                             transaction should be updated, \c NULL if the entire stream should be read at once.
+                        *
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Discard_Stream(uint16_t Length,
+                                                       uint16_t* const BytesProcessed);
+
+                       /** Writes a given number of zeroed bytes to the currently selected endpoint's bank, sending
+                        *  full packets to the host as needed. The last packet is not automatically sent once the 
+                        *  remaining bytes have been written; the user is responsible for manually sending the last
+                        *  packet to the host via the \ref Endpoint_ClearIN() macro.
+                        *
+                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once,
+                        *  failing or succeeding as a single unit. If the BytesProcessed parameter points to a valid
+                        *  storage location, the transfer will instead be performed as a series of chunks. Each time
+                        *  the endpoint bank becomes full while there is still data to process (and after the current
+                        *  packet transmission has been initiated) the BytesProcessed location will be updated with the
+                        *  total number of bytes processed in the stream, and the function will exit with an error code of
+                        *  \ref ENDPOINT_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed
+                        *  in the user code - to continue the transfer, call the function again with identical parameters
+                        *  and it will resume until the BytesProcessed value reaches the total transfer length.
+                        *
+                        *  <b>Single Stream Transfer Example:</b>
+                        *  \code
+                        *  uint8_t ErrorCode;
+                        *  
+                        *  if ((ErrorCode = Endpoint_Null_Stream(512, NULL)) != ENDPOINT_RWSTREAM_NoError)
+                        *  {
+                        *       // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  <b>Partial Stream Transfers Example:</b>
+                        *  \code
+                        *  uint8_t  ErrorCode;
+                        *  uint16_t BytesProcessed;
+                        *  
+                        *  BytesProcessed = 0;
+                        *  while ((ErrorCode = Endpoint_Null_Stream(512, &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)
+                        *  {
+                        *      // Stream not yet complete - do other actions here, abort if required
+                        *  }
+                        *  
+                        *  if (ErrorCode != ENDPOINT_RWSTREAM_NoError)
+                        *  {
+                        *      // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  \note This routine should not be used on CONTROL type endpoints.
+                        *
+                        *  \param[in] Length          Number of zero bytes to send via the currently selected endpoint.
+                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current
+                        *                             transaction should be updated, \c NULL if the entire stream should be read at once.
+                        *
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Null_Stream(uint16_t Length,
+                                                    uint16_t* const BytesProcessed);
+
+                       //@}
+
+                       /** \name Stream functions for RAM source/destination data */
+                       //@{
+               
+                       /** Writes the given number of bytes to the endpoint from the given buffer in little endian,
+                        *  sending full packets to the host as needed. The last packet filled is not automatically sent;
+                        *  the user is responsible for manually sending the last written packet to the host via the
+                        *  \ref Endpoint_ClearIN() macro.
+                        *
+                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once,
+                        *  failing or succeeding as a single unit. If the BytesProcessed parameter points to a valid
+                        *  storage location, the transfer will instead be performed as a series of chunks. Each time
+                        *  the endpoint bank becomes full while there is still data to process (and after the current
+                        *  packet transmission has been initiated) the BytesProcessed location will be updated with the
+                        *  total number of bytes processed in the stream, and the function will exit with an error code of
+                        *  \ref ENDPOINT_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed
+                        *  in the user code - to continue the transfer, call the function again with identical parameters
+                        *  and it will resume until the BytesProcessed value reaches the total transfer length.
+                        *
+                        *  <b>Single Stream Transfer Example:</b>
+                        *  \code
+                        *  uint8_t DataStream[512];
+                        *  uint8_t ErrorCode;
+                        *  
+                        *  if ((ErrorCode = Endpoint_Write_Stream_LE(DataStream, sizeof(DataStream),
+                        *                                            NULL)) != ENDPOINT_RWSTREAM_NoError)
+                        *  {
+                        *       // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  <b>Partial Stream Transfers Example:</b>
+                        *  \code
+                        *  uint8_t  DataStream[512];
+                        *  uint8_t  ErrorCode;
+                        *  uint16_t BytesProcessed;
+                        *
+                        *  BytesProcessed = 0;
+                        *  while ((ErrorCode = Endpoint_Write_Stream_LE(DataStream, sizeof(DataStream),
+                        *                                               &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)
+                        *  {
+                        *      // Stream not yet complete - do other actions here, abort if required
+                        *  }
+                        *
+                        *  if (ErrorCode != ENDPOINT_RWSTREAM_NoError)
+                        *  {
+                        *      // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  \note This routine should not be used on CONTROL type endpoints.
+                        *
+                        *  \param[in] Buffer          Pointer to the source data buffer to read from.
+                        *  \param[in] Length          Number of bytes to read for the currently selected endpoint into the buffer.
+                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current
+                        *                             transaction should be updated, \c NULL if the entire stream should be written at once.
+                        *
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Write_Stream_LE(const void* const Buffer,
+                                                        uint16_t Length,
+                                                        uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** Writes the given number of bytes to the endpoint from the given buffer in big endian,
+                        *  sending full packets to the host as needed. The last packet filled is not automatically sent;
+                        *  the user is responsible for manually sending the last written packet to the host via the
+                        *  \ref Endpoint_ClearIN() macro.
+                        *
+                        *  \note This routine should not be used on CONTROL type endpoints.
+                        *
+                        *  \param[in] Buffer          Pointer to the source data buffer to read from.
+                        *  \param[in] Length          Number of bytes to read for the currently selected endpoint into the buffer.
+                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current
+                        *                             transaction should be updated, \c NULL if the entire stream should be written at once.
+                        *
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Write_Stream_BE(const void* const Buffer,
+                                                        uint16_t Length,
+                                                        uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+                       
+                       /** Reads the given number of bytes from the endpoint from the given buffer in little endian,
+                        *  discarding fully read packets from the host as needed. The last packet is not automatically
+                        *  discarded once the remaining bytes has been read; the user is responsible for manually
+                        *  discarding the last packet from the host via the \ref Endpoint_ClearOUT() macro.
+                        *
+                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once,
+                        *  failing or succeeding as a single unit. If the BytesProcessed parameter points to a valid
+                        *  storage location, the transfer will instead be performed as a series of chunks. Each time
+                        *  the endpoint bank becomes empty while there is still data to process (and after the current
+                        *  packet has been acknowledged) the BytesProcessed location will be updated with the total number
+                        *  of bytes processed in the stream, and the function will exit with an error code of
+                        *  \ref ENDPOINT_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed
+                        *  in the user code - to continue the transfer, call the function again with identical parameters
+                        *  and it will resume until the BytesProcessed value reaches the total transfer length.
+                        *
+                        *  <b>Single Stream Transfer Example:</b>
+                        *  \code
+                        *  uint8_t DataStream[512];
+                        *  uint8_t ErrorCode;
+                        *  
+                        *  if ((ErrorCode = Endpoint_Read_Stream_LE(DataStream, sizeof(DataStream),
+                        *                                           NULL)) != ENDPOINT_RWSTREAM_NoError)
+                        *  {
+                        *       // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  <b>Partial Stream Transfers Example:</b>
+                        *  \code
+                        *  uint8_t  DataStream[512];
+                        *  uint8_t  ErrorCode;
+                        *  uint16_t BytesProcessed;
+                        *  
+                        *  BytesProcessed = 0;
+                        *  while ((ErrorCode = Endpoint_Read_Stream_LE(DataStream, sizeof(DataStream),
+                        *                                              &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)
+                        *  {
+                        *      // Stream not yet complete - do other actions here, abort if required
+                        *  }
+                        *  
+                        *  if (ErrorCode != ENDPOINT_RWSTREAM_NoError)
+                        *  {
+                        *      // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  \note This routine should not be used on CONTROL type endpoints.
+                        *
+                        *  \param[out] Buffer          Pointer to the destination data buffer to write to.
+                        *  \param[in]  Length          Number of bytes to send via the currently selected endpoint.
+                        *  \param[in]  BytesProcessed  Pointer to a location where the total number of bytes processed in the current
+                        *                              transaction should be updated, \c NULL if the entire stream should be read at once.
+                        *
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Read_Stream_LE(void* const Buffer,
+                                                       uint16_t Length,
+                                                       uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** Reads the given number of bytes from the endpoint from the given buffer in big endian,
+                        *  discarding fully read packets from the host as needed. The last packet is not automatically
+                        *  discarded once the remaining bytes has been read; the user is responsible for manually
+                        *  discarding the last packet from the host via the \ref Endpoint_ClearOUT() macro.
+                        *
+                        *  \note This routine should not be used on CONTROL type endpoints.
+                        *
+                        *  \param[out] Buffer          Pointer to the destination data buffer to write to.
+                        *  \param[in]  Length          Number of bytes to send via the currently selected endpoint.
+                        *  \param[in]  BytesProcessed  Pointer to a location where the total number of bytes processed in the current
+                        *                              transaction should be updated, \c NULL if the entire stream should be read at once.
+                        *
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Read_Stream_BE(void* const Buffer,
+                                                       uint16_t Length,
+                                                       uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** Writes the given number of bytes to the CONTROL type endpoint from the given buffer in little endian,
+                        *  sending full packets to the host as needed. The host OUT acknowledgement is not automatically cleared
+                        *  in both failure and success states; the user is responsible for manually clearing the status OUT packet
+                        *  to finalize the transfer's status stage via the \ref Endpoint_ClearOUT() macro.
+                        *
+                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt
+                        *        to clear the status stage when using this routine in a control transaction.
+                        *        \n\n
+                        *
+                        *  \note This routine should only be used on CONTROL type endpoints.
+                        *
+                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained
+                        *           together; i.e. the entire stream data must be read or written at the one time.
+                        *
+                        *  \param[in] Buffer  Pointer to the source data buffer to read from.
+                        *  \param[in] Length  Number of bytes to read for the currently selected endpoint into the buffer.
+                        *
+                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Write_Control_Stream_LE(const void* const Buffer,
+                                                                uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** Writes the given number of bytes to the CONTROL type endpoint from the given buffer in big endian,
+                        *  sending full packets to the host as needed. The host OUT acknowledgement is not automatically cleared
+                        *  in both failure and success states; the user is responsible for manually clearing the status OUT packet
+                        *  to finalize the transfer's status stage via the \ref Endpoint_ClearOUT() macro.
+                        *
+                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt
+                        *        to clear the status stage when using this routine in a control transaction.
+                        *        \n\n
+                        *
+                        *  \note This routine should only be used on CONTROL type endpoints.
+                        *
+                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained
+                        *           together; i.e. the entire stream data must be read or written at the one time.
+                        *
+                        *  \param[in] Buffer  Pointer to the source data buffer to read from.
+                        *  \param[in] Length  Number of bytes to read for the currently selected endpoint into the buffer.
+                        *
+                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Write_Control_Stream_BE(const void* const Buffer,
+                                                                uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** Reads the given number of bytes from the CONTROL endpoint from the given buffer in little endian,
+                        *  discarding fully read packets from the host as needed. The device IN acknowledgement is not
+                        *  automatically sent after success or failure states; the user is responsible for manually sending the
+                        *  status IN packet to finalize the transfer's status stage via the \ref Endpoint_ClearIN() macro.
+                        *
+                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt
+                        *        to clear the status stage when using this routine in a control transaction.
+                        *        \n\n
+                        *
+                        *  \note This routine should only be used on CONTROL type endpoints.
+                        *
+                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained
+                        *           together; i.e. the entire stream data must be read or written at the one time.
+                        *
+                        *  \param[out] Buffer  Pointer to the destination data buffer to write to.
+                        *  \param[in]  Length  Number of bytes to send via the currently selected endpoint.
+                        *
+                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Read_Control_Stream_LE(void* const Buffer,
+                                                               uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** Reads the given number of bytes from the CONTROL endpoint from the given buffer in big endian,
+                        *  discarding fully read packets from the host as needed. The device IN acknowledgement is not
+                        *  automatically sent after success or failure states; the user is responsible for manually sending the
+                        *  status IN packet to finalize the transfer's status stage via the \ref Endpoint_ClearIN() macro.
+                        *
+                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt
+                        *        to clear the status stage when using this routine in a control transaction.
+                        *        \n\n
+                        *
+                        *  \note This routine should only be used on CONTROL type endpoints.
+                        *
+                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained
+                        *           together; i.e. the entire stream data must be read or written at the one time.
+                        *
+                        *  \param[out] Buffer  Pointer to the destination data buffer to write to.
+                        *  \param[in]  Length  Number of bytes to send via the currently selected endpoint.
+                        *
+                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Read_Control_Stream_BE(void* const Buffer,
+                                                               uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
+                       //@}
+
+                       /** \name Stream functions for EEPROM source/destination data */
+                       //@{
+
+                       /** EEPROM buffer source version of \ref Endpoint_Write_Stream_LE().
+                        *
+                        *  \param[in] Buffer          Pointer to the source data buffer to read from.
+                        *  \param[in] Length          Number of bytes to read for the currently selected endpoint into the buffer.
+                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current
+                        *                             transaction should be updated, \c NULL if the entire stream should be written at once.
+                        *
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Write_EStream_LE(const void* const Buffer,
+                                                         uint16_t Length,
+                                                         uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** EEPROM buffer source version of \ref Endpoint_Write_Stream_BE().
+                        *
+                        *  \param[in] Buffer          Pointer to the source data buffer to read from.
+                        *  \param[in] Length          Number of bytes to read for the currently selected endpoint into the buffer.
+                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current
+                        *                             transaction should be updated, \c NULL if the entire stream should be written at once.
+                        *
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Write_EStream_BE(const void* const Buffer,
+                                                         uint16_t Length,
+                                                         uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** EEPROM buffer destination version of \ref Endpoint_Read_Stream_LE().
+                        *
+                        *  \param[out] Buffer          Pointer to the destination data buffer to write to, located in EEPROM memory space.
+                        *  \param[in]  Length          Number of bytes to send via the currently selected endpoint.
+                        *  \param[in]  BytesProcessed  Pointer to a location where the total number of bytes processed in the current
+                        *                              transaction should be updated, \c NULL if the entire stream should be read at once.
+                        *
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Read_EStream_LE(void* const Buffer,
+                                                        uint16_t Length,
+                                                        uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** EEPROM buffer destination version of \ref Endpoint_Read_Stream_BE().
+                        *
+                        *  \param[out] Buffer          Pointer to the destination data buffer to write to, located in EEPROM memory space.
+                        *  \param[in]  Length          Number of bytes to send via the currently selected endpoint.
+                        *  \param[in]  BytesProcessed  Pointer to a location where the total number of bytes processed in the current
+                        *                              transaction should be updated, \c NULL if the entire stream should be read at once.
+                        *
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Read_EStream_BE(void* const Buffer,
+                                                        uint16_t Length,
+                                                        uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** EEPROM buffer source version of Endpoint_Write_Control_Stream_LE.
+                        *
+                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt
+                        *        to clear the status stage when using this routine in a control transaction.
+                        *        \n\n
+                        *
+                        *  \note This routine should only be used on CONTROL type endpoints.
+                        *        \n\n
+                        *
+                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained
+                        *           together; i.e. the entire stream data must be read or written at the one time.
+                        *
+                        *  \param[in] Buffer  Pointer to the source data buffer to read from.
+                        *  \param[in] Length  Number of bytes to read for the currently selected endpoint into the buffer.
+                        *
+                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Write_Control_EStream_LE(const void* const Buffer,
+                                                                 uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** EEPROM buffer source version of \ref Endpoint_Write_Control_Stream_BE().
+                        *
+                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt
+                        *        to clear the status stage when using this routine in a control transaction.
+                        *        \n\n
+                        *
+                        *  \note This routine should only be used on CONTROL type endpoints.
+                        *        \n\n
+                        *
+                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained
+                        *           together; i.e. the entire stream data must be read or written at the one time.
+                        *
+                        *  \param[in] Buffer  Pointer to the source data buffer to read from.
+                        *  \param[in] Length  Number of bytes to read for the currently selected endpoint into the buffer.
+                        *
+                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Write_Control_EStream_BE(const void* const Buffer,
+                                                                 uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** EEPROM buffer source version of \ref Endpoint_Read_Control_Stream_LE().
+                        *
+                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt
+                        *        to clear the status stage when using this routine in a control transaction.
+                        *        \n\n
+                        *
+                        *  \note This routine should only be used on CONTROL type endpoints.
+                        *        \n\n
+                        *
+                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained
+                        *           together; i.e. the entire stream data must be read or written at the one time.
+                        *
+                        *  \param[out] Buffer  Pointer to the destination data buffer to write to.
+                        *  \param[in]  Length  Number of bytes to send via the currently selected endpoint.
+                        *
+                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Read_Control_EStream_LE(void* const Buffer,
+                                                                uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** EEPROM buffer source version of \ref Endpoint_Read_Control_Stream_BE().
+                        *
+                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt
+                        *        to clear the status stage when using this routine in a control transaction.
+                        *        \n\n
+                        *
+                        *  \note This routine should only be used on CONTROL type endpoints.
+                        *        \n\n
+                        *
+                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained
+                        *           together; i.e. the entire stream data must be read or written at the one time.
+                        *
+                        *  \param[out] Buffer  Pointer to the destination data buffer to write to.
+                        *  \param[in]  Length  Number of bytes to send via the currently selected endpoint.
+                        *
+                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Read_Control_EStream_BE(void* const Buffer,
+                                                                uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
+                       //@}
+
+                       /** \name Stream functions for PROGMEM source/destination data */
+                       //@{
+
+                       /** FLASH buffer source version of \ref Endpoint_Write_Stream_LE().
+                        *
+                        *  \pre The FLASH data must be located in the first 64KB of FLASH for this function to work correctly.
+                        *
+                        *  \param[in] Buffer          Pointer to the source data buffer to read from.
+                        *  \param[in] Length          Number of bytes to read for the currently selected endpoint into the buffer.
+                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current
+                        *                             transaction should be updated, \c NULL if the entire stream should be written at once.
+                        *
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Write_PStream_LE(const void* const Buffer,
+                                                         uint16_t Length,
+                                                         uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** FLASH buffer source version of \ref Endpoint_Write_Stream_BE().
+                        *
+                        *  \pre The FLASH data must be located in the first 64KB of FLASH for this function to work correctly.
+                        *
+                        *  \param[in] Buffer          Pointer to the source data buffer to read from.
+                        *  \param[in] Length          Number of bytes to read for the currently selected endpoint into the buffer.
+                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current
+                        *                             transaction should be updated, \c NULL if the entire stream should be written at once.
+                        *
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Write_PStream_BE(const void* const Buffer,
+                                                         uint16_t Length,
+                                                         uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** FLASH buffer source version of \ref Endpoint_Write_Control_Stream_LE().
+                        *
+                        *  \pre The FLASH data must be located in the first 64KB of FLASH for this function to work correctly.
+                        *
+                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt
+                        *        to clear the status stage when using this routine in a control transaction.
+                        *        \n\n
+                        *
+                        *  \note This routine should only be used on CONTROL type endpoints.
+                        *        \n\n
+                        *
+                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained
+                        *           together; i.e. the entire stream data must be read or written at the one time.
+                        *
+                        *  \param[in] Buffer  Pointer to the source data buffer to read from.
+                        *  \param[in] Length  Number of bytes to read for the currently selected endpoint into the buffer.
+                        *
+                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Write_Control_PStream_LE(const void* const Buffer,
+                                                                 uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** FLASH buffer source version of \ref Endpoint_Write_Control_Stream_BE().
+                        *
+                        *  \pre The FLASH data must be located in the first 64KB of FLASH for this function to work correctly.
+                        *
+                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt
+                        *        to clear the status stage when using this routine in a control transaction.
+                        *        \n\n
+                        *
+                        *  \note This routine should only be used on CONTROL type endpoints.
+                        *        \n\n
+                        *
+                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained
+                        *           together; i.e. the entire stream data must be read or written at the one time.
+                        *
+                        *  \param[in] Buffer  Pointer to the source data buffer to read from.
+                        *  \param[in] Length  Number of bytes to read for the currently selected endpoint into the buffer.
+                        *
+                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Write_Control_PStream_BE(const void* const Buffer,
+                                                                 uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
+                       //@}
+
+       /* Disable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       }
+               #endif
+               
+#endif
+
+/** @} */
 
index 056981a..57d9b0d 100644 (file)
                                                                      const uint16_t Size,
                                                                      const uint8_t Banks)
                        {
-                               return Endpoint_ConfigureEndpoint_Prv((Address & ENDPOINT_EPNUM_MASK),
+                               uint8_t Number = (Address & ENDPOINT_EPNUM_MASK);
+                       
+                               if (Number >= ENDPOINT_TOTAL_ENDPOINTS)
+                                 return false;
+                       
+                               return Endpoint_ConfigureEndpoint_Prv(Number,
                                                                      ((Type << EPTYPE0) | ((Address & ENDPOINT_DIR_IN) ? (1 << EPDIR) : 0)),
                                                                      ((1 << ALLOC) | ((Banks > 1) ? (1 << EPBK0) : 0) | Endpoint_BytesToEPSizeMask(Size)));
                        }
index e71a7bd..3d80a33 100644 (file)
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2012.\r
-              \r
-  dean [at] fourwalledcubicle [dot] com\r
-           www.lufa-lib.org\r
-*/\r
-\r
-/*\r
-  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, distribute, and sell this \r
-  software and its documentation for any purpose is hereby granted\r
-  without fee, provided that the above copyright notice appear in \r
-  all copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting \r
-  documentation, and that the name of the author not be used in \r
-  advertising or publicity pertaining to distribution of the \r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-#include "../../../../Common/Common.h"\r
-#if (ARCH == ARCH_AVR8)\r
-\r
-#define  __INCLUDE_FROM_USB_DRIVER\r
-#include "../USBMode.h"\r
-\r
-#if defined(USB_CAN_BE_HOST)\r
-\r
-#include "PipeStream_AVR8.h"\r
-\r
-uint8_t Pipe_Discard_Stream(uint16_t Length,\r
-                            uint16_t* const BytesProcessed)\r
-{\r
-       uint8_t  ErrorCode;\r
-       uint16_t BytesInTransfer = 0;\r
-       \r
-       Pipe_SetPipeToken(PIPE_TOKEN_IN);\r
-\r
-       if ((ErrorCode = Pipe_WaitUntilReady()))\r
-         return ErrorCode;\r
-\r
-       if (BytesProcessed != NULL)\r
-         Length -= *BytesProcessed;\r
-\r
-       while (Length)\r
-       {\r
-               if (!(Pipe_IsReadWriteAllowed()))\r
-               {\r
-                       Pipe_ClearIN();\r
-                               \r
-                       if (BytesProcessed != NULL)\r
-                       {\r
-                               *BytesProcessed += BytesInTransfer;\r
-                               return PIPE_RWSTREAM_IncompleteTransfer;\r
-                       }\r
-\r
-                       if ((ErrorCode = Pipe_WaitUntilReady()))\r
-                         return ErrorCode;\r
-               }\r
-               else\r
-               {\r
-                       Pipe_Discard_8();\r
-                       \r
-                       Length--;\r
-                       BytesInTransfer++;\r
-               }\r
-       }\r
-\r
-       return PIPE_RWSTREAM_NoError;\r
-}\r
-\r
-uint8_t Pipe_Null_Stream(uint16_t Length,\r
-                         uint16_t* const BytesProcessed)\r
-{\r
-       uint8_t  ErrorCode;\r
-       uint16_t BytesInTransfer = 0;\r
-       \r
-       Pipe_SetPipeToken(PIPE_TOKEN_OUT);\r
-\r
-       if ((ErrorCode = Pipe_WaitUntilReady()))\r
-         return ErrorCode;\r
-\r
-       if (BytesProcessed != NULL)\r
-         Length -= *BytesProcessed;\r
-\r
-       while (Length)\r
-       {\r
-               if (!(Pipe_IsReadWriteAllowed()))\r
-               {\r
-                       Pipe_ClearOUT();\r
-                               \r
-                       if (BytesProcessed != NULL)\r
-                       {\r
-                               *BytesProcessed += BytesInTransfer;\r
-                               return PIPE_RWSTREAM_IncompleteTransfer;\r
-                       }\r
-                       \r
-                       USB_USBTask();\r
-\r
-                       if ((ErrorCode = Pipe_WaitUntilReady()))\r
-                         return ErrorCode;\r
-               }\r
-               else\r
-               {\r
-                       Pipe_Write_8(0);\r
-                       \r
-                       Length--;\r
-                       BytesInTransfer++;\r
-               }\r
-       }\r
-\r
-       return PIPE_RWSTREAM_NoError;\r
-}\r
-\r
-/* The following abuses the C preprocessor in order to copy-paste common code with slight alterations,\r
- * so that the code needs to be written once. It is a crude form of templating to reduce code maintenance. */\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Pipe_Write_Stream_LE\r
-#define  TEMPLATE_BUFFER_TYPE                      const void*\r
-#define  TEMPLATE_TOKEN                            PIPE_TOKEN_OUT\r
-#define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearOUT()\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream += Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Pipe_Write_8(*BufferPtr)\r
-#include "Template/Template_Pipe_RW.c"\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Pipe_Write_Stream_BE\r
-#define  TEMPLATE_BUFFER_TYPE                      const void*\r
-#define  TEMPLATE_TOKEN                            PIPE_TOKEN_OUT\r
-#define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearOUT()\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream -= Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Pipe_Write_8(*BufferPtr)\r
-#include "Template/Template_Pipe_RW.c"\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Pipe_Read_Stream_LE\r
-#define  TEMPLATE_BUFFER_TYPE                      void*\r
-#define  TEMPLATE_TOKEN                            PIPE_TOKEN_IN\r
-#define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearIN()\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream += Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Pipe_Read_8()\r
-#include "Template/Template_Pipe_RW.c"\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Pipe_Read_Stream_BE\r
-#define  TEMPLATE_BUFFER_TYPE                      void*\r
-#define  TEMPLATE_TOKEN                            PIPE_TOKEN_IN\r
-#define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearIN()\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream -= Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Pipe_Read_8()\r
-#include "Template/Template_Pipe_RW.c"\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Pipe_Write_PStream_LE\r
-#define  TEMPLATE_BUFFER_TYPE                      const void*\r
-#define  TEMPLATE_TOKEN                            PIPE_TOKEN_OUT\r
-#define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearOUT()\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream += Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Pipe_Write_8(pgm_read_byte(BufferPtr))\r
-#include "Template/Template_Pipe_RW.c"\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Pipe_Write_PStream_BE\r
-#define  TEMPLATE_BUFFER_TYPE                      const void*\r
-#define  TEMPLATE_TOKEN                            PIPE_TOKEN_OUT\r
-#define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearOUT()\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream -= Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Pipe_Write_8(pgm_read_byte(BufferPtr))\r
-#include "Template/Template_Pipe_RW.c"\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Pipe_Write_EStream_LE\r
-#define  TEMPLATE_BUFFER_TYPE                      const void*\r
-#define  TEMPLATE_TOKEN                            PIPE_TOKEN_OUT\r
-#define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearOUT()\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream += Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Pipe_Write_8(eeprom_read_byte(BufferPtr))\r
-#include "Template/Template_Pipe_RW.c"\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Pipe_Write_EStream_BE\r
-#define  TEMPLATE_BUFFER_TYPE                      const void*\r
-#define  TEMPLATE_TOKEN                            PIPE_TOKEN_OUT\r
-#define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearOUT()\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream -= Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Pipe_Write_8(eeprom_read_byte(BufferPtr))\r
-#include "Template/Template_Pipe_RW.c"\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Pipe_Read_EStream_LE\r
-#define  TEMPLATE_BUFFER_TYPE                      void*\r
-#define  TEMPLATE_TOKEN                            PIPE_TOKEN_IN\r
-#define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearIN()\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream += Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         eeprom_update_byte(BufferPtr, Pipe_Read_8())\r
-#include "Template/Template_Pipe_RW.c"\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Pipe_Read_EStream_BE\r
-#define  TEMPLATE_BUFFER_TYPE                      void*\r
-#define  TEMPLATE_TOKEN                            PIPE_TOKEN_IN\r
-#define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearIN()\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream -= Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         eeprom_update_byte(BufferPtr, Pipe_Read_8())\r
-#include "Template/Template_Pipe_RW.c"\r
-\r
-#endif\r
-\r
-#endif\r
-\r
+/*
+             LUFA Library
+     Copyright (C) Dean Camera, 2012.
+              
+  dean [at] fourwalledcubicle [dot] com
+           www.lufa-lib.org
+*/
+
+/*
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+  Permission to use, copy, modify, distribute, and sell this 
+  software and its documentation for any purpose is hereby granted
+  without fee, provided that the above copyright notice appear in 
+  all copies and that both that the copyright notice and this
+  permission notice and warranty disclaimer appear in supporting 
+  documentation, and that the name of the author not be used in 
+  advertising or publicity pertaining to distribution of the 
+  software without specific, written prior permission.
+
+  The author disclaim all warranties with regard to this
+  software, including all implied warranties of merchantability
+  and fitness.  In no event shall the author be liable for any
+  special, indirect or consequential damages or any damages
+  whatsoever resulting from loss of use, data or profits, whether
+  in an action of contract, negligence or other tortious action,
+  arising out of or in connection with the use or performance of
+  this software.
+*/
+
+#include "../../../../Common/Common.h"
+#if (ARCH == ARCH_AVR8)
+
+#define  __INCLUDE_FROM_USB_DRIVER
+#include "../USBMode.h"
+
+#if defined(USB_CAN_BE_HOST)
+
+#include "PipeStream_AVR8.h"
+
+uint8_t Pipe_Discard_Stream(uint16_t Length,
+                            uint16_t* const BytesProcessed)
+{
+       uint8_t  ErrorCode;
+       uint16_t BytesInTransfer = 0;
+       
+       Pipe_SetPipeToken(PIPE_TOKEN_IN);
+
+       if ((ErrorCode = Pipe_WaitUntilReady()))
+         return ErrorCode;
+
+       if (BytesProcessed != NULL)
+         Length -= *BytesProcessed;
+
+       while (Length)
+       {
+               if (!(Pipe_IsReadWriteAllowed()))
+               {
+                       Pipe_ClearIN();
+                               
+                       if (BytesProcessed != NULL)
+                       {
+                               *BytesProcessed += BytesInTransfer;
+                               return PIPE_RWSTREAM_IncompleteTransfer;
+                       }
+
+                       if ((ErrorCode = Pipe_WaitUntilReady()))
+                         return ErrorCode;
+               }
+               else
+               {
+                       Pipe_Discard_8();
+                       
+                       Length--;
+                       BytesInTransfer++;
+               }
+       }
+
+       return PIPE_RWSTREAM_NoError;
+}
+
+uint8_t Pipe_Null_Stream(uint16_t Length,
+                         uint16_t* const BytesProcessed)
+{
+       uint8_t  ErrorCode;
+       uint16_t BytesInTransfer = 0;
+       
+       Pipe_SetPipeToken(PIPE_TOKEN_OUT);
+
+       if ((ErrorCode = Pipe_WaitUntilReady()))
+         return ErrorCode;
+
+       if (BytesProcessed != NULL)
+         Length -= *BytesProcessed;
+
+       while (Length)
+       {
+               if (!(Pipe_IsReadWriteAllowed()))
+               {
+                       Pipe_ClearOUT();
+                               
+                       if (BytesProcessed != NULL)
+                       {
+                               *BytesProcessed += BytesInTransfer;
+                               return PIPE_RWSTREAM_IncompleteTransfer;
+                       }
+                       
+                       USB_USBTask();
+
+                       if ((ErrorCode = Pipe_WaitUntilReady()))
+                         return ErrorCode;
+               }
+               else
+               {
+                       Pipe_Write_8(0);
+                       
+                       Length--;
+                       BytesInTransfer++;
+               }
+       }
+
+       return PIPE_RWSTREAM_NoError;
+}
+
+/* The following abuses the C preprocessor in order to copy-paste common code with slight alterations,
+ * so that the code needs to be written once. It is a crude form of templating to reduce code maintenance. */
+
+#define  TEMPLATE_FUNC_NAME                        Pipe_Write_Stream_LE
+#define  TEMPLATE_BUFFER_TYPE                      const void*
+#define  TEMPLATE_TOKEN                            PIPE_TOKEN_OUT
+#define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearOUT()
+#define  TEMPLATE_BUFFER_OFFSET(Length)            0
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream += Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Pipe_Write_8(*BufferPtr)
+#include "Template/Template_Pipe_RW.c"
+
+#define  TEMPLATE_FUNC_NAME                        Pipe_Write_Stream_BE
+#define  TEMPLATE_BUFFER_TYPE                      const void*
+#define  TEMPLATE_TOKEN                            PIPE_TOKEN_OUT
+#define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearOUT()
+#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream -= Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Pipe_Write_8(*BufferPtr)
+#include "Template/Template_Pipe_RW.c"
+
+#define  TEMPLATE_FUNC_NAME                        Pipe_Read_Stream_LE
+#define  TEMPLATE_BUFFER_TYPE                      void*
+#define  TEMPLATE_TOKEN                            PIPE_TOKEN_IN
+#define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearIN()
+#define  TEMPLATE_BUFFER_OFFSET(Length)            0
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream += Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Pipe_Read_8()
+#include "Template/Template_Pipe_RW.c"
+
+#define  TEMPLATE_FUNC_NAME                        Pipe_Read_Stream_BE
+#define  TEMPLATE_BUFFER_TYPE                      void*
+#define  TEMPLATE_TOKEN                            PIPE_TOKEN_IN
+#define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearIN()
+#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream -= Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Pipe_Read_8()
+#include "Template/Template_Pipe_RW.c"
+
+#define  TEMPLATE_FUNC_NAME                        Pipe_Write_PStream_LE
+#define  TEMPLATE_BUFFER_TYPE                      const void*
+#define  TEMPLATE_TOKEN                            PIPE_TOKEN_OUT
+#define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearOUT()
+#define  TEMPLATE_BUFFER_OFFSET(Length)            0
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream += Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Pipe_Write_8(pgm_read_byte(BufferPtr))
+#include "Template/Template_Pipe_RW.c"
+
+#define  TEMPLATE_FUNC_NAME                        Pipe_Write_PStream_BE
+#define  TEMPLATE_BUFFER_TYPE                      const void*
+#define  TEMPLATE_TOKEN                            PIPE_TOKEN_OUT
+#define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearOUT()
+#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream -= Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Pipe_Write_8(pgm_read_byte(BufferPtr))
+#include "Template/Template_Pipe_RW.c"
+
+#define  TEMPLATE_FUNC_NAME                        Pipe_Write_EStream_LE
+#define  TEMPLATE_BUFFER_TYPE                      const void*
+#define  TEMPLATE_TOKEN                            PIPE_TOKEN_OUT
+#define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearOUT()
+#define  TEMPLATE_BUFFER_OFFSET(Length)            0
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream += Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Pipe_Write_8(eeprom_read_byte(BufferPtr))
+#include "Template/Template_Pipe_RW.c"
+
+#define  TEMPLATE_FUNC_NAME                        Pipe_Write_EStream_BE
+#define  TEMPLATE_BUFFER_TYPE                      const void*
+#define  TEMPLATE_TOKEN                            PIPE_TOKEN_OUT
+#define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearOUT()
+#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream -= Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Pipe_Write_8(eeprom_read_byte(BufferPtr))
+#include "Template/Template_Pipe_RW.c"
+
+#define  TEMPLATE_FUNC_NAME                        Pipe_Read_EStream_LE
+#define  TEMPLATE_BUFFER_TYPE                      void*
+#define  TEMPLATE_TOKEN                            PIPE_TOKEN_IN
+#define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearIN()
+#define  TEMPLATE_BUFFER_OFFSET(Length)            0
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream += Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         eeprom_update_byte(BufferPtr, Pipe_Read_8())
+#include "Template/Template_Pipe_RW.c"
+
+#define  TEMPLATE_FUNC_NAME                        Pipe_Read_EStream_BE
+#define  TEMPLATE_BUFFER_TYPE                      void*
+#define  TEMPLATE_TOKEN                            PIPE_TOKEN_IN
+#define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearIN()
+#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream -= Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         eeprom_update_byte(BufferPtr, Pipe_Read_8())
+#include "Template/Template_Pipe_RW.c"
+
+#endif
+
+#endif
+
index 53316f2..f69469f 100644 (file)
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2012.\r
-              \r
-  dean [at] fourwalledcubicle [dot] com\r
-           www.lufa-lib.org\r
-*/\r
-\r
-/*\r
-  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, distribute, and sell this \r
-  software and its documentation for any purpose is hereby granted\r
-  without fee, provided that the above copyright notice appear in \r
-  all copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting \r
-  documentation, and that the name of the author not be used in \r
-  advertising or publicity pertaining to distribution of the \r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
\r
-/** \file\r
- *  \brief Pipe data stream transmission and reception management for the AVR8 microcontrollers\r
- *  \copydetails Group_PipeStreamRW_AVR8\r
- *\r
- *  \note This file should not be included directly. It is automatically included as needed by the USB driver\r
- *        dispatch header located in LUFA/Drivers/USB/USB.h.\r
- */\r
-\r
-/** \ingroup Group_PipeStreamRW\r
- *  \defgroup Group_PipeStreamRW_AVR8 Read/Write of Multi-Byte Streams (AVR8)\r
- *  \brief Pipe data stream transmission and reception management for the Atmel AVR8 architecture.\r
- *\r
- *  Functions, macros, variables, enums and types related to data reading and writing of data streams from\r
- *  and to pipes.\r
- *\r
- *  @{\r
- */\r
-\r
-#ifndef __PIPE_STREAM_AVR8_H__\r
-#define __PIPE_STREAM_AVR8_H__\r
-\r
-       /* Includes: */\r
-               #include "../../../../Common/Common.h"\r
-               #include "../USBMode.h"         \r
-               #include "../USBTask.h"\r
-               \r
-       /* Enable C linkage for C++ Compilers: */\r
-               #if defined(__cplusplus)\r
-                       extern "C" {\r
-               #endif\r
-\r
-       /* Preprocessor Checks: */\r
-               #if !defined(__INCLUDE_FROM_USB_DRIVER)\r
-                       #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.\r
-               #endif\r
-               \r
-       /* Public Interface - May be used in end-application: */\r
-               /* Function Prototypes: */\r
-                       /** \name Stream functions for null data */\r
-                       //@{\r
-\r
-                       /** Reads and discards the given number of bytes from the pipe, discarding fully read packets from the host\r
-                        *  as needed. The last packet is not automatically discarded once the remaining bytes has been read; the\r
-                        *  user is responsible for manually discarding the last packet from the device via the \ref Pipe_ClearIN() macro.\r
-                        *\r
-                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once, failing or\r
-                        *  succeeding as a single unit. If the BytesProcessed parameter points to a valid storage location, the transfer\r
-                        *  will instead be performed as a series of chunks. Each time the pipe bank becomes empty while there is still data\r
-                        *  to process (and after the current packet has been acknowledged) the BytesProcessed location will be updated with\r
-                        *  the total number of bytes processed in the stream, and the function will exit with an error code of\r
-                        *  \ref PIPE_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed in the user code - to\r
-                        *  continue the transfer, call the function again with identical parameters and it will resume until the BytesProcessed\r
-                        *  value reaches the total transfer length.\r
-                        *\r
-                        *  <b>Single Stream Transfer Example:</b>\r
-                        *  \code\r
-                        *  uint8_t ErrorCode;\r
-                        *  \r
-                        *  if ((ErrorCode = Pipe_Discard_Stream(512, NULL)) != PIPE_RWSTREAM_NoError)\r
-                        *  {\r
-                        *       // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  <b>Partial Stream Transfers Example:</b>\r
-                        *  \code\r
-                        *  uint8_t  ErrorCode;\r
-                        *  uint16_t BytesProcessed;\r
-                        *  \r
-                        *  BytesProcessed = 0;\r
-                        *  while ((ErrorCode = Pipe_Discard_Stream(512, &BytesProcessed)) == PIPE_RWSTREAM_IncompleteTransfer)\r
-                        *  {\r
-                        *      // Stream not yet complete - do other actions here, abort if required\r
-                        *  }\r
-                        *  \r
-                        *  if (ErrorCode != PIPE_RWSTREAM_NoError)\r
-                        *  {\r
-                        *      // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  \note The pipe token is set automatically, thus this can be used on bi-directional pipes directly without\r
-                        *        having to explicitly change the data direction with a call to \ref Pipe_SetPipeToken().\r
-                        *\r
-                        *  \param[in] Length          Number of bytes to discard via the currently selected pipe.\r
-                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes already processed should\r
-                        *                             updated, \c NULL if the entire stream should be processed at once.\r
-                        *\r
-                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Pipe_Discard_Stream(uint16_t Length,\r
-                                                   uint16_t* const BytesProcessed);\r
-\r
-                       /** Writes a given number of zeroed bytes to the pipe, sending full pipe packets from the host to the device\r
-                        *  as needed. The last packet is not automatically sent once the remaining bytes has been written; the\r
-                        *  user is responsible for manually discarding the last packet from the device via the \ref Pipe_ClearOUT() macro.\r
-                        *\r
-                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once, failing or\r
-                        *  succeeding as a single unit. If the BytesProcessed parameter points to a valid storage location, the transfer\r
-                        *  will instead be performed as a series of chunks. Each time the pipe bank becomes full while there is still data\r
-                        *  to process (and after the current packet transmission has been initiated) the BytesProcessed location will be\r
-                        *  updated with the total number of bytes processed in the stream, and the function will exit with an error code of\r
-                        *  \ref PIPE_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed in the user code - to\r
-                        *  continue the transfer, call the function again with identical parameters and it will resume until the BytesProcessed\r
-                        *  value reaches the total transfer length.\r
-                        *\r
-                        *  <b>Single Stream Transfer Example:</b>\r
-                        *  \code\r
-                        *  uint8_t ErrorCode;\r
-                        *  \r
-                        *  if ((ErrorCode = Pipe_Null_Stream(512, NULL)) != PIPE_RWSTREAM_NoError)\r
-                        *  {\r
-                        *       // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  <b>Partial Stream Transfers Example:</b>\r
-                        *  \code\r
-                        *  uint8_t  ErrorCode;\r
-                        *  uint16_t BytesProcessed;\r
-                        *  \r
-                        *  BytesProcessed = 0;\r
-                        *  while ((ErrorCode = Pipe_Null_Stream(512, &BytesProcessed)) == PIPE_RWSTREAM_IncompleteTransfer)\r
-                        *  {\r
-                        *      // Stream not yet complete - do other actions here, abort if required\r
-                        *  }\r
-                        *  \r
-                        *  if (ErrorCode != PIPE_RWSTREAM_NoError)\r
-                        *  {\r
-                        *      // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  \note The pipe token is set automatically, thus this can be used on bi-directional pipes directly without\r
-                        *        having to explicitly change the data direction with a call to \ref Pipe_SetPipeToken().\r
-                        *\r
-                        *  \param[in] Length          Number of zero bytes to write via the currently selected pipe.\r
-                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes already processed should\r
-                        *                             updated, \c NULL if the entire stream should be processed at once.\r
-                        *\r
-                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Pipe_Null_Stream(uint16_t Length,\r
-                                                uint16_t* const BytesProcessed);\r
-\r
-                       //@}\r
-\r
-                       /** \name Stream functions for RAM source/destination data */\r
-                       //@{\r
-                       \r
-                       /** Writes the given number of bytes to the pipe from the given buffer in little endian,\r
-                        *  sending full packets to the device as needed. The last packet filled is not automatically sent;\r
-                        *  the user is responsible for manually sending the last written packet to the host via the\r
-                        *  \ref Pipe_ClearOUT() macro. Between each USB packet, the given stream callback function is\r
-                        *  executed repeatedly until the next packet is ready, allowing for early aborts of stream transfers.\r
-                        *\r
-                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once,\r
-                        *  failing or succeeding as a single unit. If the BytesProcessed parameter points to a valid\r
-                        *  storage location, the transfer will instead be performed as a series of chunks. Each time\r
-                        *  the pipe bank becomes full while there is still data to process (and after the current\r
-                        *  packet transmission has been initiated) the BytesProcessed location will be updated with the\r
-                        *  total number of bytes processed in the stream, and the function will exit with an error code of\r
-                        *  \ref PIPE_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed\r
-                        *  in the user code - to continue the transfer, call the function again with identical parameters\r
-                        *  and it will resume until the BytesProcessed value reaches the total transfer length.\r
-                        *\r
-                        *  <b>Single Stream Transfer Example:</b>\r
-                        *  \code\r
-                        *  uint8_t DataStream[512];\r
-                        *  uint8_t ErrorCode;\r
-                        *  \r
-                        *  if ((ErrorCode = Pipe_Write_Stream_LE(DataStream, sizeof(DataStream),\r
-                        *                                        NULL)) != PIPE_RWSTREAM_NoError)\r
-                        *  {\r
-                        *       // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  <b>Partial Stream Transfers Example:</b>\r
-                        *  \code\r
-                        *  uint8_t  DataStream[512];\r
-                        *  uint8_t  ErrorCode;\r
-                        *  uint16_t BytesProcessed;\r
-                        *  \r
-                        *  BytesProcessed = 0;\r
-                        *  while ((ErrorCode = Pipe_Write_Stream_LE(DataStream, sizeof(DataStream),\r
-                        *                                           &BytesProcessed)) == PIPE_RWSTREAM_IncompleteTransfer)\r
-                        *  {\r
-                        *      // Stream not yet complete - do other actions here, abort if required\r
-                        *  }\r
-                        *  \r
-                        *  if (ErrorCode != PIPE_RWSTREAM_NoError)\r
-                        *  {\r
-                        *      // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  \note The pipe token is set automatically, thus this can be used on bi-directional pipes directly without\r
-                        *        having to explicitly change the data direction with a call to \ref Pipe_SetPipeToken().\r
-                        *\r
-                        *  \param[in] Buffer          Pointer to the source data buffer to read from.\r
-                        *  \param[in] Length          Number of bytes to read for the currently selected pipe into the buffer.\r
-                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes already processed should\r
-                        *                             updated, \c NULL if the entire stream should be written at once.\r
-                        *\r
-                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Pipe_Write_Stream_LE(const void* const Buffer,\r
-                                                    uint16_t Length,\r
-                                                    uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** Writes the given number of bytes to the pipe from the given buffer in big endian,\r
-                        *  sending full packets to the device as needed. The last packet filled is not automatically sent;\r
-                        *  the user is responsible for manually sending the last written packet to the host via the\r
-                        *  \ref Pipe_ClearOUT() macro. Between each USB packet, the given stream callback function is\r
-                        *  executed repeatedly until the next packet is ready, allowing for early aborts of stream transfers.\r
-                        *\r
-                        *  \note The pipe token is set automatically, thus this can be used on bi-directional pipes directly without\r
-                        *        having to explicitly change the data direction with a call to \ref Pipe_SetPipeToken().\r
-                        *\r
-                        *  \param[in] Buffer          Pointer to the source data buffer to read from.\r
-                        *  \param[in] Length          Number of bytes to read for the currently selected pipe into the buffer.\r
-                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes already processed should\r
-                        *                             updated, \c NULL if the entire stream should be written at once.\r
-                        *\r
-                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Pipe_Write_Stream_BE(const void* const Buffer,\r
-                                                    uint16_t Length,\r
-                                                    uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** Reads the given number of bytes from the pipe into the given buffer in little endian,\r
-                        *  sending full packets to the device as needed. The last packet filled is not automatically sent;\r
-                        *  the user is responsible for manually sending the last written packet to the host via the\r
-                        *  \ref Pipe_ClearIN() macro. Between each USB packet, the given stream callback function is\r
-                        *  executed repeatedly until the next packet is ready, allowing for early aborts of stream transfers.\r
-                        *\r
-                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once,\r
-                        *  failing or succeeding as a single unit. If the BytesProcessed parameter points to a valid\r
-                        *  storage location, the transfer will instead be performed as a series of chunks. Each time\r
-                        *  the pipe bank becomes empty while there is still data to process (and after the current\r
-                        *  packet has been acknowledged) the BytesProcessed location will be updated with the total number\r
-                        *  of bytes processed in the stream, and the function will exit with an error code of\r
-                        *  \ref PIPE_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed\r
-                        *  in the user code - to continue the transfer, call the function again with identical parameters\r
-                        *  and it will resume until the BytesProcessed value reaches the total transfer length.\r
-                        *\r
-                        *  <b>Single Stream Transfer Example:</b>\r
-                        *  \code\r
-                        *  uint8_t DataStream[512];\r
-                        *  uint8_t ErrorCode;\r
-                        *  \r
-                        *  if ((ErrorCode = Pipe_Read_Stream_LE(DataStream, sizeof(DataStream),\r
-                        *                                       NULL)) != PIPE_RWSTREAM_NoError)\r
-                        *  {\r
-                        *       // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  <b>Partial Stream Transfers Example:</b>\r
-                        *  \code\r
-                        *  uint8_t  DataStream[512];\r
-                        *  uint8_t  ErrorCode;\r
-                        *  uint16_t BytesProcessed;\r
-                        *  \r
-                        *  BytesProcessed = 0;\r
-                        *  while ((ErrorCode = Pipe_Read_Stream_LE(DataStream, sizeof(DataStream),\r
-                        *                                          &BytesProcessed)) == PIPE_RWSTREAM_IncompleteTransfer)\r
-                        *  {\r
-                        *      // Stream not yet complete - do other actions here, abort if required\r
-                        *  }\r
-                        *  \r
-                        *  if (ErrorCode != PIPE_RWSTREAM_NoError)\r
-                        *  {\r
-                        *      // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  \note The pipe token is set automatically, thus this can be used on bi-directional pipes directly without\r
-                        *        having to explicitly change the data direction with a call to \ref Pipe_SetPipeToken().\r
-                        *\r
-                        *  \param[out] Buffer          Pointer to the source data buffer to write to.\r
-                        *  \param[in]  Length          Number of bytes to read for the currently selected pipe to read from.\r
-                        *  \param[in]  BytesProcessed  Pointer to a location where the total number of bytes already processed should\r
-                        *                              updated, \c NULL if the entire stream should be read at once.\r
-                        *\r
-                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Pipe_Read_Stream_LE(void* const Buffer,\r
-                                                   uint16_t Length,\r
-                                                   uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** Reads the given number of bytes from the pipe into the given buffer in big endian,\r
-                        *  sending full packets to the device as needed. The last packet filled is not automatically sent;\r
-                        *  the user is responsible for manually sending the last written packet to the host via the\r
-                        *  \ref Pipe_ClearIN() macro. Between each USB packet, the given stream callback function is\r
-                        *  executed repeatedly until the next packet is ready, allowing for early aborts of stream transfers.\r
-                        *\r
-                        *  \note The pipe token is set automatically, thus this can be used on bi-directional pipes directly without\r
-                        *        having to explicitly change the data direction with a call to \ref Pipe_SetPipeToken().\r
-                        *\r
-                        *  \param[out] Buffer          Pointer to the source data buffer to write to.\r
-                        *  \param[in]  Length          Number of bytes to read for the currently selected pipe to read from.\r
-                        *  \param[in]  BytesProcessed  Pointer to a location where the total number of bytes already processed should\r
-                        *                              updated, \c NULL if the entire stream should be read at once.\r
-                        *\r
-                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Pipe_Read_Stream_BE(void* const Buffer,\r
-                                                   uint16_t Length,\r
-                                                   uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-                       //@}\r
-\r
-                       /** \name Stream functions for EEPROM source/destination data */\r
-                       //@{\r
-                       \r
-                       /** EEPROM buffer source version of \ref Pipe_Write_Stream_LE().\r
-                        *\r
-                        *  \param[in] Buffer          Pointer to the source data buffer to read from.\r
-                        *  \param[in] Length          Number of bytes to read for the currently selected pipe into the buffer.\r
-                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes already processed should\r
-                        *                             updated, \c NULL if the entire stream should be written at once.\r
-                        *\r
-                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Pipe_Write_EStream_LE(const void* const Buffer,\r
-                                                     uint16_t Length,\r
-                                                     uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-                       \r
-                       /** EEPROM buffer source version of \ref Pipe_Write_Stream_BE().\r
-                        *\r
-                        *  \param[in] Buffer          Pointer to the source data buffer to read from.\r
-                        *  \param[in] Length          Number of bytes to read for the currently selected pipe into the buffer.\r
-                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes already processed should\r
-                        *                             updated, \c NULL if the entire stream should be written at once.\r
-                        *\r
-                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Pipe_Write_EStream_BE(const void* const Buffer,\r
-                                                     uint16_t Length,\r
-                                                     uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** EEPROM buffer source version of \ref Pipe_Read_Stream_LE().\r
-                        *\r
-                        *  \param[out] Buffer          Pointer to the source data buffer to write to.\r
-                        *  \param[in]  Length          Number of bytes to read for the currently selected pipe to read from.\r
-                        *  \param[in]  BytesProcessed  Pointer to a location where the total number of bytes already processed should\r
-                        *                              updated, \c NULL if the entire stream should be read at once.\r
-                        *\r
-                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Pipe_Read_EStream_LE(void* const Buffer,\r
-                                                    uint16_t Length,\r
-                                                    uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-                       \r
-                       /** EEPROM buffer source version of \ref Pipe_Read_Stream_BE().\r
-                        *\r
-                        *  \param[out] Buffer          Pointer to the source data buffer to write to.\r
-                        *  \param[in]  Length          Number of bytes to read for the currently selected pipe to read from.\r
-                        *  \param[in]  BytesProcessed  Pointer to a location where the total number of bytes already processed should\r
-                        *                              updated, \c NULL if the entire stream should be read at once.\r
-                        *\r
-                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Pipe_Read_EStream_BE(void* const Buffer,\r
-                                                    uint16_t Length,\r
-                                                    uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-                       //@}\r
-\r
-                       /** \name Stream functions for PROGMEM source/destination data */\r
-                       //@{\r
-                       \r
-                       /** FLASH buffer source version of \ref Pipe_Write_Stream_LE().\r
-                        *\r
-                        *  \pre The FLASH data must be located in the first 64KB of FLASH for this function to work correctly.\r
-                        *\r
-                        *  \param[in] Buffer          Pointer to the source data buffer to read from.\r
-                        *  \param[in] Length          Number of bytes to read for the currently selected pipe into the buffer.\r
-                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes already processed should\r
-                        *                             updated, \c NULL if the entire stream should be written at once.\r
-                        *\r
-                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Pipe_Write_PStream_LE(const void* const Buffer,\r
-                                                     uint16_t Length,\r
-                                                     uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-                       \r
-                       /** FLASH buffer source version of \ref Pipe_Write_Stream_BE().\r
-                        *\r
-                        *  \pre The FLASH data must be located in the first 64KB of FLASH for this function to work correctly.\r
-                        *\r
-                        *  \param[in] Buffer          Pointer to the source data buffer to read from.\r
-                        *  \param[in] Length          Number of bytes to read for the currently selected pipe into the buffer.\r
-                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes already processed should\r
-                        *                             updated, \c NULL if the entire stream should be written at once.\r
-                        *\r
-                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Pipe_Write_PStream_BE(const void* const Buffer,\r
-                                                     uint16_t Length,\r
-                                                     uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-                       //@}\r
-\r
-       /* Disable C linkage for C++ Compilers: */\r
-               #if defined(__cplusplus)\r
-                       }\r
-               #endif\r
-       \r
-#endif\r
-\r
-/** @} */\r
+/*
+             LUFA Library
+     Copyright (C) Dean Camera, 2012.
+              
+  dean [at] fourwalledcubicle [dot] com
+           www.lufa-lib.org
+*/
+
+/*
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+  Permission to use, copy, modify, distribute, and sell this 
+  software and its documentation for any purpose is hereby granted
+  without fee, provided that the above copyright notice appear in 
+  all copies and that both that the copyright notice and this
+  permission notice and warranty disclaimer appear in supporting 
+  documentation, and that the name of the author not be used in 
+  advertising or publicity pertaining to distribution of the 
+  software without specific, written prior permission.
+
+  The author disclaim all warranties with regard to this
+  software, including all implied warranties of merchantability
+  and fitness.  In no event shall the author be liable for any
+  special, indirect or consequential damages or any damages
+  whatsoever resulting from loss of use, data or profits, whether
+  in an action of contract, negligence or other tortious action,
+  arising out of or in connection with the use or performance of
+  this software.
+*/
+/** \file
+ *  \brief Pipe data stream transmission and reception management for the AVR8 microcontrollers
+ *  \copydetails Group_PipeStreamRW_AVR8
+ *
+ *  \note This file should not be included directly. It is automatically included as needed by the USB driver
+ *        dispatch header located in LUFA/Drivers/USB/USB.h.
+ */
+
+/** \ingroup Group_PipeStreamRW
+ *  \defgroup Group_PipeStreamRW_AVR8 Read/Write of Multi-Byte Streams (AVR8)
+ *  \brief Pipe data stream transmission and reception management for the Atmel AVR8 architecture.
+ *
+ *  Functions, macros, variables, enums and types related to data reading and writing of data streams from
+ *  and to pipes.
+ *
+ *  @{
+ */
+
+#ifndef __PIPE_STREAM_AVR8_H__
+#define __PIPE_STREAM_AVR8_H__
+
+       /* Includes: */
+               #include "../../../../Common/Common.h"
+               #include "../USBMode.h"         
+               #include "../USBTask.h"
+               
+       /* Enable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       extern "C" {
+               #endif
+
+       /* Preprocessor Checks: */
+               #if !defined(__INCLUDE_FROM_USB_DRIVER)
+                       #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.
+               #endif
+               
+       /* Public Interface - May be used in end-application: */
+               /* Function Prototypes: */
+                       /** \name Stream functions for null data */
+                       //@{
+
+                       /** Reads and discards the given number of bytes from the pipe, discarding fully read packets from the host
+                        *  as needed. The last packet is not automatically discarded once the remaining bytes has been read; the
+                        *  user is responsible for manually discarding the last packet from the device via the \ref Pipe_ClearIN() macro.
+                        *
+                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once, failing or
+                        *  succeeding as a single unit. If the BytesProcessed parameter points to a valid storage location, the transfer
+                        *  will instead be performed as a series of chunks. Each time the pipe bank becomes empty while there is still data
+                        *  to process (and after the current packet has been acknowledged) the BytesProcessed location will be updated with
+                        *  the total number of bytes processed in the stream, and the function will exit with an error code of
+                        *  \ref PIPE_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed in the user code - to
+                        *  continue the transfer, call the function again with identical parameters and it will resume until the BytesProcessed
+                        *  value reaches the total transfer length.
+                        *
+                        *  <b>Single Stream Transfer Example:</b>
+                        *  \code
+                        *  uint8_t ErrorCode;
+                        *  
+                        *  if ((ErrorCode = Pipe_Discard_Stream(512, NULL)) != PIPE_RWSTREAM_NoError)
+                        *  {
+                        *       // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  <b>Partial Stream Transfers Example:</b>
+                        *  \code
+                        *  uint8_t  ErrorCode;
+                        *  uint16_t BytesProcessed;
+                        *  
+                        *  BytesProcessed = 0;
+                        *  while ((ErrorCode = Pipe_Discard_Stream(512, &BytesProcessed)) == PIPE_RWSTREAM_IncompleteTransfer)
+                        *  {
+                        *      // Stream not yet complete - do other actions here, abort if required
+                        *  }
+                        *  
+                        *  if (ErrorCode != PIPE_RWSTREAM_NoError)
+                        *  {
+                        *      // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  \note The pipe token is set automatically, thus this can be used on bi-directional pipes directly without
+                        *        having to explicitly change the data direction with a call to \ref Pipe_SetPipeToken().
+                        *
+                        *  \param[in] Length          Number of bytes to discard via the currently selected pipe.
+                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes already processed should
+                        *                             updated, \c NULL if the entire stream should be processed at once.
+                        *
+                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Pipe_Discard_Stream(uint16_t Length,
+                                                   uint16_t* const BytesProcessed);
+
+                       /** Writes a given number of zeroed bytes to the pipe, sending full pipe packets from the host to the device
+                        *  as needed. The last packet is not automatically sent once the remaining bytes has been written; the
+                        *  user is responsible for manually discarding the last packet from the device via the \ref Pipe_ClearOUT() macro.
+                        *
+                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once, failing or
+                        *  succeeding as a single unit. If the BytesProcessed parameter points to a valid storage location, the transfer
+                        *  will instead be performed as a series of chunks. Each time the pipe bank becomes full while there is still data
+                        *  to process (and after the current packet transmission has been initiated) the BytesProcessed location will be
+                        *  updated with the total number of bytes processed in the stream, and the function will exit with an error code of
+                        *  \ref PIPE_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed in the user code - to
+                        *  continue the transfer, call the function again with identical parameters and it will resume until the BytesProcessed
+                        *  value reaches the total transfer length.
+                        *
+                        *  <b>Single Stream Transfer Example:</b>
+                        *  \code
+                        *  uint8_t ErrorCode;
+                        *  
+                        *  if ((ErrorCode = Pipe_Null_Stream(512, NULL)) != PIPE_RWSTREAM_NoError)
+                        *  {
+                        *       // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  <b>Partial Stream Transfers Example:</b>
+                        *  \code
+                        *  uint8_t  ErrorCode;
+                        *  uint16_t BytesProcessed;
+                        *  
+                        *  BytesProcessed = 0;
+                        *  while ((ErrorCode = Pipe_Null_Stream(512, &BytesProcessed)) == PIPE_RWSTREAM_IncompleteTransfer)
+                        *  {
+                        *      // Stream not yet complete - do other actions here, abort if required
+                        *  }
+                        *  
+                        *  if (ErrorCode != PIPE_RWSTREAM_NoError)
+                        *  {
+                        *      // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  \note The pipe token is set automatically, thus this can be used on bi-directional pipes directly without
+                        *        having to explicitly change the data direction with a call to \ref Pipe_SetPipeToken().
+                        *
+                        *  \param[in] Length          Number of zero bytes to write via the currently selected pipe.
+                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes already processed should
+                        *                             updated, \c NULL if the entire stream should be processed at once.
+                        *
+                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Pipe_Null_Stream(uint16_t Length,
+                                                uint16_t* const BytesProcessed);
+
+                       //@}
+
+                       /** \name Stream functions for RAM source/destination data */
+                       //@{
+                       
+                       /** Writes the given number of bytes to the pipe from the given buffer in little endian,
+                        *  sending full packets to the device as needed. The last packet filled is not automatically sent;
+                        *  the user is responsible for manually sending the last written packet to the host via the
+                        *  \ref Pipe_ClearOUT() macro. Between each USB packet, the given stream callback function is
+                        *  executed repeatedly until the next packet is ready, allowing for early aborts of stream transfers.
+                        *
+                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once,
+                        *  failing or succeeding as a single unit. If the BytesProcessed parameter points to a valid
+                        *  storage location, the transfer will instead be performed as a series of chunks. Each time
+                        *  the pipe bank becomes full while there is still data to process (and after the current
+                        *  packet transmission has been initiated) the BytesProcessed location will be updated with the
+                        *  total number of bytes processed in the stream, and the function will exit with an error code of
+                        *  \ref PIPE_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed
+                        *  in the user code - to continue the transfer, call the function again with identical parameters
+                        *  and it will resume until the BytesProcessed value reaches the total transfer length.
+                        *
+                        *  <b>Single Stream Transfer Example:</b>
+                        *  \code
+                        *  uint8_t DataStream[512];
+                        *  uint8_t ErrorCode;
+                        *  
+                        *  if ((ErrorCode = Pipe_Write_Stream_LE(DataStream, sizeof(DataStream),
+                        *                                        NULL)) != PIPE_RWSTREAM_NoError)
+                        *  {
+                        *       // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  <b>Partial Stream Transfers Example:</b>
+                        *  \code
+                        *  uint8_t  DataStream[512];
+                        *  uint8_t  ErrorCode;
+                        *  uint16_t BytesProcessed;
+                        *  
+                        *  BytesProcessed = 0;
+                        *  while ((ErrorCode = Pipe_Write_Stream_LE(DataStream, sizeof(DataStream),
+                        *                                           &BytesProcessed)) == PIPE_RWSTREAM_IncompleteTransfer)
+                        *  {
+                        *      // Stream not yet complete - do other actions here, abort if required
+                        *  }
+                        *  
+                        *  if (ErrorCode != PIPE_RWSTREAM_NoError)
+                        *  {
+                        *      // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  \note The pipe token is set automatically, thus this can be used on bi-directional pipes directly without
+                        *        having to explicitly change the data direction with a call to \ref Pipe_SetPipeToken().
+                        *
+                        *  \param[in] Buffer          Pointer to the source data buffer to read from.
+                        *  \param[in] Length          Number of bytes to read for the currently selected pipe into the buffer.
+                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes already processed should
+                        *                             updated, \c NULL if the entire stream should be written at once.
+                        *
+                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Pipe_Write_Stream_LE(const void* const Buffer,
+                                                    uint16_t Length,
+                                                    uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** Writes the given number of bytes to the pipe from the given buffer in big endian,
+                        *  sending full packets to the device as needed. The last packet filled is not automatically sent;
+                        *  the user is responsible for manually sending the last written packet to the host via the
+                        *  \ref Pipe_ClearOUT() macro. Between each USB packet, the given stream callback function is
+                        *  executed repeatedly until the next packet is ready, allowing for early aborts of stream transfers.
+                        *
+                        *  \note The pipe token is set automatically, thus this can be used on bi-directional pipes directly without
+                        *        having to explicitly change the data direction with a call to \ref Pipe_SetPipeToken().
+                        *
+                        *  \param[in] Buffer          Pointer to the source data buffer to read from.
+                        *  \param[in] Length          Number of bytes to read for the currently selected pipe into the buffer.
+                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes already processed should
+                        *                             updated, \c NULL if the entire stream should be written at once.
+                        *
+                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Pipe_Write_Stream_BE(const void* const Buffer,
+                                                    uint16_t Length,
+                                                    uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** Reads the given number of bytes from the pipe into the given buffer in little endian,
+                        *  sending full packets to the device as needed. The last packet filled is not automatically sent;
+                        *  the user is responsible for manually sending the last written packet to the host via the
+                        *  \ref Pipe_ClearIN() macro. Between each USB packet, the given stream callback function is
+                        *  executed repeatedly until the next packet is ready, allowing for early aborts of stream transfers.
+                        *
+                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once,
+                        *  failing or succeeding as a single unit. If the BytesProcessed parameter points to a valid
+                        *  storage location, the transfer will instead be performed as a series of chunks. Each time
+                        *  the pipe bank becomes empty while there is still data to process (and after the current
+                        *  packet has been acknowledged) the BytesProcessed location will be updated with the total number
+                        *  of bytes processed in the stream, and the function will exit with an error code of
+                        *  \ref PIPE_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed
+                        *  in the user code - to continue the transfer, call the function again with identical parameters
+                        *  and it will resume until the BytesProcessed value reaches the total transfer length.
+                        *
+                        *  <b>Single Stream Transfer Example:</b>
+                        *  \code
+                        *  uint8_t DataStream[512];
+                        *  uint8_t ErrorCode;
+                        *  
+                        *  if ((ErrorCode = Pipe_Read_Stream_LE(DataStream, sizeof(DataStream),
+                        *                                       NULL)) != PIPE_RWSTREAM_NoError)
+                        *  {
+                        *       // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  <b>Partial Stream Transfers Example:</b>
+                        *  \code
+                        *  uint8_t  DataStream[512];
+                        *  uint8_t  ErrorCode;
+                        *  uint16_t BytesProcessed;
+                        *  
+                        *  BytesProcessed = 0;
+                        *  while ((ErrorCode = Pipe_Read_Stream_LE(DataStream, sizeof(DataStream),
+                        *                                          &BytesProcessed)) == PIPE_RWSTREAM_IncompleteTransfer)
+                        *  {
+                        *      // Stream not yet complete - do other actions here, abort if required
+                        *  }
+                        *  
+                        *  if (ErrorCode != PIPE_RWSTREAM_NoError)
+                        *  {
+                        *      // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  \note The pipe token is set automatically, thus this can be used on bi-directional pipes directly without
+                        *        having to explicitly change the data direction with a call to \ref Pipe_SetPipeToken().
+                        *
+                        *  \param[out] Buffer          Pointer to the source data buffer to write to.
+                        *  \param[in]  Length          Number of bytes to read for the currently selected pipe to read from.
+                        *  \param[in]  BytesProcessed  Pointer to a location where the total number of bytes already processed should
+                        *                              updated, \c NULL if the entire stream should be read at once.
+                        *
+                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Pipe_Read_Stream_LE(void* const Buffer,
+                                                   uint16_t Length,
+                                                   uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** Reads the given number of bytes from the pipe into the given buffer in big endian,
+                        *  sending full packets to the device as needed. The last packet filled is not automatically sent;
+                        *  the user is responsible for manually sending the last written packet to the host via the
+                        *  \ref Pipe_ClearIN() macro. Between each USB packet, the given stream callback function is
+                        *  executed repeatedly until the next packet is ready, allowing for early aborts of stream transfers.
+                        *
+                        *  \note The pipe token is set automatically, thus this can be used on bi-directional pipes directly without
+                        *        having to explicitly change the data direction with a call to \ref Pipe_SetPipeToken().
+                        *
+                        *  \param[out] Buffer          Pointer to the source data buffer to write to.
+                        *  \param[in]  Length          Number of bytes to read for the currently selected pipe to read from.
+                        *  \param[in]  BytesProcessed  Pointer to a location where the total number of bytes already processed should
+                        *                              updated, \c NULL if the entire stream should be read at once.
+                        *
+                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Pipe_Read_Stream_BE(void* const Buffer,
+                                                   uint16_t Length,
+                                                   uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+                       //@}
+
+                       /** \name Stream functions for EEPROM source/destination data */
+                       //@{
+                       
+                       /** EEPROM buffer source version of \ref Pipe_Write_Stream_LE().
+                        *
+                        *  \param[in] Buffer          Pointer to the source data buffer to read from.
+                        *  \param[in] Length          Number of bytes to read for the currently selected pipe into the buffer.
+                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes already processed should
+                        *                             updated, \c NULL if the entire stream should be written at once.
+                        *
+                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Pipe_Write_EStream_LE(const void* const Buffer,
+                                                     uint16_t Length,
+                                                     uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+                       
+                       /** EEPROM buffer source version of \ref Pipe_Write_Stream_BE().
+                        *
+                        *  \param[in] Buffer          Pointer to the source data buffer to read from.
+                        *  \param[in] Length          Number of bytes to read for the currently selected pipe into the buffer.
+                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes already processed should
+                        *                             updated, \c NULL if the entire stream should be written at once.
+                        *
+                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Pipe_Write_EStream_BE(const void* const Buffer,
+                                                     uint16_t Length,
+                                                     uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** EEPROM buffer source version of \ref Pipe_Read_Stream_LE().
+                        *
+                        *  \param[out] Buffer          Pointer to the source data buffer to write to.
+                        *  \param[in]  Length          Number of bytes to read for the currently selected pipe to read from.
+                        *  \param[in]  BytesProcessed  Pointer to a location where the total number of bytes already processed should
+                        *                              updated, \c NULL if the entire stream should be read at once.
+                        *
+                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Pipe_Read_EStream_LE(void* const Buffer,
+                                                    uint16_t Length,
+                                                    uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+                       
+                       /** EEPROM buffer source version of \ref Pipe_Read_Stream_BE().
+                        *
+                        *  \param[out] Buffer          Pointer to the source data buffer to write to.
+                        *  \param[in]  Length          Number of bytes to read for the currently selected pipe to read from.
+                        *  \param[in]  BytesProcessed  Pointer to a location where the total number of bytes already processed should
+                        *                              updated, \c NULL if the entire stream should be read at once.
+                        *
+                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Pipe_Read_EStream_BE(void* const Buffer,
+                                                    uint16_t Length,
+                                                    uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+                       //@}
+
+                       /** \name Stream functions for PROGMEM source/destination data */
+                       //@{
+                       
+                       /** FLASH buffer source version of \ref Pipe_Write_Stream_LE().
+                        *
+                        *  \pre The FLASH data must be located in the first 64KB of FLASH for this function to work correctly.
+                        *
+                        *  \param[in] Buffer          Pointer to the source data buffer to read from.
+                        *  \param[in] Length          Number of bytes to read for the currently selected pipe into the buffer.
+                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes already processed should
+                        *                             updated, \c NULL if the entire stream should be written at once.
+                        *
+                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Pipe_Write_PStream_LE(const void* const Buffer,
+                                                     uint16_t Length,
+                                                     uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+                       
+                       /** FLASH buffer source version of \ref Pipe_Write_Stream_BE().
+                        *
+                        *  \pre The FLASH data must be located in the first 64KB of FLASH for this function to work correctly.
+                        *
+                        *  \param[in] Buffer          Pointer to the source data buffer to read from.
+                        *  \param[in] Length          Number of bytes to read for the currently selected pipe into the buffer.
+                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes already processed should
+                        *                             updated, \c NULL if the entire stream should be written at once.
+                        *
+                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Pipe_Write_PStream_BE(const void* const Buffer,
+                                                     uint16_t Length,
+                                                     uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+                       //@}
+
+       /* Disable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       }
+               #endif
+       
+#endif
+
+/** @} */
 
index 1ddffb5..b643708 100644 (file)
@@ -66,6 +66,9 @@ bool Pipe_ConfigurePipe(const uint8_t Address,
        uint8_t Number = (Address & PIPE_EPNUM_MASK);
        uint8_t Token  = (Address & PIPE_DIR_IN) ? PIPE_TOKEN_IN : PIPE_TOKEN_OUT;
        
+       if (Number >= PIPE_TOTAL_PIPES)
+         return false;
+
        if (Type == EP_TYPE_CONTROL)
          Token = PIPE_TOKEN_SETUP;
 
index 330dd98..8106988 100644 (file)
                         *                      from the \ref USB_Modes_t enum.
                         *
                         *  \param[in] Options  Mask indicating the options which should be used when initializing the USB
-                        *                      interface to control the USB interface's behaviour. This should be comprised of
+                        *                      interface to control the USB interface's behavior. This should be comprised of
                         *                      a \c USB_OPT_REG_* mask to control the regulator, a \c USB_OPT_*_PLL mask to control the
                         *                      PLL, and a \c USB_DEVICE_OPT_* mask (when the device mode is enabled) to set the device
                         *                      mode speed.
diff --git a/LUFA/Drivers/USB/Core/ConfigDescriptor.c b/LUFA/Drivers/USB/Core/ConfigDescriptor.c
deleted file mode 100644 (file)
index 5bdcdc6..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
-             LUFA Library
-     Copyright (C) Dean Camera, 2012.
-
-  dean [at] fourwalledcubicle [dot] com
-           www.lufa-lib.org
-*/
-
-/*
-  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
-
-  Permission to use, copy, modify, distribute, and sell this
-  software and its documentation for any purpose is hereby granted
-  without fee, provided that the above copyright notice appear in
-  all copies and that both that the copyright notice and this
-  permission notice and warranty disclaimer appear in supporting
-  documentation, and that the name of the author not be used in
-  advertising or publicity pertaining to distribution of the
-  software without specific, written prior permission.
-
-  The author disclaim all warranties with regard to this
-  software, including all implied warranties of merchantability
-  and fitness.  In no event shall the author be liable for any
-  special, indirect or consequential damages or any damages
-  whatsoever resulting from loss of use, data or profits, whether
-  in an action of contract, negligence or other tortious action,
-  arising out of or in connection with the use or performance of
-  this software.
-*/
-
-#define  __INCLUDE_FROM_USB_DRIVER
-#include "ConfigDescriptor.h"
-
-#if defined(USB_CAN_BE_HOST)
-uint8_t USB_Host_GetDeviceConfigDescriptor(const uint8_t ConfigNumber,
-                                           uint16_t* const ConfigSizePtr,
-                                           void* const BufferPtr,
-                                           const uint16_t BufferSize)
-{
-       uint8_t ErrorCode;
-       uint8_t ConfigHeader[sizeof(USB_Descriptor_Configuration_Header_t)];
-
-       USB_ControlRequest = (USB_Request_Header_t)
-               {
-                       .bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE),
-                       .bRequest      = REQ_GetDescriptor,
-                       .wValue        = ((DTYPE_Configuration << 8) | (ConfigNumber - 1)),
-                       .wIndex        = 0,
-                       .wLength       = sizeof(USB_Descriptor_Configuration_Header_t),
-               };
-
-       Pipe_SelectPipe(PIPE_CONTROLPIPE);
-
-       if ((ErrorCode = USB_Host_SendControlRequest(ConfigHeader)) != HOST_SENDCONTROL_Successful)
-         return ErrorCode;
-
-       *ConfigSizePtr = le16_to_cpu(DESCRIPTOR_PCAST(ConfigHeader, USB_Descriptor_Configuration_Header_t)->TotalConfigurationSize);
-
-       if (*ConfigSizePtr > BufferSize)
-         return HOST_GETCONFIG_BuffOverflow;
-
-       USB_ControlRequest.wLength = *ConfigSizePtr;
-
-       if ((ErrorCode = USB_Host_SendControlRequest(BufferPtr)) != HOST_SENDCONTROL_Successful)
-         return ErrorCode;
-
-       if (DESCRIPTOR_TYPE(BufferPtr) != DTYPE_Configuration)
-         return HOST_GETCONFIG_InvalidData;
-
-       return HOST_GETCONFIG_Successful;
-}
-#endif
-
-void USB_GetNextDescriptorOfType(uint16_t* const BytesRem,
-                                 void** const CurrConfigLoc,
-                                 const uint8_t Type)
-{
-       while (*BytesRem)
-       {
-               USB_GetNextDescriptor(BytesRem, CurrConfigLoc);
-
-               if (DESCRIPTOR_TYPE(*CurrConfigLoc) == Type)
-                 return;
-       }
-}
-
-void USB_GetNextDescriptorOfTypeBefore(uint16_t* const BytesRem,
-                                       void** const CurrConfigLoc,
-                                       const uint8_t Type,
-                                       const uint8_t BeforeType)
-{
-       while (*BytesRem)
-       {
-               USB_GetNextDescriptor(BytesRem, CurrConfigLoc);
-
-               if (DESCRIPTOR_TYPE(*CurrConfigLoc) == Type)
-               {
-                       return;
-               }
-               else if (DESCRIPTOR_TYPE(*CurrConfigLoc) == BeforeType)
-               {
-                       *BytesRem = 0;
-                       return;
-               }
-       }
-}
-
-void USB_GetNextDescriptorOfTypeAfter(uint16_t* const BytesRem,
-                                      void** const CurrConfigLoc,
-                                      const uint8_t Type,
-                                      const uint8_t AfterType)
-{
-       USB_GetNextDescriptorOfType(BytesRem, CurrConfigLoc, AfterType);
-
-       if (*BytesRem)
-         USB_GetNextDescriptorOfType(BytesRem, CurrConfigLoc, Type);
-}
-
-uint8_t USB_GetNextDescriptorComp(uint16_t* const BytesRem,
-                                  void** const CurrConfigLoc,
-                                  ConfigComparatorPtr_t const ComparatorRoutine)
-{
-       uint8_t ErrorCode;
-
-       while (*BytesRem)
-       {
-               uint8_t* PrevDescLoc  = *CurrConfigLoc;
-               uint16_t PrevBytesRem = *BytesRem;
-
-               USB_GetNextDescriptor(BytesRem, CurrConfigLoc);
-
-               if ((ErrorCode = ComparatorRoutine(*CurrConfigLoc)) != DESCRIPTOR_SEARCH_NotFound)
-               {
-                       if (ErrorCode == DESCRIPTOR_SEARCH_Fail)
-                       {
-                               *CurrConfigLoc = PrevDescLoc;
-                               *BytesRem      = PrevBytesRem;
-                       }
-
-                       return ErrorCode;
-               }
-       }
-
-       return DESCRIPTOR_SEARCH_COMP_EndOfDescriptor;
-}
-
diff --git a/LUFA/Drivers/USB/Core/ConfigDescriptor.h b/LUFA/Drivers/USB/Core/ConfigDescriptor.h
deleted file mode 100644 (file)
index 22e76cb..0000000
+++ /dev/null
@@ -1,286 +0,0 @@
-/*
-             LUFA Library
-     Copyright (C) Dean Camera, 2012.
-
-  dean [at] fourwalledcubicle [dot] com
-           www.lufa-lib.org
-*/
-
-/*
-  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
-
-  Permission to use, copy, modify, distribute, and sell this
-  software and its documentation for any purpose is hereby granted
-  without fee, provided that the above copyright notice appear in
-  all copies and that both that the copyright notice and this
-  permission notice and warranty disclaimer appear in supporting
-  documentation, and that the name of the author not be used in
-  advertising or publicity pertaining to distribution of the
-  software without specific, written prior permission.
-
-  The author disclaim all warranties with regard to this
-  software, including all implied warranties of merchantability
-  and fitness.  In no event shall the author be liable for any
-  special, indirect or consequential damages or any damages
-  whatsoever resulting from loss of use, data or profits, whether
-  in an action of contract, negligence or other tortious action,
-  arising out of or in connection with the use or performance of
-  this software.
-*/
-
-/** \file
- *  \brief USB Configuration Descriptor definitions.
- *  \copydetails Group_ConfigDescriptorParser
- *
- *  \note This file should not be included directly. It is automatically included as needed by the USB driver
- *        dispatch header located in LUFA/Drivers/USB/USB.h.
- */
-
-/** \ingroup Group_StdDescriptors
- *  \defgroup Group_ConfigDescriptorParser Configuration Descriptor Parser
- *  \brief USB Configuration Descriptor definitions.
- *
- *  This section of the library gives a friendly API which can be used in host applications to easily
- *  parse an attached device's configuration descriptor so that endpoint, interface and other descriptor
- *  data can be extracted and used as needed.
- *
- *  @{
- */
-
-#ifndef __CONFIGDESCRIPTOR_H__
-#define __CONFIGDESCRIPTOR_H__
-
-       /* Includes: */
-               #include "../../../Common/Common.h"
-               #include "USBMode.h"
-               #include "HostStandardReq.h"
-               #include "StdDescriptors.h"
-
-       /* Enable C linkage for C++ Compilers: */
-               #if defined(__cplusplus)
-                       extern "C" {
-               #endif
-
-       /* Preprocessor Checks: */
-               #if !defined(__INCLUDE_FROM_USB_DRIVER)
-                       #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.
-               #endif
-
-       /* Public Interface - May be used in end-application: */
-               /* Macros: */
-                       /** Casts a pointer to a descriptor inside the configuration descriptor into a pointer to the given
-                        *  descriptor type.
-                        *
-                        *  Usage Example:
-                        *  \code
-                        *  uint8_t* CurrDescriptor = &ConfigDescriptor[0]; // Pointing to the configuration header
-                        *  USB_Descriptor_Configuration_Header_t* ConfigHeaderPtr = DESCRIPTOR_PCAST(CurrDescriptor,
-                        *                                                           USB_Descriptor_Configuration_Header_t);
-                        *  
-                        *  // Can now access elements of the configuration header struct using the -> indirection operator
-                        *  \endcode
-                        */
-                       #define DESCRIPTOR_PCAST(DescriptorPtr, Type) ((Type*)(DescriptorPtr))
-
-                       /** Casts a pointer to a descriptor inside the configuration descriptor into the given descriptor
-                        *  type (as an actual struct instance rather than a pointer to a struct).
-                        *
-                        *  Usage Example:
-                        *  \code
-                        *  uint8_t* CurrDescriptor = &ConfigDescriptor[0]; // Pointing to the configuration header
-                        *  USB_Descriptor_Configuration_Header_t ConfigHeader = DESCRIPTOR_CAST(CurrDescriptor,
-                        *                                                       USB_Descriptor_Configuration_Header_t);
-                        *  
-                        *  // Can now access elements of the configuration header struct using the . operator
-                        *  \endcode
-                        */
-                       #define DESCRIPTOR_CAST(DescriptorPtr, Type)  (*DESCRIPTOR_PCAST(DescriptorPtr, Type))
-
-                       /** Returns the descriptor's type, expressed as the 8-bit type value in the header of the descriptor.
-                        *  This value's meaning depends on the descriptor's placement in the descriptor, but standard type
-                        *  values can be accessed in the \ref USB_DescriptorTypes_t enum.
-                        */
-                       #define DESCRIPTOR_TYPE(DescriptorPtr)    DESCRIPTOR_PCAST(DescriptorPtr, USB_Descriptor_Header_t)->Type
-
-                       /** Returns the descriptor's size, expressed as the 8-bit value indicating the number of bytes. */
-                       #define DESCRIPTOR_SIZE(DescriptorPtr)    DESCRIPTOR_PCAST(DescriptorPtr, USB_Descriptor_Header_t)->Size
-
-               /* Type Defines: */
-                       /** Type define for a Configuration Descriptor comparator function (function taking a pointer to an array
-                        *  of type void, returning a uint8_t value).
-                        *
-                        *  \see \ref USB_GetNextDescriptorComp function for more details.
-                        */
-                       typedef uint8_t (* ConfigComparatorPtr_t)(void*);
-
-               /* Enums: */
-                       /** Enum for the possible return codes of the \ref USB_Host_GetDeviceConfigDescriptor() function. */
-                       enum USB_Host_GetConfigDescriptor_ErrorCodes_t
-                       {
-                               HOST_GETCONFIG_Successful       = 0, /**< No error occurred while retrieving the configuration descriptor. */
-                               HOST_GETCONFIG_DeviceDisconnect = 1, /**< The attached device was disconnected while retrieving the configuration
-                                                                       * descriptor.
-                                                                       */
-                               HOST_GETCONFIG_PipeError        = 2, /**< An error occurred in the pipe while sending the request. */
-                               HOST_GETCONFIG_SetupStalled     = 3, /**< The attached device stalled the request to retrieve the configuration
-                                                                       * descriptor.
-                                                                       */
-                               HOST_GETCONFIG_SoftwareTimeOut  = 4, /**< The request or data transfer timed out. */
-                               HOST_GETCONFIG_BuffOverflow     = 5, /**< The device's configuration descriptor is too large to fit into the allocated
-                                                                       * buffer.
-                                                                       */
-                               HOST_GETCONFIG_InvalidData      = 6, /**< The device returned invalid configuration descriptor data. */
-                       };
-
-                       /** Enum for return values of a descriptor comparator function. */
-                       enum DSearch_Return_ErrorCodes_t
-                       {
-                               DESCRIPTOR_SEARCH_Found                = 0, /**< Current descriptor matches comparator criteria. */
-                               DESCRIPTOR_SEARCH_Fail                 = 1, /**< No further descriptor could possibly match criteria, fail the search. */
-                               DESCRIPTOR_SEARCH_NotFound             = 2, /**< Current descriptor does not match comparator criteria. */
-                       };
-
-                       /** Enum for return values of \ref USB_GetNextDescriptorComp(). */
-                       enum DSearch_Comp_Return_ErrorCodes_t
-                       {
-                               DESCRIPTOR_SEARCH_COMP_Found           = 0, /**< Configuration descriptor now points to descriptor which matches
-                                                                            *   search criteria of the given comparator function. */
-                               DESCRIPTOR_SEARCH_COMP_Fail            = 1, /**< Comparator function returned \ref DESCRIPTOR_SEARCH_Fail. */
-                               DESCRIPTOR_SEARCH_COMP_EndOfDescriptor = 2, /**< End of configuration descriptor reached before match found. */
-                       };
-
-               /* Function Prototypes: */
-                       /** Retrieves the configuration descriptor data from an attached device via a standard request into a buffer,
-                        *  including validity and size checking to prevent a buffer overflow.
-                        *
-                        *  \param[in]     ConfigNumber   Device configuration descriptor number to fetch from the device (usually set to 1 for
-                        *                                single configuration devices).
-                        *  \param[in,out] ConfigSizePtr  Pointer to a location for storing the retrieved configuration descriptor size.
-                        *  \param[out]    BufferPtr      Pointer to the buffer for storing the configuration descriptor data.
-                        *  \param[out]    BufferSize     Size of the allocated buffer where the configuration descriptor is to be stored.
-                        *
-                        *  \return A value from the \ref USB_Host_GetConfigDescriptor_ErrorCodes_t enum.
-                        */
-                       uint8_t USB_Host_GetDeviceConfigDescriptor(const uint8_t ConfigNumber,
-                                                                  uint16_t* const ConfigSizePtr,
-                                                                  void* const BufferPtr,
-                                                                  const uint16_t BufferSize) ATTR_NON_NULL_PTR_ARG(2) ATTR_NON_NULL_PTR_ARG(3);
-
-                       /** Skips to the next sub-descriptor inside the configuration descriptor of the specified type value.
-                        *  The bytes remaining value is automatically decremented.
-                        *
-                        * \param[in,out] BytesRem       Pointer to the number of bytes remaining of the configuration descriptor.
-                        * \param[in,out] CurrConfigLoc  Pointer to the current descriptor inside the configuration descriptor.
-                        * \param[in]     Type           Descriptor type value to search for.
-                        */
-                       void USB_GetNextDescriptorOfType(uint16_t* const BytesRem,
-                                                        void** const CurrConfigLoc,
-                                                        const uint8_t Type)
-                                                        ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
-
-                       /** Skips to the next sub-descriptor inside the configuration descriptor of the specified type value,
-                        *  which must come before a descriptor of the second given type value. If the BeforeType type
-                        *  descriptor is reached first, the number of bytes remaining to process is set to zero and the
-                        *  function exits. The bytes remaining value is automatically decremented.
-                        *
-                        * \param[in,out] BytesRem       Pointer to the number of bytes remaining of the configuration descriptor.
-                        * \param[in,out] CurrConfigLoc  Pointer to the current descriptor inside the configuration descriptor.
-                        * \param[in]     Type           Descriptor type value to search for.
-                        * \param[in]     BeforeType     Descriptor type value which must not be reached before the given Type descriptor.
-                        */
-                       void USB_GetNextDescriptorOfTypeBefore(uint16_t* const BytesRem,
-                                                              void** const CurrConfigLoc,
-                                                              const uint8_t Type,
-                                                              const uint8_t BeforeType)
-                                                              ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
-
-                       /** Skips to the next sub-descriptor inside the configuration descriptor of the specified type value,
-                        *  which must come after a descriptor of the second given type value. The bytes remaining value is
-                        *  automatically decremented.
-                        *
-                        * \param[in,out] BytesRem       Pointer to the number of bytes remaining of the configuration descriptor.
-                        * \param[in,out] CurrConfigLoc  Pointer to the current descriptor inside the configuration descriptor.
-                        * \param[in]     Type           Descriptor type value to search for.
-                        * \param[in]     AfterType      Descriptor type value which must be reached before the given Type descriptor.
-                        */
-                       void USB_GetNextDescriptorOfTypeAfter(uint16_t* const BytesRem,
-                                                             void** const CurrConfigLoc,
-                                                             const uint8_t Type,
-                                                             const uint8_t AfterType)
-                                                             ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
-
-                       /** Searches for the next descriptor in the given configuration descriptor using a pre-made comparator
-                        *  function. The routine updates the position and remaining configuration descriptor bytes values
-                        *  automatically. If a comparator routine fails a search, the descriptor pointer is retreated back
-                        *  so that the next descriptor search invocation will start from the descriptor which first caused the
-                        *  original search to fail. This behaviour allows for one comparator to be used immediately after another
-                        *  has failed, starting the second search from the descriptor which failed the first.
-                        *
-                        *  Comparator functions should be standard functions which accept a pointer to the header of the current
-                        *  descriptor inside the configuration descriptor which is being compared, and should return a value from
-                        *  the \ref DSearch_Return_ErrorCodes_t enum as a uint8_t value.
-                        *
-                        *  \note This function is available in USB Host mode only.
-                        *
-                        *  \param[in,out] BytesRem           Pointer to an int storing the remaining bytes in the configuration descriptor.
-                        *  \param[in,out] CurrConfigLoc      Pointer to the current position in the configuration descriptor.
-                        *  \param[in]     ComparatorRoutine  Name of the comparator search function to use on the configuration descriptor.
-                        *
-                        *  \return Value of one of the members of the \ref DSearch_Comp_Return_ErrorCodes_t enum.
-                        *
-                        *  Usage Example:
-                        *  \code
-                        *  uint8_t EndpointSearcher(void* CurrentDescriptor); // Comparator Prototype
-                        *  
-                        *  uint8_t EndpointSearcher(void* CurrentDescriptor)
-                        *  {
-                        *     if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Endpoint)
-                        *         return DESCRIPTOR_SEARCH_Found;
-                        *     else
-                        *         return DESCRIPTOR_SEARCH_NotFound;
-                        *  }
-                        *  
-                        *  //...
-                        *  
-                        *  // After retrieving configuration descriptor:
-                        *  if (USB_Host_GetNextDescriptorComp(&BytesRemaining, &CurrentConfigLoc, EndpointSearcher) ==
-                        *      Descriptor_Search_Comp_Found)
-                        *  {
-                        *      // Do something with the endpoint descriptor
-                        *  }
-                        *  \endcode
-                        */
-                       uint8_t USB_GetNextDescriptorComp(uint16_t* const BytesRem,
-                                                         void** const CurrConfigLoc,
-                                                         ConfigComparatorPtr_t const ComparatorRoutine);
-
-               /* Inline Functions: */
-                       /** Skips over the current sub-descriptor inside the configuration descriptor, so that the pointer then
-                           points to the next sub-descriptor. The bytes remaining value is automatically decremented.
-                        *
-                        * \param[in,out] BytesRem       Pointer to the number of bytes remaining of the configuration descriptor.
-                        * \param[in,out] CurrConfigLoc  Pointer to the current descriptor inside the configuration descriptor.
-                        */
-                       static inline void USB_GetNextDescriptor(uint16_t* const BytesRem,
-                                                                void** CurrConfigLoc) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
-                       static inline void USB_GetNextDescriptor(uint16_t* const BytesRem,
-                                                                void** CurrConfigLoc)
-                       {
-                               uint16_t CurrDescriptorSize = DESCRIPTOR_CAST(*CurrConfigLoc, USB_Descriptor_Header_t).Size;
-
-                               if (*BytesRem < CurrDescriptorSize)
-                                 CurrDescriptorSize = *BytesRem;
-
-                               *CurrConfigLoc  = (void*)((uintptr_t)*CurrConfigLoc + CurrDescriptorSize);
-                               *BytesRem      -= CurrDescriptorSize;
-                       }
-
-       /* Disable C linkage for C++ Compilers: */
-               #if defined(__cplusplus)
-                       }
-               #endif
-
-#endif
-
-/** @} */
-
diff --git a/LUFA/Drivers/USB/Core/ConfigDescriptors.c b/LUFA/Drivers/USB/Core/ConfigDescriptors.c
new file mode 100644 (file)
index 0000000..47332d8
--- /dev/null
@@ -0,0 +1,146 @@
+/*
+             LUFA Library
+     Copyright (C) Dean Camera, 2012.
+
+  dean [at] fourwalledcubicle [dot] com
+           www.lufa-lib.org
+*/
+
+/*
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+  Permission to use, copy, modify, distribute, and sell this
+  software and its documentation for any purpose is hereby granted
+  without fee, provided that the above copyright notice appear in
+  all copies and that both that the copyright notice and this
+  permission notice and warranty disclaimer appear in supporting
+  documentation, and that the name of the author not be used in
+  advertising or publicity pertaining to distribution of the
+  software without specific, written prior permission.
+
+  The author disclaim all warranties with regard to this
+  software, including all implied warranties of merchantability
+  and fitness.  In no event shall the author be liable for any
+  special, indirect or consequential damages or any damages
+  whatsoever resulting from loss of use, data or profits, whether
+  in an action of contract, negligence or other tortious action,
+  arising out of or in connection with the use or performance of
+  this software.
+*/
+
+#define  __INCLUDE_FROM_USB_DRIVER
+#include "ConfigDescriptors.h"
+
+#if defined(USB_CAN_BE_HOST)
+uint8_t USB_Host_GetDeviceConfigDescriptor(const uint8_t ConfigNumber,
+                                           uint16_t* const ConfigSizePtr,
+                                           void* const BufferPtr,
+                                           const uint16_t BufferSize)
+{
+       uint8_t ErrorCode;
+       uint8_t ConfigHeader[sizeof(USB_Descriptor_Configuration_Header_t)];
+
+       USB_ControlRequest = (USB_Request_Header_t)
+               {
+                       .bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE),
+                       .bRequest      = REQ_GetDescriptor,
+                       .wValue        = ((DTYPE_Configuration << 8) | (ConfigNumber - 1)),
+                       .wIndex        = 0,
+                       .wLength       = sizeof(USB_Descriptor_Configuration_Header_t),
+               };
+
+       Pipe_SelectPipe(PIPE_CONTROLPIPE);
+
+       if ((ErrorCode = USB_Host_SendControlRequest(ConfigHeader)) != HOST_SENDCONTROL_Successful)
+         return ErrorCode;
+
+       *ConfigSizePtr = le16_to_cpu(DESCRIPTOR_PCAST(ConfigHeader, USB_Descriptor_Configuration_Header_t)->TotalConfigurationSize);
+
+       if (*ConfigSizePtr > BufferSize)
+         return HOST_GETCONFIG_BuffOverflow;
+
+       USB_ControlRequest.wLength = *ConfigSizePtr;
+
+       if ((ErrorCode = USB_Host_SendControlRequest(BufferPtr)) != HOST_SENDCONTROL_Successful)
+         return ErrorCode;
+
+       if (DESCRIPTOR_TYPE(BufferPtr) != DTYPE_Configuration)
+         return HOST_GETCONFIG_InvalidData;
+
+       return HOST_GETCONFIG_Successful;
+}
+#endif
+
+void USB_GetNextDescriptorOfType(uint16_t* const BytesRem,
+                                 void** const CurrConfigLoc,
+                                 const uint8_t Type)
+{
+       while (*BytesRem)
+       {
+               USB_GetNextDescriptor(BytesRem, CurrConfigLoc);
+
+               if (DESCRIPTOR_TYPE(*CurrConfigLoc) == Type)
+                 return;
+       }
+}
+
+void USB_GetNextDescriptorOfTypeBefore(uint16_t* const BytesRem,
+                                       void** const CurrConfigLoc,
+                                       const uint8_t Type,
+                                       const uint8_t BeforeType)
+{
+       while (*BytesRem)
+       {
+               USB_GetNextDescriptor(BytesRem, CurrConfigLoc);
+
+               if (DESCRIPTOR_TYPE(*CurrConfigLoc) == Type)
+               {
+                       return;
+               }
+               else if (DESCRIPTOR_TYPE(*CurrConfigLoc) == BeforeType)
+               {
+                       *BytesRem = 0;
+                       return;
+               }
+       }
+}
+
+void USB_GetNextDescriptorOfTypeAfter(uint16_t* const BytesRem,
+                                      void** const CurrConfigLoc,
+                                      const uint8_t Type,
+                                      const uint8_t AfterType)
+{
+       USB_GetNextDescriptorOfType(BytesRem, CurrConfigLoc, AfterType);
+
+       if (*BytesRem)
+         USB_GetNextDescriptorOfType(BytesRem, CurrConfigLoc, Type);
+}
+
+uint8_t USB_GetNextDescriptorComp(uint16_t* const BytesRem,
+                                  void** const CurrConfigLoc,
+                                  ConfigComparatorPtr_t const ComparatorRoutine)
+{
+       uint8_t ErrorCode;
+
+       while (*BytesRem)
+       {
+               uint8_t* PrevDescLoc  = *CurrConfigLoc;
+               uint16_t PrevBytesRem = *BytesRem;
+
+               USB_GetNextDescriptor(BytesRem, CurrConfigLoc);
+
+               if ((ErrorCode = ComparatorRoutine(*CurrConfigLoc)) != DESCRIPTOR_SEARCH_NotFound)
+               {
+                       if (ErrorCode == DESCRIPTOR_SEARCH_Fail)
+                       {
+                               *CurrConfigLoc = PrevDescLoc;
+                               *BytesRem      = PrevBytesRem;
+                       }
+
+                       return ErrorCode;
+               }
+       }
+
+       return DESCRIPTOR_SEARCH_COMP_EndOfDescriptor;
+}
+
diff --git a/LUFA/Drivers/USB/Core/ConfigDescriptors.h b/LUFA/Drivers/USB/Core/ConfigDescriptors.h
new file mode 100644 (file)
index 0000000..97fb39b
--- /dev/null
@@ -0,0 +1,286 @@
+/*
+             LUFA Library
+     Copyright (C) Dean Camera, 2012.
+
+  dean [at] fourwalledcubicle [dot] com
+           www.lufa-lib.org
+*/
+
+/*
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+  Permission to use, copy, modify, distribute, and sell this
+  software and its documentation for any purpose is hereby granted
+  without fee, provided that the above copyright notice appear in
+  all copies and that both that the copyright notice and this
+  permission notice and warranty disclaimer appear in supporting
+  documentation, and that the name of the author not be used in
+  advertising or publicity pertaining to distribution of the
+  software without specific, written prior permission.
+
+  The author disclaim all warranties with regard to this
+  software, including all implied warranties of merchantability
+  and fitness.  In no event shall the author be liable for any
+  special, indirect or consequential damages or any damages
+  whatsoever resulting from loss of use, data or profits, whether
+  in an action of contract, negligence or other tortious action,
+  arising out of or in connection with the use or performance of
+  this software.
+*/
+
+/** \file
+ *  \brief USB Configuration Descriptor definitions.
+ *  \copydetails Group_ConfigDescriptorParser
+ *
+ *  \note This file should not be included directly. It is automatically included as needed by the USB driver
+ *        dispatch header located in LUFA/Drivers/USB/USB.h.
+ */
+
+/** \ingroup Group_StdDescriptors
+ *  \defgroup Group_ConfigDescriptorParser Configuration Descriptor Parser
+ *  \brief USB Configuration Descriptor definitions.
+ *
+ *  This section of the library gives a friendly API which can be used in host applications to easily
+ *  parse an attached device's configuration descriptor so that endpoint, interface and other descriptor
+ *  data can be extracted and used as needed.
+ *
+ *  @{
+ */
+
+#ifndef __CONFIGDESCRIPTOR_H__
+#define __CONFIGDESCRIPTOR_H__
+
+       /* Includes: */
+               #include "../../../Common/Common.h"
+               #include "USBMode.h"
+               #include "HostStandardReq.h"
+               #include "StdDescriptors.h"
+
+       /* Enable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       extern "C" {
+               #endif
+
+       /* Preprocessor Checks: */
+               #if !defined(__INCLUDE_FROM_USB_DRIVER)
+                       #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.
+               #endif
+
+       /* Public Interface - May be used in end-application: */
+               /* Macros: */
+                       /** Casts a pointer to a descriptor inside the configuration descriptor into a pointer to the given
+                        *  descriptor type.
+                        *
+                        *  Usage Example:
+                        *  \code
+                        *  uint8_t* CurrDescriptor = &ConfigDescriptor[0]; // Pointing to the configuration header
+                        *  USB_Descriptor_Configuration_Header_t* ConfigHeaderPtr = DESCRIPTOR_PCAST(CurrDescriptor,
+                        *                                                           USB_Descriptor_Configuration_Header_t);
+                        *  
+                        *  // Can now access elements of the configuration header struct using the -> indirection operator
+                        *  \endcode
+                        */
+                       #define DESCRIPTOR_PCAST(DescriptorPtr, Type) ((Type*)(DescriptorPtr))
+
+                       /** Casts a pointer to a descriptor inside the configuration descriptor into the given descriptor
+                        *  type (as an actual struct instance rather than a pointer to a struct).
+                        *
+                        *  Usage Example:
+                        *  \code
+                        *  uint8_t* CurrDescriptor = &ConfigDescriptor[0]; // Pointing to the configuration header
+                        *  USB_Descriptor_Configuration_Header_t ConfigHeader = DESCRIPTOR_CAST(CurrDescriptor,
+                        *                                                       USB_Descriptor_Configuration_Header_t);
+                        *  
+                        *  // Can now access elements of the configuration header struct using the . operator
+                        *  \endcode
+                        */
+                       #define DESCRIPTOR_CAST(DescriptorPtr, Type)  (*DESCRIPTOR_PCAST(DescriptorPtr, Type))
+
+                       /** Returns the descriptor's type, expressed as the 8-bit type value in the header of the descriptor.
+                        *  This value's meaning depends on the descriptor's placement in the descriptor, but standard type
+                        *  values can be accessed in the \ref USB_DescriptorTypes_t enum.
+                        */
+                       #define DESCRIPTOR_TYPE(DescriptorPtr)    DESCRIPTOR_PCAST(DescriptorPtr, USB_Descriptor_Header_t)->Type
+
+                       /** Returns the descriptor's size, expressed as the 8-bit value indicating the number of bytes. */
+                       #define DESCRIPTOR_SIZE(DescriptorPtr)    DESCRIPTOR_PCAST(DescriptorPtr, USB_Descriptor_Header_t)->Size
+
+               /* Type Defines: */
+                       /** Type define for a Configuration Descriptor comparator function (function taking a pointer to an array
+                        *  of type void, returning a uint8_t value).
+                        *
+                        *  \see \ref USB_GetNextDescriptorComp function for more details.
+                        */
+                       typedef uint8_t (* ConfigComparatorPtr_t)(void*);
+
+               /* Enums: */
+                       /** Enum for the possible return codes of the \ref USB_Host_GetDeviceConfigDescriptor() function. */
+                       enum USB_Host_GetConfigDescriptor_ErrorCodes_t
+                       {
+                               HOST_GETCONFIG_Successful       = 0, /**< No error occurred while retrieving the configuration descriptor. */
+                               HOST_GETCONFIG_DeviceDisconnect = 1, /**< The attached device was disconnected while retrieving the configuration
+                                                                       * descriptor.
+                                                                       */
+                               HOST_GETCONFIG_PipeError        = 2, /**< An error occurred in the pipe while sending the request. */
+                               HOST_GETCONFIG_SetupStalled     = 3, /**< The attached device stalled the request to retrieve the configuration
+                                                                       * descriptor.
+                                                                       */
+                               HOST_GETCONFIG_SoftwareTimeOut  = 4, /**< The request or data transfer timed out. */
+                               HOST_GETCONFIG_BuffOverflow     = 5, /**< The device's configuration descriptor is too large to fit into the allocated
+                                                                       * buffer.
+                                                                       */
+                               HOST_GETCONFIG_InvalidData      = 6, /**< The device returned invalid configuration descriptor data. */
+                       };
+
+                       /** Enum for return values of a descriptor comparator function. */
+                       enum DSearch_Return_ErrorCodes_t
+                       {
+                               DESCRIPTOR_SEARCH_Found                = 0, /**< Current descriptor matches comparator criteria. */
+                               DESCRIPTOR_SEARCH_Fail                 = 1, /**< No further descriptor could possibly match criteria, fail the search. */
+                               DESCRIPTOR_SEARCH_NotFound             = 2, /**< Current descriptor does not match comparator criteria. */
+                       };
+
+                       /** Enum for return values of \ref USB_GetNextDescriptorComp(). */
+                       enum DSearch_Comp_Return_ErrorCodes_t
+                       {
+                               DESCRIPTOR_SEARCH_COMP_Found           = 0, /**< Configuration descriptor now points to descriptor which matches
+                                                                            *   search criteria of the given comparator function. */
+                               DESCRIPTOR_SEARCH_COMP_Fail            = 1, /**< Comparator function returned \ref DESCRIPTOR_SEARCH_Fail. */
+                               DESCRIPTOR_SEARCH_COMP_EndOfDescriptor = 2, /**< End of configuration descriptor reached before match found. */
+                       };
+
+               /* Function Prototypes: */
+                       /** Retrieves the configuration descriptor data from an attached device via a standard request into a buffer,
+                        *  including validity and size checking to prevent a buffer overflow.
+                        *
+                        *  \param[in]     ConfigNumber   Device configuration descriptor number to fetch from the device (usually set to 1 for
+                        *                                single configuration devices).
+                        *  \param[in,out] ConfigSizePtr  Pointer to a location for storing the retrieved configuration descriptor size.
+                        *  \param[out]    BufferPtr      Pointer to the buffer for storing the configuration descriptor data.
+                        *  \param[out]    BufferSize     Size of the allocated buffer where the configuration descriptor is to be stored.
+                        *
+                        *  \return A value from the \ref USB_Host_GetConfigDescriptor_ErrorCodes_t enum.
+                        */
+                       uint8_t USB_Host_GetDeviceConfigDescriptor(const uint8_t ConfigNumber,
+                                                                  uint16_t* const ConfigSizePtr,
+                                                                  void* const BufferPtr,
+                                                                  const uint16_t BufferSize) ATTR_NON_NULL_PTR_ARG(2) ATTR_NON_NULL_PTR_ARG(3);
+
+                       /** Skips to the next sub-descriptor inside the configuration descriptor of the specified type value.
+                        *  The bytes remaining value is automatically decremented.
+                        *
+                        * \param[in,out] BytesRem       Pointer to the number of bytes remaining of the configuration descriptor.
+                        * \param[in,out] CurrConfigLoc  Pointer to the current descriptor inside the configuration descriptor.
+                        * \param[in]     Type           Descriptor type value to search for.
+                        */
+                       void USB_GetNextDescriptorOfType(uint16_t* const BytesRem,
+                                                        void** const CurrConfigLoc,
+                                                        const uint8_t Type)
+                                                        ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
+
+                       /** Skips to the next sub-descriptor inside the configuration descriptor of the specified type value,
+                        *  which must come before a descriptor of the second given type value. If the BeforeType type
+                        *  descriptor is reached first, the number of bytes remaining to process is set to zero and the
+                        *  function exits. The bytes remaining value is automatically decremented.
+                        *
+                        * \param[in,out] BytesRem       Pointer to the number of bytes remaining of the configuration descriptor.
+                        * \param[in,out] CurrConfigLoc  Pointer to the current descriptor inside the configuration descriptor.
+                        * \param[in]     Type           Descriptor type value to search for.
+                        * \param[in]     BeforeType     Descriptor type value which must not be reached before the given Type descriptor.
+                        */
+                       void USB_GetNextDescriptorOfTypeBefore(uint16_t* const BytesRem,
+                                                              void** const CurrConfigLoc,
+                                                              const uint8_t Type,
+                                                              const uint8_t BeforeType)
+                                                              ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
+
+                       /** Skips to the next sub-descriptor inside the configuration descriptor of the specified type value,
+                        *  which must come after a descriptor of the second given type value. The bytes remaining value is
+                        *  automatically decremented.
+                        *
+                        * \param[in,out] BytesRem       Pointer to the number of bytes remaining of the configuration descriptor.
+                        * \param[in,out] CurrConfigLoc  Pointer to the current descriptor inside the configuration descriptor.
+                        * \param[in]     Type           Descriptor type value to search for.
+                        * \param[in]     AfterType      Descriptor type value which must be reached before the given Type descriptor.
+                        */
+                       void USB_GetNextDescriptorOfTypeAfter(uint16_t* const BytesRem,
+                                                             void** const CurrConfigLoc,
+                                                             const uint8_t Type,
+                                                             const uint8_t AfterType)
+                                                             ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
+
+                       /** Searches for the next descriptor in the given configuration descriptor using a pre-made comparator
+                        *  function. The routine updates the position and remaining configuration descriptor bytes values
+                        *  automatically. If a comparator routine fails a search, the descriptor pointer is retreated back
+                        *  so that the next descriptor search invocation will start from the descriptor which first caused the
+                        *  original search to fail. This behavior allows for one comparator to be used immediately after another
+                        *  has failed, starting the second search from the descriptor which failed the first.
+                        *
+                        *  Comparator functions should be standard functions which accept a pointer to the header of the current
+                        *  descriptor inside the configuration descriptor which is being compared, and should return a value from
+                        *  the \ref DSearch_Return_ErrorCodes_t enum as a uint8_t value.
+                        *
+                        *  \note This function is available in USB Host mode only.
+                        *
+                        *  \param[in,out] BytesRem           Pointer to an int storing the remaining bytes in the configuration descriptor.
+                        *  \param[in,out] CurrConfigLoc      Pointer to the current position in the configuration descriptor.
+                        *  \param[in]     ComparatorRoutine  Name of the comparator search function to use on the configuration descriptor.
+                        *
+                        *  \return Value of one of the members of the \ref DSearch_Comp_Return_ErrorCodes_t enum.
+                        *
+                        *  Usage Example:
+                        *  \code
+                        *  uint8_t EndpointSearcher(void* CurrentDescriptor); // Comparator Prototype
+                        *  
+                        *  uint8_t EndpointSearcher(void* CurrentDescriptor)
+                        *  {
+                        *     if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Endpoint)
+                        *         return DESCRIPTOR_SEARCH_Found;
+                        *     else
+                        *         return DESCRIPTOR_SEARCH_NotFound;
+                        *  }
+                        *  
+                        *  //...
+                        *  
+                        *  // After retrieving configuration descriptor:
+                        *  if (USB_Host_GetNextDescriptorComp(&BytesRemaining, &CurrentConfigLoc, EndpointSearcher) ==
+                        *      Descriptor_Search_Comp_Found)
+                        *  {
+                        *      // Do something with the endpoint descriptor
+                        *  }
+                        *  \endcode
+                        */
+                       uint8_t USB_GetNextDescriptorComp(uint16_t* const BytesRem,
+                                                         void** const CurrConfigLoc,
+                                                         ConfigComparatorPtr_t const ComparatorRoutine);
+
+               /* Inline Functions: */
+                       /** Skips over the current sub-descriptor inside the configuration descriptor, so that the pointer then
+                           points to the next sub-descriptor. The bytes remaining value is automatically decremented.
+                        *
+                        * \param[in,out] BytesRem       Pointer to the number of bytes remaining of the configuration descriptor.
+                        * \param[in,out] CurrConfigLoc  Pointer to the current descriptor inside the configuration descriptor.
+                        */
+                       static inline void USB_GetNextDescriptor(uint16_t* const BytesRem,
+                                                                void** CurrConfigLoc) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
+                       static inline void USB_GetNextDescriptor(uint16_t* const BytesRem,
+                                                                void** CurrConfigLoc)
+                       {
+                               uint16_t CurrDescriptorSize = DESCRIPTOR_CAST(*CurrConfigLoc, USB_Descriptor_Header_t).Size;
+
+                               if (*BytesRem < CurrDescriptorSize)
+                                 CurrDescriptorSize = *BytesRem;
+
+                               *CurrConfigLoc  = (void*)((uintptr_t)*CurrConfigLoc + CurrDescriptorSize);
+                               *BytesRem      -= CurrDescriptorSize;
+                       }
+
+       /* Disable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       }
+               #endif
+
+#endif
+
+/** @} */
+
index 8d627d4..f468b7e 100644 (file)
                         *  \note For the microcontrollers with limited USB controller functionality, VBUS sensing is not available.
                         *        this means that the current connection state is derived from the bus suspension and wake up events by default,
                         *        which is not always accurate (host may suspend the bus while still connected). If the actual connection state
-                        *        needs to be determined, VBUS should be routed to an external pin, and the auto-detect behaviour turned off by
+                        *        needs to be determined, VBUS should be routed to an external pin, and the auto-detect behavior turned off by
                         *        passing the \c NO_LIMITED_CONTROLLER_CONNECT token to the compiler via the -D switch at compile time. The connection
                         *        and disconnection events may be manually fired, and the \ref USB_DeviceState global changed manually.
                         *        \n\n
                         *  \note For the microcontrollers with limited USB controllers, VBUS sense is not available to the USB controller.
                         *        this means that the current connection state is derived from the bus suspension and wake up events by default,
                         *        which is not always accurate (host may suspend the bus while still connected). If the actual connection state
-                        *        needs to be determined, VBUS should be routed to an external pin, and the auto-detect behaviour turned off by
+                        *        needs to be determined, VBUS should be routed to an external pin, and the auto-detect behavior turned off by
                         *        passing the \c NO_LIMITED_CONTROLLER_CONNECT token to the compiler via the -D switch at compile time. The connection
                         *        and disconnection events may be manually fired, and the \ref USB_DeviceState global changed manually.
                         *        \n\n
index 5bdfe45..6ad0d2e 100644 (file)
@@ -91,7 +91,7 @@
 
                /* Global Variables: */
                        /** Indicates the currently set configuration number of the attached device. This indicates the currently
-                        *  selected configuration value if one has been set sucessfully, or 0 if no configuration has been selected.
+                        *  selected configuration value if one has been set successfully, or 0 if no configuration has been selected.
                         *
                         *  To set a device configuration, call the \ref USB_Host_SetDeviceConfiguration() function.
                         *
index c46129c..031e01d 100644 (file)
                        /** \name USB Configuration Descriptor Attribute Masks */
                        //@{
                        /** Mask for the reserved bit in the Configuration Descriptor's \c ConfigAttributes field, which must be set on all
-                        *  devices for historial purposes.
+                        *  devices for historical purposes.
                         */
                        #define USB_CONFIG_ATTR_RESERVED          0x80
 
index b4e130e..5154610 100644 (file)
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2012.\r
-              \r
-  dean [at] fourwalledcubicle [dot] com\r
-           www.lufa-lib.org\r
-*/\r
-\r
-/*\r
-  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, distribute, and sell this \r
-  software and its documentation for any purpose is hereby granted\r
-  without fee, provided that the above copyright notice appear in \r
-  all copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting \r
-  documentation, and that the name of the author not be used in \r
-  advertising or publicity pertaining to distribution of the \r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-#include "../../../../Common/Common.h"\r
-#if (ARCH == ARCH_UC3)\r
-\r
-#define  __INCLUDE_FROM_USB_DRIVER\r
-#include "../USBMode.h"\r
-\r
-#if defined(USB_CAN_BE_DEVICE)\r
-\r
-#include "EndpointStream_UC3.h"\r
-\r
-#if !defined(CONTROL_ONLY_DEVICE)\r
-uint8_t Endpoint_Discard_Stream(uint16_t Length,\r
-                                uint16_t* const BytesProcessed)\r
-{\r
-       uint8_t  ErrorCode;\r
-       uint16_t BytesInTransfer = 0;\r
-       \r
-       if ((ErrorCode = Endpoint_WaitUntilReady()))\r
-         return ErrorCode;\r
-         \r
-       if (BytesProcessed != NULL)\r
-         Length -= *BytesProcessed;\r
-\r
-       while (Length)\r
-       {\r
-               if (!(Endpoint_IsReadWriteAllowed()))\r
-               {\r
-                       Endpoint_ClearOUT();\r
-\r
-                       if (BytesProcessed != NULL)\r
-                       {\r
-                               *BytesProcessed += BytesInTransfer;\r
-                               return ENDPOINT_RWSTREAM_IncompleteTransfer;\r
-                       }\r
-\r
-                       if ((ErrorCode = Endpoint_WaitUntilReady()))\r
-                         return ErrorCode;\r
-               }\r
-               else\r
-               {\r
-                       Endpoint_Discard_8();\r
-\r
-                       Length--;\r
-                       BytesInTransfer++;\r
-               }\r
-       }\r
-       \r
-       return ENDPOINT_RWSTREAM_NoError;\r
-}\r
-\r
-uint8_t Endpoint_Null_Stream(uint16_t Length,\r
-                             uint16_t* const BytesProcessed)\r
-{\r
-       uint8_t  ErrorCode;\r
-       uint16_t BytesInTransfer = 0;\r
-       \r
-       if ((ErrorCode = Endpoint_WaitUntilReady()))\r
-         return ErrorCode;\r
-         \r
-       if (BytesProcessed != NULL)\r
-         Length -= *BytesProcessed;\r
-\r
-       while (Length)\r
-       {\r
-               if (!(Endpoint_IsReadWriteAllowed()))\r
-               {\r
-                       Endpoint_ClearIN();\r
-\r
-                       if (BytesProcessed != NULL)\r
-                       {\r
-                               *BytesProcessed += BytesInTransfer;\r
-                               return ENDPOINT_RWSTREAM_IncompleteTransfer;\r
-                       }\r
-\r
-                       if ((ErrorCode = Endpoint_WaitUntilReady()))\r
-                         return ErrorCode;\r
-               }\r
-               else\r
-               {\r
-                       Endpoint_Write_8(0);\r
-\r
-                       Length--;\r
-                       BytesInTransfer++;\r
-               }\r
-       }\r
-       \r
-       return ENDPOINT_RWSTREAM_NoError;\r
-}\r
-\r
-/* The following abuses the C preprocessor in order to copy-paste common code with slight alterations,\r
- * so that the code needs to be written once. It is a crude form of templating to reduce code maintenance. */\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Stream_LE\r
-#define  TEMPLATE_BUFFER_TYPE                      const void*\r
-#define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(*BufferPtr)\r
-#include "Template/Template_Endpoint_RW.c"\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Stream_BE\r
-#define  TEMPLATE_BUFFER_TYPE                      const void*\r
-#define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(*BufferPtr)\r
-#include "Template/Template_Endpoint_RW.c"\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Stream_LE\r
-#define  TEMPLATE_BUFFER_TYPE                      void*\r
-#define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearOUT()\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Endpoint_Read_8()\r
-#include "Template/Template_Endpoint_RW.c"\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Stream_BE\r
-#define  TEMPLATE_BUFFER_TYPE                      void*\r
-#define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearOUT()\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Endpoint_Read_8()\r
-#include "Template/Template_Endpoint_RW.c"\r
-\r
-#if defined(ARCH_HAS_FLASH_ADDRESS_SPACE)\r
-       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_PStream_LE\r
-       #define  TEMPLATE_BUFFER_TYPE                      const void*\r
-       #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()\r
-       #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
-       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(pgm_read_byte(BufferPtr))\r
-       #include "Template/Template_Endpoint_RW.c"\r
-\r
-       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_PStream_BE\r
-       #define  TEMPLATE_BUFFER_TYPE                      const void*\r
-       #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()\r
-       #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
-       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(pgm_read_byte(BufferPtr))\r
-       #include "Template/Template_Endpoint_RW.c"\r
-#endif\r
-\r
-#if defined(ARCH_HAS_EEPROM_ADDRESS_SPACE)\r
-       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_EStream_LE\r
-       #define  TEMPLATE_BUFFER_TYPE                      const void*\r
-       #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()\r
-       #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
-       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(eeprom_read_byte(BufferPtr))\r
-       #include "Template/Template_Endpoint_RW.c"\r
-\r
-       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_EStream_BE\r
-       #define  TEMPLATE_BUFFER_TYPE                      const void*\r
-       #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()\r
-       #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
-       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(eeprom_read_byte(BufferPtr))\r
-       #include "Template/Template_Endpoint_RW.c"\r
-\r
-       #define  TEMPLATE_FUNC_NAME                        Endpoint_Read_EStream_LE\r
-       #define  TEMPLATE_BUFFER_TYPE                      void*\r
-       #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearOUT()\r
-       #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
-       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         eeprom_update_byte(BufferPtr, Endpoint_Read_8())\r
-       #include "Template/Template_Endpoint_RW.c"\r
-\r
-       #define  TEMPLATE_FUNC_NAME                        Endpoint_Read_EStream_BE\r
-       #define  TEMPLATE_BUFFER_TYPE                      void*\r
-       #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearOUT()\r
-       #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
-       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         eeprom_update_byte(BufferPtr, Endpoint_Read_8())\r
-       #include "Template/Template_Endpoint_RW.c"\r
-#endif\r
-\r
-#endif\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_Stream_LE\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(*BufferPtr)\r
-#include "Template/Template_Endpoint_Control_W.c"\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_Stream_BE\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(*BufferPtr)\r
-#include "Template/Template_Endpoint_Control_W.c"\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Control_Stream_LE\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Endpoint_Read_8()\r
-#include "Template/Template_Endpoint_Control_R.c"\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Control_Stream_BE\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Endpoint_Read_8()\r
-#include "Template/Template_Endpoint_Control_R.c"\r
-\r
+/*
+             LUFA Library
+     Copyright (C) Dean Camera, 2012.
+              
+  dean [at] fourwalledcubicle [dot] com
+           www.lufa-lib.org
+*/
+
+/*
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+  Permission to use, copy, modify, distribute, and sell this 
+  software and its documentation for any purpose is hereby granted
+  without fee, provided that the above copyright notice appear in 
+  all copies and that both that the copyright notice and this
+  permission notice and warranty disclaimer appear in supporting 
+  documentation, and that the name of the author not be used in 
+  advertising or publicity pertaining to distribution of the 
+  software without specific, written prior permission.
+
+  The author disclaim all warranties with regard to this
+  software, including all implied warranties of merchantability
+  and fitness.  In no event shall the author be liable for any
+  special, indirect or consequential damages or any damages
+  whatsoever resulting from loss of use, data or profits, whether
+  in an action of contract, negligence or other tortious action,
+  arising out of or in connection with the use or performance of
+  this software.
+*/
+
+#include "../../../../Common/Common.h"
+#if (ARCH == ARCH_UC3)
+
+#define  __INCLUDE_FROM_USB_DRIVER
+#include "../USBMode.h"
+
+#if defined(USB_CAN_BE_DEVICE)
+
+#include "EndpointStream_UC3.h"
+
+#if !defined(CONTROL_ONLY_DEVICE)
+uint8_t Endpoint_Discard_Stream(uint16_t Length,
+                                uint16_t* const BytesProcessed)
+{
+       uint8_t  ErrorCode;
+       uint16_t BytesInTransfer = 0;
+       
+       if ((ErrorCode = Endpoint_WaitUntilReady()))
+         return ErrorCode;
+         
+       if (BytesProcessed != NULL)
+         Length -= *BytesProcessed;
+
+       while (Length)
+       {
+               if (!(Endpoint_IsReadWriteAllowed()))
+               {
+                       Endpoint_ClearOUT();
+
+                       if (BytesProcessed != NULL)
+                       {
+                               *BytesProcessed += BytesInTransfer;
+                               return ENDPOINT_RWSTREAM_IncompleteTransfer;
+                       }
+
+                       if ((ErrorCode = Endpoint_WaitUntilReady()))
+                         return ErrorCode;
+               }
+               else
+               {
+                       Endpoint_Discard_8();
+
+                       Length--;
+                       BytesInTransfer++;
+               }
+       }
+       
+       return ENDPOINT_RWSTREAM_NoError;
+}
+
+uint8_t Endpoint_Null_Stream(uint16_t Length,
+                             uint16_t* const BytesProcessed)
+{
+       uint8_t  ErrorCode;
+       uint16_t BytesInTransfer = 0;
+       
+       if ((ErrorCode = Endpoint_WaitUntilReady()))
+         return ErrorCode;
+         
+       if (BytesProcessed != NULL)
+         Length -= *BytesProcessed;
+
+       while (Length)
+       {
+               if (!(Endpoint_IsReadWriteAllowed()))
+               {
+                       Endpoint_ClearIN();
+
+                       if (BytesProcessed != NULL)
+                       {
+                               *BytesProcessed += BytesInTransfer;
+                               return ENDPOINT_RWSTREAM_IncompleteTransfer;
+                       }
+
+                       if ((ErrorCode = Endpoint_WaitUntilReady()))
+                         return ErrorCode;
+               }
+               else
+               {
+                       Endpoint_Write_8(0);
+
+                       Length--;
+                       BytesInTransfer++;
+               }
+       }
+       
+       return ENDPOINT_RWSTREAM_NoError;
+}
+
+/* The following abuses the C preprocessor in order to copy-paste common code with slight alterations,
+ * so that the code needs to be written once. It is a crude form of templating to reduce code maintenance. */
+
+#define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Stream_LE
+#define  TEMPLATE_BUFFER_TYPE                      const void*
+#define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()
+#define  TEMPLATE_BUFFER_OFFSET(Length)            0
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(*BufferPtr)
+#include "Template/Template_Endpoint_RW.c"
+
+#define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Stream_BE
+#define  TEMPLATE_BUFFER_TYPE                      const void*
+#define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()
+#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(*BufferPtr)
+#include "Template/Template_Endpoint_RW.c"
+
+#define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Stream_LE
+#define  TEMPLATE_BUFFER_TYPE                      void*
+#define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearOUT()
+#define  TEMPLATE_BUFFER_OFFSET(Length)            0
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Endpoint_Read_8()
+#include "Template/Template_Endpoint_RW.c"
+
+#define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Stream_BE
+#define  TEMPLATE_BUFFER_TYPE                      void*
+#define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearOUT()
+#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Endpoint_Read_8()
+#include "Template/Template_Endpoint_RW.c"
+
+#if defined(ARCH_HAS_FLASH_ADDRESS_SPACE)
+       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_PStream_LE
+       #define  TEMPLATE_BUFFER_TYPE                      const void*
+       #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()
+       #define  TEMPLATE_BUFFER_OFFSET(Length)            0
+       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(pgm_read_byte(BufferPtr))
+       #include "Template/Template_Endpoint_RW.c"
+
+       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_PStream_BE
+       #define  TEMPLATE_BUFFER_TYPE                      const void*
+       #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()
+       #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)
+       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(pgm_read_byte(BufferPtr))
+       #include "Template/Template_Endpoint_RW.c"
+#endif
+
+#if defined(ARCH_HAS_EEPROM_ADDRESS_SPACE)
+       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_EStream_LE
+       #define  TEMPLATE_BUFFER_TYPE                      const void*
+       #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()
+       #define  TEMPLATE_BUFFER_OFFSET(Length)            0
+       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(eeprom_read_byte(BufferPtr))
+       #include "Template/Template_Endpoint_RW.c"
+
+       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_EStream_BE
+       #define  TEMPLATE_BUFFER_TYPE                      const void*
+       #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()
+       #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)
+       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(eeprom_read_byte(BufferPtr))
+       #include "Template/Template_Endpoint_RW.c"
+
+       #define  TEMPLATE_FUNC_NAME                        Endpoint_Read_EStream_LE
+       #define  TEMPLATE_BUFFER_TYPE                      void*
+       #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearOUT()
+       #define  TEMPLATE_BUFFER_OFFSET(Length)            0
+       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         eeprom_update_byte(BufferPtr, Endpoint_Read_8())
+       #include "Template/Template_Endpoint_RW.c"
+
+       #define  TEMPLATE_FUNC_NAME                        Endpoint_Read_EStream_BE
+       #define  TEMPLATE_BUFFER_TYPE                      void*
+       #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearOUT()
+       #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)
+       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         eeprom_update_byte(BufferPtr, Endpoint_Read_8())
+       #include "Template/Template_Endpoint_RW.c"
 #endif
 
-#endif\r
+#endif
+
+#define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_Stream_LE
+#define  TEMPLATE_BUFFER_OFFSET(Length)            0
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(*BufferPtr)
+#include "Template/Template_Endpoint_Control_W.c"
+
+#define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_Stream_BE
+#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(*BufferPtr)
+#include "Template/Template_Endpoint_Control_W.c"
+
+#define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Control_Stream_LE
+#define  TEMPLATE_BUFFER_OFFSET(Length)            0
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Endpoint_Read_8()
+#include "Template/Template_Endpoint_Control_R.c"
+
+#define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Control_Stream_BE
+#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Endpoint_Read_8()
+#include "Template/Template_Endpoint_Control_R.c"
+
+#endif
+
+#endif
index 40a54ee..551cf4b 100644 (file)
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2012.\r
-              \r
-  dean [at] fourwalledcubicle [dot] com\r
-           www.lufa-lib.org\r
-*/\r
-\r
-/*\r
-  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, distribute, and sell this \r
-  software and its documentation for any purpose is hereby granted\r
-  without fee, provided that the above copyright notice appear in \r
-  all copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting \r
-  documentation, and that the name of the author not be used in \r
-  advertising or publicity pertaining to distribution of the \r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-/** \file\r
- *  \brief Endpoint data stream transmission and reception management for the AVR32 UC3 microcontrollers.\r
- *  \copydetails Group_EndpointStreamRW_UC3\r
- *\r
- *  \note This file should not be included directly. It is automatically included as needed by the USB driver\r
- *        dispatch header located in LUFA/Drivers/USB/USB.h.\r
- */\r
-\r
-/** \ingroup Group_EndpointStreamRW\r
- *  \defgroup Group_EndpointStreamRW_UC3 Read/Write of Multi-Byte Streams (UC3)\r
- *  \brief Endpoint data stream transmission and reception management for the Atmel AVR32 UC3 architecture.\r
- *\r
- *  Functions, macros, variables, enums and types related to data reading and writing of data streams from\r
- *  and to endpoints.\r
- *\r
- *  @{\r
- */ \r
-\r
-#ifndef __ENDPOINT_STREAM_UC3_H__\r
-#define __ENDPOINT_STREAM_UC3_H__\r
-\r
-       /* Includes: */\r
-               #include "../../../../Common/Common.h"\r
-               #include "../USBMode.h"\r
-               #include "../USBTask.h"\r
-               \r
-       /* Enable C linkage for C++ Compilers: */\r
-               #if defined(__cplusplus)\r
-                       extern "C" {\r
-               #endif\r
-\r
-       /* Preprocessor Checks: */\r
-               #if !defined(__INCLUDE_FROM_USB_DRIVER)\r
-                       #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.\r
-               #endif\r
-\r
-       /* Public Interface - May be used in end-application: */\r
-               /* Function Prototypes: */\r
-                       /** \name Stream functions for null data */\r
-                       //@{\r
-\r
-                       /** Reads and discards the given number of bytes from the currently selected endpoint's bank,\r
-                        *  discarding fully read packets from the host as needed. The last packet is not automatically\r
-                        *  discarded once the remaining bytes has been read; the user is responsible for manually\r
-                        *  discarding the last packet from the host via the \ref Endpoint_ClearOUT() macro.\r
-                        *\r
-                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once,\r
-                        *  failing or succeeding as a single unit. If the BytesProcessed parameter points to a valid\r
-                        *  storage location, the transfer will instead be performed as a series of chunks. Each time\r
-                        *  the endpoint bank becomes empty while there is still data to process (and after the current\r
-                        *  packet has been acknowledged) the BytesProcessed location will be updated with the total number\r
-                        *  of bytes processed in the stream, and the function will exit with an error code of\r
-                        *  \ref ENDPOINT_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed\r
-                        *  in the user code - to continue the transfer, call the function again with identical parameters\r
-                        *  and it will resume until the BytesProcessed value reaches the total transfer length.\r
-                        *\r
-                        *  <b>Single Stream Transfer Example:</b>\r
-                        *  \code\r
-                        *  uint8_t ErrorCode;\r
-                        *  \r
-                        *  if ((ErrorCode = Endpoint_Discard_Stream(512, NULL)) != ENDPOINT_RWSTREAM_NoError)\r
-                        *  {\r
-                        *       // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  <b>Partial Stream Transfers Example:</b>\r
-                        *  \code\r
-                        *  uint8_t  ErrorCode;\r
-                        *  uint16_t BytesProcessed;\r
-                        *  \r
-                        *  BytesProcessed = 0;\r
-                        *  while ((ErrorCode = Endpoint_Discard_Stream(512, &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)\r
-                        *  {\r
-                        *      // Stream not yet complete - do other actions here, abort if required\r
-                        *  }\r
-                        *  \r
-                        *  if (ErrorCode != ENDPOINT_RWSTREAM_NoError)\r
-                        *  {\r
-                        *      // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  \note This routine should not be used on CONTROL type endpoints.\r
-                        *\r
-                        *  \param[in] Length          Number of bytes to discard via the currently selected endpoint.\r
-                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current\r
-                        *                             transaction should be updated, \c NULL if the entire stream should be read at once.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Discard_Stream(uint16_t Length,\r
-                                                       uint16_t* const BytesProcessed);\r
-\r
-                       /** Writes a given number of zeroed bytes to the currently selected endpoint's bank, sending\r
-                        *  full packets to the host as needed. The last packet is not automatically sent once the \r
-                        *  remaining bytes have been written; the user is responsible for manually sending the last\r
-                        *  packet to the host via the \ref Endpoint_ClearIN() macro.\r
-                        *\r
-                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once,\r
-                        *  failing or succeeding as a single unit. If the BytesProcessed parameter points to a valid\r
-                        *  storage location, the transfer will instead be performed as a series of chunks. Each time\r
-                        *  the endpoint bank becomes full while there is still data to process (and after the current\r
-                        *  packet transmission has been initiated) the BytesProcessed location will be updated with the\r
-                        *  total number of bytes processed in the stream, and the function will exit with an error code of\r
-                        *  \ref ENDPOINT_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed\r
-                        *  in the user code - to continue the transfer, call the function again with identical parameters\r
-                        *  and it will resume until the BytesProcessed value reaches the total transfer length.\r
-                        *\r
-                        *  <b>Single Stream Transfer Example:</b>\r
-                        *  \code\r
-                        *  uint8_t ErrorCode;\r
-                        *  \r
-                        *  if ((ErrorCode = Endpoint_Null_Stream(512, NULL)) != ENDPOINT_RWSTREAM_NoError)\r
-                        *  {\r
-                        *       // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  <b>Partial Stream Transfers Example:</b>\r
-                        *  \code\r
-                        *  uint8_t  ErrorCode;\r
-                        *  uint16_t BytesProcessed;\r
-                        *  \r
-                        *  BytesProcessed = 0;\r
-                        *  while ((ErrorCode = Endpoint_Null_Stream(512, &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)\r
-                        *  {\r
-                        *      // Stream not yet complete - do other actions here, abort if required\r
-                        *  }\r
-                        *  \r
-                        *  if (ErrorCode != ENDPOINT_RWSTREAM_NoError)\r
-                        *  {\r
-                        *      // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  \note This routine should not be used on CONTROL type endpoints.\r
-                        *\r
-                        *  \param[in] Length          Number of zero bytes to send via the currently selected endpoint.\r
-                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current\r
-                        *                             transaction should be updated, \c NULL if the entire stream should be read at once.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Null_Stream(uint16_t Length,\r
-                                                    uint16_t* const BytesProcessed);\r
-\r
-                       //@}\r
-\r
-                       /** \name Stream functions for RAM source/destination data */\r
-                       //@{\r
-               \r
-                       /** Writes the given number of bytes to the endpoint from the given buffer in little endian,\r
-                        *  sending full packets to the host as needed. The last packet filled is not automatically sent;\r
-                        *  the user is responsible for manually sending the last written packet to the host via the\r
-                        *  \ref Endpoint_ClearIN() macro.\r
-                        *\r
-                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once,\r
-                        *  failing or succeeding as a single unit. If the BytesProcessed parameter points to a valid\r
-                        *  storage location, the transfer will instead be performed as a series of chunks. Each time\r
-                        *  the endpoint bank becomes full while there is still data to process (and after the current\r
-                        *  packet transmission has been initiated) the BytesProcessed location will be updated with the\r
-                        *  total number of bytes processed in the stream, and the function will exit with an error code of\r
-                        *  \ref ENDPOINT_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed\r
-                        *  in the user code - to continue the transfer, call the function again with identical parameters\r
-                        *  and it will resume until the BytesProcessed value reaches the total transfer length.\r
-                        *\r
-                        *  <b>Single Stream Transfer Example:</b>\r
-                        *  \code\r
-                        *  uint8_t DataStream[512];\r
-                        *  uint8_t ErrorCode;\r
-                        *  \r
-                        *  if ((ErrorCode = Endpoint_Write_Stream_LE(DataStream, sizeof(DataStream),\r
-                        *                                            NULL)) != ENDPOINT_RWSTREAM_NoError)\r
-                        *  {\r
-                        *       // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  <b>Partial Stream Transfers Example:</b>\r
-                        *  \code\r
-                        *  uint8_t  DataStream[512];\r
-                        *  uint8_t  ErrorCode;\r
-                        *  uint16_t BytesProcessed;\r
-                        *  \r
-                        *  BytesProcessed = 0;\r
-                        *  while ((ErrorCode = Endpoint_Write_Stream_LE(DataStream, sizeof(DataStream),\r
-                        *                                               &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)\r
-                        *  {\r
-                        *      // Stream not yet complete - do other actions here, abort if required\r
-                        *  }\r
-                        *  \r
-                        *  if (ErrorCode != ENDPOINT_RWSTREAM_NoError)\r
-                        *  {\r
-                        *      // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  \note This routine should not be used on CONTROL type endpoints.\r
-                        *\r
-                        *  \param[in] Buffer          Pointer to the source data buffer to read from.\r
-                        *  \param[in] Length          Number of bytes to read for the currently selected endpoint into the buffer.\r
-                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current\r
-                        *                             transaction should be updated, \c NULL if the entire stream should be written at once.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Write_Stream_LE(const void* const Buffer,\r
-                                                        uint16_t Length,\r
-                                                        uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** Writes the given number of bytes to the endpoint from the given buffer in big endian,\r
-                        *  sending full packets to the host as needed. The last packet filled is not automatically sent;\r
-                        *  the user is responsible for manually sending the last written packet to the host via the\r
-                        *  \ref Endpoint_ClearIN() macro.\r
-                        *\r
-                        *  \note This routine should not be used on CONTROL type endpoints.\r
-                        *\r
-                        *  \param[in] Buffer          Pointer to the source data buffer to read from.\r
-                        *  \param[in] Length          Number of bytes to read for the currently selected endpoint into the buffer.\r
-                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current\r
-                        *                             transaction should be updated, \c NULL if the entire stream should be written at once.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Write_Stream_BE(const void* const Buffer,\r
-                                                        uint16_t Length,\r
-                                                        uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-                       \r
-                       /** Reads the given number of bytes from the endpoint from the given buffer in little endian,\r
-                        *  discarding fully read packets from the host as needed. The last packet is not automatically\r
-                        *  discarded once the remaining bytes has been read; the user is responsible for manually\r
-                        *  discarding the last packet from the host via the \ref Endpoint_ClearOUT() macro.\r
-                        *\r
-                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once,\r
-                        *  failing or succeeding as a single unit. If the BytesProcessed parameter points to a valid\r
-                        *  storage location, the transfer will instead be performed as a series of chunks. Each time\r
-                        *  the endpoint bank becomes empty while there is still data to process (and after the current\r
-                        *  packet has been acknowledged) the BytesProcessed location will be updated with the total number\r
-                        *  of bytes processed in the stream, and the function will exit with an error code of\r
-                        *  \ref ENDPOINT_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed\r
-                        *  in the user code - to continue the transfer, call the function again with identical parameters\r
-                        *  and it will resume until the BytesProcessed value reaches the total transfer length.\r
-                        *\r
-                        *  <b>Single Stream Transfer Example:</b>\r
-                        *  \code\r
-                        *  uint8_t DataStream[512];\r
-                        *  uint8_t ErrorCode;\r
-                        *  \r
-                        *  if ((ErrorCode = Endpoint_Read_Stream_LE(DataStream, sizeof(DataStream),\r
-                        *                                           NULL)) != ENDPOINT_RWSTREAM_NoError)\r
-                        *  {\r
-                        *       // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  <b>Partial Stream Transfers Example:</b>\r
-                        *  \code\r
-                        *  uint8_t  DataStream[512];\r
-                        *  uint8_t  ErrorCode;\r
-                        *  uint16_t BytesProcessed;\r
-                        *  \r
-                        *  BytesProcessed = 0;\r
-                        *  while ((ErrorCode = Endpoint_Read_Stream_LE(DataStream, sizeof(DataStream),\r
-                        *                                              &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)\r
-                        *  {\r
-                        *      // Stream not yet complete - do other actions here, abort if required\r
-                        *  }\r
-                        *  \r
-                        *  if (ErrorCode != ENDPOINT_RWSTREAM_NoError)\r
-                        *  {\r
-                        *      // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  \note This routine should not be used on CONTROL type endpoints.\r
-                        *\r
-                        *  \param[out] Buffer          Pointer to the destination data buffer to write to.\r
-                        *  \param[in]  Length          Number of bytes to send via the currently selected endpoint.\r
-                        *  \param[in]  BytesProcessed  Pointer to a location where the total number of bytes processed in the current\r
-                        *                              transaction should be updated, \c NULL if the entire stream should be read at once.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Read_Stream_LE(void* const Buffer,\r
-                                                       uint16_t Length,\r
-                                                       uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** Reads the given number of bytes from the endpoint from the given buffer in big endian,\r
-                        *  discarding fully read packets from the host as needed. The last packet is not automatically\r
-                        *  discarded once the remaining bytes has been read; the user is responsible for manually\r
-                        *  discarding the last packet from the host via the \ref Endpoint_ClearOUT() macro.\r
-                        *\r
-                        *  \note This routine should not be used on CONTROL type endpoints.\r
-                        *\r
-                        *  \param[out] Buffer          Pointer to the destination data buffer to write to.\r
-                        *  \param[in]  Length          Number of bytes to send via the currently selected endpoint.\r
-                        *  \param[in]  BytesProcessed  Pointer to a location where the total number of bytes processed in the current\r
-                        *                              transaction should be updated, \c NULL if the entire stream should be read at once.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Read_Stream_BE(void* const Buffer,\r
-                                                       uint16_t Length,\r
-                                                       uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** Writes the given number of bytes to the CONTROL type endpoint from the given buffer in little endian,\r
-                        *  sending full packets to the host as needed. The host OUT acknowledgement is not automatically cleared\r
-                        *  in both failure and success states; the user is responsible for manually clearing the setup OUT to\r
-                        *  finalize the transfer via the \ref Endpoint_ClearOUT() macro.\r
-                        *\r
-                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt\r
-                        *        to clear the status stage when using this routine in a control transaction.\r
-                        *        \n\n\r
-                        *\r
-                        *  \note This routine should only be used on CONTROL type endpoints.\r
-                        *\r
-                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained\r
-                        *           together; i.e. the entire stream data must be read or written at the one time.\r
-                        *\r
-                        *  \param[in] Buffer  Pointer to the source data buffer to read from.\r
-                        *  \param[in] Length  Number of bytes to read for the currently selected endpoint into the buffer.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Write_Control_Stream_LE(const void* const Buffer,\r
-                                                                uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** Writes the given number of bytes to the CONTROL type endpoint from the given buffer in big endian,\r
-                        *  sending full packets to the host as needed. The host OUT acknowledgement is not automatically cleared\r
-                        *  in both failure and success states; the user is responsible for manually clearing the setup OUT to\r
-                        *  finalize the transfer via the \ref Endpoint_ClearOUT() macro.\r
-                        *\r
-                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt\r
-                        *        to clear the status stage when using this routine in a control transaction.\r
-                        *        \n\n\r
-                        *\r
-                        *  \note This routine should only be used on CONTROL type endpoints.\r
-                        *\r
-                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained\r
-                        *           together; i.e. the entire stream data must be read or written at the one time.\r
-                        *\r
-                        *  \param[in] Buffer  Pointer to the source data buffer to read from.\r
-                        *  \param[in] Length  Number of bytes to read for the currently selected endpoint into the buffer.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Write_Control_Stream_BE(const void* const Buffer,\r
-                                                                uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** Reads the given number of bytes from the CONTROL endpoint from the given buffer in little endian,\r
-                        *  discarding fully read packets from the host as needed. The device IN acknowledgement is not\r
-                        *  automatically sent after success or failure states; the user is responsible for manually sending the\r
-                        *  setup IN to finalize the transfer via the \ref Endpoint_ClearIN() macro.\r
-                        *\r
-                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt\r
-                        *        to clear the status stage when using this routine in a control transaction.\r
-                        *        \n\n\r
-                        *\r
-                        *  \note This routine should only be used on CONTROL type endpoints.\r
-                        *\r
-                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained\r
-                        *           together; i.e. the entire stream data must be read or written at the one time.\r
-                        *\r
-                        *  \param[out] Buffer  Pointer to the destination data buffer to write to.\r
-                        *  \param[in]  Length  Number of bytes to send via the currently selected endpoint.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Read_Control_Stream_LE(void* const Buffer,\r
-                                                               uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** Reads the given number of bytes from the CONTROL endpoint from the given buffer in big endian,\r
-                        *  discarding fully read packets from the host as needed. The device IN acknowledgement is not\r
-                        *  automatically sent after success or failure states; the user is responsible for manually sending the\r
-                        *  setup IN to finalize the transfer via the \ref Endpoint_ClearIN() macro.\r
-                        *\r
-                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt\r
-                        *        to clear the status stage when using this routine in a control transaction.\r
-                        *        \n\n\r
-                        *\r
-                        *  \note This routine should only be used on CONTROL type endpoints.\r
-                        *\r
-                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained\r
-                        *           together; i.e. the entire stream data must be read or written at the one time.\r
-                        *\r
-                        *  \param[out] Buffer  Pointer to the destination data buffer to write to.\r
-                        *  \param[in]  Length  Number of bytes to send via the currently selected endpoint.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Read_Control_Stream_BE(void* const Buffer,\r
-                                                               uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);\r
-                       //@}\r
-\r
-       /* Disable C linkage for C++ Compilers: */\r
-               #if defined(__cplusplus)\r
-                       }\r
-               #endif\r
-               \r
-#endif\r
-\r
-/** @} */\r
+/*
+             LUFA Library
+     Copyright (C) Dean Camera, 2012.
+              
+  dean [at] fourwalledcubicle [dot] com
+           www.lufa-lib.org
+*/
+
+/*
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+  Permission to use, copy, modify, distribute, and sell this 
+  software and its documentation for any purpose is hereby granted
+  without fee, provided that the above copyright notice appear in 
+  all copies and that both that the copyright notice and this
+  permission notice and warranty disclaimer appear in supporting 
+  documentation, and that the name of the author not be used in 
+  advertising or publicity pertaining to distribution of the 
+  software without specific, written prior permission.
+
+  The author disclaim all warranties with regard to this
+  software, including all implied warranties of merchantability
+  and fitness.  In no event shall the author be liable for any
+  special, indirect or consequential damages or any damages
+  whatsoever resulting from loss of use, data or profits, whether
+  in an action of contract, negligence or other tortious action,
+  arising out of or in connection with the use or performance of
+  this software.
+*/
+
+/** \file
+ *  \brief Endpoint data stream transmission and reception management for the AVR32 UC3 microcontrollers.
+ *  \copydetails Group_EndpointStreamRW_UC3
+ *
+ *  \note This file should not be included directly. It is automatically included as needed by the USB driver
+ *        dispatch header located in LUFA/Drivers/USB/USB.h.
+ */
+
+/** \ingroup Group_EndpointStreamRW
+ *  \defgroup Group_EndpointStreamRW_UC3 Read/Write of Multi-Byte Streams (UC3)
+ *  \brief Endpoint data stream transmission and reception management for the Atmel AVR32 UC3 architecture.
+ *
+ *  Functions, macros, variables, enums and types related to data reading and writing of data streams from
+ *  and to endpoints.
+ *
+ *  @{
+ */ 
+
+#ifndef __ENDPOINT_STREAM_UC3_H__
+#define __ENDPOINT_STREAM_UC3_H__
+
+       /* Includes: */
+               #include "../../../../Common/Common.h"
+               #include "../USBMode.h"
+               #include "../USBTask.h"
+               
+       /* Enable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       extern "C" {
+               #endif
+
+       /* Preprocessor Checks: */
+               #if !defined(__INCLUDE_FROM_USB_DRIVER)
+                       #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.
+               #endif
+
+       /* Public Interface - May be used in end-application: */
+               /* Function Prototypes: */
+                       /** \name Stream functions for null data */
+                       //@{
+
+                       /** Reads and discards the given number of bytes from the currently selected endpoint's bank,
+                        *  discarding fully read packets from the host as needed. The last packet is not automatically
+                        *  discarded once the remaining bytes has been read; the user is responsible for manually
+                        *  discarding the last packet from the host via the \ref Endpoint_ClearOUT() macro.
+                        *
+                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once,
+                        *  failing or succeeding as a single unit. If the BytesProcessed parameter points to a valid
+                        *  storage location, the transfer will instead be performed as a series of chunks. Each time
+                        *  the endpoint bank becomes empty while there is still data to process (and after the current
+                        *  packet has been acknowledged) the BytesProcessed location will be updated with the total number
+                        *  of bytes processed in the stream, and the function will exit with an error code of
+                        *  \ref ENDPOINT_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed
+                        *  in the user code - to continue the transfer, call the function again with identical parameters
+                        *  and it will resume until the BytesProcessed value reaches the total transfer length.
+                        *
+                        *  <b>Single Stream Transfer Example:</b>
+                        *  \code
+                        *  uint8_t ErrorCode;
+                        *  
+                        *  if ((ErrorCode = Endpoint_Discard_Stream(512, NULL)) != ENDPOINT_RWSTREAM_NoError)
+                        *  {
+                        *       // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  <b>Partial Stream Transfers Example:</b>
+                        *  \code
+                        *  uint8_t  ErrorCode;
+                        *  uint16_t BytesProcessed;
+                        *  
+                        *  BytesProcessed = 0;
+                        *  while ((ErrorCode = Endpoint_Discard_Stream(512, &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)
+                        *  {
+                        *      // Stream not yet complete - do other actions here, abort if required
+                        *  }
+                        *  
+                        *  if (ErrorCode != ENDPOINT_RWSTREAM_NoError)
+                        *  {
+                        *      // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  \note This routine should not be used on CONTROL type endpoints.
+                        *
+                        *  \param[in] Length          Number of bytes to discard via the currently selected endpoint.
+                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current
+                        *                             transaction should be updated, \c NULL if the entire stream should be read at once.
+                        *
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Discard_Stream(uint16_t Length,
+                                                       uint16_t* const BytesProcessed);
+
+                       /** Writes a given number of zeroed bytes to the currently selected endpoint's bank, sending
+                        *  full packets to the host as needed. The last packet is not automatically sent once the 
+                        *  remaining bytes have been written; the user is responsible for manually sending the last
+                        *  packet to the host via the \ref Endpoint_ClearIN() macro.
+                        *
+                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once,
+                        *  failing or succeeding as a single unit. If the BytesProcessed parameter points to a valid
+                        *  storage location, the transfer will instead be performed as a series of chunks. Each time
+                        *  the endpoint bank becomes full while there is still data to process (and after the current
+                        *  packet transmission has been initiated) the BytesProcessed location will be updated with the
+                        *  total number of bytes processed in the stream, and the function will exit with an error code of
+                        *  \ref ENDPOINT_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed
+                        *  in the user code - to continue the transfer, call the function again with identical parameters
+                        *  and it will resume until the BytesProcessed value reaches the total transfer length.
+                        *
+                        *  <b>Single Stream Transfer Example:</b>
+                        *  \code
+                        *  uint8_t ErrorCode;
+                        *  
+                        *  if ((ErrorCode = Endpoint_Null_Stream(512, NULL)) != ENDPOINT_RWSTREAM_NoError)
+                        *  {
+                        *       // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  <b>Partial Stream Transfers Example:</b>
+                        *  \code
+                        *  uint8_t  ErrorCode;
+                        *  uint16_t BytesProcessed;
+                        *  
+                        *  BytesProcessed = 0;
+                        *  while ((ErrorCode = Endpoint_Null_Stream(512, &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)
+                        *  {
+                        *      // Stream not yet complete - do other actions here, abort if required
+                        *  }
+                        *  
+                        *  if (ErrorCode != ENDPOINT_RWSTREAM_NoError)
+                        *  {
+                        *      // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  \note This routine should not be used on CONTROL type endpoints.
+                        *
+                        *  \param[in] Length          Number of zero bytes to send via the currently selected endpoint.
+                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current
+                        *                             transaction should be updated, \c NULL if the entire stream should be read at once.
+                        *
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Null_Stream(uint16_t Length,
+                                                    uint16_t* const BytesProcessed);
+
+                       //@}
+
+                       /** \name Stream functions for RAM source/destination data */
+                       //@{
+               
+                       /** Writes the given number of bytes to the endpoint from the given buffer in little endian,
+                        *  sending full packets to the host as needed. The last packet filled is not automatically sent;
+                        *  the user is responsible for manually sending the last written packet to the host via the
+                        *  \ref Endpoint_ClearIN() macro.
+                        *
+                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once,
+                        *  failing or succeeding as a single unit. If the BytesProcessed parameter points to a valid
+                        *  storage location, the transfer will instead be performed as a series of chunks. Each time
+                        *  the endpoint bank becomes full while there is still data to process (and after the current
+                        *  packet transmission has been initiated) the BytesProcessed location will be updated with the
+                        *  total number of bytes processed in the stream, and the function will exit with an error code of
+                        *  \ref ENDPOINT_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed
+                        *  in the user code - to continue the transfer, call the function again with identical parameters
+                        *  and it will resume until the BytesProcessed value reaches the total transfer length.
+                        *
+                        *  <b>Single Stream Transfer Example:</b>
+                        *  \code
+                        *  uint8_t DataStream[512];
+                        *  uint8_t ErrorCode;
+                        *  
+                        *  if ((ErrorCode = Endpoint_Write_Stream_LE(DataStream, sizeof(DataStream),
+                        *                                            NULL)) != ENDPOINT_RWSTREAM_NoError)
+                        *  {
+                        *       // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  <b>Partial Stream Transfers Example:</b>
+                        *  \code
+                        *  uint8_t  DataStream[512];
+                        *  uint8_t  ErrorCode;
+                        *  uint16_t BytesProcessed;
+                        *  
+                        *  BytesProcessed = 0;
+                        *  while ((ErrorCode = Endpoint_Write_Stream_LE(DataStream, sizeof(DataStream),
+                        *                                               &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)
+                        *  {
+                        *      // Stream not yet complete - do other actions here, abort if required
+                        *  }
+                        *  
+                        *  if (ErrorCode != ENDPOINT_RWSTREAM_NoError)
+                        *  {
+                        *      // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  \note This routine should not be used on CONTROL type endpoints.
+                        *
+                        *  \param[in] Buffer          Pointer to the source data buffer to read from.
+                        *  \param[in] Length          Number of bytes to read for the currently selected endpoint into the buffer.
+                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current
+                        *                             transaction should be updated, \c NULL if the entire stream should be written at once.
+                        *
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Write_Stream_LE(const void* const Buffer,
+                                                        uint16_t Length,
+                                                        uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** Writes the given number of bytes to the endpoint from the given buffer in big endian,
+                        *  sending full packets to the host as needed. The last packet filled is not automatically sent;
+                        *  the user is responsible for manually sending the last written packet to the host via the
+                        *  \ref Endpoint_ClearIN() macro.
+                        *
+                        *  \note This routine should not be used on CONTROL type endpoints.
+                        *
+                        *  \param[in] Buffer          Pointer to the source data buffer to read from.
+                        *  \param[in] Length          Number of bytes to read for the currently selected endpoint into the buffer.
+                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current
+                        *                             transaction should be updated, \c NULL if the entire stream should be written at once.
+                        *
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Write_Stream_BE(const void* const Buffer,
+                                                        uint16_t Length,
+                                                        uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+                       
+                       /** Reads the given number of bytes from the endpoint from the given buffer in little endian,
+                        *  discarding fully read packets from the host as needed. The last packet is not automatically
+                        *  discarded once the remaining bytes has been read; the user is responsible for manually
+                        *  discarding the last packet from the host via the \ref Endpoint_ClearOUT() macro.
+                        *
+                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once,
+                        *  failing or succeeding as a single unit. If the BytesProcessed parameter points to a valid
+                        *  storage location, the transfer will instead be performed as a series of chunks. Each time
+                        *  the endpoint bank becomes empty while there is still data to process (and after the current
+                        *  packet has been acknowledged) the BytesProcessed location will be updated with the total number
+                        *  of bytes processed in the stream, and the function will exit with an error code of
+                        *  \ref ENDPOINT_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed
+                        *  in the user code - to continue the transfer, call the function again with identical parameters
+                        *  and it will resume until the BytesProcessed value reaches the total transfer length.
+                        *
+                        *  <b>Single Stream Transfer Example:</b>
+                        *  \code
+                        *  uint8_t DataStream[512];
+                        *  uint8_t ErrorCode;
+                        *  
+                        *  if ((ErrorCode = Endpoint_Read_Stream_LE(DataStream, sizeof(DataStream),
+                        *                                           NULL)) != ENDPOINT_RWSTREAM_NoError)
+                        *  {
+                        *       // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  <b>Partial Stream Transfers Example:</b>
+                        *  \code
+                        *  uint8_t  DataStream[512];
+                        *  uint8_t  ErrorCode;
+                        *  uint16_t BytesProcessed;
+                        *  
+                        *  BytesProcessed = 0;
+                        *  while ((ErrorCode = Endpoint_Read_Stream_LE(DataStream, sizeof(DataStream),
+                        *                                              &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)
+                        *  {
+                        *      // Stream not yet complete - do other actions here, abort if required
+                        *  }
+                        *  
+                        *  if (ErrorCode != ENDPOINT_RWSTREAM_NoError)
+                        *  {
+                        *      // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  \note This routine should not be used on CONTROL type endpoints.
+                        *
+                        *  \param[out] Buffer          Pointer to the destination data buffer to write to.
+                        *  \param[in]  Length          Number of bytes to send via the currently selected endpoint.
+                        *  \param[in]  BytesProcessed  Pointer to a location where the total number of bytes processed in the current
+                        *                              transaction should be updated, \c NULL if the entire stream should be read at once.
+                        *
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Read_Stream_LE(void* const Buffer,
+                                                       uint16_t Length,
+                                                       uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** Reads the given number of bytes from the endpoint from the given buffer in big endian,
+                        *  discarding fully read packets from the host as needed. The last packet is not automatically
+                        *  discarded once the remaining bytes has been read; the user is responsible for manually
+                        *  discarding the last packet from the host via the \ref Endpoint_ClearOUT() macro.
+                        *
+                        *  \note This routine should not be used on CONTROL type endpoints.
+                        *
+                        *  \param[out] Buffer          Pointer to the destination data buffer to write to.
+                        *  \param[in]  Length          Number of bytes to send via the currently selected endpoint.
+                        *  \param[in]  BytesProcessed  Pointer to a location where the total number of bytes processed in the current
+                        *                              transaction should be updated, \c NULL if the entire stream should be read at once.
+                        *
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Read_Stream_BE(void* const Buffer,
+                                                       uint16_t Length,
+                                                       uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** Writes the given number of bytes to the CONTROL type endpoint from the given buffer in little endian,
+                        *  sending full packets to the host as needed. The host OUT acknowledgement is not automatically cleared
+                        *  in both failure and success states; the user is responsible for manually clearing the status OUT packet
+                        *  to finalize the transfer's status stage via the \ref Endpoint_ClearOUT() macro.
+                        *
+                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt
+                        *        to clear the status stage when using this routine in a control transaction.
+                        *        \n\n
+                        *
+                        *  \note This routine should only be used on CONTROL type endpoints.
+                        *
+                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained
+                        *           together; i.e. the entire stream data must be read or written at the one time.
+                        *
+                        *  \param[in] Buffer  Pointer to the source data buffer to read from.
+                        *  \param[in] Length  Number of bytes to read for the currently selected endpoint into the buffer.
+                        *
+                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Write_Control_Stream_LE(const void* const Buffer,
+                                                                uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** Writes the given number of bytes to the CONTROL type endpoint from the given buffer in big endian,
+                        *  sending full packets to the host as needed. The host OUT acknowledgement is not automatically cleared
+                        *  in both failure and success states; the user is responsible for manually clearing the status OUT packet
+                        *  to finalize the transfer's status stage via the \ref Endpoint_ClearOUT() macro.
+                        *
+                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt
+                        *        to clear the status stage when using this routine in a control transaction.
+                        *        \n\n
+                        *
+                        *  \note This routine should only be used on CONTROL type endpoints.
+                        *
+                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained
+                        *           together; i.e. the entire stream data must be read or written at the one time.
+                        *
+                        *  \param[in] Buffer  Pointer to the source data buffer to read from.
+                        *  \param[in] Length  Number of bytes to read for the currently selected endpoint into the buffer.
+                        *
+                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Write_Control_Stream_BE(const void* const Buffer,
+                                                                uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** Reads the given number of bytes from the CONTROL endpoint from the given buffer in little endian,
+                        *  discarding fully read packets from the host as needed. The device IN acknowledgement is not
+                        *  automatically sent after success or failure states; the user is responsible for manually sending the
+                        *  status IN packet to finalize the transfer's status stage via the \ref Endpoint_ClearIN() macro.
+                        *
+                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt
+                        *        to clear the status stage when using this routine in a control transaction.
+                        *        \n\n
+                        *
+                        *  \note This routine should only be used on CONTROL type endpoints.
+                        *
+                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained
+                        *           together; i.e. the entire stream data must be read or written at the one time.
+                        *
+                        *  \param[out] Buffer  Pointer to the destination data buffer to write to.
+                        *  \param[in]  Length  Number of bytes to send via the currently selected endpoint.
+                        *
+                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Read_Control_Stream_LE(void* const Buffer,
+                                                               uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** Reads the given number of bytes from the CONTROL endpoint from the given buffer in big endian,
+                        *  discarding fully read packets from the host as needed. The device IN acknowledgement is not
+                        *  automatically sent after success or failure states; the user is responsible for manually sending the
+                        *  status IN packet to finalize the transfer's status stage via the \ref Endpoint_ClearIN() macro.
+                        *
+                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt
+                        *        to clear the status stage when using this routine in a control transaction.
+                        *        \n\n
+                        *
+                        *  \note This routine should only be used on CONTROL type endpoints.
+                        *
+                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained
+                        *           together; i.e. the entire stream data must be read or written at the one time.
+                        *
+                        *  \param[out] Buffer  Pointer to the destination data buffer to write to.
+                        *  \param[in]  Length  Number of bytes to send via the currently selected endpoint.
+                        *
+                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Read_Control_Stream_BE(void* const Buffer,
+                                                               uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
+                       //@}
+
+       /* Disable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       }
+               #endif
+               
+#endif
+
+/** @} */
 
index c027585..f0f319d 100644 (file)
@@ -65,7 +65,7 @@ bool Endpoint_ConfigureEndpointTable(const USB_Endpoint_Table_t* const Table,
 bool Endpoint_ConfigureEndpoint_Prv(const uint8_t Number,
                                     const uint32_t UECFG0Data)
 {
-       USB_Endpoint_FIFOPos[Number] = &AVR32_USBB_SLAVE[Number * 0x10000];
+       USB_Endpoint_FIFOPos[Number] = &AVR32_USBB_SLAVE[Number * ENDPOINT_HSB_ADDRESS_SPACE_SIZE];
 
 #if defined(CONTROL_ONLY_DEVICE) || defined(ORDERED_EP_CONFIG)
        Endpoint_SelectEndpoint(Number);
index a1b2a16..1356952 100644 (file)
                                                                      const uint16_t Size,
                                                                      const uint8_t Banks)
                        {
-                               return Endpoint_ConfigureEndpoint_Prv((Address & ENDPOINT_EPNUM_MASK),
+                               uint8_t Number = (Address & ENDPOINT_EPNUM_MASK);
+                       
+                               if (Number >= ENDPOINT_TOTAL_ENDPOINTS)
+                                 return false;
+
+                               return Endpoint_ConfigureEndpoint_Prv(Number,
                                                                      (AVR32_USBB_ALLOC_MASK |
-                                                                      ((uint32_t)Type      << AVR32_USBB_EPTYPE_OFFSET) |
-                                                                      ((uint32_t)(Address & ENDPOINT_DIR_IN) ? AVR32_USBB_UECFG0_EPDIR_MASK : 0) |
-                                                                      ((uint32_t)Banks     << AVR32_USBB_EPBK_OFFSET)   |
+                                                                      ((uint32_t)Type << AVR32_USBB_EPTYPE_OFFSET) |
+                                                                      ((Address & ENDPOINT_DIR_IN) ? AVR32_USBB_UECFG0_EPDIR_MASK : 0) |
+                                                                      ((Banks > 1) ? AVR32_USBB_UECFG0_EPBK_SINGLE : AVR32_USBB_UECFG0_EPBK_DOUBLE) |
                                                                       Endpoint_BytesToEPSizeMask(Size)));
                        }
 
index bb4cbc6..76fbfd8 100644 (file)
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2012.\r
-              \r
-  dean [at] fourwalledcubicle [dot] com\r
-           www.lufa-lib.org\r
-*/\r
-\r
-/*\r
-  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, distribute, and sell this \r
-  software and its documentation for any purpose is hereby granted\r
-  without fee, provided that the above copyright notice appear in \r
-  all copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting \r
-  documentation, and that the name of the author not be used in \r
-  advertising or publicity pertaining to distribution of the \r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-#include "../../../../Common/Common.h"\r
-#if (ARCH == ARCH_UC3)\r
-\r
-#define  __INCLUDE_FROM_USB_DRIVER\r
-#include "../USBMode.h"\r
-\r
-#if defined(USB_CAN_BE_HOST)\r
-\r
-#include "PipeStream_UC3.h"\r
-\r
-uint8_t Pipe_Discard_Stream(uint16_t Length,\r
-                            uint16_t* const BytesProcessed)\r
-{\r
-       uint8_t  ErrorCode;\r
-       uint16_t BytesInTransfer = 0;\r
-       \r
-       Pipe_SetPipeToken(PIPE_TOKEN_IN);\r
-\r
-       if ((ErrorCode = Pipe_WaitUntilReady()))\r
-         return ErrorCode;\r
-\r
-       if (BytesProcessed != NULL)\r
-         Length -= *BytesProcessed;\r
-\r
-       while (Length)\r
-       {\r
-               if (!(Pipe_IsReadWriteAllowed()))\r
-               {\r
-                       Pipe_ClearIN();\r
-                               \r
-                       if (BytesProcessed != NULL)\r
-                       {\r
-                               *BytesProcessed += BytesInTransfer;\r
-                               return PIPE_RWSTREAM_IncompleteTransfer;\r
-                       }\r
-\r
-                       if ((ErrorCode = Pipe_WaitUntilReady()))\r
-                         return ErrorCode;\r
-               }\r
-               else\r
-               {\r
-                       Pipe_Discard_8();\r
-                       \r
-                       Length--;\r
-                       BytesInTransfer++;\r
-               }\r
-       }\r
-\r
-       return PIPE_RWSTREAM_NoError;\r
-}\r
-\r
-uint8_t Pipe_Null_Stream(uint16_t Length,\r
-                         uint16_t* const BytesProcessed)\r
-{\r
-       uint8_t  ErrorCode;\r
-       uint16_t BytesInTransfer = 0;\r
-       \r
-       Pipe_SetPipeToken(PIPE_TOKEN_OUT);\r
-\r
-       if ((ErrorCode = Pipe_WaitUntilReady()))\r
-         return ErrorCode;\r
-\r
-       if (BytesProcessed != NULL)\r
-         Length -= *BytesProcessed;\r
-\r
-       while (Length)\r
-       {\r
-               if (!(Pipe_IsReadWriteAllowed()))\r
-               {\r
-                       Pipe_ClearOUT();\r
-                               \r
-                       if (BytesProcessed != NULL)\r
-                       {\r
-                               *BytesProcessed += BytesInTransfer;\r
-                               return PIPE_RWSTREAM_IncompleteTransfer;\r
-                       }\r
-                       \r
-                       USB_USBTask();\r
-\r
-                       if ((ErrorCode = Pipe_WaitUntilReady()))\r
-                         return ErrorCode;\r
-               }\r
-               else\r
-               {\r
-                       Pipe_Write_8(0);\r
-                       \r
-                       Length--;\r
-                       BytesInTransfer++;\r
-               }\r
-       }\r
-\r
-       return PIPE_RWSTREAM_NoError;\r
-}\r
-\r
-/* The following abuses the C preprocessor in order to copy-paste common code with slight alterations,\r
- * so that the code needs to be written once. It is a crude form of templating to reduce code maintenance. */\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Pipe_Write_Stream_LE\r
-#define  TEMPLATE_BUFFER_TYPE                      const void*\r
-#define  TEMPLATE_TOKEN                            PIPE_TOKEN_OUT\r
-#define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearOUT()\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream += Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Pipe_Write_8(*BufferPtr)\r
-#include "Template/Template_Pipe_RW.c"\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Pipe_Write_Stream_BE\r
-#define  TEMPLATE_BUFFER_TYPE                      const void*\r
-#define  TEMPLATE_TOKEN                            PIPE_TOKEN_OUT\r
-#define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearOUT()\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream -= Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Pipe_Write_8(*BufferPtr)\r
-#include "Template/Template_Pipe_RW.c"\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Pipe_Read_Stream_LE\r
-#define  TEMPLATE_BUFFER_TYPE                      void*\r
-#define  TEMPLATE_TOKEN                            PIPE_TOKEN_IN\r
-#define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearIN()\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream += Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Pipe_Read_8()\r
-#include "Template/Template_Pipe_RW.c"\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Pipe_Read_Stream_BE\r
-#define  TEMPLATE_BUFFER_TYPE                      void*\r
-#define  TEMPLATE_TOKEN                            PIPE_TOKEN_IN\r
-#define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearIN()\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream -= Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Pipe_Read_8()\r
-#include "Template/Template_Pipe_RW.c"\r
-\r
-#endif\r
-
-#endif\r
+/*
+             LUFA Library
+     Copyright (C) Dean Camera, 2012.
+              
+  dean [at] fourwalledcubicle [dot] com
+           www.lufa-lib.org
+*/
+
+/*
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+  Permission to use, copy, modify, distribute, and sell this 
+  software and its documentation for any purpose is hereby granted
+  without fee, provided that the above copyright notice appear in 
+  all copies and that both that the copyright notice and this
+  permission notice and warranty disclaimer appear in supporting 
+  documentation, and that the name of the author not be used in 
+  advertising or publicity pertaining to distribution of the 
+  software without specific, written prior permission.
+
+  The author disclaim all warranties with regard to this
+  software, including all implied warranties of merchantability
+  and fitness.  In no event shall the author be liable for any
+  special, indirect or consequential damages or any damages
+  whatsoever resulting from loss of use, data or profits, whether
+  in an action of contract, negligence or other tortious action,
+  arising out of or in connection with the use or performance of
+  this software.
+*/
+
+#include "../../../../Common/Common.h"
+#if (ARCH == ARCH_UC3)
+
+#define  __INCLUDE_FROM_USB_DRIVER
+#include "../USBMode.h"
+
+#if defined(USB_CAN_BE_HOST)
+
+#include "PipeStream_UC3.h"
+
+uint8_t Pipe_Discard_Stream(uint16_t Length,
+                            uint16_t* const BytesProcessed)
+{
+       uint8_t  ErrorCode;
+       uint16_t BytesInTransfer = 0;
+       
+       Pipe_SetPipeToken(PIPE_TOKEN_IN);
+
+       if ((ErrorCode = Pipe_WaitUntilReady()))
+         return ErrorCode;
+
+       if (BytesProcessed != NULL)
+         Length -= *BytesProcessed;
+
+       while (Length)
+       {
+               if (!(Pipe_IsReadWriteAllowed()))
+               {
+                       Pipe_ClearIN();
+                               
+                       if (BytesProcessed != NULL)
+                       {
+                               *BytesProcessed += BytesInTransfer;
+                               return PIPE_RWSTREAM_IncompleteTransfer;
+                       }
+
+                       if ((ErrorCode = Pipe_WaitUntilReady()))
+                         return ErrorCode;
+               }
+               else
+               {
+                       Pipe_Discard_8();
+                       
+                       Length--;
+                       BytesInTransfer++;
+               }
+       }
+
+       return PIPE_RWSTREAM_NoError;
+}
+
+uint8_t Pipe_Null_Stream(uint16_t Length,
+                         uint16_t* const BytesProcessed)
+{
+       uint8_t  ErrorCode;
+       uint16_t BytesInTransfer = 0;
+       
+       Pipe_SetPipeToken(PIPE_TOKEN_OUT);
+
+       if ((ErrorCode = Pipe_WaitUntilReady()))
+         return ErrorCode;
+
+       if (BytesProcessed != NULL)
+         Length -= *BytesProcessed;
+
+       while (Length)
+       {
+               if (!(Pipe_IsReadWriteAllowed()))
+               {
+                       Pipe_ClearOUT();
+                               
+                       if (BytesProcessed != NULL)
+                       {
+                               *BytesProcessed += BytesInTransfer;
+                               return PIPE_RWSTREAM_IncompleteTransfer;
+                       }
+                       
+                       USB_USBTask();
+
+                       if ((ErrorCode = Pipe_WaitUntilReady()))
+                         return ErrorCode;
+               }
+               else
+               {
+                       Pipe_Write_8(0);
+                       
+                       Length--;
+                       BytesInTransfer++;
+               }
+       }
+
+       return PIPE_RWSTREAM_NoError;
+}
+
+/* The following abuses the C preprocessor in order to copy-paste common code with slight alterations,
+ * so that the code needs to be written once. It is a crude form of templating to reduce code maintenance. */
+
+#define  TEMPLATE_FUNC_NAME                        Pipe_Write_Stream_LE
+#define  TEMPLATE_BUFFER_TYPE                      const void*
+#define  TEMPLATE_TOKEN                            PIPE_TOKEN_OUT
+#define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearOUT()
+#define  TEMPLATE_BUFFER_OFFSET(Length)            0
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream += Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Pipe_Write_8(*BufferPtr)
+#include "Template/Template_Pipe_RW.c"
+
+#define  TEMPLATE_FUNC_NAME                        Pipe_Write_Stream_BE
+#define  TEMPLATE_BUFFER_TYPE                      const void*
+#define  TEMPLATE_TOKEN                            PIPE_TOKEN_OUT
+#define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearOUT()
+#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream -= Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Pipe_Write_8(*BufferPtr)
+#include "Template/Template_Pipe_RW.c"
+
+#define  TEMPLATE_FUNC_NAME                        Pipe_Read_Stream_LE
+#define  TEMPLATE_BUFFER_TYPE                      void*
+#define  TEMPLATE_TOKEN                            PIPE_TOKEN_IN
+#define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearIN()
+#define  TEMPLATE_BUFFER_OFFSET(Length)            0
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream += Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Pipe_Read_8()
+#include "Template/Template_Pipe_RW.c"
+
+#define  TEMPLATE_FUNC_NAME                        Pipe_Read_Stream_BE
+#define  TEMPLATE_BUFFER_TYPE                      void*
+#define  TEMPLATE_TOKEN                            PIPE_TOKEN_IN
+#define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearIN()
+#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream -= Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Pipe_Read_8()
+#include "Template/Template_Pipe_RW.c"
+
+#endif
+
+#endif
index cb8a28c..72bf83c 100644 (file)
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2012.\r
-              \r
-  dean [at] fourwalledcubicle [dot] com\r
-           www.lufa-lib.org\r
-*/\r
-\r
-/*\r
-  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, distribute, and sell this \r
-  software and its documentation for any purpose is hereby granted\r
-  without fee, provided that the above copyright notice appear in \r
-  all copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting \r
-  documentation, and that the name of the author not be used in \r
-  advertising or publicity pertaining to distribution of the \r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
\r
-/** \file\r
- *  \brief Pipe data stream transmission and reception management for the AVR32 UC3 microcontrollers.\r
- *  \copydetails Group_PipeStreamRW_UC3\r
- *\r
- *  \note This file should not be included directly. It is automatically included as needed by the USB driver\r
- *        dispatch header located in LUFA/Drivers/USB/USB.h.\r
- */\r
-\r
-/** \ingroup Group_PipeStreamRW\r
- *  \defgroup Group_PipeStreamRW_UC3 Read/Write of Multi-Byte Streams (UC3)\r
- *  \brief Pipe data stream transmission and reception management for the Atmel AVR32 UC3 architecture.\r
- *\r
- *  Functions, macros, variables, enums and types related to data reading and writing of data streams from\r
- *  and to pipes.\r
- *\r
- *  @{\r
- */\r
-\r
-#ifndef __PIPE_STREAM_UC3_H__\r
-#define __PIPE_STREAM_UC3_H__\r
-\r
-       /* Includes: */\r
-               #include "../../../../Common/Common.h"\r
-               #include "../USBMode.h"\r
-               #include "../USBTask.h"\r
-               \r
-       /* Enable C linkage for C++ Compilers: */\r
-               #if defined(__cplusplus)\r
-                       extern "C" {\r
-               #endif\r
-\r
-       /* Preprocessor Checks: */\r
-               #if !defined(__INCLUDE_FROM_USB_DRIVER)\r
-                       #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.\r
-               #endif\r
-               \r
-       /* Public Interface - May be used in end-application: */\r
-               /* Function Prototypes: */\r
-                       /** \name Stream functions for null data */\r
-                       //@{\r
-\r
-                       /** Reads and discards the given number of bytes from the pipe, discarding fully read packets from the host\r
-                        *  as needed. The last packet is not automatically discarded once the remaining bytes has been read; the\r
-                        *  user is responsible for manually discarding the last packet from the device via the \ref Pipe_ClearIN() macro.\r
-                        *\r
-                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once, failing or\r
-                        *  succeeding as a single unit. If the BytesProcessed parameter points to a valid storage location, the transfer\r
-                        *  will instead be performed as a series of chunks. Each time the pipe bank becomes empty while there is still data\r
-                        *  to process (and after the current packet has been acknowledged) the BytesProcessed location will be updated with\r
-                        *  the total number of bytes processed in the stream, and the function will exit with an error code of\r
-                        *  \ref PIPE_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed in the user code - to\r
-                        *  continue the transfer, call the function again with identical parameters and it will resume until the BytesProcessed\r
-                        *  value reaches the total transfer length.\r
-                        *\r
-                        *  <b>Single Stream Transfer Example:</b>\r
-                        *  \code\r
-                        *  uint8_t ErrorCode;\r
-                        *  \r
-                        *  if ((ErrorCode = Pipe_Discard_Stream(512, NULL)) != PIPE_RWSTREAM_NoError)\r
-                        *  {\r
-                        *       // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *  \r
-                        *  <b>Partial Stream Transfers Example:</b>\r
-                        *  \code\r
-                        *  uint8_t  ErrorCode;\r
-                        *  uint16_t BytesProcessed;\r
-                        *  \r
-                        *  BytesProcessed = 0;\r
-                        *  while ((ErrorCode = Pipe_Discard_Stream(512, &BytesProcessed)) == PIPE_RWSTREAM_IncompleteTransfer)\r
-                        *  {\r
-                        *      // Stream not yet complete - do other actions here, abort if required\r
-                        *  }\r
-                        *  \r
-                        *  if (ErrorCode != PIPE_RWSTREAM_NoError)\r
-                        *  {\r
-                        *      // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  \note The pipe token is set automatically, thus this can be used on bi-directional pipes directly without\r
-                        *        having to explicitly change the data direction with a call to \ref Pipe_SetPipeToken().\r
-                        *\r
-                        *  \param[in] Length          Number of bytes to discard via the currently selected pipe.\r
-                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes already processed should\r
-                        *                             updated, \c NULL if the entire stream should be processed at once.\r
-                        *\r
-                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Pipe_Discard_Stream(uint16_t Length,\r
-                                                   uint16_t* const BytesProcessed);\r
-\r
-                       /** Writes a given number of zeroed bytes to the pipe, sending full pipe packets from the host to the device\r
-                        *  as needed. The last packet is not automatically sent once the remaining bytes has been written; the\r
-                        *  user is responsible for manually discarding the last packet from the device via the \ref Pipe_ClearOUT() macro.\r
-                        *\r
-                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once, failing or\r
-                        *  succeeding as a single unit. If the BytesProcessed parameter points to a valid storage location, the transfer\r
-                        *  will instead be performed as a series of chunks. Each time the pipe bank becomes full while there is still data\r
-                        *  to process (and after the current packet transmission has been initiated) the BytesProcessed location will be\r
-                        *  updated with the total number of bytes processed in the stream, and the function will exit with an error code of\r
-                        *  \ref PIPE_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed in the user code - to\r
-                        *  continue the transfer, call the function again with identical parameters and it will resume until the BytesProcessed\r
-                        *  value reaches the total transfer length.\r
-                        *\r
-                        *  <b>Single Stream Transfer Example:</b>\r
-                        *  \code\r
-                        *  uint8_t ErrorCode;\r
-                        *  \r
-                        *  if ((ErrorCode = Pipe_Null_Stream(512, NULL)) != PIPE_RWSTREAM_NoError)\r
-                        *  {\r
-                        *       // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  <b>Partial Stream Transfers Example:</b>\r
-                        *  \code\r
-                        *  uint8_t  ErrorCode;\r
-                        *  uint16_t BytesProcessed;\r
-                        *  \r
-                        *  BytesProcessed = 0;\r
-                        *  while ((ErrorCode = Pipe_Null_Stream(512, &BytesProcessed)) == PIPE_RWSTREAM_IncompleteTransfer)\r
-                        *  {\r
-                        *      // Stream not yet complete - do other actions here, abort if required\r
-                        *  }\r
-                        *  \r
-                        *  if (ErrorCode != PIPE_RWSTREAM_NoError)\r
-                        *  {\r
-                        *      // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  \note The pipe token is set automatically, thus this can be used on bi-directional pipes directly without\r
-                        *        having to explicitly change the data direction with a call to \ref Pipe_SetPipeToken().\r
-                        *\r
-                        *  \param[in] Length          Number of zero bytes to write via the currently selected pipe.\r
-                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes already processed should\r
-                        *                             updated, \c NULL if the entire stream should be processed at once.\r
-                        *\r
-                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Pipe_Null_Stream(uint16_t Length,\r
-                                                uint16_t* const BytesProcessed);\r
-\r
-                       //@}\r
-\r
-                       /** \name Stream functions for RAM source/destination data */\r
-                       //@{\r
-                       \r
-                       /** Writes the given number of bytes to the pipe from the given buffer in little endian,\r
-                        *  sending full packets to the device as needed. The last packet filled is not automatically sent;\r
-                        *  the user is responsible for manually sending the last written packet to the host via the\r
-                        *  \ref Pipe_ClearOUT() macro. Between each USB packet, the given stream callback function is\r
-                        *  executed repeatedly until the next packet is ready, allowing for early aborts of stream transfers.\r
-                        *\r
-                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once,\r
-                        *  failing or succeeding as a single unit. If the BytesProcessed parameter points to a valid\r
-                        *  storage location, the transfer will instead be performed as a series of chunks. Each time\r
-                        *  the pipe bank becomes full while there is still data to process (and after the current\r
-                        *  packet transmission has been initiated) the BytesProcessed location will be updated with the\r
-                        *  total number of bytes processed in the stream, and the function will exit with an error code of\r
-                        *  \ref PIPE_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed\r
-                        *  in the user code - to continue the transfer, call the function again with identical parameters\r
-                        *  and it will resume until the BytesProcessed value reaches the total transfer length.\r
-                        *\r
-                        *  <b>Single Stream Transfer Example:</b>\r
-                        *  \code\r
-                        *  uint8_t DataStream[512];\r
-                        *  uint8_t ErrorCode;\r
-                        *  \r
-                        *  if ((ErrorCode = Pipe_Write_Stream_LE(DataStream, sizeof(DataStream),\r
-                        *                                        NULL)) != PIPE_RWSTREAM_NoError)\r
-                        *  {\r
-                        *       // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  <b>Partial Stream Transfers Example:</b>\r
-                        *  \code\r
-                        *  uint8_t  DataStream[512];\r
-                        *  uint8_t  ErrorCode;\r
-                        *  uint16_t BytesProcessed;\r
-                        *  \r
-                        *  BytesProcessed = 0;\r
-                        *  while ((ErrorCode = Pipe_Write_Stream_LE(DataStream, sizeof(DataStream),\r
-                        *                                           &BytesProcessed)) == PIPE_RWSTREAM_IncompleteTransfer)\r
-                        *  {\r
-                        *      // Stream not yet complete - do other actions here, abort if required\r
-                        *  }\r
-                        *  \r
-                        *  if (ErrorCode != PIPE_RWSTREAM_NoError)\r
-                        *  {\r
-                        *      // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  \note The pipe token is set automatically, thus this can be used on bi-directional pipes directly without\r
-                        *        having to explicitly change the data direction with a call to \ref Pipe_SetPipeToken().\r
-                        *\r
-                        *  \param[in] Buffer          Pointer to the source data buffer to read from.\r
-                        *  \param[in] Length          Number of bytes to read for the currently selected pipe into the buffer.\r
-                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes already processed should\r
-                        *                             updated, \c NULL if the entire stream should be written at once.\r
-                        *\r
-                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Pipe_Write_Stream_LE(const void* const Buffer,\r
-                                                    uint16_t Length,\r
-                                                    uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** Writes the given number of bytes to the pipe from the given buffer in big endian,\r
-                        *  sending full packets to the device as needed. The last packet filled is not automatically sent;\r
-                        *  the user is responsible for manually sending the last written packet to the host via the\r
-                        *  \ref Pipe_ClearOUT() macro. Between each USB packet, the given stream callback function is\r
-                        *  executed repeatedly until the next packet is ready, allowing for early aborts of stream transfers.\r
-                        *\r
-                        *  \note The pipe token is set automatically, thus this can be used on bi-directional pipes directly without\r
-                        *        having to explicitly change the data direction with a call to \ref Pipe_SetPipeToken().\r
-                        *\r
-                        *  \param[in] Buffer          Pointer to the source data buffer to read from.\r
-                        *  \param[in] Length          Number of bytes to read for the currently selected pipe into the buffer.\r
-                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes already processed should\r
-                        *                             updated, \c NULL if the entire stream should be written at once.\r
-                        *\r
-                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Pipe_Write_Stream_BE(const void* const Buffer,\r
-                                                    uint16_t Length,\r
-                                                    uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** Reads the given number of bytes from the pipe into the given buffer in little endian,\r
-                        *  sending full packets to the device as needed. The last packet filled is not automatically sent;\r
-                        *  the user is responsible for manually sending the last written packet to the host via the\r
-                        *  \ref Pipe_ClearIN() macro. Between each USB packet, the given stream callback function is\r
-                        *  executed repeatedly until the next packet is ready, allowing for early aborts of stream transfers.\r
-                        *\r
-                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once,\r
-                        *  failing or succeeding as a single unit. If the BytesProcessed parameter points to a valid\r
-                        *  storage location, the transfer will instead be performed as a series of chunks. Each time\r
-                        *  the pipe bank becomes empty while there is still data to process (and after the current\r
-                        *  packet has been acknowledged) the BytesProcessed location will be updated with the total number\r
-                        *  of bytes processed in the stream, and the function will exit with an error code of\r
-                        *  \ref PIPE_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed\r
-                        *  in the user code - to continue the transfer, call the function again with identical parameters\r
-                        *  and it will resume until the BytesProcessed value reaches the total transfer length.\r
-                        *\r
-                        *  <b>Single Stream Transfer Example:</b>\r
-                        *  \code\r
-                        *  uint8_t DataStream[512];\r
-                        *  uint8_t ErrorCode;\r
-                        *  \r
-                        *  if ((ErrorCode = Pipe_Read_Stream_LE(DataStream, sizeof(DataStream),\r
-                        *                                       NULL)) != PIPE_RWSTREAM_NoError)\r
-                        *  {\r
-                        *       // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  <b>Partial Stream Transfers Example:</b>\r
-                        *  \code\r
-                        *  uint8_t  DataStream[512];\r
-                        *  uint8_t  ErrorCode;\r
-                        *  uint16_t BytesProcessed;\r
-                        *  \r
-                        *  BytesProcessed = 0;\r
-                        *  while ((ErrorCode = Pipe_Read_Stream_LE(DataStream, sizeof(DataStream),\r
-                        *                                          &BytesProcessed)) == PIPE_RWSTREAM_IncompleteTransfer)\r
-                        *  {\r
-                        *      // Stream not yet complete - do other actions here, abort if required\r
-                        *  }\r
-                        *  \r
-                        *  if (ErrorCode != PIPE_RWSTREAM_NoError)\r
-                        *  {\r
-                        *      // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  \note The pipe token is set automatically, thus this can be used on bi-directional pipes directly without\r
-                        *        having to explicitly change the data direction with a call to \ref Pipe_SetPipeToken().\r
-                        *\r
-                        *  \param[out] Buffer          Pointer to the source data buffer to write to.\r
-                        *  \param[in]  Length          Number of bytes to read for the currently selected pipe to read from.\r
-                        *  \param[in]  BytesProcessed  Pointer to a location where the total number of bytes already processed should\r
-                        *                              updated, \c NULL if the entire stream should be read at once.\r
-                        *\r
-                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Pipe_Read_Stream_LE(void* const Buffer,\r
-                                                   uint16_t Length,\r
-                                                   uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** Reads the given number of bytes from the pipe into the given buffer in big endian,\r
-                        *  sending full packets to the device as needed. The last packet filled is not automatically sent;\r
-                        *  the user is responsible for manually sending the last written packet to the host via the\r
-                        *  \ref Pipe_ClearIN() macro. Between each USB packet, the given stream callback function is\r
-                        *  executed repeatedly until the next packet is ready, allowing for early aborts of stream transfers.\r
-                        *\r
-                        *  \note The pipe token is set automatically, thus this can be used on bi-directional pipes directly without\r
-                        *        having to explicitly change the data direction with a call to \ref Pipe_SetPipeToken().\r
-                        *\r
-                        *  \param[out] Buffer          Pointer to the source data buffer to write to.\r
-                        *  \param[in]  Length          Number of bytes to read for the currently selected pipe to read from.\r
-                        *  \param[in]  BytesProcessed  Pointer to a location where the total number of bytes already processed should\r
-                        *                              updated, \c NULL if the entire stream should be read at once.\r
-                        *\r
-                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Pipe_Read_Stream_BE(void* const Buffer,\r
-                                                   uint16_t Length,\r
-                                                   uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-                       //@}\r
-\r
-       /* Disable C linkage for C++ Compilers: */\r
-               #if defined(__cplusplus)\r
-                       }\r
-               #endif\r
-       \r
-#endif\r
-\r
-/** @} */\r
+/*
+             LUFA Library
+     Copyright (C) Dean Camera, 2012.
+              
+  dean [at] fourwalledcubicle [dot] com
+           www.lufa-lib.org
+*/
+
+/*
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+  Permission to use, copy, modify, distribute, and sell this 
+  software and its documentation for any purpose is hereby granted
+  without fee, provided that the above copyright notice appear in 
+  all copies and that both that the copyright notice and this
+  permission notice and warranty disclaimer appear in supporting 
+  documentation, and that the name of the author not be used in 
+  advertising or publicity pertaining to distribution of the 
+  software without specific, written prior permission.
+
+  The author disclaim all warranties with regard to this
+  software, including all implied warranties of merchantability
+  and fitness.  In no event shall the author be liable for any
+  special, indirect or consequential damages or any damages
+  whatsoever resulting from loss of use, data or profits, whether
+  in an action of contract, negligence or other tortious action,
+  arising out of or in connection with the use or performance of
+  this software.
+*/
+/** \file
+ *  \brief Pipe data stream transmission and reception management for the AVR32 UC3 microcontrollers.
+ *  \copydetails Group_PipeStreamRW_UC3
+ *
+ *  \note This file should not be included directly. It is automatically included as needed by the USB driver
+ *        dispatch header located in LUFA/Drivers/USB/USB.h.
+ */
+
+/** \ingroup Group_PipeStreamRW
+ *  \defgroup Group_PipeStreamRW_UC3 Read/Write of Multi-Byte Streams (UC3)
+ *  \brief Pipe data stream transmission and reception management for the Atmel AVR32 UC3 architecture.
+ *
+ *  Functions, macros, variables, enums and types related to data reading and writing of data streams from
+ *  and to pipes.
+ *
+ *  @{
+ */
+
+#ifndef __PIPE_STREAM_UC3_H__
+#define __PIPE_STREAM_UC3_H__
+
+       /* Includes: */
+               #include "../../../../Common/Common.h"
+               #include "../USBMode.h"
+               #include "../USBTask.h"
+               
+       /* Enable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       extern "C" {
+               #endif
+
+       /* Preprocessor Checks: */
+               #if !defined(__INCLUDE_FROM_USB_DRIVER)
+                       #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.
+               #endif
+               
+       /* Public Interface - May be used in end-application: */
+               /* Function Prototypes: */
+                       /** \name Stream functions for null data */
+                       //@{
+
+                       /** Reads and discards the given number of bytes from the pipe, discarding fully read packets from the host
+                        *  as needed. The last packet is not automatically discarded once the remaining bytes has been read; the
+                        *  user is responsible for manually discarding the last packet from the device via the \ref Pipe_ClearIN() macro.
+                        *
+                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once, failing or
+                        *  succeeding as a single unit. If the BytesProcessed parameter points to a valid storage location, the transfer
+                        *  will instead be performed as a series of chunks. Each time the pipe bank becomes empty while there is still data
+                        *  to process (and after the current packet has been acknowledged) the BytesProcessed location will be updated with
+                        *  the total number of bytes processed in the stream, and the function will exit with an error code of
+                        *  \ref PIPE_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed in the user code - to
+                        *  continue the transfer, call the function again with identical parameters and it will resume until the BytesProcessed
+                        *  value reaches the total transfer length.
+                        *
+                        *  <b>Single Stream Transfer Example:</b>
+                        *  \code
+                        *  uint8_t ErrorCode;
+                        *  
+                        *  if ((ErrorCode = Pipe_Discard_Stream(512, NULL)) != PIPE_RWSTREAM_NoError)
+                        *  {
+                        *       // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *  
+                        *  <b>Partial Stream Transfers Example:</b>
+                        *  \code
+                        *  uint8_t  ErrorCode;
+                        *  uint16_t BytesProcessed;
+                        *  
+                        *  BytesProcessed = 0;
+                        *  while ((ErrorCode = Pipe_Discard_Stream(512, &BytesProcessed)) == PIPE_RWSTREAM_IncompleteTransfer)
+                        *  {
+                        *      // Stream not yet complete - do other actions here, abort if required
+                        *  }
+                        *  
+                        *  if (ErrorCode != PIPE_RWSTREAM_NoError)
+                        *  {
+                        *      // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  \note The pipe token is set automatically, thus this can be used on bi-directional pipes directly without
+                        *        having to explicitly change the data direction with a call to \ref Pipe_SetPipeToken().
+                        *
+                        *  \param[in] Length          Number of bytes to discard via the currently selected pipe.
+                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes already processed should
+                        *                             updated, \c NULL if the entire stream should be processed at once.
+                        *
+                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Pipe_Discard_Stream(uint16_t Length,
+                                                   uint16_t* const BytesProcessed);
+
+                       /** Writes a given number of zeroed bytes to the pipe, sending full pipe packets from the host to the device
+                        *  as needed. The last packet is not automatically sent once the remaining bytes has been written; the
+                        *  user is responsible for manually discarding the last packet from the device via the \ref Pipe_ClearOUT() macro.
+                        *
+                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once, failing or
+                        *  succeeding as a single unit. If the BytesProcessed parameter points to a valid storage location, the transfer
+                        *  will instead be performed as a series of chunks. Each time the pipe bank becomes full while there is still data
+                        *  to process (and after the current packet transmission has been initiated) the BytesProcessed location will be
+                        *  updated with the total number of bytes processed in the stream, and the function will exit with an error code of
+                        *  \ref PIPE_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed in the user code - to
+                        *  continue the transfer, call the function again with identical parameters and it will resume until the BytesProcessed
+                        *  value reaches the total transfer length.
+                        *
+                        *  <b>Single Stream Transfer Example:</b>
+                        *  \code
+                        *  uint8_t ErrorCode;
+                        *  
+                        *  if ((ErrorCode = Pipe_Null_Stream(512, NULL)) != PIPE_RWSTREAM_NoError)
+                        *  {
+                        *       // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  <b>Partial Stream Transfers Example:</b>
+                        *  \code
+                        *  uint8_t  ErrorCode;
+                        *  uint16_t BytesProcessed;
+                        *  
+                        *  BytesProcessed = 0;
+                        *  while ((ErrorCode = Pipe_Null_Stream(512, &BytesProcessed)) == PIPE_RWSTREAM_IncompleteTransfer)
+                        *  {
+                        *      // Stream not yet complete - do other actions here, abort if required
+                        *  }
+                        *  
+                        *  if (ErrorCode != PIPE_RWSTREAM_NoError)
+                        *  {
+                        *      // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  \note The pipe token is set automatically, thus this can be used on bi-directional pipes directly without
+                        *        having to explicitly change the data direction with a call to \ref Pipe_SetPipeToken().
+                        *
+                        *  \param[in] Length          Number of zero bytes to write via the currently selected pipe.
+                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes already processed should
+                        *                             updated, \c NULL if the entire stream should be processed at once.
+                        *
+                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Pipe_Null_Stream(uint16_t Length,
+                                                uint16_t* const BytesProcessed);
+
+                       //@}
+
+                       /** \name Stream functions for RAM source/destination data */
+                       //@{
+                       
+                       /** Writes the given number of bytes to the pipe from the given buffer in little endian,
+                        *  sending full packets to the device as needed. The last packet filled is not automatically sent;
+                        *  the user is responsible for manually sending the last written packet to the host via the
+                        *  \ref Pipe_ClearOUT() macro. Between each USB packet, the given stream callback function is
+                        *  executed repeatedly until the next packet is ready, allowing for early aborts of stream transfers.
+                        *
+                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once,
+                        *  failing or succeeding as a single unit. If the BytesProcessed parameter points to a valid
+                        *  storage location, the transfer will instead be performed as a series of chunks. Each time
+                        *  the pipe bank becomes full while there is still data to process (and after the current
+                        *  packet transmission has been initiated) the BytesProcessed location will be updated with the
+                        *  total number of bytes processed in the stream, and the function will exit with an error code of
+                        *  \ref PIPE_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed
+                        *  in the user code - to continue the transfer, call the function again with identical parameters
+                        *  and it will resume until the BytesProcessed value reaches the total transfer length.
+                        *
+                        *  <b>Single Stream Transfer Example:</b>
+                        *  \code
+                        *  uint8_t DataStream[512];
+                        *  uint8_t ErrorCode;
+                        *  
+                        *  if ((ErrorCode = Pipe_Write_Stream_LE(DataStream, sizeof(DataStream),
+                        *                                        NULL)) != PIPE_RWSTREAM_NoError)
+                        *  {
+                        *       // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  <b>Partial Stream Transfers Example:</b>
+                        *  \code
+                        *  uint8_t  DataStream[512];
+                        *  uint8_t  ErrorCode;
+                        *  uint16_t BytesProcessed;
+                        *  
+                        *  BytesProcessed = 0;
+                        *  while ((ErrorCode = Pipe_Write_Stream_LE(DataStream, sizeof(DataStream),
+                        *                                           &BytesProcessed)) == PIPE_RWSTREAM_IncompleteTransfer)
+                        *  {
+                        *      // Stream not yet complete - do other actions here, abort if required
+                        *  }
+                        *  
+                        *  if (ErrorCode != PIPE_RWSTREAM_NoError)
+                        *  {
+                        *      // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  \note The pipe token is set automatically, thus this can be used on bi-directional pipes directly without
+                        *        having to explicitly change the data direction with a call to \ref Pipe_SetPipeToken().
+                        *
+                        *  \param[in] Buffer          Pointer to the source data buffer to read from.
+                        *  \param[in] Length          Number of bytes to read for the currently selected pipe into the buffer.
+                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes already processed should
+                        *                             updated, \c NULL if the entire stream should be written at once.
+                        *
+                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Pipe_Write_Stream_LE(const void* const Buffer,
+                                                    uint16_t Length,
+                                                    uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** Writes the given number of bytes to the pipe from the given buffer in big endian,
+                        *  sending full packets to the device as needed. The last packet filled is not automatically sent;
+                        *  the user is responsible for manually sending the last written packet to the host via the
+                        *  \ref Pipe_ClearOUT() macro. Between each USB packet, the given stream callback function is
+                        *  executed repeatedly until the next packet is ready, allowing for early aborts of stream transfers.
+                        *
+                        *  \note The pipe token is set automatically, thus this can be used on bi-directional pipes directly without
+                        *        having to explicitly change the data direction with a call to \ref Pipe_SetPipeToken().
+                        *
+                        *  \param[in] Buffer          Pointer to the source data buffer to read from.
+                        *  \param[in] Length          Number of bytes to read for the currently selected pipe into the buffer.
+                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes already processed should
+                        *                             updated, \c NULL if the entire stream should be written at once.
+                        *
+                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Pipe_Write_Stream_BE(const void* const Buffer,
+                                                    uint16_t Length,
+                                                    uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** Reads the given number of bytes from the pipe into the given buffer in little endian,
+                        *  sending full packets to the device as needed. The last packet filled is not automatically sent;
+                        *  the user is responsible for manually sending the last written packet to the host via the
+                        *  \ref Pipe_ClearIN() macro. Between each USB packet, the given stream callback function is
+                        *  executed repeatedly until the next packet is ready, allowing for early aborts of stream transfers.
+                        *
+                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once,
+                        *  failing or succeeding as a single unit. If the BytesProcessed parameter points to a valid
+                        *  storage location, the transfer will instead be performed as a series of chunks. Each time
+                        *  the pipe bank becomes empty while there is still data to process (and after the current
+                        *  packet has been acknowledged) the BytesProcessed location will be updated with the total number
+                        *  of bytes processed in the stream, and the function will exit with an error code of
+                        *  \ref PIPE_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed
+                        *  in the user code - to continue the transfer, call the function again with identical parameters
+                        *  and it will resume until the BytesProcessed value reaches the total transfer length.
+                        *
+                        *  <b>Single Stream Transfer Example:</b>
+                        *  \code
+                        *  uint8_t DataStream[512];
+                        *  uint8_t ErrorCode;
+                        *  
+                        *  if ((ErrorCode = Pipe_Read_Stream_LE(DataStream, sizeof(DataStream),
+                        *                                       NULL)) != PIPE_RWSTREAM_NoError)
+                        *  {
+                        *       // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  <b>Partial Stream Transfers Example:</b>
+                        *  \code
+                        *  uint8_t  DataStream[512];
+                        *  uint8_t  ErrorCode;
+                        *  uint16_t BytesProcessed;
+                        *  
+                        *  BytesProcessed = 0;
+                        *  while ((ErrorCode = Pipe_Read_Stream_LE(DataStream, sizeof(DataStream),
+                        *                                          &BytesProcessed)) == PIPE_RWSTREAM_IncompleteTransfer)
+                        *  {
+                        *      // Stream not yet complete - do other actions here, abort if required
+                        *  }
+                        *  
+                        *  if (ErrorCode != PIPE_RWSTREAM_NoError)
+                        *  {
+                        *      // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  \note The pipe token is set automatically, thus this can be used on bi-directional pipes directly without
+                        *        having to explicitly change the data direction with a call to \ref Pipe_SetPipeToken().
+                        *
+                        *  \param[out] Buffer          Pointer to the source data buffer to write to.
+                        *  \param[in]  Length          Number of bytes to read for the currently selected pipe to read from.
+                        *  \param[in]  BytesProcessed  Pointer to a location where the total number of bytes already processed should
+                        *                              updated, \c NULL if the entire stream should be read at once.
+                        *
+                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Pipe_Read_Stream_LE(void* const Buffer,
+                                                   uint16_t Length,
+                                                   uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** Reads the given number of bytes from the pipe into the given buffer in big endian,
+                        *  sending full packets to the device as needed. The last packet filled is not automatically sent;
+                        *  the user is responsible for manually sending the last written packet to the host via the
+                        *  \ref Pipe_ClearIN() macro. Between each USB packet, the given stream callback function is
+                        *  executed repeatedly until the next packet is ready, allowing for early aborts of stream transfers.
+                        *
+                        *  \note The pipe token is set automatically, thus this can be used on bi-directional pipes directly without
+                        *        having to explicitly change the data direction with a call to \ref Pipe_SetPipeToken().
+                        *
+                        *  \param[out] Buffer          Pointer to the source data buffer to write to.
+                        *  \param[in]  Length          Number of bytes to read for the currently selected pipe to read from.
+                        *  \param[in]  BytesProcessed  Pointer to a location where the total number of bytes already processed should
+                        *                              updated, \c NULL if the entire stream should be read at once.
+                        *
+                        *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Pipe_Read_Stream_BE(void* const Buffer,
+                                                   uint16_t Length,
+                                                   uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+                       //@}
+
+       /* Disable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       }
+               #endif
+       
+#endif
+
+/** @} */
 
index 787244b..23c004d 100644 (file)
@@ -69,10 +69,13 @@ bool Pipe_ConfigurePipe(const uint8_t Address,
        uint8_t Number = (Address & PIPE_EPNUM_MASK);
        uint8_t Token  = (Address & PIPE_DIR_IN) ? PIPE_TOKEN_IN : PIPE_TOKEN_OUT;
        
+       if (Number >= PIPE_TOTAL_PIPES)
+         return false;
+
        if (Type == EP_TYPE_CONTROL)
          Token = PIPE_TOKEN_SETUP;
 
-       USB_Pipe_FIFOPos[Number]     = &AVR32_USBB_SLAVE[Number * 0x10000];
+       USB_Pipe_FIFOPos[Number]     = &AVR32_USBB_SLAVE[Number * PIPE_HSB_ADDRESS_SPACE_SIZE];
 
 #if defined(ORDERED_EP_CONFIG)
        Pipe_SelectPipe(Number);
index 0c3136e..0d313fe 100644 (file)
                        static inline uint8_t Pipe_GetPipeDirection(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
                        static inline uint8_t Pipe_GetPipeDirection(void)
                        {
-                               return (((&AVR32_USBB.UPCFG0)[USB_Endpoint_SelectedEndpoint].ptoken == PIPE_TOKEN_OUT) ? PIPE_DIR_OUT : PIPE_DIR_IN);
+                               return (((&AVR32_USBB.UPCFG0)[USB_Pipe_SelectedPipe].ptoken == PIPE_TOKEN_OUT) ? PIPE_DIR_OUT : PIPE_DIR_IN);
                        }
                        
                        /** Returns the pipe address of the currently selected pipe. This is typically used to save the
index 9e4e4a2..6a3df6e 100644 (file)
@@ -112,7 +112,7 @@ void USB_ResetInterface(void)
        AVR32_PM.GCCTRL[AVR32_PM_GCLK_USBB].pllsel = !(USB_Options & USB_OPT_GCLK_SRC_OSC);
        AVR32_PM.GCCTRL[AVR32_PM_GCLK_USBB].oscsel = !(USB_Options & USB_OPT_GCLK_CHANNEL_0);
        AVR32_PM.GCCTRL[AVR32_PM_GCLK_USBB].diven  = (F_USB != USB_CLOCK_REQUIRED_FREQ);
-       AVR32_PM.GCCTRL[AVR32_PM_GCLK_USBB].div    = (F_USB == USB_CLOCK_REQUIRED_FREQ) ? 0 : (uint32_t)(((F_USB / USB_CLOCK_REQUIRED_FREQ) - 1) / 2);
+       AVR32_PM.GCCTRL[AVR32_PM_GCLK_USBB].div    = (F_USB == USB_CLOCK_REQUIRED_FREQ) ? 0 : (uint32_t)((F_USB / USB_CLOCK_REQUIRED_FREQ / 2) - 1);
        AVR32_PM.GCCTRL[AVR32_PM_GCLK_USBB].cen    = true;
 
        USB_INT_DisableAllInterrupts();
index 92e245c..4a5d267 100644 (file)
                         *                      from the \ref USB_Modes_t enum.
                         *
                         *  \param[in] Options  Mask indicating the options which should be used when initializing the USB
-                        *                      interface to control the USB interface's behaviour. This should be comprised of
+                        *                      interface to control the USB interface's behavior. This should be comprised of
                         *                      a \c USB_OPT_REG_* mask to control the regulator, a \c USB_OPT_*_PLL mask to control the
                         *                      PLL, and a \c USB_DEVICE_OPT_* mask (when the device mode is enabled) to set the device
                         *                      mode speed.
index 774a574..db80450 100644 (file)
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2012.\r
-              \r
-  dean [at] fourwalledcubicle [dot] com\r
-           www.lufa-lib.org\r
-*/\r
-\r
-/*\r
-  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, distribute, and sell this \r
-  software and its documentation for any purpose is hereby granted\r
-  without fee, provided that the above copyright notice appear in \r
-  all copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting \r
-  documentation, and that the name of the author not be used in \r
-  advertising or publicity pertaining to distribution of the \r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-#include "../../../../Common/Common.h"\r
-#if (ARCH == ARCH_XMEGA)\r
-\r
-#define  __INCLUDE_FROM_USB_DRIVER\r
-#include "../USBMode.h"\r
-\r
-#if defined(USB_CAN_BE_DEVICE)\r
-\r
-#include "EndpointStream_XMEGA.h"\r
-\r
-#if !defined(CONTROL_ONLY_DEVICE)\r
-uint8_t Endpoint_Discard_Stream(uint16_t Length,\r
-                                uint16_t* const BytesProcessed)\r
-{\r
-       uint8_t  ErrorCode;\r
-       uint16_t BytesInTransfer = 0;\r
-       \r
-       if ((ErrorCode = Endpoint_WaitUntilReady()))\r
-         return ErrorCode;\r
-         \r
-       if (BytesProcessed != NULL)\r
-         Length -= *BytesProcessed;\r
-\r
-       while (Length)\r
-       {\r
-               if (!(Endpoint_IsReadWriteAllowed()))\r
-               {\r
-                       Endpoint_ClearOUT();\r
-\r
-                       if (BytesProcessed != NULL)\r
-                       {\r
-                               *BytesProcessed += BytesInTransfer;\r
-                               return ENDPOINT_RWSTREAM_IncompleteTransfer;\r
-                       }\r
-\r
-                       if ((ErrorCode = Endpoint_WaitUntilReady()))\r
-                         return ErrorCode;\r
-               }\r
-               else\r
-               {\r
-                       Endpoint_Discard_8();\r
-\r
-                       Length--;\r
-                       BytesInTransfer++;\r
-               }\r
-       }\r
-       \r
-       return ENDPOINT_RWSTREAM_NoError;\r
-}\r
-\r
-uint8_t Endpoint_Null_Stream(uint16_t Length,\r
-                             uint16_t* const BytesProcessed)\r
-{\r
-       uint8_t  ErrorCode;\r
-       uint16_t BytesInTransfer = 0;\r
-       \r
-       if ((ErrorCode = Endpoint_WaitUntilReady()))\r
-         return ErrorCode;\r
-         \r
-       if (BytesProcessed != NULL)\r
-         Length -= *BytesProcessed;\r
-\r
-       while (Length)\r
-       {\r
-               if (!(Endpoint_IsReadWriteAllowed()))\r
-               {\r
-                       Endpoint_ClearIN();\r
-\r
-                       if (BytesProcessed != NULL)\r
-                       {\r
-                               *BytesProcessed += BytesInTransfer;\r
-                               return ENDPOINT_RWSTREAM_IncompleteTransfer;\r
-                       }\r
-\r
-                       if ((ErrorCode = Endpoint_WaitUntilReady()))\r
-                         return ErrorCode;\r
-               }\r
-               else\r
-               {\r
-                       Endpoint_Write_8(0);\r
-\r
-                       Length--;\r
-                       BytesInTransfer++;\r
-               }\r
-       }\r
-       \r
-       return ENDPOINT_RWSTREAM_NoError;\r
-}\r
-\r
-/* The following abuses the C preprocessor in order to copy-paste common code with slight alterations,\r
- * so that the code needs to be written once. It is a crude form of templating to reduce code maintenance. */\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Stream_LE\r
-#define  TEMPLATE_BUFFER_TYPE                      const void*\r
-#define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(*BufferPtr)\r
-#include "Template/Template_Endpoint_RW.c"\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Stream_BE\r
-#define  TEMPLATE_BUFFER_TYPE                      const void*\r
-#define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(*BufferPtr)\r
-#include "Template/Template_Endpoint_RW.c"\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Stream_LE\r
-#define  TEMPLATE_BUFFER_TYPE                      void*\r
-#define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearOUT()\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Endpoint_Read_8()\r
-#include "Template/Template_Endpoint_RW.c"\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Stream_BE\r
-#define  TEMPLATE_BUFFER_TYPE                      void*\r
-#define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearOUT()\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Endpoint_Read_8()\r
-#include "Template/Template_Endpoint_RW.c"\r
-\r
-#if defined(ARCH_HAS_FLASH_ADDRESS_SPACE)\r
-       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_PStream_LE\r
-       #define  TEMPLATE_BUFFER_TYPE                      const void*\r
-       #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()\r
-       #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
-       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(pgm_read_byte(BufferPtr))\r
-       #include "Template/Template_Endpoint_RW.c"\r
-\r
-       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_PStream_BE\r
-       #define  TEMPLATE_BUFFER_TYPE                      const void*\r
-       #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()\r
-       #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
-       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(pgm_read_byte(BufferPtr))\r
-       #include "Template/Template_Endpoint_RW.c"\r
-#endif\r
-\r
-#if defined(ARCH_HAS_EEPROM_ADDRESS_SPACE)\r
-       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_EStream_LE\r
-       #define  TEMPLATE_BUFFER_TYPE                      const void*\r
-       #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()\r
-       #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
-       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(eeprom_read_byte(BufferPtr))\r
-       #include "Template/Template_Endpoint_RW.c"\r
-\r
-       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_EStream_BE\r
-       #define  TEMPLATE_BUFFER_TYPE                      const void*\r
-       #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()\r
-       #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
-       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(eeprom_read_byte(BufferPtr))\r
-       #include "Template/Template_Endpoint_RW.c"\r
-\r
-       #define  TEMPLATE_FUNC_NAME                        Endpoint_Read_EStream_LE\r
-       #define  TEMPLATE_BUFFER_TYPE                      void*\r
-       #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearOUT()\r
-       #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
-       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         eeprom_update_byte(BufferPtr, Endpoint_Read_8())\r
-       #include "Template/Template_Endpoint_RW.c"\r
-\r
-       #define  TEMPLATE_FUNC_NAME                        Endpoint_Read_EStream_BE\r
-       #define  TEMPLATE_BUFFER_TYPE                      void*\r
-       #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearOUT()\r
-       #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
-       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         eeprom_update_byte(BufferPtr, Endpoint_Read_8())\r
-       #include "Template/Template_Endpoint_RW.c"\r
-#endif\r
-\r
-#endif\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_Stream_LE\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(*BufferPtr)\r
-#include "Template/Template_Endpoint_Control_W.c"\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_Stream_BE\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(*BufferPtr)\r
-#include "Template/Template_Endpoint_Control_W.c"\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Control_Stream_LE\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Endpoint_Read_8()\r
-#include "Template/Template_Endpoint_Control_R.c"\r
-\r
-#define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Control_Stream_BE\r
-#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
-#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Endpoint_Read_8()\r
-#include "Template/Template_Endpoint_Control_R.c"\r
-\r
-#if defined(ARCH_HAS_FLASH_ADDRESS_SPACE)\r
-       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_PStream_LE\r
-       #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
-       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(pgm_read_byte(BufferPtr))\r
-       #include "Template/Template_Endpoint_Control_W.c"\r
-\r
-       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_PStream_BE\r
-       #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
-       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(pgm_read_byte(BufferPtr))\r
-       #include "Template/Template_Endpoint_Control_W.c"\r
-#endif\r
-\r
-#if defined(ARCH_HAS_EEPROM_ADDRESS_SPACE)\r
-       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_EStream_LE\r
-       #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
-       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(eeprom_read_byte(BufferPtr))\r
-       #include "Template/Template_Endpoint_Control_W.c"\r
-\r
-       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_EStream_BE\r
-       #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
-       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(eeprom_read_byte(BufferPtr))\r
-       #include "Template/Template_Endpoint_Control_W.c"\r
-\r
-       #define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Control_EStream_LE\r
-       #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
-       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         eeprom_update_byte(BufferPtr, Endpoint_Read_8())\r
-       #include "Template/Template_Endpoint_Control_R.c"\r
-\r
-       #define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Control_EStream_BE\r
-       #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
-       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         eeprom_update_byte(BufferPtr, Endpoint_Read_8())\r
-       #include "Template/Template_Endpoint_Control_R.c"\r
-#endif\r
-\r
+/*
+             LUFA Library
+     Copyright (C) Dean Camera, 2012.
+              
+  dean [at] fourwalledcubicle [dot] com
+           www.lufa-lib.org
+*/
+
+/*
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+  Permission to use, copy, modify, distribute, and sell this 
+  software and its documentation for any purpose is hereby granted
+  without fee, provided that the above copyright notice appear in 
+  all copies and that both that the copyright notice and this
+  permission notice and warranty disclaimer appear in supporting 
+  documentation, and that the name of the author not be used in 
+  advertising or publicity pertaining to distribution of the 
+  software without specific, written prior permission.
+
+  The author disclaim all warranties with regard to this
+  software, including all implied warranties of merchantability
+  and fitness.  In no event shall the author be liable for any
+  special, indirect or consequential damages or any damages
+  whatsoever resulting from loss of use, data or profits, whether
+  in an action of contract, negligence or other tortious action,
+  arising out of or in connection with the use or performance of
+  this software.
+*/
+
+#include "../../../../Common/Common.h"
+#if (ARCH == ARCH_XMEGA)
+
+#define  __INCLUDE_FROM_USB_DRIVER
+#include "../USBMode.h"
+
+#if defined(USB_CAN_BE_DEVICE)
+
+#include "EndpointStream_XMEGA.h"
+
+#if !defined(CONTROL_ONLY_DEVICE)
+uint8_t Endpoint_Discard_Stream(uint16_t Length,
+                                uint16_t* const BytesProcessed)
+{
+       uint8_t  ErrorCode;
+       uint16_t BytesInTransfer = 0;
+       
+       if ((ErrorCode = Endpoint_WaitUntilReady()))
+         return ErrorCode;
+         
+       if (BytesProcessed != NULL)
+         Length -= *BytesProcessed;
+
+       while (Length)
+       {
+               if (!(Endpoint_IsReadWriteAllowed()))
+               {
+                       Endpoint_ClearOUT();
+
+                       if (BytesProcessed != NULL)
+                       {
+                               *BytesProcessed += BytesInTransfer;
+                               return ENDPOINT_RWSTREAM_IncompleteTransfer;
+                       }
+
+                       if ((ErrorCode = Endpoint_WaitUntilReady()))
+                         return ErrorCode;
+               }
+               else
+               {
+                       Endpoint_Discard_8();
+
+                       Length--;
+                       BytesInTransfer++;
+               }
+       }
+       
+       return ENDPOINT_RWSTREAM_NoError;
+}
+
+uint8_t Endpoint_Null_Stream(uint16_t Length,
+                             uint16_t* const BytesProcessed)
+{
+       uint8_t  ErrorCode;
+       uint16_t BytesInTransfer = 0;
+       
+       if ((ErrorCode = Endpoint_WaitUntilReady()))
+         return ErrorCode;
+         
+       if (BytesProcessed != NULL)
+         Length -= *BytesProcessed;
+
+       while (Length)
+       {
+               if (!(Endpoint_IsReadWriteAllowed()))
+               {
+                       Endpoint_ClearIN();
+
+                       if (BytesProcessed != NULL)
+                       {
+                               *BytesProcessed += BytesInTransfer;
+                               return ENDPOINT_RWSTREAM_IncompleteTransfer;
+                       }
+
+                       if ((ErrorCode = Endpoint_WaitUntilReady()))
+                         return ErrorCode;
+               }
+               else
+               {
+                       Endpoint_Write_8(0);
+
+                       Length--;
+                       BytesInTransfer++;
+               }
+       }
+       
+       return ENDPOINT_RWSTREAM_NoError;
+}
+
+/* The following abuses the C preprocessor in order to copy-paste common code with slight alterations,
+ * so that the code needs to be written once. It is a crude form of templating to reduce code maintenance. */
+
+#define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Stream_LE
+#define  TEMPLATE_BUFFER_TYPE                      const void*
+#define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()
+#define  TEMPLATE_BUFFER_OFFSET(Length)            0
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(*BufferPtr)
+#include "Template/Template_Endpoint_RW.c"
+
+#define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Stream_BE
+#define  TEMPLATE_BUFFER_TYPE                      const void*
+#define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()
+#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(*BufferPtr)
+#include "Template/Template_Endpoint_RW.c"
+
+#define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Stream_LE
+#define  TEMPLATE_BUFFER_TYPE                      void*
+#define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearOUT()
+#define  TEMPLATE_BUFFER_OFFSET(Length)            0
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Endpoint_Read_8()
+#include "Template/Template_Endpoint_RW.c"
+
+#define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Stream_BE
+#define  TEMPLATE_BUFFER_TYPE                      void*
+#define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearOUT()
+#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Endpoint_Read_8()
+#include "Template/Template_Endpoint_RW.c"
+
+#if defined(ARCH_HAS_FLASH_ADDRESS_SPACE)
+       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_PStream_LE
+       #define  TEMPLATE_BUFFER_TYPE                      const void*
+       #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()
+       #define  TEMPLATE_BUFFER_OFFSET(Length)            0
+       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(pgm_read_byte(BufferPtr))
+       #include "Template/Template_Endpoint_RW.c"
+
+       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_PStream_BE
+       #define  TEMPLATE_BUFFER_TYPE                      const void*
+       #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()
+       #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)
+       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(pgm_read_byte(BufferPtr))
+       #include "Template/Template_Endpoint_RW.c"
+#endif
+
+#if defined(ARCH_HAS_EEPROM_ADDRESS_SPACE)
+       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_EStream_LE
+       #define  TEMPLATE_BUFFER_TYPE                      const void*
+       #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()
+       #define  TEMPLATE_BUFFER_OFFSET(Length)            0
+       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(eeprom_read_byte(BufferPtr))
+       #include "Template/Template_Endpoint_RW.c"
+
+       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_EStream_BE
+       #define  TEMPLATE_BUFFER_TYPE                      const void*
+       #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()
+       #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)
+       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(eeprom_read_byte(BufferPtr))
+       #include "Template/Template_Endpoint_RW.c"
+
+       #define  TEMPLATE_FUNC_NAME                        Endpoint_Read_EStream_LE
+       #define  TEMPLATE_BUFFER_TYPE                      void*
+       #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearOUT()
+       #define  TEMPLATE_BUFFER_OFFSET(Length)            0
+       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         eeprom_update_byte(BufferPtr, Endpoint_Read_8())
+       #include "Template/Template_Endpoint_RW.c"
+
+       #define  TEMPLATE_FUNC_NAME                        Endpoint_Read_EStream_BE
+       #define  TEMPLATE_BUFFER_TYPE                      void*
+       #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearOUT()
+       #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)
+       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         eeprom_update_byte(BufferPtr, Endpoint_Read_8())
+       #include "Template/Template_Endpoint_RW.c"
 #endif
 
-#endif\r
+#endif
+
+#define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_Stream_LE
+#define  TEMPLATE_BUFFER_OFFSET(Length)            0
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(*BufferPtr)
+#include "Template/Template_Endpoint_Control_W.c"
+
+#define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_Stream_BE
+#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(*BufferPtr)
+#include "Template/Template_Endpoint_Control_W.c"
+
+#define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Control_Stream_LE
+#define  TEMPLATE_BUFFER_OFFSET(Length)            0
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Endpoint_Read_8()
+#include "Template/Template_Endpoint_Control_R.c"
+
+#define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Control_Stream_BE
+#define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)
+#define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Endpoint_Read_8()
+#include "Template/Template_Endpoint_Control_R.c"
+
+#if defined(ARCH_HAS_FLASH_ADDRESS_SPACE)
+       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_PStream_LE
+       #define  TEMPLATE_BUFFER_OFFSET(Length)            0
+       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(pgm_read_byte(BufferPtr))
+       #include "Template/Template_Endpoint_Control_W.c"
+
+       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_PStream_BE
+       #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)
+       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(pgm_read_byte(BufferPtr))
+       #include "Template/Template_Endpoint_Control_W.c"
+#endif
+
+#if defined(ARCH_HAS_EEPROM_ADDRESS_SPACE)
+       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_EStream_LE
+       #define  TEMPLATE_BUFFER_OFFSET(Length)            0
+       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(eeprom_read_byte(BufferPtr))
+       #include "Template/Template_Endpoint_Control_W.c"
+
+       #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_EStream_BE
+       #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)
+       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(eeprom_read_byte(BufferPtr))
+       #include "Template/Template_Endpoint_Control_W.c"
+
+       #define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Control_EStream_LE
+       #define  TEMPLATE_BUFFER_OFFSET(Length)            0
+       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         eeprom_update_byte(BufferPtr, Endpoint_Read_8())
+       #include "Template/Template_Endpoint_Control_R.c"
+
+       #define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Control_EStream_BE
+       #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)
+       #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         eeprom_update_byte(BufferPtr, Endpoint_Read_8())
+       #include "Template/Template_Endpoint_Control_R.c"
+#endif
+
+#endif
+
+#endif
index 3269d2b..f2fe289 100644 (file)
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2012.\r
-              \r
-  dean [at] fourwalledcubicle [dot] com\r
-           www.lufa-lib.org\r
-*/\r
-\r
-/*\r
-  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, distribute, and sell this \r
-  software and its documentation for any purpose is hereby granted\r
-  without fee, provided that the above copyright notice appear in \r
-  all copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting \r
-  documentation, and that the name of the author not be used in \r
-  advertising or publicity pertaining to distribution of the \r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-/** \file\r
- *  \brief Endpoint data stream transmission and reception management for the AVR XMEGA microcontrollers.\r
- *  \copydetails Group_EndpointStreamRW_XMEGA\r
- *\r
- *  \note This file should not be included directly. It is automatically included as needed by the USB driver\r
- *        dispatch header located in LUFA/Drivers/USB/USB.h.\r
- */\r
-\r
-/** \ingroup Group_EndpointStreamRW\r
- *  \defgroup Group_EndpointStreamRW_XMEGA Read/Write of Multi-Byte Streams (XMEGA)\r
- *  \brief Endpoint data stream transmission and reception management for the Atmel AVR XMEGA architecture.\r
- *\r
- *  Functions, macros, variables, enums and types related to data reading and writing of data streams from\r
- *  and to endpoints.\r
- *\r
- *  @{\r
- */ \r
-\r
-#ifndef __ENDPOINT_STREAM_XMEGA_H__\r
-#define __ENDPOINT_STREAM_XMEGA_H__\r
-\r
-       /* Includes: */\r
-               #include "../../../../Common/Common.h"\r
-               #include "../USBMode.h"         \r
-               #include "../USBTask.h"\r
-               \r
-       /* Enable C linkage for C++ Compilers: */\r
-               #if defined(__cplusplus)\r
-                       extern "C" {\r
-               #endif\r
-\r
-       /* Preprocessor Checks: */\r
-               #if !defined(__INCLUDE_FROM_USB_DRIVER)\r
-                       #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.\r
-               #endif\r
-\r
-       /* Public Interface - May be used in end-application: */\r
-               /* Function Prototypes: */\r
-                       /** \name Stream functions for null data */\r
-                       //@{\r
-\r
-                       /** Reads and discards the given number of bytes from the currently selected endpoint's bank,\r
-                        *  discarding fully read packets from the host as needed. The last packet is not automatically\r
-                        *  discarded once the remaining bytes has been read; the user is responsible for manually\r
-                        *  discarding the last packet from the host via the \ref Endpoint_ClearOUT() macro.\r
-                        *\r
-                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once,\r
-                        *  failing or succeeding as a single unit. If the BytesProcessed parameter points to a valid\r
-                        *  storage location, the transfer will instead be performed as a series of chunks. Each time\r
-                        *  the endpoint bank becomes empty while there is still data to process (and after the current\r
-                        *  packet has been acknowledged) the BytesProcessed location will be updated with the total number\r
-                        *  of bytes processed in the stream, and the function will exit with an error code of\r
-                        *  \ref ENDPOINT_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed\r
-                        *  in the user code - to continue the transfer, call the function again with identical parameters\r
-                        *  and it will resume until the BytesProcessed value reaches the total transfer length.\r
-                        *\r
-                        *  <b>Single Stream Transfer Example:</b>\r
-                        *  \code\r
-                        *  uint8_t ErrorCode;\r
-                        *  \r
-                        *  if ((ErrorCode = Endpoint_Discard_Stream(512, NULL)) != ENDPOINT_RWSTREAM_NoError)\r
-                        *  {\r
-                        *       // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  <b>Partial Stream Transfers Example:</b>\r
-                        *  \code\r
-                        *  uint8_t  ErrorCode;\r
-                        *  uint16_t BytesProcessed;\r
-                        *  \r
-                        *  BytesProcessed = 0;\r
-                        *  while ((ErrorCode = Endpoint_Discard_Stream(512, &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)\r
-                        *  {\r
-                        *      // Stream not yet complete - do other actions here, abort if required\r
-                        *  }\r
-                        *  \r
-                        *  if (ErrorCode != ENDPOINT_RWSTREAM_NoError)\r
-                        *  {\r
-                        *      // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  \note This routine should not be used on CONTROL type endpoints.\r
-                        *\r
-                        *  \param[in] Length          Number of bytes to discard via the currently selected endpoint.\r
-                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current\r
-                        *                             transaction should be updated, \c NULL if the entire stream should be read at once.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Discard_Stream(uint16_t Length,\r
-                                                       uint16_t* const BytesProcessed);\r
-\r
-                       /** Writes a given number of zeroed bytes to the currently selected endpoint's bank, sending\r
-                        *  full packets to the host as needed. The last packet is not automatically sent once the \r
-                        *  remaining bytes have been written; the user is responsible for manually sending the last\r
-                        *  packet to the host via the \ref Endpoint_ClearIN() macro.\r
-                        *\r
-                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once,\r
-                        *  failing or succeeding as a single unit. If the BytesProcessed parameter points to a valid\r
-                        *  storage location, the transfer will instead be performed as a series of chunks. Each time\r
-                        *  the endpoint bank becomes full while there is still data to process (and after the current\r
-                        *  packet transmission has been initiated) the BytesProcessed location will be updated with the\r
-                        *  total number of bytes processed in the stream, and the function will exit with an error code of\r
-                        *  \ref ENDPOINT_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed\r
-                        *  in the user code - to continue the transfer, call the function again with identical parameters\r
-                        *  and it will resume until the BytesProcessed value reaches the total transfer length.\r
-                        *\r
-                        *  <b>Single Stream Transfer Example:</b>\r
-                        *  \code\r
-                        *  uint8_t ErrorCode;\r
-                        *  \r
-                        *  if ((ErrorCode = Endpoint_Null_Stream(512, NULL)) != ENDPOINT_RWSTREAM_NoError)\r
-                        *  {\r
-                        *       // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  <b>Partial Stream Transfers Example:</b>\r
-                        *  \code\r
-                        *  uint8_t  ErrorCode;\r
-                        *  uint16_t BytesProcessed;\r
-                        *  \r
-                        *  BytesProcessed = 0;\r
-                        *  while ((ErrorCode = Endpoint_Null_Stream(512, &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)\r
-                        *  {\r
-                        *      // Stream not yet complete - do other actions here, abort if required\r
-                        *  }\r
-                        *  \r
-                        *  if (ErrorCode != ENDPOINT_RWSTREAM_NoError)\r
-                        *  {\r
-                        *      // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  \note This routine should not be used on CONTROL type endpoints.\r
-                        *\r
-                        *  \param[in] Length          Number of zero bytes to send via the currently selected endpoint.\r
-                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current\r
-                        *                             transaction should be updated, \c NULL if the entire stream should be read at once.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Null_Stream(uint16_t Length,\r
-                                                    uint16_t* const BytesProcessed);\r
-\r
-                       //@}\r
-\r
-                       /** \name Stream functions for RAM source/destination data */\r
-                       //@{\r
-               \r
-                       /** Writes the given number of bytes to the endpoint from the given buffer in little endian,\r
-                        *  sending full packets to the host as needed. The last packet filled is not automatically sent;\r
-                        *  the user is responsible for manually sending the last written packet to the host via the\r
-                        *  \ref Endpoint_ClearIN() macro.\r
-                        *\r
-                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once,\r
-                        *  failing or succeeding as a single unit. If the BytesProcessed parameter points to a valid\r
-                        *  storage location, the transfer will instead be performed as a series of chunks. Each time\r
-                        *  the endpoint bank becomes full while there is still data to process (and after the current\r
-                        *  packet transmission has been initiated) the BytesProcessed location will be updated with the\r
-                        *  total number of bytes processed in the stream, and the function will exit with an error code of\r
-                        *  \ref ENDPOINT_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed\r
-                        *  in the user code - to continue the transfer, call the function again with identical parameters\r
-                        *  and it will resume until the BytesProcessed value reaches the total transfer length.\r
-                        *\r
-                        *  <b>Single Stream Transfer Example:</b>\r
-                        *  \code\r
-                        *  uint8_t DataStream[512];\r
-                        *  uint8_t ErrorCode;\r
-                        *  \r
-                        *  if ((ErrorCode = Endpoint_Write_Stream_LE(DataStream, sizeof(DataStream),\r
-                        *                                            NULL)) != ENDPOINT_RWSTREAM_NoError)\r
-                        *  {\r
-                        *       // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  <b>Partial Stream Transfers Example:</b>\r
-                        *  \code\r
-                        *  uint8_t  DataStream[512];\r
-                        *  uint8_t  ErrorCode;\r
-                        *  uint16_t BytesProcessed;\r
-                        *  \r
-                        *  BytesProcessed = 0;\r
-                        *  while ((ErrorCode = Endpoint_Write_Stream_LE(DataStream, sizeof(DataStream),\r
-                        *                                               &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)\r
-                        *  {\r
-                        *      // Stream not yet complete - do other actions here, abort if required\r
-                        *  }\r
-                        *  \r
-                        *  if (ErrorCode != ENDPOINT_RWSTREAM_NoError)\r
-                        *  {\r
-                        *      // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  \note This routine should not be used on CONTROL type endpoints.\r
-                        *\r
-                        *  \param[in] Buffer          Pointer to the source data buffer to read from.\r
-                        *  \param[in] Length          Number of bytes to read for the currently selected endpoint into the buffer.\r
-                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current\r
-                        *                             transaction should be updated, \c NULL if the entire stream should be written at once.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Write_Stream_LE(const void* const Buffer,\r
-                                                        uint16_t Length,\r
-                                                        uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** Writes the given number of bytes to the endpoint from the given buffer in big endian,\r
-                        *  sending full packets to the host as needed. The last packet filled is not automatically sent;\r
-                        *  the user is responsible for manually sending the last written packet to the host via the\r
-                        *  \ref Endpoint_ClearIN() macro.\r
-                        *\r
-                        *  \note This routine should not be used on CONTROL type endpoints.\r
-                        *\r
-                        *  \param[in] Buffer          Pointer to the source data buffer to read from.\r
-                        *  \param[in] Length          Number of bytes to read for the currently selected endpoint into the buffer.\r
-                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current\r
-                        *                             transaction should be updated, \c NULL if the entire stream should be written at once.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Write_Stream_BE(const void* const Buffer,\r
-                                                        uint16_t Length,\r
-                                                        uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-                       \r
-                       /** Reads the given number of bytes from the endpoint from the given buffer in little endian,\r
-                        *  discarding fully read packets from the host as needed. The last packet is not automatically\r
-                        *  discarded once the remaining bytes has been read; the user is responsible for manually\r
-                        *  discarding the last packet from the host via the \ref Endpoint_ClearOUT() macro.\r
-                        *\r
-                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once,\r
-                        *  failing or succeeding as a single unit. If the BytesProcessed parameter points to a valid\r
-                        *  storage location, the transfer will instead be performed as a series of chunks. Each time\r
-                        *  the endpoint bank becomes empty while there is still data to process (and after the current\r
-                        *  packet has been acknowledged) the BytesProcessed location will be updated with the total number\r
-                        *  of bytes processed in the stream, and the function will exit with an error code of\r
-                        *  \ref ENDPOINT_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed\r
-                        *  in the user code - to continue the transfer, call the function again with identical parameters\r
-                        *  and it will resume until the BytesProcessed value reaches the total transfer length.\r
-                        *\r
-                        *  <b>Single Stream Transfer Example:</b>\r
-                        *  \code\r
-                        *  uint8_t DataStream[512];\r
-                        *  uint8_t ErrorCode;\r
-                        *  \r
-                        *  if ((ErrorCode = Endpoint_Read_Stream_LE(DataStream, sizeof(DataStream),\r
-                        *                                           NULL)) != ENDPOINT_RWSTREAM_NoError)\r
-                        *  {\r
-                        *       // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  <b>Partial Stream Transfers Example:</b>\r
-                        *  \code\r
-                        *  uint8_t  DataStream[512];\r
-                        *  uint8_t  ErrorCode;\r
-                        *  uint16_t BytesProcessed;\r
-                        *  \r
-                        *  BytesProcessed = 0;\r
-                        *  while ((ErrorCode = Endpoint_Read_Stream_LE(DataStream, sizeof(DataStream),\r
-                        *                                              &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)\r
-                        *  {\r
-                        *      // Stream not yet complete - do other actions here, abort if required\r
-                        *  }\r
-                        *  \r
-                        *  if (ErrorCode != ENDPOINT_RWSTREAM_NoError)\r
-                        *  {\r
-                        *      // Stream failed to complete - check ErrorCode here\r
-                        *  }\r
-                        *  \endcode\r
-                        *\r
-                        *  \note This routine should not be used on CONTROL type endpoints.\r
-                        *\r
-                        *  \param[out] Buffer          Pointer to the destination data buffer to write to.\r
-                        *  \param[in]  Length          Number of bytes to send via the currently selected endpoint.\r
-                        *  \param[in]  BytesProcessed  Pointer to a location where the total number of bytes processed in the current\r
-                        *                              transaction should be updated, \c NULL if the entire stream should be read at once.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Read_Stream_LE(void* const Buffer,\r
-                                                       uint16_t Length,\r
-                                                       uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** Reads the given number of bytes from the endpoint from the given buffer in big endian,\r
-                        *  discarding fully read packets from the host as needed. The last packet is not automatically\r
-                        *  discarded once the remaining bytes has been read; the user is responsible for manually\r
-                        *  discarding the last packet from the host via the \ref Endpoint_ClearOUT() macro.\r
-                        *\r
-                        *  \note This routine should not be used on CONTROL type endpoints.\r
-                        *\r
-                        *  \param[out] Buffer          Pointer to the destination data buffer to write to.\r
-                        *  \param[in]  Length          Number of bytes to send via the currently selected endpoint.\r
-                        *  \param[in]  BytesProcessed  Pointer to a location where the total number of bytes processed in the current\r
-                        *                              transaction should be updated, \c NULL if the entire stream should be read at once.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Read_Stream_BE(void* const Buffer,\r
-                                                       uint16_t Length,\r
-                                                       uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** Writes the given number of bytes to the CONTROL type endpoint from the given buffer in little endian,\r
-                        *  sending full packets to the host as needed. The host OUT acknowledgement is not automatically cleared\r
-                        *  in both failure and success states; the user is responsible for manually clearing the setup OUT to\r
-                        *  finalize the transfer via the \ref Endpoint_ClearOUT() macro.\r
-                        *\r
-                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt\r
-                        *        to clear the status stage when using this routine in a control transaction.\r
-                        *        \n\n\r
-                        *\r
-                        *  \note This routine should only be used on CONTROL type endpoints.\r
-                        *\r
-                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained\r
-                        *           together; i.e. the entire stream data must be read or written at the one time.\r
-                        *\r
-                        *  \param[in] Buffer  Pointer to the source data buffer to read from.\r
-                        *  \param[in] Length  Number of bytes to read for the currently selected endpoint into the buffer.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Write_Control_Stream_LE(const void* const Buffer,\r
-                                                                uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** Writes the given number of bytes to the CONTROL type endpoint from the given buffer in big endian,\r
-                        *  sending full packets to the host as needed. The host OUT acknowledgement is not automatically cleared\r
-                        *  in both failure and success states; the user is responsible for manually clearing the setup OUT to\r
-                        *  finalize the transfer via the \ref Endpoint_ClearOUT() macro.\r
-                        *\r
-                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt\r
-                        *        to clear the status stage when using this routine in a control transaction.\r
-                        *        \n\n\r
-                        *\r
-                        *  \note This routine should only be used on CONTROL type endpoints.\r
-                        *\r
-                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained\r
-                        *           together; i.e. the entire stream data must be read or written at the one time.\r
-                        *\r
-                        *  \param[in] Buffer  Pointer to the source data buffer to read from.\r
-                        *  \param[in] Length  Number of bytes to read for the currently selected endpoint into the buffer.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Write_Control_Stream_BE(const void* const Buffer,\r
-                                                                uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** Reads the given number of bytes from the CONTROL endpoint from the given buffer in little endian,\r
-                        *  discarding fully read packets from the host as needed. The device IN acknowledgement is not\r
-                        *  automatically sent after success or failure states; the user is responsible for manually sending the\r
-                        *  setup IN to finalize the transfer via the \ref Endpoint_ClearIN() macro.\r
-                        *\r
-                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt\r
-                        *        to clear the status stage when using this routine in a control transaction.\r
-                        *        \n\n\r
-                        *\r
-                        *  \note This routine should only be used on CONTROL type endpoints.\r
-                        *\r
-                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained\r
-                        *           together; i.e. the entire stream data must be read or written at the one time.\r
-                        *\r
-                        *  \param[out] Buffer  Pointer to the destination data buffer to write to.\r
-                        *  \param[in]  Length  Number of bytes to send via the currently selected endpoint.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Read_Control_Stream_LE(void* const Buffer,\r
-                                                               uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** Reads the given number of bytes from the CONTROL endpoint from the given buffer in big endian,\r
-                        *  discarding fully read packets from the host as needed. The device IN acknowledgement is not\r
-                        *  automatically sent after success or failure states; the user is responsible for manually sending the\r
-                        *  setup IN to finalize the transfer via the \ref Endpoint_ClearIN() macro.\r
-                        *\r
-                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt\r
-                        *        to clear the status stage when using this routine in a control transaction.\r
-                        *        \n\n\r
-                        *\r
-                        *  \note This routine should only be used on CONTROL type endpoints.\r
-                        *\r
-                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained\r
-                        *           together; i.e. the entire stream data must be read or written at the one time.\r
-                        *\r
-                        *  \param[out] Buffer  Pointer to the destination data buffer to write to.\r
-                        *  \param[in]  Length  Number of bytes to send via the currently selected endpoint.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Read_Control_Stream_BE(void* const Buffer,\r
-                                                               uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);\r
-                       //@}\r
-\r
-                       /** \name Stream functions for EEPROM source/destination data */\r
-                       //@{\r
-\r
-                       /** EEPROM buffer source version of \ref Endpoint_Write_Stream_LE().\r
-                        *\r
-                        *  \param[in] Buffer          Pointer to the source data buffer to read from.\r
-                        *  \param[in] Length          Number of bytes to read for the currently selected endpoint into the buffer.\r
-                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current\r
-                        *                             transaction should be updated, \c NULL if the entire stream should be written at once.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Write_EStream_LE(const void* const Buffer,\r
-                                                         uint16_t Length,\r
-                                                         uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** EEPROM buffer source version of \ref Endpoint_Write_Stream_BE().\r
-                        *\r
-                        *  \param[in] Buffer          Pointer to the source data buffer to read from.\r
-                        *  \param[in] Length          Number of bytes to read for the currently selected endpoint into the buffer.\r
-                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current\r
-                        *                             transaction should be updated, \c NULL if the entire stream should be written at once.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Write_EStream_BE(const void* const Buffer,\r
-                                                         uint16_t Length,\r
-                                                         uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** EEPROM buffer destination version of \ref Endpoint_Read_Stream_LE().\r
-                        *\r
-                        *  \param[out] Buffer          Pointer to the destination data buffer to write to, located in EEPROM memory space.\r
-                        *  \param[in]  Length          Number of bytes to send via the currently selected endpoint.\r
-                        *  \param[in]  BytesProcessed  Pointer to a location where the total number of bytes processed in the current\r
-                        *                              transaction should be updated, \c NULL if the entire stream should be read at once.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Read_EStream_LE(void* const Buffer,\r
-                                                        uint16_t Length,\r
-                                                        uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** EEPROM buffer destination version of \ref Endpoint_Read_Stream_BE().\r
-                        *\r
-                        *  \param[out] Buffer          Pointer to the destination data buffer to write to, located in EEPROM memory space.\r
-                        *  \param[in]  Length          Number of bytes to send via the currently selected endpoint.\r
-                        *  \param[in]  BytesProcessed  Pointer to a location where the total number of bytes processed in the current\r
-                        *                              transaction should be updated, \c NULL if the entire stream should be read at once.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Read_EStream_BE(void* const Buffer,\r
-                                                        uint16_t Length,\r
-                                                        uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** EEPROM buffer source version of Endpoint_Write_Control_Stream_LE.\r
-                        *\r
-                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt\r
-                        *        to clear the status stage when using this routine in a control transaction.\r
-                        *        \n\n\r
-                        *\r
-                        *  \note This routine should only be used on CONTROL type endpoints.\r
-                        *        \n\n\r
-                        *\r
-                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained\r
-                        *           together; i.e. the entire stream data must be read or written at the one time.\r
-                        *\r
-                        *  \param[in] Buffer  Pointer to the source data buffer to read from.\r
-                        *  \param[in] Length  Number of bytes to read for the currently selected endpoint into the buffer.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Write_Control_EStream_LE(const void* const Buffer,\r
-                                                                 uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** EEPROM buffer source version of \ref Endpoint_Write_Control_Stream_BE().\r
-                        *\r
-                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt\r
-                        *        to clear the status stage when using this routine in a control transaction.\r
-                        *        \n\n\r
-                        *\r
-                        *  \note This routine should only be used on CONTROL type endpoints.\r
-                        *        \n\n\r
-                        *\r
-                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained\r
-                        *           together; i.e. the entire stream data must be read or written at the one time.\r
-                        *\r
-                        *  \param[in] Buffer  Pointer to the source data buffer to read from.\r
-                        *  \param[in] Length  Number of bytes to read for the currently selected endpoint into the buffer.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Write_Control_EStream_BE(const void* const Buffer,\r
-                                                                 uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** EEPROM buffer source version of \ref Endpoint_Read_Control_Stream_LE().\r
-                        *\r
-                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt\r
-                        *        to clear the status stage when using this routine in a control transaction.\r
-                        *        \n\n\r
-                        *\r
-                        *  \note This routine should only be used on CONTROL type endpoints.\r
-                        *        \n\n\r
-                        *\r
-                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained\r
-                        *           together; i.e. the entire stream data must be read or written at the one time.\r
-                        *\r
-                        *  \param[out] Buffer  Pointer to the destination data buffer to write to.\r
-                        *  \param[in]  Length  Number of bytes to send via the currently selected endpoint.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Read_Control_EStream_LE(void* const Buffer,\r
-                                                                uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** EEPROM buffer source version of \ref Endpoint_Read_Control_Stream_BE().\r
-                        *\r
-                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt\r
-                        *        to clear the status stage when using this routine in a control transaction.\r
-                        *        \n\n\r
-                        *\r
-                        *  \note This routine should only be used on CONTROL type endpoints.\r
-                        *        \n\n\r
-                        *\r
-                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained\r
-                        *           together; i.e. the entire stream data must be read or written at the one time.\r
-                        *\r
-                        *  \param[out] Buffer  Pointer to the destination data buffer to write to.\r
-                        *  \param[in]  Length  Number of bytes to send via the currently selected endpoint.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Read_Control_EStream_BE(void* const Buffer,\r
-                                                                uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);\r
-                       //@}\r
-\r
-                       /** \name Stream functions for PROGMEM source/destination data */\r
-                       //@{\r
-\r
-                       /** FLASH buffer source version of \ref Endpoint_Write_Stream_LE().\r
-                        *\r
-                        *  \pre The FLASH data must be located in the first 64KB of FLASH for this function to work correctly.\r
-                        *\r
-                        *  \param[in] Buffer          Pointer to the source data buffer to read from.\r
-                        *  \param[in] Length          Number of bytes to read for the currently selected endpoint into the buffer.\r
-                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current\r
-                        *                             transaction should be updated, \c NULL if the entire stream should be written at once.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Write_PStream_LE(const void* const Buffer,\r
-                                                         uint16_t Length,\r
-                                                         uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** FLASH buffer source version of \ref Endpoint_Write_Stream_BE().\r
-                        *\r
-                        *  \pre The FLASH data must be located in the first 64KB of FLASH for this function to work correctly.\r
-                        *\r
-                        *  \param[in] Buffer          Pointer to the source data buffer to read from.\r
-                        *  \param[in] Length          Number of bytes to read for the currently selected endpoint into the buffer.\r
-                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current\r
-                        *                             transaction should be updated, \c NULL if the entire stream should be written at once.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Write_PStream_BE(const void* const Buffer,\r
-                                                         uint16_t Length,\r
-                                                         uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** FLASH buffer source version of \ref Endpoint_Write_Control_Stream_LE().\r
-                        *\r
-                        *  \pre The FLASH data must be located in the first 64KB of FLASH for this function to work correctly.\r
-                        *\r
-                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt\r
-                        *        to clear the status stage when using this routine in a control transaction.\r
-                        *        \n\n\r
-                        *\r
-                        *  \note This routine should only be used on CONTROL type endpoints.\r
-                        *        \n\n\r
-                        *\r
-                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained\r
-                        *           together; i.e. the entire stream data must be read or written at the one time.\r
-                        *\r
-                        *  \param[in] Buffer  Pointer to the source data buffer to read from.\r
-                        *  \param[in] Length  Number of bytes to read for the currently selected endpoint into the buffer.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Write_Control_PStream_LE(const void* const Buffer,\r
-                                                                 uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
-                       /** FLASH buffer source version of \ref Endpoint_Write_Control_Stream_BE().\r
-                        *\r
-                        *  \pre The FLASH data must be located in the first 64KB of FLASH for this function to work correctly.\r
-                        *\r
-                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt\r
-                        *        to clear the status stage when using this routine in a control transaction.\r
-                        *        \n\n\r
-                        *\r
-                        *  \note This routine should only be used on CONTROL type endpoints.\r
-                        *        \n\n\r
-                        *\r
-                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained\r
-                        *           together; i.e. the entire stream data must be read or written at the one time.\r
-                        *\r
-                        *  \param[in] Buffer  Pointer to the source data buffer to read from.\r
-                        *  \param[in] Length  Number of bytes to read for the currently selected endpoint into the buffer.\r
-                        *\r
-                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
-                        */\r
-                       uint8_t Endpoint_Write_Control_PStream_BE(const void* const Buffer,\r
-                                                                 uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);\r
-                       //@}\r
-\r
-       /* Disable C linkage for C++ Compilers: */\r
-               #if defined(__cplusplus)\r
-                       }\r
-               #endif\r
-               \r
-#endif\r
-\r
-/** @} */\r
+/*
+             LUFA Library
+     Copyright (C) Dean Camera, 2012.
+              
+  dean [at] fourwalledcubicle [dot] com
+           www.lufa-lib.org
+*/
+
+/*
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+  Permission to use, copy, modify, distribute, and sell this 
+  software and its documentation for any purpose is hereby granted
+  without fee, provided that the above copyright notice appear in 
+  all copies and that both that the copyright notice and this
+  permission notice and warranty disclaimer appear in supporting 
+  documentation, and that the name of the author not be used in 
+  advertising or publicity pertaining to distribution of the 
+  software without specific, written prior permission.
+
+  The author disclaim all warranties with regard to this
+  software, including all implied warranties of merchantability
+  and fitness.  In no event shall the author be liable for any
+  special, indirect or consequential damages or any damages
+  whatsoever resulting from loss of use, data or profits, whether
+  in an action of contract, negligence or other tortious action,
+  arising out of or in connection with the use or performance of
+  this software.
+*/
+
+/** \file
+ *  \brief Endpoint data stream transmission and reception management for the AVR XMEGA microcontrollers.
+ *  \copydetails Group_EndpointStreamRW_XMEGA
+ *
+ *  \note This file should not be included directly. It is automatically included as needed by the USB driver
+ *        dispatch header located in LUFA/Drivers/USB/USB.h.
+ */
+
+/** \ingroup Group_EndpointStreamRW
+ *  \defgroup Group_EndpointStreamRW_XMEGA Read/Write of Multi-Byte Streams (XMEGA)
+ *  \brief Endpoint data stream transmission and reception management for the Atmel AVR XMEGA architecture.
+ *
+ *  Functions, macros, variables, enums and types related to data reading and writing of data streams from
+ *  and to endpoints.
+ *
+ *  @{
+ */ 
+
+#ifndef __ENDPOINT_STREAM_XMEGA_H__
+#define __ENDPOINT_STREAM_XMEGA_H__
+
+       /* Includes: */
+               #include "../../../../Common/Common.h"
+               #include "../USBMode.h"         
+               #include "../USBTask.h"
+               
+       /* Enable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       extern "C" {
+               #endif
+
+       /* Preprocessor Checks: */
+               #if !defined(__INCLUDE_FROM_USB_DRIVER)
+                       #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.
+               #endif
+
+       /* Public Interface - May be used in end-application: */
+               /* Function Prototypes: */
+                       /** \name Stream functions for null data */
+                       //@{
+
+                       /** Reads and discards the given number of bytes from the currently selected endpoint's bank,
+                        *  discarding fully read packets from the host as needed. The last packet is not automatically
+                        *  discarded once the remaining bytes has been read; the user is responsible for manually
+                        *  discarding the last packet from the host via the \ref Endpoint_ClearOUT() macro.
+                        *
+                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once,
+                        *  failing or succeeding as a single unit. If the BytesProcessed parameter points to a valid
+                        *  storage location, the transfer will instead be performed as a series of chunks. Each time
+                        *  the endpoint bank becomes empty while there is still data to process (and after the current
+                        *  packet has been acknowledged) the BytesProcessed location will be updated with the total number
+                        *  of bytes processed in the stream, and the function will exit with an error code of
+                        *  \ref ENDPOINT_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed
+                        *  in the user code - to continue the transfer, call the function again with identical parameters
+                        *  and it will resume until the BytesProcessed value reaches the total transfer length.
+                        *
+                        *  <b>Single Stream Transfer Example:</b>
+                        *  \code
+                        *  uint8_t ErrorCode;
+                        *  
+                        *  if ((ErrorCode = Endpoint_Discard_Stream(512, NULL)) != ENDPOINT_RWSTREAM_NoError)
+                        *  {
+                        *       // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  <b>Partial Stream Transfers Example:</b>
+                        *  \code
+                        *  uint8_t  ErrorCode;
+                        *  uint16_t BytesProcessed;
+                        *  
+                        *  BytesProcessed = 0;
+                        *  while ((ErrorCode = Endpoint_Discard_Stream(512, &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)
+                        *  {
+                        *      // Stream not yet complete - do other actions here, abort if required
+                        *  }
+                        *  
+                        *  if (ErrorCode != ENDPOINT_RWSTREAM_NoError)
+                        *  {
+                        *      // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  \note This routine should not be used on CONTROL type endpoints.
+                        *
+                        *  \param[in] Length          Number of bytes to discard via the currently selected endpoint.
+                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current
+                        *                             transaction should be updated, \c NULL if the entire stream should be read at once.
+                        *
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Discard_Stream(uint16_t Length,
+                                                       uint16_t* const BytesProcessed);
+
+                       /** Writes a given number of zeroed bytes to the currently selected endpoint's bank, sending
+                        *  full packets to the host as needed. The last packet is not automatically sent once the 
+                        *  remaining bytes have been written; the user is responsible for manually sending the last
+                        *  packet to the host via the \ref Endpoint_ClearIN() macro.
+                        *
+                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once,
+                        *  failing or succeeding as a single unit. If the BytesProcessed parameter points to a valid
+                        *  storage location, the transfer will instead be performed as a series of chunks. Each time
+                        *  the endpoint bank becomes full while there is still data to process (and after the current
+                        *  packet transmission has been initiated) the BytesProcessed location will be updated with the
+                        *  total number of bytes processed in the stream, and the function will exit with an error code of
+                        *  \ref ENDPOINT_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed
+                        *  in the user code - to continue the transfer, call the function again with identical parameters
+                        *  and it will resume until the BytesProcessed value reaches the total transfer length.
+                        *
+                        *  <b>Single Stream Transfer Example:</b>
+                        *  \code
+                        *  uint8_t ErrorCode;
+                        *  
+                        *  if ((ErrorCode = Endpoint_Null_Stream(512, NULL)) != ENDPOINT_RWSTREAM_NoError)
+                        *  {
+                        *       // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  <b>Partial Stream Transfers Example:</b>
+                        *  \code
+                        *  uint8_t  ErrorCode;
+                        *  uint16_t BytesProcessed;
+                        *  
+                        *  BytesProcessed = 0;
+                        *  while ((ErrorCode = Endpoint_Null_Stream(512, &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)
+                        *  {
+                        *      // Stream not yet complete - do other actions here, abort if required
+                        *  }
+                        *  
+                        *  if (ErrorCode != ENDPOINT_RWSTREAM_NoError)
+                        *  {
+                        *      // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  \note This routine should not be used on CONTROL type endpoints.
+                        *
+                        *  \param[in] Length          Number of zero bytes to send via the currently selected endpoint.
+                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current
+                        *                             transaction should be updated, \c NULL if the entire stream should be read at once.
+                        *
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Null_Stream(uint16_t Length,
+                                                    uint16_t* const BytesProcessed);
+
+                       //@}
+
+                       /** \name Stream functions for RAM source/destination data */
+                       //@{
+               
+                       /** Writes the given number of bytes to the endpoint from the given buffer in little endian,
+                        *  sending full packets to the host as needed. The last packet filled is not automatically sent;
+                        *  the user is responsible for manually sending the last written packet to the host via the
+                        *  \ref Endpoint_ClearIN() macro.
+                        *
+                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once,
+                        *  failing or succeeding as a single unit. If the BytesProcessed parameter points to a valid
+                        *  storage location, the transfer will instead be performed as a series of chunks. Each time
+                        *  the endpoint bank becomes full while there is still data to process (and after the current
+                        *  packet transmission has been initiated) the BytesProcessed location will be updated with the
+                        *  total number of bytes processed in the stream, and the function will exit with an error code of
+                        *  \ref ENDPOINT_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed
+                        *  in the user code - to continue the transfer, call the function again with identical parameters
+                        *  and it will resume until the BytesProcessed value reaches the total transfer length.
+                        *
+                        *  <b>Single Stream Transfer Example:</b>
+                        *  \code
+                        *  uint8_t DataStream[512];
+                        *  uint8_t ErrorCode;
+                        *  
+                        *  if ((ErrorCode = Endpoint_Write_Stream_LE(DataStream, sizeof(DataStream),
+                        *                                            NULL)) != ENDPOINT_RWSTREAM_NoError)
+                        *  {
+                        *       // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  <b>Partial Stream Transfers Example:</b>
+                        *  \code
+                        *  uint8_t  DataStream[512];
+                        *  uint8_t  ErrorCode;
+                        *  uint16_t BytesProcessed;
+                        *  
+                        *  BytesProcessed = 0;
+                        *  while ((ErrorCode = Endpoint_Write_Stream_LE(DataStream, sizeof(DataStream),
+                        *                                               &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)
+                        *  {
+                        *      // Stream not yet complete - do other actions here, abort if required
+                        *  }
+                        *  
+                        *  if (ErrorCode != ENDPOINT_RWSTREAM_NoError)
+                        *  {
+                        *      // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  \note This routine should not be used on CONTROL type endpoints.
+                        *
+                        *  \param[in] Buffer          Pointer to the source data buffer to read from.
+                        *  \param[in] Length          Number of bytes to read for the currently selected endpoint into the buffer.
+                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current
+                        *                             transaction should be updated, \c NULL if the entire stream should be written at once.
+                        *
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Write_Stream_LE(const void* const Buffer,
+                                                        uint16_t Length,
+                                                        uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** Writes the given number of bytes to the endpoint from the given buffer in big endian,
+                        *  sending full packets to the host as needed. The last packet filled is not automatically sent;
+                        *  the user is responsible for manually sending the last written packet to the host via the
+                        *  \ref Endpoint_ClearIN() macro.
+                        *
+                        *  \note This routine should not be used on CONTROL type endpoints.
+                        *
+                        *  \param[in] Buffer          Pointer to the source data buffer to read from.
+                        *  \param[in] Length          Number of bytes to read for the currently selected endpoint into the buffer.
+                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current
+                        *                             transaction should be updated, \c NULL if the entire stream should be written at once.
+                        *
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Write_Stream_BE(const void* const Buffer,
+                                                        uint16_t Length,
+                                                        uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+                       
+                       /** Reads the given number of bytes from the endpoint from the given buffer in little endian,
+                        *  discarding fully read packets from the host as needed. The last packet is not automatically
+                        *  discarded once the remaining bytes has been read; the user is responsible for manually
+                        *  discarding the last packet from the host via the \ref Endpoint_ClearOUT() macro.
+                        *
+                        *  If the BytesProcessed parameter is \c NULL, the entire stream transfer is attempted at once,
+                        *  failing or succeeding as a single unit. If the BytesProcessed parameter points to a valid
+                        *  storage location, the transfer will instead be performed as a series of chunks. Each time
+                        *  the endpoint bank becomes empty while there is still data to process (and after the current
+                        *  packet has been acknowledged) the BytesProcessed location will be updated with the total number
+                        *  of bytes processed in the stream, and the function will exit with an error code of
+                        *  \ref ENDPOINT_RWSTREAM_IncompleteTransfer. This allows for any abort checking to be performed
+                        *  in the user code - to continue the transfer, call the function again with identical parameters
+                        *  and it will resume until the BytesProcessed value reaches the total transfer length.
+                        *
+                        *  <b>Single Stream Transfer Example:</b>
+                        *  \code
+                        *  uint8_t DataStream[512];
+                        *  uint8_t ErrorCode;
+                        *  
+                        *  if ((ErrorCode = Endpoint_Read_Stream_LE(DataStream, sizeof(DataStream),
+                        *                                           NULL)) != ENDPOINT_RWSTREAM_NoError)
+                        *  {
+                        *       // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  <b>Partial Stream Transfers Example:</b>
+                        *  \code
+                        *  uint8_t  DataStream[512];
+                        *  uint8_t  ErrorCode;
+                        *  uint16_t BytesProcessed;
+                        *  
+                        *  BytesProcessed = 0;
+                        *  while ((ErrorCode = Endpoint_Read_Stream_LE(DataStream, sizeof(DataStream),
+                        *                                              &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)
+                        *  {
+                        *      // Stream not yet complete - do other actions here, abort if required
+                        *  }
+                        *  
+                        *  if (ErrorCode != ENDPOINT_RWSTREAM_NoError)
+                        *  {
+                        *      // Stream failed to complete - check ErrorCode here
+                        *  }
+                        *  \endcode
+                        *
+                        *  \note This routine should not be used on CONTROL type endpoints.
+                        *
+                        *  \param[out] Buffer          Pointer to the destination data buffer to write to.
+                        *  \param[in]  Length          Number of bytes to send via the currently selected endpoint.
+                        *  \param[in]  BytesProcessed  Pointer to a location where the total number of bytes processed in the current
+                        *                              transaction should be updated, \c NULL if the entire stream should be read at once.
+                        *
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Read_Stream_LE(void* const Buffer,
+                                                       uint16_t Length,
+                                                       uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** Reads the given number of bytes from the endpoint from the given buffer in big endian,
+                        *  discarding fully read packets from the host as needed. The last packet is not automatically
+                        *  discarded once the remaining bytes has been read; the user is responsible for manually
+                        *  discarding the last packet from the host via the \ref Endpoint_ClearOUT() macro.
+                        *
+                        *  \note This routine should not be used on CONTROL type endpoints.
+                        *
+                        *  \param[out] Buffer          Pointer to the destination data buffer to write to.
+                        *  \param[in]  Length          Number of bytes to send via the currently selected endpoint.
+                        *  \param[in]  BytesProcessed  Pointer to a location where the total number of bytes processed in the current
+                        *                              transaction should be updated, \c NULL if the entire stream should be read at once.
+                        *
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Read_Stream_BE(void* const Buffer,
+                                                       uint16_t Length,
+                                                       uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** Writes the given number of bytes to the CONTROL type endpoint from the given buffer in little endian,
+                        *  sending full packets to the host as needed. The host OUT acknowledgement is not automatically cleared
+                        *  in both failure and success states; the user is responsible for manually clearing the status OUT packet
+                        *  to finalize the transfer's status stage via the \ref Endpoint_ClearOUT() macro.
+                        *
+                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt
+                        *        to clear the status stage when using this routine in a control transaction.
+                        *        \n\n
+                        *
+                        *  \note This routine should only be used on CONTROL type endpoints.
+                        *
+                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained
+                        *           together; i.e. the entire stream data must be read or written at the one time.
+                        *
+                        *  \param[in] Buffer  Pointer to the source data buffer to read from.
+                        *  \param[in] Length  Number of bytes to read for the currently selected endpoint into the buffer.
+                        *
+                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Write_Control_Stream_LE(const void* const Buffer,
+                                                                uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** Writes the given number of bytes to the CONTROL type endpoint from the given buffer in big endian,
+                        *  sending full packets to the host as needed. The host OUT acknowledgement is not automatically cleared
+                        *  in both failure and success states; the user is responsible for manually clearing the status OUT packet
+                        *  to finalize the transfer's status stage via the \ref Endpoint_ClearOUT() macro.
+                        *
+                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt
+                        *        to clear the status stage when using this routine in a control transaction.
+                        *        \n\n
+                        *
+                        *  \note This routine should only be used on CONTROL type endpoints.
+                        *
+                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained
+                        *           together; i.e. the entire stream data must be read or written at the one time.
+                        *
+                        *  \param[in] Buffer  Pointer to the source data buffer to read from.
+                        *  \param[in] Length  Number of bytes to read for the currently selected endpoint into the buffer.
+                        *
+                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Write_Control_Stream_BE(const void* const Buffer,
+                                                                uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** Reads the given number of bytes from the CONTROL endpoint from the given buffer in little endian,
+                        *  discarding fully read packets from the host as needed. The device IN acknowledgement is not
+                        *  automatically sent after success or failure states; the user is responsible for manually sending the
+                        *  status IN packet to finalize the transfer's status stage via the \ref Endpoint_ClearIN() macro.
+                        *
+                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt
+                        *        to clear the status stage when using this routine in a control transaction.
+                        *        \n\n
+                        *
+                        *  \note This routine should only be used on CONTROL type endpoints.
+                        *
+                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained
+                        *           together; i.e. the entire stream data must be read or written at the one time.
+                        *
+                        *  \param[out] Buffer  Pointer to the destination data buffer to write to.
+                        *  \param[in]  Length  Number of bytes to send via the currently selected endpoint.
+                        *
+                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Read_Control_Stream_LE(void* const Buffer,
+                                                               uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** Reads the given number of bytes from the CONTROL endpoint from the given buffer in big endian,
+                        *  discarding fully read packets from the host as needed. The device IN acknowledgement is not
+                        *  automatically sent after success or failure states; the user is responsible for manually sending the
+                        *  status IN packet to finalize the transfer's status stage via the \ref Endpoint_ClearIN() macro.
+                        *
+                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt
+                        *        to clear the status stage when using this routine in a control transaction.
+                        *        \n\n
+                        *
+                        *  \note This routine should only be used on CONTROL type endpoints.
+                        *
+                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained
+                        *           together; i.e. the entire stream data must be read or written at the one time.
+                        *
+                        *  \param[out] Buffer  Pointer to the destination data buffer to write to.
+                        *  \param[in]  Length  Number of bytes to send via the currently selected endpoint.
+                        *
+                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Read_Control_Stream_BE(void* const Buffer,
+                                                               uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
+                       //@}
+
+                       /** \name Stream functions for EEPROM source/destination data */
+                       //@{
+
+                       /** EEPROM buffer source version of \ref Endpoint_Write_Stream_LE().
+                        *
+                        *  \param[in] Buffer          Pointer to the source data buffer to read from.
+                        *  \param[in] Length          Number of bytes to read for the currently selected endpoint into the buffer.
+                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current
+                        *                             transaction should be updated, \c NULL if the entire stream should be written at once.
+                        *
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Write_EStream_LE(const void* const Buffer,
+                                                         uint16_t Length,
+                                                         uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** EEPROM buffer source version of \ref Endpoint_Write_Stream_BE().
+                        *
+                        *  \param[in] Buffer          Pointer to the source data buffer to read from.
+                        *  \param[in] Length          Number of bytes to read for the currently selected endpoint into the buffer.
+                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current
+                        *                             transaction should be updated, \c NULL if the entire stream should be written at once.
+                        *
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Write_EStream_BE(const void* const Buffer,
+                                                         uint16_t Length,
+                                                         uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** EEPROM buffer destination version of \ref Endpoint_Read_Stream_LE().
+                        *
+                        *  \param[out] Buffer          Pointer to the destination data buffer to write to, located in EEPROM memory space.
+                        *  \param[in]  Length          Number of bytes to send via the currently selected endpoint.
+                        *  \param[in]  BytesProcessed  Pointer to a location where the total number of bytes processed in the current
+                        *                              transaction should be updated, \c NULL if the entire stream should be read at once.
+                        *
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Read_EStream_LE(void* const Buffer,
+                                                        uint16_t Length,
+                                                        uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** EEPROM buffer destination version of \ref Endpoint_Read_Stream_BE().
+                        *
+                        *  \param[out] Buffer          Pointer to the destination data buffer to write to, located in EEPROM memory space.
+                        *  \param[in]  Length          Number of bytes to send via the currently selected endpoint.
+                        *  \param[in]  BytesProcessed  Pointer to a location where the total number of bytes processed in the current
+                        *                              transaction should be updated, \c NULL if the entire stream should be read at once.
+                        *
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Read_EStream_BE(void* const Buffer,
+                                                        uint16_t Length,
+                                                        uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** EEPROM buffer source version of Endpoint_Write_Control_Stream_LE.
+                        *
+                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt
+                        *        to clear the status stage when using this routine in a control transaction.
+                        *        \n\n
+                        *
+                        *  \note This routine should only be used on CONTROL type endpoints.
+                        *        \n\n
+                        *
+                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained
+                        *           together; i.e. the entire stream data must be read or written at the one time.
+                        *
+                        *  \param[in] Buffer  Pointer to the source data buffer to read from.
+                        *  \param[in] Length  Number of bytes to read for the currently selected endpoint into the buffer.
+                        *
+                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Write_Control_EStream_LE(const void* const Buffer,
+                                                                 uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** EEPROM buffer source version of \ref Endpoint_Write_Control_Stream_BE().
+                        *
+                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt
+                        *        to clear the status stage when using this routine in a control transaction.
+                        *        \n\n
+                        *
+                        *  \note This routine should only be used on CONTROL type endpoints.
+                        *        \n\n
+                        *
+                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained
+                        *           together; i.e. the entire stream data must be read or written at the one time.
+                        *
+                        *  \param[in] Buffer  Pointer to the source data buffer to read from.
+                        *  \param[in] Length  Number of bytes to read for the currently selected endpoint into the buffer.
+                        *
+                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Write_Control_EStream_BE(const void* const Buffer,
+                                                                 uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** EEPROM buffer source version of \ref Endpoint_Read_Control_Stream_LE().
+                        *
+                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt
+                        *        to clear the status stage when using this routine in a control transaction.
+                        *        \n\n
+                        *
+                        *  \note This routine should only be used on CONTROL type endpoints.
+                        *        \n\n
+                        *
+                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained
+                        *           together; i.e. the entire stream data must be read or written at the one time.
+                        *
+                        *  \param[out] Buffer  Pointer to the destination data buffer to write to.
+                        *  \param[in]  Length  Number of bytes to send via the currently selected endpoint.
+                        *
+                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Read_Control_EStream_LE(void* const Buffer,
+                                                                uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** EEPROM buffer source version of \ref Endpoint_Read_Control_Stream_BE().
+                        *
+                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt
+                        *        to clear the status stage when using this routine in a control transaction.
+                        *        \n\n
+                        *
+                        *  \note This routine should only be used on CONTROL type endpoints.
+                        *        \n\n
+                        *
+                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained
+                        *           together; i.e. the entire stream data must be read or written at the one time.
+                        *
+                        *  \param[out] Buffer  Pointer to the destination data buffer to write to.
+                        *  \param[in]  Length  Number of bytes to send via the currently selected endpoint.
+                        *
+                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Read_Control_EStream_BE(void* const Buffer,
+                                                                uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
+                       //@}
+
+                       /** \name Stream functions for PROGMEM source/destination data */
+                       //@{
+
+                       /** FLASH buffer source version of \ref Endpoint_Write_Stream_LE().
+                        *
+                        *  \pre The FLASH data must be located in the first 64KB of FLASH for this function to work correctly.
+                        *
+                        *  \param[in] Buffer          Pointer to the source data buffer to read from.
+                        *  \param[in] Length          Number of bytes to read for the currently selected endpoint into the buffer.
+                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current
+                        *                             transaction should be updated, \c NULL if the entire stream should be written at once.
+                        *
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Write_PStream_LE(const void* const Buffer,
+                                                         uint16_t Length,
+                                                         uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** FLASH buffer source version of \ref Endpoint_Write_Stream_BE().
+                        *
+                        *  \pre The FLASH data must be located in the first 64KB of FLASH for this function to work correctly.
+                        *
+                        *  \param[in] Buffer          Pointer to the source data buffer to read from.
+                        *  \param[in] Length          Number of bytes to read for the currently selected endpoint into the buffer.
+                        *  \param[in] BytesProcessed  Pointer to a location where the total number of bytes processed in the current
+                        *                             transaction should be updated, \c NULL if the entire stream should be written at once.
+                        *
+                        *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Write_PStream_BE(const void* const Buffer,
+                                                         uint16_t Length,
+                                                         uint16_t* const BytesProcessed) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** FLASH buffer source version of \ref Endpoint_Write_Control_Stream_LE().
+                        *
+                        *  \pre The FLASH data must be located in the first 64KB of FLASH for this function to work correctly.
+                        *
+                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt
+                        *        to clear the status stage when using this routine in a control transaction.
+                        *        \n\n
+                        *
+                        *  \note This routine should only be used on CONTROL type endpoints.
+                        *        \n\n
+                        *
+                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained
+                        *           together; i.e. the entire stream data must be read or written at the one time.
+                        *
+                        *  \param[in] Buffer  Pointer to the source data buffer to read from.
+                        *  \param[in] Length  Number of bytes to read for the currently selected endpoint into the buffer.
+                        *
+                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Write_Control_PStream_LE(const void* const Buffer,
+                                                                 uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
+
+                       /** FLASH buffer source version of \ref Endpoint_Write_Control_Stream_BE().
+                        *
+                        *  \pre The FLASH data must be located in the first 64KB of FLASH for this function to work correctly.
+                        *
+                        *  \note This function automatically clears the control transfer's status stage. Do not manually attempt
+                        *        to clear the status stage when using this routine in a control transaction.
+                        *        \n\n
+                        *
+                        *  \note This routine should only be used on CONTROL type endpoints.
+                        *        \n\n
+                        *
+                        *  \warning Unlike the standard stream read/write commands, the control stream commands cannot be chained
+                        *           together; i.e. the entire stream data must be read or written at the one time.
+                        *
+                        *  \param[in] Buffer  Pointer to the source data buffer to read from.
+                        *  \param[in] Length  Number of bytes to read for the currently selected endpoint into the buffer.
+                        *
+                        *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
+                        */
+                       uint8_t Endpoint_Write_Control_PStream_BE(const void* const Buffer,
+                                                                 uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
+                       //@}
+
+       /* Disable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       }
+               #endif
+               
+#endif
+
+/** @} */
 
index 23de8fc..3d2926c 100644 (file)
 
        /* Public Interface - May be used in end-application: */
                /* Macros: */
-                       #if !defined(CONTROL_ONLY_DEVICE) || defined(__DOXYGEN__)
+                       #if (!defined(MAX_ENDPOINT_INDEX) && !defined(CONTROL_ONLY_DEVICE)) || defined(__DOXYGEN__)
                                /** Total number of endpoints (including the default control endpoint at address 0) which may
                                 *  be used in the device. Different USB AVR models support different amounts of endpoints,
                                 *  this value reflects the maximum number of endpoints for the currently selected AVR model.
                                 */
                                #define ENDPOINT_TOTAL_ENDPOINTS            16
                        #else
-                               #define ENDPOINT_TOTAL_ENDPOINTS            1
+                               #if defined(CONTROL_ONLY_DEVICE)
+                                       #define ENDPOINT_TOTAL_ENDPOINTS        1
+                               #else
+                                       #define ENDPOINT_TOTAL_ENDPOINTS        (MAX_ENDPOINT_INDEX + 1)
+                               #endif
                        #endif
 
        /* Private Interface - For use in library only: */
                        {
                                uint8_t EPConfigMask = (USB_EP_INTDSBL_bm | ((Banks > 1) ? USB_EP_PINGPONG_bm : 0) | Endpoint_BytesToEPSizeMask(Size));
 
+                               if ((Address & ENDPOINT_EPNUM_MASK) >= ENDPOINT_TOTAL_ENDPOINTS)
+                                 return false;
+
                                // TODO - Fix once limitations are lifted
-                               if ((Banks > 1) || (Size > 64))
+                               EPConfigMask &= ~USB_EP_PINGPONG_bm;
+                               if (Size > 64)
                                  return false;
 
                                switch (Type)
index 844ef65..09d4ab6 100644 (file)
@@ -76,7 +76,7 @@ void USB_Init(
        USB.CAL1 = pgm_read_byte(offsetof(NVM_PROD_SIGNATURES_t, USBCAL1));
        NVM.CMD  = 0;
 
-       /* Ugly workaround to ensure an aligned table, since __BIGGEST_ALIGNMENT__ == 1 for 8-bit AVR-GCC */
+       /* Ugly workaround to ensure an aligned table, since __BIGGEST_ALIGNMENT__ == 1 for the 8-bit AVR-GCC toochain */
        USB.EPPTR = ((intptr_t)&USB_EndpointTable[1] & ~(1 << 0));
        USB.CTRLA = (USB_STFRNUM_bm | ((ENDPOINT_TOTAL_ENDPOINTS - 1) << USB_MAXEP_gp));
 
index 25402e8..e1c782d 100644 (file)
                         *                      from the \ref USB_Modes_t enum.
                         *
                         *  \param[in] Options  Mask indicating the options which should be used when initializing the USB
-                        *                      interface to control the USB interface's behaviour. This should be comprised of
+                        *                      interface to control the USB interface's behavior. This should be comprised of
                         *                      a \c USB_OPT_REG_* mask to control the regulator, a \c USB_OPT_*_PLL mask to control the
                         *                      PLL, and a \c USB_DEVICE_OPT_* mask (when the device mode is enabled) to set the device
                         *                      mode speed.
index 626635c..512f702 100644 (file)
@@ -41,7 +41,7 @@
  *
  *  \section Sec_Dependencies Module Source Dependencies
  *  The following files must be built with any user project that uses this module:
- *    - LUFA/Drivers/USB/Core/ConfigDescriptor.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
+ *    - LUFA/Drivers/USB/Core/ConfigDescriptors.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
  *    - LUFA/Drivers/USB/Core/DeviceStandardReq.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
  *    - LUFA/Drivers/USB/Core/Events.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
  *    - LUFA/Drivers/USB/Core/HostStandardReq.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
                #include "Core/USBTask.h"
                #include "Core/Events.h"
                #include "Core/StdDescriptors.h"
-               #include "Core/ConfigDescriptor.h"
+               #include "Core/ConfigDescriptors.h"
                #include "Core/USBController.h"
                #include "Core/USBInterrupt.h"
 
diff --git a/LUFA/Platform/Platform.h b/LUFA/Platform/Platform.h
new file mode 100644 (file)
index 0000000..2524363
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+             LUFA Library
+     Copyright (C) Dean Camera, 2012.
+
+  dean [at] fourwalledcubicle [dot] com
+           www.lufa-lib.org
+*/
+
+/*
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+  Permission to use, copy, modify, distribute, and sell this
+  software and its documentation for any purpose is hereby granted
+  without fee, provided that the above copyright notice appear in
+  all copies and that both that the copyright notice and this
+  permission notice and warranty disclaimer appear in supporting
+  documentation, and that the name of the author not be used in
+  advertising or publicity pertaining to distribution of the
+  software without specific, written prior permission.
+
+  The author disclaim all warranties with regard to this
+  software, including all implied warranties of merchantability
+  and fitness.  In no event shall the author be liable for any
+  special, indirect or consequential damages or any damages
+  whatsoever resulting from loss of use, data or profits, whether
+  in an action of contract, negligence or other tortious action,
+  arising out of or in connection with the use or performance of
+  this software.
+*/
+
+/** \file
+ *  \brief Architecture Specific Hardware Platform Drivers.
+ *
+ *  This file is the master dispatch header file for the device-specific hardware platform drivers, for low level
+ *  hardware configuration and management. The platform drivers are a set of drivers which are designed to provide
+ *  a high level management layer for the various low level system functions such as clock control and interrupt
+ *  management.
+ *
+ *  User code may choose to either include this master dispatch header file to include all available platform
+ *  driver header files for the current architecture, or may choose to only include the specific platform driver
+ *  modules required for a particular application.
+ */
+
+/** \defgroup Group_PlatformDrivers System Platform Drivers - LUFA/Platform/Platform.h
+ *  \brief Hardware platform drivers.
+ *
+ *  \section Sec_Dependencies Module Source Dependencies
+ *  The following files must be built with any user project that uses this module:
+ *    - <b>UC3 Architecture Only:</b> LUFA/Platform/UC3/InterruptManagement.c <i>(Makefile source module name: LUFA_SRC_PLATFORM)</i> 
+ *    - <b>UC3 Architecture Only:</b> LUFA/Platform/UC3/Exception.S <i>(Makefile source module name: LUFA_SRC_PLATFORM)</i>
+ *
+ *  \section Sec_ModDescription Module Description
+ *  Device-specific hardware platform drivers, for low level hardware configuration and management. The platform
+ *  drivers are a set of drivers which are designed to provide a high level management layer for the various low level
+ *  system functions such as clock control and interrupt management.
+ *
+ *  User code may choose to either include this master dispatch header file to include all available platform
+ *  driver header files for the current architecture, or may choose to only include the specific platform driver
+ *  modules required for a particular application.
+ *
+ *  \note The exact APIs and availability of sub-modules within the platform driver group may vary depending on the
+ *        target used - see individual target module documentation for the API specific to your target processor.
+ */
+
+#ifndef __LUFA_PLATFORM_H__
+#define __LUFA_PLATFORM_H__
+
+       /* Includes: */
+               #include "../Common/Common.h"
+
+       /* Includes: */
+               #if (ARCH == ARCH_UC3)
+                       #include "UC3/ClockManagement.h"
+                       #include "UC3/InterruptManagement.h"
+               #elif (ARCH == ARCH_XMEGA)
+                       #include "XMEGA/ClockManagement.h"
+               #endif
+
+#endif
+
index 2cd96d2..b6b6ece 100644 (file)
@@ -72,7 +72,7 @@
 #define _UC3_CLOCK_MANAGEMENT_H_
 
        /* Includes: */
-               #include <LUFA/Common/Common.h>
+               #include "../../Common/Common.h"
 
        /* Enable C linkage for C++ Compilers: */
                #if defined(__cplusplus)
                                EXOSC_MODE_8MHZ_OR_MORE  = AVR32_PM_OSCCTRL0_MODE_CRYSTAL_G3, /**< External crystal oscillator equal to or faster than 8MHz. */
                        };
 
-                       /** Enum for the possible external oscillator statup times. */
+                       /** Enum for the possible external oscillator startup times. */
                        enum UC3_Extern_OSC_ClockStartup_t
                        {
                                EXOSC_START_0CLK         = AVR32_PM_OSCCTRL0_STARTUP_0_RCOSC,     /**< Immediate startup, no delay. */
-                               EXOSC_START_64CLK        = AVR32_PM_OSCCTRL0_STARTUP_64_RCOSC,    /**< Wait 64 clock cyles before startup for stability. */
-                               EXOSC_START_128CLK       = AVR32_PM_OSCCTRL0_STARTUP_128_RCOSC,   /**< Wait 128 clock cyles before startup for stability. */
-                               EXOSC_START_2048CLK      = AVR32_PM_OSCCTRL0_STARTUP_2048_RCOSC,  /**< Wait 2048 clock cyles before startup for stability. */
-                               EXOSC_START_4096CLK      = AVR32_PM_OSCCTRL0_STARTUP_4096_RCOSC,  /**< Wait 4096 clock cyles before startup for stability. */
-                               EXOSC_START_8192CLK      = AVR32_PM_OSCCTRL0_STARTUP_8192_RCOSC,  /**< Wait 8192 clock cyles before startup for stability. */
-                               EXOSC_START_16384CLK     = AVR32_PM_OSCCTRL0_STARTUP_16384_RCOSC, /**< Wait 16384 clock cyles before startup for stability. */
+                               EXOSC_START_64CLK        = AVR32_PM_OSCCTRL0_STARTUP_64_RCOSC,    /**< Wait 64 clock cycles before startup for stability. */
+                               EXOSC_START_128CLK       = AVR32_PM_OSCCTRL0_STARTUP_128_RCOSC,   /**< Wait 128 clock cycles before startup for stability. */
+                               EXOSC_START_2048CLK      = AVR32_PM_OSCCTRL0_STARTUP_2048_RCOSC,  /**< Wait 2048 clock cycles before startup for stability. */
+                               EXOSC_START_4096CLK      = AVR32_PM_OSCCTRL0_STARTUP_4096_RCOSC,  /**< Wait 4096 clock cycles before startup for stability. */
+                               EXOSC_START_8192CLK      = AVR32_PM_OSCCTRL0_STARTUP_8192_RCOSC,  /**< Wait 8192 clock cycles before startup for stability. */
+                               EXOSC_START_16384CLK     = AVR32_PM_OSCCTRL0_STARTUP_16384_RCOSC, /**< Wait 16384 clock cycles before startup for stability. */
                        };
 
                        /** Enum for the possible module clock sources. */
                                                                      const uint32_t SourceFreq,
                                                                      const uint32_t Frequency)
                        {
+                               if (Channel >= AVR32_PM_GCLK_NUM)
+                                 return false;
+
+                               if (SourceFreq < Frequency)
+                                 return false;
+
                                switch (Source)
                                {
                                        case CLOCK_SRC_OSC0:
                                                return false;
                                }
 
-                               if (SourceFreq < Frequency)
-                                 return false;
-
                                AVR32_PM.GCCTRL[Channel].diven = (SourceFreq > Frequency) ? true : false;
                                AVR32_PM.GCCTRL[Channel].div   = (((SourceFreq / Frequency) - 1) / 2);
                                AVR32_PM.GCCTRL[Channel].cen   = true;
                        /** Stops the given generic clock of the UC3 microcontroller.
                         *
                         *  \param[in] Channel  Index of the generic clock to stop.
+                        *
+                        *  \return Boolean \c true if the generic clock was sucessfully stopped, \c false if invalid parameters specified.
                         */
-                       static inline void AVR32CLK_StopGenericClock(const uint8_t Channel) ATTR_ALWAYS_INLINE;
-                       static inline void AVR32CLK_StopGenericClock(const uint8_t Channel)
+                       static inline bool AVR32CLK_StopGenericClock(const uint8_t Channel) ATTR_ALWAYS_INLINE;
+                       static inline bool AVR32CLK_StopGenericClock(const uint8_t Channel)
                        {
+                               if (Channel >= AVR32_PM_GCLK_NUM)
+                                 return false;
+                       
                                AVR32_PM.GCCTRL[Channel].cen = false;
+                               
+                               return true;
                        }
 
                        /** Sets the clock source for the main microcontroller core. The given clock source should be configured
                        static inline bool AVR32CLK_SetCPUClockSource(const uint8_t Source,
                                                                      const uint32_t SourceFreq)
                        {
-                               AVR32_FLASHC.FCR.fws = (SourceFreq > 30000000) ? true : false;
+                               if (SourceFreq > AVR32_PM_CPU_MAX_FREQ)
+                                 return false;
 
+                               AVR32_FLASHC.FCR.fws = (SourceFreq > AVR32_FLASHC_FWS_0_MAX_FREQ) ? true : false;
+                               
                                switch (Source)
                                {
                                        #if defined(AVR32_PM_MCCTRL_MCSEL_SLOW)
index af99f08..2f9ec23 100644 (file)
@@ -41,8 +41,8 @@
  *
  *  \section Sec_Dependencies Module Source Dependencies
  *  The following files must be built with any user project that uses this module:
- *    - LUFA/Platform/UC3/InterruptManagement.c
- *    - LUFA/Platform/UC3/Exception.S
+ *    - LUFA/Platform/UC3/InterruptManagement.c <i>(Makefile source module name: LUFA_SRC_PLATFORM)</i>
+ *    - LUFA/Platform/UC3/Exception.S <i>(Makefile source module name: LUFA_SRC_PLATFORM)</i>
  *
  *  \section Sec_ModDescription Module Description
  *  Interrupt controller driver for the AVR32 UC3 microcontrollers, for the configuration of interrupt
@@ -71,7 +71,7 @@
 #define _UC3_INTERRUPT_MANAGEMENT_H_
 
        /* Includes: */
-               #include <LUFA/Common/Common.h>
+               #include "../../Common/Common.h"
 
        /* Enable C linkage for C++ Compilers: */
                #if defined(__cplusplus)
@@ -93,7 +93,7 @@
 
        /* Public Interface - May be used in end-application: */
                /* Macros: */
-                       /** Converts a given interrupt index into its assocated interrupt group.
+                       /** Converts a given interrupt index into its associated interrupt group.
                         *
                         *  \param[in] IRQIndex  Index of the interrupt request to convert.
                         *
                         */
                        #define INTC_IRQ_GROUP(IRQIndex)  (IRQIndex / 32)
 
-                       /** Converts a given interrupt index into its assocated interrupt line.
+                       /** Converts a given interrupt index into its associated interrupt line.
                         *
                         *  \param[in] IRQIndex  Index of the interrupt request to convert.
                         *
index feef889..c824c89 100644 (file)
@@ -70,7 +70,7 @@
 #define _XMEGA_CLOCK_MANAGEMENT_H_
 
        /* Includes: */
-               #include <LUFA/Common/Common.h>
+               #include "../../Common/Common.h"
 
        /* Enable C linkage for C++ Compilers: */
                #if defined(__cplusplus)
@@ -88,7 +88,7 @@
                                EXOSC_FREQ_16MHZ_MAX     = OSC_FRQRANGE_12TO16_gc, /**< External crystal oscillator equal to or slower than 16MHz. */
                        };
 
-                       /** Enum for the possible external oscillator statup times. */
+                       /** Enum for the possible external oscillator startup times. */
                        enum XMEGA_Extern_OSC_ClockStartup_t
                        {
                                EXOSC_START_6CLK         = OSC_XOSCSEL_EXTCLK_gc,      /**< Wait 6 clock cycles before startup (external clock). */
                         *  the oscillator is ready for use.
                         *
                         *  \param[in] FreqRange  Frequency range of the external oscillator, a value from \ref XMEGA_Extern_OSC_ClockFrequency_t.
-                        *  \param[in] Startup    Statup time of the external oscillator, a value from \ref XMEGA_Extern_OSC_ClockStartup_t.
+                        *  \param[in] Startup    Startup time of the external oscillator, a value from \ref XMEGA_Extern_OSC_ClockStartup_t.
                         *
                         *  \return Boolean \c true if the external oscillator was successfully started, \c false if invalid parameters specified.
                         */
                         *
                         *  \param[in] Source      Clock source for the CPU core, a value from \ref XMEGA_System_ClockSource_t.
                         *
-                        *  \return Boolean \c true if the CPU core clock was sucessfully altered, \c false if invalid parameters specified.
+                        *  \return Boolean \c true if the CPU core clock was successfully altered, \c false if invalid parameters specified.
                         */
                        static inline bool XMEGACLK_SetCPUClockSource(const uint8_t Source) ATTR_ALWAYS_INLINE;
                        static inline bool XMEGACLK_SetCPUClockSource(const uint8_t Source)
index a53c383..78b8a69 100644 (file)
        /* Public Interface - May be used in end-application: */
                /* Macros: */
                        /** Indicates the version number of the library, as an integer. */
-                       #define LUFA_VERSION_INTEGER     0x000000
+                       #define LUFA_VERSION_INTEGER     0x120730
 
                        /** Indicates the version number of the library, as a string. */
-                       #define LUFA_VERSION_STRING      "000000"
+                       #define LUFA_VERSION_STRING      "120730"
 
 #endif
 
index 3fbf7ac..73e760b 100644 (file)
@@ -9,9 +9,10 @@
 #  Makefile for the LUFA library itself.
 # ---------------------------------------
 
-LUFA_VERSION_NUM        = $(shell grep LUFA_VERSION_STRING Version.h | cut -d'"' -f2)
-EXCLUDE_FROM_EXPORT     = Documentation DoxygenPages CodeTemplates Build *.conf *.tar *.o *.lss *.lst *.hex *.elf *.bin
-DOXYGEN_OVERRIDE_PARAMS = PROJECT_NUMBER=$(LUFA_VERSION_NUM)
+LUFA_VERSION_NUM        := $(shell grep LUFA_VERSION_STRING Version.h | cut -d'"' -f2)
+EXCLUDE_FROM_EXPORT     := Documentation DoxygenPages CodeTemplates Build *.conf *.tar *.o *.d *.lss *.lst *.hex *.elf *.hex *.eep *.map *.bin
+
+all:
 
 export_tar:
        @echo Exporting LUFA library to a TAR archive...
@@ -24,19 +25,26 @@ version:
 
 # Check if this is being included from a legacy or non LUFA build system makefile
 ifneq ($(LUFA_PATH),)
-  LUFA_ROOT_PATH = $(LUFA_PATH)/LUFA/
-  include $(LUFA_PATH)/LUFA/Build/lufa.sources.in
-else
-  LUFA_PATH      = .
-  ARCH           = {AVR8,UC3,XMEGA}
+  LUFA_ROOT_PATH = $(patsubst %/,%,$(LUFA_PATH))/LUFA/
   
-  all:
+  include $(patsubst %/,%,$(LUFA_PATH))/LUFA/Build/lufa.sources.in
+else
+  LUFA_BUILD_MODULES     += MASTER
+  LUFA_BUILD_TARGETS     += export_tar version
 
+  LUFA_PATH               = .
+  ARCH                    = {AVR8,UC3,XMEGA}
+  DOXYGEN_OVERRIDE_PARAMS = QUIET=YES PROJECT_NUMBER=$(LUFA_VERSION_NUM)
+  
   clean:
        rm -f $(LUFA_SRC_ALL_FILES:%.c=%.o)
+       rm -f $(LUFA_SRC_ALL_FILES:%.c=%.d)
        rm -f $(LUFA_SRC_ALL_FILES:%.c=%.lst)
 
-  # Include LUFA build script makefiles
-  include Build/lufa.sources.in
-  include Build/lufa.doxygen.in
+  include Build/lufa_core.mk
+  include Build/lufa_sources.mk
+  include Build/lufa_doxygen.mk
 endif
+
+
+.PHONY: all export_tar version clean
\ No newline at end of file
index 414a0d5..d18aac7 100644 (file)
@@ -1 +1 @@
-<AVRStudio><MANAGEMENT><ProjectName>%TARGET%</ProjectName><Created>%CREATED%</Created><LastEdit>%CREATED%</LastEdit><ICON>241</ICON><ProjectType>0</ProjectType><Created>%CREATED%</Created><Version>4</Version><Build>4, 18, 0, 685</Build><ProjectTypeName>AVR GCC</ProjectTypeName></MANAGEMENT><CODE_CREATION><ObjectFile>%TARGET%.elf</ObjectFile><EntryFile></EntryFile></CODE_CREATION><DEBUG_TARGET><CURRENT_TARGET></CURRENT_TARGET><CURRENT_PART></CURRENT_PART><BREAKPOINTS></BREAKPOINTS><IO_EXPAND><HIDE>false</HIDE></IO_EXPAND><REGISTERNAMES><Register>R00</Register><Register>R01</Register><Register>R02</Register><Register>R03</Register><Register>R04</Register><Register>R05</Register><Register>R06</Register><Register>R07</Register><Register>R08</Register><Register>R09</Register><Register>R10</Register><Register>R11</Register><Register>R12</Register><Register>R13</Register><Register>R14</Register><Register>R15</Register><Register>R16</Register><Register>R17</Register><Register>R18</Register><Register>R19</Register><Register>R20</Register><Register>R21</Register><Register>R22</Register><Register>R23</Register><Register>R24</Register><Register>R25</Register><Register>R26</Register><Register>R27</Register><Register>R28</Register><Register>R29</Register><Register>R30</Register><Register>R31</Register></REGISTERNAMES><COM></COM><COMType>0</COMType><WATCHNUM>0</WATCHNUM><WATCHNAMES><Pane0></Pane0><Pane1></Pane1><Pane2></Pane2><Pane3></Pane3></WATCHNAMES><BreakOnTrcaeFull>0</BreakOnTrcaeFull></DEBUG_TARGET><Debugger><Triggers></Triggers></Debugger><AVRGCCPLUGIN><FILES>%FILE_LIST%</FILES><CONFIGS><CONFIG><NAME>default</NAME><USESEXTERNALMAKEFILE>YES</USESEXTERNALMAKEFILE><EXTERNALMAKEFILE>makefile</EXTERNALMAKEFILE><PART>atmega128</PART><HEX>1</HEX><LIST>1</LIST><MAP>1</MAP><OUTPUTFILENAME>BootloaderCDC.elf</OUTPUTFILENAME><OUTPUTDIR>default\</OUTPUTDIR><ISDIRTY>1</ISDIRTY><OPTIONS/><INCDIRS/><LIBDIRS/><LIBS/><LINKOBJECTS/><OPTIONSFORALL>-Wall -gdwarf-2 -std=gnu99 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums</OPTIONSFORALL><LINKEROPTIONS></LINKEROPTIONS><SEGMENTS/></CONFIG></CONFIGS><LASTCONFIG>default</LASTCONFIG><USES_WINAVR>1</USES_WINAVR><GCC_LOC>C:\WinAVR-20100110\bin\avr-gcc.exe</GCC_LOC><MAKE_LOC>C:\WinAVR-20100110\utils\bin\make.exe</MAKE_LOC></AVRGCCPLUGIN><ProjectFiles><Files>%GCC_FILE_LIST%</Files></ProjectFiles><IOView><usergroups/><sort sorted="0" column="0" ordername="0" orderaddress="0" ordergroup="0"/></IOView><Files></Files><Events><Bookmarks></Bookmarks></Events><Trace><Filters></Filters></Trace></AVRStudio>\r
+<AVRStudio><MANAGEMENT><ProjectName>%TARGET%</ProjectName><Created>%CREATED%</Created><LastEdit>%CREATED%</LastEdit><ICON>241</ICON><ProjectType>0</ProjectType><Created>%CREATED%</Created><Version>4</Version><Build>4, 18, 0, 685</Build><ProjectTypeName>AVR GCC</ProjectTypeName></MANAGEMENT><CODE_CREATION><ObjectFile>%TARGET%.elf</ObjectFile><EntryFile></EntryFile></CODE_CREATION><DEBUG_TARGET><CURRENT_TARGET></CURRENT_TARGET><CURRENT_PART></CURRENT_PART><BREAKPOINTS></BREAKPOINTS><IO_EXPAND><HIDE>false</HIDE></IO_EXPAND><REGISTERNAMES><Register>R00</Register><Register>R01</Register><Register>R02</Register><Register>R03</Register><Register>R04</Register><Register>R05</Register><Register>R06</Register><Register>R07</Register><Register>R08</Register><Register>R09</Register><Register>R10</Register><Register>R11</Register><Register>R12</Register><Register>R13</Register><Register>R14</Register><Register>R15</Register><Register>R16</Register><Register>R17</Register><Register>R18</Register><Register>R19</Register><Register>R20</Register><Register>R21</Register><Register>R22</Register><Register>R23</Register><Register>R24</Register><Register>R25</Register><Register>R26</Register><Register>R27</Register><Register>R28</Register><Register>R29</Register><Register>R30</Register><Register>R31</Register></REGISTERNAMES><COM></COM><COMType>0</COMType><WATCHNUM>0</WATCHNUM><WATCHNAMES><Pane0></Pane0><Pane1></Pane1><Pane2></Pane2><Pane3></Pane3></WATCHNAMES><BreakOnTrcaeFull>0</BreakOnTrcaeFull></DEBUG_TARGET><Debugger><Triggers></Triggers></Debugger><AVRGCCPLUGIN><FILES>%FILE_LIST%</FILES><CONFIGS><CONFIG><NAME>default</NAME><USESEXTERNALMAKEFILE>YES</USESEXTERNALMAKEFILE><EXTERNALMAKEFILE>makefile</EXTERNALMAKEFILE><PART>atmega128</PART><HEX>1</HEX><LIST>1</LIST><MAP>1</MAP><OUTPUTFILENAME>BootloaderCDC.elf</OUTPUTFILENAME><OUTPUTDIR>default\</OUTPUTDIR><ISDIRTY>1</ISDIRTY><OPTIONS/><INCDIRS/><LIBDIRS/><LIBS/><LINKOBJECTS/><OPTIONSFORALL>-Wall -gdwarf-2 -std=gnu99 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums</OPTIONSFORALL><LINKEROPTIONS></LINKEROPTIONS><SEGMENTS/></CONFIG></CONFIGS><LASTCONFIG>default</LASTCONFIG><USES_WINAVR>1</USES_WINAVR><GCC_LOC>C:\WinAVR-20100110\bin\avr-gcc.exe</GCC_LOC><MAKE_LOC>C:\WinAVR-20100110\utils\bin\make.exe</MAKE_LOC></AVRGCCPLUGIN><ProjectFiles><Files>%GCC_FILE_LIST%</Files></ProjectFiles><IOView><usergroups/><sort sorted="0" column="0" ordername="0" orderaddress="0" ordergroup="0"/></IOView><Files></Files><Events><Bookmarks></Bookmarks></Events><Trace><Filters></Filters></Trace></AVRStudio>
index 41fb991..ca30599 100644 (file)
@@ -1,91 +1,94 @@
-#\r
-#             LUFA Library\r
-#     Copyright (C) Dean Camera, 2012.\r
-#\r
-#  dean [at] fourwalledcubicle [dot] com\r
-#           www.lufa-lib.org\r
-#\r
-\r
-# Maintenance scripts not required by general LUFA users, used for project development purposes.\r
-\r
-\r
-# Path to the root of the LUFA tree\r
-LUFA_ROOT = ../\r
-\r
-all:\r
-\r
-# Update all Doxygen configuration files to the latest Doxygen version - force Markdown support to be disabled\r
-upgrade-doxygen:\r
-       @echo Upgrading Doxygen.conf files...\r
-       @for doxygen_conf in `find $(LUFA_ROOT) -name Doxygen.conf`; do                                       \\r
-         doxygen -u $$doxygen_conf;                                                                          \\r
-         sed "s/MARKDOWN_SUPPORT *= *YES/MARKDOWN_SUPPORT       = NO/1" $$doxygen_conf > $$doxygen_conf.new; \\r
-         sed "s/DISABLE_INDEX *= *NO/DISABLE_INDEX       = YES/1" $$doxygen_conf.new > $$doxygen_conf.new2;  \\r
-         mv -u $$doxygen_conf.new2 $$doxygen_conf;                                                           \\r
-         rm $$doxygen_conf.new;                                                                              \\r
-       done;\r
-       @echo Doxygen configuration update complete.\r
-\r
-# Generate AVR Studio 4 project files for each project from a template\r
-make-as4-projects:\r
-       @echo Creating AVR Studio 4 project files for Demos...\r
-       @for project_makefile in `find $(LUFA_ROOT)/Demos $(LUFA_ROOT)/Projects $(LUFA_ROOT)/Bootloaders -name makefile*`; do \\r
-         target_name=`grep "TARGET *=" $$project_makefile | cut -d'=' -f2 | sed 's/ //g'`; \\r
-         target_folder=`dirname $$project_makefile`;                                   \\r
-         as4_date=`date "+%e-%b-%Y %H:%M:%S"`;                                         \\r
-                                                                                       \\r
-         if ( test -n "$$target_name" ); then                                          \\r
-           echo Creating AS4 project for project $$target_name;                        \\r
-                                                                                       \\r
-           source_files="<OTHERFILE>`basename $$project_makefile`<\/OTHERFILE>";       \\r
-           gcc_source_files="";                                                        \\r
-           for c_source_file in `find $$target_folder -name *.c`; do                   \\r
-             source_filename=`basename $$c_source_file`;                               \\r
-                                                                                       \\r
-             source_files="$$source_files<SOURCEFILE>$$source_filename<\/SOURCEFILE>"; \\r
-             gcc_source_files="$$gcc_source_files<Name>$$source_filename<\/Name>";     \\r
-           done;                                                                       \\r
-           for c_header_file in `find $$target_folder -name *.h`; do                   \\r
-             source_filename=`basename $$c_header_file`;                               \\r
-                                                                                       \\r
-             source_files="$$source_files<HEADERFILE>$$source_filename<\/HEADERFILE>"; \\r
-             gcc_source_files="$$gcc_source_files<Name>$$source_filename<\/Name>";     \\r
-           done;                                                                       \\r
-           for assembly_file in `find $$target_folder -name *.S`; do                   \\r
-             source_filename=`basename $$assembly_file`;                               \\r
-                                                                                       \\r
-             source_files="$$source_files<OTHERFILE>$$source_filename<\/OTHERFILE>";   \\r
-             gcc_source_files="$$gcc_source_files<Name>$$source_filename<\/Name>";     \\r
-           done;                                                                       \\r
-                                                                                       \\r
-           sed "s/%TARGET%/$$target_name/g" AS4Template.aps > $$target_folder/$$target_name.aps.new;                                     \\r
-           sed "s/%CREATED%/$$as4_date/g" $$target_folder/$$target_name.aps.new > $$target_folder/$$target_name.aps.new2;                \\r
-           sed "s/%FILE_LIST%/$$source_files/g" $$target_folder/$$target_name.aps.new2 > $$target_folder/$$target_name.aps.new3;         \\r
-           sed "s/%GCC_FILE_LIST%/$$gcc_source_files/g" $$target_folder/$$target_name.aps.new3 > $$target_folder/$$target_name.aps.new4; \\r
-           mv $$target_folder/$$target_name.aps.new4 $$target_folder/$$target_name.aps;                                                  \\r
-           rm $$target_folder/$$target_name.aps.new $$target_folder/$$target_name.aps.new2 $$target_folder/$$target_name.aps.new3;       \\r
-         fi; \\r
-       done;\r
-       @echo AVR Studio 4 project generation complete.\r
-       \r
-# Check the working branch documentation, ensure no placeholder values\r
-check-documentation-placeholders:\r
-       @echo Checking for release suitability...\r
-       @if ( grep "XXXXXX" $(LUFA_ROOT)/LUFA/DoxygenPages/*.txt > /dev/null ;); then \\r
-         echo "  ERROR: Doxygen documentation has not been updated for release!";    \\r
-         exit 1;                                                                     \\r
-       fi;\r
-       @if ( grep "000000" $(LUFA_ROOT)/LUFA/Version.h > /dev/null ;); then          \\r
-         echo "  ERROR: Version header has not been updated for release!";           \\r
-         exit 1;                                                                     \\r
-       fi;\r
-       @echo Done.\r
-\r
-# Validate the working branch - compile all documentation, demos/projects/examples and run build tests\r
-validate-branch:\r
-       make -C $(LUFA_ROOT) doxygen\r
-       make -C $(LUFA_ROOT) all\r
-       make -C $(LUFA_ROOT)/BuildTests all\r
-\r
-# Validate the working branch for general release, check for placeholder documentation then build and test everything\r
-validate-release: check-documentation-placeholders validate-branch\r
+#
+#             LUFA Library
+#     Copyright (C) Dean Camera, 2012.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#           www.lufa-lib.org
+#
+
+# Maintenance scripts not required by general LUFA users, used for project development purposes.
+
+
+# Path to the root of the LUFA tree
+LUFA_ROOT := ../
+
+all:
+
+# Update all Doxygen configuration files to the latest Doxygen version - force Markdown support to be disabled
+upgrade-doxygen:
+       @echo Upgrading Doxygen.conf files...
+       @for doxygen_conf in `find $(LUFA_ROOT) -name Doxygen.conf`; do                                       \
+         doxygen -u $$doxygen_conf;                                                                          \
+         sed "s/MARKDOWN_SUPPORT *= *YES/MARKDOWN_SUPPORT       = NO/1" $$doxygen_conf > $$doxygen_conf.new; \
+         sed "s/DISABLE_INDEX *= *NO/DISABLE_INDEX       = YES/1" $$doxygen_conf.new > $$doxygen_conf.new2;  \
+         mv -u $$doxygen_conf.new2 $$doxygen_conf;                                                           \
+         rm $$doxygen_conf.new;                                                                              \
+       done;
+       @echo Doxygen configuration update complete.
+
+# Generate AVR Studio 4 project files for each project from a template
+make-as4-projects:
+       @echo Creating AVR Studio 4 project files for Demos...
+       @for project_makefile in `find $(LUFA_ROOT)/Demos $(LUFA_ROOT)/Projects $(LUFA_ROOT)/Bootloaders -name makefile*`; do \
+         target_name=`grep "TARGET *=" $$project_makefile | cut -d'=' -f2 | sed 's/ //g'`; \
+         target_folder=`dirname $$project_makefile`;                                   \
+         as4_date=`date "+%-e-%b-%Y %-H:%-M:%-S"`;                                     \
+                                                                                       \
+         if ( test -n "$$target_name" ); then                                          \
+           echo Creating AS4 project for project $$target_name;                        \
+                                                                                       \
+           source_files="<OTHERFILE>`basename $$project_makefile`<\/OTHERFILE>";       \
+           gcc_source_files="";                                                        \
+           for c_source_file in `find $$target_folder -name *.c`; do                   \
+             source_filename=`basename $$c_source_file`;                               \
+                                                                                       \
+             source_files="$$source_files<SOURCEFILE>$$source_filename<\/SOURCEFILE>"; \
+             gcc_source_files="$$gcc_source_files<Name>$$source_filename<\/Name>";     \
+           done;                                                                       \
+           for c_header_file in `find $$target_folder -name *.h`; do                   \
+             source_filename=`basename $$c_header_file`;                               \
+                                                                                       \
+             source_files="$$source_files<HEADERFILE>$$source_filename<\/HEADERFILE>"; \
+             gcc_source_files="$$gcc_source_files<Name>$$source_filename<\/Name>";     \
+           done;                                                                       \
+           for assembly_file in `find $$target_folder -name *.S`; do                   \
+             source_filename=`basename $$assembly_file`;                               \
+                                                                                       \
+             source_files="$$source_files<OTHERFILE>$$source_filename<\/OTHERFILE>";   \
+             gcc_source_files="$$gcc_source_files<Name>$$source_filename<\/Name>";     \
+           done;                                                                       \
+                                                                                       \
+           sed "s/%TARGET%/$$target_name/g" AS4Template.aps > $$target_folder/$$target_name.aps.new;                                     \
+           sed "s/%CREATED%/$$as4_date/g" $$target_folder/$$target_name.aps.new > $$target_folder/$$target_name.aps.new2;                \
+           sed "s/%FILE_LIST%/$$source_files/g" $$target_folder/$$target_name.aps.new2 > $$target_folder/$$target_name.aps.new3;         \
+           sed "s/%GCC_FILE_LIST%/$$gcc_source_files/g" $$target_folder/$$target_name.aps.new3 > $$target_folder/$$target_name.aps.new4; \
+           mv $$target_folder/$$target_name.aps.new4 $$target_folder/$$target_name.aps;                                                  \
+           rm $$target_folder/$$target_name.aps.new $$target_folder/$$target_name.aps.new2 $$target_folder/$$target_name.aps.new3;       \
+         fi; \
+       done;
+       @echo AVR Studio 4 project generation complete.
+       
+# Check the working branch documentation, ensure no placeholder values
+check-documentation-placeholders:
+       @echo Checking for release suitability...
+       @if ( grep "XXXXXX" $(LUFA_ROOT)/LUFA/DoxygenPages/*.txt > /dev/null ;); then \
+         echo "  ERROR: Doxygen documentation has not been updated for release!";    \
+         exit 1;                                                                     \
+       fi;
+       @if ( grep "000000" $(LUFA_ROOT)/LUFA/Version.h > /dev/null ;); then          \
+         echo "  ERROR: Version header has not been updated for release!";           \
+         exit 1;                                                                     \
+       fi;
+       @echo Done.
+
+# Validate the working branch - compile all documentation, demos/projects/examples and run build tests
+validate-branch:
+       $(MAKE) -C $(LUFA_ROOT) doxygen
+       $(MAKE) -C $(LUFA_ROOT) all DEBUG_LEVEL=0
+       $(MAKE) -C $(LUFA_ROOT)/BuildTests all
+
+# Validate the working branch for general release, check for placeholder documentation then build and test everything
+validate-release: check-documentation-placeholders validate-branch
+
+
+.PHONY: all upgrade-doxygen make-as4-projects check-documentation-placeholders validate-branch
\ No newline at end of file
index f3381e1..9ad7c15 100644 (file)
@@ -38,6 +38,7 @@
 #include "AVRISPDescriptors.h"
 
 #if defined(RESET_TOGGLES_LIBUSB_COMPAT) || defined(__DOXYGEN__)
+       /** Indicates if an external reset has occurred and the compatibility mode needs to be altered */
        static bool AVRISP_NeedCompatibilitySwitch ATTR_NO_INIT;
 
        /** Current AVRISP data IN endpoint address. */
@@ -207,7 +208,8 @@ uint16_t AVRISP_GetDescriptor(const uint16_t wValue,
                        break;
                case DTYPE_Configuration:
                        *DescriptorMemorySpace = MEMSPACE_RAM;
-                       #if defined(RESET_TOGGLES_LIBUSB_COMPAT)                        
+                       #if defined(RESET_TOGGLES_LIBUSB_COMPAT)
+                               /* Update the configuration descriptor with the current endpoint address */
                                AVRISP_ConfigurationDescriptor.AVRISP_DataInEndpoint.EndpointAddress = AVRISP_CurrDataINEndpointAddress;
                        #endif
 
@@ -253,7 +255,7 @@ uint16_t AVRISP_GetDescriptor(const uint16_t wValue,
  */
 void CheckExternalReset(void)
 {      
-       /* If an external reset occured, we need to change compatibility mode */
+       /* If an external reset occurred, we need to change compatibility mode */
        AVRISP_NeedCompatibilitySwitch = (MCUSR == (1 << EXTRF));
 
        MCUSR = 0;
@@ -307,5 +309,7 @@ void UpdateCurrentCompatibilityMode(void)
                        }
                        break;
        }
+       
+       Delay_MS(500);
 }
 #endif
index 2779e08..a14515d 100644 (file)
@@ -41,6 +41,8 @@
 
                #include <LUFA/Drivers/USB/USB.h>
                #include <LUFA/Drivers/Board/LEDs.h>
+               
+               #include "Config/AppConfig.h"
 
        /* Preprocessor Checks: */
                #if defined(LIBUSB_DRIVER_COMPAT) && defined(RESET_TOGGLES_LIBUSB_COMPAT)
index b77c180..6bf74c8 100644 (file)
@@ -361,7 +361,7 @@ uint8_t ISPTarget_WaitForProgComplete(const uint8_t ProgrammingMode,
        }
 
        /* Program complete - reset timeout */
-       wdt_reset();
+       TimeoutTicksRemaining = COMMAND_TIMEOUT_TICKS;
 
        return ProgrammingStatus;
 }
index fd82996..ffc00b9 100644 (file)
@@ -18,7 +18,7 @@ OPTIMIZATION = s
 TARGET       = AVRISP-MKII
 SRC          = $(TARGET).c AVRISPDescriptors.c Lib/V2Protocol.c Lib/V2ProtocolParams.c Lib/ISP/ISPProtocol.c Lib/ISP/ISPTarget.c Lib/XPROG/XPROGProtocol.c \
                Lib/XPROG/XPROGTarget.c Lib/XPROG/XMEGANVM.c Lib/XPROG/TINYNVM.c $(LUFA_SRC_USB)
-LUFA_PATH    = ../../LUFA/
+LUFA_PATH    = ../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -26,9 +26,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index f7caaa7..81cd680 100644 (file)
@@ -1,78 +1,36 @@
 ;************************************************************
 ; Windows USB CDC ACM Setup File
 ; Copyright (c) 2000 Microsoft Corporation
-
+;************************************************************
 
 [Version]
 Signature="$Windows NT$"
 Class=Ports
 ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
 Provider=%MFGNAME%
-LayoutFile=layout.inf
-CatalogFile=%MFGFILENAME%.cat
-DriverVer=11/15/2007,5.1.2600.0
+DriverVer=7/1/2012,10.0.0.0
 
 [Manufacturer]
-%MFGNAME%=DeviceList, NTamd64
-
-[DestinationDirs]
-DefaultDestDir=12
-
-
-;------------------------------------------------------------------------------
-;  Windows 2000/XP/Vista-32bit Sections
-;------------------------------------------------------------------------------
-
-[DriverInstall.nt]
-include=mdmcpq.inf
-CopyFiles=DriverCopyFiles.nt
-AddReg=DriverInstall.nt.AddReg
-
-[DriverCopyFiles.nt]
-usbser.sys,,,0x20
-
-[DriverInstall.nt.AddReg]
-HKR,,DevLoader,,*ntkern
-HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
-HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
+%MFGNAME%=DeviceList, NTx86, NTamd64, NTia64
 
-[DriverInstall.nt.Services]
-AddService=usbser, 0x00000002, DriverService.nt
-
-[DriverService.nt]
-DisplayName=%SERVICE%
-ServiceType=1
-StartType=3
-ErrorControl=1
-ServiceBinary=%12%\%DRIVERFILENAME%.sys
-
-;------------------------------------------------------------------------------
-;  Vista-64bit Sections
-;------------------------------------------------------------------------------
-
-[DriverInstall.NTamd64]
-include=mdmcpq.inf
-CopyFiles=DriverCopyFiles.NTamd64
-AddReg=DriverInstall.NTamd64.AddReg
+[SourceDisksNames]
 
-[DriverCopyFiles.NTamd64]
-%DRIVERFILENAME%.sys,,,0x20
+[SourceDisksFiles]
 
-[DriverInstall.NTamd64.AddReg]
-HKR,,DevLoader,,*ntkern
-HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
-HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
+[DestinationDirs]
+DefaultDestDir=12
 
-[DriverInstall.NTamd64.Services]
-AddService=usbser, 0x00000002, DriverService.NTamd64
+[DriverInstall]
+Include=mdmcpq.inf
+CopyFiles=FakeModemCopyFileSection
+AddReg=DriverInstall.AddReg
 
-[DriverService.NTamd64]
-DisplayName=%SERVICE%
-ServiceType=1
-StartType=3
-ErrorControl=1
-ServiceBinary=%12%\%DRIVERFILENAME%.sys
+[DriverInstall.Services]
+Include=mdmcpq.inf
+AddService=usbser, 0x00000002, LowerFilter_Service_Inst
 
+[DriverInstall.AddReg]
+HKR,,EnumPropPages32,,"msports.dll,SerialPortPropPageProvider"
 
 ;------------------------------------------------------------------------------
 ;  Vendor and Product ID Definitions
@@ -83,14 +41,14 @@ ServiceBinary=%12%\%DRIVERFILENAME%.sys
 ; Note: One INF file can be used for multiple devices with different VID and PIDs.
 ; For each supported device, append ",USB\VID_xxxx&PID_yyyy" to the end of the line.
 ;------------------------------------------------------------------------------
-[SourceDisksFiles]
-[SourceDisksNames]
 [DeviceList]
 %DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_2060
 
 [DeviceList.NTamd64]
 %DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_2060
 
+[DeviceList.NTia64]
+%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_2060
 
 ;------------------------------------------------------------------------------
 ;  String Definitions
@@ -98,9 +56,5 @@ ServiceBinary=%12%\%DRIVERFILENAME%.sys
 ;Modify these strings to customize your device
 ;------------------------------------------------------------------------------
 [Strings]
-MFGFILENAME="CDC_vista"
-DRIVERFILENAME ="usbser"
 MFGNAME="http://www.lufa-lib.org"
-INSTDISK="LUFA Benito Programmer Driver Installer"
-DESCRIPTION="Communications Port"
-SERVICE="USB RS-232 Emulation Driver"
\ No newline at end of file
+DESCRIPTION="LUFA Benito Programmer"
\ No newline at end of file
index 174b23d..03419e5 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = Benito
 SRC          = $(TARGET).c Descriptors.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
-LUFA_PATH    = ../../LUFA/
+LUFA_PATH    = ../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 2ec6e8d..e1d2fab 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = HIDReportViewer
 SRC          = $(TARGET).c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) $(LUFA_SRC_SERIAL)
-LUFA_PATH    = ../../LUFA/
+LUFA_PATH    = ../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 3951c22..8890ba1 100644 (file)
@@ -1,78 +1,36 @@
 ;************************************************************
 ; Windows USB CDC ACM Setup File
 ; Copyright (c) 2000 Microsoft Corporation
-
+;************************************************************
 
 [Version]
 Signature="$Windows NT$"
 Class=Ports
 ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
 Provider=%MFGNAME%
-LayoutFile=layout.inf
-CatalogFile=%MFGFILENAME%.cat
-DriverVer=11/15/2007,5.1.2600.0
+DriverVer=7/1/2012,10.0.0.0
 
 [Manufacturer]
-%MFGNAME%=DeviceList, NTamd64
-
-[DestinationDirs]
-DefaultDestDir=12
-
-
-;------------------------------------------------------------------------------
-;  Windows 2000/XP/Vista-32bit Sections
-;------------------------------------------------------------------------------
-
-[DriverInstall.nt]
-include=mdmcpq.inf
-CopyFiles=DriverCopyFiles.nt
-AddReg=DriverInstall.nt.AddReg
-
-[DriverCopyFiles.nt]
-usbser.sys,,,0x20
-
-[DriverInstall.nt.AddReg]
-HKR,,DevLoader,,*ntkern
-HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
-HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
+%MFGNAME%=DeviceList, NTx86, NTamd64, NTia64
 
-[DriverInstall.nt.Services]
-AddService=usbser, 0x00000002, DriverService.nt
-
-[DriverService.nt]
-DisplayName=%SERVICE%
-ServiceType=1
-StartType=3
-ErrorControl=1
-ServiceBinary=%12%\%DRIVERFILENAME%.sys
-
-;------------------------------------------------------------------------------
-;  Vista-64bit Sections
-;------------------------------------------------------------------------------
-
-[DriverInstall.NTamd64]
-include=mdmcpq.inf
-CopyFiles=DriverCopyFiles.NTamd64
-AddReg=DriverInstall.NTamd64.AddReg
+[SourceDisksNames]
 
-[DriverCopyFiles.NTamd64]
-%DRIVERFILENAME%.sys,,,0x20
+[SourceDisksFiles]
 
-[DriverInstall.NTamd64.AddReg]
-HKR,,DevLoader,,*ntkern
-HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
-HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
+[DestinationDirs]
+DefaultDestDir=12
 
-[DriverInstall.NTamd64.Services]
-AddService=usbser, 0x00000002, DriverService.NTamd64
+[DriverInstall]
+Include=mdmcpq.inf
+CopyFiles=FakeModemCopyFileSection
+AddReg=DriverInstall.AddReg
 
-[DriverService.NTamd64]
-DisplayName=%SERVICE%
-ServiceType=1
-StartType=3
-ErrorControl=1
-ServiceBinary=%12%\%DRIVERFILENAME%.sys
+[DriverInstall.Services]
+Include=mdmcpq.inf
+AddService=usbser, 0x00000002, LowerFilter_Service_Inst
 
+[DriverInstall.AddReg]
+HKR,,EnumPropPages32,,"msports.dll,SerialPortPropPageProvider"
 
 ;------------------------------------------------------------------------------
 ;  Vendor and Product ID Definitions
@@ -83,14 +41,14 @@ ServiceBinary=%12%\%DRIVERFILENAME%.sys
 ; Note: One INF file can be used for multiple devices with different VID and PIDs.
 ; For each supported device, append ",USB\VID_xxxx&PID_yyyy" to the end of the line.
 ;------------------------------------------------------------------------------
-[SourceDisksFiles]
-[SourceDisksNames]
 [DeviceList]
 %DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_2044
 
 [DeviceList.NTamd64]
 %DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_2044
 
+[DeviceList.NTia64]
+%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_2044
 
 ;------------------------------------------------------------------------------
 ;  String Definitions
@@ -98,9 +56,5 @@ ServiceBinary=%12%\%DRIVERFILENAME%.sys
 ;Modify these strings to customize your device
 ;------------------------------------------------------------------------------
 [Strings]
-MFGFILENAME="CDC_vista"
-DRIVERFILENAME ="usbser"
 MFGNAME="http://www.lufa-lib.org"
-INSTDISK="LUFA CDC Driver Installer"
-DESCRIPTION="Communications Port"
-SERVICE="USB RS-232 Emulation Driver"
\ No newline at end of file
+DESCRIPTION="LUFA CDC-ACM Virtual Serial Port"
\ No newline at end of file
index 5839d6f..80836ff 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = LEDNotifier
 SRC          = $(TARGET).c Descriptors.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
-LUFA_PATH    = ../../LUFA/
+LUFA_PATH    = ../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index d3b5227..2bd8bb5 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = MIDIToneGenerator
 SRC          = $(TARGET).c Descriptors.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
-LUFA_PATH    = ../../LUFA/
+LUFA_PATH    = ../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 6a0dcd5..d037a66 100644 (file)
@@ -71,7 +71,7 @@
                } BitBuffer_t;
 
        /* Function Prototypes: */
-               /** Initialises or resets a given bit buffer, ready to store new bits.
+               /** Initializes or resets a given bit buffer, ready to store new bits.
                 *
                 *  \param[in,out] Buffer  Bit buffer to initialize
                 */
index 177e26b..43e3444 100644 (file)
@@ -77,7 +77,7 @@
 
        /* Public Interface - May be used in end-application: */
                /* Inline Functions: */
-                       /** Initialises the magnetic stripe card reader ports and pins so that the card reader
+                       /** Initializes the magnetic stripe card reader ports and pins so that the card reader
                         *  device can be controlled and read by the card reader driver. This must be called before
                         *  trying to read any of the card reader's status lines.
                         */
index ae16e71..246deaf 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = Magstripe
 SRC          = $(TARGET).c Descriptors.c Lib/CircularBitBuffer.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
-LUFA_PATH    = ../../LUFA/
+LUFA_PATH    = ../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index a87a757..e750784 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = MediaController
 SRC          = $(TARGET).c Descriptors.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
-LUFA_PATH    = ../../LUFA/
+LUFA_PATH    = ../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index aac9254..58bb8f3 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = MissileLauncher
 SRC          = $(TARGET).c ConfigDescriptor.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
-LUFA_PATH    = ../../LUFA/
+LUFA_PATH    = ../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index d4b40b7..02767ff 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = RelayBoard
 SRC          = $(TARGET).c Descriptors.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
-LUFA_PATH    = ../../LUFA/
+LUFA_PATH    = ../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 7bf989d..0ffe7c4 100644 (file)
@@ -104,7 +104,7 @@ static void HD44780_PowerUp4Bit(void)
        _delay_us(50);
 }
 
-void HD44780_Initialise(void)
+void HD44780_Initialize(void)
 {
        PORTD &= ~ALL_BITS;
        DDRD  |=  ALL_BITS;
index 680e69b..165e32a 100644 (file)
@@ -57,7 +57,7 @@
                #define CMD_DISPLAY_ON      0x0C
 
        /* Function Prototypes: */
-               void HD44780_Initialise(void);
+               void HD44780_Initialize(void);
                void HD44780_WriteData(const uint8_t c);
                void HD44780_WriteCommand(const uint8_t c);
 
index 952e2d4..b94c5a4 100644 (file)
@@ -148,7 +148,7 @@ void SetupHardware(void)
        USB_Init();
 
        /* Power up the HD44780 Interface */
-       HD44780_Initialise();
+       HD44780_Initialize();
        HD44780_WriteCommand(CMD_DISPLAY_ON);
        
        /* Start the flush timer so that overflows occur rapidly to push received bytes to the USB interface */
index 8058ee5..cb30b6b 100644 (file)
@@ -1,97 +1,97 @@
-/** \file\r
- *\r
- *  This file contains special DoxyGen information for the generation of the main page and other special\r
- *  documentation pages. It is not a project source file.\r
- */\r
-\r
-/** \mainpage Simon Foster's USB Serial to HD44780 LCD Project\r
- *\r
- *  \section Sec_Compat Project Compatibility:\r
- *\r
- *  The following list indicates what microcontrollers are compatible with this project.\r
- *\r
- *  \li AT90USB162\r
- *\r
- *  \section Sec_Info USB Information:\r
- *\r
- *  The following table gives a rundown of the USB utilization of this project.\r
- *\r
- *  <table>\r
- *   <tr>\r
- *    <td><b>USB Mode:</b></td>\r
- *    <td>Device</td>\r
- *   </tr>\r
- *   <tr>\r
- *    <td><b>USB Class:</b></td>\r
- *    <td>Communications Device Class (CDC)</td>\r
- *   </tr>\r
- *   <tr>\r
- *    <td><b>USB Subclass:</b></td>\r
- *    <td>Abstract Control Model (ACM)</td>\r
- *   </tr>\r
- *   <tr>\r
- *    <td><b>Relevant Standards:</b></td>\r
- *    <td>USBIF CDC Class Standard</td>\r
- *   </tr>\r
- *   <tr>\r
- *    <td><b>Supported USB Speeds:</b></td>\r
- *    <td>Full Speed Mode</td>\r
- *   </tr>\r
- *  </table>\r
- *\r
- *  \section Sec_Description Project Description:\r
- *\r
- *  Firmware for a USB Virtual Serial to HD44780 LCD controller project, by Simon Foster. This\r
- *  project connects a standard HD7780 compatible LCD controller to a PC via a virtual serial\r
- *  link, so that data supplied by the host can be written to the display. This project is\r
- *  designed to use the Minimum USB AVR board, however it can be modified to suit other hardware\r
- *  if desired.\r
- *\r
- *  LCD Datasheet:    http://www.sparkfun.com/datasheets/LCD/HD44780.pdf \n\r
- *  More Information: http://en.wikipedia.org/wiki/HD44780_Character_LCD \n\r
- *\r
- *  Below are the connections between the AVR Minimus board and LCD.\r
- *\r
- *  <table>\r
- *   <tr>\r
- *    <td><b>AVR Pin:</b></td>\r
- *    <td><b>HD44780 LCD Pin:</b></td>\r
- *   </tr>\r
- *   <tr>\r
- *    <td>VCC</td>\r
- *    <td>VCC</td>\r
- *   </tr>\r
- *   <tr>\r
- *    <td>GND</td>\r
- *    <td>GND</td>\r
- *   </tr>\r
- *   <tr>\r
- *    <td>PD0</td>\r
- *    <td>DB4</td>\r
- *   </tr>\r
- *   <tr>\r
- *    <td>PD1</td>\r
- *    <td>DB5</td>\r
- *   </tr>\r
- *   <tr>\r
- *    <td>PD2</td>\r
- *    <td>DB6</td>\r
- *   </tr>\r
- *   <tr>\r
- *    <td>PD3</td>\r
- *    <td>DB7</td>\r
- *   </tr>\r
- *   <tr>\r
- *    <td>PD4</td>\r
- *    <td>/RS</td>\r
- *   </tr>\r
- *   <tr>\r
- *    <td>GND</td>\r
- *    <td>/RW</td>\r
- *   </tr>\r
- *   <tr>\r
- *    <td>PD7</td>\r
- *    <td>/E</td>\r
- *   </tr>\r
- *  </table>\r
- */\r
+/** \file
+ *
+ *  This file contains special DoxyGen information for the generation of the main page and other special
+ *  documentation pages. It is not a project source file.
+ */
+
+/** \mainpage Simon Foster's USB Serial to HD44780 LCD Project
+ *
+ *  \section Sec_Compat Project Compatibility:
+ *
+ *  The following list indicates what microcontrollers are compatible with this project.
+ *
+ *  \li AT90USB162
+ *
+ *  \section Sec_Info USB Information:
+ *
+ *  The following table gives a rundown of the USB utilization of this project.
+ *
+ *  <table>
+ *   <tr>
+ *    <td><b>USB Mode:</b></td>
+ *    <td>Device</td>
+ *   </tr>
+ *   <tr>
+ *    <td><b>USB Class:</b></td>
+ *    <td>Communications Device Class (CDC)</td>
+ *   </tr>
+ *   <tr>
+ *    <td><b>USB Subclass:</b></td>
+ *    <td>Abstract Control Model (ACM)</td>
+ *   </tr>
+ *   <tr>
+ *    <td><b>Relevant Standards:</b></td>
+ *    <td>USBIF CDC Class Standard</td>
+ *   </tr>
+ *   <tr>
+ *    <td><b>Supported USB Speeds:</b></td>
+ *    <td>Full Speed Mode</td>
+ *   </tr>
+ *  </table>
+ *
+ *  \section Sec_Description Project Description:
+ *
+ *  Firmware for a USB Virtual Serial to HD44780 LCD controller project, by Simon Foster. This
+ *  project connects a standard HD7780 compatible LCD controller to a PC via a virtual serial
+ *  link, so that data supplied by the host can be written to the display. This project is
+ *  designed to use the Minimum USB AVR board, however it can be modified to suit other hardware
+ *  if desired.
+ *
+ *  LCD Datasheet:    http://www.sparkfun.com/datasheets/LCD/HD44780.pdf \n
+ *  More Information: http://en.wikipedia.org/wiki/HD44780_Character_LCD \n
+ *
+ *  Below are the connections between the AVR Minimus board and LCD.
+ *
+ *  <table>
+ *   <tr>
+ *    <td><b>AVR Pin:</b></td>
+ *    <td><b>HD44780 LCD Pin:</b></td>
+ *   </tr>
+ *   <tr>
+ *    <td>VCC</td>
+ *    <td>VCC</td>
+ *   </tr>
+ *   <tr>
+ *    <td>GND</td>
+ *    <td>GND</td>
+ *   </tr>
+ *   <tr>
+ *    <td>PD0</td>
+ *    <td>DB4</td>
+ *   </tr>
+ *   <tr>
+ *    <td>PD1</td>
+ *    <td>DB5</td>
+ *   </tr>
+ *   <tr>
+ *    <td>PD2</td>
+ *    <td>DB6</td>
+ *   </tr>
+ *   <tr>
+ *    <td>PD3</td>
+ *    <td>DB7</td>
+ *   </tr>
+ *   <tr>
+ *    <td>PD4</td>
+ *    <td>/RS</td>
+ *   </tr>
+ *   <tr>
+ *    <td>GND</td>
+ *    <td>/RW</td>
+ *   </tr>
+ *   <tr>
+ *    <td>PD7</td>
+ *    <td>/E</td>
+ *   </tr>
+ *  </table>
+ */
index dd48194..02f43da 100644 (file)
@@ -1,34 +1,36 @@
-#\r
-#             LUFA Library\r
-#     Copyright (C) Dean Camera, 2012.\r
-#\r
-#  dean [at] fourwalledcubicle [dot] com\r
-#           www.lufa-lib.org\r
-#\r
-# --------------------------------------\r
-#         LUFA Project Makefile.\r
-# --------------------------------------\r
-\r
-MCU          = at90usb162\r
-ARCH         = AVR8\r
-BOARD        = MINIMUS\r
-F_CPU        = 16000000\r
-F_USB        = $(F_CPU)\r
-OPTIMIZATION = s\r
-TARGET       = SerialToLCD\r
-SRC          = $(TARGET).c Descriptors.c Lib/HD44780.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)\r
-LUFA_PATH    = ../../LUFA/\r
-C_STANDARD   = gnu99\r
-CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/\r
-LD_FLAGS     =\r
-\r
-# Default target\r
-all:\r
-\r
-# Include LUFA build script makefiles\r
-include $(LUFA_PATH)/Build/lufa.core.in\r
-include $(LUFA_PATH)/Build/lufa.sources.in\r
-include $(LUFA_PATH)/Build/lufa.build.in\r
-include $(LUFA_PATH)/Build/lufa.doxygen.in\r
-include $(LUFA_PATH)/Build/lufa.dfu.in\r
-include $(LUFA_PATH)/Build/lufa.avrdude.in\r
+#
+#             LUFA Library
+#     Copyright (C) Dean Camera, 2012.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#           www.lufa-lib.org
+#
+# --------------------------------------
+#         LUFA Project Makefile.
+# --------------------------------------
+
+MCU          = at90usb162
+ARCH         = AVR8
+BOARD        = MINIMUS
+F_CPU        = 16000000
+F_USB        = $(F_CPU)
+OPTIMIZATION = s
+TARGET       = SerialToLCD
+SRC          = $(TARGET).c Descriptors.c Lib/HD44780.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
+LUFA_PATH    = ../../LUFA
+CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
+LD_FLAGS     =
+
+# Default target
+all:
+
+# Include LUFA build script makefiles
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 9023626..784ede4 100644 (file)
@@ -53,7 +53,7 @@
                #endif
 
        /* Defines: */
-               /** Total number of bytes of the storage medium, comprised of one or more dataflash ICs. */
+               /** Total number of bytes of the storage medium, comprised of one or more Dataflash ICs. */
                #define VIRTUAL_MEMORY_BYTES                ((uint32_t)DATAFLASH_PAGES * DATAFLASH_PAGE_SIZE * DATAFLASH_TOTALCHIPS)
 
                /** Block size of the device. This is kept at 512 to remain compatible with the OS despite the underlying
index 9ead42e..eb63bc6 100644 (file)
@@ -227,7 +227,7 @@ void EVENT_USB_Device_Connect(void)
 {
        LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
 
-       /* Close the log file so that the host has exclusive filesystem access */
+       /* Close the log file so that the host has exclusive file system access */
        CloseLogFile();
 }
 
index 7b4249c..58fac51 100644 (file)
             this.MaximizeBox = false;
             this.MinimizeBox = false;
             this.Name = "frmDataloggerSettings";
-            this.Text = "DataLogger";
+            this.Text = "Datalogger";
             this.Load += new System.EventHandler(this.frmDataloggerSettings_Load);
             ((System.ComponentModel.ISupportInitialize)(this.nudLogInterval)).EndInit();
             this.ResumeLayout(false);
index 98e6006..01e9fb6 100644 (file)
@@ -85,7 +85,7 @@ namespace Project1HostApp
 
             if (ConnectionHandle == null)
             {
-                MessageBox.Show("Error: Cannot connect to DataLogger device.");
+                MessageBox.Show("Error: Cannot connect to Datalogger device.");
                 return;
             }
 
@@ -115,7 +115,7 @@ namespace Project1HostApp
 
             if (ConnectionHandle == null)
             {
-                MessageBox.Show("Error: Cannot connect to DataLogger device.");
+                MessageBox.Show("Error: Cannot connect to Datalogger device.");
                 return;
             }
 
index c6fd450..a4d0ab1 100644 (file)
@@ -9,7 +9,7 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyCompany("Dean Camera")]
-[assembly: AssemblyProduct("Temp DataLogger HostApp")]
+[assembly: AssemblyProduct("Temp Datalogger HostApp")]
 [assembly: AssemblyCopyright("Copyright © Dean Camera 2011")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
index 860ff23..40a754a 100644 (file)
@@ -18,7 +18,7 @@ OPTIMIZATION = s
 TARGET       = TempDataLogger
 SRC          = $(TARGET).c Descriptors.c Lib/DataflashManager.c Lib/DS1307.c Lib/SCSI.c Lib/FATFs/diskio.c Lib/FATFs/ff.c \
                $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) $(LUFA_SRC_SERIAL) $(LUFA_SRC_TWI) $(LUFA_SRC_TEMPERATURE)
-LUFA_PATH    = ../../LUFA/
+LUFA_PATH    = ../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -26,9 +26,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 9907783..e03ccc7 100644 (file)
@@ -1,78 +1,36 @@
 ;************************************************************
 ; Windows USB CDC ACM Setup File
 ; Copyright (c) 2000 Microsoft Corporation
-
+;************************************************************
 
 [Version]
 Signature="$Windows NT$"
 Class=Ports
 ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
 Provider=%MFGNAME%
-LayoutFile=layout.inf
-CatalogFile=%MFGFILENAME%.cat
-DriverVer=11/15/2007,5.1.2600.0
+DriverVer=7/1/2012,10.0.0.0
 
 [Manufacturer]
-%MFGNAME%=DeviceList, NTamd64
-
-[DestinationDirs]
-DefaultDestDir=12
-
-
-;------------------------------------------------------------------------------
-;  Windows 2000/XP/Vista-32bit Sections
-;------------------------------------------------------------------------------
-
-[DriverInstall.nt]
-include=mdmcpq.inf
-CopyFiles=DriverCopyFiles.nt
-AddReg=DriverInstall.nt.AddReg
-
-[DriverCopyFiles.nt]
-usbser.sys,,,0x20
-
-[DriverInstall.nt.AddReg]
-HKR,,DevLoader,,*ntkern
-HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
-HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
+%MFGNAME%=DeviceList, NTx86, NTamd64, NTia64
 
-[DriverInstall.nt.Services]
-AddService=usbser, 0x00000002, DriverService.nt
-
-[DriverService.nt]
-DisplayName=%SERVICE%
-ServiceType=1
-StartType=3
-ErrorControl=1
-ServiceBinary=%12%\%DRIVERFILENAME%.sys
-
-;------------------------------------------------------------------------------
-;  Vista-64bit Sections
-;------------------------------------------------------------------------------
-
-[DriverInstall.NTamd64]
-include=mdmcpq.inf
-CopyFiles=DriverCopyFiles.NTamd64
-AddReg=DriverInstall.NTamd64.AddReg
+[SourceDisksNames]
 
-[DriverCopyFiles.NTamd64]
-%DRIVERFILENAME%.sys,,,0x20
+[SourceDisksFiles]
 
-[DriverInstall.NTamd64.AddReg]
-HKR,,DevLoader,,*ntkern
-HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
-HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
+[DestinationDirs]
+DefaultDestDir=12
 
-[DriverInstall.NTamd64.Services]
-AddService=usbser, 0x00000002, DriverService.NTamd64
+[DriverInstall]
+Include=mdmcpq.inf
+CopyFiles=FakeModemCopyFileSection
+AddReg=DriverInstall.AddReg
 
-[DriverService.NTamd64]
-DisplayName=%SERVICE%
-ServiceType=1
-StartType=3
-ErrorControl=1
-ServiceBinary=%12%\%DRIVERFILENAME%.sys
+[DriverInstall.Services]
+Include=mdmcpq.inf
+AddService=usbser, 0x00000002, LowerFilter_Service_Inst
 
+[DriverInstall.AddReg]
+HKR,,EnumPropPages32,,"msports.dll,SerialPortPropPageProvider"
 
 ;------------------------------------------------------------------------------
 ;  Vendor and Product ID Definitions
@@ -83,14 +41,14 @@ ServiceBinary=%12%\%DRIVERFILENAME%.sys
 ; Note: One INF file can be used for multiple devices with different VID and PIDs.
 ; For each supported device, append ",USB\VID_xxxx&PID_yyyy" to the end of the line.
 ;------------------------------------------------------------------------------
-[SourceDisksFiles]
-[SourceDisksNames]
 [DeviceList]
 %DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_204B
 
 [DeviceList.NTamd64]
 %DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_204B
 
+[DeviceList.NTia64]
+%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_204B
 
 ;------------------------------------------------------------------------------
 ;  String Definitions
@@ -98,9 +56,5 @@ ServiceBinary=%12%\%DRIVERFILENAME%.sys
 ;Modify these strings to customize your device
 ;------------------------------------------------------------------------------
 [Strings]
-MFGFILENAME="CDC_vista"
-DRIVERFILENAME ="usbser"
 MFGNAME="http://www.lufa-lib.org"
-INSTDISK="LUFA USB-RS232 CDC Driver Installer"
-DESCRIPTION="Communications Port"
-SERVICE="USB RS-232 Emulation Driver"
\ No newline at end of file
+DESCRIPTION="LUFA USB to Serial"
\ No newline at end of file
index 4f8cb37..37cb235 100644 (file)
@@ -17,7 +17,7 @@ F_USB        = $(F_CPU)
 OPTIMIZATION = s
 TARGET       = USBtoSerial
 SRC          = $(TARGET).c Descriptors.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
-LUFA_PATH    = ../../LUFA/
+LUFA_PATH    = ../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
 LD_FLAGS     =
 
@@ -25,9 +25,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index af76f7f..95a0119 100644 (file)
@@ -51,7 +51,7 @@
                #endif
 
        /* Defines: */
-               /** Total number of bytes of the storage medium, comprised of one or more dataflash ICs. */
+               /** Total number of bytes of the storage medium, comprised of one or more Dataflash ICs. */
                #define VIRTUAL_MEMORY_BYTES                ((uint32_t)DATAFLASH_PAGES * DATAFLASH_PAGE_SIZE * DATAFLASH_TOTALCHIPS)
 
                /** Block size of the device. This is kept at 512 to remain compatible with the OS despite the underlying
index 94171ad..dccefdd 100644 (file)
@@ -53,7 +53,7 @@
  * statement. While it would be possible to break the uip_process()
  * function into many smaller functions, this would increase the code
  * size because of the overhead of parameter passing and the fact that
- * the optimiser would not be as efficient.
+ * the optimizer would not be as efficient.
  *
  * The principle is that we have a small buffer, called the uip_buf,
  * in which the device driver puts an incoming packet. The TCP/IP
@@ -330,7 +330,7 @@ upper_layer_chksum(u8_t proto)
   upper_layer_len = (((u16_t)(BUF->len[0]) << 8) + BUF->len[1]) - UIP_IPH_LEN;
 #endif /* UIP_CONF_IPV6 */
 
-  /* First sum pseudoheader. */
+  /* First sum pseudo-header. */
 
   /* IP protocol and length fields. This addition cannot carry. */
   sum = upper_layer_len + proto;
index 6ab89b5..28c6606 100644 (file)
@@ -20,7 +20,7 @@ SRC          = $(TARGET).c Descriptors.c USBDeviceMode.c USBHostMode.c Lib/SCSI.
                Lib/uIPManagement.c Lib/DHCPCommon.c Lib/DHCPClientApp.c Lib/DHCPServerApp.c Lib/HTTPServerApp.c \
                Lib/TELNETServerApp.c Lib/uip/uip.c Lib/uip/uip_arp.c Lib/uip/timer.c Lib/uip/clock.c \
                Lib/uip/uip-split.c Lib/FATFs/diskio.c Lib/FATFs/ff.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
-LUFA_PATH    = ../../LUFA/
+LUFA_PATH    = ../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/ -ILib/uip/ -ILib/FATFs/
 LD_FLAGS     =
 
@@ -28,9 +28,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index 9907783..0e3e7d9 100644 (file)
@@ -1,78 +1,36 @@
 ;************************************************************
 ; Windows USB CDC ACM Setup File
 ; Copyright (c) 2000 Microsoft Corporation
-
+;************************************************************
 
 [Version]
 Signature="$Windows NT$"
 Class=Ports
 ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
 Provider=%MFGNAME%
-LayoutFile=layout.inf
-CatalogFile=%MFGFILENAME%.cat
-DriverVer=11/15/2007,5.1.2600.0
+DriverVer=7/1/2012,10.0.0.0
 
 [Manufacturer]
-%MFGNAME%=DeviceList, NTamd64
-
-[DestinationDirs]
-DefaultDestDir=12
-
-
-;------------------------------------------------------------------------------
-;  Windows 2000/XP/Vista-32bit Sections
-;------------------------------------------------------------------------------
-
-[DriverInstall.nt]
-include=mdmcpq.inf
-CopyFiles=DriverCopyFiles.nt
-AddReg=DriverInstall.nt.AddReg
-
-[DriverCopyFiles.nt]
-usbser.sys,,,0x20
-
-[DriverInstall.nt.AddReg]
-HKR,,DevLoader,,*ntkern
-HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
-HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
+%MFGNAME%=DeviceList, NTx86, NTamd64, NTia64
 
-[DriverInstall.nt.Services]
-AddService=usbser, 0x00000002, DriverService.nt
-
-[DriverService.nt]
-DisplayName=%SERVICE%
-ServiceType=1
-StartType=3
-ErrorControl=1
-ServiceBinary=%12%\%DRIVERFILENAME%.sys
-
-;------------------------------------------------------------------------------
-;  Vista-64bit Sections
-;------------------------------------------------------------------------------
-
-[DriverInstall.NTamd64]
-include=mdmcpq.inf
-CopyFiles=DriverCopyFiles.NTamd64
-AddReg=DriverInstall.NTamd64.AddReg
+[SourceDisksNames]
 
-[DriverCopyFiles.NTamd64]
-%DRIVERFILENAME%.sys,,,0x20
+[SourceDisksFiles]
 
-[DriverInstall.NTamd64.AddReg]
-HKR,,DevLoader,,*ntkern
-HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
-HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
+[DestinationDirs]
+DefaultDestDir=12
 
-[DriverInstall.NTamd64.Services]
-AddService=usbser, 0x00000002, DriverService.NTamd64
+[DriverInstall]
+Include=mdmcpq.inf
+CopyFiles=FakeModemCopyFileSection
+AddReg=DriverInstall.AddReg
 
-[DriverService.NTamd64]
-DisplayName=%SERVICE%
-ServiceType=1
-StartType=3
-ErrorControl=1
-ServiceBinary=%12%\%DRIVERFILENAME%.sys
+[DriverInstall.Services]
+Include=mdmcpq.inf
+AddService=usbser, 0x00000002, LowerFilter_Service_Inst
 
+[DriverInstall.AddReg]
+HKR,,EnumPropPages32,,"msports.dll,SerialPortPropPageProvider"
 
 ;------------------------------------------------------------------------------
 ;  Vendor and Product ID Definitions
@@ -83,14 +41,14 @@ ServiceBinary=%12%\%DRIVERFILENAME%.sys
 ; Note: One INF file can be used for multiple devices with different VID and PIDs.
 ; For each supported device, append ",USB\VID_xxxx&PID_yyyy" to the end of the line.
 ;------------------------------------------------------------------------------
-[SourceDisksFiles]
-[SourceDisksNames]
 [DeviceList]
 %DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_204B
 
 [DeviceList.NTamd64]
 %DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_204B
 
+[DeviceList.NTia64]
+%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_204B
 
 ;------------------------------------------------------------------------------
 ;  String Definitions
@@ -98,9 +56,5 @@ ServiceBinary=%12%\%DRIVERFILENAME%.sys
 ;Modify these strings to customize your device
 ;------------------------------------------------------------------------------
 [Strings]
-MFGFILENAME="CDC_vista"
-DRIVERFILENAME ="usbser"
 MFGNAME="http://www.lufa-lib.org"
-INSTDISK="LUFA USB-RS232 CDC Driver Installer"
-DESCRIPTION="Communications Port"
-SERVICE="USB RS-232 Emulation Driver"
\ No newline at end of file
+DESCRIPTION="LUFA XPLAIN Bridge"
\ No newline at end of file
index 7607054..f51ada5 100644 (file)
@@ -9,7 +9,7 @@
 #         LUFA Project Makefile.
 # --------------------------------------
 
-AVRISP_PATH  = ../AVRISP-MKII/
+AVRISP_PATH  = ../AVRISP-MKII
 
 MCU          = at90usb1287
 ARCH         = AVR8
@@ -22,8 +22,7 @@ SRC          = $(TARGET).c Lib/SoftUART.c USARTDescriptors.c $(AVRISP_PATH)/AVRI
                $(AVRISP_PATH)/Lib/V2ProtocolParams.c $(AVRISP_PATH)/Lib/ISP/ISPProtocol.c $(AVRISP_PATH)/Lib/ISP/ISPTarget.c \
                $(AVRISP_PATH)/Lib/XPROG/XPROGProtocol.c $(AVRISP_PATH)/Lib/XPROG/XPROGTarget.c $(AVRISP_PATH)/Lib/XPROG/XMEGANVM.c \
                $(AVRISP_PATH)/Lib/XPROG/TINYNVM.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
-
-LUFA_PATH    = ../../LUFA/
+LUFA_PATH    = ../../LUFA
 CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/ -I$(AVRISP_PATH)
 LD_FLAGS     =
 
@@ -31,9 +30,12 @@ LD_FLAGS     =
 all:
 
 # Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.dfu.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_dfu.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
index d507e76..dd0ea2e 100644 (file)
 # custom LUFA library build options are reflected in the compiled
 # code.
 
-all:
-       $(MAKE) -s -C AVRISP-MKII clean all
-       $(MAKE) -s -C Benito clean all
-       $(MAKE) -s -C HIDReportViewer clean all
-       $(MAKE) -s -C LEDNotifier clean all
-       $(MAKE) -s -C Magstripe clean all
-       $(MAKE) -s -C MediaController clean all
-       $(MAKE) -s -C MIDIToneGenerator clean all
-       $(MAKE) -s -C MissileLauncher clean all
-       $(MAKE) -s -C RelayBoard clean all
-       $(MAKE) -s -C SerialToLCD clean all
-       $(MAKE) -s -C TempDataLogger clean all
-       $(MAKE) -s -C USBtoSerial clean all
-       $(MAKE) -s -C Webserver clean all
-       $(MAKE) -s -C XPLAINBridge clean all
-
-%:
-       $(MAKE) -s -C AVRISP-MKII $@
-       $(MAKE) -s -C Benito $@
-       $(MAKE) -s -C HIDReportViewer $@        
-       $(MAKE) -s -C LEDNotifier $@
-       $(MAKE) -s -C Magstripe $@
-       $(MAKE) -s -C MediaController $@
-       $(MAKE) -s -C MIDIToneGenerator $@      
-       $(MAKE) -s -C MissileLauncher $@
-       $(MAKE) -s -C RelayBoard $@
-       $(MAKE) -s -C SerialToLCD $@
-       $(MAKE) -s -C TempDataLogger $@
-       $(MAKE) -s -C USBtoSerial $@
-       $(MAKE) -s -C Webserver $@
-       $(MAKE) -s -C XPLAINBridge $@
+PROJECT_DIRECTORIES := $(shell ls -d */)
+
+# This makefile is potentially infinitely recursive if something really bad
+# happens when determining the set of project directories - hard-abort if
+# more than 10 levels deep to avoid angry emails.
+ifeq ($(MAKELEVEL), 10)
+   $(error EMERGENCY ABORT: INFINITE RECURSION DETECTED)
+endif
+
+# Need to special-case building without a per-project object directory
+ifeq ($(OBJDIR),)
+   # If no target specified, force "clean all" and disallow parallel build   
+   ifeq ($(MAKECMDGOALS),)
+      MAKECMDGOALS := clean all
+      .NOTPARALLEL:
+   endif
+
+   # If one of the targets is to build, force "clean" beforehand and disallow parallel build   
+   ifneq ($(findstring all, $(MAKECMDGOALS)),)
+      MAKECMDGOALS := clean $(MAKECMDGOALS)
+      .NOTPARALLEL:
+   endif
+endif
+
+%: $(PROJECT_DIRECTORIES)
+       @echo . > /dev/null
+
+$(PROJECT_DIRECTORIES):
+       @$(MAKE) -C $@ $(MAKECMDGOALS)
+    
+.PHONY: $(PROJECT_DIRECTORIES)
 
index 9eb14a2..80a5c81 100644 (file)
@@ -13,6 +13,9 @@
                LUFA is donation supported. To support LUFA,
              please donate at http://www.lufa-lib.org/donate
 
+               Released under a modified MIT license - see
+                  LUFA/License.txt for license details.
+
                 For Commercial Licensing information, see
                      http://www.lufa-lib.org/license
 
index d533f25..a134dc0 100644 (file)
--- a/makefile
+++ b/makefile
@@ -9,17 +9,18 @@
 # Makefile to build the LUFA library, projects and demos.
 
 # Call with "make all" to rebuild everything, "make clean" to clean everything,
-# "make clean_list" to remove all intermediatary files but preserve any binaries,
-# "make doxygen" to document everything with Doxygen (if installed) and
-# "make clean_doxygen" to remove generated Doxygen documentation from everything.
+# "make mostlyclean" to remove all intermediatary files but preserve any binaries,
+# "make doxygen" to document everything with Doxygen (if installed). Call
+# "make help" for additional target build information within a specific project.
 
 all:
+
 %:
        @echo Executing \"make $@\" on all LUFA library elements.
        @echo
-       $(MAKE) -C LUFA $@ -s
-       $(MAKE) -C Demos $@ -s
-       $(MAKE) -C Projects $@ -s
-       $(MAKE) -C Bootloaders $@ -s
+       $(MAKE) -C LUFA $@ 
+       $(MAKE) -C Demos $@
+       $(MAKE) -C Projects $@
+       $(MAKE) -C Bootloaders $@
        @echo
        @echo LUFA \"make $@\" operation complete.