ChangeLog.txt 125 KB
Newer Older
1
2
3
4
5
6
7
/** \file
 *
 *  This file contains special DoxyGen information for the generation of the main page and other special
 *  documentation pages. It is not a project source file.
 */

 /** \page Page_ChangeLog Project Changelog
8
9
  *
  *  \section Sec_ChangeLogXXXXXX Version XXXXXX
10
11
  *  <b>New:</b>
  *  - Core:
12
  *   - Added support for the Arduino Leonardo board
13
  *   - Added new doxygen_upgrade and doxygen_create targets to the DOXYGEN build system module
14
15
16
17
18
  *  - Library Applications:
  *   - <i>None</i>
  *
  *  <b>Changed:</b>
  *  - Core:
19
20
  *   - Added workaround for broken VBUS detection on AVR8 devices when a bootloader starts the application
  *     via a software jump without first turning off the OTG pad (thanks to Simon Inns)
21
22
23
24
25
  *  - Library Applications:
  *   - <i>None</i>
  *
  *  <b>Fixed:</b>
  *  - Core:
26
  *   - Fixed inverted LEDs_GetLEDs() function implementation for the Benito, Minimus and Arduino UNO boards
27
  *   - Fixed missing Win-32bit compatibility sections in the LUFA INF driver files (thanks to Christan Beharrell)
28
29
  *  - Library Applications:
  *   - Fixed broken RESET_TOGGLES_LIBUSB_COMPAT compile time option in the AVRISP-MKII project
30
  *   - Fixed incompatibility in the CDC class bootloader on some systems (thanks to Sylvain Munaut)
31
  *
Dean Camera's avatar
Dean Camera committed
32
  *  \section Sec_ChangeLog120730 Version 120730
33
34
  *  <b>New:</b>
  *  - Core:
35
  *   - Added new, revamped modular build system with new makefile templates
36
  *   - Added support for the BitWizard Multio and Big-Multio boards
37
  *   - Added support for the DorkbotPDX Duce board
38
39
  *   - Added support for the Olimex AVR-USB-32U4 board
  *   - Added support for the Olimex AVR-USB-T32U4 board
40
  *   - Added support for the Olimex AVR-ISP-MK2 board
41
42
  *   - Added new Endpoint_ConfigureEndpointTable() function
  *   - Added new Pipe_ConfigurePipeTable() function
43
44
  *   - Added build test to verify correct compilation of all board drivers using all driver APIs
  *   - Added build test to verify correct compilation of all bootloaders using all supported devices  
45
46
  *   - Added build test to verify that there are no detectable errors in the codebase via static analysis
  *   - Added new JTAG_ENABLE() macro for the AVR8 architecture
47
  *  - Library Applications:
48
  *   - Modified the CDC Host demos to set a default CDC Line Encoding on enumerated devices
49
  *   - Added Dataflash operational checks and aborts to all projects using the Dataflash to ensure it is working correctly before use
50
  *   - Added new SerialToLCD user project contributed by Simon Foster
51
  *   - Added new RESET_TOGGLES_LIBUSB_COMPAT compile time option to the AVRISP-MKII clone programmer project (thanks to Robert Spitzenpfeil)
52
53
54
55
  *
  *  <b>Changed:</b>
  *  - Core:
  *   - Android Accessory Host property strings changed from a struct of pointer to an array to prevent unaligned access on greater than 8-bit architectures
56
  *   - 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
57
  *   - Removed variable axis support from the HID_DESCRIPTOR_JOYSTICK() macro due to OS incompatibilities, replaced with fixed 3-axis joystick report structure
58
  *   - Removed the old pseudo-scheduler from the library as it was unused and deprecated since the 090810 release
59
60
61
62
63
64
65
66
67
68
  *   - Endpoint indexes are now specified as full endpoint addresses within the device in device mode, rather than a logical index
  *   - The Endpoint_ConfigureEndpoint() function no longer takes an endpoint direction as a parameter, as this is now deduced from the specified full endpoint
  *     address and type
  *   - 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
  *   - 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
  *   - Pipe indexes are now specified as full pipe addresses within the host in host mode, rather than a logical index
  *   - 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
  *   - 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
  *   - 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
  *   - Added support for various assert and debugging macros for the UC3 devices
69
  *   - 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
70
  *     on some architectures (thanks to Darren Gibbs)
71
  *   - Changed board LED driver implementations of LEDs_ToggleLEDs() for the AVR8 architecture to use the fast PIN register toggle alternative function for speed
72
  *  - Library Applications:
73
  *   - 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
74
  *   - Added additional bootloader API data to expose the bootloader start address and class to the DFU and CDC class bootloaders
75
  *   - 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
76
77
  *   - 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
  *     during the reset phase
78
  *   - 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)
79
80
81
  *
  *  <b>Fixed:</b>
  *  - Core:
82
83
  *   - Fixed possible enumeration error if the user application selects a pipe other than the default Control pipe between the Powered and Default states of
  *     the host state machine
84
  *   - Fixed incorrect call to the user callback CALLBACK_Audio_Device_GetSetInterfaceProperty() in the Audio Class device driver (thanks to Tiit Ratsep)
85
  *   - Fixed compile error for the UC3 architecture when INTERRUPT_CONTROL_ENDPOINT is specified (thanks to Andrus Aaslaid)
86
  *   - Fixed compile error if LEDs_Disable() is called and BOARD=NONE is set (thanks to Sam Lin)
87
  *   - Fixed inverted LED logic in the OLIMEX162 board LED driver
88
  *   - Fixed incorrect reponse to GET STATUS requests in device mode if NO_DEVICE_SELF_POWER or NO_DEVICE_REMOTE_WAKEUP tokens are defined (thanks to Georg Glock)
89
  *   - Fixed inverted LED logic in the USB2AX board LED driver
90
91
  *   - 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
  *     the stack (thanks to Jonathan Hudgins)
92
  *   - Fixed broken MIDI host driver MIDI_Host_ReceiveEventPacket() function due to not unfreezing the MIDI data IN pipe before use (thanks to Michael Brown)
93
  *   - Fixed swapped Little Endian/Big Endian endpoint and pipe write code for the UC3 devices (thanks to Andrew Chu)
94
  *   - Fixed the JTAG_DISABLE() macro clearing all other bits in MCUSR when called
95
  *   - Fixed incorrect Micropendous board LED driver LEDs_SetAllLEDs() and LEDs_ChangeLEDs() function implementations (thanks to MitchJS)
96
  *   - Fixed endianess issues in the RNDIS host class driver for UC3 devices (thanks to Andrew Chu)  
97
  *  - Library Applications:
98
  *   - Fixed error in the AVRISP-MKII programmer when ISP mode is used at 64KHz (thanks to Ben R. Porter)
99
100
  *   - 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
  *     defined (thanks to Steven Morehouse)
101
  *   - 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
102
  *   - Fixed CDC and DFU bootloaders failing to compile when the bootloader section size is 8KB or more (thanks to Georg Glock)
103
  *   - Fixed CDC and DFU bootloaders API function offsets incorrect on some devices (thanks to Rod DeMay)
104
105
  *   - Fixed incorrect DFU version number reported to the host in the  DFU bootloader descriptors (thanks to Georg Glock)
  *   - Fixed incorrect version hundredths value encoding in VERSION_BCD() macro (thanks to Georg Glock)
106
  *   - Fixed invalid configuration descriptor in the low level KeyboardMouse device demo (thanks to Jun Wako)
107
  *   - Fixed CDC and DFU bootloaders API page erase and write function failures (thanks to Martin Lambert)
108
  *
Dean Camera's avatar
Dean Camera committed
109
  *  \section Sec_ChangeLog120219 Version 120219
110
111
  *  <b>New:</b>
  *  - Core:
112
113
  *   - Added support for the XMEGA A3BU Xplained board
  *   - Added support for the new B series XMEGA devices
114
  *   - Added support for version 2 of the Teensy boards (thanks to Christoph Redecker)
115
  *   - Added support for the USB2AX boards, hardware revision 1-3
116
  *   - Added new Android Accessory Host class driver
117
  *   - Added new USB_Host_GetDescriptor(), USB_Host_GetDeviceConfiguration() and USB_Host_GetInterfaceAltSetting() functions
118
  *   - Added new CALLBACK_Audio_Device_GetSetInterfaceProperty() callback to the Audio Device Class driver
119
  *   - Added new LEDs_Disable(), Buttons_Disable() and Joystick_Disable() functions to the board hardware drivers
120
  *   - Added support for the Micropendous family of boards (Arduino-like revisions 1 and 2, DIP, 32U2, A, 1, 2, 3 and 4)
121
  *   - Added INVERTED_VBUS_ENABLE_LINE and NO_AUTO_VBUS_MANAGEMENT compile time options (thanks to Opendous Inc.)
122
  *   - Added support for the Atmel XMEGA B1 Xplained board
123
124
  *   - Added Serial USART peripheral driver for the XMEGA architecture
  *   - Added Master Mode SPI USART peripheral driver for the XMEGA and AVR8 architectures
125
126
  *   - 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
  *   - Added build test to verify correct compilation of the USB driver when forced into single USB mode under as many architectures as possible
127
128
  *  - Library Applications:
  *   - Added User Application APIs to the CDC and DFU class bootloaders
129
  *   - Added INVERTED_ISP_MISO compile time option to the AVRISP-MKII clone project (thanks to Chuck Rohs)
130
  *   - Added new Android Accessory Host demo (thanks to Opendous Inc.)
131
132
133
  *
  *  <b>Changed:</b>
  *  - Core:
134
135
  *   - When automatic PLL management mode is enabled on the U4 series AVR8 chips, the PLL is now configured for 48MHz and not
  *     a divided 96MHz, to lower power consumption and to keep the system within the datasheet specs for 3.3V operation (thanks to Scott Vitale)
136
  *   - Added Class, ClassDevice, ClassHost and ClassCommon to the internal class driver source filenames to prevent ambiguities
137
138
  *   - Altered the Mass Storage Host class driver so that SCSI data STALLs from the attached device can be recovered from automatically without
  *     having to reset the Mass Storage interface
139
  *   - USB_CONFIG_ATTR_BUSPOWERED constant renamed to USB_CONFIG_ATTR_RESERVED, as this was misnamed (thanks to NXP Semiconductors)
140
  *   - Reordered board name definition indexes so that a mispelled BOARD compile option will default to BOARD_USER rather than BOARD_USBKEY
141
  *   - Altered the HID class driver to only try to construct at maximum one packet per USB frame, to reduce CPU usage
142
  *   - All USB Class Driver configuration struct values are now non-const, to allow for run-time modifications if required before configuring an instance
143
  *  - Library Applications:
144
145
  *   - Altered the Mass Storage Host LowLevel demo so that SCSI data STALLs from the attached device can be recovered from automatically without
  *     having to reset the Mass Storage interface
146
147
148
  *   - Updated the AVRISP-MKII Clone programmer project to be compatible with the latest version of AVR Studio (version 5.1)
  *   - 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
  *     warnings in AVR Studio 5.1 when programming XMEGA devices
149
150
  *   - Allow serial strings to be generated on the older AVR8 devices which do not explicitly state they contain unique values in the datasheet,
  *     as this appears to be implemented in hardware
151
152
153
  *
  *  <b>Fixed:</b>
  *  - Core:
154
  *   - Fixed ring buffer size limited to 255 elements, instead of the intended 65535 elements.
155
  *   - Fixed CDC class drivers not saving and sending all 16-bits of the control line states (thanks to Matthew Swabey)
156
  *   - Fixed race conditions in the CDC, HID and Mass Storage class drivers when processing some control requests
157
  *   - Fixed misspelled HID_KEYBOARD_MODIFIER_* macros in the HID class driver (thanks to Laszlo Monda)
158
159
  *   - Fixed broken AVR32 endpoint/pipe communications when ORDERED_EP_CONFIG compile time option is not enabled (thanks to Matthias Jahr)
  *   - Fixed broken compilation for the AVR32 devices if the NO_SOF_EVENTS compile time option was not enabled (thanks to Matthias Jahr)
160
  *   - Fixed compiler warning on GCC with \c -wundef compile flag is used (thanks to Georg Glock)
161
  *   - Fixed incorrect implementation of LEDs_ToggleLEDs() for the Adafruit-U4 board (thanks to Caroline Saliman)
162
163
164
  *   - Fixed broken compilation of LUFA under C++ compilers when the Serial peripheral module header file is included in a C++ source file
  *   - Fixed missing semicolon in the UC3 architecture host pipe functions
  *   - Fixed failed compilation for the XMEGA architecture if USB_DEVICE_ONLY us not specified
165
  *   - Fixed UC3 architecture ignoring the pipe size when Pipe_ConfigurePipe() is called
166
  *  - Library Applications:
167
  *   - Added reliability patches to the AVRISP-MKII Clone project's PDI/TPI protocols (thanks to Justin Mattair)
168
  *   - Fixed AVRISP-MKII Clone compile warning on AVR8 U4 targets even when NO_VTARGET_DETECT is enabled
169
  *   - Fixed AVRISP-MKII Clone failing to start application firmware once a TPI programming session is exited
170
  *   - Fixed DFU class bootloader not resetting the LED pins as high impedance inputs when a software jump to the user applications is requested
171
  *   - Fixed AVRISP-MKII Clone timing out on long programming commands such as programming the EEPROM on an ATMEGA8 (thanks to Martin Kelling)
172
  *   - Fixed invalid PID value used in the TempDataLogger project host application (thanks to Anupam Pathak)
173
  *
Dean Camera's avatar
Dean Camera committed
174
  *  \section Sec_ChangeLog111009 Version 111009
175
176
  *  <b>New:</b>
  *  - Core:
177
178
  *   - Added USE_LUFA_CONFIG_HEADER compile time option to include a LUFAConfig.h header in the user director for LUFA configuration
  *     tokens as an alternative to tokens defined in the project makefile
179
  *   - Added new USB_Host_SetInterfaceAltSetting() convenience function for the selection of an interface's alternative setting
180
  *   - Added Audio class control request definitions
181
  *   - Added new CALLBACK_Audio_Device_GetSetEndpointProperty() callback to the Audio Device Class driver to allow for endpoint control manipulations
182
  *     such as data sample rates
183
  *   - 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
184
  *   - Added new EVENT_Audio_Device_StreamStartStop() event to the Audio Device Class driver to detect stream start/stop events
185
  *   - Added board driver support for the Busware TUL board
186
  *   - Added board hardware driver support for the EVK1100 board
187
  *   - Added board hardware driver support for the EVK1104 board
188
189
190
  *   - Added new Host mode Audio Class driver
  *   - Added new SPI_GetCurrentMode() function to the SPI peripheral driver
  *   - Added RingBuffer_GetFreeCount() function to the Ring Buffer driver
191
  *   - Added new HID_Host_SetIdlePeriod() function to the HID Host Class driver
192
  *   - Added new USB_Host_ConfigurationNumber global variable to indicate the selected configuration in an attached device
193
  *   - Added new USB_Host_GetDeviceStatus() function to the host standard request function set
194
  *   - Added AVR USB XMEGA architecture port (currently incomplete/experimental)
195
  *   - Added new STRINGIFY() and STRINGIFY_EXPANDED() convenience macros
196
  *   - Added new JTAG_DISABLE() macro for the AVR8 architecture
197
  *   - Added Device Qualifier standard descriptor structure definitions USB_StdDescriptor_DeviceQualifier_t and USB_Descriptor_DeviceQualifier_t
198
  *  - Library Applications:
199
  *   - Added RNDIS device mode to the Webserver project
200
  *   - Added new incomplete AndroidAccessoryHost Host LowLevel demo
201
  *   - Added new HIDReportViewer project
202
  *   - Added new MediaControl project
203
204
  *   - Added new AudioInputHost Host ClassDriver demo
  *   - Added new AudioOutputHost Host ClassDriver demo
205
206
  *   - Added new AudioInputHost Host LowLevel demo
  *   - Added new AudioOutputHost Host LowLevel demo
207
  *   - Added new "checksource" target to all library project makefiles
208
  *   - Added new VTARGET_USE_INTERNAL_REF configuration option to the AVRISP-MKII clone project (thanks to Volker Bosch)
209
210
211
  *
  *  <b>Changed:</b>
  *  - Core:
212
213
214
  *   - Altered the definition of the USB_Audio_Descriptor_Format_t descriptor so that the user is now responsible for supplying
  *     the supported audio sampling rates, to allow for multiple audio interfaces with different numbers of supported rates and/or
  *     continuous sample rates
215
216
  *   - Pipe_BoundEndpointNumber() has been renamed to Pipe_GetBoundEndpointAddress(), and now returns the correct endpoint direction
  *     as part of the endpoint address
217
218
219
  *   - Renamed global state variables that are specific to a certain USB mode to clearly indicate which mode the variable relates to,
  *     by changing the USB_* prefix to USB_Device_* or USB_Host_*
  *   - Removed the HOST_STATE_WaitForDeviceRemoval and HOST_STATE_Suspended host state machine states, as these are no longer required
220
221
  *   - Altered the USB_Host_SetDeviceConfiguration() function to update the global Host state machine state and the new
  *     USB_Host_ConfigurationNumber global as required
222
  *   - Added endian correcting code to the library USB class drivers for multiple architecture support
223
  *   - Removed the ENDPOINT_DESCRIPTOR_DIR_* macros, replaced by ENDPOINT_DIR_* instead
224
  *   - Renamed the JTAG_DEBUG_ASSERT() macro to JTAG_ASSERT()
225
  *   - Added variable number of axis to HID_DESCRIPTOR_JOYSTICK() for multi-axis joysticks above just X and Y
226
227
228
229
  *   - Renamed USB_Host_ClearPipeStall() to USB_Host_ClearEndpointStall() as the function works on an endpoint address within the attached device,
  *     and not a Pipe within the host
  *   - The MS_Host_ResetMSInterface() now performs a full Mass Storage reset sequence to prevent data corruption in the event of a device
  *     lock up or timeout (thanks to David Lyons)
230
  *   - Added endian-correction to the CDC driver's Line Encoding control request handlers.
231
  *  - Library Applications:
232
  *   - Modified the Low Level and Class Driver AudioInput and AudioOutput demos to support multiple audio sample rates
233
234
  *   - Updated all host mode demos and projects to use the EVENT_USB_Host_DeviceEnumerationComplete() event callback for device configuration
  *     instead of manual host state machine manipulations in the main application task
235
  *   - Changed the reports in the GenericHID device demos to control the board LEDs, to reduce user confusion over the callback routines
236
  *   - Added reliability patches to the AVRISP-MKII Clone project's ISP and PDI/TPI protocols (thanks to Justin Mattair)
237
238
239
  *
  *  <b>Fixed:</b>
  *  - Core:
240
241
242
  *   - Large number of documentation and code comment corrections (thanks to Andrey from Microsin.ru)
  *   - 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
  *     to Andrey from Microsin.ru)
243
244
245
  *   - Fixed compile error when FIXED_CONTROL_ENDPOINT_SIZE compile time option was disabled, and a USE_*_DESCRIPTORS compile time
  *     option was not enabled on the AVR8s
  *   - Fixed lack of C++ compatibility in some internal header files causing compile errors when using LUFA in C++ projects
246
  *   - Fixed error in the pipe unordered allocation algorithm for the AVR8 devices breaking compatibility with some devices
247
  *   - Fixed USB_USBTask not being called internally in stream transfers between packets when Partial Stream Transfers are used
248
249
  *   - Fixed swapped TWI_ADDRESS_READ and TWI_ADDRESS_WRITE values
  *   - Fixed TWI_ReadPacket() not releasing the TWI bus on read completion
250
251
252
  *   - Fixed optimization error in the HID Parser item value USB_SetHIDReportItemInfo() and USB_GetHIDReportItemInfo() routines if the report item was
  *     \c NULL (which should be allowable according to the API)
  *   - Fixed HID Parser CALLBACK_HIDParser_FilterHIDReportItem() callback function not being passed a cacheable report item pointer
253
254
  *   - Fixed HID Parser's largest report size bit count not including the size of the last parsed report item
  *   - Fixed HID host driver's largest HID report size count corrupt when the number of report bits exceeds 255
255
  *  - Library Applications:
256
  *   - Fixed incorrect signature in the CDC and DFU class bootloaders for the ATMEGA8U2
257
  *   - Fixed KeyboardHost and KeyboardHostWithParser demos displaying incorrect values when numerical keys were pressed
258
  *   - Fixed compile errors in the incomplete BluetoothHost demo application (thanks to Timo Lindfors)
259
  *   - Fixed incorrect Dataflash buffer use in the DataflashManager_WriteBlocks_RAM() function of several demos/projects (thanks to Jeremy Willden)
260
  *   - Fixed incorrect logging interval (always 500ms longer than requested) in the TempDataLogger project
261
  *   - Fixed incorrect buffer size check in the USBtoSerial project (thanks to Yuri A Nikiforov)
262
  *   - Fixed port state table corruption in the TCP layer of the RNDIS Ethernet device demos
263
264
265
266
  *
  *  \section Sec_ChangeLog110528 Version 110528
  *  <b>New:</b>
  *  - Core:
267
268
  *   - Added new ORDERED_EP_CONFIG compile time option to restrict endpoint/pipe configuration to ascending order
  *     in exchange for a smaller compiled program binary size
269
270
  *   - Added a new general RingBuff.h miscellaneous ring buffer library driver header
  *   - Added new GCC_FORCE_POINTER_ACCESS() macro to correct GCC's mishandling of struct pointer accesses
271
  *   - Added new GCC_MEMORY_BARRIER() macro to prevent instruction reordering across boundaries
272
  *   - Added basic driver example use code to the library documentation
Dean Camera's avatar
Dean Camera committed
273
  *   - Added new Endpoint_Null_Stream() and Pipe_Null_Stream() functions
274
  *   - Added new ADC_GET_CHANNEL_MASK() convenience macro
275
  *   - Added new HID report item macros (with HID_RI_ prefix) to allow for easy creation and editing of HID report descriptors
276
  *   - Added new HID_DESCRIPTOR_MOUSE(), HID_DESCRIPTOR_KEYBOARD(), HID_DESCRIPTOR_JOYSTICK() and HID_DESCRIPTOR_VENDOR() macros
277
  *     for easy automatic creation of basic USB HID device reports
278
  *   - Added new MAX() and MIN() convenience macros
279
  *   - Added new Serial_SendData() function to the Serial driver
280
  *   - Added board driver support for the Sparkfun ATMEGA8U2 breakout board
281
282
  *   - Added TWI baud rate prescaler and bit length parameters to the TWI_Init() function (thanks to Thomas Herlinghaus)
  *   - Internal restructuring for eventual multiple architecture ports
283
  *   - Added AVR32 UC3 architecture port (currently incomplete/experimental)
284
285
  *   - Added new architecture independent functions to enable, disable, save and restore the Global Interrupt Enable flags
  *   - Added new RNDIS Device Class Driver packet send and receive functions
286
  *  - Library Applications:
287
  *   - Added ability to write protect Mass Storage disk write operations from the host OS
288
  *   - Added new MIDIToneGenerator project
289
  *   - Added new KeyboardMouseMultiReport Device ClassDriver demo
290
  *   - Added new VirtualSerialMassStorage Device ClassDriver demo
291
292
  *   - Added HID class bootloader, compatible with a modified version of the command line Teensy loader from PJRC.com
  *   - Added LED flashing to the CDC and DFU class bootloaders to indicate when they are running
293
294
295
  *
  *  <b>Changed:</b>
  *  - Core:
296
  *   - Unordered Endpoint/Pipe configuration is now allowed once again by default via the previous reconfig workaround
297
298
  *   - Refactored Host mode Class Driver *_Host_ConfigurePipes() routines to be more space efficient when compiled
  *   - Added new *_ENUMERROR_PipeConfigurationFailed error codes for the *_Host_ConfigurePipes() routines
299
300
  *   - The USARTStream global is now public and documented in the SerialStream module, allowing for the serial USART
  *     stream to be accessed via its handle rather than via the implicit stdout and stdin streams
301
  *   - The FAST_STREAM_TRANSFERS compile time option has been removed due to lack of use and low cost/benefit ratio
302
303
304
305
  *   - Altered all endpoint/pipe stream transfers so that the new BytesProcessed parameter now points to a location
  *     where the number of bytes in the transfer that have been completed can be stored (or NULL if entire transaction
  *     should be performed in one chunk)
  *   - The NO_STREAM_CALLBACKS compile time option has now been removed due to the new partial stream transfer feature
306
307
  *   - Changed over all project and demo HID report descriptors to use the new HID report item macros
  *   - Moved the HIDParser.c source file to the LUFA/Drivers/USB/Class/Common/ directory from the LUFA/Drivers/USB/Class/Host/
308
  *   - Added support to the HID parser for extended USAGE items that contain the usage page as well as the usage index
309
310
311
312
313
  *   - Removed the SerialStream driver, rolled functionality into the regular Serial peripheral driver via the new
  *     Serial_CreateStream() and Serial_CreateBlockingStream() functions
  *   - Renamed the low level Serial byte send/receive functions, to be consistent with the CDC class driver byte functions
  *   - Altered the behaviour of the serial byte reception function so that is is non-blocking, and now returns a negative
  *     value if no character is received (to remain consistent with the CDC class driver byte reception routines)
314
315
  *   - Renamed the PRNT_Host_SendString(), CDC_Host_SendString() and CDC_Device_SendString() functions to *_SendData(), and
  *     added new versions of the *_SendString() routines that expect a null terminated string instead
316
  *   - Renamed all driver termination *_ShutDown() functions to the more logical name *_Disable()
317
  *   - Reduced latency for executing the Start-Of-Frame events (if enabled in the user application)
318
  *   - Removed Pipe_ClearErrorFlags(), pipe error flags are now automatically cleared when Pipe_ClearError() is called
319
  *   - Endpoint_ResetFIFO() renamed to Endpoint_ResetEndpoint(), to be consistent with the Pipe_ResetPipe() function name
320
  *   - Implemented on-demand PLL clock generation for the U4, U6 and U7 series USB AVRs when automatic PLL mode is specified
321
  *   - F_CLOCK changed to F_USB to be more descriptive, and applicable on future architecture ports
322
323
324
325
  *   - Renamed all low level Endpoint_Read_*, Endpoint_Write_* and Endpoint_Discard_* functions to use the number of bits instead of
  *     a symbolic size (Byte, Word, DWord) so that the function names are applicable and correct across all architectures
  *   - Renamed all low level Pipe_Read_*, Pipe_Write_* and Pipe_Discard_* functions to use the number of bits instead of
  *     a symbolic size (Byte, Word, DWord) so that the function names are applicable and correct across all architectures
326
  *   - Separated out board drivers by architecture in the library internals for better organisation
327
  *  - Library Applications:
328
  *   - Changed the XPLAINBridge software UART to use the regular timer CTC mode instead of the alternative CTC mode
329
  *     via the Input Capture register, to reduce user confusion
330
331
  *   - Combined page and word ISP programming mode code in the AVRISP-MKII clone project to reduce compiled size and
  *     increase maintainability of the code
332
  *   - Changed over library projects to use the new general ring buffer library driver module
333
  *   - Added new high level TWI packet read/write commands, altered behaviour of the TWI_StartTransmission() function
334
  *   - Changed TempDataLogger project's DS1307 driver to simplify the function interface and prevent a possible race condition
335
336
  *   - Changed AVRISP-MKII project to use the Watchdog interrupt for command timeouts, to reduce CPU usage and free timer 0
  *     for other uses
337
  *   - Updated the software USART code in the XPLAIN Bridge application so that the incoming bits are sampled at their mid-point
338
  *     instead of starting point, to give maximum reliability (thanks to Anton Staaf)
339
340
341
  *
  *  <b>Fixed:</b>
  *  - Core:
342
  *   - Fixed broken USBFOO board drivers due to missing BOARD_USBFOO define
343
  *   - Fixed HID host class driver incorrectly binding to HID devices that do not have an OUT endpoint
344
  *   - Fixed incorrect definition of the HID_KEYBOARD_SC_D constant in the HID class driver (thanks to Opendous Inc.)
345
  *   - Fixed incorrect definition of the HID_KEYBOARD_SC_RIGHT_ARROW constant in the HID class driver (thanks to Joby Taffey)
346
  *   - Fixed incorrect endpoint initialisation order in the several device demos (thanks to Rick Drolet)
347
  *   - Fixed inverted Minimus board LEDs
348
  *   - Fixed incorrect byte ordering in the Audio_Device_WriteSample24 function (thanks to WZab)
349
350
  *   - Fixed several functions in the Host mode Still Image Class driver returning an error code from the incorrect
  *     error code enum (thanks to Daniel Seibert)
351
  *   - Fixed ReportID not being removed from the feature/out report data array in the HID class driver when Report IDs are used
352
  *   - Fixed incorrect BUTTONS_BUTTON1 definition for the Minimus board
Dean Camera's avatar
Dean Camera committed
353
354
355
  *   - Fixed Still Image Host class driver exiting the descriptor search routine prematurely if the data pipes (but not event pipe)
  *     is found
  *   - Fixed missing call to Pipe_SetInfiniteINRequests() in the Pipe_ConfigurePipe() routine
356
  *   - Fixed Remote Wakeup broken on the AVRs due to the mechanism only operating when the SUSPI bit is set (thanks to Holger Steinhaus)
357
  *   - Fixed possible invalid program execution when in host mode if corrupt descriptor lengths are supplied by the attached device
358
359
  *  - Library Applications:
  *   - Fixed Benito project discarding incoming data from the USB virtual serial port when the USART is busy
360
  *   - Fixed broken DFU bootloader, added XPLAIN support for bootloader start when XCK jumpered to ground
361
  *   - Fixed broken HID_REQ_GetReport request handler in the Low Level GenericHID demo
362
363
  *   - Fixed possible lost data in the XPLAINBridge, USBtoSerial and Benito projects when the host exceeds the packet
  *     timeout period on received packets as set by USB_STREAM_TIMEOUT_MS (thanks to Justin Rajewski)
364
365
  *   - Fixed possible programming problem in the AVRISP-MKII clone project when programming specific patterns into a target
  *     memory space that is only byte (not page) addressable
366
  *   - Fixed errors in the incomplete Test and Measurement device demo preventing proper operation (thanks to Pavel Plotnikov)
367
368
  *   - Fixed programming errors in the AVRISP-MKII project when the programming packet is a round multiple of the endpoint bank
  *     size under avrdude (thanks to Steffan Woltjer)
Dean Camera's avatar
Dean Camera committed
369
  *
370
  *
Dean Camera's avatar
Dean Camera committed
371
  *  \section Sec_ChangeLog101122 Version 101122
372
  *  <b>New:</b>
373
374
375
376
377
378
379
380
381
382
383
  *  - Core:
  *    - Added new SCSI_ASENSE_NOT_READY_TO_READY_CHANGE constant to the Mass Storage class driver, to indicate when a previously
  *      not ready removable medium has now become ready for the host's use (thanks to Martin Degelsegger)
  *    - Moved the Pipe and Endpoint stream related code to two new USB library core source files EndpointStream.c and PipeStream.c
  *    - Added new USB_Device_GetFrameNumber() and USB_Host_GetFrameNumber() functions to retrieve the current USB frame number
  *    - Added new USB_Host_EnableSOFEvents(), USB_Host_DisableSOFEvents() and EVENT_USB_Host_StartOfFrame() for the user application
  *      handling of USB Start of Frame events while in USB Host mode
  *    - Added new PRNT_Host_BytesReceived(), PRNT_Host_ReceiveByte(), PRNT_Host_SendByte() and PRNT_Host_Flush() functions to the
  *      Print Host Class driver
  *    - Added class specific descriptor alternative struct type defines with standard USB-IF element naming
  *    - Added new project makefile template to the library and moved board driver stub files into in a new "CodeTemplates" directory
384
  *    - Added board hardware driver support for the Adafruit U4 breakout board
385
386
  *    - Added board hardware driver support for the Arduino Uno development board
  *    - Added board hardware driver support for the Blackcat USB JTAG board (thanks to the PSGroove team)
387
388
389
390
391
  *    - Added board hardware driver support for the Busware BUI development board
  *    - Added board hardware driver support for the Busware CUL V3 868MHZ radio board (thanks to Dirk Tostmann)
  *    - Added board hardware driver support for the Kernel Concepts USBFOO development board
  *    - Added board hardware driver support for the Linnix UDIP development board
  *    - Added board hardware driver support for the Olimex AVR-USB-162 development board (thanks to Steve Fawcett)
392
  *    - Added board hardware driver support for the Maximus board (thanks to the PSGroove team)
393
  *    - Added board hardware driver support for the Microsin AVR-USB162 breakout board
394
395
396
  *    - Added board hardware driver support for the Minimus board (thanks to the PSGroove team)
  *    - Added new NO_CLASS_DRIVER_AUTOFLUSH compile time option to disable automatic flushing of interfaces when the USB management
  *      tasks for each driver is called
397
  *    - Added standard keyboard HID report scan-code defines (thanks to Laszlo Monda)
398
399
400
401
402
403
  *    - Added new Pipe_GetBusyBanks(), Endpoint_GetBusyBanks() and Endpoint_AbortPendingIN() functions
  *  - Library Applications:
  *    - Added default test tone generation mode to the Device mode AudioInput demos
  *    - Added new NO_BLOCK_SUPPORT, NO_EEPROM_BYTE_SUPPORT, NO_FLASH_BYTE_SUPPORT and NO_LOCK_BYTE_WRITE_SUPPORT compile time options to the
  *      CDC class bootloader
  *    - Added new XCK_RESCUE_CLOCK_ENABLE compile time option to the AVRISP-MKII clone programmer project (thanks to Tom Light)
404
  *
405
  *  <b>Changed:</b>
406
407
408
409
410
411
412
413
414
415
416
417
418
  *  - Core:
  *    - Removed complicated logic for the Endpoint_ConfigureEndpoint() function to use inlined or function called versions
  *      depending of if the given bank size is a compile time constant, as the compiler does a better job of optimizing
  *      with basic code
  *    - Changed the signature of the CALLBACK_USB_GetDescriptor() callback function so that the descriptor pointer is const, to remove
  *      the need for extra casting inside the callback (thanks to Jonathan Kollasch)
  *    - Reduced HOST_DEVICE_SETTLE_DELAY_MS to 1000ms down from 1500ms to improve device compatibility while in USB Host mode
  *    - Removed the EVENT_USB_InitFailure() event, not specifying a USB mode correctly now defaults to UID selection mode
  *    - Renamed and moved class driver common constant definitions to make the naming scheme more uniform
  *    - Moved the USB mode specifier constants into a new enum, so that they are semantically related to one another
  *    - Renamed ENDPOINT_DOUBLEBANK_SUPPORTED() to ENDPOINT_BANKS_SUPPORTED() and changed it to return the maximum number of supported banks for
  *      the given endpoint
  *    - Better algorithm to extract and convert the internal device serial number into a string descriptor (if present)
419
  *    - All USB class drivers are now automatically included when LUFA/Drivers/USB.h is included, and no longer need to be separately included
420
421
422
423
424
425
426
427
428
429
  *    - The MIDI class drivers now automatically flushes the MIDI interface when the MIDI class driver's USBTask() function is called
  *    - Renamed the EVENT_USB_Device_UnhandledControlRequest() event to EVENT_USB_Device_ControlRequest() as it is now fired before the library
  *      request handlers, not afterwards
  *  - Library Applications:
  *    - Changed over all device demos to use a clearer algorithm for the configuring of the application's endpoints
  *    - Added missing DataflashManager_CheckDataflashOperation() function to the MassStorageKeyboard demo, removed redundant
  *      SCSI_Codes.h file as these values are part of the MassStorage Class Driver
  *    - Added compile time error to the AVRISP-MKII project when built for the U4 chips, as the default VTARGET detection ADC channel
  *      does not exist on these chips (thanks to Marco)
  *    - Changed all Device mode LowLevel demos and Device Class drivers so that the control request is acknowledged and any data
430
  *      transferred as quickly as possible without any processing in between sections, so that long callbacks or event handlers will
431
432
433
434
435
436
437
438
439
  *      not break communications with the host by exceeding the maximum control request stage timeout period
  *    - Changed over all demos, drivers and internal functions to use the current frame number over the Start of Frame flag where possible
  *      to free up the Start of Frame flag for interrupt use in the user application
  *    - All project makefiles now correctly clean intermediate build files from assembly and C++ sources (thanks to Daniel Czigany)
  *    - Changed default value for the reset polarity parameter in the AVRISP-MKII project so that it defaults to active low drive
  *    - Changed configuration descriptor parser for all host mode projects and class drivers to ensure better compatibility with devices
  *    - All LowLevel demos changed to use the constants and types defined in the USB class drivers
  *    - Changed AudioInput and AudioOutput demos to reload the next sample via an interrupt rather than polling the sample timer
  *    - Rescue clock of the AVRISP-MKII moved to the AVR's OCR1A pin, so that the clock can be generated at all times
440
441
  *    - Changed ClassDriver MIDI demos to process all incoming events in a loop until the bank becomes empty rather than one at a time
  *    - Changed LowLevel MIDI demos to only clear the incoming event bank once it has become empty to support packed event packets
442
  *
443
  *  <b>Fixed:</b>
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
  *  - Core:
  *    - Fixed USB_GetHIDReportItemInfo() function modifying the given report item's data when the report item does not exist
  *      within the supplied report of a multiple report HID device
  *    - Fixed critical pipe/endpoint memory allocation issue where the bank memory address space could be silently overlapped
  *      in the USB controller if the endpoints or pipes were allocated in anything other than ascending order (thanks to Martin Degelsegger)
  *    - Added LEDs_ToggleLEDs() function to several board LED drivers which were missing it (thanks to Andrei Krainev)
  *    - Fixed SET FEATURE and CLEAR FEATURE control requests directed at an unconfigured endpoint causing request timeouts
  *    - Fixed USB_Host_ClearPipeStall() incorrectly determining the endpoint direction from the currently selected pipe
  *    - Fixed JTAG_DEBUG_POINT() and JTAG_DEBUG_BREAK() macros not compiling under pure C99 standards mode
  *    - Fixed endpoint selection within the CALLBACK_HID_Device_CreateHIDReport() callback function causing broken GET REPORT requests
  *    - Fixed incorrect command name for EEPROM memory programming in the makefile dfu-ee target
  *    - Fixed incorrect LEDs_ChangeLEDs() function in the Benito board LED driver
  *    - Fixed incorrect USB_DeviceState value when unconfiguring the device without an address set
  *    - Fixed SPI driver not explicitly setting /SS and MISO pins as inputs when SPI_Init() is called
  *    - Fixed random enumeration failure while in device mode due to interrupts causing the Set Address request to exceed maximum timings
  *    - Fixed MIDI_Host_Flush() not aborting early when the specified MIDI host interface was not configured
  *    - Fixed MIDI class driver send routines silently discarding packets if the endpoint or pipe is busy (thanks to Robin Green)
  *  - Library Applications:
  *    - Fixed MassStorage based demos and projects resetting the SCSI sense values before the command is executed, leading to
  *      missed SCSI sense values when the host retrieves the sense key (thanks to Martin Degelsegger)
  *    - Fixed USBtoSerial and Benito project SetLineEncoding calls failing if the USART is busy, due to the RX ISR delaying the control
  *      request handler
  *    - Fixed LowLevel PrinterHost demo not sending control requests to the attached printer with the correct printer interface wIndex value
  *    - Fixed incorrect signature reported in the CDC class bootloader for the ATMEGA32U2
  *    - Fixed BootloaderCDC project failing on some operating systems due to removed Line Encoding options (thanks to Alexey Belyaev)
  *    - Fixed broken FLASH/EEPROM programming in the AVRISP-MKII clone project when writing in non-paged mode and the polling byte cannot be used
  *    - Fixed ISR definition conflict in the XPLAIN bridge between the software UART and the AVRISP-MKII ISP modules
  *    - Fixed USBtoSerial and XPLAINBridge demos discarding data from the PC if the send buffer becomes full
  *    - Fixed broken input in the MagStripe reader project due to an incorrect HID report descriptor
  *    - Fixed incorrect PollingIntervalMS values in the demo/project/bootloader endpoint descriptors (thanks to MCS Electronics)
  *    - Fixed AVRISP-MKII clone project not starting the target's program automatically after exiting TPI programming mode
475
  *
476
  *
Dean Camera's avatar
Dean Camera committed
477
  *  \section Sec_ChangeLog100807 Version 100807
478
  *  <b>New:</b>
479
  *  - Added new ADC_DisableChannel() function (thanks to Mich Davis)
480
481
  *  - Added new VTARGET_REF_VOLTS and VTARGET_SCALE_FACTOR compile time defines to the AVRISP-MKII programmer project to set
  *    the VTARGET reference voltage and scale factor
482
483
  *  - Added new pgm_read_ptr() macro to Common.h for reading of pointers out of flash memory space
  *  - Added new SWAPENDIAN_16() and SWAPENDIAN_32() macros to Common.h for statically initialized variables at compile time
484
  *  - Added new Drivers/USB/LowLevel/Device.c file to house Device mode specific functions that are more complicated than simple macros
485
  *  - Added new AVRStudio 4 project files for all library demos, projects and bootloaders
486
  *  - Added ability to set the serial baud rate via the user's terminal in the XPLAINBridge project
487
  *  - Added new LUFA module variables for the different source modules in the core library makefile to simplify project makefiles
488
  *  - Added start of a new Test and Measurement class demo (thanks to Peter Lawrence)
489
490
  *  - Added new SPI_ORDER_* data order masks to the SPI peripheral driver
  *  - Added support to the AVRISP-MKII project for ISP speeds slower than 125KHz via a new software SPI driver
491
  *  - Added support for the new button/LED on the latest model USBTINY-MKII
492
493
  *
  *  <b>Changed:</b>
494
495
  *  - The RingBuff library code has been replaced in the XPLAINBridge, Benito and USBtoSerial projects with an ultra lightweight
  *    ring buffer to help improve the reliability of the projects
496
497
498
499
  *  - The EEPROM stream read/write functions now use eeprom_update_byte() instead of eeprom_write_byte(), so that only
  *    changed bytes are written to EEPROM to preserve its lifespan
  *  - Changed over the AVRISP-MKII and TemperatureDataLogger projects to use eeprom_update_byte() when writing non-volatile
  *    parameters to EEPROM to preserve its lifespan
500
  *  - Removed unused line encoding data and control requests from the CDC Bootloader code, to save space
501
  *  - Renamed SERIAL_STREAM_ASSERT() macro to STDOUT_ASSERT()
502
  *  - The USB_Device_IsRemoteWakeupSent() and USB_Device_IsUSBSuspended() macros have been deleted, as they are now obsolete
503
504
  *  - Rewrote the implementation of the SwapEndian_16() and SwapEndian_32() functions so that they compile down in most instances to
  *    minimal loads and stores rather than complicated shifts
505
  *  - The software UART in the XPLAINBridge has been largely altered to try to improve upon its performance and reliability
506
  *  - The USBtoSerial and Benito projects now flushes received data via a flush timer, so that several bytes can be transmitted at once
507
  *  - Removed the automated checking of event names in the demo, project and bootloader makefiles due to inconsistencies between the
508
  *    behaviour of the command line tools used to perform the check on each platform
509
  *  - Internal USB driver source files renamed and moved to ease future possible architecture ports
510
  *  - All internal pseudo-function macros have been converted to true inline functions for type-safety and readability
511
  *  - Changed LED indicator masks for the AVRISP-MKII project, so that there are defined roles for each LED
512
  *  - Altered the CDC Device and Host Class drivers' receive byte routines, so that no data is indicated by the function returning a
513
  *    negative value (thanks to Andreas Paulin)
514
  *  - Added auto flushing of OUT data to the CDC Host Class driver's USBTask function to automatically flush the send pipe buffer
515
516
  *
  *  <b>Fixed:</b>
517
  *  - Fixed AVRISP project sending a LOAD EXTENDED ADDRESS command to 128KB AVRs after programming or reading from
518
519
520
  *    the last page of FLASH (thanks to Gerard Sexton)
  *  - Fixed AVRISP project not sending a full erase-and-write EEPROM command to XMEGA targets when writing to the EEPROM
  *    instead of the split write-only command (thanks to Tim Margush)
521
522
  *  - Fixed RNDISEthernet demos crashing when calculating checksums for Ethernet/TCP packets of more than ~500 bytes due to
  *    an overflow in the checksum calculation loop (thanks to Kevin Malec)
523
  *  - Fixed XPLAINBridge project not correctly reading the XMEGA's supply voltage when reporting back to the host
524
  *  - Fixed incorrect signature for the ATMEGA32U2 in the DFU bootloader (thanks to Axel Rohde)
525
  *  - Fixed internal device serial not being accessible on the ATMEGAXXU2 AVRs (thanks to Axel Rohde)
526
  *  - Fixed void pointer arithmetic in ConfigDescriptor.h breaking C++ compatibility (thanks to Michael Hennebry)
527
  *  - Fixed broken PDI EEPROM Section Erase functionality in the AVRISP-MKII project
528
  *  - Fixed USB_Device_SendRemoteWakeup() not working when the USB clock was frozen during USB bus suspend (thanks to Brian Dickman)
529
530
  *  - Fixed occasional lockup of the AVRISP project due to the timeout extension code incorrectly extending the timeout in
  *    PDI and TPI programming modes infinitely
531
532
  *  - Fixed HID device class driver still using PrevReportINBuffer for GetReport control requests even when it has been
  *    set to NULL by the user application (thanks to Axel Rohde)
533
  *  - Fixed MIDI_Device_SendEventPacket() not correctly waiting for the endpoint to become ready (thanks to Robin Green)
534
535
  *  - Fixed Benito and USBtoSerial projects not turning off the USART before reconfiguring it, which could cause incorrect
  *    operation to occur (thanks to Bob Paddock)
536
537
  *  - Fixed Serial peripheral driver not turning off the USART before reconfiguring it, which would cause incorrect operation
  *    to occur (thanks to Bob Paddock)
538
539
  *  - Fixed software application start command broken in the DFU class bootloader when dfu-programmer is used due to application
  *    start address corruption
Dean Camera's avatar
Dean Camera committed
540
  *
541
  *
542
  *  \section Sec_ChangeLog100513 Version 100513
543
544
545
546
547
548
549
550
  *  <b>New:</b>
  *  - Added incomplete MIDIToneGenerator project
  *  - Added new Relay Controller Board project (thanks to OBinou)
  *  - Added board hardware driver support for the Teensy, USBTINY MKII, Benito and JM-DB-U2 lines of third party USB AVR boards
  *  - Added new ATTR_NO_INIT variable attribute for global variables that should not be automatically cleared on startup
  *  - Added new ENDPOINT_*_BusSuspended error code to the Endpoint function, so that the stream functions early-abort if the bus
  *    is suspended before or during a transfer
  *  - Added new EVENT_CDC_Device_BreakSent() event and CDC_Host_SendBreak() function to the Device and Host CDC Class drivers
551
552
553
554
  *  - Added ReportType parameter to the HID device class driver CALLBACK_HID_Device_ProcessHIDReport() function so that FEATURE
  *    reports from the host to the device can be correctly processed
  *  - Added ReportType parameter to the HID host class driver HID_Host_SendReportByID() function so that FEATURE reports can be
  *    issued to the attached device
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
  *
  *  <b>Changed:</b>
  *  - AVRISP programmer project now has a more robust timeout system
  *  - Added a timeout value to the TWI_StartTransmission() function, within which the addressed device must respond
  *  - Webserver project now uses the board LEDs to indicate the current IP configuration state
  *  - Added ENABLE_TELNET_SERVER compile time option to the Webserver project to disable the TELNET server if desired
  *  - Increased throughput of the USBtoSerial demo on systems that send multiple bytes per packet (thanks to Opendous Inc.)
  *  - Double bank CDC endpoints in the XPLAIN Bridge project, re-enable JTAG once the mode selection pin has been sampled.
  *  - Standardized the naming scheme given to configuration descriptor sub-elements in the Device mode demos, bootloaders
  *    and projects
  *  - All Class Driver Host mode demos now correctly set the board LEDs to READY once the enumeration process has completed
  *  - Added LIBUSB_FILTERDRV_COMPAT compile time option to the AVRISP programmer project to make the code compatible with Windows
  *    builds of avrdude at the expense of AVRStudio compatibility
  *  - Removed two-step endpoint/pipe bank clear and switch sequence for smaller, faster endpoint/pipe code
  *  - The USB_Init() function no longer calls sei() - the user is now responsible for enabling interrupts when they are ready
  *    for them to be enabled (thanks to Andrei Krainev)
  *  - The Audio_Device_IsSampleReceived() and Audio_Device_IsReadyForNextSample() functions are now inline, to reduce overhead
  *  - Removed the cast to uint16_t on the set baud rate in the USBtoSerial project, so that the higher >1M baud rates can be
  *    selected (thanks to Steffan Woltjer)
  *  - Removed software PDI and TPI emulation from the AVRISP-MKII clone project as it was very buggy and slow - PDI and TPI must
575
  *    now be implemented via separate programming headers
576
577
578
579
  *  - The CDC class bootloader now uses a watchdog reset rather than a soft-reset when exited to ensure that all hardware is
  *    properly reset to their defaults
  *  - Device mode class driver callbacks are now fired before the control request status stage is sent to prevent the host from
  *    timing out if another request is immediately fired and the device has a lengthy callback routine
580
581
582
  *  - The TeensyHID bootloader has been removed, per request from Paul at PJRC
  *  - The LIBUSB_FILTERDRV_COMPAT compile time option in the XPLAINBridge and AVRISP-MKII projects has been renamed
  *    LIBUSB_DRIVER_COMPAT, as it applies to all software on all platforms using the libUSB driver
583
584
  *
  *  <b>Fixed:</b>
585
586
587
  *  - Fixed possible device lockup when INTERRUPT_CONTROL_ENDPOINT is enabled and the control endpoint is not properly
  *    selected when the ISR completes
  *  - Fixed AVRISP-MKII clone project not correctly issuing LOAD EXTENDED ADDRESS commands when the extended address
588
  *    boundary is crossed during programming or read back (thanks to Gerard Sexton)
589
  *  - Fixed warnings when building the AVRISP-MKII clone project with the ENABLE_XPROG_PROTOCOL compile time option disabled
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
  *  - Fixed software PDI/TPI programming mode in the AVRISP project not correctly toggling just the clock pin
  *  - Fixed TWI_StartTransmission() corrupting the contents of the GPIOR0 register
  *  - Fixed TWI driver not aborting when faced with no response after attempting to address a device on the bus
  *  - Fixed ADC routines not correctly returning the last result when multiple channels were read
  *  - Fixed ADC routines failing to read the extended channels (Channels 8 to 13, Internal Temperature Sensor) on the
  *    U4 series USB AVR parts
  *  - Fixed LowLevel MassStorage demo broken on the U2 series USB AVRs due to unsupported double-banked endpoint modes used
  *  - Fixed compilation error in the AudioInput demos when MICROPHONE_BIASED_TO_HALF_RAIL is defined (thanks to C. Scott Ananian)
  *  - Fixed incorrect definition of HID_ALIGN_DATA() causing incorrect HID report item data alignment
  *  - Fixed Still Image Host class driver not resetting the transaction ID when a new session is opened, fixed driver not sending
  *    a valid session ID to the device
  *  - Removed invalid dfu and flip related targets from the bootloaders - bootloaders can only be replaced with an external programmer
  *  - Fixed Set/Clear Feature requests directed to a non-configured endpoint not returning a stall to the host
  *  - Fixed HID Device Class Driver not allocating a temporary buffer when the host requests a report via the control endpoint and the
  *    user has set the PrevReportINBuffer driver configuration element to NULL (thanks to Lars Noschinski)
  *  - Fixed device state not being reset to DEVICE_STATE_Default if the host sets a 0x00 device address
  *  - Fixed device not stalling configuration requests before the device's address has been set
  *  - Fixed possibility of internal signature retrieval being corrupted if an interrupt occurs during a signature byte
  *    read (thanks to Andrei Krainev)
  *  - Fixed device state not being reset back to the default state if the host sets the address to 0
  *  - Fixed Set Configuration requests not being stalled until the host has set the device's address
611
  *  - Fixed Host mode HID class driver not sending the correct report type when HID_Host_SendReportByID() was called and the
612
  *    HID_HOST_BOOT_PROTOCOL_ONLY compile time option is set
613
  *  - Fixed INTERRUPT_CONTROL_ENDPOINT compile time option preventing other interrupts from occurring while the control endpoint
614
615
616
  *    request is being processed, causing possible lockups if a USB interrupt occurs during a transfer
  *  - Remove incorrect Abstract Call Management class specific descriptor from the CDC demos, bootloaders and projects
  *
617
  *
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
  *  \section Sec_ChangeLog100219 Version 100219
  *
  *  <b>New:</b>
  *  - Added TPI programming support for 6-pin ATTINY devices to the AVRISP programmer project (thanks to Tom Light)
  *  - Added command timeout counter to the AVRISP project so that the device no longer freezes when incorrectly connected
  *    to a target
  *  - Added new TemperatureDataLogger application, a USB data logger which writes to the device's dataflash and appears to
  *    the host as a standard Mass Storage device when inserted
  *  - Added MIDI event packing support to the MIDI Device and Host mode Class drivers, allowing for multiple MIDI events to
  *    sent or received in packed form in a single USB packet
  *  - Added new MIDI send buffer flush routines to the MIDI Device and Host mode Class drivers, to flush packed events
  *  - Added master mode hardware TWI driver for easy TWI peripheral control
  *  - Added ADC MUX masks for the standard ADC input channels on all AVR models with an ADC, altered demos to use these masks
  *    as on some models, the channel number is not identical to its single-ended ADC MUX mask
  *  - New Webserver project, a RNDIS host USB webserver using the open source uIP TCP/IP network stack and FatFS library
633
  *  - New BOARD value option BOARD_NONE (equivalent to not specifying BOARD) which will remove all board hardware drivers which
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
  *    do not adversely affect the code operation (currently only the LEDs driver)
  *  - Added keyboard modifier masks (HID_KEYBOARD_MODIFER_*) and LED report masks (KEYBOARD_LED_*) to the HID class driver and
  *    Keyboard demos
  *  - Added .5MHz recovery clock to the AVRISP programmer project when in ISP programming mode to correct mis-set fuses
  *
  *  <b>Changed:</b>
  *  - Slowed down software USART carried PDI programming in the AVRISP project to prevent transmission errors
  *  - Renamed the AVRISP project folder to AVRISP-MKII to reduce confusion
  *  - Renamed the RESET_LINE_* makefile tokens in the AVRISP MKII Project to AUX_LINE_*, as they are not always used for target
  *    reset
  *  - Changed over the MassStorageKeyboard Class driver device demo to use Start of Frame events rather than a timer to keep track
  *    of elapsed milliseconds
  *  - Inlined currently unused (but standardized) maintenance functions in the Device and Host Class drivers to save space
  *  - The XPLAINBridge project now selects between a USB to Serial bridge and a PDI programmer on startup, reading the JTAG port's
  *    TDI pin to determine which mode to use
  *  - Removed the stream example code from the Low Level VirtualSerial demos, as they were buggy and only served to add clutter
  *
  *  <b>Fixed:</b>
  *  - Fixed AVRISP project not able to enter programming mode when ISP protocol is used
  *  - Fixed AVRISP PDI race condition where the guard time between direction changes could be interpreted as a start bit
  *  - Fixed ADC_IsReadingComplete() returning an inverted result
  *  - Fixed blocking CDC streams not aborting when the host is disconnected
  *  - Fixed XPLAIN board Dataflash driver broken due to incorrect preprocessor commands
  *  - Fixed inverted XPLAIN LED driver output (LED turned on when it was supposed to be turned off, and vice-versa)
  *  - Fixed Class Driver struct interface numbers in the KeyboardMouse and VirtualSerialMouse demos (thanks to Renaud Cerrato)
  *  - Fixed invalid USB controller PLL prescaler values for the ATMEGAxxU2 controllers
  *  - Fixed lack of support for the ATMEGA32U2 in the DFU and CDC class bootloaders
  *  - Fixed Benito project not resetting the target AVR automatically when programming has completed
  *  - Fixed DFU bootloader programming not discarding the correct number of filler bytes from the host when non-aligned programming
  *    ranges are specified (thanks to Thomas Bleeker)
664
  *  - Fixed CDC and RNDIS host demos and class drivers - bidirectional endpoints should use two separate pipes, not one half-duplex pipe
665
666
667
668
669
670
671
  *  - Fixed Pipe_IsEndpointBound() not taking the endpoint's direction into account
  *  - Fixed EEPROM and FLASH ISP programming in the AVRISP project
  *  - Fixed incorrect values of USB_CONFIG_ATTR_SELFPOWERED and USB_CONFIG_ATTR_REMOTEWAKEUP tokens (thanks to Claus Christensen)
  *  - Fixed SerialStream driver blocking while waiting for characters to be received instead of returning EOF
  *  - Fixed SerialStream driver not setting stdin to the created serial stream (thanks to Mike Alexander)
  *  - Fixed USB_GetHIDReportSize() returning the number of bits in the specified report instead of bytes
  *  - Fixed AVRISP project not extending the command delay after each successful page/word/byte program
672
  *  - Fixed accuracy of the SERIAL_UBBRVAL() and SERIAL_2X_UBBRVAL() macros for higher baud rates (thanks to Renaud Cerrato)
673
  *
674
  *
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
  *  \section Sec_ChangeLog091223 Version 091223
  *
  *  <b>New:</b>
  *  - Added activity LED indicators to the AVRISP project to indicate when the device is busy processing a command
  *  - The USB target family and allowable USB mode tokens are now public and documented (USB_CAN_BE_*, USB_SERIES_*_AVR)
  *  - Added new XPLAIN USB to Serial Bridge project (thanks to John Steggall for initial proof-of-concept, David Prentice
  *    and Peter Danneger for revised software USART code)
  *  - Added new RNDIS Ethernet Host LowLevel demo
  *  - Added new RNDIS Ethernet Host Class Driver
  *  - Added new RNDIS Ethernet Host ClassDriver demo
  *  - Added CDC_Host_Flush() function to the CDC Host Class driver to flush sent data to the attached device
  *  - Added PDI programming support for XMEGA devices to the AVRISP programmer project (thanks to Justin Mattair)
  *  - Added support for the XPLAIN board Dataflash, with new XPLAIN_REV1 board target for the different dataflash used
  *    on the first revision boards compared to the one mounted on later revisions
  *  - Added new HID_ALIGN_DATA() macro to return the pre-retrieved value of a HID report item, left-aligned to a given datatype
  *  - Added new PreviousValue to the HID Report Parser report item structure, for easy monitoring of previous report item values
  *  - Added new EVK527 board target
  *  - Added new USB_Host_GetDeviceStringDescriptor() convenience function
  *  - Added new LEDNotification project to the library, to give a visual LED notification on new events from the host
  *  - Added new NO_DEVICE_REMOTE_WAKEUP and NO_DEVICE_SELF_POWER compile time options
  *
  *  <b>Changed:</b>
697
  *  - Removed code in the Keyboard demos to send zeroed reports between two reports with differing numbers of key codes
698
  *    as this relied on non-standard OS driver behaviour to repeat key groups
699
700
701
702
703
704
705
706
  *  - The SCSI_Request_Sense_Response_t and SCSI_Inquiry_Response_t type defines are now part of the Mass Storage Class
  *    driver common defines, rather than being defined in the Host mode Class driver section only
  *  - The USB_MODE_HOST token is now defined even when host mode is not available
  *  - The CALLBACK_HID_Device_CreateHIDReport() HID Device Class driver callback now has a new ReportType parameter to
  *    indicate the report type to generate
  *  - All Class Drivers now return false or the "DeviceDisconnected" error code of their respective error enums when a function
  *    is called when no host/device is connected where possible
  *  - The HOST_SENDCONTROL_DeviceDisconnect enum value has been renamed to HOST_SENDCONTROL_DeviceDisconnected to be in line
707
  *    with the rest of the library error codes
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
  *  - Make MIDI device demos also turn off the on board LEDs if MIDI Note On messages are sent with a velocity of zero,
  *    which some devices use instead of Note Off messages (thanks to Robin Green)
  *  - The CDC demos are now named "VirtualSerial" instead to indicate the demos' function rather than its implemented USB class,
  *    to reduce confusion and to be in line with the rest of the LUFA demos
  *  - The SImage_Host_SendBlockHeader() and SImage_Host_ReceiveBlockHeader() Still Image Host Class driver functions are now public
  *
  *  <b>Fixed:</b>
  *  - Added missing CDC_Host_CreateBlockingStream() function code to the CDC Host Class driver
  *  - Fixed incorrect values for REPORT_ITEM_TYPE_* enum values causing corrupt data in the HID Host Parser
  *  - Fixed misnamed SI_Host_USBTask() and SI_Host_ConfigurePipes() functions
  *  - Fixed broken USB_GetNextDescriptor() function causing the descriptor to jump ahead double the expected amount
  *  - Fixed Pipe_IsEndpointBound() not masking the given Endpoint Address against PIPE_EPNUM_MASK
  *  - Fixed host state machine not enabling Auto VBUS mode when HOST_DEVICE_SETTLE_DELAY_MS is set to zero
  *  - Fixed misnamed Pipe_SetPipeToken() macro for setting a pipe's direction
  *  - Fixed CDCHost failing on devices with bidirectional endpoints
  *  - Fixed USB driver failing to define the PLL prescaler mask for the ATMEGA8U2 and ATMEGA16U2
  *  - Fixed HID Parser not distributing the Usage Min and Usage Max values across an array of report items
  *  - Fixed Mass Storage Host Class driver and Low Level demo not clearing the error condition if an attached device returns a
  *    STALL to a GET MAX LUN request (thanks to Martin Luxen)
  *  - Fixed TeensyHID bootloader not properly shutting down the USB interface to trigger a disconnection on the host before resetting
728
  *  - Fixed MassStorageHost Class driver demo not having USB_STREAM_TIMEOUT_MS compile time option set properly to prevent slow
729
730
731
  *    devices from timing out the data pipes
  *  - Fixed the definition of the Endpoint_BytesInEndpoint() macro for the U4 series AVR parts
  *  - Fixed MIDI host Class driver MIDI_Host_SendEventPacket() routine not properly checking for Pipe ready before writing
732
  *  - Fixed use of deprecated struct initializers, removed library unused parameter warnings when compiled with -Wextra enabled
733
734
735
736
737
738
739
  *  - Fixed Still Image Host Class driver truncating the PIMA response code (thanks to Daniel Seibert)
  *  - 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
  *    used (thanks to Daniel Levy)
  *  - Fixed TeensyHID bootloader not enumerating to the host correctly (thanks to Clint Fisher)
  *  - Fixed AVRISP project timeouts not checking for the correct timeout period (thanks to Carl Ott)
  *  - Fixed STK525 Dataflash driver using incorrect bit-shifting for Dataflash addresses (thanks to Tim Mitchell)
  *
740
  *
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
  *  \section Sec_ChangeLog091122 Version 091122
  *
  *  <b>New:</b>
  *  - Added new Dual Role Keyboard/Mouse demo
  *  - Added new HID_HOST_BOOT_PROTOCOL_ONLY compile time token to reduce the size of the HID Host Class driver when
  *    Report protocol is not needed
  *  - Added new MIDI LowLevel and ClassDriver Host demo, add new MIDI Host Class driver
  *  - Added new CDC/Mouse ClassDriver device demo
  *  - Added new Joystick Host ClassDriver and LowLevel demos
  *  - Added new Printer Host mode Class driver
  *  - Added new Printer Host mode ClassDriver demo
  *  - Added optional support for double banked endpoints and pipes in the Device and Host mode Class drivers
  *  - Added new stream creation function to the CDC Class drivers, to easily make standard I/O streams from CDC Class driver instances
  *
  *  <b>Changed:</b>
756
  *  - Removed mostly useless "TestApp" demo, as it was mainly useful only for checking for syntax errors in the library
757
758
759
760
761
762
763
764
765
766
767
768
  *  - MIDI device demos now receive MIDI events from the host and display note ON messages via the board LEDs
  *  - Cleanups to the Device mode Mass Storage demo application SCSI routines
  *  - Changed Audio Class driver sample read/write functions to be inline, to reduce the number of cycles needed to transfer
  *    samples to and from the device (allowing more time for sample processing and output)
  *  - Audio class Device mode demos now work at both 16MHz and 8MHz, rather than just at 8MHz
  *  - The previous USBtoSerial demo has been moved into the projects directory, as it was just a modified CDC demo
  *  - The Endpoint/Pipe functions now use the const qualifier on the input buffer
  *  - Changed the CALLBACK_HIDParser_FilterHIDReportItem() callback to pass a HID_ReportItem_t rather than just the current
  *    item's attributes, to expose more information on the item (including it's type, collection path, etc.)
  *  - Changed MouseHostWithParser demos to check that the report items have a Mouse usage collection as a parent at some point,
  *    to prevent Joysticks from enumerating with the demo
  *  - Corrected the name of the misnamed USB_GetDeviceConfigDescriptor() function to USB_Host_GetDeviceConfigDescriptor().
769
  *  - Keyboard LowLevel/ClassDriver demos now support multiple simultaneous key presses (up to 6) per report
770
771
772
773
  *
  *  <b>Fixed:</b>
  *  - Fixed PrinterHost demo returning invalid Device ID data when the attached device does not have a
  *    device ID (thanks to Andrei Krainev)
774
  *  - Changed LUFA_VERSION_INTEGER define to use BCD values, to make comparisons easier
775
776
777
778
779
780
781
782
783
784
785
786
787
  *  - Fixed issue in the HID Host class driver's HID_Host_SendReportByID() routine using the incorrect mode (control/pipe)
  *    to send report to the attached device
  *  - Fixed ClassDriver AudioOutput device demo not selecting an audio output mode
  *  - Fixed incorrect SampleFrequencyType value in the AudioInput and AudioOutput ClassDriver demos' descriptors
  *  - Fixed incorrect event name rule in demo/project/bootloader makefiles
  *  - Fixed HID device class driver not reselecting the correct endpoint once the user callback routines have been called
  *  - Corrected HID descriptor in the Joystick Device demos - buttons should be placed outside the pointer collection
  *  - Fixed HID report parser collection paths invalid due to misplaced semicolon in the free path item search loop
  *  - Fixed HID host Class driver report send/receive report broken when issued through the control pipe
  *  - Fixed HOST_STATE_AS_GPIOR compile time option being ignored when in host mode (thanks to David Lyons)
  *  - Fixed LowLevel Keyboard demo not saving the issues report only after it has been sent to the host
  *  - Fixed Endpoint_Write_Control_Stream_* functions not sending a terminating IN when given data Length is zero
  *
788
  *
789
790
791
792
793
794
  *  \section Sec_ChangeLog090924 Version 090924
  *
  *  <b>New:</b>
  *  - Added new host mode class drivers and matching demos to the library for rapid application development
  *  - Added flag to the HID report parser to indicate if a device has multiple reports
  *  - Added new EVENT_USB_Device_StartOfFrame() event, controlled by the new USB_Device_EnableSOFEvents() and
795
  *    USB_Device_DisableSOFEvents() macros to give bus-synchronized millisecond interrupts when in USB device mode
796
797
798
799
800
801
802
803
804
805
806
  *  - Added new Endpoint_SetEndpointDirection() macro for bidirectional endpoints
  *  - Added new AVRISP project, a LUFA powered clone of the Atmel AVRISP-MKII programmer
  *  - Added ShutDown() functions for all hardware peripheral drivers, so that peripherals can be turned off after use
  *  - Added new CDC_Device_Flush() command to the device mode CDC Class driver to flush Device->Host data
  *  - Added extra masks to the SPI driver, changed SPI_Init() so that the clock polarity and sample modes can be set
  *  - Added new callback to the HID report parser, so that the user application can filter only the items it is interested
  *    in to be stored into the HIDReportInfo structure to save RAM
  *  - Added support for the officially recommended external peripheral layout for the BUMBLEB board (thanks to Dave Fletcher)
  *  - Added new Pipe_IsFrozen() macro to determine if the currently selected pipe is frozen
  *  - Added new USB_GetHIDReportSize() function to the HID report parser to retrieve the size of a given report by its ID
  *  - Added new combined Mass Storage and Keyboard demo (thanks to Matthias Hullin)
807
  *
808
809
810
811
812
813
814
  *  <b>Changed:</b>
  *  - SetIdle requests to the HID device driver with a 0 idle period (send changes only) now only affect the requested
  *    HID interface within the device, not all HID interfaces
  *  - Added explicit attribute masks to the device mode demos' descriptors
  *  - Added return values to the CDC and MIDI class driver transmit functions
  *  - Optimized Endpoint_Read_Word_* and Pipe_Read_Word_* macros to reduce compiled size
  *  - Added non-null function parameter pointer restrictions to USB Class drivers to improve user code reliability
815
  *  - Added new "Common" section to the class drivers, to hold all mode-independent definitions for clarity
816
817
  *  - Moved SCSI command/sense constants into the Mass Storage Class driver, instead of the user-code
  *  - Altered the SCSI commands in the LowLevel Mass Storage Host to save on FLASH space by reducing function calls
818
  *  - Changed the parameters and behaviour of the USB_GetDeviceConfigDescriptor() function so that it now performs size checks
819
820
821
822
823
824
825
826
  *    and data validations internally, to simplify user code
  *  - Changed HIDParser to only zero out important values in the Parsed HID Report Item Information structure to save cycles
  *  - The HID report parser now always processed FEATURE items - HID_ENABLE_FEATURE_PROCESSING token now has no effect
  *  - The HID report parser now always ignores constant-data items, HID_INCLUDE_CONSTANT_DATA_ITEMS token now has no effect
  *  - The Benito Programmer project now has its own unique VID/PID pair allocated from the Atmel donated LUFA VID/PID pool
  *  - Add in new invalid event hook check targets to project makefiles to produce compilation errors when invalid event names
  *    are used in a project
  *  - The HID Report Parser now gives information on the total length of each report within a HID interface
827
  *  - The USE_NONSTANDARD_DESCRIPTOR_NAMES compile time token has been removed - there are now separate USB_Descriptor_* and
828
829
830
831
832
833
834
835
836
837
  *    USB_StdDescriptor_* structures for both the LUFA and standardized element naming conventions so both may be used
  *
  *  <b>Fixed:</b>
  *  - Fixed possible lockup in the CDC device class driver, when the host sends data that is a multiple of the
  *    endpoint's bank
  *  - Fixed swapped parameters in the HID state memory copy call while processing a HID PUSH item in the HID report parser
  *  - Fixed memory corruption HID report parser when too many COLLECTION or PUSH items were processed
  *  - Fixed HID report parser not resetting the FEATURE item count when a REPORT ID item is encountered
  *  - Fixed USBtoSerial demos not reading in UDR1 when the USART receives data but the USB interface is not enumerated,
  *    causing continuous USART receive interrupts
838
  *  - Fixed misspelled event name in the Class driver USBtoSerial demo, preventing correct operation
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
  *  - Fixed invalid data being returned when a GetStatus request is issued in Device mode with an unhandled data recipient
  *  - Added hardware USART receive interrupt and software buffering to the Benito project to ensure received data is not
  *    missed or corrupted
  *  - Fixed Device mode HID Class driver always sending IN packets, even when nothing to report
  *  - Fixed Device mode HID Class driver not explicitly initializing the ReportSize parameter to zero before calling callback
  *    routine, so that ignored callbacks don't cause incorrect data to be sent
  *  - Fixed StillImageHost not correctly freezing and unfreezing data pipes while waiting for a response block header
  *  - Fixed error in the PrinterHost demo preventing the full page data from being sent to the attached device (thanks to John Andrews)
  *  - Fixed CDC based demos and projects' INF driver files under 64 bit versions of Windows (thanks to Ronny Hanson, Thomas Bleeker)
  *  - Re-add in missing flip, flip-ee, dfu and dfu-ee targets to project makefiles (thanks to Opendous Inc.)
  *  - Fix allowable F_CPU values comment in project makefiles to more accurately reflect the allowable values on the USB AVRs
  *  - Fixed DFU and CDC class bootloaders on the series 2 USB AVRs, corrected invalid signatures, added support for the new
  *    ATMEGAxx2 series 2 variant AVRs to the DFU bootloader
  *  - Fixed Low Level USBtoSerial demo not storing received characters (thanks to Michael Cooper)
  *  - Fixed MIDI Device Class driver not sending/receiving MIDI packets of the correct size (thanks to Thomas Bleeker)
  *
  *
  *  \section Sec_ChangeLog090810 Version 090810
  *
  *  <b>New:</b>
  *  - Added new device class drivers and matching demos to the library for rapid application development
  *  - Added new PrinterHost demo (thanks to John Andrews)
861
  *  - Added USB Missile Launcher project, submitted by Dave Fletcher
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
  *  - Added new Benito Arduino Programmer project
  *  - Added incomplete device and host mode demos for later enhancement
  *  - Updated MassStorage device block write routines to use ping-pong Dataflash buffering to increase throughput by around 30%
  *  - Error status LEDs shown when device endpoint configuration fails to complete in all demos and projects
  *  - Added new USB_Host_SetDeviceConfiguration() convenience function for easy configuration selection of devices while in USB
  *    host mode
  *  - Added new USB_Host_ClearPipeStall() convenience function to clear a stall condition on an attached device's endpoint
  *  - Added new USB_Host_GetDeviceDescriptor() convenience function to retrieve the attached device's Device descriptor
  *  - Added new Endpoint_ClearStatusStage() convenience function to assist with the status stages of control transfers
  *  - Added new USE_INTERNAL_SERIAL define for using the unique serial numbers in some AVR models as the USB device's serial number,
  *    added NO_INTERNAL_SERIAL compile time option to turn off new serial number reading code
  *  - Added new DATAFLASH_CHIP_MASK() macro to the Dataflash driver, which returns the Dataflash select mask for the given chip index
  *  - Added new HOST_STATE_WaitForDeviceRemoval host state machine state for non-blocking disabling of device communications until the
  *    device has been removed (for use when an error occurs or communications with the device have completed)
  *  - Added new FAST_STREAM_TRANSFERS compile time option for faster stream transfers via multiple bytes copied per stream loop
  *  - Added stdio stream demo code to the CDC device demos, to show how to create standard streams out of the virtual serial ports
  *  - Added new EEPROM and FLASH buffer versions of the Endpoint and Pipe stream functions
  *  - Added new USE_FLASH_DESCRIPTORS and FIXED_NUM_CONFIGURATIONS compile time options
  *  - Added support for the new ATMEGA32U2, ATMEGA16U2 and ATMEGA8U2 AVR models
  *  - Added new USB_DeviceState variable to keep track of the current Device mode USB state
  *  - Added new LEDs_ToggleLEDs() function to the LEDs driver
  *  - Added new Pipe_BoundEndpointNumber() and Pipe_IsEndpointBound() functions
  *  - Added new DEVICE_STATE_AS_GPIOR and HOST_STATE_AS_GPIOR compile time options
  *  - Added 404 Not Found errors to the webserver in the RNDIS demos to indicate invalid URLs
886
  *
887
  *  <b>Changed:</b>
888
  *  - Deprecated pseudo-scheduler and removed dynamic memory allocator from the library (first no longer needed and second unused)
889
890
891
892
893
894
895
896
897
898
899
900
  *  - The device-mode CALLBACK_USB_GetDescriptor() function now has an extra parameter so that the memory space in which the requested
  *    descriptor is located can be specified. This means that descriptors can now be located in multiple memory spaces within a device.
  *  - Removed vague USB_IsConnected global - test USB_DeviceState or USB_HostState explicitly to gain previous functionality
  *  - Removed USB_IsSuspended global - test USB_DeviceState against DEVICE_STATE_Suspended instead
  *  - Extended USB_GetDeviceConfigDescriptor() routine to require the configuration number within the device to fetch
  *  - Dataflash_WaitWhileBusy() now always ensures that the dataflash is ready for the next command immediately after returning,
  *    no need to call Dataflash_ToggleSelectedChipCS() afterwards
  *  - Low level API MIDI device demo no longer blocks if a note change event is sent while the endpoint is not ready
  *  - Pipe_GetErrorFlags() now returns additional error flags for overflow and underflow errors
  *  - Pipe stream functions now automatically set the correct pipe token, so that bidirectional pipes can be used
  *  - Pipe_ConfigurePipe() now automatically defaults IN pipes to accepting infinite IN requests, this can still be changed by calling
  *    the existing Pipe_SetFiniteINRequests() function
901
  *  - Changed F_USB entries in project makefiles to alias to F_CPU by default, as this is the most common case
902
  *  - Host mode demos now use sane terminal escape codes, so that text is always readable and events/program output is visually distinguished
903
  *    from one another using foreground colours
904
905
906
907
  *  - Internal per-device preprocessing conditions changed to per-device series rather than per-controller group for finer-grain
  *    internal control
  *  - Interrupts are no longer disabled during the processing of Control Requests on the default endpoint while in device mode
  *  - AudioOutput demos now always output to board LEDs, regardless of output mode (removed AUDIO_OUT_LEDS project option)
908
  *  - Removed SINGLE_DEVICE_CONFIGURATION compile time option in favor of the new FIXED_NUM_CONFIGURATIONS option so that the exact number
909
910
  *    of device configurations can be defined statically
  *  - Removed VBUS events, as they are already exposed to the user application via the regular device connection and disconnection events
911
  *  - Renamed and altered existing events to properly separate out Host and Device mode events
912
  *  - All demos switched over from GNU99 standards mode to C99 standards mode, to reduce the dependencies on GCC-only language extensions
913
914
915
  *
  *  <b>Fixed:</b>
  *  - Changed bootloaders to use FLASHEND rather than the existence of RAMPZ to determine if far FLASH pointers are needed to fix
916
  *    bootloaders on some of the USB AVR devices where avr-libc erroneously defines RAMPZ
917
  *  - Fixes to MassStorageHost for better device compatibility (increase command timeout, change MassStore_WaitForDataReceived()
918
  *    to only unfreeze and check one data pipe at a time) to prevent incorrect device enumerations and freezes while transferring data
919
920
921
922
923
924
925
926
927
928
929
930
  *  - Make Pipe_ConfigurePipe() mask the given endpoint number against PIPE_EPNUM_MASK to ensure the endpoint IN direction bit is
  *    cleared to prevent endpoint type corruption
  *  - Fixed issue opening CDC-ACM ports on hosts when the CDC device tries to send data before the host has set the line encoding
  *  - Fixed USB_OPT_MANUAL_PLL option being ignored during device disconnects on some models (thanks to Brian Dickman)
  *  - Fixed documentation mentioning Pipe_GetCurrentToken() function when correct function name is Pipe_GetPipeToken()
  *  - Fixed ADC driver for the ATMEGA32U4 and ATMEGA16U4 (thanks to Opendous Inc.)
  *  - Fixed CDCHost demo unfreezing the pipes at the point of configuration, rather than use
  *  - Fixed MassStorage demo not clearing the reset flag when a Mass Storage Reset is issued while not processing a command
  *  - Fixed USB_Host_SendControlRequest() not re-suspending the USB bus when initial device ready-wait fails
  *  - Fixed USB Pad regulator not being disabled on some AVR models when the USB_OPT_REG_DISABLED option is used
  *  - Fixed Host mode to Device mode UID change not causing a USB Disconnect event when a device was connected
  *  - Fixed Mouse/Keyboard demos not performing the correct arithmetic on the Idle period at the right times (thanks to Brian Dickman)
931
  *  - Fixed GenericHID failing HID class tests due to incorrect Logical Minimum and Logical Maximum values (thanks to Soren Greiner)
932
933
934
935
936
  *  - Fixed incorrect PIPE_EPNUM_MASK mask causing pipe failures on devices with endpoint addresses of 8 and above (thanks to John Andrews)
  *  - Fixed report data alignment issues in the MouseHostWithParser demo when X and Y movement data size is not a multiple of 8 bits
  *  - Fixed HID Report Descriptor Parser not correctly resetting internal states when a REPORT ID element is encountered
  *  - Fixed incorrect BUTTONS_BUTTON1 for the STK526 target
  *  - Fixed RNDIS demos freezing when more than one connection was attempted simultaneously, causing memory corruption
937
  *  - Fixed USBtoSerial demo receiving noise from the USART due to pull-up not being enabled
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
  *
  *
  *  \section Sec_ChangeLog090605 Version 090605
  *
  *  - Fixed bug in RNDISEthernet and DualCDC demos not using the correct USB_ControlRequest structure for control request data
  *  - Fixed documentation showing incorrect USB mode support on the supported AVRs list
  *  - Fixed RNDISEthernet not working under Linux due to Linux requiring an "optional" RNDIS request which was unhandled
  *  - Fixed Mouse and Keyboard device demos not acting in accordance with the HID specification for idle periods (thanks to Brian Dickman)
  *  - Removed support for endpoint/pipe non-control interrupts; these did not act in the way users expected, and had many subtle issues
  *  - Fixed Device Mode not handling Set Feature and Clear Feature Chapter 9 requests that are addressed to the device (thanks to Brian Dickman)
  *  - Moved control endpoint interrupt handling into the library itself, enable via the new INTERRUPT_CONTROL_ENDPOINT token
  *  - Fixed CDCHost not clearing configured pipes and resetting configured pipes mask when a partially enumerated invalid CDC
  *    interface is skipped
  *  - Clarified the size of library tokens which accept integer values in the Compile Time Tokens page, values now use the smallest datatype
  *    inside the library that is able to hold their defined value to save space
953
  *  - Removed DESCRIPTOR_ADDRESS() macro as it was largely superfluous and only served to obfuscate code
954
955
956
957
958
959
960
  *  - Rewritten event system to remove all macros, to make user code clearer
  *  - Fixed incorrect ENDPOINT_EPNUM_MASK mask preventing endpoints above EP3 from being selected (thanks to Jonathan Oakley)
  *  - Removed STREAM_CALLBACK() macro - callbacks now use regular function definitions to clarify user code
  *  - Removed DESCRIPTOR_COMPARATOR() macro - comparators should now use regular function definitions to clarify user code
  *  - USB_IsConnected is now cleared before the USB_Disconnect() event is fired in response to VBUS being removed
  *  - Fixed incorrect PID value being used in the USBtoSerial project (thanks to Phill)
  *  - Deleted StdDescriptors.c, renamed USB_GetDescriptor() to CALLBACK_USB_GetDescriptor, moved ConfigDescriptor.c/.h from the
961
  *    LUFA/Drivers/USB/Class/ directory to LUFA/Drivers/USB/HighLevel/ in preparation for the new USB class APIs
962
963
  *  - Moved out each demos' functionality library files (e.g. Ring Buffer library) to /Lib directories for a better directory structure
  *  - Removed Tx interrupt from the USBtoSerial demo; now sends characters via polling to ensure more time for the Rx interrupt
964
  *  - Fixed possible enumeration errors from spin-loops which may fail to exit if the USB connection is severed before the exit condition
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
  *    becomes true
  *
  *
  *  \section Sec_ChangeLog090510 Version 090510
  *
  *  - Added new GenericHIDHost demo
  *  - Corrections to the KeyboardHost and MouseHost demos' pipe handling to freeze and unfreeze the data pipes at the point of use
  *  - KeyboardHost, MouseHost and GenericHIDHost demos now save and restore the currently selected pipe inside the pipe ISR
  *  - Changed GenericHID device demo to use the LUFA scheduler, added INTERRUPT_DATA_ENDPOINT and INTERRUPT_CONTROL_ENDPOINT compile
  *    time options
  *  - All comments in the library, bootloaders, demos and projects have now been spell-checked and spelling mistakes/typos corrected
  *  - Added new PIMA_DATA_SIZE() define to the Still Image Host demo
  *  - Add call to MassStore_WaitForDataReceived() in MassStore_GetReturnedStatus() to ensure that the CSW has been received in the
  *    extended MSC timeout period before continuing, to prevent long processing delays from causing the MassStore_GetReturnedStatus()
  *    to early-abort (thanks to Dmitry Maksimov)
  *  - Move StdRequestType.h, StreamCallbacks.h, USBMode.h from the LowLevel USB driver directory to the HighLevel USB driver directory,
  *    where they are more suited
  *  - Removed all binary constants and replaced with decimal or hexadecimal constants so that unpatched GCC compilers can still build the
  *    code without having to be itself patched and recompiled first
  *  - Added preprocessor checks and documentation to the bootloaders giving information about missing SIGNATURE_x defines due to
  *    outdated avr-libc versions.
  *  - Added support to the CDCHost demo for devices with multiple CDC interfaces which are not the correct ACM type preceding the desired
  *    ACM CDC interface
  *  - Fixed GenericHID demo not starting USB and HID management tasks when not using interrupt driven modes (thanks to Carl Kjeldsen)
  *  - Fixed RNDISEthenet demo checking the incorrect message field for packet size constraints (thanks to Jonathan Oakley)
  *  - Fixed WriteNextReport code in the GenericHIDHost demo using incorrect parameter types and not selecting the correct endpoint
  *  - Adjusted sample CTC timer calculations in the AudioOutput and AudioInput demos to match the CTC calculations in the AVR datasheet,
  *    and to fix instances where rounding caused the endpoint to underflow (thanks to Robin Theunis)
  *  - The USB_Host_SendControlRequest() function no longer automatically selects the Control pipe (pipe 0), so that other control type
  *    pipes can be used with the function
  *  - The USB Host management task now saves and restores the currently selected pipe before and after the task completes
  *  - Fixed GenericHIDHost demo report write routine incorrect for control type requests (thanks to Andrei Krainev)
997
  *  - Removed Endpoint_ClearCurrentBank() and Pipe_ClearCurrentBank() in favor of new Endpoint_ClearIN(), Endpoint_ClearOUT(),
998
999
1000
  *    Pipe_ClearIN() and Pipe_ClearOUT() macros (done to allow for the detection of packets of zero length)
  *  - Renamed *_ReadWriteAllowed() macros to *_IsReadWriteAllowed() to remain consistent with the rest of the LUFA API
  *  - Endpoint_IsSetupReceived() macro has been renamed to Endpoint_IsSETUPReceived(), Endpoint_ClearSetupReceived() macro has been