Add guard to the HID Host Class driver SetProtocol command, to ensure that the device supports boot protocol mode before issuing the request.
\r
# LUFA library compile-time options\r
LUFA_OPTS = -D USB_DEVICE_ONLY\r
-LUFA_OPTS += -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
LUFA_OPTS += -D DEVICE_STATE_AS_GPIOR=0\r
LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8\r
LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1\r
\r
# LUFA library compile-time options\r
LUFA_OPTS = -D USB_DEVICE_ONLY\r
-LUFA_OPTS += -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
LUFA_OPTS += -D DEVICE_STATE_AS_GPIOR=0\r
LUFA_OPTS += -D CONTROL_ONLY_DEVICE\r
LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=32\r
\r
# LUFA library compile-time options\r
LUFA_OPTS = -D USB_DEVICE_ONLY\r
-LUFA_OPTS += -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
LUFA_OPTS += -D CONTROL_ONLY_DEVICE\r
LUFA_OPTS += -D DEVICE_STATE_AS_GPIOR=0\r
LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D NO_STREAM_CALLBACKS\r
+LUFA_OPTS = -D NO_STREAM_CALLBACKS\r
LUFA_OPTS += -D USB_DEVICE_ONLY\r
LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8\r
LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D NO_STREAM_CALLBACKS\r
+LUFA_OPTS = -D NO_STREAM_CALLBACKS\r
LUFA_OPTS += -D USB_DEVICE_ONLY\r
LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8\r
LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D USB_DEVICE_ONLY\r
+LUFA_OPTS = -D USB_DEVICE_ONLY\r
LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8\r
LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1\r
LUFA_OPTS += -D USE_FLASH_DESCRIPTORS\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D USB_DEVICE_ONLY\r
+LUFA_OPTS = -D USB_DEVICE_ONLY\r
LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8\r
LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1\r
LUFA_OPTS += -D USE_FLASH_DESCRIPTORS\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D USB_DEVICE_ONLY\r
+LUFA_OPTS = -D USB_DEVICE_ONLY\r
LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8\r
LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1\r
LUFA_OPTS += -D USE_FLASH_DESCRIPTORS\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D USB_DEVICE_ONLY\r
+LUFA_OPTS = -D USB_DEVICE_ONLY\r
LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8\r
LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1\r
LUFA_OPTS += -D USE_FLASH_DESCRIPTORS\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D USB_DEVICE_ONLY\r
+LUFA_OPTS = -D USB_DEVICE_ONLY\r
LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8\r
LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1\r
LUFA_OPTS += -D USE_FLASH_DESCRIPTORS\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D USB_DEVICE_ONLY\r
+LUFA_OPTS = -D USB_DEVICE_ONLY\r
LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8\r
LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1\r
LUFA_OPTS += -D USE_FLASH_DESCRIPTORS\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D USB_DEVICE_ONLY\r
+LUFA_OPTS = -D USB_DEVICE_ONLY\r
LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8\r
LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1\r
LUFA_OPTS += -D USE_FLASH_DESCRIPTORS\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D USB_DEVICE_ONLY\r
+LUFA_OPTS = -D USB_DEVICE_ONLY\r
LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8\r
LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1\r
LUFA_OPTS += -D USE_FLASH_DESCRIPTORS\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D USB_DEVICE_ONLY\r
+LUFA_OPTS = -D USB_DEVICE_ONLY\r
LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8\r
LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1\r
LUFA_OPTS += -D USE_FLASH_DESCRIPTORS\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D USB_DEVICE_ONLY\r
+LUFA_OPTS = -D USB_DEVICE_ONLY\r
LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8\r
LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1\r
LUFA_OPTS += -D USE_FLASH_DESCRIPTORS\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D USB_DEVICE_ONLY\r
+LUFA_OPTS = -D USB_DEVICE_ONLY\r
LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8\r
LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1\r
LUFA_OPTS += -D USE_FLASH_DESCRIPTORS\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D NO_STREAM_CALLBACKS\r
+LUFA_OPTS = -D NO_STREAM_CALLBACKS\r
LUFA_OPTS += -D USB_DEVICE_ONLY\r
LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8\r
LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D NO_STREAM_CALLBACKS\r
+LUFA_OPTS = -D NO_STREAM_CALLBACKS\r
LUFA_OPTS += -D USB_DEVICE_ONLY\r
LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8\r
LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D NO_STREAM_CALLBACKS\r
+LUFA_OPTS = -D NO_STREAM_CALLBACKS\r
LUFA_OPTS += -D USB_DEVICE_ONLY\r
LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8\r
LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D NO_STREAM_CALLBACKS\r
+LUFA_OPTS = -D NO_STREAM_CALLBACKS\r
LUFA_OPTS += -D USB_DEVICE_ONLY\r
LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8\r
LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D NO_STREAM_CALLBACKS\r
+LUFA_OPTS = -D NO_STREAM_CALLBACKS\r
LUFA_OPTS += -D USB_DEVICE_ONLY\r
LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8\r
LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D NO_STREAM_CALLBACKS\r
+LUFA_OPTS = -D NO_STREAM_CALLBACKS\r
LUFA_OPTS += -D USB_DEVICE_ONLY\r
LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8\r
LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D NO_STREAM_CALLBACKS\r
+LUFA_OPTS = -D NO_STREAM_CALLBACKS\r
LUFA_OPTS += -D USB_DEVICE_ONLY\r
LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8\r
LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D NO_STREAM_CALLBACKS\r
+LUFA_OPTS = -D NO_STREAM_CALLBACKS\r
LUFA_OPTS += -D USB_DEVICE_ONLY\r
LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8\r
LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D NO_STREAM_CALLBACKS\r
+LUFA_OPTS = -D NO_STREAM_CALLBACKS\r
LUFA_OPTS += -D USB_DEVICE_ONLY\r
LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8\r
LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D NO_STREAM_CALLBACKS\r
+LUFA_OPTS = -D NO_STREAM_CALLBACKS\r
LUFA_OPTS += -D USB_DEVICE_ONLY\r
LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8\r
LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D USB_DEVICE_ONLY \r
+LUFA_OPTS = -D USB_DEVICE_ONLY \r
LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8\r
LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1\r
LUFA_OPTS += -D USE_FLASH_DESCRIPTORS\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D NO_STREAM_CALLBACKS\r
+LUFA_OPTS = -D NO_STREAM_CALLBACKS\r
LUFA_OPTS += -D USB_DEVICE_ONLY\r
LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8\r
LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D NO_STREAM_CALLBACKS\r
+LUFA_OPTS = -D NO_STREAM_CALLBACKS\r
LUFA_OPTS += -D USB_DEVICE_ONLY\r
LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8\r
LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D NO_STREAM_CALLBACKS\r
+LUFA_OPTS = -D NO_STREAM_CALLBACKS\r
LUFA_OPTS += -D USB_DEVICE_ONLY\r
LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8\r
LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
LUFA_OPTS += -D USB_HOST_ONLY\r
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"\r
\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D USB_HOST_ONLY\r
-LUFA_OPTS += -D NO_STREAM_CALLBACKS\r
+LUFA_OPTS = -D USB_HOST_ONLY\r
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"\r
\r
\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
LUFA_OPTS += -D USB_HOST_ONLY\r
-LUFA_OPTS += -D NO_STREAM_CALLBACKS\r
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"\r
\r
\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D USB_HOST_ONLY\r
+LUFA_OPTS = -D USB_HOST_ONLY\r
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"\r
\r
\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D USB_HOST_ONLY\r
+LUFA_OPTS = -D USB_HOST_ONLY\r
LUFA_OPTS += -D NO_STREAM_CALLBACKS\r
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"\r
\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D USB_HOST_ONLY\r
+LUFA_OPTS = -D USB_HOST_ONLY\r
LUFA_OPTS += -D NO_STREAM_CALLBACKS\r
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"\r
\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D NO_STREAM_CALLBACKS\r
+LUFA_OPTS = -D NO_STREAM_CALLBACKS\r
LUFA_OPTS += -D USB_HOST_ONLY\r
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"\r
\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D USB_HOST_ONLY\r
+LUFA_OPTS = -D USB_HOST_ONLY\r
LUFA_OPTS += -D NO_STREAM_CALLBACKS\r
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"\r
\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D USB_HOST_ONLY\r
+LUFA_OPTS = -D USB_HOST_ONLY\r
LUFA_OPTS += -D NO_STREAM_CALLBACKS\r
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"\r
\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D NO_STREAM_CALLBACKS\r
+LUFA_OPTS = -D NO_STREAM_CALLBACKS\r
LUFA_OPTS += -D USB_HOST_ONLY\r
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"\r
LUFA_OPTS += -D USB_STREAM_TIMEOUT_MS=2000\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D NO_STREAM_CALLBACKS\r
+LUFA_OPTS = -D NO_STREAM_CALLBACKS\r
LUFA_OPTS += -D USB_HOST_ONLY\r
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"\r
\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D NO_STREAM_CALLBACKS\r
+LUFA_OPTS = -D NO_STREAM_CALLBACKS\r
LUFA_OPTS += -D USB_HOST_ONLY\r
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"\r
\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D USB_HOST_ONLY\r
+LUFA_OPTS = -D USB_HOST_ONLY\r
LUFA_OPTS += -D NO_STREAM_CALLBACKS\r
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"\r
\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D NO_STREAM_CALLBACKS\r
+LUFA_OPTS = -D NO_STREAM_CALLBACKS\r
LUFA_OPTS += -D USB_HOST_ONLY\r
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"\r
\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D USE_FLASH_DESCRIPTORS\r
+LUFA_OPTS = -D USE_FLASH_DESCRIPTORS\r
\r
\r
# List C source files here. (C dependencies are automatically generated.)\r
return CDC_ENUMERROR_NoCDCInterfaceFound;\r
}\r
\r
- CDCInterfaceInfo->State.ControlInterfaceNumber =\r
-#if defined(USE_NONSTANDARD_DESCRIPTOR_NAMES)\r
- DESCRIPTOR_CAST(ConfigDescriptorData, USB_Descriptor_Interface_t).InterfaceNumber;\r
-#else\r
- DESCRIPTOR_CAST(ConfigDescriptorData, USB_Descriptor_Interface_t).bInterfaceNumber;\r
-#endif\r
+ CDCInterfaceInfo->State.ControlInterfaceNumber = DESCRIPTOR_CAST(ConfigDescriptorData, USB_Descriptor_Interface_t).InterfaceNumber;\r
\r
while (FoundEndpoints != (CDC_FOUND_NOTIFICATION_IN | CDC_FOUND_DATAPIPE_IN | CDC_FOUND_DATAPIPE_OUT))\r
{\r
uint8_t CDC_Host_SendString(USB_ClassInfo_CDC_Host_t* CDCInterfaceInfo, char* Data, uint16_t Length)\r
{\r
if ((USB_HostState != HOST_STATE_Configured) || !(CDCInterfaceInfo->State.IsActive))\r
- return;\r
+ return PIPE_READYWAIT_NoError;\r
\r
uint8_t ErrorCode;\r
\r
uint8_t CDC_Host_SendByte(USB_ClassInfo_CDC_Host_t* CDCInterfaceInfo, uint8_t Data)\r
{\r
if ((USB_HostState != HOST_STATE_Configured) || !(CDCInterfaceInfo->State.IsActive))\r
- return;\r
+ return PIPE_READYWAIT_NoError;;\r
\r
uint8_t ErrorCode;\r
\r
} while (HIDInterfaceInfo->Config.HIDInterfaceProtocol &&\r
(CurrentHIDInterface->Protocol != HIDInterfaceInfo->Config.HIDInterfaceProtocol));\r
\r
- HIDInterfaceInfo->State.InterfaceNumber =\r
- #if defined(USE_NONSTANDARD_DESCRIPTOR_NAMES)\r
- CurrentHIDInterface->InterfaceNumber;\r
- #else\r
- CurrentHIDInterface->bInterfaceNumber;\r
- #endif\r
+ HIDInterfaceInfo->State.InterfaceNumber = CurrentHIDInterface->InterfaceNumber;\r
HIDInterfaceInfo->State.SupportsBootSubClass = (CurrentHIDInterface->SubClass != 0);\r
\r
+ if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData, DComp_NextHID) != DESCRIPTOR_SEARCH_COMP_Found)\r
+ {\r
+ return HID_ENUMERROR_NoHIDDescriptorFound;\r
+ }\r
+\r
+ HIDInterfaceInfo->State.HIDReportSize = DESCRIPTOR_CAST(ConfigDescriptorData, USB_HID_Descriptor_t).HIDReportLength;\r
+\r
while (FoundEndpoints != (HID_FOUND_DATAPIPE_IN | HID_FOUND_DATAPIPE_OUT))\r
{\r
if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,\r
return DESCRIPTOR_SEARCH_NotFound;\r
}\r
\r
+static uint8_t DComp_NextHID(void* CurrentDescriptor)\r
+{\r
+ if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_HID)\r
+ return DESCRIPTOR_SEARCH_Found;\r
+ else if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)\r
+ return DESCRIPTOR_SEARCH_Fail;\r
+ else\r
+ return DESCRIPTOR_SEARCH_NotFound; \r
+}\r
+\r
static uint8_t DComp_HID_Host_NextHIDInterfaceEndpoint(void* CurrentDescriptor)\r
{\r
if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Endpoint)\r
\r
Pipe_SelectPipe(PIPE_CONTROLPIPE);\r
\r
+ if (UseReportProtocol && !(HIDInterfaceInfo->State.SupportsBootSubClass))\r
+ return MS_ERROR_UNSUPPORTED;\r
+ \r
return USB_Host_SendControlRequest(NULL);\r
}\r
\r
#endif\r
\r
/* Public Interface - May be used in end-application: */\r
+ /* Macros: */\r
+ /** Error code for some HID Host functions, indicating a logical (and not hardware) error */\r
+ #define MS_ERROR_UNSUPPORTED 0xC0\r
+ \r
/* Type Defines: */\r
/** Class state structure. An instance of this structure should be made within the user application,\r
* and passed to each of the HID class driver functions as the HIDInterfaceInfo parameter. This\r
* boot subclass protocol is required (e.g. keyboard, mouse), or\r
* leave as 0 to match against the first HID interface found\r
*/\r
+ HID_ReportInfo_t* HIDParserData; /**< HID parser data to store the parsed HID report data, when boot protocol\r
+ * is not used */\r
} Config; /**< Config data for the USB class interface within the device. All elements in this section\r
* <b>must</b> be set or the interface will fail to enumerate and operate correctly.\r
*/\r
bool SupportsBootSubClass; /**< Indicates if the current interface instance supports the HID Boot\r
* Protocol when enabled via \ref USB_HID_Host_SetProtocol()\r
*/\r
+ uint16_t HIDReportSize; /**< Size in bytes of the HID report descriptor in the device */\r
} State; /**< State data for the USB class interface within the device. All elements in this section\r
* <b>may</b> be set to initial values, but may also be ignored to default to sane values when\r
* the interface is enumerated.\r
HID_ENUMERROR_NoError = 0, /**< Configuration Descriptor was processed successfully */\r
HID_ENUMERROR_InvalidConfigDescriptor = 1, /**< The device returned an invalid Configuration Descriptor */\r
HID_ENUMERROR_NoHIDInterfaceFound = 2, /**< A compatible HID interface was not found in the device's Configuration Descriptor */\r
- HID_ENUMERROR_EndpointsNotFound = 3, /**< Compatible HID endpoints were not found in the device's HID interface */\r
+ HID_ENUMERROR_NoHIDDescriptorFound = 3, /**< The HID descriptor was not found in the device's HID interface */\r
+ HID_ENUMERROR_EndpointsNotFound = 4, /**< Compatible HID endpoints were not found in the device's HID interface */\r
};\r
\r
/* Function Prototypes: */\r
uint8_t* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1, 3);\r
\r
bool HID_Host_IsReportReceived(USB_ClassInfo_HID_Host_t* HIDInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);\r
+ \r
uint8_t USB_HID_Host_SetProtocol(USB_ClassInfo_HID_Host_t* HIDInterfaceInfo, bool UseReportProtocol) ATTR_NON_NULL_PTR_ARG(1);\r
\r
/* Private Interface - For use in library only: */\r
/* Function Prototypes: */\r
#if defined(INCLUDE_FROM_HID_CLASS_HOST_C)\r
static uint8_t DComp_HID_Host_NextHIDInterface(void* CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);\r
+ static uint8_t DComp_NextHID(void* CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);\r
static uint8_t DComp_HID_Host_NextHIDInterfaceEndpoint(void* CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);\r
#endif \r
#endif \r
return MS_ENUMERROR_NoMSInterfaceFound;\r
}\r
\r
- MSInterfaceInfo->State.InterfaceNumber =\r
- #if defined(USE_NONSTANDARD_DESCRIPTOR_NAMES)\r
- DESCRIPTOR_PCAST(DeviceConfigDescriptor, USB_Descriptor_Interface_t)->InterfaceNumber;\r
- #else\r
- DESCRIPTOR_PCAST(DeviceConfigDescriptor, USB_Descriptor_Interface_t)->bInterfaceNumber;\r
- #endif\r
+ MSInterfaceInfo->State.InterfaceNumber = DESCRIPTOR_PCAST(DeviceConfigDescriptor, USB_Descriptor_Interface_t)->InterfaceNumber;\r
\r
while (FoundEndpoints != (MS_FOUND_DATAPIPE_IN | MS_FOUND_DATAPIPE_OUT))\r
{\r
Pipe_SelectPipe(MSInterfaceInfo->Config.DataOUTPipeNumber);\r
Pipe_Unfreeze();\r
\r
- if ((ErrorCode = Pipe_Write_Stream_LE(SCSICommandBlock, sizeof(MS_CommandBlockWrapper_t))) != PIPE_RWSTREAM_NoError)\r
+ if ((ErrorCode = Pipe_Write_Stream_LE(SCSICommandBlock, sizeof(MS_CommandBlockWrapper_t),\r
+ NO_STREAM_CALLBACK)) != PIPE_RWSTREAM_NoError)\r
return ErrorCode;\r
\r
Pipe_ClearOUT();\r
Pipe_SelectPipe(MSInterfaceInfo->Config.DataINPipeNumber);\r
Pipe_Unfreeze();\r
\r
- if ((ErrorCode = Pipe_Read_Stream_LE(BufferPtr, BytesRem)) != PIPE_RWSTREAM_NoError)\r
+ if ((ErrorCode = Pipe_Read_Stream_LE(BufferPtr, BytesRem, NO_STREAM_CALLBACK)) != PIPE_RWSTREAM_NoError)\r
return ErrorCode;\r
\r
Pipe_ClearIN();\r
Pipe_SelectPipe(MSInterfaceInfo->Config.DataOUTPipeNumber);\r
Pipe_Unfreeze();\r
\r
- if ((ErrorCode = Pipe_Write_Stream_LE(BufferPtr, BytesRem)) != PIPE_RWSTREAM_NoError)\r
+ if ((ErrorCode = Pipe_Write_Stream_LE(BufferPtr, BytesRem, NO_STREAM_CALLBACK)) != PIPE_RWSTREAM_NoError)\r
return ErrorCode;\r
\r
Pipe_ClearOUT();\r
Pipe_SelectPipe(MSInterfaceInfo->Config.DataINPipeNumber);\r
Pipe_Unfreeze();\r
\r
- if ((ErrorCode = Pipe_Read_Stream_LE(SCSICommandStatus, sizeof(MS_CommandStatusWrapper_t))) != PIPE_RWSTREAM_NoError)\r
+ if ((ErrorCode = Pipe_Read_Stream_LE(SCSICommandStatus, sizeof(MS_CommandStatusWrapper_t),\r
+ NO_STREAM_CALLBACK)) != PIPE_RWSTREAM_NoError)\r
return ErrorCode;\r
\r
Pipe_ClearIN();\r
\r
/* Public Interface - May be used in end-application: */\r
/* Macros: */\r
+ /** Error code for some Mass Storage Host functions, indicating a logical (and not hardware) error */\r
#define MS_ERROR_LOGICAL_CMD_FAILED 0xC0\r
\r
/* Type Defines: */\r
\r
/* Public Interface - May be used in end-application: */\r
/* Macros: */\r
+ /** Error code for some Still Image Host functions, indicating a logical (and not hardware) error */\r
#define SI_ERROR_LOGICAL_CMD_FAILED 0xC0\r
\r
/* Type Defines: */\r
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum, or \ref SI_ERROR_LOGICAL_CMD_FAILED if the device\r
* returned a logical command failure\r
*/\r
- uint8_t SImage_Host_OpenSession(USB_ClassInfo_SI_Host_t* SIInterfaceInfo);\r
+ uint8_t SImage_Host_OpenSession(USB_ClassInfo_SI_Host_t* SIInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);\r
\r
/** Closes an already opened PIMA session with the attached device. This should be used after all session-orientated\r
* PIMA commands have been issued to the device.\r
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum, or \ref SI_ERROR_LOGICAL_CMD_FAILED if the device\r
* returned a logical command failure\r
*/\r
- uint8_t SImage_Host_CloseSession(USB_ClassInfo_SI_Host_t* SIInterfaceInfo);\r
+ uint8_t SImage_Host_CloseSession(USB_ClassInfo_SI_Host_t* SIInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);\r
\r
/** Sends a given PIMA command to the attached device, filling out the PIMA command header automatically as required.\r
* \r
* returned a logical command failure\r
*/\r
uint8_t SImage_Host_SendCommand(USB_ClassInfo_SI_Host_t* SIInterfaceInfo, uint16_t Operation, uint8_t TotalParams,\r
- uint32_t* Params);\r
+ uint32_t* Params) ATTR_NON_NULL_PTR_ARG(1);\r
\r
/** Receives and checks a response block from the attached PIMA device, once a command has been issued and all data\r
* associated with the command has been transferred.\r
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum, or \ref SI_ERROR_LOGICAL_CMD_FAILED if the device\r
* returned a logical command failure\r
*/\r
- uint8_t SImage_Host_ReceiveResponse(USB_ClassInfo_SI_Host_t* SIInterfaceInfo);\r
+ uint8_t SImage_Host_ReceiveResponse(USB_ClassInfo_SI_Host_t* SIInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);\r
\r
/** Indicates if the device has issued a PIMA event block to the host via the asynchronous events pipe.\r
*\r
*\r
* \return Boolean true if an event is waiting to be read, false otherwise\r
*/\r
- bool SImage_Host_IsEventReceived(USB_ClassInfo_SI_Host_t* SIInterfaceInfo);\r
+ bool SImage_Host_IsEventReceived(USB_ClassInfo_SI_Host_t* SIInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);\r
\r
/** Receives an asynchronous event block from the device via the asynchronous events pipe.\r
*\r
* returned a logical command failure\r
*/\r
uint8_t SImage_Host_ReceiveEventHeader(USB_ClassInfo_SI_Host_t* SIInterfaceInfo,\r
- SI_PIMA_Container_t* PIMAHeader);\r
+ SI_PIMA_Container_t* PIMAHeader) ATTR_NON_NULL_PTR_ARG(1, 2);\r
\r
/** Sends arbitrary data to the attached device, for use in the data phase of PIMA commands which require data\r
* transfer beyond the regular PIMA command block parameters.\r
*\r
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum\r
*/\r
- uint8_t SImage_Host_SendData(USB_ClassInfo_SI_Host_t* SIInterfaceInfo, void* Buffer, uint16_t Bytes);\r
+ uint8_t SImage_Host_SendData(USB_ClassInfo_SI_Host_t* SIInterfaceInfo, void* Buffer, uint16_t Bytes) ATTR_NON_NULL_PTR_ARG(1, 2);\r
\r
/** Receives arbitrary data from the attached device, for use in the data phase of PIMA commands which require data\r
* transfer beyond the regular PIMA command block parameters.\r
*\r
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum\r
*/\r
- uint8_t SImage_Host_ReadData(USB_ClassInfo_SI_Host_t* SIInterfaceInfo, void* Buffer, uint16_t Bytes);\r
+ uint8_t SImage_Host_ReadData(USB_ClassInfo_SI_Host_t* SIInterfaceInfo, void* Buffer, uint16_t Bytes) ATTR_NON_NULL_PTR_ARG(1, 2);\r
\r
/* Private Interface - For use in library only: */\r
#if !defined(__DOXYGEN__)\r
if ((ErrorCode = USB_Host_SendControlRequest(ConfigHeader)) != HOST_SENDCONTROL_Successful)\r
return ErrorCode;\r
\r
- #if defined(USE_NONSTANDARD_DESCRIPTOR_NAMES)\r
*ConfigSizePtr = DESCRIPTOR_CAST(ConfigHeader, USB_Descriptor_Configuration_Header_t).TotalConfigurationSize;\r
- #else\r
- *ConfigSizePtr = DESCRIPTOR_CAST(ConfigHeader, USB_Descriptor_Configuration_Header_t).wTotalLength; \r
- #endif\r
\r
if (*ConfigSizePtr > BufferSize)\r
return HOST_GETCONFIG_BuffOverflow;\r
* This value's meaning depends on the descriptor's placement in the descriptor, but standard type\r
* values can be accessed in the \ref USB_DescriptorTypes_t enum.\r
*/\r
- #if defined(USE_NONSTANDARD_DESCRIPTOR_NAMES) || defined(__DOXYGEN__)\r
- #define DESCRIPTOR_TYPE(DescriptorPtr) DESCRIPTOR_CAST(DescriptorPtr, USB_Descriptor_Header_t).Type\r
- #else\r
- #define DESCRIPTOR_TYPE(DescriptorPtr) DESCRIPTOR_CAST(DescriptorPtr, USB_Descriptor_Header_t).bDescriptorType \r
- #endif\r
+ #define DESCRIPTOR_TYPE(DescriptorPtr) DESCRIPTOR_CAST(DescriptorPtr, USB_Descriptor_Header_t).Type\r
\r
/** Returns the descriptor's size, expressed as the 8-bit value indicating the number of bytes. */\r
- #if defined(USE_NONSTANDARD_DESCRIPTOR_NAMES) || defined(__DOXYGEN__)\r
- #define DESCRIPTOR_SIZE(DescriptorPtr) DESCRIPTOR_CAST(DescriptorPtr, USB_Descriptor_Header_t).Size\r
- #else\r
- #define DESCRIPTOR_SIZE(DescriptorPtr) DESCRIPTOR_CAST(DescriptorPtr, USB_Descriptor_Header_t).bLength\r
- #endif\r
+ #define DESCRIPTOR_SIZE(DescriptorPtr) DESCRIPTOR_CAST(DescriptorPtr, USB_Descriptor_Header_t).Size\r
\r
/* Type Defines: */\r
/** Type define for a Configuration Descriptor comparator function (function taking a pointer to an array\r
static inline void USB_GetNextDescriptor(uint16_t* const BytesRem,\r
uint8_t** const CurrConfigLoc)\r
{\r
- #if defined(USE_NONSTANDARD_DESCRIPTOR_NAMES)\r
uint16_t CurrDescriptorSize = DESCRIPTOR_CAST(*CurrConfigLoc, USB_Descriptor_Header_t).Size;\r
- #else\r
- uint16_t CurrDescriptorSize = DESCRIPTOR_CAST(*CurrConfigLoc, USB_Descriptor_Header_t).bLength; \r
- #endif\r
\r
*CurrConfigLoc += CurrDescriptorSize;\r
*BytesRem -= CurrDescriptorSize;\r
* Standard USB device descriptor defines and retrieval routines, for USB devices. This module contains\r
* structures and macros for the easy creation of standard USB descriptors in USB device projects.\r
*\r
- * All standard descriptors have their elements named in an identical manner to the official USB specification,\r
- * however slightly more verbose alternate (non-standard) names are also supplied if the macro\r
- * USE_NONSTANDARD_DESCRIPTOR_NAMES is defined in the user project makefile and passed to the compiler at\r
- * compilation time using the -D option.\r
- *\r
- * The non-standard names are documented here - if USE_NONSTANDARD_DESCRIPTOR_NAMES is not defined, then all\r
- * descriptors will contain elements named identically to the official USB specification. The alternately\r
- * named descriptor elements are placed in the same order inside the descriptor structures as their officially\r
- * named counterparts, thus they can be correlated easily with the official USB specification.\r
- *\r
* @{\r
*/\r
\r
};\r
\r
/* Type Defines: */\r
- /** Type define for all descriptor's header, indicating the descriptor's length and type.\r
+ /** Type define for all descriptors standard header, indicating the descriptor's length and type. This structure\r
+ * uses LUFA-specific element names to make each element's purpose clearer.\r
*\r
- * \note The non-standard structure element names are documented here. If the\r
- * USE_NONSTANDARD_DESCRIPTOR_NAMES token is not set, this structure contains elements \r
- * with names identical to those listed in the USB standard.\r
+ * \see \ref USB_StdDescriptor_Header_t for the version of this define with standard element names\r
*/\r
typedef struct\r
{\r
- #if defined(USE_NONSTANDARD_DESCRIPTOR_NAMES) || defined(__DOXYGEN__)\r
- uint8_t Size; /**< Size of the descriptor, in bytes. */\r
- uint8_t Type; /**< Type of the descriptor, either a value in \ref USB_DescriptorTypes_t or a value\r
- * given by the specific class.\r
- */\r
- #else\r
- uint8_t bLength;\r
- uint8_t bDescriptorType;\r
- #endif\r
+ uint8_t Size; /**< Size of the descriptor, in bytes. */\r
+ uint8_t Type; /**< Type of the descriptor, either a value in \ref USB_DescriptorTypes_t or a value\r
+ * given by the specific class.\r
+ */\r
} USB_Descriptor_Header_t;\r
\r
- /** Type define for a standard device descriptor.\r
+ /** Type define for all descriptors standard header, indicating the descriptor's length and type. This structure\r
+ * uses the relevant standard's given element names to ensure compatibility with the standard.\r
+ *\r
+ * \see \ref USB_Descriptor_Header_t for the version of this define with non-standard LUFA specific element names\r
+ */\r
+ typedef struct\r
+ {\r
+ uint8_t bLength; /**< Size of the descriptor, in bytes. */\r
+ uint8_t bDescriptorType; /**< Type of the descriptor, either a value in \ref USB_DescriptorTypes_t or a value\r
+ * given by the specific class.\r
+ */\r
+ } USB_StdDescriptor_Header_t;\r
+ \r
+ /** Type define for a standard Device Descriptor. This structure uses LUFA-specific element names to make each\r
+ * element's purpose clearer.\r
*\r
- * \note The non-standard structure element names are documented here. If the\r
- * USE_NONSTANDARD_DESCRIPTOR_NAMES token is not set, this structure contains elements \r
- * with names identical to those listed in the USB standard.\r
+ * \see \ref USB_StdDescriptor_Device_t for the version of this define with standard element names\r
*/\r
typedef struct\r
{\r
- #if defined(USE_NONSTANDARD_DESCRIPTOR_NAMES) || defined(__DOXYGEN__)\r
USB_Descriptor_Header_t Header; /**< Descriptor header, including type and size. */\r
\r
- uint16_t USBSpecification; /**< BCD of the supported USB specification. */\r
- uint8_t Class; /**< USB device class. */\r
- uint8_t SubClass; /**< USB device subclass. */\r
- uint8_t Protocol; /**< USB device protocol. */\r
+ uint16_t USBSpecification; /**< BCD of the supported USB specification. */\r
+ uint8_t Class; /**< USB device class. */\r
+ uint8_t SubClass; /**< USB device subclass. */\r
+ uint8_t Protocol; /**< USB device protocol. */\r
\r
- uint8_t Endpoint0Size; /**< Size of the control (address 0) endpoint's bank in bytes. */\r
+ uint8_t Endpoint0Size; /**< Size of the control (address 0) endpoint's bank in bytes. */\r
\r
- uint16_t VendorID; /**< Vendor ID for the USB product. */\r
- uint16_t ProductID; /**< Unique product ID for the USB product. */\r
- uint16_t ReleaseNumber; /**< Product release (version) number. */\r
+ uint16_t VendorID; /**< Vendor ID for the USB product. */\r
+ uint16_t ProductID; /**< Unique product ID for the USB product. */\r
+ uint16_t ReleaseNumber; /**< Product release (version) number. */\r
\r
- uint8_t ManufacturerStrIndex; /**< String index for the manufacturer's name. The\r
- * host will request this string via a separate\r
- * control request for the string descriptor.\r
- *\r
- * \note If no string supplied, use \ref NO_DESCRIPTOR.\r
- */\r
- uint8_t ProductStrIndex; /**< String index for the product name/details.\r
- *\r
- * \see ManufacturerStrIndex structure entry.\r
- */\r
- uint8_t SerialNumStrIndex; /**< String index for the product's globally unique hexadecimal\r
- * serial number, in uppercase Unicode ASCII.\r
- *\r
- * \note On some AVR models, there is an embedded serial number\r
- * in the chip which can be used for the device serial number.\r
- * To use this serial number, set this to USE_INTERNAL_SERIAL.\r
- * On unsupported devices, this will evaluate to 0 and will cause\r
- * the host to generate a pseudo-unique value for the device upon\r
- * insertion.\r
- *\r
- * \see ManufacturerStrIndex structure entry.\r
- */\r
-\r
- uint8_t NumberOfConfigurations; /**< Total number of configurations supported by\r
- * the device.\r
- */\r
- #else\r
- uint8_t bLength;\r
- uint8_t bDescriptorType;\r
- uint16_t bcdUSB;\r
- uint8_t bDeviceClass;\r
- uint8_t bDeviceSubClass;\r
- uint8_t bDeviceProtocol;\r
- uint8_t bMaxPacketSize0;\r
- uint16_t idVendor;\r
- uint16_t idProduct;\r
- uint16_t bcdDevice;\r
- uint8_t iManufacturer;\r
- uint8_t iProduct;\r
- uint8_t iSerialNumber;\r
- uint8_t bNumConfigurations;\r
- #endif\r
+ uint8_t ManufacturerStrIndex; /**< String index for the manufacturer's name. The\r
+ * host will request this string via a separate\r
+ * control request for the string descriptor.\r
+ *\r
+ * \note If no string supplied, use \ref NO_DESCRIPTOR.\r
+ */\r
+ uint8_t ProductStrIndex; /**< String index for the product name/details.\r
+ *\r
+ * \see ManufacturerStrIndex structure entry.\r
+ */\r
+ uint8_t SerialNumStrIndex; /**< String index for the product's globally unique hexadecimal\r
+ * serial number, in uppercase Unicode ASCII.\r
+ *\r
+ * \note On some AVR models, there is an embedded serial number\r
+ * in the chip which can be used for the device serial number.\r
+ * To use this serial number, set this to USE_INTERNAL_SERIAL.\r
+ * On unsupported devices, this will evaluate to 0 and will cause\r
+ * the host to generate a pseudo-unique value for the device upon\r
+ * insertion.\r
+ *\r
+ * \see ManufacturerStrIndex structure entry.\r
+ */\r
+ uint8_t NumberOfConfigurations; /**< Total number of configurations supported by\r
+ * the device.\r
+ */\r
} USB_Descriptor_Device_t;\r
\r
- /** Type define for a standard configuration descriptor.\r
+ /** Type define for a standard Device Descriptor. This structure uses the relevant standard's given element names\r
+ * to ensure compatibility with the standard.\r
*\r
- * \note The non-standard structure element names are documented here. If the\r
- * USE_NONSTANDARD_DESCRIPTOR_NAMES token is not set, this structure contains elements \r
- * with names identical to those listed in the USB standard.\r
+ * \see \ref USB_Descriptor_Device_t for the version of this define with non-standard LUFA specific element names\r
+ */\r
+ typedef struct\r
+ {\r
+ uint8_t bLength; /**< Size of the descriptor, in bytes. */\r
+ uint8_t bDescriptorType; /**< Type of the descriptor, either a value in \ref USB_DescriptorTypes_t or a value\r
+ * given by the specific class.\r
+ */\r
+ uint16_t bcdUSB; /**< BCD of the supported USB specification. */\r
+ uint8_t bDeviceClass; /**< USB device class. */\r
+ uint8_t bDeviceSubClass; /**< USB device subclass. */\r
+ uint8_t bDeviceProtocol; /**< USB device protocol. */\r
+ uint8_t bMaxPacketSize0; /**< Size of the control (address 0) endpoint's bank in bytes. */\r
+ uint16_t idVendor; /**< Vendor ID for the USB product. */\r
+ uint16_t idProduct; /**< Unique product ID for the USB product. */\r
+ uint16_t bcdDevice; /**< Product release (version) number. */\r
+ uint8_t iManufacturer; /**< String index for the manufacturer's name. The\r
+ * host will request this string via a separate\r
+ * control request for the string descriptor.\r
+ *\r
+ * \note If no string supplied, use \ref NO_DESCRIPTOR.\r
+ */\r
+ uint8_t iProduct; /**< String index for the product name/details.\r
+ *\r
+ * \see ManufacturerStrIndex structure entry.\r
+ */\r
+ uint8_t iSerialNumber; /**< String index for the product's globally unique hexadecimal\r
+ * serial number, in uppercase Unicode ASCII.\r
+ *\r
+ * \note On some AVR models, there is an embedded serial number\r
+ * in the chip which can be used for the device serial number.\r
+ * To use this serial number, set this to USE_INTERNAL_SERIAL.\r
+ * On unsupported devices, this will evaluate to 0 and will cause\r
+ * the host to generate a pseudo-unique value for the device upon\r
+ * insertion.\r
+ *\r
+ * \see ManufacturerStrIndex structure entry.\r
+ */\r
+ uint8_t bNumConfigurations; /**< Total number of configurations supported by\r
+ * the device.\r
+ */\r
+ } USB_StdDescriptor_Device_t;\r
+\r
+ /** Type define for a standard Configuration Descriptor header. This structure uses LUFA-specific element names\r
+ * to make each element's purpose clearer.\r
+ *\r
+ * \see \ref USB_StdDescriptor_Configuration_Header_t for the version of this define with standard element names\r
*/\r
typedef struct\r
{\r
- #if defined(USE_NONSTANDARD_DESCRIPTOR_NAMES) || defined(__DOXYGEN__)\r
USB_Descriptor_Header_t Header; /**< Descriptor header, including type and size. */\r
\r
- uint16_t TotalConfigurationSize; /**< Size of the configuration descriptor header,\r
- * and all sub descriptors inside the configuration.\r
- */\r
- uint8_t TotalInterfaces; /**< Total number of interfaces in the configuration. */\r
+ uint16_t TotalConfigurationSize; /**< Size of the configuration descriptor header,\r
+ * and all sub descriptors inside the configuration.\r
+ */\r
+ uint8_t TotalInterfaces; /**< Total number of interfaces in the configuration. */\r
\r
- uint8_t ConfigurationNumber; /**< Configuration index of the current configuration. */\r
- uint8_t ConfigurationStrIndex; /**< Index of a string descriptor describing the configuration. */\r
+ uint8_t ConfigurationNumber; /**< Configuration index of the current configuration. */\r
+ uint8_t ConfigurationStrIndex; /**< Index of a string descriptor describing the configuration. */\r
\r
- uint8_t ConfigAttributes; /**< Configuration attributes, comprised of a mask of zero or\r
- * more USB_CONFIG_ATTR_* masks.\r
- */\r
+ uint8_t ConfigAttributes; /**< Configuration attributes, comprised of a mask of zero or\r
+ * more USB_CONFIG_ATTR_* masks.\r
+ */\r
\r
- uint8_t MaxPowerConsumption; /**< Maximum power consumption of the device while in the\r
- * current configuration, calculated by the \ref USB_CONFIG_POWER_MA()\r
- * macro.\r
- */\r
- #else\r
- uint8_t bLength;\r
- uint8_t bDescriptorType;\r
- uint16_t wTotalLength;\r
- uint8_t bNumInterfaces;\r
- uint8_t bConfigurationValue;\r
- uint8_t iConfiguration;\r
- uint8_t bmAttributes;\r
- uint8_t bMaxPower;\r
- #endif\r
+ uint8_t MaxPowerConsumption; /**< Maximum power consumption of the device while in the\r
+ * current configuration, calculated by the \ref USB_CONFIG_POWER_MA()\r
+ * macro.\r
+ */\r
} USB_Descriptor_Configuration_Header_t;\r
-\r
- /** Type define for a standard interface descriptor.\r
+ \r
+ /** Type define for a standard Configuration Descriptor header. This structure uses the relevant standard's given element names\r
+ * to ensure compatibility with the standard.\r
*\r
- * \note The non-standard structure element names are documented here. If the\r
- * USE_NONSTANDARD_DESCRIPTOR_NAMES token is not set, this structure contains elements \r
- * with names identical to those listed in the USB standard.\r
+ * \see \ref USB_Descriptor_Device_t for the version of this define with non-standard LUFA specific element names\r
+ */\r
+ typedef struct\r
+ {\r
+ uint8_t bLength; /**< Size of the descriptor, in bytes. */\r
+ uint8_t bDescriptorType; /**< Type of the descriptor, either a value in \ref USB_DescriptorTypes_t or a value\r
+ * given by the specific class.\r
+ */\r
+ uint16_t wTotalLength; /**< Size of the configuration descriptor header,\r
+ * and all sub descriptors inside the configuration.\r
+ */\r
+ uint8_t bNumInterfaces; /**< Total number of interfaces in the configuration. */\r
+ uint8_t bConfigurationValue; /**< Configuration index of the current configuration. */\r
+ uint8_t iConfiguration; /**< Index of a string descriptor describing the configuration. */\r
+ uint8_t bmAttributes; /**< Configuration attributes, comprised of a mask of zero or\r
+ * more USB_CONFIG_ATTR_* masks.\r
+ */\r
+ uint8_t bMaxPower; /**< Maximum power consumption of the device while in the\r
+ * current configuration, calculated by the \ref USB_CONFIG_POWER_MA()\r
+ * macro.\r
+ */\r
+ } USB_StdDescriptor_Configuration_Header_t;\r
+\r
+ /** Type define for a standard Interface Descriptor. This structure uses LUFA-specific element names\r
+ * to make each element's purpose clearer.\r
+ *\r
+ * \see \ref USB_StdDescriptor_Interface_t for the version of this define with standard element names\r
*/\r
typedef struct\r
{\r
- #if defined(USE_NONSTANDARD_DESCRIPTOR_NAMES) || defined(__DOXYGEN__)\r
USB_Descriptor_Header_t Header; /**< Descriptor header, including type and size. */\r
\r
- uint8_t InterfaceNumber; /**< Index of the interface in the current configuration. */\r
- uint8_t AlternateSetting; /**< Alternate setting for the interface number. The same\r
- * interface number can have multiple alternate settings\r
- * with different endpoint configurations, which can be\r
- * selected by the host.\r
- */\r
- uint8_t TotalEndpoints; /**< Total number of endpoints in the interface. */\r
+ uint8_t InterfaceNumber; /**< Index of the interface in the current configuration. */\r
+ uint8_t AlternateSetting; /**< Alternate setting for the interface number. The same\r
+ * interface number can have multiple alternate settings\r
+ * with different endpoint configurations, which can be\r
+ * selected by the host.\r
+ */\r
+ uint8_t TotalEndpoints; /**< Total number of endpoints in the interface. */\r
\r
- uint8_t Class; /**< Interface class ID. */\r
- uint8_t SubClass; /**< Interface subclass ID. */\r
- uint8_t Protocol; /**< Interface protocol ID. */\r
-\r
- uint8_t InterfaceStrIndex; /**< Index of the string descriptor describing the\r
- * interface.\r
- */\r
- #else\r
- uint8_t bLength;\r
- uint8_t bDescriptorType;\r
- uint8_t bInterfaceNumber;\r
- uint8_t bAlternateSetting;\r
- uint8_t bNumEndpoints;\r
- uint8_t bInterfaceClass;\r
- uint8_t bInterfaceSubClass;\r
- uint8_t bInterfaceProtocol;\r
- uint8_t iInterface;\r
- #endif\r
- } USB_Descriptor_Interface_t;\r
+ uint8_t Class; /**< Interface class ID. */\r
+ uint8_t SubClass; /**< Interface subclass ID. */\r
+ uint8_t Protocol; /**< Interface protocol ID. */\r
\r
- /** Type define for a standard Interface Association descriptor.\r
+ uint8_t InterfaceStrIndex; /**< Index of the string descriptor describing the\r
+ * interface.\r
+ */\r
+ } USB_Descriptor_Interface_t;\r
+ \r
+ /** Type define for a standard Interface Descriptor. This structure uses the relevant standard's given element names\r
+ * to ensure compatibility with the standard.\r
+ *\r
+ * \see \ref USB_Descriptor_Interface_t for the version of this define with non-standard LUFA specific element names\r
+ */\r
+ typedef struct\r
+ {\r
+ uint8_t bLength; /**< Size of the descriptor, in bytes. */\r
+ uint8_t bDescriptorType; /**< Type of the descriptor, either a value in \ref USB_DescriptorTypes_t or a value\r
+ * given by the specific class.\r
+ */\r
+ uint8_t bInterfaceNumber; /**< Index of the interface in the current configuration. */\r
+ uint8_t bAlternateSetting; /**< Alternate setting for the interface number. The same\r
+ * interface number can have multiple alternate settings\r
+ * with different endpoint configurations, which can be\r
+ * selected by the host.\r
+ */\r
+ uint8_t bNumEndpoints; /**< Total number of endpoints in the interface. */\r
+ uint8_t bInterfaceClass; /**< Interface class ID. */\r
+ uint8_t bInterfaceSubClass; /**< Interface subclass ID. */\r
+ uint8_t bInterfaceProtocol; /**< Interface protocol ID. */\r
+ uint8_t iInterface; /**< Index of the string descriptor describing the\r
+ * interface.\r
+ */\r
+ } USB_StdDescriptor_Interface_t;\r
+\r
+ /** Type define for a standard Interface Association Descriptor. This structure uses LUFA-specific element names\r
+ * to make each element's purpose clearer.\r
*\r
* This descriptor has been added as a supplement to the USB2.0 standard, in the ECN located at\r
* <a>http://www.usb.org/developers/docs/InterfaceAssociationDescriptor_ecn.pdf</a>. It allows compound\r
* together at the point of enumeration, loading one generic driver for all the interfaces in the single\r
* function. Read the ECN for more information.\r
*\r
- * \note The non-standard structure element names are documented here. If the\r
- * USE_NONSTANDARD_DESCRIPTOR_NAMES token is not set, this structure contains elements \r
- * with names identical to those listed in the USB standard.\r
+ * \see \ref USB_StdDescriptor_Interface_Association_t for the version of this define with standard element names\r
*/\r
typedef struct\r
{\r
- #if defined(USE_NONSTANDARD_DESCRIPTOR_NAMES) || defined(__DOXYGEN__)\r
USB_Descriptor_Header_t Header; /**< Descriptor header, including type and size. */\r
\r
- uint8_t FirstInterfaceIndex; /**< Index of the first associated interface. */\r
- uint8_t TotalInterfaces; /** Total number of associated interfaces. */\r
-\r
- uint8_t Class; /**< Interface class ID. */\r
- uint8_t SubClass; /**< Interface subclass ID. */\r
- uint8_t Protocol; /**< Interface protocol ID. */\r
-\r
- uint8_t IADStrIndex; /**< Index of the string descriptor describing the\r
- * interface association.\r
- */\r
- #else\r
- uint8_t bLength;\r
- uint8_t bDescriptorType;\r
- uint8_t bFirstInterface;\r
- uint8_t bInterfaceCount;\r
- uint8_t bFunctionClass;\r
- uint8_t bFunctionSubClass;\r
- uint8_t bFunctionProtocol;\r
- uint8_t iFunction;\r
- #endif\r
- } USB_Descriptor_Interface_Association_t;\r
+ uint8_t FirstInterfaceIndex; /**< Index of the first associated interface. */\r
+ uint8_t TotalInterfaces; /** Total number of associated interfaces. */\r
\r
- /** Type define for a standard endpoint descriptor.\r
+ uint8_t Class; /**< Interface class ID. */\r
+ uint8_t SubClass; /**< Interface subclass ID. */\r
+ uint8_t Protocol; /**< Interface protocol ID. */\r
+\r
+ uint8_t IADStrIndex; /**< Index of the string descriptor describing the\r
+ * interface association.\r
+ */\r
+ } USB_Descriptor_Interface_Association_t;\r
+ \r
+ /** Type define for a standard Interface Association Descriptor. This structure uses the relevant standard's given\r
+ * element names to ensure compatibility with the standard.\r
*\r
- * \note The non-standard structure element names are documented here. If the\r
- * USE_NONSTANDARD_DESCRIPTOR_NAMES token is not set, this structure contains elements \r
- * with names identical to those listed in the USB standard.\r
- */\r
+ * This descriptor has been added as a supplement to the USB2.0 standard, in the ECN located at\r
+ * <a>http://www.usb.org/developers/docs/InterfaceAssociationDescriptor_ecn.pdf</a>. It allows compound\r
+ * devices with multiple interfaces related to the same function to have the multiple interfaces bound\r
+ * together at the point of enumeration, loading one generic driver for all the interfaces in the single\r
+ * function. Read the ECN for more information.\r
+ *\r
+ * \see \ref USB_Descriptor_Interface_Association_t for the version of this define with non-standard LUFA specific\r
+ * element names\r
+ */\r
+ typedef struct\r
+ {\r
+ uint8_t bLength; /**< Size of the descriptor, in bytes. */\r
+ uint8_t bDescriptorType; /**< Type of the descriptor, either a value in \ref USB_DescriptorTypes_t or a value\r
+ * given by the specific class.\r
+ */\r
+ uint8_t bFirstInterface; /**< Index of the first associated interface. */\r
+ uint8_t bInterfaceCount; /** Total number of associated interfaces. */\r
+ uint8_t bFunctionClass; /**< Interface class ID. */\r
+ uint8_t bFunctionSubClass; /**< Interface subclass ID. */\r
+ uint8_t bFunctionProtocol; /**< Interface protocol ID. */\r
+ uint8_t iFunction; /**< Index of the string descriptor describing the\r
+ * interface association.\r
+ */\r
+ } USB_StdDescriptor_Interface_Association_t;\r
+\r
+ /** Type define for a standard Endpoint Descriptor. This structure uses LUFA-specific element names\r
+ * to make each element's purpose clearer.\r
+ *\r
+ * \see \ref USB_StdDescriptor_Endpoint_t for the version of this define with standard element names\r
+ */\r
typedef struct\r
{\r
- #if defined(USE_NONSTANDARD_DESCRIPTOR_NAMES) || defined(__DOXYGEN__)\r
USB_Descriptor_Header_t Header; /**< Descriptor header, including type and size. */\r
\r
- uint8_t EndpointAddress; /**< Logical address of the endpoint within the device\r
- * for the current configuration, including direction\r
- * mask.\r
- */\r
- uint8_t Attributes; /**< Endpoint attributes, comprised of a mask of the\r
- * endpoint type (EP_TYPE_*) and attributes (ENDPOINT_ATTR_*)\r
- * masks.\r
- */\r
- uint16_t EndpointSize; /**< Size of the endpoint bank, in bytes. This indicates the\r
- * maximum packet size that the endpoint can receive at a time.\r
- */\r
+ uint8_t EndpointAddress; /**< Logical address of the endpoint within the device\r
+ * for the current configuration, including direction\r
+ * mask.\r
+ */\r
+ uint8_t Attributes; /**< Endpoint attributes, comprised of a mask of the\r
+ * endpoint type (EP_TYPE_*) and attributes (ENDPOINT_ATTR_*)\r
+ * masks.\r
+ */\r
+ uint16_t EndpointSize; /**< Size of the endpoint bank, in bytes. This indicates the\r
+ * maximum packet size that the endpoint can receive at a time.\r
+ */\r
\r
- uint8_t PollingIntervalMS; /**< Polling interval in milliseconds for the endpoint\r
- * if it is an INTERRUPT or ISOCHRONOUS type.\r
- */\r
- #else\r
- uint8_t bLength;\r
- uint8_t bDescriptorType;\r
- uint8_t bEndpointAddress;\r
- uint8_t bmAttributes;\r
- uint16_t wMaxPacketSize;\r
- uint8_t bInterval;\r
- #endif\r
+ uint8_t PollingIntervalMS; /**< Polling interval in milliseconds for the endpoint\r
+ * if it is an INTERRUPT or ISOCHRONOUS type.\r
+ */\r
} USB_Descriptor_Endpoint_t;\r
+ \r
+ /** Type define for a standard Endpoint Descriptor. This structure uses the relevant standard's given\r
+ * element names to ensure compatibility with the standard.\r
+ *\r
+ * \see \ref USB_Descriptor_Endpoint_t for the version of this define with non-standard LUFA specific\r
+ * element names\r
+ */\r
+ typedef struct\r
+ {\r
+ uint8_t bLength; /**< Size of the descriptor, in bytes. */\r
+ uint8_t bDescriptorType; /**< Type of the descriptor, either a value in \ref USB_DescriptorTypes_t or a value\r
+ * given by the specific class.\r
+ */\r
+ uint8_t bEndpointAddress; /**< Logical address of the endpoint within the device\r
+ * for the current configuration, including direction\r
+ * mask.\r
+ */\r
+ uint8_t bmAttributes; /**< Endpoint attributes, comprised of a mask of the\r
+ * endpoint type (EP_TYPE_*) and attributes (ENDPOINT_ATTR_*)\r
+ * masks.\r
+ */\r
+ uint16_t wMaxPacketSize; /**< Size of the endpoint bank, in bytes. This indicates the\r
+ * maximum packet size that the endpoint can receive at a time.\r
+ */\r
+ uint8_t bInterval; /**< Polling interval in milliseconds for the endpoint\r
+ * if it is an INTERRUPT or ISOCHRONOUS type.\r
+ */\r
+ } USB_StdDescriptor_Endpoint_t;\r
\r
/** Type define for a standard string descriptor. Unlike other standard descriptors, the length\r
* of the descriptor for placement in the descriptor header must be determined by the \ref USB_STRING_LEN()\r
* This structure should also be used for string index 0, which contains the supported language IDs for\r
* the device as an array.\r
*\r
- * \note The non-standard structure element names are documented here. If the\r
- * USE_NONSTANDARD_DESCRIPTOR_NAMES token is not set, this structure contains elements \r
- * with names identical to those listed in the USB standard.\r
+ * This structure uses LUFA-specific element names to make each element's purpose clearer.\r
+ *\r
+ * \see \ref USB_StdDescriptor_String_t for the version of this define with standard element names\r
*/\r
typedef struct\r
{\r
- #if defined(USE_NONSTANDARD_DESCRIPTOR_NAMES) || defined(__DOXYGEN__)\r
USB_Descriptor_Header_t Header; /**< Descriptor header, including type and size. */\r
\r
- int16_t UnicodeString[]; /**< String data, as unicode characters (alternatively,\r
- * string language IDs). If normal ASCII characters are\r
- * to be used, they must be added as an array of characters\r
- * rather than a normal C string so that they are widened to\r
- * Unicode size.\r
- *\r
- * Under GCC, strings prefixed with the "L" character (before\r
- * the opening string quotation mark) are considered to be\r
- * Unicode strings, and may be used instead of an explicit\r
- * array of ASCII characters.\r
- */\r
- #else\r
- uint8_t bLength;\r
- uint8_t bDescriptorType;\r
- int16_t bString[];\r
- #endif\r
+ int16_t UnicodeString[]; /**< String data, as unicode characters (alternatively,\r
+ * string language IDs). If normal ASCII characters are\r
+ * to be used, they must be added as an array of characters\r
+ * rather than a normal C string so that they are widened to\r
+ * Unicode size.\r
+ *\r
+ * Under GCC, strings prefixed with the "L" character (before\r
+ * the opening string quotation mark) are considered to be\r
+ * Unicode strings, and may be used instead of an explicit\r
+ * array of ASCII characters.\r
+ */\r
} USB_Descriptor_String_t;\r
\r
+ /** Type define for a standard string descriptor. Unlike other standard descriptors, the length\r
+ * of the descriptor for placement in the descriptor header must be determined by the \ref USB_STRING_LEN()\r
+ * macro rather than by the size of the descriptor structure, as the length is not fixed.\r
+ *\r
+ * This structure should also be used for string index 0, which contains the supported language IDs for\r
+ * the device as an array.\r
+ *\r
+ * This structure uses the relevant standard's given element names to ensure compatibility with the standard.\r
+ *\r
+ * \see \ref USB_Descriptor_String_t for the version of this define with with non-standard LUFA specific\r
+ * element names\r
+ */\r
+ typedef struct\r
+ {\r
+ uint8_t bLength; /**< Size of the descriptor, in bytes. */\r
+ uint8_t bDescriptorType; /**< Type of the descriptor, either a value in\r
+ * \ref USB_DescriptorTypes_t or a value\r
+ * given by the specific class.\r
+ */\r
+ int16_t bString[]; /**< String data, as unicode characters (alternatively,\r
+ * string language IDs). If normal ASCII characters are\r
+ * to be used, they must be added as an array of characters\r
+ * rather than a normal C string so that they are widened to\r
+ * Unicode size.\r
+ *\r
+ * Under GCC, strings prefixed with the "L" character (before\r
+ * the opening string quotation mark) are considered to be\r
+ * Unicode strings, and may be used instead of an explicit\r
+ * array of ASCII characters.\r
+ */\r
+ } USB_StdDescriptor_String_t;\r
+\r
/* Private Interface - For use in library only: */\r
#if !defined(__DOXYGEN__)\r
/* Macros: */\r
int16_t UnicodeString[20];\r
} SignatureDescriptor;\r
\r
- #if defined(USE_NONSTANDARD_DESCRIPTOR_NAMES)\r
- SignatureDescriptor.Header.Size = sizeof(SignatureDescriptor);\r
- SignatureDescriptor.Header.Type = DTYPE_String;\r
- #else\r
- SignatureDescriptor.Header.bLength = sizeof(SignatureDescriptor);\r
- SignatureDescriptor.Header.bDescriptorType = DTYPE_String;\r
- #endif\r
-\r
+ SignatureDescriptor.Header.Size = sizeof(SignatureDescriptor);\r
+ SignatureDescriptor.Header.Type = DTYPE_String;\r
+ \r
uint8_t SigReadAddress = 0x0E;\r
\r
for (uint8_t SerialCharNum = 0; SerialCharNum < 20; SerialCharNum++)\r
break;\r
}\r
\r
- #if defined(USE_NONSTANDARD_DESCRIPTOR_NAMES)\r
USB_ControlPipeSize = DataBuffer[offsetof(USB_Descriptor_Device_t, Endpoint0Size)];\r
- #else\r
- USB_ControlPipeSize = DataBuffer[offsetof(USB_Descriptor_Device_t, bMaxPacketSize0)]; \r
- #endif\r
\r
USB_Host_ResetDevice();\r
\r
* - Add in new invalid event hook check targets to project makefiles to produce compilation errors when invalid event names\r
* are used in a project\r
* - The HID Report Parser now gives information on the total length of each report within a HID interface\r
+ * - The USE_NONSTANDARD_DESCRIPTOR_NAMES compile time token has been removed - there are now seperate USB_Descriptor_* and\r
+ * USB_StdDescriptor_* structures for both the LUFA and standardized element naming conventions so both may be used\r
*\r
* <b>Fixed:</b>\r
* - Fixed possible lockup in the CDC device class driver, when the host sends data that is a multiple of the\r
* <b>USE_EEPROM_DESCRIPTORS</b> - ( \ref Group_Descriptors ) \n\r
* Similar to USE_RAM_DESCRIPTORS, but all descriptors are stored in the AVR's EEPROM memory rather than RAM.\r
*\r
- * <b>USE_NONSTANDARD_DESCRIPTOR_NAMES</b> - ( \ref Group_Descriptors ) \n\r
- * The USB 2.0 standard gives some rather obscure names for the elements in the standard descriptor types (device, configuration,\r
- * string, endpoint, etc.). By default the LUFA library uses these names in its predefined descriptor structure types for\r
- * compatibility. If this token is defined, the structure element names are switched to the LUFA-specific but more descriptive\r
- * names documented in the StdDescriptors.h source file.\r
- *\r
* <b>NO_INTERNAL_SERIAL</b> - ( \ref Group_Descriptors ) \n\r
* Some AVR models contain a unique 20-digit serial number which can be used as the device serial number, while in device mode. This\r
* allows the host to uniquely identify the device regardless of if it is moved between USB ports on the same computer, allowing\r
*\r
* <b>Non-USB Library Components</b>\r
* - The ADC_Off() function has been renamed to \ref ADC_ShutDown() to be consistent with the rest of the library.\r
- * - The Dataflash_Init() routine no longer initializes the SPI bus - the SPI bus should be initialized manually via a\r
+ * - The \ref SPI_Init() routine's parameters have changed, so that the clock polarity and data sampling modes can be set. See\r
+ * the \ref SPI_Init() function documentation for more details\r
+ * - The \ref Dataflash_Init() routine no longer initializes the SPI bus - the SPI bus should be initialized manually via a\r
* call to SPI_Init() before using the Dataflash driver\r
- * - The SPI_Init() routine's parameters have changed, so that the clock polarity and data sampling modes can be set. See\r
- * the SPI_Init() function documentation for more details\r
*\r
* <b>Host Mode</b>\r
* - The \ref USB_GetDeviceConfigDescriptor() function's parameters and behaviour has changed; the user is required to\r
* is interested in into the processed HID report item structure to save RAM. See \ref CALLBACK_HIDParser_FilterHIDReportItem().\r
* - The HID report parser now always parses FEATURE and always ignores constant-data items - the HID_ENABLE_FEATURE_PROCESSING\r
* and HID_INCLUDE_CONSTANT_DATA_ITEMS compile time tokens now have no effect.\r
+ * - The USE_NONSTANDARD_DESCRIPTOR_NAMES compile time token has been removed - there are now seperate USB_Descriptor_*\r
+ * and USB_StdDescriptor_* structures for both the LUFA and standardized element naming conventions so that both may be used in\r
+ * the one project. For existing projects using the standardized names, change all code to use the USB_StdDescriptor_* variants.\r
+ *\r
+ * <b>Device Mode</b>\r
+ * - The USE_NONSTANDARD_DESCRIPTOR_NAMES compile time token has been removed - there are now seperate USB_Descriptor_*\r
+ * and USB_StdDescriptor_* structures for both the LUFA and standardized element naming conventions so that both may be used in\r
+ * the one project. For existing projects using the standardized names, change all code to use the USB_StdDescriptor_* variants.\r
*\r
* \section Sec_Migration090810 Migrating from 090605 to 090810\r
*\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D USB_DEVICE_ONLY\r
+LUFA_OPTS = -D USB_DEVICE_ONLY\r
LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=16\r
LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1\r
LUFA_OPTS += -D NO_STREAM_CALLBACKS\r
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D USB_DEVICE_ONLY\r
+LUFA_OPTS = -D USB_DEVICE_ONLY\r
LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8\r
LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1\r
LUFA_OPTS += -D USE_FLASH_DESCRIPTORS\r
# 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
\r
\r
# LUFA library compile-time options\r
-LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
-LUFA_OPTS += -D NO_STREAM_CALLBACKS\r
+LUFA_OPTS = -D NO_STREAM_CALLBACKS\r
LUFA_OPTS += -D USB_HOST_ONLY\r
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"\r
\r