Permalink
Browse files

Add LUFA-111009-BETA tag.

git-svn-id: http://lufa-lib.googlecode.com/svn/tags/LUFA-111009-BETA@1929 d5102386-fcda-11dd-9fdb-3debd5008f28
  • Loading branch information...
Dean Dean
Dean authored and Dean committed Sep 21, 2011
1 parent 44e3311 commit ffc451fbd9631b4e0a45bce36dda3e34facee2de
Showing with 28,862 additions and 28,134 deletions.
  1. +3 −3 Bootloaders/CDC/Descriptors.c
  2. +164 −164 Bootloaders/HID/BootloaderHID.c
  3. +61 −61 Bootloaders/HID/BootloaderHID.h
  4. +88 −88 Bootloaders/HID/BootloaderHID.txt
  5. +186 −186 Bootloaders/HID/Descriptors.c
  6. +70 −70 Bootloaders/HID/Descriptors.h
  7. +1,566 −1,566 Bootloaders/HID/Doxygen.conf
  8. +712 −712 Bootloaders/HID/makefile
  9. +1 −1 Demos/Device/ClassDriver/AudioInput/AudioInput.c
  10. +1 −1 Demos/Device/ClassDriver/AudioInput/Descriptors.c
  11. +1 −1 Demos/Device/ClassDriver/AudioOutput/AudioOutput.c
  12. +1 −1 Demos/Device/ClassDriver/AudioOutput/Descriptors.c
  13. +6 −6 Demos/Device/ClassDriver/DualVirtualSerial/Descriptors.c
  14. +2 −2 Demos/Device/ClassDriver/GenericHID/Descriptors.c
  15. +26 −18 Demos/Device/ClassDriver/GenericHID/GenericHID.c
  16. +3 −2 Demos/Device/ClassDriver/Joystick/Descriptors.c
  17. +1 −1 Demos/Device/ClassDriver/Keyboard/Descriptors.c
  18. +2 −2 Demos/Device/ClassDriver/KeyboardMouse/Descriptors.c
  19. +1 −1 Demos/Device/ClassDriver/KeyboardMouseMultiReport/Descriptors.c
  20. +2 −2 Demos/Device/ClassDriver/MIDI/Descriptors.c
  21. +2 −2 Demos/Device/ClassDriver/MassStorage/Descriptors.c
  22. +1 −1 Demos/Device/ClassDriver/MassStorage/Lib/DataflashManager.c
  23. +3 −3 Demos/Device/ClassDriver/MassStorageKeyboard/Descriptors.c
  24. +1 −1 Demos/Device/ClassDriver/MassStorageKeyboard/Lib/DataflashManager.c
  25. +1 −1 Demos/Device/ClassDriver/Mouse/Descriptors.c
  26. +3 −3 Demos/Device/ClassDriver/RNDISEthernet/Descriptors.c
  27. +8 −8 Demos/Device/ClassDriver/RNDISEthernet/Lib/Webserver.c
  28. +3 −3 Demos/Device/ClassDriver/VirtualSerial/Descriptors.c
  29. +321 −321 Demos/Device/ClassDriver/VirtualSerialMassStorage/Descriptors.c
  30. +104 −104 Demos/Device/ClassDriver/VirtualSerialMassStorage/Descriptors.h
  31. +1,565 −1,565 Demos/Device/ClassDriver/VirtualSerialMassStorage/Doxygen.conf
  32. +105 −105 Demos/Device/ClassDriver/VirtualSerialMassStorage/LUFA VirtualSerialMassStorage.inf
  33. +534 −534 Demos/Device/ClassDriver/VirtualSerialMassStorage/Lib/DataflashManager.c
  34. +85 −85 Demos/Device/ClassDriver/VirtualSerialMassStorage/Lib/DataflashManager.h
  35. +347 −347 Demos/Device/ClassDriver/VirtualSerialMassStorage/Lib/SCSI.c
  36. +88 −88 Demos/Device/ClassDriver/VirtualSerialMassStorage/Lib/SCSI.h
  37. +213 −213 Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.c
  38. +91 −91 Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.h
  39. +86 −86 Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.txt
  40. +727 −727 Demos/Device/ClassDriver/VirtualSerialMassStorage/makefile
  41. +4 −4 Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.c
  42. +2 −2 Demos/Device/Incomplete/Sideshow/Descriptors.c
  43. +3 −3 Demos/Device/Incomplete/TestAndMeasurement/Descriptors.c
  44. +466 −441 Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.c
  45. +5 −9 Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.h
  46. +2 −2 Demos/Device/LowLevel/AudioInput/AudioInput.c
  47. +1 −1 Demos/Device/LowLevel/AudioInput/Descriptors.c
  48. +2 −2 Demos/Device/LowLevel/AudioOutput/AudioOutput.c
  49. +1 −1 Demos/Device/LowLevel/AudioOutput/Descriptors.c
  50. +6 −6 Demos/Device/LowLevel/DualVirtualSerial/Descriptors.c
  51. +3 −3 Demos/Device/LowLevel/GenericHID/Descriptors.c
  52. +24 −10 Demos/Device/LowLevel/GenericHID/GenericHID.c
  53. +1 −1 Demos/Device/LowLevel/Joystick/Descriptors.c
  54. +2 −2 Demos/Device/LowLevel/Keyboard/Descriptors.c
  55. +3 −3 Demos/Device/LowLevel/KeyboardMouse/Descriptors.c
  56. +2 −2 Demos/Device/LowLevel/MIDI/Descriptors.c
  57. +2 −2 Demos/Device/LowLevel/MassStorage/Descriptors.c
  58. +1 −1 Demos/Device/LowLevel/MassStorage/Lib/DataflashManager.c
  59. +0 −2 Demos/Device/LowLevel/MassStorage/MassStorage.h
  60. +1 −1 Demos/Device/LowLevel/Mouse/Descriptors.c
  61. +3 −3 Demos/Device/LowLevel/RNDISEthernet/Descriptors.c
  62. +2 −2 Demos/Device/LowLevel/RNDISEthernet/Lib/RNDIS.c
  63. +8 −8 Demos/Device/LowLevel/RNDISEthernet/Lib/Webserver.c
  64. +3 −3 Demos/Device/LowLevel/VirtualSerial/Descriptors.c
  65. +1 −1 Demos/DualRole/ClassDriver/MouseHostDevice/Descriptors.c
  66. +1 −1 Demos/Host/Incomplete/AndroidAccessoryHost/ConfigDescriptor.c
  67. +83 −83 Demos/Host/Incomplete/AndroidAccessoryHost/Lib/AndroidAccessoryCommands.c
  68. +74 −74 Demos/Host/Incomplete/AndroidAccessoryHost/Lib/AndroidAccessoryCommands.h
  69. +1 −0 Demos/Host/Incomplete/AndroidAccessoryHost/makefile
  70. +1 −1 Demos/Host/Incomplete/BluetoothHost/ConfigDescriptor.c
  71. +1 −1 Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothHCICommands.c
  72. +1 −1 Demos/Host/LowLevel/AudioInputHost/ConfigDescriptor.c
  73. +1 −1 Demos/Host/LowLevel/AudioOutputHost/ConfigDescriptor.c
  74. +1 −1 Demos/Host/LowLevel/GenericHIDHost/ConfigDescriptor.c
  75. +1 −1 Demos/Host/LowLevel/JoystickHostWithParser/ConfigDescriptor.c
  76. +1 −1 Demos/Host/LowLevel/KeyboardHost/ConfigDescriptor.c
  77. +1 −1 Demos/Host/LowLevel/KeyboardHostWithParser/ConfigDescriptor.c
  78. +1 −1 Demos/Host/LowLevel/MIDIHost/ConfigDescriptor.c
  79. +1 −1 Demos/Host/LowLevel/MassStorageHost/ConfigDescriptor.c
  80. +22 −4 Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.c
  81. +1 −1 Demos/Host/LowLevel/MouseHost/ConfigDescriptor.c
  82. +1 −1 Demos/Host/LowLevel/MouseHostWithParser/ConfigDescriptor.c
  83. +1 −1 Demos/Host/LowLevel/PrinterHost/ConfigDescriptor.c
  84. +1 −1 Demos/Host/LowLevel/RNDISEthernetHost/ConfigDescriptor.c
  85. +1 −1 Demos/Host/LowLevel/StillImageHost/ConfigDescriptor.c
  86. +2 −2 Demos/Host/LowLevel/StillImageHost/Lib/StillImageCommands.c
  87. +1 −1 Demos/Host/LowLevel/VirtualSerialHost/ConfigDescriptor.c
  88. +1 −1 LUFA.pnproj
  89. +124 −122 LUFA/CodeTemplates/LUFAConfig.h
  90. +713 −713 LUFA/CodeTemplates/makefile_template.avr8
  91. +486 −489 LUFA/CodeTemplates/makefile_template.uc3
  92. +705 −707 LUFA/CodeTemplates/makefile_template.xmega
  93. +143 −0 LUFA/Common/ArchitectureSpecific.h
  94. +84 −84 LUFA/Common/Architectures.h
  95. +5 −73 LUFA/Common/Common.h
  96. +98 −98 LUFA/Common/CompilerSpecific.h
  97. +482 −476 LUFA/Common/Endianness.h
  98. +2 −2 LUFA/Doxygen.conf
  99. +124 −124 LUFA/Drivers/Board/AVR8/ADAFRUITU4/LEDs.h
  100. +126 −126 LUFA/Drivers/Board/AVR8/BLACKCAT/LEDs.h
  101. +126 −126 LUFA/Drivers/Board/AVR8/MAXIMUS/LEDs.h
  102. +92 −92 LUFA/Drivers/Board/AVR8/MICROSIN162/Buttons.h
  103. +124 −124 LUFA/Drivers/Board/AVR8/MICROSIN162/LEDs.h
  104. +91 −91 LUFA/Drivers/Board/AVR8/MINIMUS/Buttons.h
  105. +126 −126 LUFA/Drivers/Board/AVR8/MINIMUS/LEDs.h
  106. +124 −124 LUFA/Drivers/Board/AVR8/SPARKFUN8U2/LEDs.h
  107. +92 −92 LUFA/Drivers/Board/AVR8/TUL/Buttons.h
  108. +124 −124 LUFA/Drivers/Board/AVR8/TUL/LEDs.h
  109. +103 −103 LUFA/Drivers/Board/UC3/EVK1100/Buttons.h
  110. +110 −110 LUFA/Drivers/Board/UC3/EVK1100/Joystick.h
  111. +153 −153 LUFA/Drivers/Board/UC3/EVK1100/LEDs.h
  112. +100 −100 LUFA/Drivers/Board/UC3/EVK1101/Buttons.h
  113. +116 −116 LUFA/Drivers/Board/UC3/EVK1101/Joystick.h
  114. +140 −140 LUFA/Drivers/Board/UC3/EVK1101/LEDs.h
  115. +97 −97 LUFA/Drivers/Board/UC3/EVK1104/Buttons.h
  116. +154 −154 LUFA/Drivers/Board/UC3/EVK1104/LEDs.h
  117. +99 −99 LUFA/Drivers/Misc/AT45DB321C.h
  118. +115 −109 LUFA/Drivers/Misc/AT45DB642D.h
  119. +303 −303 LUFA/Drivers/Misc/RingBuffer.h
  120. +16 −8 LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.h
  121. +49 −14 LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.c
  122. +35 −41 LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.h
  123. +22 −20 LUFA/Drivers/USB/Class/Common/HID.h
  124. +9 −12 LUFA/Drivers/USB/Class/Common/HIDParser.c
  125. +6 −2 LUFA/Drivers/USB/Class/Common/HIDParser.h
  126. +2 −2 LUFA/Drivers/USB/Class/Device/Audio.c
  127. +0 −12 LUFA/Drivers/USB/Class/Device/MassStorage.c
  128. +1 −1 LUFA/Drivers/USB/Class/Host/Audio.c
  129. +6 −8 LUFA/Drivers/USB/Class/Host/Audio.h
  130. +1 −1 LUFA/Drivers/USB/Class/Host/CDC.c
  131. +2 −2 LUFA/Drivers/USB/Class/Host/HID.c
  132. +1 −1 LUFA/Drivers/USB/Class/Host/MIDI.c
  133. +19 −6 LUFA/Drivers/USB/Class/Host/MassStorage.c
  134. +2 −1 LUFA/Drivers/USB/Class/Host/MassStorage.h
  135. +1 −1 LUFA/Drivers/USB/Class/Host/Printer.c
  136. +1 −1 LUFA/Drivers/USB/Class/Host/RNDIS.c
  137. +3 −3 LUFA/Drivers/USB/Class/Host/StillImage.c
  138. +3 −0 LUFA/Drivers/USB/Core/AVR8/EndpointStream_AVR8.c
  139. +4 −17 LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.h
  140. +0 −11 LUFA/Drivers/USB/Core/AVR8/Host_AVR8.h
  141. +1 −1 LUFA/Drivers/USB/Core/AVR8/PipeStream_AVR8.c
  142. +1 −1 LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.h
  143. +4 −4 LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_RW.c
  144. +0 −27 LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h
  145. +0 −5 LUFA/Drivers/USB/Core/ConfigDescriptor.h
  146. +159 −159 LUFA/Drivers/USB/Core/Device.h
  147. +118 −123 LUFA/Drivers/USB/Core/Endpoint.h
  148. +124 −124 LUFA/Drivers/USB/Core/EndpointStream.h
  149. +139 −139 LUFA/Drivers/USB/Core/Host.h
  150. +1 −1 LUFA/Drivers/USB/Core/HostStandardReq.c
  151. +13 −1 LUFA/Drivers/USB/Core/HostStandardReq.h
  152. +80 −80 LUFA/Drivers/USB/Core/OTG.h
  153. +136 −136 LUFA/Drivers/USB/Core/Pipe.h
  154. +100 −100 LUFA/Drivers/USB/Core/PipeStream.h
  155. +2 −16 LUFA/Drivers/USB/Core/StdDescriptors.h
  156. +47 −47 LUFA/Drivers/USB/Core/UC3/Device_UC3.c
  157. +259 −259 LUFA/Drivers/USB/Core/UC3/Device_UC3.h
  158. +3 −0 LUFA/Drivers/USB/Core/UC3/EndpointStream_UC3.c
  159. +174 −141 LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.c
  160. +863 −876 LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.h
  161. +292 −292 LUFA/Drivers/USB/Core/UC3/Host_UC3.c
  162. +361 −372 LUFA/Drivers/USB/Core/UC3/Host_UC3.h
  163. +1 −1 LUFA/Drivers/USB/Core/UC3/PipeStream_UC3.c
  164. +177 −138 LUFA/Drivers/USB/Core/UC3/Pipe_UC3.c
  165. +928 −928 LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h
  166. +4 −4 LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_RW.c
  167. +215 −215 LUFA/Drivers/USB/Core/UC3/USBController_UC3.c
  168. +356 −383 LUFA/Drivers/USB/Core/UC3/USBController_UC3.h
  169. +225 −202 LUFA/Drivers/USB/Core/UC3/USBInterrupt_UC3.c
  170. +368 −353 LUFA/Drivers/USB/Core/UC3/USBInterrupt_UC3.h
  171. +133 −82 LUFA/Drivers/USB/Core/USBController.h
  172. +73 −73 LUFA/Drivers/USB/Core/USBInterrupt.h
  173. +44 −44 LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.c
  174. +238 −239 LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.h
  175. +3 −0 LUFA/Drivers/USB/Core/XMEGA/EndpointStream_XMEGA.c
  176. +101 −67 LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.c
  177. +750 −773 LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.h
  178. +37 −37 LUFA/Drivers/USB/Core/XMEGA/Host_XMEGA.c
  179. +37 −37 LUFA/Drivers/USB/Core/XMEGA/PipeStream_XMEGA.c
  180. +37 −37 LUFA/Drivers/USB/Core/XMEGA/Pipe_XMEGA.c
  181. +83 −83 LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_R.c
  182. +92 −92 LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_W.c
  183. +88 −88 LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_RW.c
  184. +169 −143 LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.c
  185. +292 −294 LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.h
  186. +100 −45 LUFA/Drivers/USB/Core/XMEGA/USBInterrupt_XMEGA.c
  187. +166 −112 LUFA/Drivers/USB/Core/XMEGA/USBInterrupt_XMEGA.h
  188. +22 −1 LUFA/ManPages/ChangeLog.txt
  189. +2 −2 LUFA/ManPages/CompileTimeTokens.txt
  190. +298 −56 LUFA/ManPages/DeviceSupport.txt
  191. +4 −0 LUFA/ManPages/FutureChanges.txt
  192. +14 −11 LUFA/ManPages/LUFAPoweredProjects.txt
  193. +1 −2 LUFA/ManPages/LibraryResources.txt
  194. +28 −48 LUFA/ManPages/MigrationInformation.txt
  195. +324 −319 LUFA/Platform/UC3/ClockManagement.h
  196. +125 −125 LUFA/Platform/UC3/Exception.S
  197. +62 −62 LUFA/Platform/UC3/InterruptManagement.c
  198. +162 −162 LUFA/Platform/UC3/InterruptManagement.h
  199. +298 −222 LUFA/Platform/XMEGA/ClockManagement.h
  200. +2 −2 LUFA/Version.h
  201. +8 −1 Projects/AVRISP-MKII/AVRISP-MKII.txt
  202. +2 −2 Projects/AVRISP-MKII/Descriptors.c
  203. +2 −2 Projects/AVRISP-MKII/Lib/ISP/ISPTarget.c
  204. +1 −1 Projects/AVRISP-MKII/Lib/V2Protocol.c
  205. +9 −0 Projects/AVRISP-MKII/Lib/V2Protocol.h
  206. +1 −0 Projects/AVRISP-MKII/makefile
  207. +3 −3 Projects/Benito/Descriptors.c
  208. +1,565 −1,565 Projects/HIDReportViewer/Doxygen.conf
  209. +320 −320 Projects/HIDReportViewer/HIDReportViewer.c
  210. +87 −87 Projects/HIDReportViewer/HIDReportViewer.h
  211. +64 −64 Projects/HIDReportViewer/HIDReportViewer.txt
  212. +722 −722 Projects/HIDReportViewer/makefile
  213. +2 −2 Projects/Incomplete/StandaloneProgrammer/Descriptors.c
  214. +1 −1 Projects/Incomplete/StandaloneProgrammer/Lib/DataflashManager.c
  215. +3 −3 Projects/LEDNotifier/Descriptors.c
  216. +329 −329 Projects/MIDIToneGenerator/Descriptors.c
  217. +87 −87 Projects/MIDIToneGenerator/Descriptors.h
  218. +1,565 −1,565 Projects/MIDIToneGenerator/Doxygen.conf
  219. +245 −245 Projects/MIDIToneGenerator/MIDIToneGenerator.c
  220. +108 −108 Projects/MIDIToneGenerator/MIDIToneGenerator.h
  221. +73 −73 Projects/MIDIToneGenerator/MIDIToneGenerator.txt
  222. +727 −727 Projects/MIDIToneGenerator/makefile
  223. +1 −1 Projects/Magstripe/Descriptors.c
  224. +1 −1 Projects/MediaController/Descriptors.c
  225. +2 −2 Projects/MissileLauncher/ConfigDescriptor.c
  226. +3 −3 Projects/TempDataLogger/Descriptors.c
  227. +1 −1 Projects/TempDataLogger/Lib/DataflashManager.c
  228. +2 −2 Projects/TempDataLogger/TempDataLogger.c
  229. +1 −4 Projects/TempDataLogger/TempDataLogger.h
  230. +3 −3 Projects/USBtoSerial/Descriptors.c
  231. +1 −1 Projects/USBtoSerial/USBtoSerial.c
  232. +5 −5 Projects/Webserver/Descriptors.c
  233. +51 −51 Projects/Webserver/LUFA Webserver RNDIS.inf
  234. +265 −265 Projects/Webserver/Lib/DHCPServerApp.c
  235. +63 −63 Projects/Webserver/Lib/DHCPServerApp.h
  236. +1 −1 Projects/Webserver/Lib/DataflashManager.c
  237. +2 −2 Projects/XPLAINBridge/AVRISPDescriptors.c
  238. +3 −3 Projects/XPLAINBridge/USARTDescriptors.c
