Commit b221e7d1 authored by Dean Camera's avatar Dean Camera
Browse files

Remove USE_NONSTANDARD_DESCRIPTOR_NAMES compile time token, split out standard...

Remove USE_NONSTANDARD_DESCRIPTOR_NAMES compile time token, split out standard descriptors into seperate USB_Descriptor_* and USB_StdDescriptor_* structures so that both can be used within the one project.

Add guard to the HID Host Class driver SetProtocol command, to ensure that the device supports boot protocol mode before issuing the request.
parent 524decde
......@@ -116,8 +116,7 @@ LUFA_PATH = ../../../..
# LUFA library compile-time options
LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES
LUFA_OPTS += -D NO_STREAM_CALLBACKS
LUFA_OPTS = -D NO_STREAM_CALLBACKS
LUFA_OPTS += -D USB_HOST_ONLY
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"
......
......@@ -116,8 +116,7 @@ LUFA_PATH = ../../../..
# LUFA library compile-time options
LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES
LUFA_OPTS += -D NO_STREAM_CALLBACKS
LUFA_OPTS = -D NO_STREAM_CALLBACKS
LUFA_OPTS += -D USB_HOST_ONLY
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"
......
......@@ -116,8 +116,7 @@ LUFA_PATH = ../../../..
# LUFA library compile-time options
LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES
LUFA_OPTS += -D USB_HOST_ONLY
LUFA_OPTS = -D USB_HOST_ONLY
LUFA_OPTS += -D NO_STREAM_CALLBACKS
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"
......
......@@ -116,8 +116,7 @@ LUFA_PATH = ../../../..
# LUFA library compile-time options
LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES
LUFA_OPTS += -D NO_STREAM_CALLBACKS
LUFA_OPTS = -D NO_STREAM_CALLBACKS
LUFA_OPTS += -D USB_HOST_ONLY
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"
......
......@@ -116,8 +116,7 @@ LUFA_PATH = ../../..
# LUFA library compile-time options
LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES
LUFA_OPTS += -D USE_FLASH_DESCRIPTORS
LUFA_OPTS = -D USE_FLASH_DESCRIPTORS
# List C source files here. (C dependencies are automatically generated.)
......
......@@ -50,12 +50,7 @@ uint8_t CDC_Host_ConfigurePipes(USB_ClassInfo_CDC_Host_t* CDCInterfaceInfo, uint
return CDC_ENUMERROR_NoCDCInterfaceFound;
}
CDCInterfaceInfo->State.ControlInterfaceNumber =
#if defined(USE_NONSTANDARD_DESCRIPTOR_NAMES)
DESCRIPTOR_CAST(ConfigDescriptorData, USB_Descriptor_Interface_t).InterfaceNumber;
#else
DESCRIPTOR_CAST(ConfigDescriptorData, USB_Descriptor_Interface_t).bInterfaceNumber;
#endif
CDCInterfaceInfo->State.ControlInterfaceNumber = DESCRIPTOR_CAST(ConfigDescriptorData, USB_Descriptor_Interface_t).InterfaceNumber;
while (FoundEndpoints != (CDC_FOUND_NOTIFICATION_IN | CDC_FOUND_DATAPIPE_IN | CDC_FOUND_DATAPIPE_OUT))
{
......@@ -259,7 +254,7 @@ uint8_t CDC_Host_SendControlLineStateChange(USB_ClassInfo_CDC_Host_t* CDCInterfa
uint8_t CDC_Host_SendString(USB_ClassInfo_CDC_Host_t* CDCInterfaceInfo, char* Data, uint16_t Length)
{
if ((USB_HostState != HOST_STATE_Configured) || !(CDCInterfaceInfo->State.IsActive))
return;
return PIPE_READYWAIT_NoError;
uint8_t ErrorCode;
......@@ -274,7 +269,7 @@ uint8_t CDC_Host_SendString(USB_ClassInfo_CDC_Host_t* CDCInterfaceInfo, char* Da
uint8_t CDC_Host_SendByte(USB_ClassInfo_CDC_Host_t* CDCInterfaceInfo, uint8_t Data)
{
if ((USB_HostState != HOST_STATE_Configured) || !(CDCInterfaceInfo->State.IsActive))
return;
return PIPE_READYWAIT_NoError;;
uint8_t ErrorCode;
......
......@@ -60,14 +60,16 @@ uint8_t HID_Host_ConfigurePipes(USB_ClassInfo_HID_Host_t* HIDInterfaceInfo, uint
} while (HIDInterfaceInfo->Config.HIDInterfaceProtocol &&
(CurrentHIDInterface->Protocol != HIDInterfaceInfo->Config.HIDInterfaceProtocol));
HIDInterfaceInfo->State.InterfaceNumber =
#if defined(USE_NONSTANDARD_DESCRIPTOR_NAMES)
CurrentHIDInterface->InterfaceNumber;
#else
CurrentHIDInterface->bInterfaceNumber;
#endif
HIDInterfaceInfo->State.InterfaceNumber = CurrentHIDInterface->InterfaceNumber;
HIDInterfaceInfo->State.SupportsBootSubClass = (CurrentHIDInterface->SubClass != 0);
if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData, DComp_NextHID) != DESCRIPTOR_SEARCH_COMP_Found)
{
return HID_ENUMERROR_NoHIDDescriptorFound;
}
HIDInterfaceInfo->State.HIDReportSize = DESCRIPTOR_CAST(ConfigDescriptorData, USB_HID_Descriptor_t).HIDReportLength;
while (FoundEndpoints != (HID_FOUND_DATAPIPE_IN | HID_FOUND_DATAPIPE_OUT))
{
if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,
......@@ -117,6 +119,16 @@ static uint8_t DComp_HID_Host_NextHIDInterface(void* CurrentDescriptor)
return DESCRIPTOR_SEARCH_NotFound;
}
static uint8_t DComp_NextHID(void* CurrentDescriptor)
{
if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_HID)
return DESCRIPTOR_SEARCH_Found;
else if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
return DESCRIPTOR_SEARCH_Fail;
else
return DESCRIPTOR_SEARCH_NotFound;
}
static uint8_t DComp_HID_Host_NextHIDInterfaceEndpoint(void* CurrentDescriptor)
{
if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Endpoint)
......@@ -170,6 +182,9 @@ uint8_t USB_HID_Host_SetProtocol(USB_ClassInfo_HID_Host_t* HIDInterfaceInfo, boo
Pipe_SelectPipe(PIPE_CONTROLPIPE);
if (UseReportProtocol && !(HIDInterfaceInfo->State.SupportsBootSubClass))
return MS_ERROR_UNSUPPORTED;
return USB_Host_SendControlRequest(NULL);
}
......
......@@ -55,6 +55,10 @@
#endif
/* Public Interface - May be used in end-application: */
/* Macros: */
/** Error code for some HID Host functions, indicating a logical (and not hardware) error */
#define MS_ERROR_UNSUPPORTED 0xC0
/* Type Defines: */
/** Class state structure. An instance of this structure should be made within the user application,
* and passed to each of the HID class driver functions as the HIDInterfaceInfo parameter. This
......@@ -71,6 +75,8 @@
* boot subclass protocol is required (e.g. keyboard, mouse), or
* leave as 0 to match against the first HID interface found
*/
HID_ReportInfo_t* HIDParserData; /**< HID parser data to store the parsed HID report data, when boot protocol
* is not used */
} Config; /**< Config data for the USB class interface within the device. All elements in this section
* <b>must</b> be set or the interface will fail to enumerate and operate correctly.
*/
......@@ -88,6 +94,7 @@
bool SupportsBootSubClass; /**< Indicates if the current interface instance supports the HID Boot
* Protocol when enabled via \ref USB_HID_Host_SetProtocol()
*/
uint16_t HIDReportSize; /**< Size in bytes of the HID report descriptor in the device */
} State; /**< State data for the USB class interface within the device. All elements in this section
* <b>may</b> be set to initial values, but may also be ignored to default to sane values when
* the interface is enumerated.
......@@ -100,7 +107,8 @@
HID_ENUMERROR_NoError = 0, /**< Configuration Descriptor was processed successfully */
HID_ENUMERROR_InvalidConfigDescriptor = 1, /**< The device returned an invalid Configuration Descriptor */
HID_ENUMERROR_NoHIDInterfaceFound = 2, /**< A compatible HID interface was not found in the device's Configuration Descriptor */
HID_ENUMERROR_EndpointsNotFound = 3, /**< Compatible HID endpoints were not found in the device's HID interface */
HID_ENUMERROR_NoHIDDescriptorFound = 3, /**< The HID descriptor was not found in the device's HID interface */
HID_ENUMERROR_EndpointsNotFound = 4, /**< Compatible HID endpoints were not found in the device's HID interface */
};
/* Function Prototypes: */
......@@ -109,6 +117,7 @@
uint8_t* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1, 3);
bool HID_Host_IsReportReceived(USB_ClassInfo_HID_Host_t* HIDInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
uint8_t USB_HID_Host_SetProtocol(USB_ClassInfo_HID_Host_t* HIDInterfaceInfo, bool UseReportProtocol) ATTR_NON_NULL_PTR_ARG(1);
/* Private Interface - For use in library only: */
......@@ -122,6 +131,7 @@
/* Function Prototypes: */
#if defined(INCLUDE_FROM_HID_CLASS_HOST_C)
static uint8_t DComp_HID_Host_NextHIDInterface(void* CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
static uint8_t DComp_NextHID(void* CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
static uint8_t DComp_HID_Host_NextHIDInterfaceEndpoint(void* CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
#endif
#endif
......
......@@ -50,12 +50,7 @@ uint8_t MS_Host_ConfigurePipes(USB_ClassInfo_MS_Host_t* MSInterfaceInfo, uint16_
return MS_ENUMERROR_NoMSInterfaceFound;
}
MSInterfaceInfo->State.InterfaceNumber =
#if defined(USE_NONSTANDARD_DESCRIPTOR_NAMES)
DESCRIPTOR_PCAST(DeviceConfigDescriptor, USB_Descriptor_Interface_t)->InterfaceNumber;
#else
DESCRIPTOR_PCAST(DeviceConfigDescriptor, USB_Descriptor_Interface_t)->bInterfaceNumber;
#endif
MSInterfaceInfo->State.InterfaceNumber = DESCRIPTOR_PCAST(DeviceConfigDescriptor, USB_Descriptor_Interface_t)->InterfaceNumber;
while (FoundEndpoints != (MS_FOUND_DATAPIPE_IN | MS_FOUND_DATAPIPE_OUT))
{
......@@ -150,7 +145,8 @@ static uint8_t MS_Host_SendCommand(USB_ClassInfo_MS_Host_t* MSInterfaceInfo, MS_
Pipe_SelectPipe(MSInterfaceInfo->Config.DataOUTPipeNumber);
Pipe_Unfreeze();
if ((ErrorCode = Pipe_Write_Stream_LE(SCSICommandBlock, sizeof(MS_CommandBlockWrapper_t))) != PIPE_RWSTREAM_NoError)
if ((ErrorCode = Pipe_Write_Stream_LE(SCSICommandBlock, sizeof(MS_CommandBlockWrapper_t),
NO_STREAM_CALLBACK)) != PIPE_RWSTREAM_NoError)
return ErrorCode;
Pipe_ClearOUT();
......@@ -238,7 +234,7 @@ static uint8_t MS_Host_SendReceiveData(USB_ClassInfo_MS_Host_t* MSInterfaceInfo,
Pipe_SelectPipe(MSInterfaceInfo->Config.DataINPipeNumber);
Pipe_Unfreeze();
if ((ErrorCode = Pipe_Read_Stream_LE(BufferPtr, BytesRem)) != PIPE_RWSTREAM_NoError)
if ((ErrorCode = Pipe_Read_Stream_LE(BufferPtr, BytesRem, NO_STREAM_CALLBACK)) != PIPE_RWSTREAM_NoError)
return ErrorCode;
Pipe_ClearIN();
......@@ -248,7 +244,7 @@ static uint8_t MS_Host_SendReceiveData(USB_ClassInfo_MS_Host_t* MSInterfaceInfo,
Pipe_SelectPipe(MSInterfaceInfo->Config.DataOUTPipeNumber);
Pipe_Unfreeze();
if ((ErrorCode = Pipe_Write_Stream_LE(BufferPtr, BytesRem)) != PIPE_RWSTREAM_NoError)
if ((ErrorCode = Pipe_Write_Stream_LE(BufferPtr, BytesRem, NO_STREAM_CALLBACK)) != PIPE_RWSTREAM_NoError)
return ErrorCode;
Pipe_ClearOUT();
......@@ -276,7 +272,8 @@ static uint8_t MS_Host_GetReturnedStatus(USB_ClassInfo_MS_Host_t* MSInterfaceInf
Pipe_SelectPipe(MSInterfaceInfo->Config.DataINPipeNumber);
Pipe_Unfreeze();
if ((ErrorCode = Pipe_Read_Stream_LE(SCSICommandStatus, sizeof(MS_CommandStatusWrapper_t))) != PIPE_RWSTREAM_NoError)
if ((ErrorCode = Pipe_Read_Stream_LE(SCSICommandStatus, sizeof(MS_CommandStatusWrapper_t),
NO_STREAM_CALLBACK)) != PIPE_RWSTREAM_NoError)
return ErrorCode;
Pipe_ClearIN();
......
......@@ -55,6 +55,7 @@
/* Public Interface - May be used in end-application: */
/* Macros: */
/** Error code for some Mass Storage Host functions, indicating a logical (and not hardware) error */
#define MS_ERROR_LOGICAL_CMD_FAILED 0xC0
/* Type Defines: */
......
......@@ -55,6 +55,7 @@
/* Public Interface - May be used in end-application: */
/* Macros: */
/** Error code for some Still Image Host functions, indicating a logical (and not hardware) error */
#define SI_ERROR_LOGICAL_CMD_FAILED 0xC0
/* Type Defines: */
......@@ -134,7 +135,7 @@
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum, or \ref SI_ERROR_LOGICAL_CMD_FAILED if the device
* returned a logical command failure
*/
uint8_t SImage_Host_OpenSession(USB_ClassInfo_SI_Host_t* SIInterfaceInfo);
uint8_t SImage_Host_OpenSession(USB_ClassInfo_SI_Host_t* SIInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
/** Closes an already opened PIMA session with the attached device. This should be used after all session-orientated
* PIMA commands have been issued to the device.
......@@ -144,7 +145,7 @@
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum, or \ref SI_ERROR_LOGICAL_CMD_FAILED if the device
* returned a logical command failure
*/
uint8_t SImage_Host_CloseSession(USB_ClassInfo_SI_Host_t* SIInterfaceInfo);
uint8_t SImage_Host_CloseSession(USB_ClassInfo_SI_Host_t* SIInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
/** Sends a given PIMA command to the attached device, filling out the PIMA command header automatically as required.
*
......@@ -157,7 +158,7 @@
* returned a logical command failure
*/
uint8_t SImage_Host_SendCommand(USB_ClassInfo_SI_Host_t* SIInterfaceInfo, uint16_t Operation, uint8_t TotalParams,
uint32_t* Params);
uint32_t* Params) ATTR_NON_NULL_PTR_ARG(1);
/** Receives and checks a response block from the attached PIMA device, once a command has been issued and all data
* associated with the command has been transferred.
......@@ -167,7 +168,7 @@
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum, or \ref SI_ERROR_LOGICAL_CMD_FAILED if the device
* returned a logical command failure
*/
uint8_t SImage_Host_ReceiveResponse(USB_ClassInfo_SI_Host_t* SIInterfaceInfo);
uint8_t SImage_Host_ReceiveResponse(USB_ClassInfo_SI_Host_t* SIInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
/** Indicates if the device has issued a PIMA event block to the host via the asynchronous events pipe.
*
......@@ -175,7 +176,7 @@
*
* \return Boolean true if an event is waiting to be read, false otherwise
*/
bool SImage_Host_IsEventReceived(USB_ClassInfo_SI_Host_t* SIInterfaceInfo);
bool SImage_Host_IsEventReceived(USB_ClassInfo_SI_Host_t* SIInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
/** Receives an asynchronous event block from the device via the asynchronous events pipe.
*
......@@ -186,7 +187,7 @@
* returned a logical command failure
*/
uint8_t SImage_Host_ReceiveEventHeader(USB_ClassInfo_SI_Host_t* SIInterfaceInfo,
SI_PIMA_Container_t* PIMAHeader);
SI_PIMA_Container_t* PIMAHeader) ATTR_NON_NULL_PTR_ARG(1, 2);
/** Sends arbitrary data to the attached device, for use in the data phase of PIMA commands which require data
* transfer beyond the regular PIMA command block parameters.
......@@ -197,7 +198,7 @@
*
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum
*/
uint8_t SImage_Host_SendData(USB_ClassInfo_SI_Host_t* SIInterfaceInfo, void* Buffer, uint16_t Bytes);
uint8_t SImage_Host_SendData(USB_ClassInfo_SI_Host_t* SIInterfaceInfo, void* Buffer, uint16_t Bytes) ATTR_NON_NULL_PTR_ARG(1, 2);
/** Receives arbitrary data from the attached device, for use in the data phase of PIMA commands which require data
* transfer beyond the regular PIMA command block parameters.
......@@ -208,7 +209,7 @@
*
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum
*/
uint8_t SImage_Host_ReadData(USB_ClassInfo_SI_Host_t* SIInterfaceInfo, void* Buffer, uint16_t Bytes);
uint8_t SImage_Host_ReadData(USB_ClassInfo_SI_Host_t* SIInterfaceInfo, void* Buffer, uint16_t Bytes) ATTR_NON_NULL_PTR_ARG(1, 2);
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
......
......@@ -51,11 +51,7 @@ uint8_t USB_GetDeviceConfigDescriptor(uint8_t ConfigNumber, uint16_t* const Conf
if ((ErrorCode = USB_Host_SendControlRequest(ConfigHeader)) != HOST_SENDCONTROL_Successful)
return ErrorCode;
#if defined(USE_NONSTANDARD_DESCRIPTOR_NAMES)
*ConfigSizePtr = DESCRIPTOR_CAST(ConfigHeader, USB_Descriptor_Configuration_Header_t).TotalConfigurationSize;
#else
*ConfigSizePtr = DESCRIPTOR_CAST(ConfigHeader, USB_Descriptor_Configuration_Header_t).wTotalLength;
#endif
if (*ConfigSizePtr > BufferSize)
return HOST_GETCONFIG_BuffOverflow;
......
......@@ -98,18 +98,10 @@
* This value's meaning depends on the descriptor's placement in the descriptor, but standard type
* values can be accessed in the \ref USB_DescriptorTypes_t enum.
*/
#if defined(USE_NONSTANDARD_DESCRIPTOR_NAMES) || defined(__DOXYGEN__)
#define DESCRIPTOR_TYPE(DescriptorPtr) DESCRIPTOR_CAST(DescriptorPtr, USB_Descriptor_Header_t).Type
#else
#define DESCRIPTOR_TYPE(DescriptorPtr) DESCRIPTOR_CAST(DescriptorPtr, USB_Descriptor_Header_t).bDescriptorType
#endif
#define DESCRIPTOR_TYPE(DescriptorPtr) DESCRIPTOR_CAST(DescriptorPtr, USB_Descriptor_Header_t).Type
/** Returns the descriptor's size, expressed as the 8-bit value indicating the number of bytes. */
#if defined(USE_NONSTANDARD_DESCRIPTOR_NAMES) || defined(__DOXYGEN__)
#define DESCRIPTOR_SIZE(DescriptorPtr) DESCRIPTOR_CAST(DescriptorPtr, USB_Descriptor_Header_t).Size
#else
#define DESCRIPTOR_SIZE(DescriptorPtr) DESCRIPTOR_CAST(DescriptorPtr, USB_Descriptor_Header_t).bLength
#endif
#define DESCRIPTOR_SIZE(DescriptorPtr) DESCRIPTOR_CAST(DescriptorPtr, USB_Descriptor_Header_t).Size
/* Type Defines: */
/** Type define for a Configuration Descriptor comparator function (function taking a pointer to an array
......@@ -268,11 +260,7 @@
static inline void USB_GetNextDescriptor(uint16_t* const BytesRem,
uint8_t** const CurrConfigLoc)
{
#if defined(USE_NONSTANDARD_DESCRIPTOR_NAMES)
uint16_t CurrDescriptorSize = DESCRIPTOR_CAST(*CurrConfigLoc, USB_Descriptor_Header_t).Size;
#else
uint16_t CurrDescriptorSize = DESCRIPTOR_CAST(*CurrConfigLoc, USB_Descriptor_Header_t).bLength;
#endif
*CurrConfigLoc += CurrDescriptorSize;
*BytesRem -= CurrDescriptorSize;
......
This diff is collapsed.
......@@ -232,14 +232,9 @@ static void USB_Device_GetInternalSerialDescriptor(void)
int16_t UnicodeString[20];
} SignatureDescriptor;
#if defined(USE_NONSTANDARD_DESCRIPTOR_NAMES)
SignatureDescriptor.Header.Size = sizeof(SignatureDescriptor);
SignatureDescriptor.Header.Type = DTYPE_String;
#else
SignatureDescriptor.Header.bLength = sizeof(SignatureDescriptor);
SignatureDescriptor.Header.bDescriptorType = DTYPE_String;
#endif
SignatureDescriptor.Header.Size = sizeof(SignatureDescriptor);
SignatureDescriptor.Header.Type = DTYPE_String;
uint8_t SigReadAddress = 0x0E;
for (uint8_t SerialCharNum = 0; SerialCharNum < 20; SerialCharNum++)
......
......@@ -137,11 +137,7 @@ void USB_Host_ProcessNextHostState(void)
break;
}
#if defined(USE_NONSTANDARD_DESCRIPTOR_NAMES)
USB_ControlPipeSize = DataBuffer[offsetof(USB_Descriptor_Device_t, Endpoint0Size)];
#else
USB_ControlPipeSize = DataBuffer[offsetof(USB_Descriptor_Device_t, bMaxPacketSize0)];
#endif
USB_Host_ResetDevice();
......
......@@ -40,6 +40,8 @@
* - 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
* - The USE_NONSTANDARD_DESCRIPTOR_NAMES compile time token has been removed - there are now seperate USB_Descriptor_* and
* 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
......
......@@ -72,12 +72,6 @@
* <b>USE_EEPROM_DESCRIPTORS</b> - ( \ref Group_Descriptors ) \n
* Similar to USE_RAM_DESCRIPTORS, but all descriptors are stored in the AVR's EEPROM memory rather than RAM.
*
* <b>USE_NONSTANDARD_DESCRIPTOR_NAMES</b> - ( \ref Group_Descriptors ) \n
* The USB 2.0 standard gives some rather obscure names for the elements in the standard descriptor types (device, configuration,
* string, endpoint, etc.). By default the LUFA library uses these names in its predefined descriptor structure types for
* compatibility. If this token is defined, the structure element names are switched to the LUFA-specific but more descriptive
* names documented in the StdDescriptors.h source file.
*
* <b>NO_INTERNAL_SERIAL</b> - ( \ref Group_Descriptors ) \n
* Some AVR models contain a unique 20-digit serial number which can be used as the device serial number, while in device mode. This
* allows the host to uniquely identify the device regardless of if it is moved between USB ports on the same computer, allowing
......
......@@ -14,10 +14,10 @@
*
* <b>Non-USB Library Components</b>
* - The ADC_Off() function has been renamed to \ref ADC_ShutDown() to be consistent with the rest of the library.
* - The Dataflash_Init() routine no longer initializes the SPI bus - the SPI bus should be initialized manually via a
* - The \ref SPI_Init() routine's parameters have changed, so that the clock polarity and data sampling modes can be set. See
* the \ref SPI_Init() function documentation for more details
* - The \ref Dataflash_Init() routine no longer initializes the SPI bus - the SPI bus should be initialized manually via a
* call to SPI_Init() before using the Dataflash driver
* - The SPI_Init() routine's parameters have changed, so that the clock polarity and data sampling modes can be set. See
* the SPI_Init() function documentation for more details
*
* <b>Host Mode</b>
* - The \ref USB_GetDeviceConfigDescriptor() function's parameters and behaviour has changed; the user is required to
......@@ -28,6 +28,14 @@
* is interested in into the processed HID report item structure to save RAM. See \ref CALLBACK_HIDParser_FilterHIDReportItem().
* - The HID report parser now always parses FEATURE and always ignores constant-data items - the HID_ENABLE_FEATURE_PROCESSING
* and HID_INCLUDE_CONSTANT_DATA_ITEMS compile time tokens now have no effect.
* - The USE_NONSTANDARD_DESCRIPTOR_NAMES compile time token has been removed - there are now seperate USB_Descriptor_*
* and USB_StdDescriptor_* structures for both the LUFA and standardized element naming conventions so that both may be used in
* the one project. For existing projects using the standardized names, change all code to use the USB_StdDescriptor_* variants.
*
* <b>Device Mode</b>
* - The USE_NONSTANDARD_DESCRIPTOR_NAMES compile time token has been removed - there are now seperate USB_Descriptor_*
* and USB_StdDescriptor_* structures for both the LUFA and standardized element naming conventions so that both may be used in
* the one project. For existing projects using the standardized names, change all code to use the USB_StdDescriptor_* variants.
*
* \section Sec_Migration090810 Migrating from 090605 to 090810
*
......
......@@ -116,8 +116,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=16
LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1
LUFA_OPTS += -D NO_STREAM_CALLBACKS
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment