projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add extra LUFA TAR archive export exclusions.
[pub/USBasp.git]
/
Demos
/
Device
/
LowLevel
/
MIDI
/
Descriptors.c
diff --git
a/Demos/Device/LowLevel/MIDI/Descriptors.c
b/Demos/Device/LowLevel/MIDI/Descriptors.c
index
5640c67
..
9ad0e86
100644
(file)
--- a/
Demos/Device/LowLevel/MIDI/Descriptors.c
+++ b/
Demos/Device/LowLevel/MIDI/Descriptors.c
@@
-1,13
+1,13
@@
/*
LUFA Library
/*
LUFA Library
- Copyright (C) Dean Camera, 201
0
.
+ Copyright (C) Dean Camera, 201
2
.
dean [at] fourwalledcubicle [dot] com
dean [at] fourwalledcubicle [dot] com
- www.fourwalledcubicle.com
+ www.lufa-lib.org
*/
/*
*/
/*
- Copyright 201
0
Dean Camera (dean [at] fourwalledcubicle [dot] com)
+ Copyright 201
2
Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
@@
-42,14
+42,14
@@
* number of device configurations. The descriptor is read out by the USB host when the enumeration
* process begins.
*/
* number of device configurations. The descriptor is read out by the USB host when the enumeration
* process begins.
*/
-USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
+
const
USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10),
{
.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,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@@
-69,7
+69,7
@@
USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
* and endpoints. The descriptor is read out by the USB host during the enumeration process when selecting
* a configuration so that the host may correctly communicate with the USB device.
*/
* and endpoints. The descriptor is read out by the USB host during the enumeration process when selecting
* a configuration so that the host may correctly communicate with the USB device.
*/
-USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
+
const
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Config =
{
{
.Config =
{
@@
-81,7
+81,7
@@
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.ConfigurationNumber = 1,
.ConfigurationStrIndex = NO_DESCRIPTOR,
.ConfigurationNumber = 1,
.ConfigurationStrIndex = NO_DESCRIPTOR,
- .ConfigAttributes = (USB_CONFIG_ATTR_
BUSPOWER
ED | USB_CONFIG_ATTR_SELFPOWERED),
+ .ConfigAttributes = (USB_CONFIG_ATTR_
RESERV
ED | USB_CONFIG_ATTR_SELFPOWERED),
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
},
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
},
@@
-95,23
+95,23
@@
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 0,
.TotalEndpoints = 0,
- .Class =
0x01
,
- .SubClass =
0x01
,
- .Protocol =
0x00
,
+ .Class =
AUDIO_CSCP_AudioClass
,
+ .SubClass =
AUDIO_CSCP_ControlSubclass
,
+ .Protocol =
AUDIO_CSCP_ControlProtocol
,
.InterfaceStrIndex = NO_DESCRIPTOR
},
.Audio_ControlInterface_SPC =
{
.InterfaceStrIndex = NO_DESCRIPTOR
},
.Audio_ControlInterface_SPC =
{
- .Header = {.Size = sizeof(USB_Audio_Interface_AC_t), .Type = DTYPE_CSInterface},
- .Subtype =
DSUBTYPE_Audio
Header,
+ .Header = {.Size = sizeof(USB_Audio_
Descriptor_
Interface_AC_t), .Type = DTYPE_CSInterface},
+ .Subtype =
AUDIO_DSUBTYPE_CSInterface_
Header,
- .A
udioSpecification
= VERSION_BCD(01.00),
- .TotalLength = sizeof(USB_Audio_Interface_AC_t),
+ .A
CSpecification
= VERSION_BCD(01.00),
+ .TotalLength = sizeof(USB_Audio_
Descriptor_
Interface_AC_t),
.InCollection = 1,
.InCollection = 1,
- .InterfaceNumber
s = {1}
,
+ .InterfaceNumber
= 1
,
},
.Audio_StreamInterface =
},
.Audio_StreamInterface =
@@
-123,17
+123,17
@@
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 2,
.TotalEndpoints = 2,
- .Class =
0x01
,
- .SubClass =
0x03
,
- .Protocol =
0x00
,
+ .Class =
AUDIO_CSCP_AudioClass
,
+ .SubClass =
AUDIO_CSCP_MIDIStreamingSubclass
,
+ .Protocol =
AUDIO_CSCP_StreamingProtocol
,
.InterfaceStrIndex = NO_DESCRIPTOR
},
.Audio_StreamInterface_SPC =
{
.InterfaceStrIndex = NO_DESCRIPTOR
},
.Audio_StreamInterface_SPC =
{
- .Header = {.Size = sizeof(USB_
Audio_Interface_MIDI
_AS_t), .Type = DTYPE_CSInterface},
- .Subtype =
DSUBTYPE
_General,
+ .Header = {.Size = sizeof(USB_
MIDI_Descriptor_AudioInterface
_AS_t), .Type = DTYPE_CSInterface},
+ .Subtype =
AUDIO_DSUBTYPE_CSInterface
_General,
.AudioSpecification = VERSION_BCD(01.00),
.AudioSpecification = VERSION_BCD(01.00),
@@
-143,10
+143,10
@@
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.MIDI_In_Jack_Emb =
{
.MIDI_In_Jack_Emb =
{
- .Header = {.Size = sizeof(USB_MIDI_
In_
Jack_t), .Type = DTYPE_CSInterface},
- .Subtype =
DSUBTYPE_InputJack
,
+ .Header = {.Size = sizeof(USB_MIDI_
Descriptor_Input
Jack_t), .Type = DTYPE_CSInterface},
+ .Subtype =
AUDIO_DSUBTYPE_CSInterface_InputTerminal
,
- .JackType =
JACKTYPE_EMBEDDED
,
+ .JackType =
MIDI_JACKTYPE_Embedded
,
.JackID = 0x01,
.JackStrIndex = NO_DESCRIPTOR
.JackID = 0x01,
.JackStrIndex = NO_DESCRIPTOR
@@
-154,10
+154,10
@@
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.MIDI_In_Jack_Ext =
{
.MIDI_In_Jack_Ext =
{
- .Header = {.Size = sizeof(USB_MIDI_
In_
Jack_t), .Type = DTYPE_CSInterface},
- .Subtype =
DSUBTYPE_InputJack
,
+ .Header = {.Size = sizeof(USB_MIDI_
Descriptor_Input
Jack_t), .Type = DTYPE_CSInterface},
+ .Subtype =
AUDIO_DSUBTYPE_CSInterface_InputTerminal
,
- .JackType =
JACKTYPE_EXTERNAL
,
+ .JackType =
MIDI_JACKTYPE_External
,
.JackID = 0x02,
.JackStrIndex = NO_DESCRIPTOR
.JackID = 0x02,
.JackStrIndex = NO_DESCRIPTOR
@@
-165,10
+165,10
@@
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.MIDI_Out_Jack_Emb =
{
.MIDI_Out_Jack_Emb =
{
- .Header = {.Size = sizeof(USB_MIDI_
Out_
Jack_t), .Type = DTYPE_CSInterface},
- .Subtype =
DSUBTYPE_OutputJack
,
+ .Header = {.Size = sizeof(USB_MIDI_
Descriptor_Output
Jack_t), .Type = DTYPE_CSInterface},
+ .Subtype =
AUDIO_DSUBTYPE_CSInterface_OutputTerminal
,
- .JackType =
JACKTYPE_EMBEDDED
,
+ .JackType =
MIDI_JACKTYPE_Embedded
,
.JackID = 0x03,
.NumberOfPins = 1,
.JackID = 0x03,
.NumberOfPins = 1,
@@
-180,10
+180,10
@@
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.MIDI_Out_Jack_Ext =
{
.MIDI_Out_Jack_Ext =
{
- .Header = {.Size = sizeof(USB_MIDI_
Out_
Jack_t), .Type = DTYPE_CSInterface},
- .Subtype =
DSUBTYPE_OutputJack
,
+ .Header = {.Size = sizeof(USB_MIDI_
Descriptor_Output
Jack_t), .Type = DTYPE_CSInterface},
+ .Subtype =
AUDIO_DSUBTYPE_CSInterface_OutputTerminal
,
- .JackType =
JACKTYPE_EXTERNAL
,
+ .JackType =
MIDI_JACKTYPE_External
,
.JackID = 0x04,
.NumberOfPins = 1,
.JackID = 0x04,
.NumberOfPins = 1,
@@
-197,12
+197,12
@@
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Endpoint =
{
{
.Endpoint =
{
- .Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_Audio_
Descriptor_
StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_D
ESCRIPTOR_D
IR_OUT | MIDI_STREAM_OUT_EPNUM),
+ .EndpointAddress = (ENDPOINT_DIR_OUT | MIDI_STREAM_OUT_EPNUM),
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MIDI_STREAM_EPSIZE,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MIDI_STREAM_EPSIZE,
- .PollingIntervalMS = 0
+ .PollingIntervalMS = 0
x01
},
.Refresh = 0,
},
.Refresh = 0,
@@
-211,8
+211,8
@@
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.MIDI_In_Jack_Endpoint_SPC =
{
.MIDI_In_Jack_Endpoint_SPC =
{
- .Header = {.Size = sizeof(USB_MIDI_Jack_Endpoint_t), .Type = DTYPE_CSEndpoint},
- .Subtype =
DSUBTYPE
_General,
+ .Header = {.Size = sizeof(USB_MIDI_
Descriptor_
Jack_Endpoint_t), .Type = DTYPE_CSEndpoint},
+ .Subtype =
AUDIO_DSUBTYPE_CSEndpoint
_General,
.TotalEmbeddedJacks = 0x01,
.AssociatedJackID = {0x01}
.TotalEmbeddedJacks = 0x01,
.AssociatedJackID = {0x01}
@@
-222,12
+222,12
@@
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Endpoint =
{
{
.Endpoint =
{
- .Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_Audio_
Descriptor_
StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_D
ESCRIPTOR_D
IR_IN | MIDI_STREAM_IN_EPNUM),
+ .EndpointAddress = (ENDPOINT_DIR_IN | MIDI_STREAM_IN_EPNUM),
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MIDI_STREAM_EPSIZE,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MIDI_STREAM_EPSIZE,
- .PollingIntervalMS = 0
+ .PollingIntervalMS = 0
x01
},
.Refresh = 0,
},
.Refresh = 0,
@@
-236,8
+236,8
@@
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.MIDI_Out_Jack_Endpoint_SPC =
{
.MIDI_Out_Jack_Endpoint_SPC =
{
- .Header = {.Size = sizeof(USB_MIDI_Jack_Endpoint_t), .Type = DTYPE_CSEndpoint},
- .Subtype =
DSUBTYPE
_General,
+ .Header = {.Size = sizeof(USB_MIDI_
Descriptor_
Jack_Endpoint_t), .Type = DTYPE_CSEndpoint},
+ .Subtype =
AUDIO_DSUBTYPE_CSEndpoint
_General,
.TotalEmbeddedJacks = 0x01,
.AssociatedJackID = {0x03}
.TotalEmbeddedJacks = 0x01,
.AssociatedJackID = {0x03}
@@
-248,7
+248,7
@@
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
* the string descriptor with index 0 (the first index). It is actually an array of 16-bit integers, which indicate
* via the language ID table available at USB.org what languages the device supports for its string descriptors.
*/
* the string descriptor with index 0 (the first index). It is actually an array of 16-bit integers, which indicate
* via the language ID table available at USB.org what languages the device supports for its string descriptors.
*/
-USB_Descriptor_String_t PROGMEM LanguageString =
+
const
USB_Descriptor_String_t PROGMEM LanguageString =
{
.Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},
{
.Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},
@@
-259,7
+259,7
@@
USB_Descriptor_String_t PROGMEM LanguageString =
* form, and is read out upon request by the host when the appropriate string ID is requested, listed in the Device
* Descriptor.
*/
* form, and is read out upon request by the host when the appropriate string ID is requested, listed in the Device
* Descriptor.
*/
-USB_Descriptor_String_t PROGMEM ManufacturerString =
+
const
USB_Descriptor_String_t PROGMEM ManufacturerString =
{
.Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},
{
.Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},
@@
-270,7
+270,7
@@
USB_Descriptor_String_t PROGMEM ManufacturerString =
* and is read out upon request by the host when the appropriate string ID is requested, listed in the Device
* Descriptor.
*/
* and is read out upon request by the host when the appropriate string ID is requested, listed in the Device
* Descriptor.
*/
-USB_Descriptor_String_t PROGMEM ProductString =
+
const
USB_Descriptor_String_t PROGMEM ProductString =
{
.Header = {.Size = USB_STRING_LEN(14), .Type = DTYPE_String},
{
.Header = {.Size = USB_STRING_LEN(14), .Type = DTYPE_String},