Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Erik Strand
lufa
Commits
c166dfc6
Commit
c166dfc6
authored
Sep 09, 2010
by
Dean Camera
Browse files
Added class specific descriptor type defines with standard USB-IF element naming.
parent
66f14d44
Changes
38
Hide whitespace changes
Inline
Side-by-side
Demos/Device/ClassDriver/AudioInput/Descriptors.c
View file @
c166dfc6
...
...
@@ -104,13 +104,13 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
Audio_ControlInterface_SPC
=
{
.
Header
=
{.
Size
=
sizeof
(
USB_Audio_Interface_AC_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Header
=
{.
Size
=
sizeof
(
USB_Audio_
Descriptor_
Interface_AC_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Subtype
=
DSUBTYPE_Header
,
.
ACSpecification
=
VERSION_BCD
(
01
.
00
),
.
TotalLength
=
(
sizeof
(
USB_Audio_Interface_AC_t
)
+
sizeof
(
USB_Audio_InputTerminal_t
)
+
sizeof
(
USB_Audio_OutputTerminal_t
)),
.
TotalLength
=
(
sizeof
(
USB_Audio_
Descriptor_
Interface_AC_t
)
+
sizeof
(
USB_Audio_
Descriptor_
InputTerminal_t
)
+
sizeof
(
USB_Audio_
Descriptor_
OutputTerminal_t
)),
.
InCollection
=
1
,
.
InterfaceNumbers
=
{
1
},
...
...
@@ -118,7 +118,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
Audio_InputTerminal
=
{
.
Header
=
{.
Size
=
sizeof
(
USB_Audio_InputTerminal_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Header
=
{.
Size
=
sizeof
(
USB_Audio_
Descriptor_
InputTerminal_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Subtype
=
DSUBTYPE_InputTerminal
,
.
TerminalID
=
0x01
,
...
...
@@ -134,7 +134,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
Audio_OutputTerminal
=
{
.
Header
=
{.
Size
=
sizeof
(
USB_Audio_OutputTerminal_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Header
=
{.
Size
=
sizeof
(
USB_Audio_
Descriptor_
OutputTerminal_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Subtype
=
DSUBTYPE_OutputTerminal
,
.
TerminalID
=
0x02
,
...
...
@@ -180,7 +180,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
Audio_StreamInterface_SPC
=
{
.
Header
=
{.
Size
=
sizeof
(
USB_Audio_Interface_AS_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Header
=
{.
Size
=
sizeof
(
USB_Audio_
Descriptor_
Interface_AS_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Subtype
=
DSUBTYPE_General
,
.
TerminalLink
=
0x02
,
...
...
@@ -191,7 +191,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
Audio_AudioFormat
=
{
.
Header
=
{.
Size
=
sizeof
(
USB_Audio_Format_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Header
=
{.
Size
=
sizeof
(
USB_Audio_
Descriptor_
Format_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Subtype
=
DSUBTYPE_Format
,
.
FormatType
=
0x01
,
...
...
@@ -208,7 +208,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.
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_DESCRIPTOR_DIR_IN
|
AUDIO_STREAM_EPNUM
),
.
Attributes
=
(
EP_TYPE_ISOCHRONOUS
|
ENDPOINT_ATTR_SYNC
|
ENDPOINT_USAGE_DATA
),
...
...
@@ -222,7 +222,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
Audio_StreamEndpoint_SPC
=
{
.
Header
=
{.
Size
=
sizeof
(
USB_Audio_StreamEndpoint_Spc_t
),
.
Type
=
DTYPE_AudioEndpoint
},
.
Header
=
{.
Size
=
sizeof
(
USB_Audio_
Descriptor_
StreamEndpoint_Spc_t
),
.
Type
=
DTYPE_AudioEndpoint
},
.
Subtype
=
DSUBTYPE_General
,
.
Attributes
=
0x00
,
...
...
Demos/Device/ClassDriver/AudioInput/Descriptors.h
View file @
c166dfc6
...
...
@@ -62,17 +62,17 @@
*/
typedef
struct
{
USB_Descriptor_Configuration_Header_t
Config
;
USB_Descriptor_Interface_t
Audio_ControlInterface
;
USB_Audio_Interface_AC_t
Audio_ControlInterface_SPC
;
USB_Audio_InputTerminal_t
Audio_InputTerminal
;
USB_Audio_OutputTerminal_t
Audio_OutputTerminal
;
USB_Descriptor_Interface_t
Audio_StreamInterface_Alt0
;
USB_Descriptor_Interface_t
Audio_StreamInterface_Alt1
;
USB_Audio_Interface_AS_t
Audio_StreamInterface_SPC
;
USB_Audio_Format_t
Audio_AudioFormat
;
USB_Audio_StreamEndpoint_Std_t
Audio_StreamEndpoint
;
USB_Audio_StreamEndpoint_Spc_t
Audio_StreamEndpoint_SPC
;
USB_Descriptor_Configuration_Header_t
Config
;
USB_Descriptor_Interface_t
Audio_ControlInterface
;
USB_Audio_
Descriptor_
Interface_AC_t
Audio_ControlInterface_SPC
;
USB_Audio_
Descriptor_
InputTerminal_t
Audio_InputTerminal
;
USB_Audio_
Descriptor_
OutputTerminal_t
Audio_OutputTerminal
;
USB_Descriptor_Interface_t
Audio_StreamInterface_Alt0
;
USB_Descriptor_Interface_t
Audio_StreamInterface_Alt1
;
USB_Audio_
Descriptor_
Interface_AS_t
Audio_StreamInterface_SPC
;
USB_Audio_
Descriptor_
Format_t
Audio_AudioFormat
;
USB_Audio_
Descriptor_
StreamEndpoint_Std_t
Audio_StreamEndpoint
;
USB_Audio_
Descriptor_
StreamEndpoint_Spc_t
Audio_StreamEndpoint_SPC
;
}
USB_Descriptor_Configuration_t
;
/* Function Prototypes: */
...
...
Demos/Device/ClassDriver/AudioOutput/Descriptors.c
View file @
c166dfc6
...
...
@@ -104,13 +104,13 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
Audio_ControlInterface_SPC
=
{
.
Header
=
{.
Size
=
sizeof
(
USB_Audio_Interface_AC_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Header
=
{.
Size
=
sizeof
(
USB_Audio_
Descriptor_
Interface_AC_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Subtype
=
DSUBTYPE_Header
,
.
ACSpecification
=
VERSION_BCD
(
01
.
00
),
.
TotalLength
=
(
sizeof
(
USB_Audio_Interface_AC_t
)
+
sizeof
(
USB_Audio_InputTerminal_t
)
+
sizeof
(
USB_Audio_OutputTerminal_t
)),
.
TotalLength
=
(
sizeof
(
USB_Audio_
Descriptor_
Interface_AC_t
)
+
sizeof
(
USB_Audio_
Descriptor_
InputTerminal_t
)
+
sizeof
(
USB_Audio_
Descriptor_
OutputTerminal_t
)),
.
InCollection
=
1
,
.
InterfaceNumbers
=
{
1
},
...
...
@@ -118,7 +118,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
Audio_InputTerminal
=
{
.
Header
=
{.
Size
=
sizeof
(
USB_Audio_InputTerminal_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Header
=
{.
Size
=
sizeof
(
USB_Audio_
Descriptor_
InputTerminal_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Subtype
=
DSUBTYPE_InputTerminal
,
.
TerminalID
=
0x01
,
...
...
@@ -134,7 +134,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
Audio_OutputTerminal
=
{
.
Header
=
{.
Size
=
sizeof
(
USB_Audio_OutputTerminal_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Header
=
{.
Size
=
sizeof
(
USB_Audio_
Descriptor_
OutputTerminal_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Subtype
=
DSUBTYPE_OutputTerminal
,
.
TerminalID
=
0x02
,
...
...
@@ -180,7 +180,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
Audio_StreamInterface_SPC
=
{
.
Header
=
{.
Size
=
sizeof
(
USB_Audio_Interface_AS_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Header
=
{.
Size
=
sizeof
(
USB_Audio_
Descriptor_
Interface_AS_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Subtype
=
DSUBTYPE_General
,
.
TerminalLink
=
0x01
,
...
...
@@ -191,7 +191,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
Audio_AudioFormat
=
{
.
Header
=
{.
Size
=
sizeof
(
USB_Audio_Format_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Header
=
{.
Size
=
sizeof
(
USB_Audio_
Descriptor_
Format_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Subtype
=
DSUBTYPE_Format
,
.
FormatType
=
0x01
,
...
...
@@ -208,7 +208,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.
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_DESCRIPTOR_DIR_OUT
|
AUDIO_STREAM_EPNUM
),
.
Attributes
=
(
EP_TYPE_ISOCHRONOUS
|
ENDPOINT_ATTR_SYNC
|
ENDPOINT_USAGE_DATA
),
...
...
@@ -222,7 +222,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
Audio_StreamEndpoint_SPC
=
{
.
Header
=
{.
Size
=
sizeof
(
USB_Audio_StreamEndpoint_Spc_t
),
.
Type
=
DTYPE_AudioEndpoint
},
.
Header
=
{.
Size
=
sizeof
(
USB_Audio_
Descriptor_
StreamEndpoint_Spc_t
),
.
Type
=
DTYPE_AudioEndpoint
},
.
Subtype
=
DSUBTYPE_General
,
.
Attributes
=
EP_ACCEPTS_SMALL_PACKETS
,
...
...
Demos/Device/ClassDriver/AudioOutput/Descriptors.h
View file @
c166dfc6
...
...
@@ -62,17 +62,17 @@
*/
typedef
struct
{
USB_Descriptor_Configuration_Header_t
Config
;
USB_Descriptor_Interface_t
Audio_ControlInterface
;
USB_Audio_Interface_AC_t
Audio_ControlInterface_SPC
;
USB_Audio_InputTerminal_t
Audio_InputTerminal
;
USB_Audio_OutputTerminal_t
Audio_OutputTerminal
;
USB_Descriptor_Interface_t
Audio_StreamInterface_Alt0
;
USB_Descriptor_Interface_t
Audio_StreamInterface_Alt1
;
USB_Audio_Interface_AS_t
Audio_StreamInterface_SPC
;
USB_Audio_Format_t
Audio_AudioFormat
;
USB_Audio_StreamEndpoint_Std_t
Audio_StreamEndpoint
;
USB_Audio_StreamEndpoint_Spc_t
Audio_StreamEndpoint_SPC
;
USB_Descriptor_Configuration_Header_t
Config
;
USB_Descriptor_Interface_t
Audio_ControlInterface
;
USB_Audio_
Descriptor_
Interface_AC_t
Audio_ControlInterface_SPC
;
USB_Audio_
Descriptor_
InputTerminal_t
Audio_InputTerminal
;
USB_Audio_
Descriptor_
OutputTerminal_t
Audio_OutputTerminal
;
USB_Descriptor_Interface_t
Audio_StreamInterface_Alt0
;
USB_Descriptor_Interface_t
Audio_StreamInterface_Alt1
;
USB_Audio_
Descriptor_
Interface_AS_t
Audio_StreamInterface_SPC
;
USB_Audio_
Descriptor_
Format_t
Audio_AudioFormat
;
USB_Audio_
Descriptor_
StreamEndpoint_Std_t
Audio_StreamEndpoint
;
USB_Audio_
Descriptor_
StreamEndpoint_Spc_t
Audio_StreamEndpoint_SPC
;
}
USB_Descriptor_Configuration_t
;
/* Function Prototypes: */
...
...
Demos/Device/ClassDriver/GenericHID/Descriptors.c
View file @
c166dfc6
...
...
@@ -130,7 +130,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
HID_GenericHID
=
{
.
Header
=
{.
Size
=
sizeof
(
USB_HID_Descriptor_t
),
.
Type
=
DTYPE_HID
},
.
Header
=
{.
Size
=
sizeof
(
USB_HID_Descriptor_
HID_
t
),
.
Type
=
DTYPE_HID
},
.
HIDSpec
=
VERSION_BCD
(
01
.
11
),
.
CountryCode
=
0x00
,
...
...
@@ -229,7 +229,7 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
break
;
case
DTYPE_HID
:
Address
=
&
ConfigurationDescriptor
.
HID_GenericHID
;
Size
=
sizeof
(
USB_HID_Descriptor_t
);
Size
=
sizeof
(
USB_HID_Descriptor_
HID_
t
);
break
;
case
DTYPE_Report
:
Address
=
&
GenericReport
;
...
...
Demos/Device/ClassDriver/GenericHID/Descriptors.h
View file @
c166dfc6
...
...
@@ -51,7 +51,7 @@
{
USB_Descriptor_Configuration_Header_t
Config
;
USB_Descriptor_Interface_t
HID_Interface
;
USB_HID_Descriptor_
t
HID_GenericHID
;
USB_HID_Descriptor_
HID_t
HID_GenericHID
;
USB_Descriptor_Endpoint_t
HID_ReportINEndpoint
;
}
USB_Descriptor_Configuration_t
;
...
...
Demos/Device/ClassDriver/Joystick/Descriptors.c
View file @
c166dfc6
...
...
@@ -140,7 +140,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
HID_JoystickHID
=
{
.
Header
=
{.
Size
=
sizeof
(
USB_HID_Descriptor_t
),
.
Type
=
DTYPE_HID
},
.
Header
=
{.
Size
=
sizeof
(
USB_HID_Descriptor_
HID_
t
),
.
Type
=
DTYPE_HID
},
.
HIDSpec
=
VERSION_BCD
(
01
.
11
),
.
CountryCode
=
0x00
,
...
...
@@ -239,7 +239,7 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
break
;
case
DTYPE_HID
:
Address
=
&
ConfigurationDescriptor
.
HID_JoystickHID
;
Size
=
sizeof
(
USB_HID_Descriptor_t
);
Size
=
sizeof
(
USB_HID_Descriptor_
HID_
t
);
break
;
case
DTYPE_Report
:
Address
=
&
JoystickReport
;
...
...
Demos/Device/ClassDriver/Joystick/Descriptors.h
View file @
c166dfc6
...
...
@@ -51,7 +51,7 @@
{
USB_Descriptor_Configuration_Header_t
Config
;
USB_Descriptor_Interface_t
HID_Interface
;
USB_HID_Descriptor_
t
HID_JoystickHID
;
USB_HID_Descriptor_
HID_t
HID_JoystickHID
;
USB_Descriptor_Endpoint_t
HID_ReportINEndpoint
;
}
USB_Descriptor_Configuration_t
;
...
...
Demos/Device/ClassDriver/Keyboard/Descriptors.c
View file @
c166dfc6
...
...
@@ -146,7 +146,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
HID_KeyboardHID
=
{
.
Header
=
{.
Size
=
sizeof
(
USB_HID_Descriptor_t
),
.
Type
=
DTYPE_HID
},
.
Header
=
{.
Size
=
sizeof
(
USB_HID_Descriptor_
HID_
t
),
.
Type
=
DTYPE_HID
},
.
HIDSpec
=
VERSION_BCD
(
01
.
11
),
.
CountryCode
=
0x00
,
...
...
@@ -245,7 +245,7 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
break
;
case
DTYPE_HID
:
Address
=
&
ConfigurationDescriptor
.
HID_KeyboardHID
;
Size
=
sizeof
(
USB_HID_Descriptor_t
);
Size
=
sizeof
(
USB_HID_Descriptor_
HID_
t
);
break
;
case
DTYPE_Report
:
Address
=
&
KeyboardReport
;
...
...
Demos/Device/ClassDriver/Keyboard/Descriptors.h
View file @
c166dfc6
...
...
@@ -51,7 +51,7 @@
{
USB_Descriptor_Configuration_Header_t
Config
;
USB_Descriptor_Interface_t
HID_Interface
;
USB_HID_Descriptor_
t
HID_KeyboardHID
;
USB_HID_Descriptor_
HID_t
HID_KeyboardHID
;
USB_Descriptor_Endpoint_t
HID_ReportINEndpoint
;
}
USB_Descriptor_Configuration_t
;
...
...
Demos/Device/ClassDriver/KeyboardMouse/Descriptors.c
View file @
c166dfc6
...
...
@@ -179,7 +179,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
HID1_KeyboardHID
=
{
.
Header
=
{.
Size
=
sizeof
(
USB_HID_Descriptor_t
),
.
Type
=
DTYPE_HID
},
.
Header
=
{.
Size
=
sizeof
(
USB_HID_Descriptor_
HID_
t
),
.
Type
=
DTYPE_HID
},
.
HIDSpec
=
VERSION_BCD
(
01
.
11
),
.
CountryCode
=
0x00
,
...
...
@@ -216,7 +216,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
HID2_MouseHID
=
{
.
Header
=
{.
Size
=
sizeof
(
USB_HID_Descriptor_t
),
.
Type
=
DTYPE_HID
},
.
Header
=
{.
Size
=
sizeof
(
USB_HID_Descriptor_
HID_
t
),
.
Type
=
DTYPE_HID
},
.
HIDSpec
=
VERSION_BCD
(
01
.
11
),
.
CountryCode
=
0x00
,
...
...
@@ -317,12 +317,12 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
if
(
!
(
wIndex
))
{
Address
=
&
ConfigurationDescriptor
.
HID1_KeyboardHID
;
Size
=
sizeof
(
USB_HID_Descriptor_t
);
Size
=
sizeof
(
USB_HID_Descriptor_
HID_
t
);
}
else
{
Address
=
&
ConfigurationDescriptor
.
HID2_MouseHID
;
Size
=
sizeof
(
USB_HID_Descriptor_t
);
Size
=
sizeof
(
USB_HID_Descriptor_
HID_
t
);
}
break
;
case
DTYPE_Report
:
...
...
Demos/Device/ClassDriver/KeyboardMouse/Descriptors.h
View file @
c166dfc6
...
...
@@ -51,10 +51,10 @@
{
USB_Descriptor_Configuration_Header_t
Config
;
USB_Descriptor_Interface_t
HID1_KeyboardInterface
;
USB_HID_Descriptor_
t
HID1_KeyboardHID
;
USB_HID_Descriptor_
HID_t
HID1_KeyboardHID
;
USB_Descriptor_Endpoint_t
HID1_ReportINEndpoint
;
USB_Descriptor_Interface_t
HID2_MouseInterface
;
USB_HID_Descriptor_
t
HID2_MouseHID
;
USB_HID_Descriptor_
HID_t
HID2_MouseHID
;
USB_Descriptor_Endpoint_t
HID2_ReportINEndpoint
;
}
USB_Descriptor_Configuration_t
;
...
...
Demos/Device/ClassDriver/MIDI/Descriptors.c
View file @
c166dfc6
...
...
@@ -104,11 +104,11 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
Audio_ControlInterface_SPC
=
{
.
Header
=
{.
Size
=
sizeof
(
USB_Audio_Interface_AC_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Header
=
{.
Size
=
sizeof
(
USB_Audio_
Descriptor_
Interface_AC_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Subtype
=
DSUBTYPE_Header
,
.
ACSpecification
=
VERSION_BCD
(
01
.
00
),
.
TotalLength
=
sizeof
(
USB_Audio_Interface_AC_t
),
.
TotalLength
=
sizeof
(
USB_Audio_
Descriptor_
Interface_AC_t
),
.
InCollection
=
1
,
.
InterfaceNumbers
=
{
1
},
...
...
@@ -132,7 +132,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
Audio_StreamInterface_SPC
=
{
.
Header
=
{.
Size
=
sizeof
(
USB_MIDI_AudioInterface_AS_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Header
=
{.
Size
=
sizeof
(
USB_MIDI_
Descriptor_
AudioInterface_AS_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Subtype
=
DSUBTYPE_General
,
.
AudioSpecification
=
VERSION_BCD
(
01
.
00
),
...
...
@@ -143,7 +143,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
MIDI_In_Jack_Emb
=
{
.
Header
=
{.
Size
=
sizeof
(
USB_MIDI_
In_
Jack_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Header
=
{.
Size
=
sizeof
(
USB_MIDI_
Descriptor_Input
Jack_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Subtype
=
DSUBTYPE_InputJack
,
.
JackType
=
MIDI_JACKTYPE_EMBEDDED
,
...
...
@@ -154,7 +154,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
MIDI_In_Jack_Ext
=
{
.
Header
=
{.
Size
=
sizeof
(
USB_MIDI_
In_
Jack_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Header
=
{.
Size
=
sizeof
(
USB_MIDI_
Descriptor_Input
Jack_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Subtype
=
DSUBTYPE_InputJack
,
.
JackType
=
MIDI_JACKTYPE_EXTERNAL
,
...
...
@@ -165,7 +165,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
MIDI_Out_Jack_Emb
=
{
.
Header
=
{.
Size
=
sizeof
(
USB_MIDI_
Out_
Jack_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Header
=
{.
Size
=
sizeof
(
USB_MIDI_
Descriptor_Output
Jack_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Subtype
=
DSUBTYPE_OutputJack
,
.
JackType
=
MIDI_JACKTYPE_EMBEDDED
,
...
...
@@ -180,7 +180,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
MIDI_Out_Jack_Ext
=
{
.
Header
=
{.
Size
=
sizeof
(
USB_MIDI_
Out_
Jack_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Header
=
{.
Size
=
sizeof
(
USB_MIDI_
Descriptor_Output
Jack_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Subtype
=
DSUBTYPE_OutputJack
,
.
JackType
=
MIDI_JACKTYPE_EXTERNAL
,
...
...
@@ -197,7 +197,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.
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_DESCRIPTOR_DIR_OUT
|
MIDI_STREAM_OUT_EPNUM
),
.
Attributes
=
(
EP_TYPE_BULK
|
ENDPOINT_ATTR_NO_SYNC
|
ENDPOINT_USAGE_DATA
),
...
...
@@ -211,7 +211,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
MIDI_In_Jack_Endpoint_SPC
=
{
.
Header
=
{.
Size
=
sizeof
(
USB_MIDI_Jack_Endpoint_t
),
.
Type
=
DTYPE_AudioEndpoint
},
.
Header
=
{.
Size
=
sizeof
(
USB_MIDI_
Descriptor_
Jack_Endpoint_t
),
.
Type
=
DTYPE_AudioEndpoint
},
.
Subtype
=
DSUBTYPE_General
,
.
TotalEmbeddedJacks
=
0x01
,
...
...
@@ -222,7 +222,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.
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_DESCRIPTOR_DIR_IN
|
MIDI_STREAM_IN_EPNUM
),
.
Attributes
=
(
EP_TYPE_BULK
|
ENDPOINT_ATTR_NO_SYNC
|
ENDPOINT_USAGE_DATA
),
...
...
@@ -236,7 +236,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
MIDI_Out_Jack_Endpoint_SPC
=
{
.
Header
=
{.
Size
=
sizeof
(
USB_MIDI_Jack_Endpoint_t
),
.
Type
=
DTYPE_AudioEndpoint
},
.
Header
=
{.
Size
=
sizeof
(
USB_MIDI_
Descriptor_
Jack_Endpoint_t
),
.
Type
=
DTYPE_AudioEndpoint
},
.
Subtype
=
DSUBTYPE_General
,
.
TotalEmbeddedJacks
=
0x01
,
...
...
Demos/Device/ClassDriver/MIDI/Descriptors.h
View file @
c166dfc6
...
...
@@ -59,19 +59,19 @@
*/
typedef
struct
{
USB_Descriptor_Configuration_Header_t
Config
;
USB_Descriptor_Interface_t
Audio_ControlInterface
;
USB_Audio_Interface_AC_t
Audio_ControlInterface_SPC
;
USB_Descriptor_Interface_t
Audio_StreamInterface
;
USB_MIDI_AudioInterface_AS_t
Audio_StreamInterface_SPC
;
USB_MIDI_
In_Jack_t
MIDI_In_Jack_Emb
;
USB_MIDI_
In_Jack_t
MIDI_In_Jack_Ext
;
USB_MIDI_
Out_Jack_t
MIDI_Out_Jack_Emb
;
USB_MIDI_
Out_Jack_t
MIDI_Out_Jack_Ext
;
USB_Audio_StreamEndpoint_Std_t
MIDI_In_Jack_Endpoint
;
USB_MIDI_Jack_Endpoint_t
MIDI_In_Jack_Endpoint_SPC
;
USB_Audio_StreamEndpoint_Std_t
MIDI_Out_Jack_Endpoint
;
USB_MIDI_Jack_Endpoint_t
MIDI_Out_Jack_Endpoint_SPC
;
USB_Descriptor_Configuration_Header_t
Config
;
USB_Descriptor_Interface_t
Audio_ControlInterface
;
USB_Audio_
Descriptor_
Interface_AC_t
Audio_ControlInterface_SPC
;
USB_Descriptor_Interface_t
Audio_StreamInterface
;
USB_MIDI_
Descriptor_
AudioInterface_AS_t
Audio_StreamInterface_SPC
;
USB_MIDI_
Descriptor_InputJack_t
MIDI_In_Jack_Emb
;
USB_MIDI_
Descriptor_InputJack_t
MIDI_In_Jack_Ext
;
USB_MIDI_
Descriptor_OutputJack_t
MIDI_Out_Jack_Emb
;
USB_MIDI_
Descriptor_OutputJack_t
MIDI_Out_Jack_Ext
;
USB_Audio_
Descriptor_
StreamEndpoint_Std_t
MIDI_In_Jack_Endpoint
;
USB_MIDI_
Descriptor_
Jack_Endpoint_t
MIDI_In_Jack_Endpoint_SPC
;
USB_Audio_
Descriptor_
StreamEndpoint_Std_t
MIDI_Out_Jack_Endpoint
;
USB_MIDI_
Descriptor_
Jack_Endpoint_t
MIDI_Out_Jack_Endpoint_SPC
;
}
USB_Descriptor_Configuration_t
;
/* Function Prototypes: */
...
...
Demos/Device/ClassDriver/MassStorageKeyboard/Descriptors.c
View file @
c166dfc6
...
...
@@ -195,7 +195,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
HID_KeyboardHID
=
{
.
Header
=
{.
Size
=
sizeof
(
USB_HID_Descriptor_t
),
.
Type
=
DTYPE_HID
},
.
Header
=
{.
Size
=
sizeof
(
USB_HID_Descriptor_
HID_
t
),
.
Type
=
DTYPE_HID
},
.
HIDSpec
=
VERSION_BCD
(
01
.
11
),
.
CountryCode
=
0x00
,
...
...
@@ -294,7 +294,7 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
break
;
case
DTYPE_HID
:
Address
=
&
ConfigurationDescriptor
.
HID_KeyboardHID
;
Size
=
sizeof
(
USB_HID_Descriptor_t
);
Size
=
sizeof
(
USB_HID_Descriptor_
HID_
t
);
break
;
case
DTYPE_Report
:
Address
=
&
KeyboardReport
;
...
...
Demos/Device/ClassDriver/MassStorageKeyboard/Descriptors.h
View file @
c166dfc6
...
...
@@ -72,7 +72,7 @@
USB_Descriptor_Endpoint_t
MS_DataInEndpoint
;
USB_Descriptor_Endpoint_t
MS_DataOutEndpoint
;
USB_Descriptor_Interface_t
HID_KeyboardInterface
;
USB_HID_Descriptor_
t
HID_KeyboardHID
;
USB_HID_Descriptor_
HID_t
HID_KeyboardHID
;
USB_Descriptor_Endpoint_t
HID_ReportINEndpoint
;
}
USB_Descriptor_Configuration_t
;
...
...
Demos/Device/ClassDriver/Mouse/Descriptors.c
View file @
c166dfc6
...
...
@@ -140,7 +140,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
HID_MouseHID
=
{
.
Header
=
{.
Size
=
sizeof
(
USB_HID_Descriptor_t
),
.
Type
=
DTYPE_HID
},
.
Header
=
{.
Size
=
sizeof
(
USB_HID_Descriptor_
HID_
t
),
.
Type
=
DTYPE_HID
},
.
HIDSpec
=
VERSION_BCD
(
01
.
11
),
.
CountryCode
=
0x00
,
...
...
@@ -239,7 +239,7 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
break
;
case
DTYPE_HID
:
Address
=
&
ConfigurationDescriptor
.
HID_MouseHID
;
Size
=
sizeof
(
USB_HID_Descriptor_t
);
Size
=
sizeof
(
USB_HID_Descriptor_
HID_
t
);
break
;
case
DTYPE_Report
:
Address
=
&
MouseReport
;
...
...
Demos/Device/ClassDriver/Mouse/Descriptors.h
View file @
c166dfc6
...
...
@@ -51,7 +51,7 @@
{
USB_Descriptor_Configuration_Header_t
Config
;
USB_Descriptor_Interface_t
HID_Interface
;
USB_HID_Descriptor_
t
HID_MouseHID
;
USB_HID_Descriptor_
HID_t
HID_MouseHID
;
USB_Descriptor_Endpoint_t
HID_ReportINEndpoint
;
}
USB_Descriptor_Configuration_t
;
...
...
Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.c
View file @
c166dfc6
...
...
@@ -252,7 +252,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
HID_MouseHID
=
{
.
Header
=
{.
Size
=
sizeof
(
USB_HID_Descriptor_t
),
.
Type
=
DTYPE_HID
},
.
Header
=
{.
Size
=
sizeof
(
USB_HID_Descriptor_
HID_
t
),
.
Type
=
DTYPE_HID
},
.
HIDSpec
=
VERSION_BCD
(
01
.
11
),
.
CountryCode
=
0x00
,
...
...
@@ -351,7 +351,7 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
break
;
case
DTYPE_HID
:
Address
=
&
ConfigurationDescriptor
.
HID_MouseHID
;
Size
=
sizeof
(
USB_HID_Descriptor_t
);
Size
=
sizeof
(
USB_HID_Descriptor_
HID_
t
);
break
;
case
DTYPE_Report
:
Address
=
&
MouseReport
;
...
...
Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.h
View file @
c166dfc6
...
...
@@ -83,7 +83,7 @@
USB_Descriptor_Endpoint_t
CDC_DataOutEndpoint
;
USB_Descriptor_Endpoint_t
CDC_DataInEndpoint
;
USB_Descriptor_Interface_t
HID_Interface
;
USB_HID_Descriptor_
t
HID_MouseHID
;
USB_HID_Descriptor_
HID_t
HID_MouseHID
;
USB_Descriptor_Endpoint_t
HID_ReportINEndpoint
;
}
USB_Descriptor_Configuration_t
;
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment