aboutsummaryrefslogtreecommitdiff
path: root/protocol/lufa/descriptor.c
diff options
context:
space:
mode:
Diffstat (limited to 'protocol/lufa/descriptor.c')
-rw-r--r--protocol/lufa/descriptor.c159
1 files changed, 159 insertions, 0 deletions
diff --git a/protocol/lufa/descriptor.c b/protocol/lufa/descriptor.c
index c13a81bda..8a14c5e09 100644
--- a/protocol/lufa/descriptor.c
+++ b/protocol/lufa/descriptor.c
@@ -486,6 +486,165 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
486 .PollingIntervalMS = 0x01 486 .PollingIntervalMS = 0x01
487 }, 487 },
488#endif 488#endif
489
490#ifdef MIDI_ENABLE
491 .Audio_ControlInterface =
492 {
493 .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
494
495 .InterfaceNumber = MIDI_INTERFACE,
496 .AlternateSetting = 0,
497
498 .TotalEndpoints = 0,
499
500 .Class = AUDIO_CSCP_AudioClass,
501 .SubClass = AUDIO_CSCP_ControlSubclass,
502 .Protocol = AUDIO_CSCP_ControlProtocol,
503
504 .InterfaceStrIndex = NO_DESCRIPTOR
505 },
506
507 .Audio_ControlInterface_SPC =
508 {
509 .Header = {.Size = sizeof(USB_Audio_Descriptor_Interface_AC_t), .Type = DTYPE_CSInterface},
510 .Subtype = AUDIO_DSUBTYPE_CSInterface_Header,
511
512 .ACSpecification = VERSION_BCD(1,0,0),
513 .TotalLength = sizeof(USB_Audio_Descriptor_Interface_AC_t),
514
515 .InCollection = 1,
516 .InterfaceNumber = MIDI2_INTERFACE,
517 },
518
519 .Audio_StreamInterface =
520 {
521 .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
522
523 .InterfaceNumber = MIDI2_INTERFACE,
524 .AlternateSetting = 0,
525
526 .TotalEndpoints = 2,
527
528 .Class = AUDIO_CSCP_AudioClass,
529 .SubClass = AUDIO_CSCP_MIDIStreamingSubclass,
530 .Protocol = AUDIO_CSCP_StreamingProtocol,
531
532 .InterfaceStrIndex = NO_DESCRIPTOR
533 },
534
535 .Audio_StreamInterface_SPC =
536 {
537 .Header = {.Size = sizeof(USB_MIDI_Descriptor_AudioInterface_AS_t), .Type = DTYPE_CSInterface},
538 .Subtype = AUDIO_DSUBTYPE_CSInterface_General,
539
540 .AudioSpecification = VERSION_BCD(1,0,0),
541
542 .TotalLength = (sizeof(USB_Descriptor_Configuration_t) -
543 offsetof(USB_Descriptor_Configuration_t, Audio_StreamInterface_SPC))
544 },
545
546 .MIDI_In_Jack_Emb =
547 {
548 .Header = {.Size = sizeof(USB_MIDI_Descriptor_InputJack_t), .Type = DTYPE_CSInterface},
549 .Subtype = AUDIO_DSUBTYPE_CSInterface_InputTerminal,
550
551 .JackType = MIDI_JACKTYPE_Embedded,
552 .JackID = 0x01,
553
554 .JackStrIndex = NO_DESCRIPTOR
555 },
556
557 .MIDI_In_Jack_Ext =
558 {
559 .Header = {.Size = sizeof(USB_MIDI_Descriptor_InputJack_t), .Type = DTYPE_CSInterface},
560 .Subtype = AUDIO_DSUBTYPE_CSInterface_InputTerminal,
561
562 .JackType = MIDI_JACKTYPE_External,
563 .JackID = 0x02,
564
565 .JackStrIndex = NO_DESCRIPTOR
566 },
567
568 .MIDI_Out_Jack_Emb =
569 {
570 .Header = {.Size = sizeof(USB_MIDI_Descriptor_OutputJack_t), .Type = DTYPE_CSInterface},
571 .Subtype = AUDIO_DSUBTYPE_CSInterface_OutputTerminal,
572
573 .JackType = MIDI_JACKTYPE_Embedded,
574 .JackID = 0x03,
575
576 .NumberOfPins = 1,
577 .SourceJackID = {0x02},
578 .SourcePinID = {0x01},
579
580 .JackStrIndex = NO_DESCRIPTOR
581 },
582
583 .MIDI_Out_Jack_Ext =
584 {
585 .Header = {.Size = sizeof(USB_MIDI_Descriptor_OutputJack_t), .Type = DTYPE_CSInterface},
586 .Subtype = AUDIO_DSUBTYPE_CSInterface_OutputTerminal,
587
588 .JackType = MIDI_JACKTYPE_External,
589 .JackID = 0x04,
590
591 .NumberOfPins = 1,
592 .SourceJackID = {0x01},
593 .SourcePinID = {0x01},
594
595 .JackStrIndex = NO_DESCRIPTOR
596 },
597
598 .MIDI_In_Jack_Endpoint =
599 {
600 .Endpoint =
601 {
602 .Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},
603
604 .EndpointAddress = (ENDPOINT_DIR_IN | MIDI_STREAM_IN_EPNUM),
605 .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
606 .EndpointSize = MIDI_STREAM_EPSIZE,
607 .PollingIntervalMS = 0x05
608 },
609
610 .Refresh = 0,
611 .SyncEndpointNumber = 0
612 },
613
614 .MIDI_In_Jack_Endpoint_SPC =
615 {
616 .Header = {.Size = sizeof(USB_MIDI_Descriptor_Jack_Endpoint_t), .Type = DTYPE_CSEndpoint},
617 .Subtype = AUDIO_DSUBTYPE_CSEndpoint_General,
618
619 .TotalEmbeddedJacks = 0x01,
620 .AssociatedJackID = {0x01}
621 },
622
623 .MIDI_Out_Jack_Endpoint =
624 {
625 .Endpoint =
626 {
627 .Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},
628
629 .EndpointAddress = (ENDPOINT_DIR_OUT | MIDI_STREAM_OUT_EPNUM),
630 .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
631 .EndpointSize = MIDI_STREAM_EPSIZE,
632 .PollingIntervalMS = 0x05
633 },
634
635 .Refresh = 0,
636 .SyncEndpointNumber = 0
637 },
638
639 .MIDI_Out_Jack_Endpoint_SPC =
640 {
641 .Header = {.Size = sizeof(USB_MIDI_Descriptor_Jack_Endpoint_t), .Type = DTYPE_CSEndpoint},
642 .Subtype = AUDIO_DSUBTYPE_CSEndpoint_General,
643
644 .TotalEmbeddedJacks = 0x01,
645 .AssociatedJackID = {0x03}
646 }
647#endif
489}; 648};
490 649
491 650