projects
/
pub
/
USBasp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cd3aae8
)
Extract interface numbers into enums.
author
László Monda
<laci@monda.hu>
Sun, 6 Oct 2013 20:16:20 +0000
(22:16 +0200)
committer
László Monda
<laci@monda.hu>
Sun, 6 Oct 2013 20:16:20 +0000
(22:16 +0200)
125 files changed:
Bootloaders/CDC/Descriptors.c
patch
|
blob
|
blame
|
history
Bootloaders/CDC/Descriptors.h
patch
|
blob
|
blame
|
history
Bootloaders/DFU/BootloaderDFU.h
patch
|
blob
|
blame
|
history
Bootloaders/DFU/Descriptors.c
patch
|
blob
|
blame
|
history
Bootloaders/DFU/Descriptors.h
patch
|
blob
|
blame
|
history
Bootloaders/HID/Descriptors.c
patch
|
blob
|
blame
|
history
Bootloaders/HID/Descriptors.h
patch
|
blob
|
blame
|
history
Bootloaders/MassStorage/BootloaderMassStorage.c
patch
|
blob
|
blame
|
history
Bootloaders/MassStorage/Descriptors.c
patch
|
blob
|
blame
|
history
Bootloaders/MassStorage/Descriptors.h
patch
|
blob
|
blame
|
history
Bootloaders/Printer/BootloaderPrinter.c
patch
|
blob
|
blame
|
history
Bootloaders/Printer/Descriptors.c
patch
|
blob
|
blame
|
history
Bootloaders/Printer/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/AudioInput/AudioInput.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/AudioInput/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/AudioInput/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/AudioOutput/AudioOutput.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/AudioOutput/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/AudioOutput/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/DualVirtualSerial/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/DualVirtualSerial/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/GenericHID/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/GenericHID/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/GenericHID/GenericHID.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/Joystick/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/Joystick/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/Joystick/Joystick.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/Keyboard/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/Keyboard/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/Keyboard/Keyboard.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/KeyboardMouse/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/KeyboardMouse/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/KeyboardMouseMultiReport/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/KeyboardMouseMultiReport/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/MIDI/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/MIDI/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/MIDI/MIDI.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/MassStorage/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/MassStorage/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/MassStorage/MassStorage.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/MassStorageKeyboard/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/MassStorageKeyboard/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/Mouse/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/Mouse/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/Mouse/Mouse.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/RNDISEthernet/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/RNDISEthernet/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/VirtualSerial/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/VirtualSerial/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/VirtualSerialMassStorage/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/VirtualSerialMassStorage/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c
patch
|
blob
|
blame
|
history
Demos/Device/Incomplete/TestAndMeasurement/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/Device/Incomplete/TestAndMeasurement/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/AudioInput/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/AudioInput/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/AudioOutput/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/AudioOutput/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/DualVirtualSerial/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/DualVirtualSerial/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/GenericHID/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/GenericHID/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/Joystick/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/Joystick/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/Keyboard/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/Keyboard/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/KeyboardMouse/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/KeyboardMouse/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/MIDI/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/MIDI/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/MassStorage/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/MassStorage/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/Mouse/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/Mouse/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/RNDISEthernet/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/RNDISEthernet/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/VirtualSerial/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/VirtualSerial/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/DualRole/ClassDriver/MouseHostDevice/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/DualRole/ClassDriver/MouseHostDevice/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/DualRole/ClassDriver/MouseHostDevice/DeviceFunctions.c
patch
|
blob
|
blame
|
history
Projects/AVRISP-MKII/AVRISPDescriptors.c
patch
|
blob
|
blame
|
history
Projects/AVRISP-MKII/AVRISPDescriptors.h
patch
|
blob
|
blame
|
history
Projects/Benito/Benito.c
patch
|
blob
|
blame
|
history
Projects/Benito/Descriptors.c
patch
|
blob
|
blame
|
history
Projects/Benito/Descriptors.h
patch
|
blob
|
blame
|
history
Projects/LEDNotifier/Descriptors.c
patch
|
blob
|
blame
|
history
Projects/LEDNotifier/Descriptors.h
patch
|
blob
|
blame
|
history
Projects/LEDNotifier/LEDNotifier.c
patch
|
blob
|
blame
|
history
Projects/MIDIToneGenerator/Descriptors.c
patch
|
blob
|
blame
|
history
Projects/MIDIToneGenerator/Descriptors.h
patch
|
blob
|
blame
|
history
Projects/MIDIToneGenerator/MIDIToneGenerator.c
patch
|
blob
|
blame
|
history
Projects/Magstripe/Descriptors.c
patch
|
blob
|
blame
|
history
Projects/Magstripe/Descriptors.h
patch
|
blob
|
blame
|
history
Projects/Magstripe/Magstripe.c
patch
|
blob
|
blame
|
history
Projects/MediaController/Descriptors.c
patch
|
blob
|
blame
|
history
Projects/MediaController/Descriptors.h
patch
|
blob
|
blame
|
history
Projects/MediaController/MediaController.c
patch
|
blob
|
blame
|
history
Projects/RelayBoard/Descriptors.c
patch
|
blob
|
blame
|
history
Projects/RelayBoard/Descriptors.h
patch
|
blob
|
blame
|
history
Projects/SerialToLCD/Descriptors.c
patch
|
blob
|
blame
|
history
Projects/SerialToLCD/Descriptors.h
patch
|
blob
|
blame
|
history
Projects/SerialToLCD/SerialToLCD.c
patch
|
blob
|
blame
|
history
Projects/SerialToLCD/SerialToLCD.h
patch
|
blob
|
blame
|
history
Projects/TempDataLogger/Descriptors.c
patch
|
blob
|
blame
|
history
Projects/TempDataLogger/Descriptors.h
patch
|
blob
|
blame
|
history
Projects/TempDataLogger/TempDataLogger.c
patch
|
blob
|
blame
|
history
Projects/USBtoSerial/Descriptors.c
patch
|
blob
|
blame
|
history
Projects/USBtoSerial/Descriptors.h
patch
|
blob
|
blame
|
history
Projects/USBtoSerial/USBtoSerial.c
patch
|
blob
|
blame
|
history
Projects/Webserver/Descriptors.c
patch
|
blob
|
blame
|
history
Projects/Webserver/Descriptors.h
patch
|
blob
|
blame
|
history
Projects/Webserver/USBDeviceMode.c
patch
|
blob
|
blame
|
history
Projects/XPLAINBridge/USARTDescriptors.c
patch
|
blob
|
blame
|
history
Projects/XPLAINBridge/USARTDescriptors.h
patch
|
blob
|
blame
|
history
Projects/XPLAINBridge/XPLAINBridge.c
patch
|
blob
|
blame
|
history
diff --git
a/Bootloaders/CDC/Descriptors.c
b/Bootloaders/CDC/Descriptors.c
index
bbf4e76
..
2b85b01
100644
(file)
--- a/
Bootloaders/CDC/Descriptors.c
+++ b/
Bootloaders/CDC/Descriptors.c
@@
-90,7
+90,7
@@
const USB_Descriptor_Configuration_t ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_CDC_CCI
,
.AlternateSetting = 0,
.TotalEndpoints = 1,
.AlternateSetting = 0,
.TotalEndpoints = 1,
@@
-141,7
+141,7
@@
const USB_Descriptor_Configuration_t ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
1
,
+ .InterfaceNumber =
INTERFACE_ID_CDC_DCI
,
.AlternateSetting = 0,
.TotalEndpoints = 2,
.AlternateSetting = 0,
.TotalEndpoints = 2,
diff --git
a/Bootloaders/CDC/Descriptors.h
b/Bootloaders/CDC/Descriptors.h
index
24d1a39
..
f35a4d1
100644
(file)
--- a/
Bootloaders/CDC/Descriptors.h
+++ b/
Bootloaders/CDC/Descriptors.h
@@
-127,15
+127,25
@@
USB_Descriptor_Endpoint_t CDC_DataInEndpoint;
} USB_Descriptor_Configuration_t;
USB_Descriptor_Endpoint_t CDC_DataInEndpoint;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_CDC_CCI = 0, /**< CDC CCI interface descriptor ID */
+ INTERFACE_ID_CDC_DCI = 1, /**< CDC DCI interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Function Prototypes: */
};
/* Function Prototypes: */
diff --git
a/Bootloaders/DFU/BootloaderDFU.h
b/Bootloaders/DFU/BootloaderDFU.h
index
3d6d906
..
949f7e8
100644
(file)
--- a/
Bootloaders/DFU/BootloaderDFU.h
+++ b/
Bootloaders/DFU/BootloaderDFU.h
@@
-170,7
+170,7
@@
dfuMANIFEST = 7,
dfuMANIFEST_WAIT_RESET = 8,
dfuUPLOAD_IDLE = 9,
dfuMANIFEST = 7,
dfuMANIFEST_WAIT_RESET = 8,
dfuUPLOAD_IDLE = 9,
- dfuERROR
= 10
+ dfuERROR = 10
};
/** DFU command status error codes. Refer to the DFU class specification for information on each error code. */
};
/** DFU command status error codes. Refer to the DFU class specification for information on each error code. */
@@
-191,7
+191,7
@@
errUSBR = 12,
errPOR = 13,
errUNKNOWN = 14,
errUSBR = 12,
errPOR = 13,
errUNKNOWN = 14,
- errSTALLEDPKT = 15
+ errSTALLEDPKT = 15
};
/* Function Prototypes: */
};
/* Function Prototypes: */
diff --git
a/Bootloaders/DFU/Descriptors.c
b/Bootloaders/DFU/Descriptors.c
index
5901dad
..
9cd74cf
100644
(file)
--- a/
Bootloaders/DFU/Descriptors.c
+++ b/
Bootloaders/DFU/Descriptors.c
@@
-90,7
+90,7
@@
const USB_Descriptor_Configuration_t ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_DFU
,
.AlternateSetting = 0,
.TotalEndpoints = 0,
.AlternateSetting = 0,
.TotalEndpoints = 0,
diff --git
a/Bootloaders/DFU/Descriptors.h
b/Bootloaders/DFU/Descriptors.h
index
c33e388
..
8bd4679
100644
(file)
--- a/
Bootloaders/DFU/Descriptors.h
+++ b/
Bootloaders/DFU/Descriptors.h
@@
-164,15
+164,24
@@
USB_Descriptor_DFU_Functional_t DFU_Functional;
} USB_Descriptor_Configuration_t;
USB_Descriptor_DFU_Functional_t DFU_Functional;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_DFU = 0, /**< DFU interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Function Prototypes: */
};
/* Function Prototypes: */
diff --git
a/Bootloaders/HID/Descriptors.c
b/Bootloaders/HID/Descriptors.c
index
ac27b76
..
6754d81
100644
(file)
--- a/
Bootloaders/HID/Descriptors.c
+++ b/
Bootloaders/HID/Descriptors.c
@@
-110,7
+110,7
@@
const USB_Descriptor_Configuration_t ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0x00
,
+ .InterfaceNumber =
INTERFACE_ID_Printer
,
.AlternateSetting = 0x00,
.TotalEndpoints = 1,
.AlternateSetting = 0x00,
.TotalEndpoints = 1,
diff --git
a/Bootloaders/HID/Descriptors.h
b/Bootloaders/HID/Descriptors.h
index
4ef30ed
..
c10b516
100644
(file)
--- a/
Bootloaders/HID/Descriptors.h
+++ b/
Bootloaders/HID/Descriptors.h
@@
-51,9
+51,18
@@
// Generic HID Interface
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_HID_t HID_VendorHID;
// Generic HID Interface
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_HID_t HID_VendorHID;
- USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
+
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_Printer = 0, /**< Printer interface descriptor ID */
+ };
+
/* Macros: */
/** Endpoint address of the HID data IN endpoint. */
#define HID_IN_EPADDR (ENDPOINT_DIR_IN | 1)
/* Macros: */
/** Endpoint address of the HID data IN endpoint. */
#define HID_IN_EPADDR (ENDPOINT_DIR_IN | 1)
diff --git
a/Bootloaders/MassStorage/BootloaderMassStorage.c
b/Bootloaders/MassStorage/BootloaderMassStorage.c
index
1b6eda4
..
9d15a81
100644
(file)
--- a/
Bootloaders/MassStorage/BootloaderMassStorage.c
+++ b/
Bootloaders/MassStorage/BootloaderMassStorage.c
@@
-44,7
+44,7
@@
USB_ClassInfo_MS_Device_t Disk_MS_Interface =
{
.Config =
{
{
.Config =
{
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_MassStorage
,
.DataINEndpoint =
{
.Address = MASS_STORAGE_IN_EPADDR,
.DataINEndpoint =
{
.Address = MASS_STORAGE_IN_EPADDR,
diff --git
a/Bootloaders/MassStorage/Descriptors.c
b/Bootloaders/MassStorage/Descriptors.c
index
7ae0a7d
..
1186ea0
100644
(file)
--- a/
Bootloaders/MassStorage/Descriptors.c
+++ b/
Bootloaders/MassStorage/Descriptors.c
@@
-91,7
+91,7
@@
const USB_Descriptor_Configuration_t ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_MassStorage
,
.AlternateSetting = 0,
.TotalEndpoints = 2,
.AlternateSetting = 0,
.TotalEndpoints = 2,
diff --git
a/Bootloaders/MassStorage/Descriptors.h
b/Bootloaders/MassStorage/Descriptors.h
index
2e97c6d
..
ea89cb2
100644
(file)
--- a/
Bootloaders/MassStorage/Descriptors.h
+++ b/
Bootloaders/MassStorage/Descriptors.h
@@
-68,6
+68,16
@@
USB_Descriptor_Endpoint_t MS_DataOutEndpoint;
} USB_Descriptor_Configuration_t;
USB_Descriptor_Endpoint_t MS_DataOutEndpoint;
} USB_Descriptor_Configuration_t;
+
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_MassStorage = 0, /**< Mass storage interface descriptor ID */
+ };
+
/* Function Prototypes: */
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
const uint8_t wIndex,
/* Function Prototypes: */
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
const uint8_t wIndex,
diff --git
a/Bootloaders/Printer/BootloaderPrinter.c
b/Bootloaders/Printer/BootloaderPrinter.c
index
1e60cdd
..
3fec721
100644
(file)
--- a/
Bootloaders/Printer/BootloaderPrinter.c
+++ b/
Bootloaders/Printer/BootloaderPrinter.c
@@
-43,7
+43,7
@@
USB_ClassInfo_PRNT_Device_t TextOnly_Printer_Interface =
{
.Config =
{
{
.Config =
{
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_Printer
,
.DataINEndpoint =
{
.Address = PRINTER_IN_EPADDR,
.DataINEndpoint =
{
.Address = PRINTER_IN_EPADDR,
diff --git
a/Bootloaders/Printer/Descriptors.c
b/Bootloaders/Printer/Descriptors.c
index
0fbb3ae
..
5329afc
100644
(file)
--- a/
Bootloaders/Printer/Descriptors.c
+++ b/
Bootloaders/Printer/Descriptors.c
@@
-91,7
+91,7
@@
const USB_Descriptor_Configuration_t ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_Printer
,
.AlternateSetting = 0,
.TotalEndpoints = 2,
.AlternateSetting = 0,
.TotalEndpoints = 2,
diff --git
a/Bootloaders/Printer/Descriptors.h
b/Bootloaders/Printer/Descriptors.h
index
fba326a
..
d5c9b71
100644
(file)
--- a/
Bootloaders/Printer/Descriptors.h
+++ b/
Bootloaders/Printer/Descriptors.h
@@
-66,15
+66,24
@@
USB_Descriptor_Endpoint_t Printer_DataOutEndpoint;
} USB_Descriptor_Configuration_t;
USB_Descriptor_Endpoint_t Printer_DataOutEndpoint;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each string descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_Printer = 0, /**< Printer interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Function Prototypes: */
};
/* Function Prototypes: */
diff --git
a/Demos/Device/ClassDriver/AudioInput/AudioInput.c
b/Demos/Device/ClassDriver/AudioInput/AudioInput.c
index
9eec39c
..
02bd1e4
100644
(file)
--- a/
Demos/Device/ClassDriver/AudioInput/AudioInput.c
+++ b/
Demos/Device/ClassDriver/AudioInput/AudioInput.c
@@
-44,8
+44,8
@@
USB_ClassInfo_Audio_Device_t Microphone_Audio_Interface =
{
.Config =
{
{
.Config =
{
- .ControlInterfaceNumber =
0
,
- .StreamingInterfaceNumber =
1
,
+ .ControlInterfaceNumber =
INTERFACE_ID_AudioControl
,
+ .StreamingInterfaceNumber =
INTERFACE_ID_AudioStream
,
.DataINEndpoint =
{
.Address = AUDIO_STREAM_EPADDR,
.DataINEndpoint =
{
.Address = AUDIO_STREAM_EPADDR,
diff --git
a/Demos/Device/ClassDriver/AudioInput/Descriptors.c
b/Demos/Device/ClassDriver/AudioInput/Descriptors.c
index
eb4c21c
..
a487387
100644
(file)
--- a/
Demos/Device/ClassDriver/AudioInput/Descriptors.c
+++ b/
Demos/Device/ClassDriver/AudioInput/Descriptors.c
@@
-90,7
+90,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_AudioControl
,
.AlternateSetting = 0,
.TotalEndpoints = 0,
.AlternateSetting = 0,
.TotalEndpoints = 0,
@@
-150,7
+150,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
1
,
+ .InterfaceNumber =
INTERFACE_ID_AudioStream
,
.AlternateSetting = 0,
.TotalEndpoints = 0,
.AlternateSetting = 0,
.TotalEndpoints = 0,
@@
-166,7
+166,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
1
,
+ .InterfaceNumber =
INTERFACE_ID_AudioStream
,
.AlternateSetting = 1,
.TotalEndpoints = 1,
.AlternateSetting = 1,
.TotalEndpoints = 1,
diff --git
a/Demos/Device/ClassDriver/AudioInput/Descriptors.h
b/Demos/Device/ClassDriver/AudioInput/Descriptors.h
index
1bb38ff
..
fe09957
100644
(file)
--- a/
Demos/Device/ClassDriver/AudioInput/Descriptors.h
+++ b/
Demos/Device/ClassDriver/AudioInput/Descriptors.h
@@
-75,15
+75,25
@@
USB_Audio_Descriptor_StreamEndpoint_Spc_t Audio_StreamEndpoint_SPC;
} USB_Descriptor_Configuration_t;
USB_Audio_Descriptor_StreamEndpoint_Spc_t Audio_StreamEndpoint_SPC;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_AudioControl = 0, /**< Audio control interface descriptor ID */
+ INTERFACE_ID_AudioStream = 1, /**< Audio stream interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Function Prototypes: */
};
/* Function Prototypes: */
diff --git
a/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c
b/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c
index
81fd95b
..
432f5e0
100644
(file)
--- a/
Demos/Device/ClassDriver/AudioOutput/AudioOutput.c
+++ b/
Demos/Device/ClassDriver/AudioOutput/AudioOutput.c
@@
-44,8
+44,8
@@
USB_ClassInfo_Audio_Device_t Speaker_Audio_Interface =
{
.Config =
{
{
.Config =
{
- .ControlInterfaceNumber =
0
,
- .StreamingInterfaceNumber =
1
,
+ .ControlInterfaceNumber =
INTERFACE_ID_AudioControl
,
+ .StreamingInterfaceNumber =
INTERFACE_ID_AudioStream
,
.DataOUTEndpoint =
{
.Address = AUDIO_STREAM_EPADDR,
.DataOUTEndpoint =
{
.Address = AUDIO_STREAM_EPADDR,
diff --git
a/Demos/Device/ClassDriver/AudioOutput/Descriptors.c
b/Demos/Device/ClassDriver/AudioOutput/Descriptors.c
index
4ced7a0
..
aec2c5f
100644
(file)
--- a/
Demos/Device/ClassDriver/AudioOutput/Descriptors.c
+++ b/
Demos/Device/ClassDriver/AudioOutput/Descriptors.c
@@
-90,7
+90,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_AudioControl
,
.AlternateSetting = 0,
.TotalEndpoints = 0,
.AlternateSetting = 0,
.TotalEndpoints = 0,
@@
-150,7
+150,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
1
,
+ .InterfaceNumber =
INTERFACE_ID_AudioStream
,
.AlternateSetting = 0,
.TotalEndpoints = 0,
.AlternateSetting = 0,
.TotalEndpoints = 0,
@@
-166,7
+166,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
1
,
+ .InterfaceNumber =
INTERFACE_ID_AudioStream
,
.AlternateSetting = 1,
.TotalEndpoints = 1,
.AlternateSetting = 1,
.TotalEndpoints = 1,
diff --git
a/Demos/Device/ClassDriver/AudioOutput/Descriptors.h
b/Demos/Device/ClassDriver/AudioOutput/Descriptors.h
index
80f1426
..
cb67f02
100644
(file)
--- a/
Demos/Device/ClassDriver/AudioOutput/Descriptors.h
+++ b/
Demos/Device/ClassDriver/AudioOutput/Descriptors.h
@@
-75,15
+75,25
@@
USB_Audio_Descriptor_StreamEndpoint_Spc_t Audio_StreamEndpoint_SPC;
} USB_Descriptor_Configuration_t;
USB_Audio_Descriptor_StreamEndpoint_Spc_t Audio_StreamEndpoint_SPC;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_AudioControl = 0, /**< Audio control interface descriptor ID */
+ INTERFACE_ID_AudioStream = 1, /**< Audio stream interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Function Prototypes: */
};
/* Function Prototypes: */
diff --git
a/Demos/Device/ClassDriver/DualVirtualSerial/Descriptors.c
b/Demos/Device/ClassDriver/DualVirtualSerial/Descriptors.c
index
d0992de
..
2452318
100644
(file)
--- a/
Demos/Device/ClassDriver/DualVirtualSerial/Descriptors.c
+++ b/
Demos/Device/ClassDriver/DualVirtualSerial/Descriptors.c
@@
-105,7
+105,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_CDC1_CCI
,
.AlternateSetting = 0,
.TotalEndpoints = 1,
.AlternateSetting = 0,
.TotalEndpoints = 1,
@@
-156,7
+156,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
1
,
+ .InterfaceNumber =
INTERFACE_ID_CDC1_DCI
,
.AlternateSetting = 0,
.TotalEndpoints = 2,
.AlternateSetting = 0,
.TotalEndpoints = 2,
@@
-206,7
+206,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
2
,
+ .InterfaceNumber =
INTERFACE_ID_CDC2_CCI
,
.AlternateSetting = 0,
.TotalEndpoints = 1,
.AlternateSetting = 0,
.TotalEndpoints = 1,
@@
-257,7
+257,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
3
,
+ .InterfaceNumber =
INTERFACE_ID_CDC2_DCI
,
.AlternateSetting = 0,
.TotalEndpoints = 2,
.AlternateSetting = 0,
.TotalEndpoints = 2,
diff --git
a/Demos/Device/ClassDriver/DualVirtualSerial/Descriptors.h
b/Demos/Device/ClassDriver/DualVirtualSerial/Descriptors.h
index
1105ab7
..
9817026
100644
(file)
--- a/
Demos/Device/ClassDriver/DualVirtualSerial/Descriptors.h
+++ b/
Demos/Device/ClassDriver/DualVirtualSerial/Descriptors.h
@@
-102,15
+102,27
@@
USB_Descriptor_Endpoint_t CDC2_DataInEndpoint;
} USB_Descriptor_Configuration_t;
USB_Descriptor_Endpoint_t CDC2_DataInEndpoint;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_CDC1_CCI = 0, /**< CDC1 CCI interface descriptor ID */
+ INTERFACE_ID_CDC1_DCI = 1, /**< CDC1 DCI interface descriptor ID */
+ INTERFACE_ID_CDC2_CCI = 2, /**< CDC2 CCI interface descriptor ID */
+ INTERFACE_ID_CDC2_DCI = 3, /**< CDC2 DCI interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Function Prototypes: */
};
/* Function Prototypes: */
diff --git
a/Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.c
b/Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.c
index
eaba618
..
070ebc7
100644
(file)
--- a/
Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.c
+++ b/
Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.c
@@
-45,7
+45,7
@@
USB_ClassInfo_CDC_Device_t VirtualSerial1_CDC_Interface =
{
.Config =
{
{
.Config =
{
- .ControlInterfaceNumber =
0
,
+ .ControlInterfaceNumber =
INTERFACE_ID_CDC1_CCI
,
.DataINEndpoint =
{
.Address = CDC1_TX_EPADDR,
.DataINEndpoint =
{
.Address = CDC1_TX_EPADDR,
@@
-76,7
+76,7
@@
USB_ClassInfo_CDC_Device_t VirtualSerial2_CDC_Interface =
{
.Config =
{
{
.Config =
{
- .ControlInterfaceNumber =
2
,
+ .ControlInterfaceNumber =
INTERFACE_ID_CDC2_CCI
,
.DataINEndpoint =
{
.Address = CDC2_TX_EPADDR,
.DataINEndpoint =
{
.Address = CDC2_TX_EPADDR,
diff --git
a/Demos/Device/ClassDriver/GenericHID/Descriptors.c
b/Demos/Device/ClassDriver/GenericHID/Descriptors.c
index
57c3502
..
b070d86
100644
(file)
--- a/
Demos/Device/ClassDriver/GenericHID/Descriptors.c
+++ b/
Demos/Device/ClassDriver/GenericHID/Descriptors.c
@@
-108,7
+108,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0x00
,
+ .InterfaceNumber =
INTERFACE_ID_GenericHID
,
.AlternateSetting = 0x00,
.TotalEndpoints = 1,
.AlternateSetting = 0x00,
.TotalEndpoints = 1,
diff --git
a/Demos/Device/ClassDriver/GenericHID/Descriptors.h
b/Demos/Device/ClassDriver/GenericHID/Descriptors.h
index
b598e98
..
4500f2c
100644
(file)
--- a/
Demos/Device/ClassDriver/GenericHID/Descriptors.h
+++ b/
Demos/Device/ClassDriver/GenericHID/Descriptors.h
@@
-55,18
+55,27
@@
// Generic HID Interface
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_HID_t HID_GenericHID;
// Generic HID Interface
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_HID_t HID_GenericHID;
- USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
+
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_GenericHID = 0, /**< GenericHID interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Macros: */
};
/* Macros: */
diff --git
a/Demos/Device/ClassDriver/GenericHID/GenericHID.c
b/Demos/Device/ClassDriver/GenericHID/GenericHID.c
index
182aa5a
..
8f5b861
100644
(file)
--- a/
Demos/Device/ClassDriver/GenericHID/GenericHID.c
+++ b/
Demos/Device/ClassDriver/GenericHID/GenericHID.c
@@
-47,7
+47,7
@@
USB_ClassInfo_HID_Device_t Generic_HID_Interface =
{
.Config =
{
{
.Config =
{
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_GenericHID
,
.ReportINEndpoint =
{
.Address = GENERIC_IN_EPADDR,
.ReportINEndpoint =
{
.Address = GENERIC_IN_EPADDR,
diff --git
a/Demos/Device/ClassDriver/Joystick/Descriptors.c
b/Demos/Device/ClassDriver/Joystick/Descriptors.c
index
8a6ef20
..
2d41652
100644
(file)
--- a/
Demos/Device/ClassDriver/Joystick/Descriptors.c
+++ b/
Demos/Device/ClassDriver/Joystick/Descriptors.c
@@
-108,7
+108,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0x00
,
+ .InterfaceNumber =
INTERFACE_ID_Joystick
,
.AlternateSetting = 0x00,
.TotalEndpoints = 1,
.AlternateSetting = 0x00,
.TotalEndpoints = 1,
diff --git
a/Demos/Device/ClassDriver/Joystick/Descriptors.h
b/Demos/Device/ClassDriver/Joystick/Descriptors.h
index
89c0584
..
839cd28
100644
(file)
--- a/
Demos/Device/ClassDriver/Joystick/Descriptors.h
+++ b/
Demos/Device/ClassDriver/Joystick/Descriptors.h
@@
-56,15
+56,24
@@
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_Joystick = 0, /**< Joystick interface desciptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Macros: */
};
/* Macros: */
diff --git
a/Demos/Device/ClassDriver/Joystick/Joystick.c
b/Demos/Device/ClassDriver/Joystick/Joystick.c
index
809c410
..
bbe8558
100644
(file)
--- a/
Demos/Device/ClassDriver/Joystick/Joystick.c
+++ b/
Demos/Device/ClassDriver/Joystick/Joystick.c
@@
-47,7
+47,7
@@
USB_ClassInfo_HID_Device_t Joystick_HID_Interface =
{
.Config =
{
{
.Config =
{
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_Joystick
,
.ReportINEndpoint =
{
.Address = JOYSTICK_EPADDR,
.ReportINEndpoint =
{
.Address = JOYSTICK_EPADDR,
diff --git
a/Demos/Device/ClassDriver/Keyboard/Descriptors.c
b/Demos/Device/ClassDriver/Keyboard/Descriptors.c
index
f40e3b9
..
4340ec6
100644
(file)
--- a/
Demos/Device/ClassDriver/Keyboard/Descriptors.c
+++ b/
Demos/Device/ClassDriver/Keyboard/Descriptors.c
@@
-104,7
+104,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0x00
,
+ .InterfaceNumber =
INTERFACE_ID_Keyboard
,
.AlternateSetting = 0x00,
.TotalEndpoints = 1,
.AlternateSetting = 0x00,
.TotalEndpoints = 1,
diff --git
a/Demos/Device/ClassDriver/Keyboard/Descriptors.h
b/Demos/Device/ClassDriver/Keyboard/Descriptors.h
index
abaf9c6
..
ce029bb
100644
(file)
--- a/
Demos/Device/ClassDriver/Keyboard/Descriptors.h
+++ b/
Demos/Device/ClassDriver/Keyboard/Descriptors.h
@@
-56,15
+56,24
@@
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_Keyboard = 0, /**< Keyboard interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Macros: */
};
/* Macros: */
diff --git
a/Demos/Device/ClassDriver/Keyboard/Keyboard.c
b/Demos/Device/ClassDriver/Keyboard/Keyboard.c
index
b3cc67e
..
68e3fbe
100644
(file)
--- a/
Demos/Device/ClassDriver/Keyboard/Keyboard.c
+++ b/
Demos/Device/ClassDriver/Keyboard/Keyboard.c
@@
-47,7
+47,7
@@
USB_ClassInfo_HID_Device_t Keyboard_HID_Interface =
{
.Config =
{
{
.Config =
{
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_Keyboard
,
.ReportINEndpoint =
{
.Address = KEYBOARD_EPADDR,
.ReportINEndpoint =
{
.Address = KEYBOARD_EPADDR,
diff --git
a/Demos/Device/ClassDriver/KeyboardMouse/Descriptors.c
b/Demos/Device/ClassDriver/KeyboardMouse/Descriptors.c
index
c3b2e2c
..
0d350c7
100644
(file)
--- a/
Demos/Device/ClassDriver/KeyboardMouse/Descriptors.c
+++ b/
Demos/Device/ClassDriver/KeyboardMouse/Descriptors.c
@@
-120,7
+120,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0x00
,
+ .InterfaceNumber =
INTERFACE_ID_Keyboard
,
.AlternateSetting = 0x00,
.TotalEndpoints = 1,
.AlternateSetting = 0x00,
.TotalEndpoints = 1,
@@
-157,7
+157,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0x01
,
+ .InterfaceNumber =
INTERFACE_ID_Mouse
,
.AlternateSetting = 0x00,
.TotalEndpoints = 1,
.AlternateSetting = 0x00,
.TotalEndpoints = 1,
@@
-269,28
+269,30
@@
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
break;
case HID_DTYPE_HID:
break;
case HID_DTYPE_HID:
-
if (!(wIndex)
)
+
switch (wIndex
)
{
{
- Address = &ConfigurationDescriptor.HID1_KeyboardHID;
- Size = sizeof(USB_HID_Descriptor_HID_t);
- }
- else
- {
- Address = &ConfigurationDescriptor.HID2_MouseHID;
- Size = sizeof(USB_HID_Descriptor_HID_t);
+ case INTERFACE_ID_Keyboard:
+ Address = &ConfigurationDescriptor.HID1_KeyboardHID;
+ Size = sizeof(USB_HID_Descriptor_HID_t);
+ break;
+ case INTERFACE_ID_Mouse:
+ Address = &ConfigurationDescriptor.HID2_MouseHID;
+ Size = sizeof(USB_HID_Descriptor_HID_t);
+ break;
}
break;
case HID_DTYPE_Report:
}
break;
case HID_DTYPE_Report:
-
if (!(wIndex)
)
+
switch (wIndex
)
{
{
- Address = &KeyboardReport;
- Size = sizeof(KeyboardReport);
- }
- else
- {
- Address = &MouseReport;
- Size = sizeof(MouseReport);
+ case INTERFACE_ID_Keyboard:
+ Address = &KeyboardReport;
+ Size = sizeof(KeyboardReport);
+ break;
+ case INTERFACE_ID_Mouse:
+ Address = &MouseReport;
+ Size = sizeof(MouseReport);
+ break;
}
break;
}
break;
diff --git
a/Demos/Device/ClassDriver/KeyboardMouse/Descriptors.h
b/Demos/Device/ClassDriver/KeyboardMouse/Descriptors.h
index
27120eb
..
1a45f74
100644
(file)
--- a/
Demos/Device/ClassDriver/KeyboardMouse/Descriptors.h
+++ b/
Demos/Device/ClassDriver/KeyboardMouse/Descriptors.h
@@
-61,15
+61,25
@@
USB_Descriptor_Endpoint_t HID2_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
USB_Descriptor_Endpoint_t HID2_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_Keyboard = 0, /**< Keyboard interface descriptor ID */
+ INTERFACE_ID_Mouse = 1, /**< Mouse interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Macros: */
};
/* Macros: */
diff --git
a/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c
b/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c
index
f663f16
..
789fc21
100644
(file)
--- a/
Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c
+++ b/
Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c
@@
-51,7
+51,7
@@
USB_ClassInfo_HID_Device_t Keyboard_HID_Interface =
{
.Config =
{
{
.Config =
{
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_Keyboard
,
.ReportINEndpoint =
{
.Address = KEYBOARD_IN_EPADDR,
.ReportINEndpoint =
{
.Address = KEYBOARD_IN_EPADDR,
@@
-72,7
+72,7
@@
USB_ClassInfo_HID_Device_t Mouse_HID_Interface =
{
.Config =
{
{
.Config =
{
- .InterfaceNumber =
1
,
+ .InterfaceNumber =
INTERFACE_ID_Mouse
,
.ReportINEndpoint =
{
.Address = MOUSE_IN_EPADDR,
.ReportINEndpoint =
{
.Address = MOUSE_IN_EPADDR,
diff --git
a/Demos/Device/ClassDriver/KeyboardMouseMultiReport/Descriptors.c
b/Demos/Device/ClassDriver/KeyboardMouseMultiReport/Descriptors.c
index
a361473
..
477cad0
100644
(file)
--- a/
Demos/Device/ClassDriver/KeyboardMouseMultiReport/Descriptors.c
+++ b/
Demos/Device/ClassDriver/KeyboardMouseMultiReport/Descriptors.c
@@
-167,7
+167,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0x00
,
+ .InterfaceNumber =
INTERFACE_ID_KeyboardAndMouse
,
.AlternateSetting = 0x00,
.TotalEndpoints = 1,
.AlternateSetting = 0x00,
.TotalEndpoints = 1,
diff --git
a/Demos/Device/ClassDriver/KeyboardMouseMultiReport/Descriptors.h
b/Demos/Device/ClassDriver/KeyboardMouseMultiReport/Descriptors.h
index
a47d185
..
f5d68be
100644
(file)
--- a/
Demos/Device/ClassDriver/KeyboardMouseMultiReport/Descriptors.h
+++ b/
Demos/Device/ClassDriver/KeyboardMouseMultiReport/Descriptors.h
@@
-56,15
+56,24
@@
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_KeyboardAndMouse = 0, /**< Combined keyboard and mouse interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Macros: */
};
/* Macros: */
diff --git
a/Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.c
b/Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.c
index
f15d134
..
0ec8788
100644
(file)
--- a/
Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.c
+++ b/
Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.c
@@
-47,7
+47,7
@@
USB_ClassInfo_HID_Device_t Device_HID_Interface =
{
.Config =
{
{
.Config =
{
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_KeyboardAndMouse
,
.ReportINEndpoint =
{
.Address = HID_IN_EPADDR,
.ReportINEndpoint =
{
.Address = HID_IN_EPADDR,
diff --git
a/Demos/Device/ClassDriver/MIDI/Descriptors.c
b/Demos/Device/ClassDriver/MIDI/Descriptors.c
index
5413f27
..
746bcc4
100644
(file)
--- a/
Demos/Device/ClassDriver/MIDI/Descriptors.c
+++ b/
Demos/Device/ClassDriver/MIDI/Descriptors.c
@@
-90,7
+90,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_MidiAudioControl
,
.AlternateSetting = 0,
.TotalEndpoints = 0,
.AlternateSetting = 0,
.TotalEndpoints = 0,
@@
-118,7
+118,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
1
,
+ .InterfaceNumber =
INTERFACE_ID_MidiAudioStreaming
,
.AlternateSetting = 0,
.TotalEndpoints = 2,
.AlternateSetting = 0,
.TotalEndpoints = 2,
diff --git
a/Demos/Device/ClassDriver/MIDI/Descriptors.h
b/Demos/Device/ClassDriver/MIDI/Descriptors.h
index
92c6c38
..
d6f230a
100644
(file)
--- a/
Demos/Device/ClassDriver/MIDI/Descriptors.h
+++ b/
Demos/Device/ClassDriver/MIDI/Descriptors.h
@@
-77,15
+77,25
@@
USB_MIDI_Descriptor_Jack_Endpoint_t MIDI_Out_Jack_Endpoint_SPC;
} USB_Descriptor_Configuration_t;
USB_MIDI_Descriptor_Jack_Endpoint_t MIDI_Out_Jack_Endpoint_SPC;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_MidiAudioControl = 0, /**< MIDI audio control interface descriptor ID */
+ INTERFACE_ID_MidiAudioStreaming = 1, /**< MIDI audio streaming interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Function Prototypes: */
};
/* Function Prototypes: */
diff --git
a/Demos/Device/ClassDriver/MIDI/MIDI.c
b/Demos/Device/ClassDriver/MIDI/MIDI.c
index
bec4428
..
79a8317
100644
(file)
--- a/
Demos/Device/ClassDriver/MIDI/MIDI.c
+++ b/
Demos/Device/ClassDriver/MIDI/MIDI.c
@@
-44,7
+44,7
@@
USB_ClassInfo_MIDI_Device_t Keyboard_MIDI_Interface =
{
.Config =
{
{
.Config =
{
- .StreamingInterfaceNumber =
1
,
+ .StreamingInterfaceNumber =
INTERFACE_ID_MidiAudioStreaming
,
.DataINEndpoint =
{
.Address = MIDI_STREAM_IN_EPADDR,
.DataINEndpoint =
{
.Address = MIDI_STREAM_IN_EPADDR,
diff --git
a/Demos/Device/ClassDriver/MassStorage/Descriptors.c
b/Demos/Device/ClassDriver/MassStorage/Descriptors.c
index
d069bce
..
2be052b
100644
(file)
--- a/
Demos/Device/ClassDriver/MassStorage/Descriptors.c
+++ b/
Demos/Device/ClassDriver/MassStorage/Descriptors.c
@@
-91,7
+91,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_MassStorage
,
.AlternateSetting = 0,
.TotalEndpoints = 2,
.AlternateSetting = 0,
.TotalEndpoints = 2,
diff --git
a/Demos/Device/ClassDriver/MassStorage/Descriptors.h
b/Demos/Device/ClassDriver/MassStorage/Descriptors.h
index
3b9a96c
..
674bd29
100644
(file)
--- a/
Demos/Device/ClassDriver/MassStorage/Descriptors.h
+++ b/
Demos/Device/ClassDriver/MassStorage/Descriptors.h
@@
-68,15
+68,24
@@
USB_Descriptor_Endpoint_t MS_DataOutEndpoint;
} USB_Descriptor_Configuration_t;
USB_Descriptor_Endpoint_t MS_DataOutEndpoint;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_MassStorage = 0, /**< Mass storage interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Function Prototypes: */
};
/* Function Prototypes: */
diff --git
a/Demos/Device/ClassDriver/MassStorage/MassStorage.c
b/Demos/Device/ClassDriver/MassStorage/MassStorage.c
index
82f02b9
..
32b4c26
100644
(file)
--- a/
Demos/Device/ClassDriver/MassStorage/MassStorage.c
+++ b/
Demos/Device/ClassDriver/MassStorage/MassStorage.c
@@
-44,7
+44,7
@@
USB_ClassInfo_MS_Device_t Disk_MS_Interface =
{
.Config =
{
{
.Config =
{
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_MassStorage
,
.DataINEndpoint =
{
.Address = MASS_STORAGE_IN_EPADDR,
.DataINEndpoint =
{
.Address = MASS_STORAGE_IN_EPADDR,
diff --git
a/Demos/Device/ClassDriver/MassStorageKeyboard/Descriptors.c
b/Demos/Device/ClassDriver/MassStorageKeyboard/Descriptors.c
index
2209d51
..
5749b36
100644
(file)
--- a/
Demos/Device/ClassDriver/MassStorageKeyboard/Descriptors.c
+++ b/
Demos/Device/ClassDriver/MassStorageKeyboard/Descriptors.c
@@
-106,7
+106,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_MassStorage
,
.AlternateSetting = 0,
.TotalEndpoints = 2,
.AlternateSetting = 0,
.TotalEndpoints = 2,
@@
-142,7
+142,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
1
,
+ .InterfaceNumber =
INTERFACE_ID_Keyboard
,
.AlternateSetting = 0,
.TotalEndpoints = 1,
.AlternateSetting = 0,
.TotalEndpoints = 1,
diff --git
a/Demos/Device/ClassDriver/MassStorageKeyboard/Descriptors.h
b/Demos/Device/ClassDriver/MassStorageKeyboard/Descriptors.h
index
2b70e11
..
606e47d
100644
(file)
--- a/
Demos/Device/ClassDriver/MassStorageKeyboard/Descriptors.h
+++ b/
Demos/Device/ClassDriver/MassStorageKeyboard/Descriptors.h
@@
-80,15
+80,25
@@
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_MassStorage = 0, /**< Mass storage interface descriptor ID */
+ INTERFACE_ID_Keyboard = 1, /**< Keyboard interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Function Prototypes: */
};
/* Function Prototypes: */
diff --git
a/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c
b/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c
index
2ed3f41
..
8ed0d3b
100644
(file)
--- a/
Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c
+++ b/
Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c
@@
-45,7
+45,7
@@
USB_ClassInfo_MS_Device_t Disk_MS_Interface =
{
.Config =
{
{
.Config =
{
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_MassStorage
,
.DataINEndpoint =
{
.Address = MASS_STORAGE_IN_EPADDR,
.DataINEndpoint =
{
.Address = MASS_STORAGE_IN_EPADDR,
@@
-73,7
+73,7
@@
USB_ClassInfo_HID_Device_t Keyboard_HID_Interface =
{
.Config =
{
{
.Config =
{
- .InterfaceNumber =
1
,
+ .InterfaceNumber =
INTERFACE_ID_Keyboard
,
.ReportINEndpoint =
{
.Address = KEYBOARD_EPADDR,
.ReportINEndpoint =
{
.Address = KEYBOARD_EPADDR,
diff --git
a/Demos/Device/ClassDriver/Mouse/Descriptors.c
b/Demos/Device/ClassDriver/Mouse/Descriptors.c
index
c21a8cc
..
09278a7
100644
(file)
--- a/
Demos/Device/ClassDriver/Mouse/Descriptors.c
+++ b/
Demos/Device/ClassDriver/Mouse/Descriptors.c
@@
-109,7
+109,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0x00
,
+ .InterfaceNumber =
INTERFACE_ID_Mouse
,
.AlternateSetting = 0x00,
.TotalEndpoints = 1,
.AlternateSetting = 0x00,
.TotalEndpoints = 1,
diff --git
a/Demos/Device/ClassDriver/Mouse/Descriptors.h
b/Demos/Device/ClassDriver/Mouse/Descriptors.h
index
a5380a1
..
3b637e2
100644
(file)
--- a/
Demos/Device/ClassDriver/Mouse/Descriptors.h
+++ b/
Demos/Device/ClassDriver/Mouse/Descriptors.h
@@
-60,18
+60,27
@@
// Mouse HID Interface
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_HID_t HID_MouseHID;
// Mouse HID Interface
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_HID_t HID_MouseHID;
- USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
+
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_Mouse = 0, /**< Mouse interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Function Prototypes: */
};
/* Function Prototypes: */
diff --git
a/Demos/Device/ClassDriver/Mouse/Mouse.c
b/Demos/Device/ClassDriver/Mouse/Mouse.c
index
8432b65
..
1e8f7ab
100644
(file)
--- a/
Demos/Device/ClassDriver/Mouse/Mouse.c
+++ b/
Demos/Device/ClassDriver/Mouse/Mouse.c
@@
-47,7
+47,7
@@
USB_ClassInfo_HID_Device_t Mouse_HID_Interface =
{
.Config =
{
{
.Config =
{
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_Mouse
,
.ReportINEndpoint =
{
.Address = MOUSE_EPADDR,
.ReportINEndpoint =
{
.Address = MOUSE_EPADDR,
diff --git
a/Demos/Device/ClassDriver/RNDISEthernet/Descriptors.c
b/Demos/Device/ClassDriver/RNDISEthernet/Descriptors.c
index
ca70633
..
7474e54
100644
(file)
--- a/
Demos/Device/ClassDriver/RNDISEthernet/Descriptors.c
+++ b/
Demos/Device/ClassDriver/RNDISEthernet/Descriptors.c
@@
-90,7
+90,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_CDC_CCI
,
.AlternateSetting = 0,
.TotalEndpoints = 1,
.AlternateSetting = 0,
.TotalEndpoints = 1,
@@
-141,7
+141,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
1
,
+ .InterfaceNumber =
INTERFACE_ID_CDC_DCI
,
.AlternateSetting = 0,
.TotalEndpoints = 2,
.AlternateSetting = 0,
.TotalEndpoints = 2,
diff --git
a/Demos/Device/ClassDriver/RNDISEthernet/Descriptors.h
b/Demos/Device/ClassDriver/RNDISEthernet/Descriptors.h
index
be50157
..
c782a5e
100644
(file)
--- a/
Demos/Device/ClassDriver/RNDISEthernet/Descriptors.h
+++ b/
Demos/Device/ClassDriver/RNDISEthernet/Descriptors.h
@@
-81,15
+81,25
@@
USB_Descriptor_Endpoint_t RNDIS_DataInEndpoint;
} USB_Descriptor_Configuration_t;
USB_Descriptor_Endpoint_t RNDIS_DataInEndpoint;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_CDC_CCI = 0, /**< CDC CCI interface descriptor ID */
+ INTERFACE_ID_CDC_DCI = 1, /**< CDC DCI interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Function Prototypes: */
};
/* Function Prototypes: */
diff --git
a/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c
b/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c
index
54d5511
..
e38dfec
100644
(file)
--- a/
Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c
+++ b/
Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c
@@
-44,7
+44,7
@@
USB_ClassInfo_RNDIS_Device_t Ethernet_RNDIS_Interface =
{
.Config =
{
{
.Config =
{
- .ControlInterfaceNumber =
0
,
+ .ControlInterfaceNumber =
INTERFACE_ID_CDC_CCI
,
.DataINEndpoint =
{
.Address = CDC_TX_EPADDR,
.DataINEndpoint =
{
.Address = CDC_TX_EPADDR,
diff --git
a/Demos/Device/ClassDriver/VirtualSerial/Descriptors.c
b/Demos/Device/ClassDriver/VirtualSerial/Descriptors.c
index
9432562
..
33f6337
100644
(file)
--- a/
Demos/Device/ClassDriver/VirtualSerial/Descriptors.c
+++ b/
Demos/Device/ClassDriver/VirtualSerial/Descriptors.c
@@
-91,7
+91,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_CDC_CCI
,
.AlternateSetting = 0,
.TotalEndpoints = 1,
.AlternateSetting = 0,
.TotalEndpoints = 1,
@@
-142,7
+142,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
1
,
+ .InterfaceNumber =
INTERFACE_ID_CDC_DCI
,
.AlternateSetting = 0,
.TotalEndpoints = 2,
.AlternateSetting = 0,
.TotalEndpoints = 2,
diff --git
a/Demos/Device/ClassDriver/VirtualSerial/Descriptors.h
b/Demos/Device/ClassDriver/VirtualSerial/Descriptors.h
index
e2d09b2
..
20caec0
100644
(file)
--- a/
Demos/Device/ClassDriver/VirtualSerial/Descriptors.h
+++ b/
Demos/Device/ClassDriver/VirtualSerial/Descriptors.h
@@
-79,15
+79,25
@@
USB_Descriptor_Endpoint_t CDC_DataInEndpoint;
} USB_Descriptor_Configuration_t;
USB_Descriptor_Endpoint_t CDC_DataInEndpoint;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_CDC_CCI = 0, /**< CDC CCI interface descriptor ID */
+ INTERFACE_ID_CDC_DCI = 1, /**< CDC DCI interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Function Prototypes: */
};
/* Function Prototypes: */
diff --git
a/Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.c
b/Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.c
index
0079acb
..
56b248d
100644
(file)
--- a/
Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.c
+++ b/
Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.c
@@
-44,7
+44,7
@@
USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface =
{
.Config =
{
{
.Config =
{
- .ControlInterfaceNumber =
0
,
+ .ControlInterfaceNumber =
INTERFACE_ID_CDC_CCI
,
.DataINEndpoint =
{
.Address = CDC_TX_EPADDR,
.DataINEndpoint =
{
.Address = CDC_TX_EPADDR,
diff --git
a/Demos/Device/ClassDriver/VirtualSerialMassStorage/Descriptors.c
b/Demos/Device/ClassDriver/VirtualSerialMassStorage/Descriptors.c
index
e41a91a
..
b8a07f4
100644
(file)
--- a/
Demos/Device/ClassDriver/VirtualSerialMassStorage/Descriptors.c
+++ b/
Demos/Device/ClassDriver/VirtualSerialMassStorage/Descriptors.c
@@
-105,7
+105,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_CDC_CCI
,
.AlternateSetting = 0,
.TotalEndpoints = 1,
.AlternateSetting = 0,
.TotalEndpoints = 1,
@@
-156,7
+156,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
1
,
+ .InterfaceNumber =
INTERFACE_ID_CDC_DCI
,
.AlternateSetting = 0,
.TotalEndpoints = 2,
.AlternateSetting = 0,
.TotalEndpoints = 2,
@@
-192,7
+192,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
2
,
+ .InterfaceNumber =
INTERFACE_ID_MassStorage
,
.AlternateSetting = 0,
.TotalEndpoints = 2,
.AlternateSetting = 0,
.TotalEndpoints = 2,
diff --git
a/Demos/Device/ClassDriver/VirtualSerialMassStorage/Descriptors.h
b/Demos/Device/ClassDriver/VirtualSerialMassStorage/Descriptors.h
index
25d31bf
..
ac6e4fa
100644
(file)
--- a/
Demos/Device/ClassDriver/VirtualSerialMassStorage/Descriptors.h
+++ b/
Demos/Device/ClassDriver/VirtualSerialMassStorage/Descriptors.h
@@
-96,15
+96,26
@@
USB_Descriptor_Endpoint_t MS_DataOutEndpoint;
} USB_Descriptor_Configuration_t;
USB_Descriptor_Endpoint_t MS_DataOutEndpoint;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_CDC_CCI = 0, /**< CDC CCI interface descriptor ID */
+ INTERFACE_ID_CDC_DCI = 1, /**< CDC DCI interface descriptor ID */
+ INTERFACE_ID_MassStorage = 2, /**< Mass storage interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Function Prototypes: */
};
/* Function Prototypes: */
diff --git
a/Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.c
b/Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.c
index
03f422b
..
6dc1ab6
100644
(file)
--- a/
Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.c
+++ b/
Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.c
@@
-44,7
+44,7
@@
USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface =
{
.Config =
{
{
.Config =
{
- .ControlInterfaceNumber =
0
,
+ .ControlInterfaceNumber =
INTERFACE_ID_CDC_CCI
,
.DataINEndpoint =
{
.Address = CDC_TX_EPADDR,
.DataINEndpoint =
{
.Address = CDC_TX_EPADDR,
@@
-74,7
+74,7
@@
USB_ClassInfo_MS_Device_t Disk_MS_Interface =
{
.Config =
{
{
.Config =
{
- .InterfaceNumber =
2
,
+ .InterfaceNumber =
INTERFACE_ID_MassStorage
,
.DataINEndpoint =
{
.Address = MASS_STORAGE_IN_EPADDR,
.DataINEndpoint =
{
.Address = MASS_STORAGE_IN_EPADDR,
diff --git
a/Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.c
b/Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.c
index
42c77dd
..
43c849b
100644
(file)
--- a/
Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.c
+++ b/
Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.c
@@
-124,7
+124,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_CDC_CCI
,
.AlternateSetting = 0,
.TotalEndpoints = 1,
.AlternateSetting = 0,
.TotalEndpoints = 1,
@@
-175,7
+175,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
1
,
+ .InterfaceNumber =
INTERFACE_ID_CDC_DCI
,
.AlternateSetting = 0,
.TotalEndpoints = 2,
.AlternateSetting = 0,
.TotalEndpoints = 2,
@@
-211,7
+211,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
2
,
+ .InterfaceNumber =
INTERFACE_ID_Mouse
,
.AlternateSetting = 0,
.TotalEndpoints = 1,
.AlternateSetting = 0,
.TotalEndpoints = 1,
diff --git
a/Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.h
b/Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.h
index
1bce496
..
7ac638b
100644
(file)
--- a/
Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.h
+++ b/
Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.h
@@
-91,15
+91,26
@@
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_CDC_CCI = 0, /**< CDC CCI interface descriptor ID */
+ INTERFACE_ID_CDC_DCI = 1, /**< CDC DCI interface descriptor ID */
+ INTERFACE_ID_Mouse = 2, /**< Mouse interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Function Prototypes: */
};
/* Function Prototypes: */
diff --git
a/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c
b/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c
index
73f9e38
..
d4aba48
100644
(file)
--- a/
Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c
+++ b/
Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c
@@
-44,7
+44,7
@@
USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface =
{
.Config =
{
{
.Config =
{
- .ControlInterfaceNumber =
0
,
+ .ControlInterfaceNumber =
INTERFACE_ID_CDC_CCI
,
.DataINEndpoint =
{
.Address = CDC_TX_EPADDR,
.DataINEndpoint =
{
.Address = CDC_TX_EPADDR,
@@
-77,7
+77,7
@@
USB_ClassInfo_HID_Device_t Mouse_HID_Interface =
{
.Config =
{
{
.Config =
{
- .InterfaceNumber =
2
,
+ .InterfaceNumber =
INTERFACE_ID_Mouse
,
.ReportINEndpoint =
{
.Address = MOUSE_EPADDR,
.ReportINEndpoint =
{
.Address = MOUSE_EPADDR,
diff --git
a/Demos/Device/Incomplete/TestAndMeasurement/Descriptors.c
b/Demos/Device/Incomplete/TestAndMeasurement/Descriptors.c
index
8bf9237
..
6b27db8
100644
(file)
--- a/
Demos/Device/Incomplete/TestAndMeasurement/Descriptors.c
+++ b/
Demos/Device/Incomplete/TestAndMeasurement/Descriptors.c
@@
-92,7
+92,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0x00
,
+ .InterfaceNumber =
INTERFACE_ID_TestAndMeasurement
,
.AlternateSetting = 0x00,
.TotalEndpoints = 3,
.AlternateSetting = 0x00,
.TotalEndpoints = 3,
diff --git
a/Demos/Device/Incomplete/TestAndMeasurement/Descriptors.h
b/Demos/Device/Incomplete/TestAndMeasurement/Descriptors.h
index
9beb3d2
..
0746448
100644
(file)
--- a/
Demos/Device/Incomplete/TestAndMeasurement/Descriptors.h
+++ b/
Demos/Device/Incomplete/TestAndMeasurement/Descriptors.h
@@
-74,15
+74,24
@@
USB_Descriptor_Endpoint_t TM_NotificationEndpoint;
} USB_Descriptor_Configuration_t;
USB_Descriptor_Endpoint_t TM_NotificationEndpoint;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_TestAndMeasurement = 0, /**< Test and measurement interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Function Prototypes: */
};
/* Function Prototypes: */
diff --git
a/Demos/Device/LowLevel/AudioInput/Descriptors.c
b/Demos/Device/LowLevel/AudioInput/Descriptors.c
index
b3490d0
..
444f160
100644
(file)
--- a/
Demos/Device/LowLevel/AudioInput/Descriptors.c
+++ b/
Demos/Device/LowLevel/AudioInput/Descriptors.c
@@
-90,7
+90,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_AudioControl
,
.AlternateSetting = 0,
.TotalEndpoints = 0,
.AlternateSetting = 0,
.TotalEndpoints = 0,
@@
-150,7
+150,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
1
,
+ .InterfaceNumber =
INTERFACE_ID_AudioStream
,
.AlternateSetting = 0,
.TotalEndpoints = 0,
.AlternateSetting = 0,
.TotalEndpoints = 0,
@@
-166,7
+166,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
1
,
+ .InterfaceNumber =
INTERFACE_ID_AudioStream
,
.AlternateSetting = 1,
.TotalEndpoints = 1,
.AlternateSetting = 1,
.TotalEndpoints = 1,
diff --git
a/Demos/Device/LowLevel/AudioInput/Descriptors.h
b/Demos/Device/LowLevel/AudioInput/Descriptors.h
index
a3d3ec3
..
7dbb9aa
100644
(file)
--- a/
Demos/Device/LowLevel/AudioInput/Descriptors.h
+++ b/
Demos/Device/LowLevel/AudioInput/Descriptors.h
@@
-75,15
+75,25
@@
USB_Audio_Descriptor_StreamEndpoint_Spc_t Audio_StreamEndpoint_SPC;
} USB_Descriptor_Configuration_t;
USB_Audio_Descriptor_StreamEndpoint_Spc_t Audio_StreamEndpoint_SPC;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_AudioControl = 0, /**< Audio control interface descriptor ID */
+ INTERFACE_ID_AudioStream = 1, /**< Audio stream interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Function Prototypes: */
};
/* Function Prototypes: */
diff --git
a/Demos/Device/LowLevel/AudioOutput/Descriptors.c
b/Demos/Device/LowLevel/AudioOutput/Descriptors.c
index
43f7175
..
7879c34
100644
(file)
--- a/
Demos/Device/LowLevel/AudioOutput/Descriptors.c
+++ b/
Demos/Device/LowLevel/AudioOutput/Descriptors.c
@@
-90,7
+90,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_AudioControl
,
.AlternateSetting = 0,
.TotalEndpoints = 0,
.AlternateSetting = 0,
.TotalEndpoints = 0,
@@
-150,7
+150,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
1
,
+ .InterfaceNumber =
INTERFACE_ID_AudioStream
,
.AlternateSetting = 0,
.TotalEndpoints = 0,
.AlternateSetting = 0,
.TotalEndpoints = 0,
@@
-166,7
+166,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
1
,
+ .InterfaceNumber =
INTERFACE_ID_AudioStream
,
.AlternateSetting = 1,
.TotalEndpoints = 1,
.AlternateSetting = 1,
.TotalEndpoints = 1,
diff --git
a/Demos/Device/LowLevel/AudioOutput/Descriptors.h
b/Demos/Device/LowLevel/AudioOutput/Descriptors.h
index
b8ae901
..
07d1bec
100644
(file)
--- a/
Demos/Device/LowLevel/AudioOutput/Descriptors.h
+++ b/
Demos/Device/LowLevel/AudioOutput/Descriptors.h
@@
-75,15
+75,25
@@
USB_Audio_Descriptor_StreamEndpoint_Spc_t Audio_StreamEndpoint_SPC;
} USB_Descriptor_Configuration_t;
USB_Audio_Descriptor_StreamEndpoint_Spc_t Audio_StreamEndpoint_SPC;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_AudioControl = 0, /**< Audio control interface descriptor ID */
+ INTERFACE_ID_AudioStream = 1, /**< Audio stream interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Function Prototypes: */
};
/* Function Prototypes: */
diff --git
a/Demos/Device/LowLevel/DualVirtualSerial/Descriptors.c
b/Demos/Device/LowLevel/DualVirtualSerial/Descriptors.c
index
d0992de
..
2452318
100644
(file)
--- a/
Demos/Device/LowLevel/DualVirtualSerial/Descriptors.c
+++ b/
Demos/Device/LowLevel/DualVirtualSerial/Descriptors.c
@@
-105,7
+105,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_CDC1_CCI
,
.AlternateSetting = 0,
.TotalEndpoints = 1,
.AlternateSetting = 0,
.TotalEndpoints = 1,
@@
-156,7
+156,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
1
,
+ .InterfaceNumber =
INTERFACE_ID_CDC1_DCI
,
.AlternateSetting = 0,
.TotalEndpoints = 2,
.AlternateSetting = 0,
.TotalEndpoints = 2,
@@
-206,7
+206,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
2
,
+ .InterfaceNumber =
INTERFACE_ID_CDC2_CCI
,
.AlternateSetting = 0,
.TotalEndpoints = 1,
.AlternateSetting = 0,
.TotalEndpoints = 1,
@@
-257,7
+257,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
3
,
+ .InterfaceNumber =
INTERFACE_ID_CDC2_DCI
,
.AlternateSetting = 0,
.TotalEndpoints = 2,
.AlternateSetting = 0,
.TotalEndpoints = 2,
diff --git
a/Demos/Device/LowLevel/DualVirtualSerial/Descriptors.h
b/Demos/Device/LowLevel/DualVirtualSerial/Descriptors.h
index
a5a87dc
..
dc19cfe
100644
(file)
--- a/
Demos/Device/LowLevel/DualVirtualSerial/Descriptors.h
+++ b/
Demos/Device/LowLevel/DualVirtualSerial/Descriptors.h
@@
-102,15
+102,27
@@
USB_Descriptor_Endpoint_t CDC2_DataInEndpoint;
} USB_Descriptor_Configuration_t;
USB_Descriptor_Endpoint_t CDC2_DataInEndpoint;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_CDC1_CCI = 0, /**< CDC1 CCI interface descriptor ID */
+ INTERFACE_ID_CDC1_DCI = 1, /**< CDC1 DCI interface descriptor ID */
+ INTERFACE_ID_CDC2_CCI = 2, /**< CDC2 CCI interface descriptor ID */
+ INTERFACE_ID_CDC2_DCI = 3, /**< CDC2 DCI interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Function Prototypes: */
};
/* Function Prototypes: */
diff --git
a/Demos/Device/LowLevel/GenericHID/Descriptors.c
b/Demos/Device/LowLevel/GenericHID/Descriptors.c
index
bcbb386
..
2e75360
100644
(file)
--- a/
Demos/Device/LowLevel/GenericHID/Descriptors.c
+++ b/
Demos/Device/LowLevel/GenericHID/Descriptors.c
@@
-116,7
+116,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0x00
,
+ .InterfaceNumber =
INTERFACE_ID_GenericHID
,
.AlternateSetting = 0x00,
.TotalEndpoints = 2,
.AlternateSetting = 0x00,
.TotalEndpoints = 2,
diff --git
a/Demos/Device/LowLevel/GenericHID/Descriptors.h
b/Demos/Device/LowLevel/GenericHID/Descriptors.h
index
8842334
..
c37c68b
100644
(file)
--- a/
Demos/Device/LowLevel/GenericHID/Descriptors.h
+++ b/
Demos/Device/LowLevel/GenericHID/Descriptors.h
@@
-55,19
+55,28
@@
// Generic HID Interface
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_HID_t HID_GenericHID;
// Generic HID Interface
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_HID_t HID_GenericHID;
- USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
- USB_Descriptor_Endpoint_t HID_ReportOUTEndpoint;
+
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
+
USB_Descriptor_Endpoint_t HID_ReportOUTEndpoint;
} USB_Descriptor_Configuration_t;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_GenericHID = 0, /**< GenericHID interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Macros: */
};
/* Macros: */
diff --git
a/Demos/Device/LowLevel/Joystick/Descriptors.c
b/Demos/Device/LowLevel/Joystick/Descriptors.c
index
3762387
..
2f9eb00
100644
(file)
--- a/
Demos/Device/LowLevel/Joystick/Descriptors.c
+++ b/
Demos/Device/LowLevel/Joystick/Descriptors.c
@@
-128,7
+128,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0x00
,
+ .InterfaceNumber =
INTERFACE_ID_Joystick
,
.AlternateSetting = 0x00,
.TotalEndpoints = 1,
.AlternateSetting = 0x00,
.TotalEndpoints = 1,
diff --git
a/Demos/Device/LowLevel/Joystick/Descriptors.h
b/Demos/Device/LowLevel/Joystick/Descriptors.h
index
f06b3ca
..
2600e0c
100644
(file)
--- a/
Demos/Device/LowLevel/Joystick/Descriptors.h
+++ b/
Demos/Device/LowLevel/Joystick/Descriptors.h
@@
-53,18
+53,27
@@
// Joystick HID Interface
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_HID_t HID_JoystickHID;
// Joystick HID Interface
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_HID_t HID_JoystickHID;
- USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
+
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_Joystick = 0, /**< Joystick interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Macros: */
};
/* Macros: */
diff --git
a/Demos/Device/LowLevel/Keyboard/Descriptors.c
b/Demos/Device/LowLevel/Keyboard/Descriptors.c
index
e3da4b6
..
6a644d8
100644
(file)
--- a/
Demos/Device/LowLevel/Keyboard/Descriptors.c
+++ b/
Demos/Device/LowLevel/Keyboard/Descriptors.c
@@
-133,7
+133,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0x00
,
+ .InterfaceNumber =
INTERFACE_ID_Keyboard
,
.AlternateSetting = 0x00,
.TotalEndpoints = 2,
.AlternateSetting = 0x00,
.TotalEndpoints = 2,
diff --git
a/Demos/Device/LowLevel/Keyboard/Descriptors.h
b/Demos/Device/LowLevel/Keyboard/Descriptors.h
index
f9d5424
..
dcd7572
100644
(file)
--- a/
Demos/Device/LowLevel/Keyboard/Descriptors.h
+++ b/
Demos/Device/LowLevel/Keyboard/Descriptors.h
@@
-54,19
+54,28
@@
// Keyboard HID Interface
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_HID_t HID_KeyboardHID;
// 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_ReportOUTEndpoint;
+
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
+
USB_Descriptor_Endpoint_t HID_ReportOUTEndpoint;
} USB_Descriptor_Configuration_t;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_Keyboard = 0, /**< Keyboard interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Macros: */
};
/* Macros: */
diff --git
a/Demos/Device/LowLevel/KeyboardMouse/Descriptors.c
b/Demos/Device/LowLevel/KeyboardMouse/Descriptors.c
index
d45cd59
..
4a339f4
100644
(file)
--- a/
Demos/Device/LowLevel/KeyboardMouse/Descriptors.c
+++ b/
Demos/Device/LowLevel/KeyboardMouse/Descriptors.c
@@
-168,7
+168,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0x00
,
+ .InterfaceNumber =
INTERFACE_ID_Keyboard
,
.AlternateSetting = 0x00,
.TotalEndpoints = 2,
.AlternateSetting = 0x00,
.TotalEndpoints = 2,
@@
-215,7
+215,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0x01
,
+ .InterfaceNumber =
INTERFACE_ID_Mouse
,
.AlternateSetting = 0x00,
.TotalEndpoints = 1,
.AlternateSetting = 0x00,
.TotalEndpoints = 1,
@@
-327,27
+327,29
@@
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
break;
case HID_DTYPE_HID:
break;
case HID_DTYPE_HID:
-
if (!(wIndex)
)
+
switch (wIndex
)
{
{
- Address = &ConfigurationDescriptor.HID1_KeyboardHID;
- Size = sizeof(USB_HID_Descriptor_HID_t);
- }
- else
- {
- Address = &ConfigurationDescriptor.HID2_MouseHID;
- Size = sizeof(USB_HID_Descriptor_HID_t);
+ case (INTERFACE_ID_Keyboard):
+ Address = &ConfigurationDescriptor.HID1_KeyboardHID;
+ Size = sizeof(USB_HID_Descriptor_HID_t);
+ break;
+ case (INTERFACE_ID_Mouse):
+ Address = &ConfigurationDescriptor.HID2_MouseHID;
+ Size = sizeof(USB_HID_Descriptor_HID_t);
+ break;
}
break;
case HID_DTYPE_Report:
}
break;
case HID_DTYPE_Report:
-
if (!(wIndex)
)
+
switch (wIndex
)
{
{
- Address = &KeyboardReport;
- Size = sizeof(KeyboardReport);
- }
- else
- {
- Address = &MouseReport;
- Size = sizeof(MouseReport);
+ case INTERFACE_ID_Keyboard:
+ Address = &KeyboardReport;
+ Size = sizeof(KeyboardReport);
+ break;
+ case INTERFACE_ID_Mouse:
+ Address = &MouseReport;
+ Size = sizeof(MouseReport);
+ break;
}
break;
}
break;
diff --git
a/Demos/Device/LowLevel/KeyboardMouse/Descriptors.h
b/Demos/Device/LowLevel/KeyboardMouse/Descriptors.h
index
6d2543a
..
99f423e
100644
(file)
--- a/
Demos/Device/LowLevel/KeyboardMouse/Descriptors.h
+++ b/
Demos/Device/LowLevel/KeyboardMouse/Descriptors.h
@@
-63,15
+63,25
@@
USB_Descriptor_Endpoint_t HID2_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
USB_Descriptor_Endpoint_t HID2_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_Keyboard = 0, /**< Keyboard interface descriptor ID */
+ INTERFACE_ID_Mouse = 1, /**< Mouse interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Macros: */
};
/* Macros: */
diff --git
a/Demos/Device/LowLevel/MIDI/Descriptors.c
b/Demos/Device/LowLevel/MIDI/Descriptors.c
index
5413f27
..
220d37d
100644
(file)
--- a/
Demos/Device/LowLevel/MIDI/Descriptors.c
+++ b/
Demos/Device/LowLevel/MIDI/Descriptors.c
@@
-90,7
+90,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_AudioControl
,
.AlternateSetting = 0,
.TotalEndpoints = 0,
.AlternateSetting = 0,
.TotalEndpoints = 0,
@@
-118,7
+118,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
1
,
+ .InterfaceNumber =
INTERFACE_ID_AudioStream
,
.AlternateSetting = 0,
.TotalEndpoints = 2,
.AlternateSetting = 0,
.TotalEndpoints = 2,
diff --git
a/Demos/Device/LowLevel/MIDI/Descriptors.h
b/Demos/Device/LowLevel/MIDI/Descriptors.h
index
1572b1c
..
649b2ac
100644
(file)
--- a/
Demos/Device/LowLevel/MIDI/Descriptors.h
+++ b/
Demos/Device/LowLevel/MIDI/Descriptors.h
@@
-77,15
+77,25
@@
USB_MIDI_Descriptor_Jack_Endpoint_t MIDI_Out_Jack_Endpoint_SPC;
} USB_Descriptor_Configuration_t;
USB_MIDI_Descriptor_Jack_Endpoint_t MIDI_Out_Jack_Endpoint_SPC;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_AudioControl = 0, /**< Audio control interface descriptor ID */
+ INTERFACE_ID_AudioStream = 1, /**< Audio stream interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Function Prototypes: */
};
/* Function Prototypes: */
diff --git
a/Demos/Device/LowLevel/MassStorage/Descriptors.c
b/Demos/Device/LowLevel/MassStorage/Descriptors.c
index
d069bce
..
2be052b
100644
(file)
--- a/
Demos/Device/LowLevel/MassStorage/Descriptors.c
+++ b/
Demos/Device/LowLevel/MassStorage/Descriptors.c
@@
-91,7
+91,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_MassStorage
,
.AlternateSetting = 0,
.TotalEndpoints = 2,
.AlternateSetting = 0,
.TotalEndpoints = 2,
diff --git
a/Demos/Device/LowLevel/MassStorage/Descriptors.h
b/Demos/Device/LowLevel/MassStorage/Descriptors.h
index
dc6748f
..
7c3196b
100644
(file)
--- a/
Demos/Device/LowLevel/MassStorage/Descriptors.h
+++ b/
Demos/Device/LowLevel/MassStorage/Descriptors.h
@@
-68,15
+68,24
@@
USB_Descriptor_Endpoint_t MS_DataOutEndpoint;
} USB_Descriptor_Configuration_t;
USB_Descriptor_Endpoint_t MS_DataOutEndpoint;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_MassStorage = 0, /**< Mass storage interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Function Prototypes: */
};
/* Function Prototypes: */
diff --git
a/Demos/Device/LowLevel/Mouse/Descriptors.c
b/Demos/Device/LowLevel/Mouse/Descriptors.c
index
99780a4
..
23e8d7f
100644
(file)
--- a/
Demos/Device/LowLevel/Mouse/Descriptors.c
+++ b/
Demos/Device/LowLevel/Mouse/Descriptors.c
@@
-128,7
+128,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0x00
,
+ .InterfaceNumber =
INTERFACE_ID_Mouse
,
.AlternateSetting = 0x00,
.TotalEndpoints = 1,
.AlternateSetting = 0x00,
.TotalEndpoints = 1,
diff --git
a/Demos/Device/LowLevel/Mouse/Descriptors.h
b/Demos/Device/LowLevel/Mouse/Descriptors.h
index
a5380a1
..
3b637e2
100644
(file)
--- a/
Demos/Device/LowLevel/Mouse/Descriptors.h
+++ b/
Demos/Device/LowLevel/Mouse/Descriptors.h
@@
-60,18
+60,27
@@
// Mouse HID Interface
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_HID_t HID_MouseHID;
// Mouse HID Interface
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_HID_t HID_MouseHID;
- USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
+
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_Mouse = 0, /**< Mouse interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Function Prototypes: */
};
/* Function Prototypes: */
diff --git
a/Demos/Device/LowLevel/RNDISEthernet/Descriptors.c
b/Demos/Device/LowLevel/RNDISEthernet/Descriptors.c
index
ca70633
..
7474e54
100644
(file)
--- a/
Demos/Device/LowLevel/RNDISEthernet/Descriptors.c
+++ b/
Demos/Device/LowLevel/RNDISEthernet/Descriptors.c
@@
-90,7
+90,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_CDC_CCI
,
.AlternateSetting = 0,
.TotalEndpoints = 1,
.AlternateSetting = 0,
.TotalEndpoints = 1,
@@
-141,7
+141,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
1
,
+ .InterfaceNumber =
INTERFACE_ID_CDC_DCI
,
.AlternateSetting = 0,
.TotalEndpoints = 2,
.AlternateSetting = 0,
.TotalEndpoints = 2,
diff --git
a/Demos/Device/LowLevel/RNDISEthernet/Descriptors.h
b/Demos/Device/LowLevel/RNDISEthernet/Descriptors.h
index
763bc0c
..
9db6796
100644
(file)
--- a/
Demos/Device/LowLevel/RNDISEthernet/Descriptors.h
+++ b/
Demos/Device/LowLevel/RNDISEthernet/Descriptors.h
@@
-81,15
+81,25
@@
USB_Descriptor_Endpoint_t RNDIS_DataInEndpoint;
} USB_Descriptor_Configuration_t;
USB_Descriptor_Endpoint_t RNDIS_DataInEndpoint;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_CDC_CCI = 0, /**< CDC CCI interface descriptor ID */
+ INTERFACE_ID_CDC_DCI = 1, /**< CDC DCI interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Function Prototypes: */
};
/* Function Prototypes: */
diff --git
a/Demos/Device/LowLevel/VirtualSerial/Descriptors.c
b/Demos/Device/LowLevel/VirtualSerial/Descriptors.c
index
9432562
..
33f6337
100644
(file)
--- a/
Demos/Device/LowLevel/VirtualSerial/Descriptors.c
+++ b/
Demos/Device/LowLevel/VirtualSerial/Descriptors.c
@@
-91,7
+91,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_CDC_CCI
,
.AlternateSetting = 0,
.TotalEndpoints = 1,
.AlternateSetting = 0,
.TotalEndpoints = 1,
@@
-142,7
+142,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
1
,
+ .InterfaceNumber =
INTERFACE_ID_CDC_DCI
,
.AlternateSetting = 0,
.TotalEndpoints = 2,
.AlternateSetting = 0,
.TotalEndpoints = 2,
diff --git
a/Demos/Device/LowLevel/VirtualSerial/Descriptors.h
b/Demos/Device/LowLevel/VirtualSerial/Descriptors.h
index
a704614
..
8ece697
100644
(file)
--- a/
Demos/Device/LowLevel/VirtualSerial/Descriptors.h
+++ b/
Demos/Device/LowLevel/VirtualSerial/Descriptors.h
@@
-79,15
+79,25
@@
USB_Descriptor_Endpoint_t CDC_DataInEndpoint;
} USB_Descriptor_Configuration_t;
USB_Descriptor_Endpoint_t CDC_DataInEndpoint;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_CDC_CCI = 0, /**< CDC CCI interface descriptor ID */
+ INTERFACE_ID_CDC_DCI = 1, /**< CDC DCI interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Function Prototypes: */
};
/* Function Prototypes: */
diff --git
a/Demos/DualRole/ClassDriver/MouseHostDevice/Descriptors.c
b/Demos/DualRole/ClassDriver/MouseHostDevice/Descriptors.c
index
6b714eb
..
13c6cbc
100644
(file)
--- a/
Demos/DualRole/ClassDriver/MouseHostDevice/Descriptors.c
+++ b/
Demos/DualRole/ClassDriver/MouseHostDevice/Descriptors.c
@@
-109,7
+109,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0x00
,
+ .InterfaceNumber =
INTERFACE_ID_Mouse
,
.AlternateSetting = 0x00,
.TotalEndpoints = 1,
.AlternateSetting = 0x00,
.TotalEndpoints = 1,
diff --git
a/Demos/DualRole/ClassDriver/MouseHostDevice/Descriptors.h
b/Demos/DualRole/ClassDriver/MouseHostDevice/Descriptors.h
index
eca1e79
..
a19b612
100644
(file)
--- a/
Demos/DualRole/ClassDriver/MouseHostDevice/Descriptors.h
+++ b/
Demos/DualRole/ClassDriver/MouseHostDevice/Descriptors.h
@@
-53,18
+53,27
@@
// Mouse HID Interface
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_HID_t HID_MouseHID;
// Mouse HID Interface
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_HID_t HID_MouseHID;
- USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
+
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_Mouse = 0, /**< Mouse interface descriptor ID (must be zero) */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Macros: */
};
/* Macros: */
diff --git
a/Demos/DualRole/ClassDriver/MouseHostDevice/DeviceFunctions.c
b/Demos/DualRole/ClassDriver/MouseHostDevice/DeviceFunctions.c
index
ef9280c
..
2bbeb2d
100644
(file)
--- a/
Demos/DualRole/ClassDriver/MouseHostDevice/DeviceFunctions.c
+++ b/
Demos/DualRole/ClassDriver/MouseHostDevice/DeviceFunctions.c
@@
-47,7
+47,7
@@
USB_ClassInfo_HID_Device_t Mouse_HID_Device_Interface =
{
.Config =
{
{
.Config =
{
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_Mouse
,
.ReportINEndpoint =
{
.Address = MOUSE_EPADDR,
.ReportINEndpoint =
{
.Address = MOUSE_EPADDR,
diff --git
a/Projects/AVRISP-MKII/AVRISPDescriptors.c
b/Projects/AVRISP-MKII/AVRISPDescriptors.c
index
cb19051
..
c185cb9
100644
(file)
--- a/
Projects/AVRISP-MKII/AVRISPDescriptors.c
+++ b/
Projects/AVRISP-MKII/AVRISPDescriptors.c
@@
-101,7
+101,7
@@
AVRISP_USB_Descriptor_Configuration_t AVRISP_ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_AVRISP
,
.AlternateSetting = 0,
.TotalEndpoints = 2,
.AlternateSetting = 0,
.TotalEndpoints = 2,
diff --git
a/Projects/AVRISP-MKII/AVRISPDescriptors.h
b/Projects/AVRISP-MKII/AVRISPDescriptors.h
index
2f11923
..
68bb103
100644
(file)
--- a/
Projects/AVRISP-MKII/AVRISPDescriptors.h
+++ b/
Projects/AVRISP-MKII/AVRISPDescriptors.h
@@
-86,16
+86,25
@@
USB_Descriptor_Endpoint_t AVRISP_DataOutEndpoint;
} AVRISP_USB_Descriptor_Configuration_t;
USB_Descriptor_Endpoint_t AVRISP_DataOutEndpoint;
} AVRISP_USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_AVRISP = 0, /**< AVRISP interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum AVRISP_StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum AVRISP_StringDescriptors_t
{
-
AVRISP_STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
AVRISP_STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
AVRISP_STRING_ID_Product
= 2, /**< Product string ID */
-
AVRISP_STRING_ID_Serial
= 3, /**< Serial number string ID */
+
AVRISP_STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
AVRISP_STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
AVRISP_STRING_ID_Product
= 2, /**< Product string ID */
+
AVRISP_STRING_ID_Serial
= 3, /**< Serial number string ID */
};
/* External Variables: */
};
/* External Variables: */
diff --git
a/Projects/Benito/Benito.c
b/Projects/Benito/Benito.c
index
a89e6ca
..
2ecee07
100644
(file)
--- a/
Projects/Benito/Benito.c
+++ b/
Projects/Benito/Benito.c
@@
-62,7
+62,7
@@
USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface =
{
.Config =
{
{
.Config =
{
- .ControlInterfaceNumber =
0
,
+ .ControlInterfaceNumber =
INTERFACE_ID_CDC_CCI
,
.DataINEndpoint =
{
.Address = CDC_TX_EPADDR,
.DataINEndpoint =
{
.Address = CDC_TX_EPADDR,
diff --git
a/Projects/Benito/Descriptors.c
b/Projects/Benito/Descriptors.c
index
ebb11ca
..
8bd0907
100644
(file)
--- a/
Projects/Benito/Descriptors.c
+++ b/
Projects/Benito/Descriptors.c
@@
-90,7
+90,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_CDC_CCI
,
.AlternateSetting = 0,
.TotalEndpoints = 1,
.AlternateSetting = 0,
.TotalEndpoints = 1,
@@
-141,7
+141,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
1
,
+ .InterfaceNumber =
INTERFACE_ID_CDC_DCI
,
.AlternateSetting = 0,
.TotalEndpoints = 2,
.AlternateSetting = 0,
.TotalEndpoints = 2,
diff --git
a/Projects/Benito/Descriptors.h
b/Projects/Benito/Descriptors.h
index
12be7bf
..
5c67e71
100644
(file)
--- a/
Projects/Benito/Descriptors.h
+++ b/
Projects/Benito/Descriptors.h
@@
-81,15
+81,25
@@
USB_Descriptor_Endpoint_t CDC_DataInEndpoint;
} USB_Descriptor_Configuration_t;
USB_Descriptor_Endpoint_t CDC_DataInEndpoint;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_CDC_CCI = 0, /**< CDC CCI interface descriptor ID */
+ INTERFACE_ID_CDC_DCI = 1, /**< CDC DCI interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Function Prototypes: */
};
/* Function Prototypes: */
diff --git
a/Projects/LEDNotifier/Descriptors.c
b/Projects/LEDNotifier/Descriptors.c
index
1875bba
..
f228c69
100644
(file)
--- a/
Projects/LEDNotifier/Descriptors.c
+++ b/
Projects/LEDNotifier/Descriptors.c
@@
-91,7
+91,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_CDC_CCI
,
.AlternateSetting = 0,
.TotalEndpoints = 1,
.AlternateSetting = 0,
.TotalEndpoints = 1,
@@
-142,7
+142,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
1
,
+ .InterfaceNumber =
INTERFACE_ID_CDC_DCI
,
.AlternateSetting = 0,
.TotalEndpoints = 2,
.AlternateSetting = 0,
.TotalEndpoints = 2,
diff --git
a/Projects/LEDNotifier/Descriptors.h
b/Projects/LEDNotifier/Descriptors.h
index
363951c
..
ed19d84
100644
(file)
--- a/
Projects/LEDNotifier/Descriptors.h
+++ b/
Projects/LEDNotifier/Descriptors.h
@@
-79,15
+79,25
@@
USB_Descriptor_Endpoint_t CDC_DataInEndpoint;
} USB_Descriptor_Configuration_t;
USB_Descriptor_Endpoint_t CDC_DataInEndpoint;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_CDC_CCI = 0, /**< CDC CCI interface descriptor ID */
+ INTERFACE_ID_CDC_DCI = 1, /**< CDC DCI interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Function Prototypes: */
};
/* Function Prototypes: */
diff --git
a/Projects/LEDNotifier/LEDNotifier.c
b/Projects/LEDNotifier/LEDNotifier.c
index
d6a8fdc
..
e1d5dd9
100644
(file)
--- a/
Projects/LEDNotifier/LEDNotifier.c
+++ b/
Projects/LEDNotifier/LEDNotifier.c
@@
-44,7
+44,7
@@
USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface =
{
.Config =
{
{
.Config =
{
- .ControlInterfaceNumber =
0
,
+ .ControlInterfaceNumber =
INTERFACE_ID_CDC_CCI
,
.DataINEndpoint =
{
.Address = CDC_TX_EPADDR,
.DataINEndpoint =
{
.Address = CDC_TX_EPADDR,
diff --git
a/Projects/MIDIToneGenerator/Descriptors.c
b/Projects/MIDIToneGenerator/Descriptors.c
index
5413f27
..
220d37d
100644
(file)
--- a/
Projects/MIDIToneGenerator/Descriptors.c
+++ b/
Projects/MIDIToneGenerator/Descriptors.c
@@
-90,7
+90,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_AudioControl
,
.AlternateSetting = 0,
.TotalEndpoints = 0,
.AlternateSetting = 0,
.TotalEndpoints = 0,
@@
-118,7
+118,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
1
,
+ .InterfaceNumber =
INTERFACE_ID_AudioStream
,
.AlternateSetting = 0,
.TotalEndpoints = 2,
.AlternateSetting = 0,
.TotalEndpoints = 2,
diff --git
a/Projects/MIDIToneGenerator/Descriptors.h
b/Projects/MIDIToneGenerator/Descriptors.h
index
cb87891
..
dab2fd5
100644
(file)
--- a/
Projects/MIDIToneGenerator/Descriptors.h
+++ b/
Projects/MIDIToneGenerator/Descriptors.h
@@
-79,15
+79,25
@@
USB_MIDI_Descriptor_Jack_Endpoint_t MIDI_Out_Jack_Endpoint_SPC;
} USB_Descriptor_Configuration_t;
USB_MIDI_Descriptor_Jack_Endpoint_t MIDI_Out_Jack_Endpoint_SPC;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_AudioControl = 0, /**< Audio control interface descriptor ID */
+ INTERFACE_ID_AudioStream = 1, /**< Audio stream interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Function Prototypes: */
};
/* Function Prototypes: */
diff --git
a/Projects/MIDIToneGenerator/MIDIToneGenerator.c
b/Projects/MIDIToneGenerator/MIDIToneGenerator.c
index
662c815
..
ed2d334
100644
(file)
--- a/
Projects/MIDIToneGenerator/MIDIToneGenerator.c
+++ b/
Projects/MIDIToneGenerator/MIDIToneGenerator.c
@@
-44,7
+44,7
@@
USB_ClassInfo_MIDI_Device_t Keyboard_MIDI_Interface =
{
.Config =
{
{
.Config =
{
- .StreamingInterfaceNumber =
1
,
+ .StreamingInterfaceNumber =
INTERFACE_ID_AudioStream
,
.DataINEndpoint =
{
.Address = MIDI_STREAM_IN_EPADDR,
.DataINEndpoint =
{
.Address = MIDI_STREAM_IN_EPADDR,
diff --git
a/Projects/Magstripe/Descriptors.c
b/Projects/Magstripe/Descriptors.c
index
6809440
..
c707c1c
100644
(file)
--- a/
Projects/Magstripe/Descriptors.c
+++ b/
Projects/Magstripe/Descriptors.c
@@
-105,7
+105,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0x00
,
+ .InterfaceNumber =
INTERFACE_ID_Keyboard
,
.AlternateSetting = 0x00,
.TotalEndpoints = 1,
.AlternateSetting = 0x00,
.TotalEndpoints = 1,
diff --git
a/Projects/Magstripe/Descriptors.h
b/Projects/Magstripe/Descriptors.h
index
0f4869f
..
46218fc
100644
(file)
--- a/
Projects/Magstripe/Descriptors.h
+++ b/
Projects/Magstripe/Descriptors.h
@@
-56,18
+56,27
@@
// Keyboard HID Interface
USB_Descriptor_Interface_t HID_Interface; /**< Keyboard interface descriptor */
USB_HID_Descriptor_HID_t HID_KeyboardHID; /**< Keyboard HID descriptor */
// Keyboard HID Interface
USB_Descriptor_Interface_t HID_Interface; /**< Keyboard interface descriptor */
USB_HID_Descriptor_HID_t HID_KeyboardHID; /**< Keyboard HID descriptor */
- USB_Descriptor_Endpoint_t HID_ReportINEndpoint; /**< Keyboard key report endpoint descriptor */
+
USB_Descriptor_Endpoint_t HID_ReportINEndpoint; /**< Keyboard key report endpoint descriptor */
} USB_Descriptor_Configuration_t;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_Keyboard = 0, /**< Keyboard interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Macros: */
};
/* Macros: */
diff --git
a/Projects/Magstripe/Magstripe.c
b/Projects/Magstripe/Magstripe.c
index
8dba737
..
a0b6f1b
100644
(file)
--- a/
Projects/Magstripe/Magstripe.c
+++ b/
Projects/Magstripe/Magstripe.c
@@
-56,7
+56,7
@@
USB_ClassInfo_HID_Device_t Keyboard_HID_Interface =
{
.Config =
{
{
.Config =
{
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_Keyboard
,
.ReportINEndpoint =
{
.Address = KEYBOARD_EPADDR,
.ReportINEndpoint =
{
.Address = KEYBOARD_EPADDR,
diff --git
a/Projects/MediaController/Descriptors.c
b/Projects/MediaController/Descriptors.c
index
636bbb6
..
353e5fe
100644
(file)
--- a/
Projects/MediaController/Descriptors.c
+++ b/
Projects/MediaController/Descriptors.c
@@
-122,7
+122,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0x00
,
+ .InterfaceNumber =
INTERFACE_ID_HID
,
.AlternateSetting = 0x00,
.TotalEndpoints = 1,
.AlternateSetting = 0x00,
.TotalEndpoints = 1,
diff --git
a/Projects/MediaController/Descriptors.h
b/Projects/MediaController/Descriptors.h
index
9f88964
..
827885d
100644
(file)
--- a/
Projects/MediaController/Descriptors.h
+++ b/
Projects/MediaController/Descriptors.h
@@
-53,18
+53,27
@@
// Media Controller HID Interface
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_HID_t HID_MediaControlHID;
// Media Controller HID Interface
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_HID_t HID_MediaControlHID;
- USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
+
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_HID = 0, /**< HID interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Macros: */
};
/* Macros: */
diff --git
a/Projects/MediaController/MediaController.c
b/Projects/MediaController/MediaController.c
index
d12a21a
..
bda252a
100644
(file)
--- a/
Projects/MediaController/MediaController.c
+++ b/
Projects/MediaController/MediaController.c
@@
-47,7
+47,7
@@
USB_ClassInfo_HID_Device_t MediaControl_HID_Interface =
{
.Config =
{
{
.Config =
{
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_HID
,
.ReportINEndpoint =
{
.Address = MEDIACONTROL_HID_EPADDR,
.ReportINEndpoint =
{
.Address = MEDIACONTROL_HID_EPADDR,
diff --git
a/Projects/RelayBoard/Descriptors.c
b/Projects/RelayBoard/Descriptors.c
index
c6b2d8f
..
646f7ca
100644
(file)
--- a/
Projects/RelayBoard/Descriptors.c
+++ b/
Projects/RelayBoard/Descriptors.c
@@
-91,7
+91,7
@@
const USB_Descriptor_Configuration_t PROGMEM RelayBoard_ConfigurationDescriptor
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_RelayBoard
,
.AlternateSetting = 0,
.TotalEndpoints = 0,
.AlternateSetting = 0,
.TotalEndpoints = 0,
diff --git
a/Projects/RelayBoard/Descriptors.h
b/Projects/RelayBoard/Descriptors.h
index
97ed225
..
c2fc16e
100644
(file)
--- a/
Projects/RelayBoard/Descriptors.h
+++ b/
Projects/RelayBoard/Descriptors.h
@@
-54,16
+54,25
@@
USB_Descriptor_Interface_t RelayBoardInterface;
} USB_Descriptor_Configuration_t;
USB_Descriptor_Interface_t RelayBoardInterface;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_RelayBoard = 0, /**< Relay board interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
-
STRING_ID_Serial
= 3, /**< Serial number string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Serial
= 3, /**< Serial number string ID */
};
/* Function Prototypes: */
};
/* Function Prototypes: */
diff --git
a/Projects/SerialToLCD/Descriptors.c
b/Projects/SerialToLCD/Descriptors.c
index
8a55f82
..
baf33c0
100644
(file)
--- a/
Projects/SerialToLCD/Descriptors.c
+++ b/
Projects/SerialToLCD/Descriptors.c
@@
-103,7
+103,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_CDC_CCI
,
.AlternateSetting = 0,
.TotalEndpoints = 1,
.AlternateSetting = 0,
.TotalEndpoints = 1,
@@
-154,7
+154,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
1
,
+ .InterfaceNumber =
INTERFACE_ID_CDC_DCI
,
.AlternateSetting = 0,
.TotalEndpoints = 2,
.AlternateSetting = 0,
.TotalEndpoints = 2,
diff --git
a/Projects/SerialToLCD/Descriptors.h
b/Projects/SerialToLCD/Descriptors.h
index
5776098
..
f661929
100644
(file)
--- a/
Projects/SerialToLCD/Descriptors.h
+++ b/
Projects/SerialToLCD/Descriptors.h
@@
-80,15
+80,25
@@
USB_Descriptor_Endpoint_t CDC_DataInEndpoint;
} USB_Descriptor_Configuration_t;
USB_Descriptor_Endpoint_t CDC_DataInEndpoint;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_CDC_CCI = 0, /**< CDC CCI interface descriptor ID */
+ INTERFACE_ID_CDC_DCI = 1, /**< CDC DCI interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Function Prototypes: */
};
/* Function Prototypes: */
diff --git
a/Projects/SerialToLCD/SerialToLCD.c
b/Projects/SerialToLCD/SerialToLCD.c
index
aac4fad
..
21a5d68
100644
(file)
--- a/
Projects/SerialToLCD/SerialToLCD.c
+++ b/
Projects/SerialToLCD/SerialToLCD.c
@@
-51,7
+51,7
@@
USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface =
{
.Config =
{
{
.Config =
{
- .ControlInterfaceNumber =
0
,
+ .ControlInterfaceNumber =
INTERFACE_ID_CDC_CCI
,
.DataINEndpoint =
{
.Address = CDC_TX_EPADDR,
.DataINEndpoint =
{
.Address = CDC_TX_EPADDR,
diff --git
a/Projects/SerialToLCD/SerialToLCD.h
b/Projects/SerialToLCD/SerialToLCD.h
index
22537d6
..
bafc03c
100644
(file)
--- a/
Projects/SerialToLCD/SerialToLCD.h
+++ b/
Projects/SerialToLCD/SerialToLCD.h
@@
-37,28
+37,28
@@
#ifndef _SERIALTOLCD_H_
#define _SERIALTOLCD_H_
#ifndef _SERIALTOLCD_H_
#define _SERIALTOLCD_H_
- /* Includes: */
- #include <avr/io.h>
- #include <avr/wdt.h>
- #include <avr/interrupt.h>
- #include <avr/power.h>
+
/* Includes: */
+
#include <avr/io.h>
+
#include <avr/wdt.h>
+
#include <avr/interrupt.h>
+
#include <avr/power.h>
- #include "Descriptors.h"
+
#include "Descriptors.h"
#include "Lib/HD44780.h"
#include "Lib/HD44780.h"
- #include <LUFA/Version.h>
- #include <LUFA/Drivers/Misc/RingBuffer.h>
- #include <LUFA/Drivers/USB/USB.h>
+
#include <LUFA/Version.h>
+
#include <LUFA/Drivers/Misc/RingBuffer.h>
+
#include <LUFA/Drivers/USB/USB.h>
#include <LUFA/Platform/Platform.h>
/* Macros: */
#define COMMAND_ESCAPE 0x1B
#include <LUFA/Platform/Platform.h>
/* Macros: */
#define COMMAND_ESCAPE 0x1B
- /* Function Prototypes: */
- void SetupHardware(void);
+
/* Function Prototypes: */
+
void SetupHardware(void);
- void EVENT_USB_Device_ConfigurationChanged(void);
- void EVENT_USB_Device_ControlRequest(void);
+
void EVENT_USB_Device_ConfigurationChanged(void);
+
void EVENT_USB_Device_ControlRequest(void);
#endif
#endif
diff --git
a/Projects/TempDataLogger/Descriptors.c
b/Projects/TempDataLogger/Descriptors.c
index
6ec6f64
..
452c4c6
100644
(file)
--- a/
Projects/TempDataLogger/Descriptors.c
+++ b/
Projects/TempDataLogger/Descriptors.c
@@
-109,7
+109,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_MassStorage
,
.AlternateSetting = 0,
.TotalEndpoints = 2,
.AlternateSetting = 0,
.TotalEndpoints = 2,
@@
-145,7
+145,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
1
,
+ .InterfaceNumber =
INTERFACE_ID_HID
,
.AlternateSetting = 0,
.TotalEndpoints = 1,
.AlternateSetting = 0,
.TotalEndpoints = 1,
diff --git
a/Projects/TempDataLogger/Descriptors.h
b/Projects/TempDataLogger/Descriptors.h
index
91e238f
..
63c3fae
100644
(file)
--- a/
Projects/TempDataLogger/Descriptors.h
+++ b/
Projects/TempDataLogger/Descriptors.h
@@
-56,15
+56,25
@@
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_MassStorage = 0, /**< Mass storage interface descriptor ID */
+ INTERFACE_ID_HID = 1, /**< HID interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Function Prototypes: */
};
/* Function Prototypes: */
diff --git
a/Projects/TempDataLogger/TempDataLogger.c
b/Projects/TempDataLogger/TempDataLogger.c
index
bbbea47
..
66f9335
100644
(file)
--- a/
Projects/TempDataLogger/TempDataLogger.c
+++ b/
Projects/TempDataLogger/TempDataLogger.c
@@
-44,7
+44,7
@@
USB_ClassInfo_MS_Device_t Disk_MS_Interface =
{
.Config =
{
{
.Config =
{
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_MassStorage
,
.DataINEndpoint =
{
.Address = MASS_STORAGE_IN_EPADDR,
.DataINEndpoint =
{
.Address = MASS_STORAGE_IN_EPADDR,
@@
-72,7
+72,7
@@
USB_ClassInfo_HID_Device_t Generic_HID_Interface =
{
.Config =
{
{
.Config =
{
- .InterfaceNumber =
1
,
+ .InterfaceNumber =
INTERFACE_ID_HID
,
.ReportINEndpoint =
{
.Address = GENERIC_IN_EPADDR,
.ReportINEndpoint =
{
.Address = GENERIC_IN_EPADDR,
diff --git
a/Projects/USBtoSerial/Descriptors.c
b/Projects/USBtoSerial/Descriptors.c
index
b2d2285
..
ea0a84a
100644
(file)
--- a/
Projects/USBtoSerial/Descriptors.c
+++ b/
Projects/USBtoSerial/Descriptors.c
@@
-91,7
+91,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_CDC_CCI
,
.AlternateSetting = 0,
.TotalEndpoints = 1,
.AlternateSetting = 0,
.TotalEndpoints = 1,
@@
-142,7
+142,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
1
,
+ .InterfaceNumber =
INTERFACE_ID_CDC_DCI
,
.AlternateSetting = 0,
.TotalEndpoints = 2,
.AlternateSetting = 0,
.TotalEndpoints = 2,
diff --git
a/Projects/USBtoSerial/Descriptors.h
b/Projects/USBtoSerial/Descriptors.h
index
363951c
..
ed19d84
100644
(file)
--- a/
Projects/USBtoSerial/Descriptors.h
+++ b/
Projects/USBtoSerial/Descriptors.h
@@
-79,15
+79,25
@@
USB_Descriptor_Endpoint_t CDC_DataInEndpoint;
} USB_Descriptor_Configuration_t;
USB_Descriptor_Endpoint_t CDC_DataInEndpoint;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_CDC_CCI = 0, /**< CDC CCI interface descriptor ID */
+ INTERFACE_ID_CDC_DCI = 1, /**< CDC DCI interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Function Prototypes: */
};
/* Function Prototypes: */
diff --git
a/Projects/USBtoSerial/USBtoSerial.c
b/Projects/USBtoSerial/USBtoSerial.c
index
6df9063
..
84ec2be
100644
(file)
--- a/
Projects/USBtoSerial/USBtoSerial.c
+++ b/
Projects/USBtoSerial/USBtoSerial.c
@@
-56,7
+56,7
@@
USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface =
{
.Config =
{
{
.Config =
{
- .ControlInterfaceNumber =
0
,
+ .ControlInterfaceNumber =
INTERFACE_ID_CDC_CCI
,
.DataINEndpoint =
{
.Address = CDC_TX_EPADDR,
.DataINEndpoint =
{
.Address = CDC_TX_EPADDR,
diff --git
a/Projects/Webserver/Descriptors.c
b/Projects/Webserver/Descriptors.c
index
8fcba5c
..
b8acf42
100644
(file)
--- a/
Projects/Webserver/Descriptors.c
+++ b/
Projects/Webserver/Descriptors.c
@@
-105,7
+105,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_CDC_CCI
,
.AlternateSetting = 0,
.TotalEndpoints = 1,
.AlternateSetting = 0,
.TotalEndpoints = 1,
@@
-156,7
+156,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
1
,
+ .InterfaceNumber =
INTERFACE_ID_CDC_DCI
,
.AlternateSetting = 0,
.TotalEndpoints = 2,
.AlternateSetting = 0,
.TotalEndpoints = 2,
@@
-192,7
+192,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
2
,
+ .InterfaceNumber =
INTERFACE_ID_MassStorage
,
.AlternateSetting = 0,
.TotalEndpoints = 2,
.AlternateSetting = 0,
.TotalEndpoints = 2,
diff --git
a/Projects/Webserver/Descriptors.h
b/Projects/Webserver/Descriptors.h
index
2c25512
..
c649cf5
100644
(file)
--- a/
Projects/Webserver/Descriptors.h
+++ b/
Projects/Webserver/Descriptors.h
@@
-96,15
+96,26
@@
USB_Descriptor_Endpoint_t MS_DataOutEndpoint;
} USB_Descriptor_Configuration_t;
USB_Descriptor_Endpoint_t MS_DataOutEndpoint;
} USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum InterfaceDescriptors_t
+ {
+ INTERFACE_ID_CDC_CCI = 0, /**< CDC CCI interface descriptor ID */
+ INTERFACE_ID_CDC_DCI = 1, /**< CDC DCI interface descriptor ID */
+ INTERFACE_ID_MassStorage = 2, /**< Mass storage interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum StringDescriptors_t
{
-
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
STRING_ID_Product
= 2, /**< Product string ID */
+
STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
STRING_ID_Product
= 2, /**< Product string ID */
};
/* Function Prototypes: */
};
/* Function Prototypes: */
diff --git
a/Projects/Webserver/USBDeviceMode.c
b/Projects/Webserver/USBDeviceMode.c
index
7d5beb9
..
f889b6b
100644
(file)
--- a/
Projects/Webserver/USBDeviceMode.c
+++ b/
Projects/Webserver/USBDeviceMode.c
@@
-44,7
+44,7
@@
USB_ClassInfo_RNDIS_Device_t Ethernet_RNDIS_Interface_Device =
{
.Config =
{
{
.Config =
{
- .ControlInterfaceNumber =
0
,
+ .ControlInterfaceNumber =
INTERFACE_ID_CDC_CCI
,
.DataINEndpoint =
{
.Address = CDC_TX_EPADDR,
.DataINEndpoint =
{
.Address = CDC_TX_EPADDR,
@@
-76,7
+76,7
@@
USB_ClassInfo_MS_Device_t Disk_MS_Interface =
{
.Config =
{
{
.Config =
{
- .InterfaceNumber =
2
,
+ .InterfaceNumber =
INTERFACE_ID_MassStorage
,
.DataINEndpoint =
{
.Address = MASS_STORAGE_IN_EPADDR,
.DataINEndpoint =
{
.Address = MASS_STORAGE_IN_EPADDR,
diff --git
a/Projects/XPLAINBridge/USARTDescriptors.c
b/Projects/XPLAINBridge/USARTDescriptors.c
index
0e0ac85
..
b1bfd4e
100644
(file)
--- a/
Projects/XPLAINBridge/USARTDescriptors.c
+++ b/
Projects/XPLAINBridge/USARTDescriptors.c
@@
-91,7
+91,7
@@
const USART_USB_Descriptor_Configuration_t PROGMEM USART_ConfigurationDescriptor
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_CDC_CCI
,
.AlternateSetting = 0,
.TotalEndpoints = 1,
.AlternateSetting = 0,
.TotalEndpoints = 1,
@@
-142,7
+142,7
@@
const USART_USB_Descriptor_Configuration_t PROGMEM USART_ConfigurationDescriptor
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
1
,
+ .InterfaceNumber =
INTERFACE_ID_CDC_DCI
,
.AlternateSetting = 0,
.TotalEndpoints = 2,
.AlternateSetting = 0,
.TotalEndpoints = 2,
diff --git
a/Projects/XPLAINBridge/USARTDescriptors.h
b/Projects/XPLAINBridge/USARTDescriptors.h
index
954867c
..
130c695
100644
(file)
--- a/
Projects/XPLAINBridge/USARTDescriptors.h
+++ b/
Projects/XPLAINBridge/USARTDescriptors.h
@@
-81,22
+81,32
@@
USB_Descriptor_Endpoint_t CDC_DataInEndpoint;
} USART_USB_Descriptor_Configuration_t;
USB_Descriptor_Endpoint_t CDC_DataInEndpoint;
} USART_USB_Descriptor_Configuration_t;
+ /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+ * should have a unique ID index associated with it, which can be used to refer to the
+ * interface from other descriptors.
+ */
+ enum USART_InterfaceDescriptors_t
+ {
+ INTERFACE_ID_CDC_CCI = 0, /**< CDC CCI interface descriptor ID */
+ INTERFACE_ID_CDC_DCI = 1, /**< CDC DCI interface descriptor ID */
+ };
+
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum USART_StringDescriptors_t
{
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
* have a unique ID index associated with it, which can be used to refer to the string from
* other descriptors.
*/
enum USART_StringDescriptors_t
{
-
USART_STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
-
USART_STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
-
USART_STRING_ID_Product
= 2, /**< Product string ID */
+
USART_STRING_ID_Language
= 0, /**< Supported Languages string descriptor ID (must be zero) */
+
USART_STRING_ID_Manufacturer
= 1, /**< Manufacturer string ID */
+
USART_STRING_ID_Product
= 2, /**< Product string ID */
};
/* Function Prototypes: */
uint16_t USART_GetDescriptor(const uint16_t wValue,
const uint8_t wIndex,
const void** const DescriptorAddress,
};
/* Function Prototypes: */
uint16_t USART_GetDescriptor(const uint16_t wValue,
const uint8_t wIndex,
const void** const DescriptorAddress,
-
uint8_t* const DescriptorMemorySpace);
+ uint8_t* const DescriptorMemorySpace);
#endif
#endif
diff --git
a/Projects/XPLAINBridge/XPLAINBridge.c
b/Projects/XPLAINBridge/XPLAINBridge.c
index
2ef1d20
..
1c63b71
100644
(file)
--- a/
Projects/XPLAINBridge/XPLAINBridge.c
+++ b/
Projects/XPLAINBridge/XPLAINBridge.c
@@
-47,7
+47,7
@@
USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface =
{
.Config =
{
{
.Config =
{
- .ControlInterfaceNumber =
0
,
+ .ControlInterfaceNumber =
INTERFACE_ID_CDC_CCI
,
.DataINEndpoint =
{
.Address = CDC_TX_EPADDR,
.DataINEndpoint =
{
.Address = CDC_TX_EPADDR,