@@ -131,7 +131,7 @@ const USB_Descriptor_Configuration_t ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_NOTIFICATION_EPNUM),
+ .EndpointAddress = (ENDPOINT_DIR_IN | CDC_NOTIFICATION_EPNUM),
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_NOTIFICATION_EPSIZE,
.PollingIntervalMS = 0xFF
@@ -157,7 +157,7 @@ const USB_Descriptor_Configuration_t ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | CDC_RX_EPNUM),
+ .EndpointAddress = (ENDPOINT_DIR_OUT | CDC_RX_EPNUM),
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
.PollingIntervalMS = 0x01
@@ -167,7 +167,7 @@ const USB_Descriptor_Configuration_t ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_TX_EPNUM),
+ .EndpointAddress = (ENDPOINT_DIR_IN | CDC_TX_EPNUM),
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
.PollingIntervalMS = 0x01
@@ -1,164 +1,164 @@
-/*
- LUFA Library
- Copyright (C) Dean Camera, 2011.
-
- dean [at] fourwalledcubicle [dot] com
- www.lufa-lib.org
-*/
-
-/*
- Copyright 2011 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 HID class bootloader. This file contains the complete bootloader logic.
- */
-
-#include "BootloaderHID.h"
-
-/** Flag to indicate if the bootloader should be running, or should exit and allow the application code to run
- * via a soft reset. When cleared, the bootloader will abort, the USB interface will shut down and the application
- * started via a forced watchdog reset.
- */
-static bool RunBootloader = true;
-
-/** Main program entry point. This routine configures the hardware required by the bootloader, then continuously
- * runs the bootloader processing routine until instructed to soft-exit.
- */
-int main(void)
-{
- /* Setup hardware required for the bootloader */
- SetupHardware();
-
- /* Enable global interrupts so that the USB stack can function */
- sei();
-
- while (RunBootloader)
- USB_USBTask();
-
- /* Disconnect from the host - USB interface will be reset later along with the AVR */
- USB_Detach();
-
- /* Enable the watchdog and force a timeout to reset the AVR */
- wdt_enable(WDTO_250MS);
-
- for (;;);
-}
-
-/** Configures all hardware required for the bootloader. */
-void SetupHardware(void)
-{
- /* Disable watchdog if enabled by bootloader/fuses */
- MCUSR &= ~(1 << WDRF);
- wdt_disable();
-
- /* Relocate the interrupt vector table to the bootloader section */
- MCUCR = (1 << IVCE);
- MCUCR = (1 << IVSEL);
-
- /* Initialize USB subsystem */
- USB_Init();
-}
-
-/** Event handler for the USB_ConfigurationChanged event. This configures the device's endpoints ready
- * to relay data to and from the attached USB host.
- */
-void EVENT_USB_Device_ConfigurationChanged(void)
-{
- /* Setup HID Report Endpoint */
- Endpoint_ConfigureEndpoint(HID_IN_EPNUM, EP_TYPE_INTERRUPT,
- ENDPOINT_DIR_IN, HID_IN_EPSIZE,
- ENDPOINT_BANK_SINGLE);
-}
-
-/** Event handler for the USB_ControlRequest event. This is used to catch and process control requests sent to
- * the device from the USB host before passing along unhandled control requests to the library for processing
- * internally.
- */
-void EVENT_USB_Device_ControlRequest(void)
-{
- /* Ignore any requests that aren't directed to the HID interface */
- if ((USB_ControlRequest.bmRequestType & (CONTROL_REQTYPE_TYPE | CONTROL_REQTYPE_RECIPIENT)) !=
- (REQTYPE_CLASS | REQREC_INTERFACE))
- {
- return;
- }
-
- /* Process HID specific control requests */
- switch (USB_ControlRequest.bRequest)
- {
- case HID_REQ_SetReport:
- Endpoint_ClearSETUP();
-
- /* Wait until the command has been sent by the host */
- while (!(Endpoint_IsOUTReceived()));
-
- /* Read in the write destination address */
- #if (FLASHEND > 0xFFFF)
- uint32_t PageAddress = ((uint32_t)Endpoint_Read_16_LE() << 8);
- #else
- uint16_t PageAddress = Endpoint_Read_16_LE();
- #endif
-
- /* Check if the command is a program page command, or a start application command */
- #if (FLASHEND > 0xFFFF)
- if ((uint16_t)(PageAddress >> 8) == COMMAND_STARTAPPLICATION)
- #else
- if (PageAddress == COMMAND_STARTAPPLICATION)
- #endif
- {
- RunBootloader = false;
- }
- else
- {
- /* Erase the given FLASH page, ready to be programmed */
- boot_page_erase(PageAddress);
- boot_spm_busy_wait();
-
- /* Write each of the FLASH page's bytes in sequence */
- for (uint8_t PageWord = 0; PageWord < (SPM_PAGESIZE / 2); PageWord++)
- {
- /* Check if endpoint is empty - if so clear it and wait until ready for next packet */
- if (!(Endpoint_BytesInEndpoint()))
- {
- Endpoint_ClearOUT();
- while (!(Endpoint_IsOUTReceived()));
- }
-
- /* Write the next data word to the FLASH page */
- boot_page_fill(PageAddress + ((uint16_t)PageWord << 1), Endpoint_Read_16_LE());
- }
-
- /* Write the filled FLASH page to memory */
- boot_page_write(PageAddress);
- boot_spm_busy_wait();
-
- /* Re-enable RWW section */
- boot_rww_enable();
- }
-
- Endpoint_ClearOUT();
-
- Endpoint_ClearStatusStage();
- break;
- }
-}
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2011.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2011 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 HID class bootloader. This file contains the complete bootloader logic.
+ */
+
+#include "BootloaderHID.h"
+
+/** Flag to indicate if the bootloader should be running, or should exit and allow the application code to run
+ * via a soft reset. When cleared, the bootloader will abort, the USB interface will shut down and the application
+ * started via a forced watchdog reset.
+ */
+static bool RunBootloader = true;
+
+/** Main program entry point. This routine configures the hardware required by the bootloader, then continuously
+ * runs the bootloader processing routine until instructed to soft-exit.
+ */
+int main(void)
+{
+ /* Setup hardware required for the bootloader */
+ SetupHardware();
+
+ /* Enable global interrupts so that the USB stack can function */
+ sei();
+
+ while (RunBootloader)
+ USB_USBTask();
+
+ /* Disconnect from the host - USB interface will be reset later along with the AVR */
+ USB_Detach();
+
+ /* Enable the watchdog and force a timeout to reset the AVR */
+ wdt_enable(WDTO_250MS);
+
+ for (;;);
+}
+
+/** Configures all hardware required for the bootloader. */
+void SetupHardware(void)
+{
+ /* Disable watchdog if enabled by bootloader/fuses */
+ MCUSR &= ~(1 << WDRF);
+ wdt_disable();
+
+ /* Relocate the interrupt vector table to the bootloader section */
+ MCUCR = (1 << IVCE);
+ MCUCR = (1 << IVSEL);
+
+ /* Initialize USB subsystem */
+ USB_Init();
+}
+
+/** Event handler for the USB_ConfigurationChanged event. This configures the device's endpoints ready
+ * to relay data to and from the attached USB host.
+ */
+void EVENT_USB_Device_ConfigurationChanged(void)
+{
+ /* Setup HID Report Endpoint */
+ Endpoint_ConfigureEndpoint(HID_IN_EPNUM, EP_TYPE_INTERRUPT,
+ ENDPOINT_DIR_IN, HID_IN_EPSIZE,
+ ENDPOINT_BANK_SINGLE);
+}
+
+/** Event handler for the USB_ControlRequest event. This is used to catch and process control requests sent to
+ * the device from the USB host before passing along unhandled control requests to the library for processing
+ * internally.
+ */
+void EVENT_USB_Device_ControlRequest(void)
+{
+ /* Ignore any requests that aren't directed to the HID interface */
+ if ((USB_ControlRequest.bmRequestType & (CONTROL_REQTYPE_TYPE | CONTROL_REQTYPE_RECIPIENT)) !=
+ (REQTYPE_CLASS | REQREC_INTERFACE))
+ {
+ return;
+ }
+
+ /* Process HID specific control requests */
+ switch (USB_ControlRequest.bRequest)
+ {
+ case HID_REQ_SetReport:
+ Endpoint_ClearSETUP();
+
+ /* Wait until the command has been sent by the host */
+ while (!(Endpoint_IsOUTReceived()));
+
+ /* Read in the write destination address */
+ #if (FLASHEND > 0xFFFF)
+ uint32_t PageAddress = ((uint32_t)Endpoint_Read_16_LE() << 8);
+ #else
+ uint16_t PageAddress = Endpoint_Read_16_LE();
+ #endif
+
+ /* Check if the command is a program page command, or a start application command */
+ #if (FLASHEND > 0xFFFF)
+ if ((uint16_t)(PageAddress >> 8) == COMMAND_STARTAPPLICATION)
+ #else
+ if (PageAddress == COMMAND_STARTAPPLICATION)
+ #endif
+ {
+ RunBootloader = false;
+ }
+ else
+ {
+ /* Erase the given FLASH page, ready to be programmed */
+ boot_page_erase(PageAddress);
+ boot_spm_busy_wait();
+
+ /* Write each of the FLASH page's bytes in sequence */
+ for (uint8_t PageWord = 0; PageWord < (SPM_PAGESIZE / 2); PageWord++)
+ {
+ /* Check if endpoint is empty - if so clear it and wait until ready for next packet */
+ if (!(Endpoint_BytesInEndpoint()))
+ {
+ Endpoint_ClearOUT();
+ while (!(Endpoint_IsOUTReceived()));
+ }
+
+ /* Write the next data word to the FLASH page */
+ boot_page_fill(PageAddress + ((uint16_t)PageWord << 1), Endpoint_Read_16_LE());
+ }
+
+ /* Write the filled FLASH page to memory */
+ boot_page_write(PageAddress);
+ boot_spm_busy_wait();
+
+ /* Re-enable RWW section */
+ boot_rww_enable();
+ }
+
+ Endpoint_ClearOUT();
+
+ Endpoint_ClearStatusStage();
+ break;
+ }
+}
Oops, something went wrong.

0 comments on commit ffc451f

Please sign in to comment.