const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor ={ .Config = { .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},
.TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t), .TotalInterfaces = 1,
.ConfigurationNumber = 1, .ConfigurationStrIndex = NO_DESCRIPTOR, .ConfigAttributes = (USB_CONFIG_ATTR_RESERVED ),
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100) },
.HID_Interface = { .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
.InterfaceNumber = INTERFACE_ID_Joystick, .AlternateSetting = 0x00,
.TotalEndpoints = 2,
.Class = HID_CSCP_HIDClass, .SubClass = HID_CSCP_NonBootSubclass, .Protocol = HID_CSCP_NonBootProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR },
.HID_JoystickHID = { .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID},
.HIDSpec = VERSION_BCD(1,1,1), .CountryCode = 0x00, .TotalReportDescriptors = 1, .HIDReportType = HID_DTYPE_Report, .HIDReportLength = sizeof(JoystickReport) },
.HID_ReportINEndpoint = { .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
.EndpointAddress = JOYSTICK_EPADDR, .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = JOYSTICK_EPSIZE, .PollingIntervalMS = 0x04 },
.HID_ReportOUTEndpoint = { .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
.EndpointAddress = JOYSTICK_OUT_EPADDR, .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = JOYSTICK_EPSIZE, .PollingIntervalMS = 0x04 }};
ConnectionStatus: DeviceConnectedCurrent Config Value: 0x01Device Bus Speed: FullDevice Address: 0x0DOpen Pipes: 2
Endpoint Descriptor:bEndpointAddress: 0x81 INTransfer Type: InterruptwMaxPacketSize: 0x0008 (8)bInterval: 0x04
Endpoint Descriptor:bEndpointAddress: 0x01 OUTTransfer Type: InterruptwMaxPacketSize: 0x0008 (8)bInterval: 0x04
Configuration Descriptor:wTotalLength: 0x0029bNumInterfaces: 0x01bConfigurationValue: 0x01iConfiguration: 0x00bmAttributes: 0x80 (Bus Powered )MaxPower: 0x32 (100 Ma)
Interface Descriptor:bInterfaceNumber: 0x00bAlternateSetting: 0x00bNumEndpoints: 0x02bInterfaceClass: 0x03 (HID)bInterfaceSubClass: 0x00bInterfaceProtocol: 0x00iInterface: 0x00
HID Descriptor:bcdHID: 0x0111bCountryCode: 0x00bNumDescriptors: 0x01bDescriptorType: 0x22wDescriptorLength: 0x004B
Endpoint Descriptor:bEndpointAddress: 0x81 INTransfer Type: InterruptwMaxPacketSize: 0x0008 (8)bInterval: 0x04
/* Select the Joystick Report Endpoint */ Endpoint_SelectEndpoint(JOYSTICK_OUT_EPADDR);
if (Endpoint_IsOUTReceived()) { /* Check to see if the packet contains data */ if (Endpoint_IsReadWriteAllowed()) { processStickOut(Endpoint_Read_8(),Endpoint_Read_16_LE()); } Endpoint_ClearOUT(); }
--
You received this message because you are subscribed to the Google Groups "LUFA Library Support List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lufa-support...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lufa-support/f4521a32-5cba-4b4a-b1b0-88c3336b8fd9%40googlegroups.com.