aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device/ClassDriver
diff options
context:
space:
mode:
Diffstat (limited to 'Demos/Device/ClassDriver')
-rw-r--r--Demos/Device/ClassDriver/DualVirtualSerial/Descriptors.c12
-rw-r--r--Demos/Device/ClassDriver/Keyboard/Descriptors.h2
-rw-r--r--Demos/Device/ClassDriver/Keyboard/Keyboard.c4
-rw-r--r--Demos/Device/ClassDriver/KeyboardMouseMultiReport/Descriptors.c104
-rw-r--r--Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.c4
-rw-r--r--Demos/Device/ClassDriver/RNDISEthernet/Descriptors.c4
-rw-r--r--Demos/Device/ClassDriver/VirtualSerial/Descriptors.c4
-rw-r--r--Demos/Device/ClassDriver/VirtualSerialMassStorage/Descriptors.c6
-rw-r--r--Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.c6
9 files changed, 73 insertions, 73 deletions
diff --git a/Demos/Device/ClassDriver/DualVirtualSerial/Descriptors.c b/Demos/Device/ClassDriver/DualVirtualSerial/Descriptors.c
index 245231852..827b983d3 100644
--- a/Demos/Device/ClassDriver/DualVirtualSerial/Descriptors.c
+++ b/Demos/Device/ClassDriver/DualVirtualSerial/Descriptors.c
@@ -91,7 +91,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_Association_t), .Type = DTYPE_InterfaceAssociation},
- .FirstInterfaceIndex = 0,
+ .FirstInterfaceIndex = INTERFACE_ID_CDC1_CCI,
.TotalInterfaces = 2,
.Class = CDC_CSCP_CDCClass,
@@ -138,8 +138,8 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalUnion_t), .Type = DTYPE_CSInterface},
.Subtype = CDC_DSUBTYPE_CSInterface_Union,
- .MasterInterfaceNumber = 0,
- .SlaveInterfaceNumber = 1,
+ .MasterInterfaceNumber = INTERFACE_ID_CDC1_CCI,
+ .SlaveInterfaceNumber = INTERFACE_ID_CDC1_DCI,
},
.CDC1_ManagementEndpoint =
@@ -192,7 +192,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_Association_t), .Type = DTYPE_InterfaceAssociation},
- .FirstInterfaceIndex = 2,
+ .FirstInterfaceIndex = INTERFACE_ID_CDC2_CCI,
.TotalInterfaces = 2,
.Class = CDC_CSCP_CDCClass,
@@ -239,8 +239,8 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalUnion_t), .Type = DTYPE_CSInterface},
.Subtype = CDC_DSUBTYPE_CSInterface_Union,
- .MasterInterfaceNumber = 2,
- .SlaveInterfaceNumber = 3,
+ .MasterInterfaceNumber = INTERFACE_ID_CDC2_CCI,
+ .SlaveInterfaceNumber = INTERFACE_ID_CDC2_DCI,
},
.CDC2_ManagementEndpoint =
diff --git a/Demos/Device/ClassDriver/Keyboard/Descriptors.h b/Demos/Device/ClassDriver/Keyboard/Descriptors.h
index ce029bb75..21c9e5df6 100644
--- a/Demos/Device/ClassDriver/Keyboard/Descriptors.h
+++ b/Demos/Device/ClassDriver/Keyboard/Descriptors.h
@@ -53,7 +53,7 @@
// Keyboard HID Interface
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_HID_t HID_KeyboardHID;
- USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
+ USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
/** Enum for the device interface descriptor IDs within the device. Each interface descriptor
diff --git a/Demos/Device/ClassDriver/Keyboard/Keyboard.c b/Demos/Device/ClassDriver/Keyboard/Keyboard.c
index 68e3fbe1b..7acd0d613 100644
--- a/Demos/Device/ClassDriver/Keyboard/Keyboard.c
+++ b/Demos/Device/ClassDriver/Keyboard/Keyboard.c
@@ -44,7 +44,7 @@ static uint8_t PrevKeyboardHIDReportBuffer[sizeof(USB_KeyboardReport_Data_t)];
* within a device can be differentiated from one another.
*/
USB_ClassInfo_HID_Device_t Keyboard_HID_Interface =
- {
+ {
.Config =
{
.InterfaceNumber = INTERFACE_ID_Keyboard,
@@ -57,7 +57,7 @@ USB_ClassInfo_HID_Device_t Keyboard_HID_Interface =
.PrevReportINBuffer = PrevKeyboardHIDReportBuffer,
.PrevReportINBufferSize = sizeof(PrevKeyboardHIDReportBuffer),
},
- };
+ };
/** Main program entry point. This routine contains the overall program flow, including initial
diff --git a/Demos/Device/ClassDriver/KeyboardMouseMultiReport/Descriptors.c b/Demos/Device/ClassDriver/KeyboardMouseMultiReport/Descriptors.c
index 477cad0a4..32b6b4b08 100644
--- a/Demos/Device/ClassDriver/KeyboardMouseMultiReport/Descriptors.c
+++ b/Demos/Device/ClassDriver/KeyboardMouseMultiReport/Descriptors.c
@@ -52,30 +52,30 @@ const USB_Descriptor_HIDReport_Datatype_t PROGMEM HIDReport[] =
HID_RI_USAGE(8, 0x02), /* Mouse */
HID_RI_COLLECTION(8, 0x01), /* Application */
HID_RI_REPORT_ID(8, HID_REPORTID_MouseReport),
- HID_RI_USAGE(8, 0x01), /* Pointer */
- HID_RI_COLLECTION(8, 0x00), /* Physical */
- HID_RI_USAGE_PAGE(8, 0x09), /* Button */
- HID_RI_USAGE_MINIMUM(8, 0x01),
- HID_RI_USAGE_MAXIMUM(8, 0x03),
- HID_RI_LOGICAL_MINIMUM(8, 0x00),
- HID_RI_LOGICAL_MAXIMUM(8, 0x01),
- HID_RI_REPORT_COUNT(8, 0x03),
- HID_RI_REPORT_SIZE(8, 0x01),
- HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE),
- HID_RI_REPORT_COUNT(8, 0x01),
- HID_RI_REPORT_SIZE(8, 0x05),
- HID_RI_INPUT(8, HID_IOF_CONSTANT),
- HID_RI_USAGE_PAGE(8, 0x01), /* Generic Desktop */
- HID_RI_USAGE(8, 0x30), /* Usage X */
- HID_RI_USAGE(8, 0x31), /* Usage Y */
- HID_RI_LOGICAL_MINIMUM(8, -1),
- HID_RI_LOGICAL_MAXIMUM(8, 1),
- HID_RI_PHYSICAL_MINIMUM(8, -1),
- HID_RI_PHYSICAL_MAXIMUM(8, 1),
- HID_RI_REPORT_COUNT(8, 0x02),
- HID_RI_REPORT_SIZE(8, 0x08),
- HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_RELATIVE),
- HID_RI_END_COLLECTION(0),
+ HID_RI_USAGE(8, 0x01), /* Pointer */
+ HID_RI_COLLECTION(8, 0x00), /* Physical */
+ HID_RI_USAGE_PAGE(8, 0x09), /* Button */
+ HID_RI_USAGE_MINIMUM(8, 0x01),
+ HID_RI_USAGE_MAXIMUM(8, 0x03),
+ HID_RI_LOGICAL_MINIMUM(8, 0x00),
+ HID_RI_LOGICAL_MAXIMUM(8, 0x01),
+ HID_RI_REPORT_COUNT(8, 0x03),
+ HID_RI_REPORT_SIZE(8, 0x01),
+ HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE),
+ HID_RI_REPORT_COUNT(8, 0x01),
+ HID_RI_REPORT_SIZE(8, 0x05),
+ HID_RI_INPUT(8, HID_IOF_CONSTANT),
+ HID_RI_USAGE_PAGE(8, 0x01), /* Generic Desktop */
+ HID_RI_USAGE(8, 0x30), /* Usage X */
+ HID_RI_USAGE(8, 0x31), /* Usage Y */
+ HID_RI_LOGICAL_MINIMUM(8, -1),
+ HID_RI_LOGICAL_MAXIMUM(8, 1),
+ HID_RI_PHYSICAL_MINIMUM(8, -1),
+ HID_RI_PHYSICAL_MAXIMUM(8, 1),
+ HID_RI_REPORT_COUNT(8, 0x02),
+ HID_RI_REPORT_SIZE(8, 0x08),
+ HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_RELATIVE),
+ HID_RI_END_COLLECTION(0),
HID_RI_END_COLLECTION(0),
/* Keyboard Report */
@@ -83,34 +83,34 @@ const USB_Descriptor_HIDReport_Datatype_t PROGMEM HIDReport[] =
HID_RI_USAGE(8, 0x06), /* Keyboard */
HID_RI_COLLECTION(8, 0x01), /* Application */
HID_RI_REPORT_ID(8, HID_REPORTID_KeyboardReport),
- HID_RI_USAGE_PAGE(8, 0x07), /* Key Codes */
- HID_RI_USAGE_MINIMUM(8, 0xE0), /* Keyboard Left Control */
- HID_RI_USAGE_MAXIMUM(8, 0xE7), /* Keyboard Right GUI */
- HID_RI_LOGICAL_MINIMUM(8, 0x00),
- HID_RI_LOGICAL_MAXIMUM(8, 0x01),
- HID_RI_REPORT_SIZE(8, 0x01),
- HID_RI_REPORT_COUNT(8, 0x08),
- HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE),
- HID_RI_REPORT_COUNT(8, 0x01),
- HID_RI_REPORT_SIZE(8, 0x08),
- HID_RI_INPUT(8, HID_IOF_CONSTANT),
- HID_RI_USAGE_PAGE(8, 0x08), /* LEDs */
- HID_RI_USAGE_MINIMUM(8, 0x01), /* Num Lock */
- HID_RI_USAGE_MAXIMUM(8, 0x05), /* Kana */
- HID_RI_REPORT_COUNT(8, 0x05),
- HID_RI_REPORT_SIZE(8, 0x01),
- HID_RI_OUTPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE | HID_IOF_NON_VOLATILE),
- HID_RI_REPORT_COUNT(8, 0x01),
- HID_RI_REPORT_SIZE(8, 0x03),
- HID_RI_OUTPUT(8, HID_IOF_CONSTANT),
- HID_RI_LOGICAL_MINIMUM(8, 0x00),
- HID_RI_LOGICAL_MAXIMUM(8, 0x65),
- HID_RI_USAGE_PAGE(8, 0x07), /* Keyboard */
- HID_RI_USAGE_MINIMUM(8, 0x00), /* Reserved (no event indicated) */
- HID_RI_USAGE_MAXIMUM(8, 0x65), /* Keyboard Application */
- HID_RI_REPORT_COUNT(8, 0x06),
- HID_RI_REPORT_SIZE(8, 0x08),
- HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_ARRAY | HID_IOF_ABSOLUTE),
+ HID_RI_USAGE_PAGE(8, 0x07), /* Key Codes */
+ HID_RI_USAGE_MINIMUM(8, 0xE0), /* Keyboard Left Control */
+ HID_RI_USAGE_MAXIMUM(8, 0xE7), /* Keyboard Right GUI */
+ HID_RI_LOGICAL_MINIMUM(8, 0x00),
+ HID_RI_LOGICAL_MAXIMUM(8, 0x01),
+ HID_RI_REPORT_SIZE(8, 0x01),
+ HID_RI_REPORT_COUNT(8, 0x08),
+ HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE),
+ HID_RI_REPORT_COUNT(8, 0x01),
+ HID_RI_REPORT_SIZE(8, 0x08),
+ HID_RI_INPUT(8, HID_IOF_CONSTANT),
+ HID_RI_USAGE_PAGE(8, 0x08), /* LEDs */
+ HID_RI_USAGE_MINIMUM(8, 0x01), /* Num Lock */
+ HID_RI_USAGE_MAXIMUM(8, 0x05), /* Kana */
+ HID_RI_REPORT_COUNT(8, 0x05),
+ HID_RI_REPORT_SIZE(8, 0x01),
+ HID_RI_OUTPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE | HID_IOF_NON_VOLATILE),
+ HID_RI_REPORT_COUNT(8, 0x01),
+ HID_RI_REPORT_SIZE(8, 0x03),
+ HID_RI_OUTPUT(8, HID_IOF_CONSTANT),
+ HID_RI_LOGICAL_MINIMUM(8, 0x00),
+ HID_RI_LOGICAL_MAXIMUM(8, 0x65),
+ HID_RI_USAGE_PAGE(8, 0x07), /* Keyboard */
+ HID_RI_USAGE_MINIMUM(8, 0x00), /* Reserved (no event indicated) */
+ HID_RI_USAGE_MAXIMUM(8, 0x65), /* Keyboard Application */
+ HID_RI_REPORT_COUNT(8, 0x06),
+ HID_RI_REPORT_SIZE(8, 0x08),
+ HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_ARRAY | HID_IOF_ABSOLUTE),
HID_RI_END_COLLECTION(0),
};
diff --git a/Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.c b/Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.c
index 0ec878894..2be1e9447 100644
--- a/Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.c
+++ b/Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.c
@@ -108,13 +108,13 @@ void SetupHardware()
/** Event handler for the library USB Connection event. */
void EVENT_USB_Device_Connect(void)
{
- LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
+ LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
}
/** Event handler for the library USB Disconnection event. */
void EVENT_USB_Device_Disconnect(void)
{
- LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
}
/** Event handler for the library USB Configuration Changed event. */
diff --git a/Demos/Device/ClassDriver/RNDISEthernet/Descriptors.c b/Demos/Device/ClassDriver/RNDISEthernet/Descriptors.c
index 7474e5499..9bb2c3e43 100644
--- a/Demos/Device/ClassDriver/RNDISEthernet/Descriptors.c
+++ b/Demos/Device/ClassDriver/RNDISEthernet/Descriptors.c
@@ -123,8 +123,8 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalUnion_t), .Type = DTYPE_CSInterface},
.Subtype = CDC_DSUBTYPE_CSInterface_Union,
- .MasterInterfaceNumber = 0,
- .SlaveInterfaceNumber = 1,
+ .MasterInterfaceNumber = INTERFACE_ID_CDC_CCI,
+ .SlaveInterfaceNumber = INTERFACE_ID_CDC_DCI,
},
.CDC_NotificationEndpoint =
diff --git a/Demos/Device/ClassDriver/VirtualSerial/Descriptors.c b/Demos/Device/ClassDriver/VirtualSerial/Descriptors.c
index 33f63371d..337cb5f5b 100644
--- a/Demos/Device/ClassDriver/VirtualSerial/Descriptors.c
+++ b/Demos/Device/ClassDriver/VirtualSerial/Descriptors.c
@@ -124,8 +124,8 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalUnion_t), .Type = DTYPE_CSInterface},
.Subtype = CDC_DSUBTYPE_CSInterface_Union,
- .MasterInterfaceNumber = 0,
- .SlaveInterfaceNumber = 1,
+ .MasterInterfaceNumber = INTERFACE_ID_CDC_CCI,
+ .SlaveInterfaceNumber = INTERFACE_ID_CDC_DCI,
},
.CDC_NotificationEndpoint =
diff --git a/Demos/Device/ClassDriver/VirtualSerialMassStorage/Descriptors.c b/Demos/Device/ClassDriver/VirtualSerialMassStorage/Descriptors.c
index b8a07f4c2..40f943929 100644
--- a/Demos/Device/ClassDriver/VirtualSerialMassStorage/Descriptors.c
+++ b/Demos/Device/ClassDriver/VirtualSerialMassStorage/Descriptors.c
@@ -91,7 +91,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_Association_t), .Type = DTYPE_InterfaceAssociation},
- .FirstInterfaceIndex = 0,
+ .FirstInterfaceIndex = INTERFACE_ID_CDC_CCI,
.TotalInterfaces = 2,
.Class = CDC_CSCP_CDCClass,
@@ -138,8 +138,8 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalUnion_t), .Type = DTYPE_CSInterface},
.Subtype = CDC_DSUBTYPE_CSInterface_Union,
- .MasterInterfaceNumber = 0,
- .SlaveInterfaceNumber = 1,
+ .MasterInterfaceNumber = INTERFACE_ID_CDC_CCI,
+ .SlaveInterfaceNumber = INTERFACE_ID_CDC_DCI,
},
.CDC_NotificationEndpoint =
diff --git a/Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.c b/Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.c
index 43c849b79..b2e7c8dee 100644
--- a/Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.c
+++ b/Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.c
@@ -110,7 +110,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_Association_t), .Type = DTYPE_InterfaceAssociation},
- .FirstInterfaceIndex = 0,
+ .FirstInterfaceIndex = INTERFACE_ID_CDC_CCI,
.TotalInterfaces = 2,
.Class = CDC_CSCP_CDCClass,
@@ -157,8 +157,8 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalUnion_t), .Type = DTYPE_CSInterface},
.Subtype = CDC_DSUBTYPE_CSInterface_Union,
- .MasterInterfaceNumber = 0,
- .SlaveInterfaceNumber = 1,
+ .MasterInterfaceNumber = INTERFACE_ID_CDC_CCI,
+ .SlaveInterfaceNumber = INTERFACE_ID_CDC_DCI,
},
.CDC_NotificationEndpoint =