Added return values to the CDC and MIDI class driver transmit functions.
[pub/USBasp.git] / Demos / Device / ClassDriver / Joystick / Descriptors.c
index bd7be65..74ab7d9 100644 (file)
@@ -86,7 +86,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
        .Class                  = 0x00,\r
        .SubClass               = 0x00,\r
        .Protocol               = 0x00,\r
-                               \r
+       \r
        .Endpoint0Size          = FIXED_CONTROL_ENDPOINT_SIZE,\r
                \r
        .VendorID               = 0x03EB,\r
@@ -97,7 +97,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
        .ProductStrIndex        = 0x02,\r
        .SerialNumStrIndex      = NO_DESCRIPTOR,\r
                \r
-       .NumberOfConfigurations = 1\r
+       .NumberOfConfigurations = FIXED_NUM_CONFIGURATIONS\r
 };\r
 \r
 /** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage\r
@@ -140,8 +140,8 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 \r
        .JoystickHID = \r
                {\r
-                       .Header                 = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},\r
-                                                                        \r
+                       .Header                 = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},\r
+                       \r
                        .HIDSpec                = VERSION_BCD(01.11),\r
                        .CountryCode            = 0x00,\r
                        .TotalReportDescriptors = 1,\r
@@ -152,11 +152,11 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
        .JoystickEndpoint = \r
                {\r
                        .Header                 = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
-                                                                                \r
+                       \r
                        .EndpointAddress        = (ENDPOINT_DESCRIPTOR_DIR_IN | JOYSTICK_EPNUM),\r
-                       .Attributes             = EP_TYPE_INTERRUPT,\r
+                       .Attributes             = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),\r
                        .EndpointSize           = JOYSTICK_EPSIZE,\r
-                       .PollingIntervalMS      = 0x02\r
+                       .PollingIntervalMS      = 0x0A\r
                }       \r
 };\r
 \r
@@ -237,7 +237,7 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex,
                        break;\r
                case DTYPE_HID: \r
                        Address = (void*)&ConfigurationDescriptor.JoystickHID;\r
-                       Size    = sizeof(USB_Descriptor_HID_t);\r
+                       Size    = sizeof(USB_HID_Descriptor_t);\r
                        break;\r
                case DTYPE_Report: \r
                        Address = (void*)&JoystickReport;\r