ChangeLog.txt 140 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663
  1. /** \file
  2. *
  3. * This file contains special DoxyGen information for the generation of the main page and other special
  4. * documentation pages. It is not a project source file.
  5. */
  6. /** \page Page_ChangeLog Project Changelog
  7. *
  8. * \section Sec_ChangeLogXXXXXX Version XXXXXX
  9. * <b>Fixed:</b>
  10. * - Core:
  11. * - Fixed DeviceUsesOUTPipe flag not being set correctly in the HID host class driver (thanks to Wolfgang Schnerring)
  12. * - Fixed CDC Device class driver's internal serial stream created by \ref CDC_Device_CreateStream not returning the written
  13. * character after a successful write (thanks to NicoHood)
  14. * - Library Applications:
  15. * - Fixed bootloaders not disabling global interrupts during erase and write operations (thanks to Zoltan)
  16. * - Fixed bootloaders accepting flash writes to the bootloader region (thanks to NicoHood)
  17. *
  18. * \section Sec_ChangeLog170418 Version 170418
  19. * <b>New:</b>
  20. * - Core:
  21. * - Added support for the Pololu A-Star Micro board (thanks to Joh Schneider)
  22. * - Added new \c LUFA_VERSION_RELEASE_TYPE macro to the library version header, to determine release type (thanks to NicoHood)
  23. *
  24. * <b>Fixed:</b>
  25. * - Core:
  26. * - The CALLBACK_USB_GetDescriptor() callback function into the user application erroneously had a uint8_t type for the wIndex
  27. * parameter, instead of uint16_t (thanks to Matlo)
  28. * - Fixed broken USE_RAM_DESCRIPTORS compile time option when the FIXED_NUM_CONFIGURATIONS compile time option is not enabled
  29. * in a user application (thanks to Matlo)
  30. * - Fixed missing \c va_end() calls in the HID bootloader CLI app which could cause portability issues
  31. * - Fixed void pointer arithmetic in the \c Serial_SendData() functions for AVR8 and XMEGA architectures
  32. * - Fixed void pointer arithmetic in the low level and class driver RNDIS demo protocol decoders
  33. * - Fixed low level RNDIS demo incorrectly setting the RNDIS state when a null packet filter was requested
  34. * - Fixed missing entries in several project's Atmel Studio integration files, such as driver INF files
  35. * - Fixed invalid endpoint indexes causing memory corruption in device Clear/Set Feature standard requests (thanks to Peter Popovec)
  36. * - Fixed incorrect serialization in USB_SetHIDReportItemInfo() function (thanks to e-chip)
  37. *
  38. * <b>Changed:</b>
  39. * - Added signed alternative libUSB driver for the AVRISP-MKII clone project, to support Atmel Studio 7 (thanks to Atmel)
  40. * - Removed no longer required LIBUSB_DRIVER_COMPAT and RESET_TOGGLES_LIBUSB_COMPAT configuration options from the AVRISP-MKII
  41. * clone project, as the new libUSB driver works for AVRDUDE and Atmel Studio 7 under Windows
  42. * - Replaced the LUFA build system with its (compatible) successor, DMBS (Dean's Makefile Build System)
  43. * - Removed obsolete library TAR export and associated documentation
  44. * - Fixed incorrect HID_DESCRIPTOR_KEYBOARD() macro definition (thanks to Eric Tang)
  45. *
  46. * \section Sec_ChangeLog151115 Version 151115
  47. * <b>New:</b>
  48. * - Added support for the Atmel Xplained-MINI series of development kits
  49. * - Added new PROGMEM variant send functions to the CDC class device driver (thanks to Stefan Hellermann)
  50. * - Added new PROGMEM variant send functions to the CDC class host driver
  51. * - Added additional Arduino Uno board definitions for the main processor reset (thanks to NicoHood)
  52. * - Added modified DocBook transforms to generate Atmel Studio 6/7 internal help documentation (thanks to Morten Engelhardt Olsen)
  53. *
  54. * <b>Changed:</b>
  55. * - Core:
  56. * - The TWI peripheral driver's TWI_WritePacket() and TWI_ReadPacket() functions now takes a 16-bit Length rather than an 8-bit
  57. * length, for longer transfers
  58. * - Library Applications:
  59. * - The CDC, DFU, Mass Storage and Printer class bootloaders will no longer run the user application if the application reset
  60. * vector is blank (thanks to Alex Kazik)
  61. * - The CDC, DFU and Printer class bootloaders are now compatible with the original Atmel XPLAIN and Arduino Leonardo boards
  62. * - The CDC, DFU, Mass Storage and Printer class bootloaders are not compatible with devices with the BOOTRST fuse set and will
  63. * exit automatically unless an external reset was the last reset cause (thanks to Alex Kazik)
  64. * - Added missing force-inline attribute to the endianness utility functions (thanks to Stefan Hellermann)
  65. * - Updated the DFU build system module to use updated EEPROM programming command arguments for dfu-programmer 0.6.2 or newer
  66. *
  67. * <b>Fixed:</b>
  68. * - Fixed broken XMEGA serial stream driver due to missing USART base pointer parameter (thanks to William Patterson)
  69. * - Fixed incorrect signature reported in the CDC/DFU bootloaders for the AT90USB82 (thanks to NicoHood)
  70. * - Fixed broken RNDIS demos on Linux machines whose DHCP hosts require a Lease Time option (thanks to Stefan Hellermann)
  71. * - Fixed broken LEDs_Disable() implementation for the Arduino Uno board (thanks to NicoHood)
  72. * - Fixed missing bounds checks and off-by-one in the DFU bootloader signature bytes (thanks to Reuti)
  73. *
  74. * \section Sec_ChangeLog140928 Version 140928
  75. * <b>New:</b>
  76. * - Core:
  77. * - Updated the BUILD build system module to add a new COMPILER_PATH optional variable
  78. * - Added Serial_IsSendReady() and Serial_IsSendComplete() functions to the Serial hardware peripheral driver
  79. * - Added support for the Arduino Yun board (ATMEGA32U4 co-processor)
  80. * - Added support for the Arduino Micro board (thanks to Zoltán Szőke)
  81. * - Library Applications:
  82. * - Added new Dual MIDI class driver device demo
  83. *
  84. * <b>Changed:</b>
  85. * - Core:
  86. * - The RNDIS device class driver now takes a user-supplied buffer and buffer length for the internal RNDIS
  87. * message management (thanks to Peter Mc Shane)
  88. *
  89. * <b>Fixed:</b>
  90. * - Core:
  91. * - Fixed device class driver pipe configuration routines returning success with a partially constructed instance
  92. * when a pipe configuration failed (thanks to Helge Suess)
  93. * - Fixed incorrect XMEGA DFLL reference frequency (thanks to Martin Aakerberg)
  94. * - Fixed possible infinite loop in the control endpoint stream write function (thanks to Clayton Knight)
  95. * - Fixed missing HID report ID prefix on HID class driver GetReport request responses (thanks to Bert van Hall)
  96. * - Fixed incorrect XMEGA USB controller clock division factory for non-Full Speed operation (thanks to Bert van Hall)
  97. * - Fixed the LUFA build system to prevent incorrect code from being generated in newer toolchains when building for larger
  98. * FLASH memory devices (thanks to demultiplexer)
  99. * - Fixed missing parenthesis in the MIDI_EVENT() macro which could cause incorrect results (thanks to hexwab)
  100. * - Fixed mixed capitalization of TWI in the XMEGA TWI driver causing compilation failures (thanks to Jacob Schloss)
  101. * - Fixed broken AVR8 USART-SPI peripheral driver (thanks to Phil Zakielarz)
  102. * - Library Applications:
  103. * - Fixed spurious 0xFE USART byte sent in the USBtoSerial project when the baud rate is changed (thanks to Carl Kjeldsen)
  104. * - Fixed blocking USART reads causing low throughput on slow baud rates in the USBtoSerial project (thanks to Nevada Smith)
  105. * - Fixed USART reception overrun corrupting the internal buffers in the USBtoSerial project (thanks to Nevada Smith)
  106. * - Fixed broken LowLevel Audio Out demo sampling frequency configuration (thanks to Torsten Duwe)
  107. *
  108. * \section Sec_ChangeLog140302 Version 140302
  109. * <b>New:</b>
  110. * - Library Applications:
  111. * - Added new Bulk Vendor low level device demo
  112. * - Added new libUSB host Python and NodeJS application examples for the Class driver GenericHID demo (thanks to Laszlo Monda)
  113. * - Added new AVR8 USB option to keep 3.3V regulator enabled (thanks to Michael Hanselmann)
  114. * - Added new USB_STRING_DESCRIPTOR() and USB_STRING_DESCRIPTOR_ARRAY() convenience macros (thanks to Laszlo Monda)
  115. *
  116. * <b>Changed:</b>
  117. * - Library Applications:
  118. * - Refactored out USB interface IDs in the demo applications into enums (thanks to Laszlo Monda)
  119. * - AVRISP-MKII Clone Project PDI/TPI frequency increased from 250KHz to 2MHz as it is now stable
  120. * - Increased TPI/PDI handshake delay to 100us from 1us to support targets with high amounts of capacitance on their
  121. * /RESET lines (thanks to Paul Duke)
  122. * - Changed the VERSION_BCD() macro to accept the major/minor/revision values as separate parameters
  123. *
  124. * <b>Fixed:</b>
  125. * - Core:
  126. * - Fixed MIDI device class driver MIDI_Device_ReceiveEventPacket() for the XMEGA architecture
  127. * - Library Applications:
  128. * - Fixed incorrect signature bytes returned in the DFU bootloader
  129. *
  130. * \section Sec_ChangeLog130901 Version 130901
  131. * <b>New:</b>
  132. * - Core:
  133. * - Added additional MIDI command definitions to the MIDI class driver (thanks to Daniel Dreibrodt)
  134. * - Added new CONCAT() and CONCAT_EXPANDED() convenience macros
  135. * - Added new Printer Device Class driver
  136. * - Added support for the XMEGA C3 Xplained board
  137. * - Added support for the U2S board (thanks to megal0maniac)
  138. * - Added TWI Master driver for the XMEGA architecture (thanks to Michael Janssen)
  139. * - Library Applications:
  140. * - Added new Printer class bootloader
  141. * - Added new Mass Storage class bootloader
  142. * - Added XMEGA support for class driver device demos (where applicable)
  143. * - Added Python host application example for the Generic HID class driver device demo
  144. * - Added Python alternative host application for the HID class bootloader
  145. *
  146. * <b>Changed:</b>
  147. * - Core:
  148. * - Updated the BUILD build system module to produce binary BIN files in addition to Intel HEX files
  149. * - Updated the Android Accessory Class to accept version 2 protocol devices (with version 1 functionality)
  150. * - All board drivers now implement dummy functions and constants when BOARD is set to NONE
  151. * - Added missing LEDs to the XMEGA A3BU Xplained board LED driver (thanks to Michael Janssen)
  152. * - Changed board Dataflash drivers to automatically configure the appropriate SPI interface for the selected board
  153. * - Library Applications:
  154. * - Re-added Set Control Line State request handling to the CDC class bootloader to prevent issues with the .NET serial
  155. * class (thanks to Erik Lins)
  156. * - TemperatureDataLogger project dummy RTC mode now tracks real time (thanks to David Lazarus)
  157. *
  158. * <b>Fixed:</b>
  159. * - Core:
  160. * - Fixed Low Speed USB devices broken when using the library HID Class driver (thanks to Michael)
  161. * - Fixed possible register corruption in USB Host mode on AVR8 devices when ORDERED_EP_CONFIG is used (thanks to Martin Aakerberg)
  162. * - Fixed Pipe_GetBoundEndpointAddress() returning invalid endpoint directions on AVR8 architecture devices (thanks to decerri)
  163. * under some circumstances
  164. * - Fixed incorrect USB device state set when a suspended LUFA device is woken while addressed but not configured (thanks to Balaji Krishnan)
  165. * - Fixed broken USART SPI driver for the AVR8 architecture due to incorrect initialization
  166. * - Fixed re-enumeration issue of XMEGA architecture targets (thanks to Jaroslav Jedlinsky)
  167. * - Fixed error receiving PIMA events via the Still Image Host class driver
  168. * - Library Applications:
  169. * - Added handler for SCSI_CMD_START_STOP_UNIT in demos using the Mass Storage class, to prevent ejection errors on *nix systems due to an
  170. * unknown SCSI command
  171. * - Fixed incorrect HID report descriptor generated for 16-bit axis ranges by the HID_DESCRIPTOR_MOUSE() and HID_DESCRIPTOR_JOYSTICK()
  172. * macros (thanks to Armory)
  173. * - Fixed incorrect HID report descriptor generated for button multiples of 8 by the HID_DESCRIPTOR_MOUSE() and HID_DESCRIPTOR_JOYSTICK()
  174. * macros
  175. * - Fixed race condition in the DFU class bootloader causing failed device reprogramming in some circumstances (thanks to Luis Mendes)
  176. * - Fixed incorrect time/date configuration data order in the TempDataLogger host application (thanks to David Lazarus)
  177. *
  178. * \section Sec_ChangeLog130303 Version 130303
  179. * <b>New:</b>
  180. * - Core:
  181. * - Added support for the Arduino Leonardo board
  182. * - Added support for the Atmel UC3-A3 Xplained board
  183. * - Added support for the Xevelabs USB2AX revision 3.1 board
  184. * - Added support for the Dimex Stange-ISP board (thanks to Gerhard Wesser)
  185. * - Added new \c doxygen_upgrade and \c doxygen_create targets to the DOXYGEN build system module
  186. * - Added new Board Hardware Information board driver
  187. * - Library Applications:
  188. * - Added a different device serial number when the AVRISP-MKII Clone project is in libUSB compatibility mode, so that
  189. * both the libUSB and Jungo drivers can be installed at the same time without having to use a filter driver
  190. *
  191. * <b>Changed:</b>
  192. * - Core:
  193. * - Added workaround for broken VBUS detection on AVR8 devices when a bootloader starts the application
  194. * via a software jump without first turning off the OTG pad (thanks to Simon Inns)
  195. * - Library Applications:
  196. * - Increased throughput in the USBtoSerial project now that data transmission is non-blocking (thanks to Joseph Lacerte)
  197. * - Updated bootloader makefiles to remove dependency on the \c bc command line calculator tool
  198. * - Updated AVRISP-MKII Clone Programmer project so that the SCK clock period is saved in EEPROM (thanks to Gerhard Wesser)
  199. * - Changed all *_SendByte() function prototypes to accept a void pointer for the input buffer (thanks to Simon Kuppers)
  200. *
  201. * <b>Fixed:</b>
  202. * - Core:
  203. * - Fixed incorrectly issuing STALL response to unsupported control request SETUP packets, rather than in the data/status stage
  204. * - Fixed inverted LEDs_GetLEDs() function implementation for the Benito, Minimus and Arduino UNO boards
  205. * - Fixed missing Windows 32-bit compatibility sections in the LUFA INF driver files (thanks to Christan Beharrell)
  206. * - Fixed logic hole breaking USB operations on a USB controller with only one supported USB mode and no USB_DEVICE_ONLY or USB_HOST_ONLY
  207. * configuration token set
  208. * - Fixed possible rounding in the VERSION_BCD() macros for some 0.01 step increments (thanks to Oliver Zander)
  209. * - Fixed incorrect Dataflash functionality in the USBKEY board if the driver is modified for a single Dataflash chip (thanks to Jonathan Oakley)
  210. * - Fixed incorrect definitions of \c HID_KEYBOARD_LED_KANA, \c HID_KEYBOARD_SC_KEYPAD_EQUAL_SIGN and \c HID_KEYBOARD_SC_KEYPAD_EQUAL_SIGN_AS400
  211. * and added a missing definition for \c HID_KEYBOARD_SC_APPLICATION (thanks to David Monro)
  212. * - Fixed maximum allowed keyboard key code usage of \c 0x65 rather than \c 0xFF for the \c HID_DESCRIPTOR_KEYBOARD() macro (thanks to David Monro)
  213. * - Fixed hardware race condition that could cause failed device enumerations for AVR8 and UC3 architectures (thanks to Mike Beyhs)
  214. * - Fixed incorrect Minimus board LED definitions (thanks to Joonas Lahtinen)
  215. * - Fixed incorrect ordering of the linker options in the build system causing link failures in some cases
  216. * - Fixed bug in the TWI peripheral driver for the AVR8 devices causing incorrect failure codes to be returned in some cases (thanks to Peter K)
  217. * - Fixed swapped LED3 and LED4 masks for the Olimex-32U4 development board LED driver
  218. * - Fixed potential NULL pointer dereference in the HID Host mode Class Driver (thanks to Pavel Kuzmin)
  219. * - Library Applications:
  220. * - Fixed broken RESET_TOGGLES_LIBUSB_COMPAT compile time option in the AVRISP-MKII project
  221. * - Fixed incompatibility in the CDC class bootloader on some systems (thanks to Sylvain Munaut)
  222. * - Fixed lengthy timeouts in the USBtoSerial project if no application on the host is consuming data (thanks to Nicolas Saugnier)
  223. * - Fixed lengthy automatic data flushing in the CDC and MIDI device class drivers
  224. * - Fixed incorrect LED masks for received data display in the Device GenericHID demos (thanks to Denys Berkovskyy)
  225. * - Fixed incorrect output in the HIDReportViewer project when no device is connected (thanks to Pavel Kuzmin)
  226. *
  227. * \section Sec_ChangeLog120730 Version 120730
  228. * <b>New:</b>
  229. * - Core:
  230. * - Added new, revamped modular build system with new makefile templates
  231. * - Added support for the BitWizard Multio and Big-Multio boards
  232. * - Added support for the DorkbotPDX Duce board
  233. * - Added support for the Olimex AVR-USB-32U4 board
  234. * - Added support for the Olimex AVR-USB-T32U4 board
  235. * - Added support for the Olimex AVR-ISP-MK2 board
  236. * - Added new Endpoint_ConfigureEndpointTable() function
  237. * - Added new Pipe_ConfigurePipeTable() function
  238. * - Added build test to verify correct compilation of all board drivers using all driver APIs
  239. * - Added build test to verify correct compilation of all bootloaders using all supported devices
  240. * - Added build test to verify that there are no detectable errors in the codebase via static analysis
  241. * - Added new JTAG_ENABLE() macro for the AVR8 architecture
  242. * - Library Applications:
  243. * - Modified the CDC Host demos to set a default CDC Line Encoding on enumerated devices
  244. * - Added Dataflash operational checks and aborts to all projects using the Dataflash to ensure it is working correctly before use
  245. * - Added new SerialToLCD user project contributed by Simon Foster
  246. * - Added new RESET_TOGGLES_LIBUSB_COMPAT compile time option to the AVRISP-MKII clone programmer project (thanks to Robert Spitzenpfeil)
  247. *
  248. * <b>Changed:</b>
  249. * - Core:
  250. * - Android Accessory Host property strings changed from a struct of pointer to an array to prevent unaligned access on greater than 8-bit architectures
  251. * - Audio Device Class driver changed to also require the index of the Audio Control interface within the device, for SET/GET/CUR/MIN/MAX/RES property adjustments
  252. * - Removed variable axis support from the HID_DESCRIPTOR_JOYSTICK() macro due to OS incompatibilities, replaced with fixed 3-axis joystick report structure
  253. * - Removed the old pseudo-scheduler from the library as it was unused and deprecated since the 090810 release
  254. * - Endpoint indexes are now specified as full endpoint addresses within the device in device mode, rather than a logical index
  255. * - The Endpoint_ConfigureEndpoint() function no longer takes an endpoint direction as a parameter, as this is now deduced from the specified full endpoint
  256. * address and type
  257. * - The Endpoint_ConfigureEndpoint() function no longer takes a number of banks as a special mask; the number of banks is now specified as an integer parameter
  258. * - Endpoints are now configured via instances of a new struct USB_Endpoint_Table_t in all device mode class drivers, rather than a list of endpoint parameters
  259. * - Pipe indexes are now specified as full pipe addresses within the host in host mode, rather than a logical index
  260. * - The Pipe_ConfigurePipe() function no longer takes an pipe token as a parameter, as this is now deduced from the specified full pipe address and type
  261. * - The Pipe_ConfigurePipe() function no longer takes a number of banks as a special mask; the number of banks is now specified as an integer parameter
  262. * - Pipes are now configured via instances of a new struct USB_Pipe_Table_t in all host mode class drivers, rather than a list of pipe parameters
  263. * - Added support for various assert and debugging macros for the UC3 devices
  264. * - Changed MIDI event structure MIDI_EventPacket_t to use a single field for the combined virtual cable index and command ID, to prevent bitfield packing issues
  265. * on some architectures (thanks to Darren Gibbs)
  266. * - Changed board LED driver implementations of LEDs_ToggleLEDs() for the AVR8 architecture to use the fast PIN register toggle alternative function for speed
  267. * - Library Applications:
  268. * - Raised the guard bits in the AVRISP-MKII clone project when in PDI and TPI to 32, to prevent communication errors on low quality connections to a target
  269. * - Added additional bootloader API data to expose the bootloader start address and class to the DFU and CDC class bootloaders
  270. * - Reverted AVRISP-MKII clone project watchdog based command timeout patch in favour of a hardware timer, to allow for use in devices with WDTRST fuse programmed
  271. * - The library bootloaders will now correctly start the user application after a watchdog-based application start, even if the /HWB line is held low externally
  272. * during the reset phase
  273. * - Increased endpoint polling interval for all demos and projects to 5ms, as 1ms was causing some enumeration issues on some machines (thanks to Riku Salminen)
  274. *
  275. * <b>Fixed:</b>
  276. * - Core:
  277. * - Fixed possible enumeration error if the user application selects a pipe other than the default Control pipe between the Powered and Default states of
  278. * the host state machine
  279. * - Fixed incorrect call to the user callback CALLBACK_Audio_Device_GetSetInterfaceProperty() in the Audio Class device driver (thanks to Tiit Ratsep)
  280. * - Fixed compile error for the UC3 architecture when INTERRUPT_CONTROL_ENDPOINT is specified (thanks to Andrus Aaslaid)
  281. * - Fixed compile error if LEDs_Disable() is called and BOARD=NONE is set (thanks to Sam Lin)
  282. * - Fixed inverted LED logic in the OLIMEX162 board LED driver
  283. * - Fixed incorrect response to GET STATUS requests in device mode if NO_DEVICE_SELF_POWER or NO_DEVICE_REMOTE_WAKEUP tokens are defined (thanks to Georg Glock)
  284. * - Fixed inverted LED logic in the USB2AX board LED driver
  285. * - Fixed possible deadlock in the CDC device driver if the USB connection is dropped while the CDC_REQ_SetLineEncoding control request is being processed by
  286. * the stack (thanks to Jonathan Hudgins)
  287. * - Fixed broken MIDI host driver MIDI_Host_ReceiveEventPacket() function due to not unfreezing the MIDI data IN pipe before use (thanks to Michael Brown)
  288. * - Fixed swapped Little Endian/Big Endian endpoint and pipe write code for the UC3 devices (thanks to Andrew Chu)
  289. * - Fixed the JTAG_DISABLE() macro clearing all other bits in MCUSR when called
  290. * - Fixed incorrect Micropendous board LED driver LEDs_SetAllLEDs() and LEDs_ChangeLEDs() function implementations (thanks to MitchJS)
  291. * - Fixed endianess issues in the RNDIS host class driver for UC3 devices (thanks to Andrew Chu)
  292. * - Library Applications:
  293. * - Fixed error in the AVRISP-MKII programmer when ISP mode is used at 64KHz (thanks to Ben R. Porter)
  294. * - 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
  295. * defined (thanks to Steven Morehouse)
  296. * - Fixed AVRISP-MKII programmer project reset line polarity inverted when the generated EEP file is loaded into the USB AVR's EEPROM and avr-dude is used
  297. * - Fixed CDC and DFU bootloaders failing to compile when the bootloader section size is 8KB or more (thanks to Georg Glock)
  298. * - Fixed CDC and DFU bootloaders API function offsets incorrect on some devices (thanks to Rod DeMay)
  299. * - Fixed incorrect DFU version number reported to the host in the DFU bootloader descriptors (thanks to Georg Glock)
  300. * - Fixed incorrect version hundredths value encoding in VERSION_BCD() macro (thanks to Georg Glock)
  301. * - Fixed invalid configuration descriptor in the low level KeyboardMouse device demo (thanks to Jun Wako)
  302. * - Fixed CDC and DFU bootloaders API page erase and write function failures (thanks to Martin Lambert)
  303. *
  304. * \section Sec_ChangeLog120219 Version 120219
  305. * <b>New:</b>
  306. * - Core:
  307. * - Added support for the XMEGA A3BU Xplained board
  308. * - Added support for the new B series XMEGA devices
  309. * - Added support for version 2 of the Teensy boards (thanks to Christoph Redecker)
  310. * - Added support for the USB2AX boards, hardware revision 1-3
  311. * - Added new Android Accessory Host class driver
  312. * - Added new USB_Host_GetDescriptor(), USB_Host_GetDeviceConfiguration() and USB_Host_GetInterfaceAltSetting() functions
  313. * - Added new CALLBACK_Audio_Device_GetSetInterfaceProperty() callback to the Audio Device Class driver
  314. * - Added new LEDs_Disable(), Buttons_Disable() and Joystick_Disable() functions to the board hardware drivers
  315. * - Added support for the Micropendous family of boards (Arduino-like revisions 1 and 2, DIP, 32U2, A, 1, 2, 3 and 4)
  316. * - Added INVERTED_VBUS_ENABLE_LINE and NO_AUTO_VBUS_MANAGEMENT compile time options (thanks to Opendous Inc.)
  317. * - Added support for the Atmel XMEGA B1 Xplained board
  318. * - Added Serial USART peripheral driver for the XMEGA architecture
  319. * - Added Master Mode SPI USART peripheral driver for the XMEGA and AVR8 architectures
  320. * - Added build test to verify correct compilation of as many modules as possible under as many architectures as possible under the C and C++ languages
  321. * - Added build test to verify correct compilation of the USB driver when forced into single USB mode under as many architectures as possible
  322. * - Library Applications:
  323. * - Added User Application APIs to the CDC and DFU class bootloaders
  324. * - Added INVERTED_ISP_MISO compile time option to the AVRISP-MKII clone project (thanks to Chuck Rohs)
  325. * - Added new Android Accessory Host demo (thanks to Opendous Inc.)
  326. *
  327. * <b>Changed:</b>
  328. * - Core:
  329. * - When automatic PLL management mode is enabled on the U4 series AVR8 chips, the PLL is now configured for 48MHz and not
  330. * a divided 96MHz, to lower power consumption and to keep the system within the datasheet specs for 3.3V operation (thanks to Scott Vitale)
  331. * - Added Class, ClassDevice, ClassHost and ClassCommon to the internal class driver source filenames to prevent ambiguities
  332. * - Altered the Mass Storage Host class driver so that SCSI data STALLs from the attached device can be recovered from automatically without
  333. * having to reset the Mass Storage interface
  334. * - USB_CONFIG_ATTR_BUSPOWERED constant renamed to USB_CONFIG_ATTR_RESERVED, as this was misnamed (thanks to NXP Semiconductors)
  335. * - Reordered board name definition indexes so that a misspelled BOARD compile option will default to BOARD_USER rather than BOARD_USBKEY
  336. * - Altered the HID class driver to only try to construct at maximum one packet per USB frame, to reduce CPU usage
  337. * - All USB Class Driver configuration struct values are now non-const, to allow for run-time modifications if required before configuring an instance
  338. * - Library Applications:
  339. * - Altered the Mass Storage Host LowLevel demo so that SCSI data STALLs from the attached device can be recovered from automatically without
  340. * having to reset the Mass Storage interface
  341. * - Updated the AVRISP-MKII Clone programmer project to be compatible with the latest version of AVR Studio (version 5.1)
  342. * - Changed the AVRISP-MKII Clone programmer project to report a fixed 3.3V VTARGET voltage on USB AVRs lacking an ADC instead of 5V to prevent
  343. * warnings in AVR Studio 5.1 when programming XMEGA devices
  344. * - Allow serial strings to be generated on the older AVR8 devices which do not explicitly state they contain unique values in the datasheet,
  345. * as this appears to be implemented in hardware
  346. *
  347. * <b>Fixed:</b>
  348. * - Core:
  349. * - Fixed ring buffer size limited to 255 elements, instead of the intended 65535 elements.
  350. * - Fixed CDC class drivers not saving and sending all 16-bits of the control line states (thanks to Matthew Swabey)
  351. * - Fixed race conditions in the CDC, HID and Mass Storage class drivers when processing some control requests
  352. * - Fixed misspelled HID_KEYBOARD_MODIFIER_* macros in the HID class driver (thanks to Laszlo Monda)
  353. * - Fixed broken AVR32 endpoint/pipe communications when ORDERED_EP_CONFIG compile time option is not enabled (thanks to Matthias Jahr)
  354. * - Fixed broken compilation for the AVR32 devices if the NO_SOF_EVENTS compile time option was not enabled (thanks to Matthias Jahr)
  355. * - Fixed compiler warning on GCC with \c -wundef compile flag is used (thanks to Georg Glock)
  356. * - Fixed incorrect implementation of LEDs_ToggleLEDs() for the Adafruit-U4 board (thanks to Caroline Saliman)
  357. * - Fixed broken compilation of LUFA under C++ compilers when the Serial peripheral module header file is included in a C++ source file
  358. * - Fixed missing semicolon in the UC3 architecture host pipe functions
  359. * - Fixed failed compilation for the XMEGA architecture if USB_DEVICE_ONLY us not specified
  360. * - Fixed UC3 architecture ignoring the pipe size when Pipe_ConfigurePipe() is called
  361. * - Library Applications:
  362. * - Added reliability patches to the AVRISP-MKII Clone project's PDI/TPI protocols (thanks to Justin Mattair)
  363. * - Fixed AVRISP-MKII Clone compile warning on AVR8 U4 targets even when NO_VTARGET_DETECT is enabled
  364. * - Fixed AVRISP-MKII Clone failing to start application firmware once a TPI programming session is exited
  365. * - Fixed DFU class bootloader not resetting the LED pins as high impedance inputs when a software jump to the user applications is requested
  366. * - Fixed AVRISP-MKII Clone timing out on long programming commands such as programming the EEPROM on an ATMEGA8 (thanks to Martin Kelling)
  367. * - Fixed invalid PID value used in the TempDataLogger project host application (thanks to Anupam Pathak)
  368. *
  369. * \section Sec_ChangeLog111009 Version 111009
  370. * <b>New:</b>
  371. * - Core:
  372. * - Added USE_LUFA_CONFIG_HEADER compile time option to include a LUFAConfig.h header in the user director for LUFA configuration
  373. * tokens as an alternative to tokens defined in the project makefile
  374. * - Added new USB_Host_SetInterfaceAltSetting() convenience function for the selection of an interface's alternative setting
  375. * - Added Audio class control request definitions
  376. * - Added new CALLBACK_Audio_Device_GetSetEndpointProperty() callback to the Audio Device Class driver to allow for endpoint control manipulations
  377. * such as data sample rates
  378. * - Added support for the Audio class GET STATUS request in the Audio Device Class driver so that it is correctly ACKed when sent by the host
  379. * - Added new EVENT_Audio_Device_StreamStartStop() event to the Audio Device Class driver to detect stream start/stop events
  380. * - Added board driver support for the Busware TUL board
  381. * - Added board hardware driver support for the EVK1100 board
  382. * - Added board hardware driver support for the EVK1104 board
  383. * - Added new Host mode Audio Class driver
  384. * - Added new SPI_GetCurrentMode() function to the SPI peripheral driver
  385. * - Added RingBuffer_GetFreeCount() function to the Ring Buffer driver
  386. * - Added new HID_Host_SetIdlePeriod() function to the HID Host Class driver
  387. * - Added new USB_Host_ConfigurationNumber global variable to indicate the selected configuration in an attached device
  388. * - Added new USB_Host_GetDeviceStatus() function to the host standard request function set
  389. * - Added AVR USB XMEGA architecture port (currently incomplete/experimental)
  390. * - Added new STRINGIFY() and STRINGIFY_EXPANDED() convenience macros
  391. * - Added new JTAG_DISABLE() macro for the AVR8 architecture
  392. * - Added Device Qualifier standard descriptor structure definitions USB_StdDescriptor_DeviceQualifier_t and USB_Descriptor_DeviceQualifier_t
  393. * - Library Applications:
  394. * - Added RNDIS device mode to the Webserver project
  395. * - Added new incomplete AndroidAccessoryHost Host LowLevel demo
  396. * - Added new HIDReportViewer project
  397. * - Added new MediaControl project
  398. * - Added new AudioInputHost Host ClassDriver demo
  399. * - Added new AudioOutputHost Host ClassDriver demo
  400. * - Added new AudioInputHost Host LowLevel demo
  401. * - Added new AudioOutputHost Host LowLevel demo
  402. * - Added new "checksource" target to all library project makefiles
  403. * - Added new VTARGET_USE_INTERNAL_REF configuration option to the AVRISP-MKII clone project (thanks to Volker Bosch)
  404. *
  405. * <b>Changed:</b>
  406. * - Core:
  407. * - Altered the definition of the USB_Audio_Descriptor_Format_t descriptor so that the user is now responsible for supplying
  408. * the supported audio sampling rates, to allow for multiple audio interfaces with different numbers of supported rates and/or
  409. * continuous sample rates
  410. * - Pipe_BoundEndpointNumber() has been renamed to Pipe_GetBoundEndpointAddress(), and now returns the correct endpoint direction
  411. * as part of the endpoint address
  412. * - Renamed global state variables that are specific to a certain USB mode to clearly indicate which mode the variable relates to,
  413. * by changing the USB_* prefix to USB_Device_* or USB_Host_*
  414. * - Removed the HOST_STATE_WaitForDeviceRemoval and HOST_STATE_Suspended host state machine states, as these are no longer required
  415. * - Altered the USB_Host_SetDeviceConfiguration() function to update the global Host state machine state and the new
  416. * USB_Host_ConfigurationNumber global as required
  417. * - Added endian correcting code to the library USB class drivers for multiple architecture support
  418. * - Removed the ENDPOINT_DESCRIPTOR_DIR_* macros, replaced by ENDPOINT_DIR_* instead
  419. * - Renamed the JTAG_DEBUG_ASSERT() macro to JTAG_ASSERT()
  420. * - Added variable number of axis to HID_DESCRIPTOR_JOYSTICK() for multi-axis joysticks above just X and Y
  421. * - Renamed USB_Host_ClearPipeStall() to USB_Host_ClearEndpointStall() as the function works on an endpoint address within the attached device,
  422. * and not a Pipe within the host
  423. * - The MS_Host_ResetMSInterface() now performs a full Mass Storage reset sequence to prevent data corruption in the event of a device
  424. * lock up or timeout (thanks to David Lyons)
  425. * - Added endian-correction to the CDC driver's Line Encoding control request handlers.
  426. * - Library Applications:
  427. * - Modified the Low Level and Class Driver AudioInput and AudioOutput demos to support multiple audio sample rates
  428. * - Updated all host mode demos and projects to use the EVENT_USB_Host_DeviceEnumerationComplete() event callback for device configuration
  429. * instead of manual host state machine manipulations in the main application task
  430. * - Changed the reports in the GenericHID device demos to control the board LEDs, to reduce user confusion over the callback routines
  431. * - Added reliability patches to the AVRISP-MKII Clone project's ISP and PDI/TPI protocols (thanks to Justin Mattair)
  432. *
  433. * <b>Fixed:</b>
  434. * - Core:
  435. * - Large number of documentation and code comment corrections (thanks to Andrey from Microsin.ru)
  436. * - Fixed possibility of the AVR's SPI interface being pulled out of master mode if the /SS pin is a input and pulled low (thanks
  437. * to Andrey from Microsin.ru)
  438. * - Fixed compile error when FIXED_CONTROL_ENDPOINT_SIZE compile time option was disabled, and a USE_*_DESCRIPTORS compile time
  439. * option was not enabled on the AVR8s
  440. * - Fixed lack of C++ compatibility in some internal header files causing compile errors when using LUFA in C++ projects
  441. * - Fixed error in the pipe unordered allocation algorithm for the AVR8 devices breaking compatibility with some devices
  442. * - Fixed USB_USBTask not being called internally in stream transfers between packets when Partial Stream Transfers are used
  443. * - Fixed swapped TWI_ADDRESS_READ and TWI_ADDRESS_WRITE values
  444. * - Fixed TWI_ReadPacket() not releasing the TWI bus on read completion
  445. * - Fixed optimization error in the HID Parser item value USB_SetHIDReportItemInfo() and USB_GetHIDReportItemInfo() routines if the report item was
  446. * \c NULL (which should be allowable according to the API)
  447. * - Fixed HID Parser CALLBACK_HIDParser_FilterHIDReportItem() callback function not being passed a cacheable report item pointer
  448. * - Fixed HID Parser's largest report size bit count not including the size of the last parsed report item
  449. * - Fixed HID host driver's largest HID report size count corrupt when the number of report bits exceeds 255
  450. * - Library Applications:
  451. * - Fixed incorrect signature in the CDC and DFU class bootloaders for the ATMEGA8U2
  452. * - Fixed KeyboardHost and KeyboardHostWithParser demos displaying incorrect values when numerical keys were pressed
  453. * - Fixed compile errors in the incomplete BluetoothHost demo application (thanks to Timo Lindfors)
  454. * - Fixed incorrect Dataflash buffer use in the DataflashManager_WriteBlocks_RAM() function of several demos/projects (thanks to Jeremy Willden)
  455. * - Fixed incorrect logging interval (always 500ms longer than requested) in the TempDataLogger project
  456. * - Fixed incorrect buffer size check in the USBtoSerial project (thanks to Yuri A Nikiforov)
  457. * - Fixed port state table corruption in the TCP layer of the RNDIS Ethernet device demos
  458. *
  459. * \section Sec_ChangeLog110528 Version 110528
  460. * <b>New:</b>
  461. * - Core:
  462. * - Added new ORDERED_EP_CONFIG compile time option to restrict endpoint/pipe configuration to ascending order
  463. * in exchange for a smaller compiled program binary size
  464. * - Added a new general RingBuff.h miscellaneous ring buffer library driver header
  465. * - Added new GCC_FORCE_POINTER_ACCESS() macro to correct GCC's mishandling of struct pointer accesses
  466. * - Added new GCC_MEMORY_BARRIER() macro to prevent instruction reordering across boundaries
  467. * - Added basic driver example use code to the library documentation
  468. * - Added new Endpoint_Null_Stream() and Pipe_Null_Stream() functions
  469. * - Added new ADC_GET_CHANNEL_MASK() convenience macro
  470. * - Added new HID report item macros (with HID_RI_ prefix) to allow for easy creation and editing of HID report descriptors
  471. * - Added new HID_DESCRIPTOR_MOUSE(), HID_DESCRIPTOR_KEYBOARD(), HID_DESCRIPTOR_JOYSTICK() and HID_DESCRIPTOR_VENDOR() macros
  472. * for easy automatic creation of basic USB HID device reports
  473. * - Added new MAX() and MIN() convenience macros
  474. * - Added new Serial_SendData() function to the Serial driver
  475. * - Added board driver support for the Sparkfun ATMEGA8U2 breakout board
  476. * - Added TWI baud rate prescaler and bit length parameters to the TWI_Init() function (thanks to Thomas Herlinghaus)
  477. * - Internal restructuring for eventual multiple architecture ports
  478. * - Added AVR32 UC3 architecture port (currently incomplete/experimental)
  479. * - Added new architecture independent functions to enable, disable, save and restore the Global Interrupt Enable flags
  480. * - Added new RNDIS Device Class Driver packet send and receive functions
  481. * - Library Applications:
  482. * - Added ability to write protect Mass Storage disk write operations from the host OS
  483. * - Added new MIDIToneGenerator project
  484. * - Added new KeyboardMouseMultiReport Device ClassDriver demo
  485. * - Added new VirtualSerialMassStorage Device ClassDriver demo
  486. * - Added HID class bootloader, compatible with a modified version of the command line Teensy loader from PJRC.com
  487. * - Added LED flashing to the CDC and DFU class bootloaders to indicate when they are running
  488. *
  489. * <b>Changed:</b>
  490. * - Core:
  491. * - Unordered Endpoint/Pipe configuration is now allowed once again by default via the previous reconfig workaround
  492. * - Refactored Host mode Class Driver *_Host_ConfigurePipes() routines to be more space efficient when compiled
  493. * - Added new *_ENUMERROR_PipeConfigurationFailed error codes for the *_Host_ConfigurePipes() routines
  494. * - The USARTStream global is now public and documented in the SerialStream module, allowing for the serial USART
  495. * stream to be accessed via its handle rather than via the implicit stdout and stdin streams
  496. * - The FAST_STREAM_TRANSFERS compile time option has been removed due to lack of use and low cost/benefit ratio
  497. * - Altered all endpoint/pipe stream transfers so that the new BytesProcessed parameter now points to a location
  498. * where the number of bytes in the transfer that have been completed can be stored (or NULL if entire transaction
  499. * should be performed in one chunk)
  500. * - The NO_STREAM_CALLBACKS compile time option has now been removed due to the new partial stream transfer feature
  501. * - Changed over all project and demo HID report descriptors to use the new HID report item macros
  502. * - Moved the HIDParser.c source file to the LUFA/Drivers/USB/Class/Common/ directory from the LUFA/Drivers/USB/Class/Host/
  503. * - Added support to the HID parser for extended USAGE items that contain the usage page as well as the usage index
  504. * - Removed the SerialStream driver, rolled functionality into the regular Serial peripheral driver via the new
  505. * Serial_CreateStream() and Serial_CreateBlockingStream() functions
  506. * - Renamed the low level Serial byte send/receive functions, to be consistent with the CDC class driver byte functions
  507. * - Altered the behaviour of the serial byte reception function so that is is non-blocking, and now returns a negative
  508. * value if no character is received (to remain consistent with the CDC class driver byte reception routines)
  509. * - Renamed the PRNT_Host_SendString(), CDC_Host_SendString() and CDC_Device_SendString() functions to *_SendData(), and
  510. * added new versions of the *_SendString() routines that expect a null terminated string instead
  511. * - Renamed all driver termination *_ShutDown() functions to the more logical name *_Disable()
  512. * - Reduced latency for executing the Start-Of-Frame events (if enabled in the user application)
  513. * - Removed Pipe_ClearErrorFlags(), pipe error flags are now automatically cleared when Pipe_ClearError() is called
  514. * - Endpoint_ResetFIFO() renamed to Endpoint_ResetEndpoint(), to be consistent with the Pipe_ResetPipe() function name
  515. * - Implemented on-demand PLL clock generation for the U4, U6 and U7 series USB AVRs when automatic PLL mode is specified
  516. * - F_CLOCK changed to F_USB to be more descriptive, and applicable on future architecture ports
  517. * - Renamed all low level Endpoint_Read_*, Endpoint_Write_* and Endpoint_Discard_* functions to use the number of bits instead of
  518. * a symbolic size (Byte, Word, DWord) so that the function names are applicable and correct across all architectures
  519. * - Renamed all low level Pipe_Read_*, Pipe_Write_* and Pipe_Discard_* functions to use the number of bits instead of
  520. * a symbolic size (Byte, Word, DWord) so that the function names are applicable and correct across all architectures
  521. * - Separated out board drivers by architecture in the library internals for better organisation
  522. * - Library Applications:
  523. * - Changed the XPLAINBridge software UART to use the regular timer CTC mode instead of the alternative CTC mode
  524. * via the Input Capture register, to reduce user confusion
  525. * - Combined page and word ISP programming mode code in the AVRISP-MKII clone project to reduce compiled size and
  526. * increase maintainability of the code
  527. * - Changed over library projects to use the new general ring buffer library driver module
  528. * - Added new high level TWI packet read/write commands, altered behaviour of the TWI_StartTransmission() function
  529. * - Changed TempDataLogger project's DS1307 driver to simplify the function interface and prevent a possible race condition
  530. * - Changed AVRISP-MKII project to use the Watchdog interrupt for command timeouts, to reduce CPU usage and free timer 0
  531. * for other uses
  532. * - Updated the software USART code in the XPLAIN Bridge application so that the incoming bits are sampled at their mid-point
  533. * instead of starting point, to give maximum reliability (thanks to Anton Staaf)
  534. *
  535. * <b>Fixed:</b>
  536. * - Core:
  537. * - Fixed broken USBFOO board drivers due to missing BOARD_USBFOO define
  538. * - Fixed HID host class driver incorrectly binding to HID devices that do not have an OUT endpoint
  539. * - Fixed incorrect definition of the HID_KEYBOARD_SC_D constant in the HID class driver (thanks to Opendous Inc.)
  540. * - Fixed incorrect definition of the HID_KEYBOARD_SC_RIGHT_ARROW constant in the HID class driver (thanks to Joby Taffey)
  541. * - Fixed incorrect endpoint initialisation order in the several device demos (thanks to Rick Drolet)
  542. * - Fixed inverted Minimus board LEDs
  543. * - Fixed incorrect byte ordering in the Audio_Device_WriteSample24 function (thanks to WZab)
  544. * - Fixed several functions in the Host mode Still Image Class driver returning an error code from the incorrect
  545. * error code enum (thanks to Daniel Seibert)
  546. * - Fixed ReportID not being removed from the feature/out report data array in the HID class driver when Report IDs are used
  547. * - Fixed incorrect BUTTONS_BUTTON1 definition for the Minimus board
  548. * - Fixed Still Image Host class driver exiting the descriptor search routine prematurely if the data pipes (but not event pipe)
  549. * is found
  550. * - Fixed missing call to Pipe_SetInfiniteINRequests() in the Pipe_ConfigurePipe() routine
  551. * - Fixed Remote Wakeup broken on the AVRs due to the mechanism only operating when the SUSPI bit is set (thanks to Holger Steinhaus)
  552. * - Fixed possible invalid program execution when in host mode if corrupt descriptor lengths are supplied by the attached device
  553. * - Library Applications:
  554. * - Fixed Benito project discarding incoming data from the USB virtual serial port when the USART is busy
  555. * - Fixed broken DFU bootloader, added XPLAIN support for bootloader start when XCK jumpered to ground
  556. * - Fixed broken HID_REQ_GetReport request handler in the Low Level GenericHID demo
  557. * - Fixed possible lost data in the XPLAINBridge, USBtoSerial and Benito projects when the host exceeds the packet
  558. * timeout period on received packets as set by USB_STREAM_TIMEOUT_MS (thanks to Justin Rajewski)
  559. * - Fixed possible programming problem in the AVRISP-MKII clone project when programming specific patterns into a target
  560. * memory space that is only byte (not page) addressable
  561. * - Fixed errors in the incomplete Test and Measurement device demo preventing proper operation (thanks to Pavel Plotnikov)
  562. * - Fixed programming errors in the AVRISP-MKII project when the programming packet is a round multiple of the endpoint bank
  563. * size under avrdude (thanks to Steffan Woltjer)
  564. *
  565. *
  566. * \section Sec_ChangeLog101122 Version 101122
  567. * <b>New:</b>
  568. * - Core:
  569. * - Added new SCSI_ASENSE_NOT_READY_TO_READY_CHANGE constant to the Mass Storage class driver, to indicate when a previously
  570. * not ready removable medium has now become ready for the host's use (thanks to Martin Degelsegger)
  571. * - Moved the Pipe and Endpoint stream related code to two new USB library core source files EndpointStream.c and PipeStream.c
  572. * - Added new USB_Device_GetFrameNumber() and USB_Host_GetFrameNumber() functions to retrieve the current USB frame number
  573. * - Added new USB_Host_EnableSOFEvents(), USB_Host_DisableSOFEvents() and EVENT_USB_Host_StartOfFrame() for the user application
  574. * handling of USB Start of Frame events while in USB Host mode
  575. * - Added new PRNT_Host_BytesReceived(), PRNT_Host_ReceiveByte(), PRNT_Host_SendByte() and PRNT_Host_Flush() functions to the
  576. * Print Host Class driver
  577. * - Added class specific descriptor alternative struct type defines with standard USB-IF element naming
  578. * - Added new project makefile template to the library and moved board driver stub files into in a new "CodeTemplates" directory
  579. * - Added board hardware driver support for the Adafruit U4 breakout board
  580. * - Added board hardware driver support for the Arduino Uno development board
  581. * - Added board hardware driver support for the Blackcat USB JTAG board (thanks to the PSGroove team)
  582. * - Added board hardware driver support for the Busware BUI development board
  583. * - Added board hardware driver support for the Busware CUL V3 868MHZ radio board (thanks to Dirk Tostmann)
  584. * - Added board hardware driver support for the Kernel Concepts USBFOO development board
  585. * - Added board hardware driver support for the Linnix UDIP development board
  586. * - Added board hardware driver support for the Olimex AVR-USB-162 development board (thanks to Steve Fawcett)
  587. * - Added board hardware driver support for the Maximus board (thanks to the PSGroove team)
  588. * - Added board hardware driver support for the Microsin AVR-USB162 breakout board
  589. * - Added board hardware driver support for the Minimus board (thanks to the PSGroove team)
  590. * - Added new NO_CLASS_DRIVER_AUTOFLUSH compile time option to disable automatic flushing of interfaces when the USB management
  591. * tasks for each driver is called
  592. * - Added standard keyboard HID report scan-code defines (thanks to Laszlo Monda)
  593. * - Added new Pipe_GetBusyBanks(), Endpoint_GetBusyBanks() and Endpoint_AbortPendingIN() functions
  594. * - Library Applications:
  595. * - Added default test tone generation mode to the Device mode AudioInput demos
  596. * - Added new NO_BLOCK_SUPPORT, NO_EEPROM_BYTE_SUPPORT, NO_FLASH_BYTE_SUPPORT and NO_LOCK_BYTE_WRITE_SUPPORT compile time options to the
  597. * CDC class bootloader
  598. * - Added new XCK_RESCUE_CLOCK_ENABLE compile time option to the AVRISP-MKII clone programmer project (thanks to Tom Light)
  599. *
  600. * <b>Changed:</b>
  601. * - Core:
  602. * - Removed complicated logic for the Endpoint_ConfigureEndpoint() function to use inlined or function called versions
  603. * depending of if the given bank size is a compile time constant, as the compiler does a better job of optimizing
  604. * with basic code
  605. * - Changed the signature of the CALLBACK_USB_GetDescriptor() callback function so that the descriptor pointer is const, to remove
  606. * the need for extra casting inside the callback (thanks to Jonathan Kollasch)
  607. * - Reduced HOST_DEVICE_SETTLE_DELAY_MS to 1000ms down from 1500ms to improve device compatibility while in USB Host mode
  608. * - Removed the EVENT_USB_InitFailure() event, not specifying a USB mode correctly now defaults to UID selection mode
  609. * - Renamed and moved class driver common constant definitions to make the naming scheme more uniform
  610. * - Moved the USB mode specifier constants into a new enum, so that they are semantically related to one another
  611. * - Renamed ENDPOINT_DOUBLEBANK_SUPPORTED() to ENDPOINT_BANKS_SUPPORTED() and changed it to return the maximum number of supported banks for
  612. * the given endpoint
  613. * - Better algorithm to extract and convert the internal device serial number into a string descriptor (if present)
  614. * - All USB class drivers are now automatically included when LUFA/Drivers/USB.h is included, and no longer need to be separately included
  615. * - The MIDI class drivers now automatically flushes the MIDI interface when the MIDI class driver's USBTask() function is called
  616. * - Renamed the EVENT_USB_Device_UnhandledControlRequest() event to EVENT_USB_Device_ControlRequest() as it is now fired before the library
  617. * request handlers, not afterwards
  618. * - Library Applications:
  619. * - Changed over all device demos to use a clearer algorithm for the configuring of the application's endpoints
  620. * - Added missing DataflashManager_CheckDataflashOperation() function to the MassStorageKeyboard demo, removed redundant
  621. * SCSI_Codes.h file as these values are part of the MassStorage Class Driver
  622. * - Added compile time error to the AVRISP-MKII project when built for the U4 chips, as the default VTARGET detection ADC channel
  623. * does not exist on these chips (thanks to Marco)
  624. * - Changed all Device mode LowLevel demos and Device Class drivers so that the control request is acknowledged and any data
  625. * transferred as quickly as possible without any processing in between sections, so that long callbacks or event handlers will
  626. * not break communications with the host by exceeding the maximum control request stage timeout period
  627. * - Changed over all demos, drivers and internal functions to use the current frame number over the Start of Frame flag where possible
  628. * to free up the Start of Frame flag for interrupt use in the user application
  629. * - All project makefiles now correctly clean intermediate build files from assembly and C++ sources (thanks to Daniel Czigany)
  630. * - Changed default value for the reset polarity parameter in the AVRISP-MKII project so that it defaults to active low drive
  631. * - Changed configuration descriptor parser for all host mode projects and class drivers to ensure better compatibility with devices
  632. * - All LowLevel demos changed to use the constants and types defined in the USB class drivers
  633. * - Changed AudioInput and AudioOutput demos to reload the next sample via an interrupt rather than polling the sample timer
  634. * - Rescue clock of the AVRISP-MKII moved to the AVR's OCR1A pin, so that the clock can be generated at all times
  635. * - Changed ClassDriver MIDI demos to process all incoming events in a loop until the bank becomes empty rather than one at a time
  636. * - Changed LowLevel MIDI demos to only clear the incoming event bank once it has become empty to support packed event packets
  637. *
  638. * <b>Fixed:</b>
  639. * - Core:
  640. * - Fixed USB_GetHIDReportItemInfo() function modifying the given report item's data when the report item does not exist
  641. * within the supplied report of a multiple report HID device
  642. * - Fixed critical pipe/endpoint memory allocation issue where the bank memory address space could be silently overlapped
  643. * in the USB controller if the endpoints or pipes were allocated in anything other than ascending order (thanks to Martin Degelsegger)
  644. * - Added LEDs_ToggleLEDs() function to several board LED drivers which were missing it (thanks to Andrei Krainev)
  645. * - Fixed SET FEATURE and CLEAR FEATURE control requests directed at an unconfigured endpoint causing request timeouts
  646. * - Fixed USB_Host_ClearPipeStall() incorrectly determining the endpoint direction from the currently selected pipe
  647. * - Fixed JTAG_DEBUG_POINT() and JTAG_DEBUG_BREAK() macros not compiling under pure C99 standards mode
  648. * - Fixed endpoint selection within the CALLBACK_HID_Device_CreateHIDReport() callback function causing broken GET REPORT requests
  649. * - Fixed incorrect command name for EEPROM memory programming in the makefile dfu-ee target
  650. * - Fixed incorrect LEDs_ChangeLEDs() function in the Benito board LED driver
  651. * - Fixed incorrect USB_DeviceState value when unconfiguring the device without an address set
  652. * - Fixed SPI driver not explicitly setting /SS and MISO pins as inputs when SPI_Init() is called
  653. * - Fixed random enumeration failure while in device mode due to interrupts causing the Set Address request to exceed maximum timings
  654. * - Fixed MIDI_Host_Flush() not aborting early when the specified MIDI host interface was not configured
  655. * - Fixed MIDI class driver send routines silently discarding packets if the endpoint or pipe is busy (thanks to Robin Green)
  656. * - Library Applications:
  657. * - Fixed MassStorage based demos and projects resetting the SCSI sense values before the command is executed, leading to
  658. * missed SCSI sense values when the host retrieves the sense key (thanks to Martin Degelsegger)
  659. * - Fixed USBtoSerial and Benito project SetLineEncoding calls failing if the USART is busy, due to the RX ISR delaying the control
  660. * request handler
  661. * - Fixed LowLevel PrinterHost demo not sending control requests to the attached printer with the correct printer interface wIndex value
  662. * - Fixed incorrect signature reported in the CDC class bootloader for the ATMEGA32U2
  663. * - Fixed BootloaderCDC project failing on some operating systems due to removed Line Encoding options (thanks to Alexey Belyaev)
  664. * - Fixed broken FLASH/EEPROM programming in the AVRISP-MKII clone project when writing in non-paged mode and the polling byte cannot be used
  665. * - Fixed ISR definition conflict in the XPLAIN bridge between the software UART and the AVRISP-MKII ISP modules
  666. * - Fixed USBtoSerial and XPLAINBridge demos discarding data from the PC if the send buffer becomes full
  667. * - Fixed broken input in the MagStripe reader project due to an incorrect HID report descriptor
  668. * - Fixed incorrect PollingIntervalMS values in the demo/project/bootloader endpoint descriptors (thanks to MCS Electronics)
  669. * - Fixed AVRISP-MKII clone project not starting the target's program automatically after exiting TPI programming mode
  670. *
  671. *
  672. * \section Sec_ChangeLog100807 Version 100807
  673. * <b>New:</b>
  674. * - Added new ADC_DisableChannel() function (thanks to Mich Davis)
  675. * - Added new VTARGET_REF_VOLTS and VTARGET_SCALE_FACTOR compile time defines to the AVRISP-MKII programmer project to set
  676. * the VTARGET reference voltage and scale factor
  677. * - Added new pgm_read_ptr() macro to Common.h for reading of pointers out of flash memory space
  678. * - Added new SWAPENDIAN_16() and SWAPENDIAN_32() macros to Common.h for statically initialized variables at compile time
  679. * - Added new Drivers/USB/LowLevel/Device.c file to house Device mode specific functions that are more complicated than simple macros
  680. * - Added new AVRStudio 4 project files for all library demos, projects and bootloaders
  681. * - Added ability to set the serial baud rate via the user's terminal in the XPLAINBridge project
  682. * - Added new LUFA module variables for the different source modules in the core library makefile to simplify project makefiles
  683. * - Added start of a new Test and Measurement class demo (thanks to Peter Lawrence)
  684. * - Added new SPI_ORDER_* data order masks to the SPI peripheral driver
  685. * - Added support to the AVRISP-MKII project for ISP speeds slower than 125KHz via a new software SPI driver
  686. * - Added support for the new button/LED on the latest model USBTINY-MKII
  687. *
  688. * <b>Changed:</b>
  689. * - The RingBuff library code has been replaced in the XPLAINBridge, Benito and USBtoSerial projects with an ultra lightweight
  690. * ring buffer to help improve the reliability of the projects
  691. * - The EEPROM stream read/write functions now use eeprom_update_byte() instead of eeprom_write_byte(), so that only
  692. * changed bytes are written to EEPROM to preserve its lifespan
  693. * - Changed over the AVRISP-MKII and TemperatureDataLogger projects to use eeprom_update_byte() when writing non-volatile
  694. * parameters to EEPROM to preserve its lifespan
  695. * - Removed unused line encoding data and control requests from the CDC Bootloader code, to save space
  696. * - Renamed SERIAL_STREAM_ASSERT() macro to STDOUT_ASSERT()
  697. * - The USB_Device_IsRemoteWakeupSent() and USB_Device_IsUSBSuspended() macros have been deleted, as they are now obsolete
  698. * - Rewrote the implementation of the SwapEndian_16() and SwapEndian_32() functions so that they compile down in most instances to
  699. * minimal loads and stores rather than complicated shifts
  700. * - The software UART in the XPLAINBridge has been largely altered to try to improve upon its performance and reliability
  701. * - The USBtoSerial and Benito projects now flushes received data via a flush timer, so that several bytes can be transmitted at once
  702. * - Removed the automated checking of event names in the demo, project and bootloader makefiles due to inconsistencies between the
  703. * behaviour of the command line tools used to perform the check on each platform
  704. * - Internal USB driver source files renamed and moved to ease future possible architecture ports
  705. * - All internal pseudo-function macros have been converted to true inline functions for type-safety and readability
  706. * - Changed LED indicator masks for the AVRISP-MKII project, so that there are defined roles for each LED
  707. * - Altered the CDC Device and Host Class drivers' receive byte routines, so that no data is indicated by the function returning a
  708. * negative value (thanks to Andreas Paulin)
  709. * - Added auto flushing of OUT data to the CDC Host Class driver's USBTask function to automatically flush the send pipe buffer
  710. *
  711. * <b>Fixed:</b>
  712. * - Fixed AVRISP project sending a LOAD EXTENDED ADDRESS command to 128KB AVRs after programming or reading from
  713. * the last page of FLASH (thanks to Gerard Sexton)
  714. * - Fixed AVRISP project not sending a full erase-and-write EEPROM command to XMEGA targets when writing to the EEPROM
  715. * instead of the split write-only command (thanks to Tim Margush)
  716. * - Fixed RNDISEthernet demos crashing when calculating checksums for Ethernet/TCP packets of more than ~500 bytes due to
  717. * an overflow in the checksum calculation loop (thanks to Kevin Malec)
  718. * - Fixed XPLAINBridge project not correctly reading the XMEGA's supply voltage when reporting back to the host
  719. * - Fixed incorrect signature for the ATMEGA32U2 in the DFU bootloader (thanks to Axel Rohde)
  720. * - Fixed internal device serial not being accessible on the ATMEGAXXU2 AVRs (thanks to Axel Rohde)
  721. * - Fixed void pointer arithmetic in ConfigDescriptor.h breaking C++ compatibility (thanks to Michael Hennebry)
  722. * - Fixed broken PDI EEPROM Section Erase functionality in the AVRISP-MKII project
  723. * - Fixed USB_Device_SendRemoteWakeup() not working when the USB clock was frozen during USB bus suspend (thanks to Brian Dickman)
  724. * - Fixed occasional lockup of the AVRISP project due to the timeout extension code incorrectly extending the timeout in
  725. * PDI and TPI programming modes infinitely
  726. * - Fixed HID device class driver still using PrevReportINBuffer for GetReport control requests even when it has been
  727. * set to NULL by the user application (thanks to Axel Rohde)
  728. * - Fixed MIDI_Device_SendEventPacket() not correctly waiting for the endpoint to become ready (thanks to Robin Green)
  729. * - Fixed Benito and USBtoSerial projects not turning off the USART before reconfiguring it, which could cause incorrect
  730. * operation to occur (thanks to Bob Paddock)
  731. * - Fixed Serial peripheral driver not turning off the USART before reconfiguring it, which would cause incorrect operation
  732. * to occur (thanks to Bob Paddock)
  733. * - Fixed software application start command broken in the DFU class bootloader when dfu-programmer is used due to application
  734. * start address corruption
  735. *
  736. *
  737. * \section Sec_ChangeLog100513 Version 100513
  738. * <b>New:</b>
  739. * - Added incomplete MIDIToneGenerator project
  740. * - Added new Relay Controller Board project (thanks to OBinou)
  741. * - Added board hardware driver support for the Teensy, USBTINY MKII, Benito and JM-DB-U2 lines of third party USB AVR boards
  742. * - Added new ATTR_NO_INIT variable attribute for global variables that should not be automatically cleared on startup
  743. * - Added new ENDPOINT_*_BusSuspended error code to the Endpoint function, so that the stream functions early-abort if the bus
  744. * is suspended before or during a transfer
  745. * - Added new EVENT_CDC_Device_BreakSent() event and CDC_Host_SendBreak() function to the Device and Host CDC Class drivers
  746. * - Added ReportType parameter to the HID device class driver CALLBACK_HID_Device_ProcessHIDReport() function so that FEATURE
  747. * reports from the host to the device can be correctly processed
  748. * - Added ReportType parameter to the HID host class driver HID_Host_SendReportByID() function so that FEATURE reports can be
  749. * issued to the attached device
  750. *
  751. * <b>Changed:</b>
  752. * - AVRISP programmer project now has a more robust timeout system
  753. * - Added a timeout value to the TWI_StartTransmission() function, within which the addressed device must respond
  754. * - Webserver project now uses the board LEDs to indicate the current IP configuration state
  755. * - Added ENABLE_TELNET_SERVER compile time option to the Webserver project to disable the TELNET server if desired
  756. * - Increased throughput of the USBtoSerial demo on systems that send multiple bytes per packet (thanks to Opendous Inc.)
  757. * - Double bank CDC endpoints in the XPLAIN Bridge project, re-enable JTAG once the mode selection pin has been sampled.
  758. * - Standardized the naming scheme given to configuration descriptor sub-elements in the Device mode demos, bootloaders
  759. * and projects
  760. * - All Class Driver Host mode demos now correctly set the board LEDs to READY once the enumeration process has completed
  761. * - Added LIBUSB_FILTERDRV_COMPAT compile time option to the AVRISP programmer project to make the code compatible with Windows
  762. * builds of avrdude at the expense of AVRStudio compatibility
  763. * - Removed two-step endpoint/pipe bank clear and switch sequence for smaller, faster endpoint/pipe code
  764. * - The USB_Init() function no longer calls sei() - the user is now responsible for enabling interrupts when they are ready
  765. * for them to be enabled (thanks to Andrei Krainev)
  766. * - The Audio_Device_IsSampleReceived() and Audio_Device_IsReadyForNextSample() functions are now inline, to reduce overhead
  767. * - Removed the cast to uint16_t on the set baud rate in the USBtoSerial project, so that the higher >1M baud rates can be
  768. * selected (thanks to Steffan Woltjer)
  769. * - Removed software PDI and TPI emulation from the AVRISP-MKII clone project as it was very buggy and slow - PDI and TPI must
  770. * now be implemented via separate programming headers
  771. * - The CDC class bootloader now uses a watchdog reset rather than a soft-reset when exited to ensure that all hardware is
  772. * properly reset to their defaults
  773. * - Device mode class driver callbacks are now fired before the control request status stage is sent to prevent the host from
  774. * timing out if another request is immediately fired and the device has a lengthy callback routine
  775. * - The TeensyHID bootloader has been removed, per request from Paul at PJRC
  776. * - The LIBUSB_FILTERDRV_COMPAT compile time option in the XPLAINBridge and AVRISP-MKII projects has been renamed
  777. * LIBUSB_DRIVER_COMPAT, as it applies to all software on all platforms using the libUSB driver
  778. *
  779. * <b>Fixed:</b>
  780. * - Fixed possible device lockup when INTERRUPT_CONTROL_ENDPOINT is enabled and the control endpoint is not properly
  781. * selected when the ISR completes
  782. * - Fixed AVRISP-MKII clone project not correctly issuing LOAD EXTENDED ADDRESS commands when the extended address
  783. * boundary is crossed during programming or read back (thanks to Gerard Sexton)
  784. * - Fixed warnings when building the AVRISP-MKII clone project with the ENABLE_XPROG_PROTOCOL compile time option disabled
  785. * - Fixed software PDI/TPI programming mode in the AVRISP project not correctly toggling just the clock pin
  786. * - Fixed TWI_StartTransmission() corrupting the contents of the GPIOR0 register
  787. * - Fixed TWI driver not aborting when faced with no response after attempting to address a device on the bus
  788. * - Fixed ADC routines not correctly returning the last result when multiple channels were read
  789. * - Fixed ADC routines failing to read the extended channels (Channels 8 to 13, Internal Temperature Sensor) on the
  790. * U4 series USB AVR parts
  791. * - Fixed LowLevel MassStorage demo broken on the U2 series USB AVRs due to unsupported double-banked endpoint modes used
  792. * - Fixed compilation error in the AudioInput demos when MICROPHONE_BIASED_TO_HALF_RAIL is defined (thanks to C. Scott Ananian)
  793. * - Fixed incorrect definition of HID_ALIGN_DATA() causing incorrect HID report item data alignment
  794. * - Fixed Still Image Host class driver not resetting the transaction ID when a new session is opened, fixed driver not sending
  795. * a valid session ID to the device
  796. * - Removed invalid dfu and flip related targets from the bootloaders - bootloaders can only be replaced with an external programmer
  797. * - Fixed Set/Clear Feature requests directed to a non-configured endpoint not returning a stall to the host
  798. * - Fixed HID Device Class Driver not allocating a temporary buffer when the host requests a report via the control endpoint and the
  799. * user has set the PrevReportINBuffer driver configuration element to NULL (thanks to Lars Noschinski)
  800. * - Fixed device state not being reset to DEVICE_STATE_Default if the host sets a 0x00 device address
  801. * - Fixed device not stalling configuration requests before the device's address has been set
  802. * - Fixed possibility of internal signature retrieval being corrupted if an interrupt occurs during a signature byte
  803. * read (thanks to Andrei Krainev)
  804. * - Fixed device state not being reset back to the default state if the host sets the address to 0
  805. * - Fixed Set Configuration requests not being stalled until the host has set the device's address
  806. * - Fixed Host mode HID class driver not sending the correct report type when HID_Host_SendReportByID() was called and the
  807. * HID_HOST_BOOT_PROTOCOL_ONLY compile time option is set
  808. * - Fixed INTERRUPT_CONTROL_ENDPOINT compile time option preventing other interrupts from occurring while the control endpoint
  809. * request is being processed, causing possible lockups if a USB interrupt occurs during a transfer
  810. * - Remove incorrect Abstract Call Management class specific descriptor from the CDC demos, bootloaders and projects
  811. *
  812. *
  813. * \section Sec_ChangeLog100219 Version 100219
  814. *
  815. * <b>New:</b>
  816. * - Added TPI programming support for 6-pin ATTINY devices to the AVRISP programmer project (thanks to Tom Light)
  817. * - Added command timeout counter to the AVRISP project so that the device no longer freezes when incorrectly connected
  818. * to a target
  819. * - Added new TemperatureDataLogger application, a USB data logger which writes to the device's dataflash and appears to
  820. * the host as a standard Mass Storage device when inserted
  821. * - Added MIDI event packing support to the MIDI Device and Host mode Class drivers, allowing for multiple MIDI events to
  822. * sent or received in packed form in a single USB packet
  823. * - Added new MIDI send buffer flush routines to the MIDI Device and Host mode Class drivers, to flush packed events
  824. * - Added master mode hardware TWI driver for easy TWI peripheral control
  825. * - Added ADC MUX masks for the standard ADC input channels on all AVR models with an ADC, altered demos to use these masks
  826. * as on some models, the channel number is not identical to its single-ended ADC MUX mask
  827. * - New Webserver project, a RNDIS host USB webserver using the open source uIP TCP/IP network stack and FatFS library
  828. * - New BOARD value option BOARD_NONE (equivalent to not specifying BOARD) which will remove all board hardware drivers which
  829. * do not adversely affect the code operation (currently only the LEDs driver)
  830. * - Added keyboard modifier masks (HID_KEYBOARD_MODIFER_*) and LED report masks (KEYBOARD_LED_*) to the HID class driver and
  831. * Keyboard demos
  832. * - Added .5MHz recovery clock to the AVRISP programmer project when in ISP programming mode to correct mis-set fuses
  833. *
  834. * <b>Changed:</b>
  835. * - Slowed down software USART carried PDI programming in the AVRISP project to prevent transmission errors
  836. * - Renamed the AVRISP project folder to AVRISP-MKII to reduce confusion
  837. * - Renamed the RESET_LINE_* makefile tokens in the AVRISP MKII Project to AUX_LINE_*, as they are not always used for target
  838. * reset
  839. * - Changed over the MassStorageKeyboard Class driver device demo to use Start of Frame events rather than a timer to keep track
  840. * of elapsed milliseconds
  841. * - Inlined currently unused (but standardized) maintenance functions in the Device and Host Class drivers to save space
  842. * - The XPLAINBridge project now selects between a USB to Serial bridge and a PDI programmer on startup, reading the JTAG port's
  843. * TDI pin to determine which mode to use
  844. * - Removed the stream example code from the Low Level VirtualSerial demos, as they were buggy and only served to add clutter
  845. *
  846. * <b>Fixed:</b>
  847. * - Fixed AVRISP project not able to enter programming mode when ISP protocol is used
  848. * - Fixed AVRISP PDI race condition where the guard time between direction changes could be interpreted as a start bit
  849. * - Fixed ADC_IsReadingComplete() returning an inverted result
  850. * - Fixed blocking CDC streams not aborting when the host is disconnected
  851. * - Fixed XPLAIN board Dataflash driver broken due to incorrect preprocessor commands
  852. * - Fixed inverted XPLAIN LED driver output (LED turned on when it was supposed to be turned off, and vice-versa)
  853. * - Fixed Class Driver struct interface numbers in the KeyboardMouse and VirtualSerialMouse demos (thanks to Renaud Cerrato)
  854. * - Fixed invalid USB controller PLL prescaler values for the ATMEGAxxU2 controllers
  855. * - Fixed lack of support for the ATMEGA32U2 in the DFU and CDC class bootloaders
  856. * - Fixed Benito project not resetting the target AVR automatically when programming has completed
  857. * - Fixed DFU bootloader programming not discarding the correct number of filler bytes from the host when non-aligned programming
  858. * ranges are specified (thanks to Thomas Bleeker)
  859. * - Fixed CDC and RNDIS host demos and class drivers - bidirectional endpoints should use two separate pipes, not one half-duplex pipe
  860. * - Fixed Pipe_IsEndpointBound() not taking the endpoint's direction into account
  861. * - Fixed EEPROM and FLASH ISP programming in the AVRISP project
  862. * - Fixed incorrect values of USB_CONFIG_ATTR_SELFPOWERED and USB_CONFIG_ATTR_REMOTEWAKEUP tokens (thanks to Claus Christensen)
  863. * - Fixed SerialStream driver blocking while waiting for characters to be received instead of returning EOF
  864. * - Fixed SerialStream driver not setting stdin to the created serial stream (thanks to Mike Alexander)
  865. * - Fixed USB_GetHIDReportSize() returning the number of bits in the specified report instead of bytes
  866. * - Fixed AVRISP project not extending the command delay after each successful page/word/byte program
  867. * - Fixed accuracy of the SERIAL_UBBRVAL() and SERIAL_2X_UBBRVAL() macros for higher baud rates (thanks to Renaud Cerrato)
  868. *
  869. *
  870. * \section Sec_ChangeLog091223 Version 091223
  871. *
  872. * <b>New:</b>
  873. * - Added activity LED indicators to the AVRISP project to indicate when the device is busy processing a command
  874. * - The USB target family and allowable USB mode tokens are now public and documented (USB_CAN_BE_*, USB_SERIES_*_AVR)
  875. * - Added new XPLAIN USB to Serial Bridge project (thanks to John Steggall for initial proof-of-concept, David Prentice
  876. * and Peter Danneger for revised software USART code)
  877. * - Added new RNDIS Ethernet Host LowLevel demo
  878. * - Added new RNDIS Ethernet Host Class Driver
  879. * - Added new RNDIS Ethernet Host ClassDriver demo
  880. * - Added CDC_Host_Flush() function to the CDC Host Class driver to flush sent data to the attached device
  881. * - Added PDI programming support for XMEGA devices to the AVRISP programmer project (thanks to Justin Mattair)
  882. * - Added support for the XPLAIN board Dataflash, with new XPLAIN_REV1 board target for the different Dataflash used
  883. * on the first revision boards compared to the one mounted on later revisions
  884. * - Added new HID_ALIGN_DATA() macro to return the pre-retrieved value of a HID report item, left-aligned to a given datatype
  885. * - Added new PreviousValue to the HID Report Parser report item structure, for easy monitoring of previous report item values
  886. * - Added new EVK527 board target
  887. * - Added new USB_Host_GetDeviceStringDescriptor() convenience function
  888. * - Added new LEDNotification project to the library, to give a visual LED notification on new events from the host
  889. * - Added new NO_DEVICE_REMOTE_WAKEUP and NO_DEVICE_SELF_POWER compile time options
  890. *
  891. * <b>Changed:</b>
  892. * - Removed code in the Keyboard demos to send zeroed reports between two reports with differing numbers of key codes
  893. * as this relied on non-standard OS driver behaviour to repeat key groups
  894. * - The SCSI_Request_Sense_Response_t and SCSI_Inquiry_Response_t type defines are now part of the Mass Storage Class
  895. * driver common defines, rather than being defined in the Host mode Class driver section only
  896. * - The USB_MODE_HOST token is now defined even when host mode is not available
  897. * - The CALLBACK_HID_Device_CreateHIDReport() HID Device Class driver callback now has a new ReportType parameter to
  898. * indicate the report type to generate
  899. * - All Class Drivers now return false or the "DeviceDisconnected" error code of their respective error enums when a function
  900. * is called when no host/device is connected where possible
  901. * - The HOST_SENDCONTROL_DeviceDisconnect enum value has been renamed to HOST_SENDCONTROL_DeviceDisconnected to be in line
  902. * with the rest of the library error codes
  903. * - Make MIDI device demos also turn off the on board LEDs if MIDI Note On messages are sent with a velocity of zero,
  904. * which some devices use instead of Note Off messages (thanks to Robin Green)
  905. * - The CDC demos are now named "VirtualSerial" instead to indicate the demos' function rather than its implemented USB class,
  906. * to reduce confusion and to be in line with the rest of the LUFA demos
  907. * - The SImage_Host_SendBlockHeader() and SImage_Host_ReceiveBlockHeader() Still Image Host Class driver functions are now public
  908. *
  909. * <b>Fixed:</b>
  910. * - Added missing CDC_Host_CreateBlockingStream() function code to the CDC Host Class driver
  911. * - Fixed incorrect values for REPORT_ITEM_TYPE_* enum values causing corrupt data in the HID Host Parser
  912. * - Fixed misnamed SI_Host_USBTask() and SI_Host_ConfigurePipes() functions
  913. * - Fixed broken USB_GetNextDescriptor() function causing the descriptor to jump ahead double the expected amount
  914. * - Fixed Pipe_IsEndpointBound() not masking the given Endpoint Address against PIPE_EPNUM_MASK
  915. * - Fixed host state machine not enabling Auto VBUS mode when HOST_DEVICE_SETTLE_DELAY_MS is set to zero
  916. * - Fixed misnamed Pipe_SetPipeToken() macro for setting a pipe's direction
  917. * - Fixed CDCHost failing on devices with bidirectional endpoints
  918. * - Fixed USB driver failing to define the PLL prescaler mask for the ATMEGA8U2 and ATMEGA16U2
  919. * - Fixed HID Parser not distributing the Usage Min and Usage Max values across an array of report items
  920. * - Fixed Mass Storage Host Class driver and Low Level demo not clearing the error condition if an attached device returns a
  921. * STALL to a GET MAX LUN request (thanks to Martin Luxen)
  922. * - Fixed TeensyHID bootloader not properly shutting down the USB interface to trigger a disconnection on the host before resetting
  923. * - Fixed MassStorageHost Class driver demo not having USB_STREAM_TIMEOUT_MS compile time option set properly to prevent slow
  924. * devices from timing out the data pipes
  925. * - Fixed the definition of the Endpoint_BytesInEndpoint() macro for the U4 series AVR parts
  926. * - Fixed MIDI host Class driver MIDI_Host_SendEventPacket() routine not properly checking for Pipe ready before writing
  927. * - Fixed use of deprecated struct initializers, removed library unused parameter warnings when compiled with -Wextra enabled
  928. * - Fixed Still Image Host Class driver truncating the PIMA response code (thanks to Daniel Seibert)
  929. * - Fixed USB_CurrentMode not being reset to USB_MODE_NONE when the USB interface is shut down and both Host and Device modes can be
  930. * used (thanks to Daniel Levy)
  931. * - Fixed TeensyHID bootloader not enumerating to the host correctly (thanks to Clint Fisher)
  932. * - Fixed AVRISP project timeouts not checking for the correct timeout period (thanks to Carl Ott)
  933. * - Fixed STK525 Dataflash driver using incorrect bit-shifting for Dataflash addresses (thanks to Tim Mitchell)
  934. *
  935. *
  936. * \section Sec_ChangeLog091122 Version 091122
  937. *
  938. * <b>New:</b>
  939. * - Added new Dual Role Keyboard/Mouse demo
  940. * - Added new HID_HOST_BOOT_PROTOCOL_ONLY compile time token to reduce the size of the HID Host Class driver when
  941. * Report protocol is not needed
  942. * - Added new MIDI LowLevel and ClassDriver Host demo, add new MIDI Host Class driver
  943. * - Added new CDC/Mouse ClassDriver device demo
  944. * - Added new Joystick Host ClassDriver and LowLevel demos
  945. * - Added new Printer Host mode Class driver
  946. * - Added new Printer Host mode ClassDriver demo
  947. * - Added optional support for double banked endpoints and pipes in the Device and Host mode Class drivers
  948. * - Added new stream creation function to the CDC Class drivers, to easily make standard I/O streams from CDC Class driver instances
  949. *
  950. * <b>Changed:</b>
  951. * - Removed mostly useless "TestApp" demo, as it was mainly useful only for checking for syntax errors in the library
  952. * - MIDI device demos now receive MIDI events from the host and display note ON messages via the board LEDs
  953. * - Cleanups to the Device mode Mass Storage demo application SCSI routines
  954. * - Changed Audio Class driver sample read/write functions to be inline, to reduce the number of cycles needed to transfer
  955. * samples to and from the device (allowing more time for sample processing and output)
  956. * - Audio class Device mode demos now work at both 16MHz and 8MHz, rather than just at 8MHz
  957. * - The previous USBtoSerial demo has been moved into the projects directory, as it was just a modified CDC demo
  958. * - The Endpoint/Pipe functions now use the const qualifier on the input buffer
  959. * - Changed the CALLBACK_HIDParser_FilterHIDReportItem() callback to pass a HID_ReportItem_t rather than just the current
  960. * item's attributes, to expose more information on the item (including it's type, collection path, etc.)
  961. * - Changed MouseHostWithParser demos to check that the report items have a Mouse usage collection as a parent at some point,
  962. * to prevent Joysticks from enumerating with the demo
  963. * - Corrected the name of the misnamed USB_GetDeviceConfigDescriptor() function to USB_Host_GetDeviceConfigDescriptor().
  964. * - Keyboard LowLevel/ClassDriver demos now support multiple simultaneous key presses (up to 6) per report
  965. *
  966. * <b>Fixed:</b>
  967. * - Fixed PrinterHost demo returning invalid Device ID data when the attached device does not have a
  968. * device ID (thanks to Andrei Krainev)
  969. * - Changed LUFA_VERSION_INTEGER define to use BCD values, to make comparisons easier
  970. * - Fixed issue in the HID Host class driver's HID_Host_SendReportByID() routine using the incorrect mode (control/pipe)
  971. * to send report to the attached device
  972. * - Fixed ClassDriver AudioOutput device demo not selecting an audio output mode
  973. * - Fixed incorrect SampleFrequencyType value in the AudioInput and AudioOutput ClassDriver demos' descriptors
  974. * - Fixed incorrect event name rule in demo/project/bootloader makefiles
  975. * - Fixed HID device class driver not reselecting the correct endpoint once the user callback routines have been called
  976. * - Corrected HID descriptor in the Joystick Device demos - buttons should be placed outside the pointer collection
  977. * - Fixed HID report parser collection paths invalid due to misplaced semicolon in the free path item search loop
  978. * - Fixed HID host Class driver report send/receive report broken when issued through the control pipe
  979. * - Fixed HOST_STATE_AS_GPIOR compile time option being ignored when in host mode (thanks to David Lyons)
  980. * - Fixed LowLevel Keyboard demo not saving the issues report only after it has been sent to the host
  981. * - Fixed Endpoint_Write_Control_Stream_* functions not sending a terminating IN when given data Length is zero
  982. *
  983. *
  984. * \section Sec_ChangeLog090924 Version 090924
  985. *
  986. * <b>New:</b>
  987. * - Added new host mode class drivers and matching demos to the library for rapid application development
  988. * - Added flag to the HID report parser to indicate if a device has multiple reports
  989. * - Added new EVENT_USB_Device_StartOfFrame() event, controlled by the new USB_Device_EnableSOFEvents() and
  990. * USB_Device_DisableSOFEvents() macros to give bus-synchronized millisecond interrupts when in USB device mode
  991. * - Added new Endpoint_SetEndpointDirection() macro for bidirectional endpoints
  992. * - Added new AVRISP project, a LUFA powered clone of the Atmel AVRISP-MKII programmer
  993. * - Added ShutDown() functions for all hardware peripheral drivers, so that peripherals can be turned off after use
  994. * - Added new CDC_Device_Flush() command to the device mode CDC Class driver to flush Device->Host data
  995. * - Added extra masks to the SPI driver, changed SPI_Init() so that the clock polarity and sample modes can be set
  996. * - Added new callback to the HID report parser, so that the user application can filter only the items it is interested
  997. * in to be stored into the HIDReportInfo structure to save RAM
  998. * - Added support for the officially recommended external peripheral layout for the BUMBLEB board (thanks to Dave Fletcher)
  999. * - Added new Pipe_IsFrozen() macro to determine if the currently selected pipe is frozen
  1000. * - Added new USB_GetHIDReportSize() function to the HID report parser to retrieve the size of a given report by its ID
  1001. * - Added new combined Mass Storage and Keyboard demo (thanks to Matthias Hullin)
  1002. *
  1003. * <b>Changed:</b>
  1004. * - SetIdle requests to the HID device driver with a 0 idle period (send changes only) now only affect the requested
  1005. * HID interface within the device, not all HID interfaces
  1006. * - Added explicit attribute masks to the device mode demos' descriptors
  1007. * - Added return values to the CDC and MIDI class driver transmit functions
  1008. * - Optimized Endpoint_Read_Word_* and Pipe_Read_Word_* macros to reduce compiled size
  1009. * - Added non-null function parameter pointer restrictions to USB Class drivers to improve user code reliability
  1010. * - Added new "Common" section to the class drivers, to hold all mode-independent definitions for clarity
  1011. * - Moved SCSI command/sense constants into the Mass Storage Class driver, instead of the user-code
  1012. * - Altered the SCSI commands in the LowLevel Mass Storage Host to save on FLASH space by reducing function calls
  1013. * - Changed the parameters and behaviour of the USB_GetDeviceConfigDescriptor() function so that it now performs size checks
  1014. * and data validations internally, to simplify user code
  1015. * - Changed HIDParser to only zero out important values in the Parsed HID Report Item Information structure to save cycles
  1016. * - The HID report parser now always processed FEATURE items - HID_ENABLE_FEATURE_PROCESSING token now has no effect
  1017. * - The HID report parser now always ignores constant-data items, HID_INCLUDE_CONSTANT_DATA_ITEMS token now has no effect
  1018. * - The Benito Programmer project now has its own unique VID/PID pair allocated from the Atmel donated LUFA VID/PID pool
  1019. * - Add in new invalid event hook check targets to project makefiles to produce compilation errors when invalid event names
  1020. * are used in a project
  1021. * - The HID Report Parser now gives information on the total length of each report within a HID interface
  1022. * - The USE_NONSTANDARD_DESCRIPTOR_NAMES compile time token has been removed - there are now separate USB_Descriptor_* and
  1023. * USB_StdDescriptor_* structures for both the LUFA and standardized element naming conventions so both may be used
  1024. *
  1025. * <b>Fixed:</b>
  1026. * - Fixed possible lockup in the CDC device class driver, when the host sends data that is a multiple of the
  1027. * endpoint's bank
  1028. * - Fixed swapped parameters in the HID state memory copy call while processing a HID PUSH item in the HID report parser
  1029. * - Fixed memory corruption HID report parser when too many COLLECTION or PUSH items were processed
  1030. * - Fixed HID report parser not resetting the FEATURE item count when a REPORT ID item is encountered
  1031. * - Fixed USBtoSerial demos not reading in UDR1 when the USART receives data but the USB interface is not enumerated,
  1032. * causing continuous USART receive interrupts
  1033. * - Fixed misspelled event name in the Class driver USBtoSerial demo, preventing correct operation
  1034. * - Fixed invalid data being returned when a GetStatus request is issued in Device mode with an unhandled data recipient
  1035. * - Added hardware USART receive interrupt and software buffering to the Benito project to ensure received data is not
  1036. * missed or corrupted
  1037. * - Fixed Device mode HID Class driver always sending IN packets, even when nothing to report
  1038. * - Fixed Device mode HID Class driver not explicitly initializing the ReportSize parameter to zero before calling callback
  1039. * routine, so that ignored callbacks don't cause incorrect data to be sent
  1040. * - Fixed StillImageHost not correctly freezing and unfreezing data pipes while waiting for a response block header
  1041. * - Fixed error in the PrinterHost demo preventing the full page data from being sent to the attached device (thanks to John Andrews)
  1042. * - Fixed CDC based demos and projects' INF driver files under 64 bit versions of Windows (thanks to Ronny Hanson, Thomas Bleeker)
  1043. * - Re-add in missing flip, flip-ee, dfu and dfu-ee targets to project makefiles (thanks to Opendous Inc.)
  1044. * - Fix allowable F_CPU values comment in project makefiles to more accurately reflect the allowable values on the USB AVRs
  1045. * - Fixed DFU and CDC class bootloaders on the series 2 USB AVRs, corrected invalid signatures, added support for the new
  1046. * ATMEGAxx2 series 2 variant AVRs to the DFU bootloader
  1047. * - Fixed Low Level USBtoSerial demo not storing received characters (thanks to Michael Cooper)
  1048. * - Fixed MIDI Device Class driver not sending/receiving MIDI packets of the correct size (thanks to Thomas Bleeker)
  1049. *
  1050. *
  1051. * \section Sec_ChangeLog090810 Version 090810
  1052. *
  1053. * <b>New:</b>
  1054. * - Added new device class drivers and matching demos to the library for rapid application development
  1055. * - Added new PrinterHost demo (thanks to John Andrews)
  1056. * - Added USB Missile Launcher project, submitted by Dave Fletcher
  1057. * - Added new Benito Arduino Programmer project
  1058. * - Added incomplete device and host mode demos for later enhancement
  1059. * - Updated MassStorage device block write routines to use ping-pong Dataflash buffering to increase throughput by around 30%
  1060. * - Error status LEDs shown when device endpoint configuration fails to complete in all demos and projects
  1061. * - Added new USB_Host_SetDeviceConfiguration() convenience function for easy configuration selection of devices while in USB
  1062. * host mode
  1063. * - Added new USB_Host_ClearPipeStall() convenience function to clear a stall condition on an attached device's endpoint
  1064. * - Added new USB_Host_GetDeviceDescriptor() convenience function to retrieve the attached device's Device descriptor
  1065. * - Added new Endpoint_ClearStatusStage() convenience function to assist with the status stages of control transfers
  1066. * - Added new USE_INTERNAL_SERIAL define for using the unique serial numbers in some AVR models as the USB device's serial number,
  1067. * added NO_INTERNAL_SERIAL compile time option to turn off new serial number reading code
  1068. * - Added new DATAFLASH_CHIP_MASK() macro to the Dataflash driver, which returns the Dataflash select mask for the given chip index
  1069. * - Added new HOST_STATE_WaitForDeviceRemoval host state machine state for non-blocking disabling of device communications until the
  1070. * device has been removed (for use when an error occurs or communications with the device have completed)
  1071. * - Added new FAST_STREAM_TRANSFERS compile time option for faster stream transfers via multiple bytes copied per stream loop
  1072. * - Added stdio stream demo code to the CDC device demos, to show how to create standard streams out of the virtual serial ports
  1073. * - Added new EEPROM and FLASH buffer versions of the Endpoint and Pipe stream functions
  1074. * - Added new USE_FLASH_DESCRIPTORS and FIXED_NUM_CONFIGURATIONS compile time options
  1075. * - Added support for the new ATMEGA32U2, ATMEGA16U2 and ATMEGA8U2 AVR models
  1076. * - Added new USB_DeviceState variable to keep track of the current Device mode USB state
  1077. * - Added new LEDs_ToggleLEDs() function to the LEDs driver
  1078. * - Added new Pipe_BoundEndpointNumber() and Pipe_IsEndpointBound() functions
  1079. * - Added new DEVICE_STATE_AS_GPIOR and HOST_STATE_AS_GPIOR compile time options
  1080. * - Added 404 Not Found errors to the webserver in the RNDIS demos to indicate invalid URLs
  1081. *
  1082. * <b>Changed:</b>
  1083. * - Deprecated pseudo-scheduler and removed dynamic memory allocator from the library (first no longer needed and second unused)
  1084. * - The device-mode CALLBACK_USB_GetDescriptor() function now has an extra parameter so that the memory space in which the requested
  1085. * descriptor is located can be specified. This means that descriptors can now be located in multiple memory spaces within a device.
  1086. * - Removed vague USB_IsConnected global - test USB_DeviceState or USB_HostState explicitly to gain previous functionality
  1087. * - Removed USB_IsSuspended global - test USB_DeviceState against DEVICE_STATE_Suspended instead
  1088. * - Extended USB_GetDeviceConfigDescriptor() routine to require the configuration number within the device to fetch
  1089. * - Dataflash_WaitWhileBusy() now always ensures that the dataflash is ready for the next command immediately after returning,
  1090. * no need to call Dataflash_ToggleSelectedChipCS() afterwards
  1091. * - Low level API MIDI device demo no longer blocks if a note change event is sent while the endpoint is not ready
  1092. * - Pipe_GetErrorFlags() now returns additional error flags for overflow and underflow errors
  1093. * - Pipe stream functions now automatically set the correct pipe token, so that bidirectional pipes can be used
  1094. * - Pipe_ConfigurePipe() now automatically defaults IN pipes to accepting infinite IN requests, this can still be changed by calling
  1095. * the existing Pipe_SetFiniteINRequests() function
  1096. * - Changed F_USB entries in project makefiles to alias to F_CPU by default, as this is the most common case
  1097. * - Host mode demos now use sane terminal escape codes, so that text is always readable and events/program output is visually distinguished
  1098. * from one another using foreground colours
  1099. * - Internal per-device preprocessing conditions changed to per-device series rather than per-controller group for finer-grain
  1100. * internal control
  1101. * - Interrupts are no longer disabled during the processing of Control Requests on the default endpoint while in device mode
  1102. * - AudioOutput demos now always output to board LEDs, regardless of output mode (removed AUDIO_OUT_LEDS project option)
  1103. * - Removed SINGLE_DEVICE_CONFIGURATION compile time option in favor of the new FIXED_NUM_CONFIGURATIONS option so that the exact number
  1104. * of device configurations can be defined statically
  1105. * - Removed VBUS events, as they are already exposed to the user application via the regular device connection and disconnection events
  1106. * - Renamed and altered existing events to properly separate out Host and Device mode events
  1107. * - All demos switched over from GNU99 standards mode to C99 standards mode, to reduce the dependencies on GCC-only language extensions
  1108. *
  1109. * <b>Fixed:</b>
  1110. * - Changed bootloaders to use FLASHEND rather than the existence of RAMPZ to determine if far FLASH pointers are needed to fix
  1111. * bootloaders on some of the USB AVR devices where avr-libc erroneously defines RAMPZ
  1112. * - Fixes to MassStorageHost for better device compatibility (increase command timeout, change MassStore_WaitForDataReceived()
  1113. * to only unfreeze and check one data pipe at a time) to prevent incorrect device enumerations and freezes while transferring data
  1114. * - Make Pipe_ConfigurePipe() mask the given endpoint number against PIPE_EPNUM_MASK to ensure the endpoint IN direction bit is
  1115. * cleared to prevent endpoint type corruption
  1116. * - Fixed issue opening CDC-ACM ports on hosts when the CDC device tries to send data before the host has set the line encoding
  1117. * - Fixed USB_OPT_MANUAL_PLL option being ignored during device disconnects on some models (thanks to Brian Dickman)
  1118. * - Fixed documentation mentioning Pipe_GetCurrentToken() function when correct function name is Pipe_GetPipeToken()
  1119. * - Fixed ADC driver for the ATMEGA32U4 and ATMEGA16U4 (thanks to Opendous Inc.)
  1120. * - Fixed CDCHost demo unfreezing the pipes at the point of configuration, rather than use
  1121. * - Fixed MassStorage demo not clearing the reset flag when a Mass Storage Reset is issued while not processing a command
  1122. * - Fixed USB_Host_SendControlRequest() not re-suspending the USB bus when initial device ready-wait fails
  1123. * - Fixed USB Pad regulator not being disabled on some AVR models when the USB_OPT_REG_DISABLED option is used
  1124. * - Fixed Host mode to Device mode UID change not causing a USB Disconnect event when a device was connected
  1125. * - Fixed Mouse/Keyboard demos not performing the correct arithmetic on the Idle period at the right times (thanks to Brian Dickman)
  1126. * - Fixed GenericHID failing HID class tests due to incorrect Logical Minimum and Logical Maximum values (thanks to Soren Greiner)
  1127. * - Fixed incorrect PIPE_EPNUM_MASK mask causing pipe failures on devices with endpoint addresses of 8 and above (thanks to John Andrews)
  1128. * - Fixed report data alignment issues in the MouseHostWithParser demo when X and Y movement data size is not a multiple of 8 bits
  1129. * - Fixed HID Report Descriptor Parser not correctly resetting internal states when a REPORT ID element is encountered
  1130. * - Fixed incorrect BUTTONS_BUTTON1 for the STK526 target
  1131. * - Fixed RNDIS demos freezing when more than one connection was attempted simultaneously, causing memory corruption
  1132. * - Fixed USBtoSerial demo receiving noise from the USART due to pull-up not being enabled
  1133. *
  1134. *
  1135. * \section Sec_ChangeLog090605 Version 090605
  1136. *
  1137. * - Fixed bug in RNDISEthernet and DualCDC demos not using the correct USB_ControlRequest structure for control request data
  1138. * - Fixed documentation showing incorrect USB mode support on the supported AVRs list
  1139. * - Fixed RNDISEthernet not working under Linux due to Linux requiring an "optional" RNDIS request which was unhandled
  1140. * - Fixed Mouse and Keyboard device demos not acting in accordance with the HID specification for idle periods (thanks to Brian Dickman)
  1141. * - Removed support for endpoint/pipe non-control interrupts; these did not act in the way users expected, and had many subtle issues
  1142. * - Fixed Device Mode not handling Set Feature and Clear Feature Chapter 9 requests that are addressed to the device (thanks to Brian Dickman)
  1143. * - Moved control endpoint interrupt handling into the library itself, enable via the new INTERRUPT_CONTROL_ENDPOINT token
  1144. * - Fixed CDCHost not clearing configured pipes and resetting configured pipes mask when a partially enumerated invalid CDC
  1145. * interface is skipped
  1146. * - Clarified the size of library tokens which accept integer values in the Compile Time Tokens page, values now use the smallest datatype
  1147. * inside the library that is able to hold their defined value to save space
  1148. * - Removed DESCRIPTOR_ADDRESS() macro as it was largely superfluous and only served to obfuscate code
  1149. * - Rewritten event system to remove all macros, to make user code clearer
  1150. * - Fixed incorrect ENDPOINT_EPNUM_MASK mask preventing endpoints above EP3 from being selected (thanks to Jonathan Oakley)
  1151. * - Removed STREAM_CALLBACK() macro - callbacks now use regular function definitions to clarify user code
  1152. * - Removed DESCRIPTOR_COMPARATOR() macro - comparators should now use regular function definitions to clarify user code
  1153. * - USB_IsConnected is now cleared before the USB_Disconnect() event is fired in response to VBUS being removed
  1154. * - Fixed incorrect PID value being used in the USBtoSerial project (thanks to Phill)
  1155. * - Deleted StdDescriptors.c, renamed USB_GetDescriptor() to CALLBACK_USB_GetDescriptor, moved ConfigDescriptor.c/.h from the
  1156. * LUFA/Drivers/USB/Class/ directory to LUFA/Drivers/USB/HighLevel/ in preparation for the new USB class APIs
  1157. * - Moved out each demos' functionality library files (e.g. Ring Buffer library) to /Lib directories for a better directory structure
  1158. * - Removed Tx interrupt from the USBtoSerial demo; now sends characters via polling to ensure more time for the Rx interrupt
  1159. * - Fixed possible enumeration errors from spin-loops which may fail to exit if the USB connection is severed before the exit condition
  1160. * becomes true
  1161. *
  1162. *
  1163. * \section Sec_ChangeLog090510 Version 090510
  1164. *
  1165. * - Added new GenericHIDHost demo
  1166. * - Corrections to the KeyboardHost and MouseHost demos' pipe handling to freeze and unfreeze the data pipes at the point of use
  1167. * - KeyboardHost, MouseHost and GenericHIDHost demos now save and restore the currently selected pipe inside the pipe ISR
  1168. * - Changed GenericHID device demo to use the LUFA scheduler, added INTERRUPT_DATA_ENDPOINT and INTERRUPT_CONTROL_ENDPOINT compile
  1169. * time options
  1170. * - All comments in the library, bootloaders, demos and projects have now been spell-checked and spelling mistakes/typos corrected
  1171. * - Added new PIMA_DATA_SIZE() define to the Still Image Host demo
  1172. * - Add call to MassStore_WaitForDataReceived() in MassStore_GetReturnedStatus() to ensure that the CSW has been received in the
  1173. * extended MSC timeout period before continuing, to prevent long processing delays from causing the MassStore_GetReturnedStatus()
  1174. * to early-abort (thanks to Dmitry Maksimov)
  1175. * - Move StdRequestType.h, StreamCallbacks.h, USBMode.h from the LowLevel USB driver directory to the HighLevel USB driver directory,
  1176. * where they are more suited
  1177. * - Removed all binary constants and replaced with decimal or hexadecimal constants so that unpatched GCC compilers can still build the
  1178. * code without having to be itself patched and recompiled first
  1179. * - Added preprocessor checks and documentation to the bootloaders giving information about missing SIGNATURE_x defines due to
  1180. * outdated avr-libc versions.
  1181. * - Added support to the CDCHost demo for devices with multiple CDC interfaces which are not the correct ACM type preceding the desired
  1182. * ACM CDC interface
  1183. * - Fixed GenericHID demo not starting USB and HID management tasks when not using interrupt driven modes (thanks to Carl Kjeldsen)
  1184. * - Fixed RNDISEthenet demo checking the incorrect message field for packet size constraints (thanks to Jonathan Oakley)
  1185. * - Fixed WriteNextReport code in the GenericHIDHost demo using incorrect parameter types and not selecting the correct endpoint
  1186. * - Adjusted sample CTC timer calculations in the AudioOutput and AudioInput demos to match the CTC calculations in the AVR datasheet,
  1187. * and to fix instances where rounding caused the endpoint to underflow (thanks to Robin Theunis)
  1188. * - The USB_Host_SendControlRequest() function no longer automatically selects the Control pipe (pipe 0), so that other control type
  1189. * pipes can be used with the function
  1190. * - The USB Host management task now saves and restores the currently selected pipe before and after the task completes
  1191. * - Fixed GenericHIDHost demo report write routine incorrect for control type requests (thanks to Andrei Krainev)
  1192. * - Removed Endpoint_ClearCurrentBank() and Pipe_ClearCurrentBank() in favor of new Endpoint_ClearIN(), Endpoint_ClearOUT(),
  1193. * Pipe_ClearIN() and Pipe_ClearOUT() macros (done to allow for the detection of packets of zero length)
  1194. * - Renamed *_ReadWriteAllowed() macros to *_IsReadWriteAllowed() to remain consistent with the rest of the LUFA API
  1195. * - Endpoint_IsSetupReceived() macro has been renamed to Endpoint_IsSETUPReceived(), Endpoint_ClearSetupReceived() macro has been
  1196. * renamed to Endpoint_ClearSETUP(), the Pipe_IsSetupSent() macro has been renamed to Pipe_IsSETUPSent() and the
  1197. * Pipe_ClearSetupSent() macro is no longer applicable and should be removed - changes made to compliment the new endpoint and pipe
  1198. * bank management API
  1199. * - Updated all demos, bootloaders and projects to use the new endpoint and pipe management APIs (thanks to Roman Thiel from Curetis AG)
  1200. * - Updated library Doxygen documentation, added groups, changed documentation macro functions to real functions for clarity
  1201. * - Removed old endpoint and pipe aliased read/write/discard routines which did not have an explicit endian specifier for clarity
  1202. * - Removed the ButtLoadTag.h header file, as no one used for its intended purpose anyway
  1203. * - Renamed the main Drivers/AT90USBXXX directory to Drivers/Peripheral, renamed the Serial_Stream driver to SerialStream
  1204. * - Fixed CDC and USBtoSerial demos freezing where buffers were full while still transmitting or receiving (thanks to Peter Hand)
  1205. * - Removed "Host_" section of the function names in ConfigDescriptor.h, as most of the routines can now be used in device mode on the
  1206. * device descriptor
  1207. * - Renamed functions in the HID parser to have a "USB_" prefix and the acronym "HID" in the name
  1208. * - Fixed incorrect HID interface class and subclass values in the Mouse and KeyboardMouse demos (thanks to Brian Dickman)
  1209. * - Capitalized the "Descriptor_Search" and "Descriptor_Search_Comp" prefixes of the values in the DSearch_Return_ErrorCodes_t and
  1210. * DSearch_Comp_Return_ErrorCodes_t enums
  1211. * - Removed "ERROR" from the enum names in the endpoint and pipe stream error code enums
  1212. * - Renamed the USB_PowerOnErrorCodes_t enum to USB_InitErrorCodes_t, renamed the POWERON_ERROR_NoUSBModeSpecified enum value to
  1213. * USB_INITERROR_NoUSBModeSpecified
  1214. * - Renamed USB_PowerOnFail event to USB_InitFailure
  1215. * - Renamed OTG.h header functions to be more consistent with the rest of the library API
  1216. * - Changed over all deprecated GCC structure tag initializers to the standardized C99 format (thanks to Mike Alexander)
  1217. * - USB_HostRequest renamed to USB_ControlRequest, entire control request header is now read into USB_ControlRequest in Device mode
  1218. * rather than having the library pass only partially read header data to the application
  1219. * - The USB_UnhandledControlPacket event has had its parameters removed, in favor of accessing the new USB_ControlRequest structure
  1220. * - The Endpoint control stream functions now correctly send a ZLP to the host when less data than requested is sent
  1221. * - Fixed USB_RemoteWakeupEnabled flag never being set (the REMOTE WAKEUP Set Feature request was not being handled)
  1222. * - Renamed the FEATURELESS_CONTROL_ONLY_DEVICE compile-time token to CONTROL_ONLY_DEVICE
  1223. * - Endpoint configuration is now refined to give better output when all configurations have static inputs - removed the now useless
  1224. * STATIC_ENDPOINT_CONFIGURATION compile time token
  1225. * - Fixed SPI driver init function not clearing SPI2X bit when not needed
  1226. * - Fixed PREVENT ALLOW MEDIUM REMOVAL command issuing in the MassStorageHost demo using incorrect parameters (thanks to Mike Alex)
  1227. * - Fixed MassStorageHost demo broken due to an incorrect if statement test in MassStore_GetReturnedStatus()
  1228. * - Fixed reversed signature byte ordering in the CDC bootloader (thanks to Johannes Raschke)
  1229. * - Changed PIPE_CONTROLPIPE_DEFAULT_SIZE from 8 to 64 to try to prevent problems with faulty devices which do not respect the given
  1230. * wLength value when reading in the device descriptor
  1231. * - Fixed missing semicolon in the ATAVRUSBRF01 LED board driver code (thanks to Morten Lund)
  1232. * - Changed LED board driver code to define dummy LED masks for the first four board LEDs, so that user code can be compiled for boards
  1233. * with less than four LEDs without code modifications (thanks to Morten Lund)
  1234. * - Changed HWB board driver to Buttons driver, to allow for the support of future boards with more than one mounted GPIO button
  1235. * - Serial driver now correctly calculates the baud register value when in double speed mode
  1236. * - Init function of the Serial driver is now static inline to product smaller code for the common-case of static init values
  1237. *
  1238. *
  1239. * \section Sec_ChangeLog090401 Version 090401
  1240. *
  1241. * - Fixed MagStripe project configuration descriptor containing an unused (blank) endpoint descriptor
  1242. * - Incorporated makefile changes by Denver Gingerich to retain compatibility with stock (non-WinAVR) AVR-GCC installations
  1243. * - Fixed makefile EEPROM programming targets programming FLASH data in addition to EEPROM data
  1244. * - LUFA devices now enumerate correctly with LUFA hosts
  1245. * - Fixed Configuration Descriptor search routine freezing when a comparator returned a failure
  1246. * - Removed HID report item serial dump in the MouseHostWithParser and KeyboardHostWithParser - useful only for debugging, and
  1247. * slowed down the enumeration of HID devices too much
  1248. * - Increased the number of bits per track which can be read in the MagStripe project to 8192 when compiled for the AT90USBXXX6/7
  1249. * - Fixed KeyboardMouse demo discarding the wIndex value in the REQ_GetReport request
  1250. * - USBtoSerial demo now discards all Rx data when not connected to a USB host, rather than buffering characters for transmission
  1251. * next time the device is attached to a host.
  1252. * - Added new F_USB compile time constant to the library and makefiles, to give the raw input clock (used to feed the PLL before any
  1253. * clock prescaling is performed) frequency, so that the PLL prescale mask can be determined
  1254. * - Changed stream wait timeout counter to be 16-bit, so that very long timeout periods can be set for correct communications with
  1255. * badly designed hosts or devices which greatly exceed the USB specification limits
  1256. * - Mass Storage Host demo now uses a USB_STREAM_TIMEOUT_MS of two seconds to maintain compatibility with poorly designed devices
  1257. * - Function attribute ATTR_ALWAYSINLINE renamed to ATTR_ALWAYS_INLINE to match other function attribute macro naming conventions
  1258. * - Added ATTR_ALWAYS_INLINE attribute to several key inlined library components, to ensure they are inlined in all circumstances
  1259. * - Removed SetSystemClockPrescaler() macro, the clock_prescale_set() avr-libc macro has been corrected in recent avr-libc versions
  1260. * - Fixed incorrect/missing control status stage transfers on demos, bootloaders and applications (thanks to Nate Lawson)
  1261. * - The NO_CLEARSET_FEATURE_REQUEST compile time token has been renamed to FEATURELESS_CONTROL_ONLY_DEVICE, and its function expanded
  1262. * to also remove parts of the Get Status chapter 9 request to further reduce code usage
  1263. * - Makefile updated to include output giving the currently selected BOARD parameter value
  1264. * - Board Dataflash driver now allows for dataflash ICs which use different shifts for setting the current page/byte address (thanks
  1265. * to Kenneth Clubb)
  1266. * - Added DataflashManager_WriteBlocks_RAM() and DataflashManager_ReadBlocks_RAM() functions to the MassStorage demo, to allow for easy
  1267. * interfacing with a FAT library for dataflash file level access
  1268. * - Corrected CDC class bootloader to fix a few bugs, changed address counter to store x2 addresses for convenience
  1269. * - Fixed typos in the SPI driver SPI_SPEED_FCPU_DIV_64 and SPI_SPEED_FCPU_DIV_128 masks (thanks to Markus Zocholl)
  1270. * - Keyboard and Mouse device demos (normal, data interrupt and fully interrupt driven) combined into unified keyboard and mouse demos
  1271. * - Keyboard and Mouse host demos (normal and data interrupt driven) combined into unified keyboard and mouse demos
  1272. * - Removed AVRISP_Programmer project due to code quality concerns
  1273. * - Fixed CDC demo not sending an empty packet after each transfer to prevent the host from buffering incoming data
  1274. * - Fixed documentation typos and preprocessor checks relating to misspellings of the USE_RAM_DESCRIPTORS token (thanks to Ian Gregg)
  1275. * - Fixed USBTask.h not conditionally including HostChapter9.h only when USB_CAN_BE_HOST is defined (thanks to Ian Gregg)
  1276. * - Fixed incorrect ADC driver init register manipulation (thanks to Tobias)
  1277. * - Added new GenericHID device demo application
  1278. * - Fixed Still Image Host SImage_SendData() function not clearing the pipe bank after sending data
  1279. *
  1280. *
  1281. * \section Sec_ChangeLog090209 Version 090209
  1282. *
  1283. * - PWM timer mode in AudioOut demo changed to Fast PWM for speed
  1284. * - Updated Magstripe project to work with the latest hardware revision
  1285. * - Fixed library not responding to the BCERRI flag correctly in host mode, leading to device lockups
  1286. * - Fixed library handling Get Descriptor requests when not addressed as standard requests to the device or interface (thanks to
  1287. * Nate Lawson)
  1288. * - Fixed serious data corruption issue in MassStorage demo dataflash write routine
  1289. * - Added new NO_CLEARSET_FEATURE_REQUEST compile time token
  1290. * - USB task now restores previous global interrupt state after execution, rather than forcing global interrupts to be enabled
  1291. * - Fixed USB_DeviceEnumerationComplete event firing after each configuration change, rather than once after the initial configuration
  1292. * - Added ENDPOINT_DOUBLEBANK_SUPPORTED() macros to Endpoint.h, altered ENDPOINT_MAX_SIZE() to allow user to specify endpoint
  1293. * - ENDPOINT_MAX_ENDPOINTS changed to ENDPOINT_TOTAL_ENDPOINTS, PIPE_MAX_PIPES changed to PIPE_TOTAL_PIPES
  1294. * - Endpoint and Pipe non-control stream functions now ensure endpoint or pipe is ready before reading or writing
  1295. * - Changed Teensy bootloader to use a watchdog reset when exiting rather than a software jump
  1296. * - Fixed integer promotion error in MassStorage and MassStorageHost demos, corrupting read/write transfers
  1297. * - SPI_SendByte is now SPI_TransferByte, added new SPI_SendByte and SPI_ReceiveByte functions for fast one-way transfer
  1298. * - MassStorage demo changed to use new fast one-way SPI transfers to increase throughput
  1299. * - MassStorage handling of Mass Storage Reset class request improved
  1300. * - Altered MassStorage demo dataflash block read code for speed
  1301. * - Added USB_IsSuspended global flag
  1302. * - Simplified internal Dual Mode (OTG) USB library code to reduce code size
  1303. * - Extended stream timeout period to 100ms from 50ms
  1304. * - Mass Storage Host demo commands now all return an error code from the Pipe_Stream_RW_ErrorCodes_t enum
  1305. * - Added SubErrorCode parameter to the USB_DeviceEnumerationFailed event
  1306. * - VBUS drop interrupt now disabled during the manual-to-auto VBUS delivery handoff
  1307. * - Simplified low level backend so that device/host mode initialization uses the same code paths
  1308. * - Added workaround for faulty Mass Storage devices which do not implement the required GET_MAX_LUN request
  1309. * - Removed buggy Telnet application from the RNDIS demo
  1310. * - Moved Mass Storage class requests in the Mass Storage Host demo to wrapper functions in MassStoreCommands.c
  1311. * - Fixed incorrect SCSI command size value in the Request Sense command in MassStoreCommands.c
  1312. * - Added SetProtocol request to HID class non-parser Mouse and Keyboard demos to force devices to use the correct Boot Protocol
  1313. * - Added new "dfu" and "flip" programming targets to project makefiles
  1314. * - HID_PARSE_Sucessful enum member typo corrected to HID_PARSE_Successful
  1315. * - Changed COLLECTION item structures in the HID descriptor parser to include the collection's Usage Page value
  1316. * - Serial driver now sets Tx line as output, enables pull-up on Rx line
  1317. * - Fixed smaller USB AVRs raising multiple connection and disconnection events when NO_LIMITED_CONTROLLER_CONNECT is disabled
  1318. * - Added HOST_DEVICE_SETTLE_DELAY_MS to give the host delay after a device is connected before it is enumerated
  1319. * - Fixed KeyboardHostWithParser demo linking against the wrong global variables
  1320. * - Completed doxygen documentation of remaining library bootloaders, demos and projects
  1321. * - Fixed incorrect bootloader start address in the TeensyHID bootloader
  1322. * - Added HWB button whole-disk ASCII dump functionality to MassStoreHost demo
  1323. * - Replaced printf_P(PSTR("%c"), {Variable}) calls with putchar(<Variable>) for speed and size savings
  1324. * - Serial driver now accepts baud rates over 16-bits in size, added double speed flag option
  1325. * - Fixed incorrect callback abort return value in Pipe.c
  1326. * - Added new flip-ee and dfu-ee makefile targets (courtesy of Opendous Inc.)
  1327. * - Removed reboot-on-disconnect code from the TeensyHID bootloader, caused problems on some systems
  1328. * - Fixed AudioOutput and AudioInput demos looping on the endpoint data, rather than processing a sample at a time and returning
  1329. * each time the task runs to allow for other tasks to execute
  1330. * - Added support for the Atmel ATAVRUSBRF01 board
  1331. * - Added AVRISP Programmer Project, courtesy of Opendous Inc.
  1332. * - Fixed CDC Host demo not searching through both CDC interfaces for endpoints
  1333. * - Fixed incorrect Product String descriptor length in the DFU class bootloader
  1334. *
  1335. *
  1336. * \section Sec_ChangeLog081224 Version 081224
  1337. *
  1338. * - MyUSB name changed to LUFA, the Lightweight USB Framework for AVRs
  1339. * - Fixed Mass Storage Host demo's MassStore_SendCommand() delay in the incorrect place
  1340. * - Fixed USBtoSerial demo not calling ReconfigureUSART() after a change in the line encoding
  1341. * - Fixed infinite loop in host mode Host-to-Device control transfers with data stages
  1342. * - HID report parser now supports devices with multiple reports in one interface via Report IDs
  1343. * - Fixed RZUSBSTICK board LED driver header incorrect macro definition order causing compile errors
  1344. * - Calling USB_Init() when the USB interface is already configured now forces a complete interface reset
  1345. * and re-enumeration - fixes MyUSB DFU bootloader not switching to app code correctly when soft reset used
  1346. * - Fixed "No newline at end of file" warning when stream callbacks are enabled
  1347. * - DFU bootloader now uses fixed signature bytes per device, rather than reading them out dynamically for size
  1348. * - Added new FIXED_CONTROL_ENDPOINT_SIZE and USE_SINGLE_DEVICE_CONFIGURATION switches to statically define certain values to
  1349. * reduce compiled binary size
  1350. * - Added new NO_LIMITED_CONTROLLER_CONNECT switch to prevent the library from trying to determine bus connection
  1351. * state from the suspension and wake up events on the smaller USB AVRs
  1352. * - Added summary of all library compile time tokens to the documentation
  1353. * - Added overview of the LUFA scheduler to the documentation
  1354. * - Removed MANUAL_PLL_CONTROL compile time token, replaced with a mask for the USB_Init() Options parameter
  1355. * - CDC bootloader now uses the correct non-far or far versions of the pgm_* functions depending on if RAMPZ is defined
  1356. * - Doxygen documentation now contains documentation on all the projects, bootloaders and most demos included with the library
  1357. * - CDC bootloader now runs user application when USB disconnected rather than waiting for a hard reset
  1358. * - MouseHostWithParser and KeyboardHostWithParser now support multiple-report devices
  1359. * - RNDIS demo can now close connections correctly using the new TCP_APP_CLOSECONNECTION() macro - used in Webserver
  1360. * - Fixed the DFU bootloader, no longer freezes up when certain files are programmed into an AVR, made reading/writing faster
  1361. * - Fixed mouse/joystick up/down movements reversed - HID mouse X/Y coordinates use a left-handed coordinate system, not a normal
  1362. * right-handed system
  1363. * - Added stub code to the CDC and USBtoSerial demos showing how to read and set the RS-232 handshake lines - not currently used in
  1364. * the demos, but the example code and supporting defines are now in place
  1365. * - Interrupts are now disabled when processing a control request in device mode, to avoid exceeding the strict control request
  1366. * timing requirements.
  1367. * - All demos now use a central StatusUpdate() function rather than direct calls to the board LED functions, so that the demos can
  1368. * easily be altered to show different LED combinations (or do something else entirely) as the demo's status changes
  1369. * - Removed LED commands from the CDC bootloader, unused by most AVR910 programming software
  1370. * - Fixed RNDIS demo ICMP ping requests echoing back incorrect data
  1371. * - Added DHCP server code to RNDIS demo, allowing for hands-free auto configuration on any PC
  1372. * - Fixed DFU bootloader PID value for the ATMEGA16U4 AVR
  1373. * - Endpoint and Pipe configuration functions now return an error code indicating success or failure
  1374. * - USB Reset in device mode now resets and disables all device endpoints
  1375. * - Added intermediate states to the host mode state machine, reducing the USB task blocking time to no more than 1ms explicitly per
  1376. * invocation when in host mode
  1377. * - Added support for the ATMEGA32U6 microcontroller
  1378. * - Added STATIC_ENDPOINT_CONFIGURATION compile time option, enabled in the bootloaders to minimize space usage
  1379. * - Removed redundant code from the USB device GetStatus() chapter 9 processing routine
  1380. * - Added new TeensyHID bootloader, compatible with the Teensy HID protocol (http://www.pjrc.com/teensy/)
  1381. * - Versions are now numbered by release dates, rather than arbitrary major/minor revision numbers
  1382. * - USB_RemoteWakeupEnabled is now correctly set and cleared by SetFeature and ClearFeature requests from the host
  1383. * - Changed prototype of GetDescriptor, so that it now returns the descriptor size (or zero if the descriptor doesn't exist)
  1384. * rather than passing the size back to the caller through a parameter and returning a boolean
  1385. *
  1386. *
  1387. * \section Sec_ChangeLog153 Version 1.5.3 (081002)
  1388. *
  1389. * - Fixed CDC bootloader using pgmspace macros for some descriptors inappropriately
  1390. * - Updated all Mouse and Keyboard device demos to include boot protocol support (now works in BIOS)
  1391. * - Renamed bootloader directories to remove spaces, which were causing build problems on several OSes
  1392. * - Removed serial number strings from all but the MassStore demo where it is required - users were not
  1393. * modifying the code to either omit the descriptor or use a unique serial per device causing problems
  1394. * when multiple units of the same device were plugged in at the same time
  1395. * - AudioOutput and AudioInput demos now correctly silence endpoints when not enabled by the host
  1396. * - Added KeyboardMouse demo (Keyboard and Mouse functionality combined into a single demo)
  1397. * - Added DriverStubs directory to house board level driver templates, to make MyUSB compatible custom board
  1398. * driver creation easier
  1399. * - Extended MassStorage demo to support multiple LUNs, 2 by default
  1400. * - Fixed incorrect device address mask, preventing the device from enumerating with addresses larger than 63
  1401. * - Fixed incorrect data direction mask in the GetStatus standard request, preventing it from being handled
  1402. * - Fixed incorrect GetStatus standard request for endpoints, now returns the endpoint STALL status correctly
  1403. * - Added in new USB_RemoteWakeupEnabled and USB_CurrentlySelfPowered flags rather than using fixed values
  1404. * - Added DualCDC demo to demonstrate the use of Interface Association Descriptors
  1405. * - Added pipe NAK detection and clearing API
  1406. * - Added pipe status change (NAK, STALL, etc.) interrupt API
  1407. * - Fixed MassStorageHost demo so that it no longer freezes randomly when issuing several commands in a row
  1408. * - Host demos configuration descriptor routines now return a unique error code when the returned data does
  1409. * not have a valid configuration descriptor header
  1410. * - Added Endpoint_WaitUntilReady() and Pipe_WaitUntilReady() functions
  1411. * - Stream functions now have software timeouts, timeout period can be set by the USB_STREAM_TIMEOUT_MS token
  1412. * - All demos now pass the USB.org automated Chapter 9 device compliance tests
  1413. * - All HID demos now pass the USB.org automated HID compliance tests
  1414. * - Polling interval of the interrupt endpoint in the CDC based demos changed to 0xFF to fix problems on Linux systems
  1415. * - Changed stream functions to accept a new callback function, with NO_STREAM_CALLBACKS used to disable all callbacks
  1416. * - Mass Storage demo Dataflash management routines changed to use the endpoint stream functions
  1417. * - Added AVRStudio project files for each demo in addition to the existing Programmer's Notepad master project file
  1418. * - Re-added call to ReconfigureUSART() in USBtoSerial SetLineCoding request, so that baud rate changes
  1419. * are reflected in the hardware (change was previously lost)
  1420. *
  1421. *
  1422. * \section Sec_ChangeLog152 Version 1.5.2 (080731)
  1423. *
  1424. * - Fixed SwapEndian_32() function in Common.h so that it now works correctly (wrong parameter types)
  1425. * - Updated RNDIS demo - notification endpoint is no longer blocking so that it works with faulty Linux RNDIS
  1426. * implementations (where the notification endpoint is ignored in favor of polling the control endpoint)
  1427. * - Fixed incorrect Vendor Description string return size in RNDIS demo for the OID_GEN_VENDOR_DESCRIPTION OID token
  1428. * - Added very basic TCP/IP stack and HTTP/TELNET servers to RNDIS demo
  1429. * - Fixed DFU bootloader exit causing programming software to complain about failed writes
  1430. * - Fixed DFU bootloader EEPROM programming mode wiping first flash page
  1431. * - Fixed Clear/Set Feature device standard request processing code (fixing MassStorage demo in the process)
  1432. * - Added support for the ATMEGA16U4 AVR microcontroller
  1433. * - Library license changed from LGPLv3 to MIT license
  1434. *
  1435. *
  1436. * \section Sec_ChangeLog151 Version 1.5.1 (080707)
  1437. *
  1438. * - Changed host demos to enable the host function task on the firing of the USB_DeviceEnumerationComplete event
  1439. * rather than the USB_DeviceAttached event
  1440. * - HID Usage Stack now forcefully cleared after an IN/OUT/FEATURE item has been completely processed to remove
  1441. * any referenced but not created usages
  1442. * - Changed USB_INT_DisableAllInterrupts() and USB_INT_ClearAllInterrupts(), USB_Host_GetNextDescriptorOfType(),
  1443. * USB_Host_GetNextDescriptorOfTypeBefore(), USB_Host_GetNextDescriptorOfTypeAfter() to normal functions (from inline)
  1444. * - Fixed USBtoSerial demo not sending data, only receiving
  1445. * - Fixed main makefile to make all by default, fixed MagStripe directory case to prevent case-sensitive path problems
  1446. * - ConfigDescriptor functions made normal, instead of static inline
  1447. * - Pipe/Endpoint *_Ignore_* functions changed to *_Discard_*, old names still present as aliases
  1448. * - Fixed ENDPOINT_MAX_SIZE define to be correct on limited USB controller AVRs
  1449. * - Changed endpoint and pipe size translation routines to use previous IF/ELSE IF cascade code, new algorithmic
  1450. * approach was buggy and caused problems
  1451. * - Bootloaders now compile with -fno-inline-small-functions option to reduce code size
  1452. * - Audio demos now use correct endpoint sizes for full and limited controller USB AVRs, double banking in all cases
  1453. * to be in line with the specification (isochronous endpoints MUST be double banked)
  1454. * - Added Interface Association descriptor to StdDescriptors.h, based on the relevant USB2.0 ECN
  1455. * - Fixed MIDI demo, corrected Audio Streaming descriptor to follow the MIDI-specific AS structure
  1456. * - Fixed HID class demo descriptors so that the HID interface's protocol is 0x00 (required for non-boot protocol HID
  1457. * devices) to prevent problems on hosts expecting the boot protocol functions to be supported
  1458. * - Added read/write control stream functions to Endpoint.h
  1459. * - Fixed AudioOut demo not setting port pins to inputs on USB disconnect properly
  1460. * - Added RNDISEthernet demo application
  1461. *
  1462. *
  1463. * \section Sec_ChangeLog150 Version 1.5.0 (080610)
  1464. *
  1465. * - Fixed MIDI demo, now correctly waits for the endpoint to be ready between multiple note messages
  1466. * - Added CDC Host demo application
  1467. * - Added KeyboardFullInt demo application
  1468. * - Endpoint and Pipe creation routines now mask endpoint/pipe size with the size mask, to remove transaction
  1469. * size bits not required for the routines (improves compatibility with devices)
  1470. * - Fixed AudioInput demo - now correctly sends sampled audio to the host PC
  1471. * - Fixed AudioOutput demo once more -- apparently Windows requires endpoint packets to be >=192 bytes
  1472. * - Shrunk round-robin scheduler code slightly via the use of struct pointers rather than array indexes
  1473. * - Fixed off-by-one error when determining if the Usage Stack is full inside the HID Report parser
  1474. * - Renamed Magstripe.h to MagstripeHW.h and moved driver out of the library and into the MagStripe demo folder
  1475. * - Added preprocessor checks to enable C linkage on the library components when used with a C++ compiler
  1476. * - Added Still Image Host demo application
  1477. * - The USB device task now restores the previously selected endpoint, allowing control requests to be transparently
  1478. * handled via interrupts while other endpoints are serviced through polling
  1479. * - Fixed device signature being sent in reverse order in the CDC bootloader
  1480. * - Host demos now have a separate ConfigDescriptor.c/.h file for configuration descriptor processing
  1481. * - HostWithParser demos now have a separate HIDReport.c/.h file for HID report processing and dumping
  1482. * - Removed non-mandatory commands from MassStorage demo to save space, fixed SENSE ResponseCode value
  1483. * - CDC demos now send empty packets after sending a full one to prevent buffering issues on the host
  1484. * - Updated demo descriptors to use VID/PID values donated by Atmel
  1485. * - Added DoxyGen documentation to the source files
  1486. * - Fixed Serial_IsCharReceived() definition, was previously reversed
  1487. * - Removed separate USB_Descriptor_Language_t descriptor, USB_Descriptor_String_t is used instead
  1488. * - Removed unused Device Qualifier descriptor structure
  1489. * - Renamed the USB_CreateEndpoints event to the more appropriate USB_ConfigurationChanged
  1490. * - Fixed MassStorageHost demo reading in the block data in reverse
  1491. * - Removed outdated typedefs in StdRequestType.h, superseded by the macro masks
  1492. * - Corrected OTG.h is now included when the AVR supports both Host and Device modes, for creating OTG products
  1493. * - USB_DeviceEnumerationComplete event is now also fired when in device mode and the host has finished its enumeration
  1494. * - Interrupt driven demos now properly restore previously selected endpoint when ISR is complete
  1495. * - The value of USB_HOST_TIMEOUT_MS can now be overridden in the user project makefile to a custom fixed timeout value
  1496. * - Renamed USB_Host_SOFGeneration_* macros to more friendly USB_Host_SuspendBus(), USB_Host_ResumeBus()
  1497. * and USB_Host_IsBusSuspended()
  1498. * - Renamed *_*_Is* macros to *_Is* to make all flag checking macros consistent, Pipe_SetInterruptFreq() is now
  1499. * Pipe_SetInterruptPeriod() to use the correct terminology
  1500. * - UnicodeString member of USB_Descriptor_String_t struct changed to an ordinary int array type, so that the GCC
  1501. * Unicode strings (prefixed with an L before the opening quotation mark) can be used instead of explicit arrays
  1502. * of ASCII characters
  1503. * - Fixed Endpoint/Pipes being configured incorrectly if the maximum endpoint/pipe size for the selected USB AVR
  1504. * model was given as the bank size
  1505. * - HID device demos now use a true raw array for the HID report descriptor rather than a struct wrapped array
  1506. * - Added VERSION_BCD() macro, fixed reported HID and USB version numbers in demo descriptors
  1507. * - Cleaned up GetDescriptor device chapter 9 handler function
  1508. * - Added GET_REPORT class specific request to HID demos to make them complaint to the HID class
  1509. * - Cleaned up setting of USB_IsInitialized and USB_IsConnected values to only when needed
  1510. * - Removed Atomic.c and ISRMacro.h; the library was already only compatible with recent avr-lib-c for other reasons
  1511. * - All demos and library functions now use USB standardized names for the USB data (bRequest, wLength, etc.)
  1512. * - Added USE_NONSTANDARD_DESCRIPTOR_NAMES token to switch back to the non-standard descriptor element names
  1513. *
  1514. *
  1515. * \section Sec_ChangeLog141 Version 1.4.1 (090519)
  1516. *
  1517. * - Enhanced KeyboardWithParser demo, now prints out pressed alphanumeric characters like the standard demo
  1518. * - Fixed MassStorage demo, read/writes using non mode-10 commands now work correctly
  1519. * - Corrected version number in Version.h
  1520. *
  1521. *
  1522. * \section Sec_ChangeLog140 Version 1.4.0 (090505)
  1523. *
  1524. * - Added HID Report Parser API to the library
  1525. * - Added Mouse and Keyboard host demo applications, using the new HID report parser engine
  1526. * - Added MouseFullInt demo, which demonstrates a fully interrupt (including control requests) mouse device
  1527. * - Fixed incorrect length value in the audio control descriptor of the AudioOutput and AudioInput demos
  1528. * - Added MIDI device demo application to the library
  1529. * - Fixed problem preventing USB devices from being resumed from a suspended state
  1530. * - Added new CDC class bootloader to the library, based on the AVR109 bootloader protocol
  1531. * - Added header to each demo application indicating the mode, class, subclass, standards used and supported speed
  1532. * - Functions expecting endpoint/pipe numbers are no longer automatically masked against ENDPOINT_EPNUM_MASK or
  1533. * PIPE_PIPENUM_MASK - this should be manually added to code which requires it
  1534. * - Fixed DFU class bootloader - corrected frequency of flash page writes, greatly reducing programming time
  1535. * - Renamed AVR_HOST_GetDeviceConfigDescriptor() to USB_Host_GetDeviceConfigDescriptor() and AVR_HOST_GetNextDescriptor()
  1536. * to USB_Host_GetNextDescriptor()
  1537. * - Added new USB_Host_GetNextDescriptorOfTypeBefore() and USB_Host_GetNextDescriptorOfTypeAfter() routines
  1538. * - Moved configuration descriptor routines to MyUSB/Drivers/USB/Class/, new accompanying ConfigDescriptors.c file
  1539. * - Added new configuration descriptor comparator API for more powerful descriptor parsing, updated host demos to use the
  1540. * new comparator API
  1541. * - Fixed MassStorageHost demo capacity printout, and changed data read/write mode from little-endian to the correct
  1542. * big-endian for SCSI devices
  1543. * - Fixed macro/function naming consistency; USB_HOST is now USB_Host, USB_DEV is now USB_Device
  1544. * - Added better error reporting to host demos
  1545. * - Added 10 microsecond delay after addressing devices in host mode, to prevent control stalls
  1546. *
  1547. *
  1548. * \section Sec_ChangeLog132 Version 1.3.2 (080401)
  1549. *
  1550. * - Added call to ReconfigureUSART() in USBtoSerial SetLineCoding request, so that baud rate changes
  1551. * are reflected in the hardware
  1552. * - Fixed CDC and USBtoSerial demos - Stream commands do not work for control endpoints, and the
  1553. * GetLineCoding request had an incorrect RequestType mask preventing it from being processed
  1554. * - Improved reliability of the USBtoSerial demo, adding a busy wait while the buffer is full
  1555. * - Device control endpoint size is now determined from the device's descriptors rather than being fixed
  1556. * - Separated out SPI code into new SPI driver in AT90USBXXX driver directory
  1557. * - Bootloader now returns correct PID for the selected USB AVR model, not just the AT90USB128X PID
  1558. * - Added support for the RZUSBSTICK board
  1559. * - Bicolour driver removed in favor of generic LEDs driver
  1560. * - Added support for the ATMEGA32U4 AVR
  1561. * - Added MANUAL_PLL_CONTROL compile time option to prevent the USB library from manipulating the PLL
  1562. *
  1563. *
  1564. * \section Sec_ChangeLog131 Version 1.3.1 (080319)
  1565. *
  1566. * - Fixed USB to Serial demo - class value in the descriptors was incorrect
  1567. * - Control endpoint size changed from 64 bytes to 8 bytes to save on USB FIFO RAM and to allow low
  1568. * speed mode devices to enumerate properly
  1569. * - USB to Serial demo data endpoints changed to dual-banked 16 byte to allow the demo to work
  1570. * on USB AVRs with limited USB FIFO RAM
  1571. * - Changed demo endpoint numbers to use endpoints 3 and 4 for double banking, to allow limited
  1572. * USB device controller AVRs (AT90USB162, AT90USB82) to function correctly
  1573. * - Updated Audio Out demo to use timer 1 for AVRs lacking a timer 3 for the PWM output
  1574. * - Fixed incorrect USB_DEV_OPT_HIGHSPEED entry in the Mass Storage device demo makefile
  1575. * - Optimized Mass Storage demo for a little extra transfer speed
  1576. * - Added LED indicators to the Keyboard demo for Caps Lock, Num Lock and Scroll Lock
  1577. * - Added Endpoint_Read_Stream, Endpoint_Write_Stream, Pipe_Read_Stream and Pipe_Write_Stream functions
  1578. * (including Big and Little Endian variants)
  1579. * - Made Dataflash functions inline for speed, removed now empty Dataflash.c driver file
  1580. * - Added new SetSystemClockPrescaler() macro (thanks to Joerg Wunsch)
  1581. * - Fixed Endpoint_ClearStall() to function correctly on full USB controller AVRs (AT90USBXXX6/7)
  1582. * - Endpoint_Setup_In_Clear() and Endpoint_Setup_Out_Clear() no longer set FIFOCON, in line with the
  1583. * directives in the datasheet
  1584. * - Fixed PLL prescaler defines for all AVR models and frequencies
  1585. * - Fixed ENDPOINT_INT_IN and ENDPOINT_INT_OUT definitions
  1586. * - Added interrupt driven keyboard and mouse device demos
  1587. * - Combined USB_Device_ClearFeature and USB_Device_SetFeature requests into a single routine for code
  1588. * size savings
  1589. * - Added missing Pipe_GetCurrentPipe() macro to Pipe.h
  1590. *
  1591. *
  1592. * \section Sec_ChangeLog130 Version 1.3.0 (080307)
  1593. *
  1594. * - Unnecessary control endpoint config removed from device mode
  1595. * - Fixed device standard request interpreter accidentally processing some class-specific requests
  1596. * - Added USE_RAM_DESCRIPTORS and USE_EEPROM_DESCRIPTORS compile time options to instruct the library
  1597. * to use descriptors stored in RAM or EEPROM rather than flash memory
  1598. * - All demos now disable watchdog on startup, in case it has been enabled by fuses or the bootloader
  1599. * - USB_DEV_OPT_LOWSPEED option now works correctly
  1600. * - Added ability to set the USB options statically for a binary size reduction via the USE_STATIC_OPTIONS
  1601. * compile time define
  1602. * - USB_Init no longer takes a Mode parameter if compiled for a USB device with no host mode option, or
  1603. * if forced to a particular mode via the USB_HOST_ONLY or USB_DEVICE_ONLY compile time options
  1604. * - USB_Init no longer takes an Options parameter if options statically configured by USE_STATIC_OPTIONS
  1605. * - Endpoint_Ignore_* and Pipe_Ignore_* made smaller by making the dummy variable non-volatile so that the
  1606. * compiler can throw away the result more efficiently
  1607. * - Added in an optional GroupID value to each scheduler entry, so that groups of tasks can once again be
  1608. * controlled by the new Scheduler_SetGroupTaskMode() routine
  1609. * - Added support for AT90USB162 and AT90USB82 AVR models
  1610. * - Added support for the STK525 and STK526 boards
  1611. * - Added support for custom board drivers to be supplied by selecting the board type as BOARD_USER, and
  1612. * placing board drivers in {Application Directory}/Board/
  1613. * - PLL is now stopped and USB clock is frozen when detached from host in device mode, to save power
  1614. * - Joystick defines are now in sync with the schematics - orientation will be rotated for the USBKEY
  1615. * - Fixed USB_DEV_IsUSBSuspended() - now checks the correct register
  1616. * - Fixed data transfers to devices when in host mode
  1617. * - Renamed USB_DEV_OPT_HIGHSPEED to USB_DEV_OPT_FULLSPEED and USB_HOST_IsDeviceHighSpeed() to
  1618. * USB_HOST_IsDeviceFullSpeed() to be in line with the official USB speed names (to avoid confusion with
  1619. * the real high speed mode, which is unavailable on the USB AVRs)
  1620. *
  1621. *
  1622. * \section Sec_ChangeLog120 Version 1.2.0 (080204)
  1623. *
  1624. * - Added USB_DeviceEnumerationComplete event for host mode
  1625. * - Added new Scheduler_Init routine to prepare the scheduler, so that tasks can be started and
  1626. * stopped before the scheduler has been started (via Scheduler_Start)
  1627. * - Connection events in both Device and Host mode are now interrupt-driven, allowing the USB management
  1628. * task to be stopped when the USB is not connected to a host or device
  1629. * - All demos updated to stop the USB task when not in use via the appropriate USB events
  1630. * - Mass Storage Host demo application updated to function correctly with all USB flash disks
  1631. * - Mass Storage Host demo application now prints out the capacity and number of LUNs in the attached
  1632. * device, and prints the first block as hexadecimal numbers rather than ASCII characters
  1633. * - Endpoint and Pipe clearing routines now clear the Endpoint/Pipe interrupt and status flags
  1634. * - Shifted error handling code in the host enum state machine to a single block, to reduce code complexity
  1635. * - Added in DESCRIPTOR_TYPE, DESCRIPTOR_SIZE and DESCRIPTOR_CAST macros to make config descriptor processing
  1636. * clearer in USB hosts and DESCRIPTOR_ADDRESS for convenience in USB devices
  1637. * - Added in alloca macro to common.h, in case the user is using an old version of avr-lib-c missing the macro
  1638. *
  1639. *
  1640. * \section Sec_ChangeLog110 Version 1.1.0 (080125)
  1641. *
  1642. * - Fixed DCONNI interrupt being enabled accidentally after a USB reset
  1643. * - Fixed DDISCI interrupt not being disabled when a device is not connected
  1644. * - Added workaround for powerless pull-up devices causing false disconnect interrupts
  1645. * - Added USB_DeviceEnumerationFailed event for Host mode
  1646. * - AVR_HOST_GetDeviceConfigDescriptor routine no longer modifies ConfigSizePtr if a valid buffer
  1647. * pointer is passed
  1648. * - Added ALLOCABLE_BYTES to DynAlloc, and added code to make the size of key storage variables
  1649. * dependent on size of memory parameters passed in via the user project's makefile
  1650. * - Fixed incorrect device reset routine being called in USBTask
  1651. * - Devices which do not connect within the standard 300mS are now supported
  1652. * - Removed incorrect ATTR_PURE from Scheduler_SetTaskMode(), which was preventing tasks from being
  1653. * started/stopped, as well as USB_InitTaskPointer(), which was breaking dual device/host USB projects
  1654. * - Changed scheduler to use the task name rather than IDs for setting the task mode, eliminating the
  1655. * need to have a task ID list
  1656. * - ID transition interrupt now raises the appropriate device/host disconnect event if device attached
  1657. * - Fixed double VBUS change (and VBUS -) event when detaching in device mode
  1658. * - Added ability to disable ANSI terminal codes by the defining of DISABLE_TERMINAL_CODES in makefile
  1659. * - Removed return from ConfigurePipe and ConfigureEndpoint functions - use Pipe_IsConfigured() and
  1660. * Endpoint_IsConfigured() after calling the config functions to determine success
  1661. */