diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2010-10-25 12:42:55 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2010-10-25 12:42:55 +0000 |
commit | 55538dcef34bc3c0f2ada4767c51d11202ac0678 (patch) | |
tree | f047601bd6ab339511e24acb00801de8fdebc19c /Demos/Device/LowLevel | |
parent | b37d77eab32d171ad7b28157a924a4026e2aebd1 (diff) | |
download | lufa-55538dcef34bc3c0f2ada4767c51d11202ac0678.tar.gz lufa-55538dcef34bc3c0f2ada4767c51d11202ac0678.tar.bz2 lufa-55538dcef34bc3c0f2ada4767c51d11202ac0678.zip |
Add descriptor class, subclass and protocol constants to the class drivers, modify all demos to use them where possible.
Move out private/internal host class driver constants to the common class driver headers, so that they can be used in the Low Level host mode demos.
Ensure all demos, projects and bootloaders use the class driver constants where possible to minimise code repetition.
Diffstat (limited to 'Demos/Device/LowLevel')
-rw-r--r-- | Demos/Device/LowLevel/AudioInput/Descriptors.c | 24 | ||||
-rw-r--r-- | Demos/Device/LowLevel/AudioOutput/Descriptors.c | 24 | ||||
-rw-r--r-- | Demos/Device/LowLevel/DualVirtualSerial/Descriptors.c | 42 | ||||
-rw-r--r-- | Demos/Device/LowLevel/GenericHID/Descriptors.c | 12 | ||||
-rw-r--r-- | Demos/Device/LowLevel/Joystick/Descriptors.c | 12 | ||||
-rw-r--r-- | Demos/Device/LowLevel/Keyboard/Descriptors.c | 12 | ||||
-rw-r--r-- | Demos/Device/LowLevel/KeyboardMouse/Descriptors.c | 18 | ||||
-rw-r--r-- | Demos/Device/LowLevel/MIDI/Descriptors.c | 18 | ||||
-rw-r--r-- | Demos/Device/LowLevel/MassStorage/Descriptors.c | 12 | ||||
-rw-r--r-- | Demos/Device/LowLevel/Mouse/Descriptors.c | 12 | ||||
-rw-r--r-- | Demos/Device/LowLevel/RNDISEthernet/Descriptors.c | 18 | ||||
-rw-r--r-- | Demos/Device/LowLevel/RNDISEthernet/Lib/RNDIS.h | 1 | ||||
-rw-r--r-- | Demos/Device/LowLevel/VirtualSerial/Descriptors.c | 18 |
13 files changed, 111 insertions, 112 deletions
diff --git a/Demos/Device/LowLevel/AudioInput/Descriptors.c b/Demos/Device/LowLevel/AudioInput/Descriptors.c index 85599fbc4..db731d56f 100644 --- a/Demos/Device/LowLevel/AudioInput/Descriptors.c +++ b/Demos/Device/LowLevel/AudioInput/Descriptors.c @@ -47,9 +47,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor = .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .USBSpecification = VERSION_BCD(01.10), - .Class = 0x00, - .SubClass = 0x00, - .Protocol = 0x00, + .Class = USB_CSCP_NoDeviceClass, + .SubClass = USB_CSCP_NoDeviceSubclass, + .Protocol = USB_CSCP_NoDeviceProtocol, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, @@ -95,9 +95,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .TotalEndpoints = 0, - .Class = 0x01, - .SubClass = 0x01, - .Protocol = 0x00, + .Class = AUDIO_CSCP_AudioClass, + .SubClass = AUDIO_CSCP_ControlSubclass, + .Protocol = AUDIO_CSCP_ControlProtocol, .InterfaceStrIndex = NO_DESCRIPTOR }, @@ -155,9 +155,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .TotalEndpoints = 0, - .Class = 0x01, - .SubClass = 0x02, - .Protocol = 0x00, + .Class = AUDIO_CSCP_AudioClass, + .SubClass = AUDIO_CSCP_AudioStreamingSubclass, + .Protocol = AUDIO_CSCP_StreamingProtocol, .InterfaceStrIndex = NO_DESCRIPTOR }, @@ -171,9 +171,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .TotalEndpoints = 1, - .Class = 0x01, - .SubClass = 0x02, - .Protocol = 0x00, + .Class = AUDIO_CSCP_AudioClass, + .SubClass = AUDIO_CSCP_AudioStreamingSubclass, + .Protocol = AUDIO_CSCP_StreamingProtocol, .InterfaceStrIndex = NO_DESCRIPTOR }, diff --git a/Demos/Device/LowLevel/AudioOutput/Descriptors.c b/Demos/Device/LowLevel/AudioOutput/Descriptors.c index d177c31c3..bb6c5fcaa 100644 --- a/Demos/Device/LowLevel/AudioOutput/Descriptors.c +++ b/Demos/Device/LowLevel/AudioOutput/Descriptors.c @@ -47,9 +47,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor = .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .USBSpecification = VERSION_BCD(01.10), - .Class = 0x00, - .SubClass = 0x00, - .Protocol = 0x00, + .Class = USB_CSCP_NoDeviceClass, + .SubClass = USB_CSCP_NoDeviceSubclass, + .Protocol = USB_CSCP_NoDeviceProtocol, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, @@ -95,9 +95,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .TotalEndpoints = 0, - .Class = 0x01, - .SubClass = 0x01, - .Protocol = 0x00, + .Class = AUDIO_CSCP_AudioClass, + .SubClass = AUDIO_CSCP_ControlSubclass, + .Protocol = AUDIO_CSCP_ControlProtocol, .InterfaceStrIndex = NO_DESCRIPTOR }, @@ -155,9 +155,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .TotalEndpoints = 0, - .Class = 0x01, - .SubClass = 0x02, - .Protocol = 0x00, + .Class = AUDIO_CSCP_AudioClass, + .SubClass = AUDIO_CSCP_AudioStreamingSubclass, + .Protocol = AUDIO_CSCP_StreamingProtocol, .InterfaceStrIndex = NO_DESCRIPTOR }, @@ -171,9 +171,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .TotalEndpoints = 1, - .Class = 0x01, - .SubClass = 0x02, - .Protocol = 0x00, + .Class = AUDIO_CSCP_AudioClass, + .SubClass = AUDIO_CSCP_AudioStreamingSubclass, + .Protocol = AUDIO_CSCP_StreamingProtocol, .InterfaceStrIndex = NO_DESCRIPTOR }, diff --git a/Demos/Device/LowLevel/DualVirtualSerial/Descriptors.c b/Demos/Device/LowLevel/DualVirtualSerial/Descriptors.c index 775ab0828..96bb080d8 100644 --- a/Demos/Device/LowLevel/DualVirtualSerial/Descriptors.c +++ b/Demos/Device/LowLevel/DualVirtualSerial/Descriptors.c @@ -59,9 +59,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor = .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .USBSpecification = VERSION_BCD(01.10), - .Class = 0xEF, - .SubClass = 0x02, - .Protocol = 0x01, + .Class = USB_CSCP_IADDeviceClass, + .SubClass = USB_CSCP_IADDeviceSubclass, + .Protocol = USB_CSCP_IADDeviceProtocol, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, @@ -105,9 +105,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .FirstInterfaceIndex = 0, .TotalInterfaces = 2, - .Class = 0x02, - .SubClass = 0x02, - .Protocol = 0x01, + .Class = CDC_CSCP_CDCClass, + .SubClass = CDC_CSCP_ACMSubclass, + .Protocol = CDC_CSCP_ATCommandProtocol, .IADStrIndex = NO_DESCRIPTOR }, @@ -121,9 +121,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .TotalEndpoints = 1, - .Class = 0x02, - .SubClass = 0x02, - .Protocol = 0x01, + .Class = CDC_CSCP_CDCClass, + .SubClass = CDC_CSCP_ACMSubclass, + .Protocol = CDC_CSCP_ATCommandProtocol, .InterfaceStrIndex = NO_DESCRIPTOR }, @@ -172,9 +172,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .TotalEndpoints = 2, - .Class = 0x0A, - .SubClass = 0x00, - .Protocol = 0x00, + .Class = CDC_CSCP_CDCDataClass, + .SubClass = CDC_CSCP_NoDataSubclass, + .Protocol = CDC_CSCP_NoDataProtocol, .InterfaceStrIndex = NO_DESCRIPTOR }, @@ -206,9 +206,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .FirstInterfaceIndex = 2, .TotalInterfaces = 2, - .Class = 0x02, - .SubClass = 0x02, - .Protocol = 0x01, + .Class = CDC_CSCP_CDCClass, + .SubClass = CDC_CSCP_ACMSubclass, + .Protocol = CDC_CSCP_ATCommandProtocol, .IADStrIndex = NO_DESCRIPTOR }, @@ -222,9 +222,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .TotalEndpoints = 1, - .Class = 0x02, - .SubClass = 0x02, - .Protocol = 0x01, + .Class = CDC_CSCP_CDCClass, + .SubClass = CDC_CSCP_ACMSubclass, + .Protocol = CDC_CSCP_ATCommandProtocol, .InterfaceStrIndex = NO_DESCRIPTOR }, @@ -273,9 +273,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .TotalEndpoints = 2, - .Class = 0x0A, - .SubClass = 0x00, - .Protocol = 0x00, + .Class = CDC_CSCP_CDCDataClass, + .SubClass = CDC_CSCP_NoDataSubclass, + .Protocol = CDC_CSCP_NoDataProtocol, .InterfaceStrIndex = NO_DESCRIPTOR }, diff --git a/Demos/Device/LowLevel/GenericHID/Descriptors.c b/Demos/Device/LowLevel/GenericHID/Descriptors.c index 79cecb587..bb1330d83 100644 --- a/Demos/Device/LowLevel/GenericHID/Descriptors.c +++ b/Demos/Device/LowLevel/GenericHID/Descriptors.c @@ -73,9 +73,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor = .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .USBSpecification = VERSION_BCD(01.10), - .Class = 0x00, - .SubClass = 0x00, - .Protocol = 0x00, + .Class = USB_CSCP_NoDeviceClass, + .SubClass = USB_CSCP_NoDeviceSubclass, + .Protocol = USB_CSCP_NoDeviceProtocol, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, @@ -121,9 +121,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .TotalEndpoints = 2, - .Class = 0x03, - .SubClass = 0x00, - .Protocol = 0x00, + .Class = HID_CSCP_HIDClass, + .SubClass = HID_CSCP_NonBootSubclass, + .Protocol = HID_CSCP_NonBootProtocol, .InterfaceStrIndex = NO_DESCRIPTOR }, diff --git a/Demos/Device/LowLevel/Joystick/Descriptors.c b/Demos/Device/LowLevel/Joystick/Descriptors.c index fac68871e..96387bd99 100644 --- a/Demos/Device/LowLevel/Joystick/Descriptors.c +++ b/Demos/Device/LowLevel/Joystick/Descriptors.c @@ -83,9 +83,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor = .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .USBSpecification = VERSION_BCD(01.10), - .Class = 0x00, - .SubClass = 0x00, - .Protocol = 0x00, + .Class = USB_CSCP_NoDeviceClass, + .SubClass = USB_CSCP_NoDeviceSubclass, + .Protocol = USB_CSCP_NoDeviceProtocol, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, @@ -131,9 +131,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .TotalEndpoints = 1, - .Class = 0x03, - .SubClass = 0x00, - .Protocol = 0x00, + .Class = HID_CSCP_HIDClass, + .SubClass = HID_CSCP_NonBootSubclass, + .Protocol = HID_CSCP_NonBootProtocol, .InterfaceStrIndex = NO_DESCRIPTOR }, diff --git a/Demos/Device/LowLevel/Keyboard/Descriptors.c b/Demos/Device/LowLevel/Keyboard/Descriptors.c index 711d0ff7e..5cb1fb55b 100644 --- a/Demos/Device/LowLevel/Keyboard/Descriptors.c +++ b/Demos/Device/LowLevel/Keyboard/Descriptors.c @@ -90,9 +90,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor = .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .USBSpecification = VERSION_BCD(01.10), - .Class = 0x00, - .SubClass = 0x00, - .Protocol = 0x00, + .Class = USB_CSCP_NoDeviceClass, + .SubClass = USB_CSCP_NoDeviceSubclass, + .Protocol = USB_CSCP_NoDeviceProtocol, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, @@ -138,9 +138,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .TotalEndpoints = 2, - .Class = 0x03, - .SubClass = 0x01, - .Protocol = 0x01, + .Class = HID_CSCP_HIDClass, + .SubClass = HID_CSCP_BootSubclass, + .Protocol = HID_CSCP_KeyboardBootProtocol, .InterfaceStrIndex = NO_DESCRIPTOR }, diff --git a/Demos/Device/LowLevel/KeyboardMouse/Descriptors.c b/Demos/Device/LowLevel/KeyboardMouse/Descriptors.c index 39d6c73e8..6c617f5fe 100644 --- a/Demos/Device/LowLevel/KeyboardMouse/Descriptors.c +++ b/Demos/Device/LowLevel/KeyboardMouse/Descriptors.c @@ -123,9 +123,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor = .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .USBSpecification = VERSION_BCD(01.10), - .Class = 0x00, - .SubClass = 0x00, - .Protocol = 0x00, + .Class = USB_CSCP_NoDeviceClass, + .SubClass = USB_CSCP_NoDeviceSubclass, + .Protocol = USB_CSCP_NoDeviceProtocol, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, @@ -171,9 +171,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .TotalEndpoints = 2, - .Class = 0x03, - .SubClass = 0x01, - .Protocol = 0x01, + .Class = HID_CSCP_HIDClass, + .SubClass = HID_CSCP_BootSubclass, + .Protocol = HID_CSCP_KeyboardBootProtocol, .InterfaceStrIndex = NO_DESCRIPTOR }, @@ -218,9 +218,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .TotalEndpoints = 1, - .Class = 0x03, - .SubClass = 0x01, - .Protocol = 0x02, + .Class = HID_CSCP_HIDClass, + .SubClass = HID_CSCP_BootSubclass, + .Protocol = HID_CSCP_MouseBootProtocol, .InterfaceStrIndex = NO_DESCRIPTOR }, diff --git a/Demos/Device/LowLevel/MIDI/Descriptors.c b/Demos/Device/LowLevel/MIDI/Descriptors.c index d6092bbd4..266ec2a9c 100644 --- a/Demos/Device/LowLevel/MIDI/Descriptors.c +++ b/Demos/Device/LowLevel/MIDI/Descriptors.c @@ -47,9 +47,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor = .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .USBSpecification = VERSION_BCD(01.10), - .Class = 0x00, - .SubClass = 0x00, - .Protocol = 0x00, + .Class = USB_CSCP_NoDeviceClass, + .SubClass = USB_CSCP_NoDeviceSubclass, + .Protocol = USB_CSCP_NoDeviceProtocol, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, @@ -95,9 +95,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .TotalEndpoints = 0, - .Class = 0x01, - .SubClass = 0x01, - .Protocol = 0x00, + .Class = AUDIO_CSCP_AudioClass, + .SubClass = AUDIO_CSCP_ControlSubclass, + .Protocol = AUDIO_CSCP_ControlProtocol, .InterfaceStrIndex = NO_DESCRIPTOR }, @@ -123,9 +123,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .TotalEndpoints = 2, - .Class = 0x01, - .SubClass = 0x03, - .Protocol = 0x00, + .Class = AUDIO_CSCP_AudioClass, + .SubClass = AUDIO_CSCP_MIDIStreamingSubclass, + .Protocol = AUDIO_CSCP_StreamingProtocol, .InterfaceStrIndex = NO_DESCRIPTOR }, diff --git a/Demos/Device/LowLevel/MassStorage/Descriptors.c b/Demos/Device/LowLevel/MassStorage/Descriptors.c index d06161049..b755e67f8 100644 --- a/Demos/Device/LowLevel/MassStorage/Descriptors.c +++ b/Demos/Device/LowLevel/MassStorage/Descriptors.c @@ -59,9 +59,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor = .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .USBSpecification = VERSION_BCD(01.10), - .Class = 0x00, - .SubClass = 0x00, - .Protocol = 0x00, + .Class = USB_CSCP_NoDeviceClass, + .SubClass = USB_CSCP_NoDeviceSubclass, + .Protocol = USB_CSCP_NoDeviceProtocol, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, @@ -107,9 +107,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .TotalEndpoints = 2, - .Class = 0x08, - .SubClass = 0x06, - .Protocol = 0x50, + .Class = MS_CSCP_MassStorageClass, + .SubClass = MS_CSCP_SCSITransparentSubclass, + .Protocol = MS_CSCP_BulkOnlyTransportProtocol, .InterfaceStrIndex = NO_DESCRIPTOR }, diff --git a/Demos/Device/LowLevel/Mouse/Descriptors.c b/Demos/Device/LowLevel/Mouse/Descriptors.c index dab5425e4..ee20dda24 100644 --- a/Demos/Device/LowLevel/Mouse/Descriptors.c +++ b/Demos/Device/LowLevel/Mouse/Descriptors.c @@ -83,9 +83,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor = .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .USBSpecification = VERSION_BCD(01.10), - .Class = 0x00, - .SubClass = 0x00, - .Protocol = 0x00, + .Class = USB_CSCP_NoDeviceClass, + .SubClass = USB_CSCP_NoDeviceSubclass, + .Protocol = USB_CSCP_NoDeviceProtocol, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, @@ -131,9 +131,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .TotalEndpoints = 1, - .Class = 0x03, - .SubClass = 0x01, - .Protocol = 0x02, + .Class = HID_CSCP_HIDClass, + .SubClass = HID_CSCP_BootSubclass, + .Protocol = HID_CSCP_MouseBootProtocol, .InterfaceStrIndex = NO_DESCRIPTOR }, diff --git a/Demos/Device/LowLevel/RNDISEthernet/Descriptors.c b/Demos/Device/LowLevel/RNDISEthernet/Descriptors.c index 33f1dfe93..933fd1afc 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/Descriptors.c +++ b/Demos/Device/LowLevel/RNDISEthernet/Descriptors.c @@ -47,9 +47,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor = .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .USBSpecification = VERSION_BCD(01.10), - .Class = 0x02, - .SubClass = 0x00, - .Protocol = 0x00, + .Class = CDC_CSCP_CDCClass, + .SubClass = CDC_CSCP_NoSpecificSubclass, + .Protocol = CDC_CSCP_NoSpecificProtocol, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, @@ -95,9 +95,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .TotalEndpoints = 1, - .Class = 0x02, - .SubClass = 0x02, - .Protocol = 0xFF, + .Class = CDC_CSCP_CDCClass, + .SubClass = CDC_CSCP_ACMSubclass, + .Protocol = CDC_CSCP_VendorSpecificProtocol, .InterfaceStrIndex = NO_DESCRIPTOR }, @@ -146,9 +146,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .TotalEndpoints = 2, - .Class = 0x0A, - .SubClass = 0x00, - .Protocol = 0x00, + .Class = CDC_CSCP_CDCDataClass, + .SubClass = CDC_CSCP_NoDataSubclass, + .Protocol = CDC_CSCP_NoDataProtocol, .InterfaceStrIndex = NO_DESCRIPTOR }, diff --git a/Demos/Device/LowLevel/RNDISEthernet/Lib/RNDIS.h b/Demos/Device/LowLevel/RNDISEthernet/Lib/RNDIS.h index 00ce86961..42cd99567 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/Lib/RNDIS.h +++ b/Demos/Device/LowLevel/RNDISEthernet/Lib/RNDIS.h @@ -41,7 +41,6 @@ #include <stdbool.h> #include "RNDISEthernet.h" - #include "RNDISConstants.h" #include "Ethernet.h" /* External Variables: */ diff --git a/Demos/Device/LowLevel/VirtualSerial/Descriptors.c b/Demos/Device/LowLevel/VirtualSerial/Descriptors.c index 1d98fbb81..2b650334e 100644 --- a/Demos/Device/LowLevel/VirtualSerial/Descriptors.c +++ b/Demos/Device/LowLevel/VirtualSerial/Descriptors.c @@ -59,9 +59,9 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor = .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, .USBSpecification = VERSION_BCD(01.10), - .Class = 0x02, - .SubClass = 0x00, - .Protocol = 0x00, + .Class = CDC_CSCP_CDCClass, + .SubClass = CDC_CSCP_NoSpecificSubclass, + .Protocol = CDC_CSCP_NoSpecificProtocol, .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, @@ -107,9 +107,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .TotalEndpoints = 1, - .Class = 0x02, - .SubClass = 0x02, - .Protocol = 0x01, + .Class = CDC_CSCP_CDCClass, + .SubClass = CDC_CSCP_ACMSubclass, + .Protocol = CDC_CSCP_ATCommandProtocol, .InterfaceStrIndex = NO_DESCRIPTOR }, @@ -158,9 +158,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .TotalEndpoints = 2, - .Class = 0x0A, - .SubClass = 0x00, - .Protocol = 0x00, + .Class = CDC_CSCP_CDCDataClass, + .SubClass = CDC_CSCP_NoDataSubclass, + .Protocol = CDC_CSCP_NoDataProtocol, .InterfaceStrIndex = NO_DESCRIPTOR }, |