Fix MassStorageKeyboard demo USE_INTERNAL_SERIAL check being performed before the required library headers were included, causing a compilation error.
Added notes to the class driver functions indicating which functions require what Device/Host state machine states to function.
This commit is contained in:
		
							parent
							
								
									1e1cf2c499
								
							
						
					
					
						commit
						6122ba93cf
					
				
					 17 changed files with 159 additions and 19 deletions
				
			
		| 
						 | 
				
			
			@ -29,10 +29,6 @@
 | 
			
		|||
  this software.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#if (USE_INTERNAL_SERIAL == NO_DESCRIPTOR)
 | 
			
		||||
	#warning USE_INTERNAL_SERIAL is not available on this AVR - please manually construct a device serial descriptor.
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/** \file
 | 
			
		||||
 *
 | 
			
		||||
 *  USB Device Descriptors, for library use when in USB device mode. Descriptors are special 
 | 
			
		||||
| 
						 | 
				
			
			@ -42,6 +38,18 @@
 | 
			
		|||
 | 
			
		||||
#include "Descriptors.h"
 | 
			
		||||
 | 
			
		||||
/* On some devices, there is a factory set internal serial number which can be automatically sent to the host as
 | 
			
		||||
 * the device's serial number when the Device Descriptor's .SerialNumStrIndex entry is set to USE_INTERNAL_SERIAL.
 | 
			
		||||
 * This allows the host to track a device across insertions on different ports, allowing them to retain allocated
 | 
			
		||||
 * resources like COM port numbers and drivers. On demos using this feature, give a warning on unsupported devices
 | 
			
		||||
 * so that the user can supply their own serial number descriptor instead or remove the USE_INTERNAL_SERIAL value
 | 
			
		||||
 * from the Device Descriptor (forcing the host to generate a serial number for each device from the VID, PID and
 | 
			
		||||
 * port location).
 | 
			
		||||
 */
 | 
			
		||||
#if (USE_INTERNAL_SERIAL == NO_DESCRIPTOR)
 | 
			
		||||
	#warning USE_INTERNAL_SERIAL is not available on this AVR - please manually construct a device serial descriptor.
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/** HID class report descriptor. This is a special descriptor constructed with values from the
 | 
			
		||||
 *  USBIF HID class specification to describe the reports and capabilities of the HID device. This
 | 
			
		||||
 *  descriptor is parsed by the host and its contents used to determine what data (and in what encoding)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -123,8 +123,7 @@ LUFA_PATH = ../../../..
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
# LUFA library compile-time options
 | 
			
		||||
LUFA_OPTS  = -D USE_NONSTANDARD_DESCRIPTOR_NAMES
 | 
			
		||||
LUFA_OPTS += -D USB_DEVICE_ONLY
 | 
			
		||||
LUFA_OPTS  = -D USB_DEVICE_ONLY
 | 
			
		||||
LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8
 | 
			
		||||
LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1
 | 
			
		||||
LUFA_OPTS += -D USE_FLASH_DESCRIPTORS
 | 
			
		||||
| 
						 | 
				
			
			@ -132,6 +131,7 @@ LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENAB
 | 
			
		|||
LUFA_OPTS += -D INTERRUPT_CONTROL_ENDPOINT
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# List C source files here. (C dependencies are automatically generated.)
 | 
			
		||||
SRC = $(TARGET).c                                                 \
 | 
			
		||||
	  Descriptors.c                                               \
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue