X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/b9b03aadb219d06fbad9d110e508db93e45461af..d6edfe35c8a9490407e4a5e34f8e5108c6a260a3:/Demos/Device/LowLevel/Joystick/Descriptors.c diff --git a/Demos/Device/LowLevel/Joystick/Descriptors.c b/Demos/Device/LowLevel/Joystick/Descriptors.c index bd7be658a..911d7dbf4 100644 --- a/Demos/Device/LowLevel/Joystick/Descriptors.c +++ b/Demos/Device/LowLevel/Joystick/Descriptors.c @@ -58,18 +58,18 @@ USB_Descriptor_HIDReport_Datatype_t PROGMEM JoystickReport[] = 0x75, 0x08, /* Report Size (8) */ 0x95, 0x02, /* Report Count (2) */ 0x81, 0x82, /* Input (Data, Variable, Absolute, Volatile) */ - 0x05, 0x09, /* Usage Page (Button) */ - 0x09, 0x02, /* Usage (Button 2) */ - 0x09, 0x01, /* Usage (Button 1) */ - 0x15, 0x00, /* Logical Minimum (0) */ - 0x25, 0x01, /* Logical Maximum (1) */ - 0x75, 0x01, /* Report Size (1) */ - 0x95, 0x02, /* Report Count (2) */ - 0x81, 0x02, /* Input (Data, Variable, Absolute) */ - 0x75, 0x06, /* Report Size (6) */ - 0x95, 0x01, /* Report Count (1) */ - 0x81, 0x01, /* Input (Constant) */ 0xc0, /* End Collection */ + 0x05, 0x09, /* Usage Page (Button) */ + 0x09, 0x02, /* Usage (Button 2) */ + 0x09, 0x01, /* Usage (Button 1) */ + 0x15, 0x00, /* Logical Minimum (0) */ + 0x25, 0x01, /* Logical Maximum (1) */ + 0x75, 0x01, /* Report Size (1) */ + 0x95, 0x02, /* Report Count (2) */ + 0x81, 0x02, /* Input (Data, Variable, Absolute) */ + 0x75, 0x06, /* Report Size (6) */ + 0x95, 0x01, /* Report Count (1) */ + 0x81, 0x01, /* Input (Constant) */ 0xc0 /* End Collection */ }; @@ -97,7 +97,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor = .ProductStrIndex = 0x02, .SerialNumStrIndex = NO_DESCRIPTOR, - .NumberOfConfigurations = 1 + .NumberOfConfigurations = FIXED_NUM_CONFIGURATIONS }; /** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage @@ -154,9 +154,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | JOYSTICK_EPNUM), - .Attributes = EP_TYPE_INTERRUPT, + .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = JOYSTICK_EPSIZE, - .PollingIntervalMS = 0x02 + .PollingIntervalMS = 0x0A } };