diff options
Diffstat (limited to 'Demos/Device/GenericHID')
-rw-r--r-- | Demos/Device/GenericHID/Descriptors.c | 12 | ||||
-rw-r--r-- | Demos/Device/GenericHID/Descriptors.h | 4 | ||||
-rw-r--r-- | Demos/Device/GenericHID/GenericHID.c | 8 | ||||
-rw-r--r-- | Demos/Device/GenericHID/GenericHID.h | 4 |
4 files changed, 6 insertions, 22 deletions
diff --git a/Demos/Device/GenericHID/Descriptors.c b/Demos/Device/GenericHID/Descriptors.c index ca1a110e7..6988166b3 100644 --- a/Demos/Device/GenericHID/Descriptors.c +++ b/Demos/Device/GenericHID/Descriptors.c @@ -119,7 +119,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .InterfaceNumber = 0x00,
.AlternateSetting = 0x00,
- .TotalEndpoints = 2,
+ .TotalEndpoints = 1,
.Class = 0x03,
.SubClass = 0x00,
@@ -148,16 +148,6 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .EndpointSize = GENERIC_EPSIZE,
.PollingIntervalMS = 0x02
},
-
- .GenericOUTEndpoint =
- {
- .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
-
- .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | GENERIC_OUT_EPNUM),
- .Attributes = EP_TYPE_INTERRUPT,
- .EndpointSize = GENERIC_EPSIZE,
- .PollingIntervalMS = 0x02
- }
};
/** Language descriptor structure. This descriptor, located in FLASH memory, is returned when the host requests
diff --git a/Demos/Device/GenericHID/Descriptors.h b/Demos/Device/GenericHID/Descriptors.h index bc4c68ae6..01db53e41 100644 --- a/Demos/Device/GenericHID/Descriptors.h +++ b/Demos/Device/GenericHID/Descriptors.h @@ -53,16 +53,12 @@ USB_Descriptor_Interface_t Interface;
USB_Descriptor_HID_t GenericHID;
USB_Descriptor_Endpoint_t GenericINEndpoint;
- USB_Descriptor_Endpoint_t GenericOUTEndpoint;
} USB_Descriptor_Configuration_t;
/* Macros: */
/** Endpoint number of the Generic HID reporting IN endpoint. */
#define GENERIC_IN_EPNUM 1
- /** Endpoint number of the Generic HID reporting OUT endpoint. */
- #define GENERIC_OUT_EPNUM 2
-
/** Size in bytes of the Generic HID reporting endpoint. */
#define GENERIC_EPSIZE 8
diff --git a/Demos/Device/GenericHID/GenericHID.c b/Demos/Device/GenericHID/GenericHID.c index b933e4506..172df7fa7 100644 --- a/Demos/Device/GenericHID/GenericHID.c +++ b/Demos/Device/GenericHID/GenericHID.c @@ -47,9 +47,6 @@ USB_ClassInfo_HID_t Generic_HID_Interface = .ReportINEndpointNumber = GENERIC_IN_EPNUM,
.ReportINEndpointSize = GENERIC_EPSIZE,
- .ReportOUTEndpointNumber = GENERIC_OUT_EPNUM,
- .ReportOUTEndpointSize = GENERIC_EPSIZE,
-
.ReportINBufferSize = GENERIC_REPORT_SIZE,
.UsingReportProtocol = true,
@@ -133,7 +130,7 @@ ISR(TIMER0_COMPA_vect, ISR_BLOCK) *
* \return Number of bytes written in the report (or zero if no report is to be sent
*/
-uint16_t CALLBACK_USB_HID_CreateNextHIDReport(USB_ClassInfo_HID_t* HIDInterfaceInfo, void* ReportData)
+uint16_t CALLBACK_USB_HID_CreateNextHIDReport(USB_ClassInfo_HID_t* HIDInterfaceInfo, uint8_t* ReportID, void* ReportData)
{
// Create generic HID report here
@@ -146,7 +143,8 @@ uint16_t CALLBACK_USB_HID_CreateNextHIDReport(USB_ClassInfo_HID_t* HIDInterfaceI * \param ReportData Pointer to a buffer where the created report has been stored
* \param ReportSize Size in bytes of the received HID report
*/
-void CALLBACK_USB_HID_ProcessReceivedHIDReport(USB_ClassInfo_HID_t* HIDInterfaceInfo, void* ReportData, uint16_t ReportSize)
+void CALLBACK_USB_HID_ProcessReceivedHIDReport(USB_ClassInfo_HID_t* HIDInterfaceInfo, uint8_t ReportID,
+ void* ReportData, uint16_t ReportSize)
{
// Process received generic HID report here
}
diff --git a/Demos/Device/GenericHID/GenericHID.h b/Demos/Device/GenericHID/GenericHID.h index b68dc4c24..5ea084c7e 100644 --- a/Demos/Device/GenericHID/GenericHID.h +++ b/Demos/Device/GenericHID/GenericHID.h @@ -72,8 +72,8 @@ void EVENT_USB_ConfigurationChanged(void);
void EVENT_USB_UnhandledControlPacket(void);
- uint16_t CALLBACK_USB_HID_CreateNextHIDReport(USB_ClassInfo_HID_t* HIDInterfaceInfo, void* ReportData);
- void CALLBACK_USB_HID_ProcessReceivedHIDReport(USB_ClassInfo_HID_t* HIDInterfaceInfo,
+ uint16_t CALLBACK_USB_HID_CreateNextHIDReport(USB_ClassInfo_HID_t* HIDInterfaceInfo, uint8_t* ReportID, void* ReportData);
+ void CALLBACK_USB_HID_ProcessReceivedHIDReport(USB_ClassInfo_HID_t* HIDInterfaceInfo, uint8_t ReportID,
void* ReportData, uint16_t ReportSize);
#endif
|