aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device/ClassDriver/Joystick
diff options
context:
space:
mode:
Diffstat (limited to 'Demos/Device/ClassDriver/Joystick')
-rw-r--r--Demos/Device/ClassDriver/Joystick/Descriptors.c4
-rw-r--r--Demos/Device/ClassDriver/Joystick/Descriptors.h4
-rw-r--r--Demos/Device/ClassDriver/Joystick/Joystick.c11
3 files changed, 10 insertions, 9 deletions
diff --git a/Demos/Device/ClassDriver/Joystick/Descriptors.c b/Demos/Device/ClassDriver/Joystick/Descriptors.c
index da6fc3d09..903e35c63 100644
--- a/Demos/Device/ClassDriver/Joystick/Descriptors.c
+++ b/Demos/Device/ClassDriver/Joystick/Descriptors.c
@@ -135,10 +135,10 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | JOYSTICK_EPNUM),
+ .EndpointAddress = JOYSTICK_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = JOYSTICK_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
}
};
diff --git a/Demos/Device/ClassDriver/Joystick/Descriptors.h b/Demos/Device/ClassDriver/Joystick/Descriptors.h
index f0ad9c2f1..d2e294316 100644
--- a/Demos/Device/ClassDriver/Joystick/Descriptors.h
+++ b/Demos/Device/ClassDriver/Joystick/Descriptors.h
@@ -57,8 +57,8 @@
} USB_Descriptor_Configuration_t;
/* Macros: */
- /** Endpoint number of the Joystick HID reporting IN endpoint. */
- #define JOYSTICK_EPNUM 1
+ /** Endpoint address of the Joystick HID reporting IN endpoint. */
+ #define JOYSTICK_EPADDR (ENDPOINT_DIR_IN | 1)
/** Size in bytes of the Joystick HID reporting IN endpoint. */
#define JOYSTICK_EPSIZE 8
diff --git a/Demos/Device/ClassDriver/Joystick/Joystick.c b/Demos/Device/ClassDriver/Joystick/Joystick.c
index 3c1913f8f..4f361daf0 100644
--- a/Demos/Device/ClassDriver/Joystick/Joystick.c
+++ b/Demos/Device/ClassDriver/Joystick/Joystick.c
@@ -48,11 +48,12 @@ USB_ClassInfo_HID_Device_t Joystick_HID_Interface =
.Config =
{
.InterfaceNumber = 0,
-
- .ReportINEndpointNumber = JOYSTICK_EPNUM,
- .ReportINEndpointSize = JOYSTICK_EPSIZE,
- .ReportINEndpointDoubleBank = false,
-
+ .ReportINEndpoint =
+ {
+ .Address = JOYSTICK_EPADDR,
+ .Size = JOYSTICK_EPSIZE,
+ .Banks = 1,
+ },
.PrevReportINBuffer = PrevJoystickHIDReportBuffer,
.PrevReportINBufferSize = sizeof(PrevJoystickHIDReportBuffer),
},