aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device/ClassDriver/VirtualSerialMouse
diff options
context:
space:
mode:
Diffstat (limited to 'Demos/Device/ClassDriver/VirtualSerialMouse')
-rw-r--r--Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.c33
-rw-r--r--Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.h6
-rw-r--r--Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c4
3 files changed, 22 insertions, 21 deletions
diff --git a/Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.c b/Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.c
index 7d383a4cc..72e89ef27 100644
--- a/Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.c
+++ b/Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.c
@@ -164,28 +164,29 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.InterfaceStrIndex = NO_DESCRIPTOR
},
- .CDC_Functional_IntHeader =
+ .CDC_Functional_Header =
{
- .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},
- .SubType = 0x00,
+ .Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalHeader_t), .Type = DTYPE_CSInterface},
+ .Subtype = CDC_DSUBTYPE_CSInterface_Header,
- .Data = {0x01, 0x10}
+ .CDCSpecification = VERSION_BCD(01.10),
},
- .CDC_Functional_AbstractControlManagement =
+ .CDC_Functional_ACM =
{
- .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), .Type = 0x24},
- .SubType = 0x02,
+ .Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalACM_t), .Type = DTYPE_CSInterface},
+ .Subtype = CDC_DSUBTYPE_CSInterface_ACM,
- .Data = {0x06}
+ .Capabilities = 0x06,
},
.CDC_Functional_Union =
{
- .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},
- .SubType = 0x06,
+ .Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalUnion_t), .Type = DTYPE_CSInterface},
+ .Subtype = CDC_DSUBTYPE_CSInterface_Union,
- .Data = {0x00, 0x01}
+ .MasterInterfaceNumber = 0,
+ .SlaveInterfaceNumber = 1,
},
.CDC_NotificationEndpoint =
@@ -245,19 +246,19 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.Class = 0x03,
.SubClass = 0x01,
- .Protocol = HID_BOOT_MOUSE_PROTOCOL,
+ .Protocol = HID_BOOTP_MouseBootProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR
},
.HID_MouseHID =
{
- .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = DTYPE_HID},
+ .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID},
.HIDSpec = VERSION_BCD(01.11),
.CountryCode = 0x00,
.TotalReportDescriptors = 1,
- .HIDReportType = DTYPE_Report,
+ .HIDReportType = HID_DTYPE_Report,
.HIDReportLength = sizeof(MouseReport)
},
@@ -349,11 +350,11 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
}
break;
- case DTYPE_HID:
+ case HID_DTYPE_HID:
Address = &ConfigurationDescriptor.HID_MouseHID;
Size = sizeof(USB_HID_Descriptor_HID_t);
break;
- case DTYPE_Report:
+ case HID_DTYPE_Report:
Address = &MouseReport;
Size = sizeof(MouseReport);
break;
diff --git a/Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.h b/Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.h
index dfe6c1147..6b6178a93 100644
--- a/Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.h
+++ b/Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.h
@@ -75,9 +75,9 @@
USB_Descriptor_Configuration_Header_t Config;
USB_Descriptor_Interface_Association_t CDC_IAD;
USB_Descriptor_Interface_t CDC_CCI_Interface;
- CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_IntHeader;
- CDC_FUNCTIONAL_DESCRIPTOR(1) CDC_Functional_AbstractControlManagement;
- CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_Union;
+ USB_CDC_Descriptor_FunctionalHeader_t CDC_Functional_Header;
+ USB_CDC_Descriptor_FunctionalACM_t CDC_Functional_ACM;
+ USB_CDC_Descriptor_FunctionalUnion_t CDC_Functional_Union;
USB_Descriptor_Endpoint_t CDC_NotificationEndpoint;
USB_Descriptor_Interface_t CDC_DCI_Interface;
USB_Descriptor_Endpoint_t CDC_DataOutEndpoint;
diff --git a/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c b/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c
index 86cdb4e7a..8372d4e1b 100644
--- a/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c
+++ b/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c
@@ -191,7 +191,7 @@ void EVENT_USB_Device_StartOfFrame(void)
*
* \param[in] HIDInterfaceInfo Pointer to the HID class interface configuration structure being referenced
* \param[in,out] ReportID Report ID requested by the host if non-zero, otherwise callback should set to the generated report ID
- * \param[in] ReportType Type of the report to create, either REPORT_ITEM_TYPE_In or REPORT_ITEM_TYPE_Feature
+ * \param[in] ReportType Type of the report to create, either HID_REPORT_ITEM_In or HID_REPORT_ITEM_Feature
* \param[out] ReportData Pointer to a buffer where the created report should be stored
* \param[out] ReportSize Number of bytes written in the report (or zero if no report is to be sent
*
@@ -232,7 +232,7 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn
*
* \param[in] HIDInterfaceInfo Pointer to the HID class interface configuration structure being referenced
* \param[in] ReportID Report ID of the received report from the host
- * \param[in] ReportType The type of report that the host has sent, either REPORT_ITEM_TYPE_Out or REPORT_ITEM_TYPE_Feature
+ * \param[in] ReportType The type of report that the host has sent, either HID_REPORT_ITEM_Out or HID_REPORT_ITEM_Feature
* \param[in] ReportData Pointer to a buffer where the created report has been stored
* \param[in] ReportSize Size in bytes of the received HID report
*/