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