-
Notifications
You must be signed in to change notification settings - Fork 12
/
usb_midi_descriptor.c
1158 lines (1041 loc) · 45.3 KB
/
usb_midi_descriptor.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
__ __| | | /_) | ___| | |
| __ \ _ \ ' / | | / | _ \ __ \ | _` | __ \ __|
| | | | __/ . \ | < | | __/ | | | ( | | |\__ \
_| _| |_|\___| _|\_\_|_|\_\\____|\___|_| _| _____|\__,_|_.__/ ____/
-----------------------------------------------------------------------------
USBMIDIKLIK 4X4 - USB Midi advanced firmware for STM32F1 platform.
Copyright (C) 2019 by The KikGen labs.
LICENCE CREATIVE COMMONS - Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)
This file is part of the USBMIDIKLIK-4x4 distribution
https://github.com/TheKikGen/USBMidiKliK4x4
Copyright (c) 2019 TheKikGen Labs team.
-----------------------------------------------------------------------------
USB MIDI LIBRARY adapted by TheKikGenLab from USB LeafLabs LLC. USB API :
Perry Hung, Magnus Lundin,Donald Delmar Davis, Suspect Devices.
GPL Licence.
-----------------------------------------------------------------------------
Disclaimer.
This work is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License.
To view a copy of this license, visit http://creativecommons.org/licenses/by-nc/4.0/
or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
NON COMMERCIAL - PERSONAL USE ONLY : You may not use the material for pure
commercial closed code solution without the licensor permission.
You are free to copy and redistribute the material in any medium or format,
adapt, transform, and build upon the material.
You must give appropriate credit, a link to the github site
https://github.com/TheKikGen/USBMidiKliK4x4 , provide a link to the license,
and indicate if changes were made. You may do so in any reasonable manner,
but not in any way that suggests the licensor endorses you or your use.
You may not apply legal terms or technological measures that legally restrict
others from doing anything the license permits.
You do not have to comply with the license for elements of the material
in the public domain or where your use is permitted by an applicable exception
or limitation.
No warranties are given. The license may not give you all of the permissions
necessary for your intended use. This program is distributed in the hope that
it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
// ---------------------------------------------------------------
// Full assembled USB Descriptor FOR KIKPAD DEVICE
// ---------------------------------------------------------------
#include "hardware_config.h"
#include "usb_midi_device.h"
// ---------------------------------------------------------------------------
// String Descriptors:
// ----------------------------------------------------------------------------
/* Remember that bLengh is the full length of the descriptor including
blength and bDescriptorType (2 bytes). So the blength of a string of n bytes
will be 2 + n * 2. USB_DESCRIPTOR_STRING_LEN macro does that for us.
*/
/* Unicode language identifier: 0x0409 is US English */
static const usb_descriptor_string usbMIDIDescriptor_LangID = {
.bLength = USB_DESCRIPTOR_STRING_LEN(1),
.bDescriptorType = USB_DESCRIPTOR_TYPE_STRING,
.bString = {0x09, 0x04},
};
#define STRING_IMANUFACTURER_LEN 14
#define STRING_IMANUFACTURER_ID 1
static const usb_descriptor_string usbMIDIDescriptor_iManufacturer = {
.bLength = USB_DESCRIPTOR_STRING_LEN(STRING_IMANUFACTURER_LEN),
.bDescriptorType = USB_DESCRIPTOR_TYPE_STRING,
// TheKikGen Labs
.bString = {'T', 0, 'h', 0, 'e', 0, 'K', 0,'i', 0, 'K', 0, 'G', 0, 'e', 0, 'n', 0, ' ', 0, 'L', 0, 'a', 0, 'b', 0, 's', 0},
};
// Product string. Check if it is dynamic of static
#define STRING_IPRODUCT_ID 2
#ifdef USB_MIDI_PRODUCT_STRING_SIZE
#if USB_MIDI_PRODUCT_STRING_SIZE > 32
#error "USB_MIDI_PRODUCT_STRING_SIZE is 32 bytes maximum. Check usb_midi_device.h
#endif
#define STRING_IPRODUCT_LEN USB_MIDI_PRODUCT_STRING_SIZE
static usb_descriptor_string usbMIDIDescriptor_iProduct = {
.bLength = USB_DESCRIPTOR_STRING_LEN(STRING_IPRODUCT_LEN),
.bDescriptorType = USB_DESCRIPTOR_TYPE_STRING,
.bString = { 'K', 0, 'I', 0, 'K', 0, 'P', 0, 'A', 0 ,'D', 0, 0,0, 0,0, 0,0, 0,0,
0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0,
0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0,
0,0, 0,0, 0,0, }, // 33x2 max invluding tail 0
};
#else
#define STRING_IPRODUCT_LEN 6
static const usb_descriptor_string usbMIDIDescriptor_iProduct = {
.bLength = USB_DESCRIPTOR_STRING_LEN(STRING_IPRODUCT_LEN),
.bDescriptorType = USB_DESCRIPTOR_TYPE_STRING,
// USB_MIDI_PRODUCT_STRING_SIZE max = 32
.bString = { 'K', 0, 'I', 0, 'K', 0, 'P', 0, 'A', 0 ,'D', 0, },
};
#endif
// Interface string
#define STRING_IINTERFACE_LEN 4
#define STRING_IINTERFACE_ID 3
static const usb_descriptor_string usbMIDIDescriptor_iInterface = {
.bLength = USB_DESCRIPTOR_STRING_LEN(STRING_IINTERFACE_LEN),
.bDescriptorType = USB_DESCRIPTOR_TYPE_STRING,
.bString = {'M', 0, 'i', 0, 'd', 0, 'i', 0},
};
// Midi IN 1-n
#define STRING_IJACK_IN_LEN 9
#define STRING_IJACK_IN_ID 4
static const usb_descriptor_string usbMIDIDescriptor_iJack_IN = {
.bLength = USB_DESCRIPTOR_STRING_LEN(STRING_IJACK_IN_LEN),
.bDescriptorType = USB_DESCRIPTOR_TYPE_STRING,
.bString = {'K', 0, 'I', 0, 'K', 0, 'P', 0, 'A', 0, 'D', 0, ' ', 0, 'I', 0, 'N', 0 },
};
// Midi OUT 1-n
#define STRING_IJACK_OUT_LEN 10
#define STRING_IJACK_OUT_ID 5
static const usb_descriptor_string usbMIDIDescriptor_iJack_OUT = {
.bLength = USB_DESCRIPTOR_STRING_LEN(STRING_IJACK_OUT_LEN),
.bDescriptorType = USB_DESCRIPTOR_TYPE_STRING,
.bString = {'K', 0, 'I', 0, 'K', 0, 'P', 0, 'A', 0, 'D', 0, ' ', 0, 'O', 0, 'U', 0 , 'T', 0 },
};
// Assemble string descriptors array
#ifndef USB_MIDI_PRODUCT_STRING_SIZE
const
#endif
static ONE_DESCRIPTOR usbMIDIString_Descriptor[] = {
{(uint8*)&usbMIDIDescriptor_LangID, USB_DESCRIPTOR_STRING_LEN(1) },
{(uint8*)&usbMIDIDescriptor_iManufacturer,USB_DESCRIPTOR_STRING_LEN(STRING_IMANUFACTURER_LEN)},
{(uint8*)&usbMIDIDescriptor_iProduct, USB_DESCRIPTOR_STRING_LEN(STRING_IPRODUCT_LEN)},
{(uint8*)&usbMIDIDescriptor_iInterface, USB_DESCRIPTOR_STRING_LEN(STRING_IINTERFACE_LEN) },
{(uint8*)&usbMIDIDescriptor_iJack_IN, USB_DESCRIPTOR_STRING_LEN(STRING_IJACK_IN_LEN) },
{(uint8*)&usbMIDIDescriptor_iJack_OUT, USB_DESCRIPTOR_STRING_LEN(STRING_IJACK_OUT_LEN) },
};
// ---------------------------------------------------------------
// DEVICE DESCRIPTOR
// ---------------------------------------------------------------
static usb_descriptor_device usbMIDIDescriptor_Device = {
.bLength = sizeof(usb_descriptor_device),
.bDescriptorType = USB_DESCRIPTOR_TYPE_DEVICE,
.bcdUSB = 0x0110,
.bDeviceClass = USB_DEVICE_CLASS_UNDEFINED,
.bDeviceSubClass = USB_DEVICE_SUBCLASS_UNDEFINED,
.bDeviceProtocol = 0x00,
.bMaxPacketSize0 = USB_MIDI_MAX_PACKET_SIZE,
.idVendor = USB_MIDI_VENDORID, // R/W
.idProduct = USB_MIDI_PRODUCTID, // R/W
// Fill the firmware version from build number
.bcdDevice = BCD_VERSION,
.iManufacturer = STRING_IMANUFACTURER_ID,
.iProduct = STRING_IPRODUCT_ID,
.iSerialNumber = 0x00,
.bNumConfigurations = 0x01,
};
// ---------------------------------------------------------------
// CONFIGURATION DESCRIPTOR
// ---------------------------------------------------------------
typedef struct {
usb_descriptor_config_header Config_Header;
/* Control Interface */
usb_descriptor_interface AC_Interface;
AC_CS_INTERFACE_DESCRIPTOR(1) AC_CS_Interface;
/* Control Interface */
usb_descriptor_interface MS_Interface;
MS_CS_INTERFACE_DESCRIPTOR MS_CS_Interface;
// MIDI IN DESCRIPTORS - 16 PAIRS MAX
// 2 PORTS IS THE MINIMUM.
// Embedded
MIDI_IN_JACK_DESCRIPTOR MIDI_IN_JACK_1;
MIDI_IN_JACK_DESCRIPTOR MIDI_IN_JACK_2;
#if USB_MIDI_IO_PORT_NUM >= 4
MIDI_IN_JACK_DESCRIPTOR MIDI_IN_JACK_3;
MIDI_IN_JACK_DESCRIPTOR MIDI_IN_JACK_4;
#if USB_MIDI_IO_PORT_NUM >= 8
MIDI_IN_JACK_DESCRIPTOR MIDI_IN_JACK_5;
MIDI_IN_JACK_DESCRIPTOR MIDI_IN_JACK_6;
MIDI_IN_JACK_DESCRIPTOR MIDI_IN_JACK_7;
MIDI_IN_JACK_DESCRIPTOR MIDI_IN_JACK_8;
#if USB_MIDI_IO_PORT_NUM >= 12
MIDI_IN_JACK_DESCRIPTOR MIDI_IN_JACK_9;
MIDI_IN_JACK_DESCRIPTOR MIDI_IN_JACK_A;
MIDI_IN_JACK_DESCRIPTOR MIDI_IN_JACK_B;
MIDI_IN_JACK_DESCRIPTOR MIDI_IN_JACK_C;
#if USB_MIDI_IO_PORT_NUM >= 16
MIDI_IN_JACK_DESCRIPTOR MIDI_IN_JACK_D;
MIDI_IN_JACK_DESCRIPTOR MIDI_IN_JACK_E;
MIDI_IN_JACK_DESCRIPTOR MIDI_IN_JACK_F;
MIDI_IN_JACK_DESCRIPTOR MIDI_IN_JACK_10;
#endif
#endif
#endif
#endif
// External
MIDI_IN_JACK_DESCRIPTOR MIDI_IN_JACK_11;
MIDI_IN_JACK_DESCRIPTOR MIDI_IN_JACK_12;
#if USB_MIDI_IO_PORT_NUM >= 4
MIDI_IN_JACK_DESCRIPTOR MIDI_IN_JACK_13;
MIDI_IN_JACK_DESCRIPTOR MIDI_IN_JACK_14;
#if USB_MIDI_IO_PORT_NUM >= 8
MIDI_IN_JACK_DESCRIPTOR MIDI_IN_JACK_15;
MIDI_IN_JACK_DESCRIPTOR MIDI_IN_JACK_16;
MIDI_IN_JACK_DESCRIPTOR MIDI_IN_JACK_17;
MIDI_IN_JACK_DESCRIPTOR MIDI_IN_JACK_18;
#if USB_MIDI_IO_PORT_NUM >= 12
MIDI_IN_JACK_DESCRIPTOR MIDI_IN_JACK_19;
MIDI_IN_JACK_DESCRIPTOR MIDI_IN_JACK_1A;
MIDI_IN_JACK_DESCRIPTOR MIDI_IN_JACK_1B;
MIDI_IN_JACK_DESCRIPTOR MIDI_IN_JACK_1C;
#if USB_MIDI_IO_PORT_NUM >= 16
MIDI_IN_JACK_DESCRIPTOR MIDI_IN_JACK_1D;
MIDI_IN_JACK_DESCRIPTOR MIDI_IN_JACK_1E;
MIDI_IN_JACK_DESCRIPTOR MIDI_IN_JACK_1F;
MIDI_IN_JACK_DESCRIPTOR MIDI_IN_JACK_20;
#endif
#endif
#endif
#endif
// MIDI OUT DESCRIPTORS - 16 PAIRS MAX
// Embedded
MIDI_OUT_JACK_DESCRIPTOR(1) MIDI_OUT_JACK_21;
MIDI_OUT_JACK_DESCRIPTOR(1) MIDI_OUT_JACK_22;
#if USB_MIDI_IO_PORT_NUM >= 4
MIDI_OUT_JACK_DESCRIPTOR(1) MIDI_OUT_JACK_23;
MIDI_OUT_JACK_DESCRIPTOR(1) MIDI_OUT_JACK_24;
#if USB_MIDI_IO_PORT_NUM >= 8
MIDI_OUT_JACK_DESCRIPTOR(1) MIDI_OUT_JACK_25;
MIDI_OUT_JACK_DESCRIPTOR(1) MIDI_OUT_JACK_26;
MIDI_OUT_JACK_DESCRIPTOR(1) MIDI_OUT_JACK_27;
MIDI_OUT_JACK_DESCRIPTOR(1) MIDI_OUT_JACK_28;
#if USB_MIDI_IO_PORT_NUM >= 12
MIDI_OUT_JACK_DESCRIPTOR(1) MIDI_OUT_JACK_29;
MIDI_OUT_JACK_DESCRIPTOR(1) MIDI_OUT_JACK_2A;
MIDI_OUT_JACK_DESCRIPTOR(1) MIDI_OUT_JACK_2B;
MIDI_OUT_JACK_DESCRIPTOR(1) MIDI_OUT_JACK_2C;
#if USB_MIDI_IO_PORT_NUM >= 16
MIDI_OUT_JACK_DESCRIPTOR(1) MIDI_OUT_JACK_2D;
MIDI_OUT_JACK_DESCRIPTOR(1) MIDI_OUT_JACK_2E;
MIDI_OUT_JACK_DESCRIPTOR(1) MIDI_OUT_JACK_2F;
MIDI_OUT_JACK_DESCRIPTOR(1) MIDI_OUT_JACK_30;
#endif
#endif
#endif
#endif
// External
MIDI_OUT_JACK_DESCRIPTOR(1) MIDI_OUT_JACK_31;
MIDI_OUT_JACK_DESCRIPTOR(1) MIDI_OUT_JACK_32;
#if USB_MIDI_IO_PORT_NUM >= 4
MIDI_OUT_JACK_DESCRIPTOR(1) MIDI_OUT_JACK_33;
MIDI_OUT_JACK_DESCRIPTOR(1) MIDI_OUT_JACK_34;
#if USB_MIDI_IO_PORT_NUM >= 8
MIDI_OUT_JACK_DESCRIPTOR(1) MIDI_OUT_JACK_35;
MIDI_OUT_JACK_DESCRIPTOR(1) MIDI_OUT_JACK_36;
MIDI_OUT_JACK_DESCRIPTOR(1) MIDI_OUT_JACK_37;
MIDI_OUT_JACK_DESCRIPTOR(1) MIDI_OUT_JACK_38;
#if USB_MIDI_IO_PORT_NUM >= 12
MIDI_OUT_JACK_DESCRIPTOR(1) MIDI_OUT_JACK_39;
MIDI_OUT_JACK_DESCRIPTOR(1) MIDI_OUT_JACK_3A;
MIDI_OUT_JACK_DESCRIPTOR(1) MIDI_OUT_JACK_3B;
MIDI_OUT_JACK_DESCRIPTOR(1) MIDI_OUT_JACK_3C;
#if USB_MIDI_IO_PORT_NUM >= 16
MIDI_OUT_JACK_DESCRIPTOR(1) MIDI_OUT_JACK_3D;
MIDI_OUT_JACK_DESCRIPTOR(1) MIDI_OUT_JACK_3E;
MIDI_OUT_JACK_DESCRIPTOR(1) MIDI_OUT_JACK_3F;
MIDI_OUT_JACK_DESCRIPTOR(1) MIDI_OUT_JACK_40;
#endif
#endif
#endif
#endif
MIDI_USB_DESCRIPTOR_ENDPOINT DataOutEndpoint;
MS_CS_BULK_ENDPOINT_DESCRIPTOR(USB_MIDI_IO_PORT_NUM) MS_CS_DataOutEndpoint;
MIDI_USB_DESCRIPTOR_ENDPOINT DataInEndpoint;
MS_CS_BULK_ENDPOINT_DESCRIPTOR(USB_MIDI_IO_PORT_NUM) MS_CS_DataInEndpoint;
} __packed usb_midi_descriptor_config;
static const usb_midi_descriptor_config usbMIDIDescriptor_Config = {
.Config_Header = {
.bLength = sizeof(usb_descriptor_config_header),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CONFIGURATION,
.wTotalLength = sizeof(usb_midi_descriptor_config),
.bNumInterfaces = 0x02,
.bConfigurationValue = 0x01,
.iConfiguration = 0x00,
.bmAttributes = 0xa0 , // (Bus Powered) Remote Wakeup
// .bmAttributes = (USB_CONFIG_ATTR_BUSPOWERED |
// USB_CONFIG_ATTR_SELF_POWERED),
.bMaxPower = USB_MIDI_MAX_POWER,
},
.AC_Interface = {
.bLength = sizeof(usb_descriptor_interface),
.bDescriptorType = USB_DESCRIPTOR_TYPE_INTERFACE,
.bInterfaceNumber = 0x00,
.bAlternateSetting = 0x00,
.bNumEndpoints = 0x00,
.bInterfaceClass = USB_INTERFACE_CLASS_AUDIO,
.bInterfaceSubClass = USB_INTERFACE_AUDIOCONTROL,
.bInterfaceProtocol = 0x00,
.iInterface = 0x00,
},
.AC_CS_Interface = {
.bLength = AC_CS_INTERFACE_DESCRIPTOR_SIZE(1),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = 0x01,
.bcdADC = 0x0100,
.wTotalLength = AC_CS_INTERFACE_DESCRIPTOR_SIZE(1),
.bInCollection = 0x01,
.baInterfaceNr = {0x01},
},
.MS_Interface = {
.bLength = sizeof(usb_descriptor_interface),
.bDescriptorType = USB_DESCRIPTOR_TYPE_INTERFACE,
.bInterfaceNumber = 0x01,
.bAlternateSetting = 0x00,
.bNumEndpoints = 0x02,
.bInterfaceClass = USB_INTERFACE_CLASS_AUDIO,
.bInterfaceSubClass = USB_INTERFACE_MIDISTREAMING,
.bInterfaceProtocol = 0x00,
.iInterface = STRING_IINTERFACE_ID, // Midi
},
.MS_CS_Interface = {
.bLength = sizeof(MS_CS_INTERFACE_DESCRIPTOR),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = 0x01,
.bcdADC = 0x0100,
.wTotalLength = sizeof(MS_CS_INTERFACE_DESCRIPTOR)
+USB_MIDI_IO_PORT_NUM*2*sizeof(MIDI_IN_JACK_DESCRIPTOR)
+USB_MIDI_IO_PORT_NUM*2*MIDI_OUT_JACK_DESCRIPTOR_SIZE(1)
+sizeof(MIDI_USB_DESCRIPTOR_ENDPOINT)
+MS_CS_BULK_ENDPOINT_DESCRIPTOR_SIZE(USB_MIDI_IO_PORT_NUM)
+sizeof(MIDI_USB_DESCRIPTOR_ENDPOINT)
+MS_CS_BULK_ENDPOINT_DESCRIPTOR_SIZE(USB_MIDI_IO_PORT_NUM),
},
// Start of MIDI JACK Descriptor =======================================
// MIDI IN JACK - EMBEDDED - 16 Descriptors -----------------------------
.MIDI_IN_JACK_1 = {
.bLength = sizeof(MIDI_IN_JACK_DESCRIPTOR),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_IN_JACK,
.bJackType = MIDI_JACK_EMBEDDED,
.bJackId = 0x01,
.iJack = STRING_IJACK_IN_ID, // UMK 4X IN
},
.MIDI_IN_JACK_2 = {
.bLength = sizeof(MIDI_IN_JACK_DESCRIPTOR),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_IN_JACK,
.bJackType = MIDI_JACK_EMBEDDED,
.bJackId = 0x02,
.iJack = STRING_IJACK_IN_ID, // UMK 4X IN
},
#if USB_MIDI_IO_PORT_NUM >= 4
.MIDI_IN_JACK_3 = {
.bLength = sizeof(MIDI_IN_JACK_DESCRIPTOR),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_IN_JACK,
.bJackType = MIDI_JACK_EMBEDDED,
.bJackId = 0x03,
.iJack = STRING_IJACK_IN_ID, // UMK 4X IN
},
.MIDI_IN_JACK_4 = {
.bLength = sizeof(MIDI_IN_JACK_DESCRIPTOR),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_IN_JACK,
.bJackType = MIDI_JACK_EMBEDDED,
.bJackId = 0x04,
.iJack = STRING_IJACK_IN_ID, // UMK 4X IN
},
#if USB_MIDI_IO_PORT_NUM >= 8
.MIDI_IN_JACK_5 = {
.bLength = sizeof(MIDI_IN_JACK_DESCRIPTOR),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_IN_JACK,
.bJackType = MIDI_JACK_EMBEDDED,
.bJackId = 0x05,
.iJack = STRING_IJACK_IN_ID, // UMK 4X IN
},
.MIDI_IN_JACK_6 = {
.bLength = sizeof(MIDI_IN_JACK_DESCRIPTOR),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_IN_JACK,
.bJackType = MIDI_JACK_EMBEDDED,
.bJackId = 0x06,
.iJack = STRING_IJACK_IN_ID, // UMK 4X IN
},
.MIDI_IN_JACK_7 = {
.bLength = sizeof(MIDI_IN_JACK_DESCRIPTOR),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_IN_JACK,
.bJackType = MIDI_JACK_EMBEDDED,
.bJackId = 0x07,
.iJack = STRING_IJACK_IN_ID, // UMK 4X IN
},
.MIDI_IN_JACK_8 = {
.bLength = sizeof(MIDI_IN_JACK_DESCRIPTOR),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_IN_JACK,
.bJackType = MIDI_JACK_EMBEDDED,
.bJackId = 0x08,
.iJack = STRING_IJACK_IN_ID, // UMK 4X IN
},
#if USB_MIDI_IO_PORT_NUM >= 12
.MIDI_IN_JACK_9 = {
.bLength = sizeof(MIDI_IN_JACK_DESCRIPTOR),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_IN_JACK,
.bJackType = MIDI_JACK_EMBEDDED,
.bJackId = 0x09,
.iJack = STRING_IJACK_IN_ID, // UMK 4X IN
},
.MIDI_IN_JACK_A = {
.bLength = sizeof(MIDI_IN_JACK_DESCRIPTOR),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_IN_JACK,
.bJackType = MIDI_JACK_EMBEDDED,
.bJackId = 0x0A,
.iJack = STRING_IJACK_IN_ID, // UMK 4X IN
},
.MIDI_IN_JACK_B = {
.bLength = sizeof(MIDI_IN_JACK_DESCRIPTOR),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_IN_JACK,
.bJackType = MIDI_JACK_EMBEDDED,
.bJackId = 0x0B,
.iJack = STRING_IJACK_IN_ID, // UMK 4X IN
},
.MIDI_IN_JACK_C = {
.bLength = sizeof(MIDI_IN_JACK_DESCRIPTOR),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_IN_JACK,
.bJackType = MIDI_JACK_EMBEDDED,
.bJackId = 0x0C,
.iJack = STRING_IJACK_IN_ID, // UMK 4X IN
},
#if USB_MIDI_IO_PORT_NUM >= 16
.MIDI_IN_JACK_D = {
.bLength = sizeof(MIDI_IN_JACK_DESCRIPTOR),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_IN_JACK,
.bJackType = MIDI_JACK_EMBEDDED,
.bJackId = 0x0D,
.iJack = STRING_IJACK_IN_ID, // UMK 4X IN
},
.MIDI_IN_JACK_E = {
.bLength = sizeof(MIDI_IN_JACK_DESCRIPTOR),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_IN_JACK,
.bJackType = MIDI_JACK_EMBEDDED,
.bJackId = 0x0E,
.iJack = STRING_IJACK_IN_ID, // UMK 4X IN
},
.MIDI_IN_JACK_F = {
.bLength = sizeof(MIDI_IN_JACK_DESCRIPTOR),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_IN_JACK,
.bJackType = MIDI_JACK_EMBEDDED,
.bJackId = 0x0F,
.iJack = STRING_IJACK_IN_ID, // UMK 4X IN
},
.MIDI_IN_JACK_10 = {
.bLength = sizeof(MIDI_IN_JACK_DESCRIPTOR),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_IN_JACK,
.bJackType = MIDI_JACK_EMBEDDED,
.bJackId = 0x10,
.iJack = STRING_IJACK_IN_ID, // UMK 4X IN
},
#endif
#endif
#endif
#endif
// MIDI IN JACK - EXTERNAL - 16 Descriptors -----------------------------
.MIDI_IN_JACK_11 = {
.bLength = sizeof(MIDI_IN_JACK_DESCRIPTOR),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_IN_JACK,
.bJackType = MIDI_JACK_EXTERNAL,
.bJackId = 0x11,
.iJack = 0x00,
},
.MIDI_IN_JACK_12 = {
.bLength = sizeof(MIDI_IN_JACK_DESCRIPTOR),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_IN_JACK,
.bJackType = MIDI_JACK_EXTERNAL,
.bJackId = 0x12,
.iJack = 0x00,
},
#if USB_MIDI_IO_PORT_NUM >= 4
.MIDI_IN_JACK_13 = {
.bLength = sizeof(MIDI_IN_JACK_DESCRIPTOR),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_IN_JACK,
.bJackType = MIDI_JACK_EXTERNAL,
.bJackId = 0x13,
.iJack = 0x00,
},
.MIDI_IN_JACK_14 = {
.bLength = sizeof(MIDI_IN_JACK_DESCRIPTOR),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_IN_JACK,
.bJackType = MIDI_JACK_EXTERNAL,
.bJackId = 0x14,
.iJack = 0x00,
},
#if USB_MIDI_IO_PORT_NUM >= 8
.MIDI_IN_JACK_15 = {
.bLength = sizeof(MIDI_IN_JACK_DESCRIPTOR),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_IN_JACK,
.bJackType = MIDI_JACK_EXTERNAL,
.bJackId = 0x15,
.iJack = 0x00,
},
.MIDI_IN_JACK_16 = {
.bLength = sizeof(MIDI_IN_JACK_DESCRIPTOR),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_IN_JACK,
.bJackType = MIDI_JACK_EXTERNAL,
.bJackId = 0x16,
.iJack = 0x00,
},
.MIDI_IN_JACK_17 = {
.bLength = sizeof(MIDI_IN_JACK_DESCRIPTOR),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_IN_JACK,
.bJackType = MIDI_JACK_EXTERNAL,
.bJackId = 0x17,
.iJack = 0x00,
},
.MIDI_IN_JACK_18 = {
.bLength = sizeof(MIDI_IN_JACK_DESCRIPTOR),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_IN_JACK,
.bJackType = MIDI_JACK_EXTERNAL,
.bJackId = 0x18,
.iJack = 0x00,
},
#if USB_MIDI_IO_PORT_NUM >= 12
.MIDI_IN_JACK_19 = {
.bLength = sizeof(MIDI_IN_JACK_DESCRIPTOR),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_IN_JACK,
.bJackType = MIDI_JACK_EXTERNAL,
.bJackId = 0x19,
.iJack = 0x00,
},
.MIDI_IN_JACK_1A = {
.bLength = sizeof(MIDI_IN_JACK_DESCRIPTOR),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_IN_JACK,
.bJackType = MIDI_JACK_EXTERNAL,
.bJackId = 0x1A,
.iJack = 0x00,
},
.MIDI_IN_JACK_1B = {
.bLength = sizeof(MIDI_IN_JACK_DESCRIPTOR),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_IN_JACK,
.bJackType = MIDI_JACK_EXTERNAL,
.bJackId = 0x1B,
.iJack = 0x00,
},
.MIDI_IN_JACK_1C = {
.bLength = sizeof(MIDI_IN_JACK_DESCRIPTOR),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_IN_JACK,
.bJackType = MIDI_JACK_EXTERNAL,
.bJackId = 0x1C,
.iJack = 0x00,
},
#if USB_MIDI_IO_PORT_NUM >= 16
.MIDI_IN_JACK_1D = {
.bLength = sizeof(MIDI_IN_JACK_DESCRIPTOR),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_IN_JACK,
.bJackType = MIDI_JACK_EXTERNAL,
.bJackId = 0x1D,
.iJack = 0x00,
},
.MIDI_IN_JACK_1E = {
.bLength = sizeof(MIDI_IN_JACK_DESCRIPTOR),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_IN_JACK,
.bJackType = MIDI_JACK_EXTERNAL,
.bJackId = 0x1E,
.iJack = 0x00,
},
.MIDI_IN_JACK_1F = {
.bLength = sizeof(MIDI_IN_JACK_DESCRIPTOR),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_IN_JACK,
.bJackType = MIDI_JACK_EXTERNAL,
.bJackId = 0x1F,
.iJack = 0x00,
},
.MIDI_IN_JACK_20 = {
.bLength = sizeof(MIDI_IN_JACK_DESCRIPTOR),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_IN_JACK,
.bJackType = MIDI_JACK_EXTERNAL,
.bJackId = 0x20,
.iJack = 0x00,
},
#endif
#endif
#endif
#endif
// MIDI OUT JACK - EMBEDDED - 16 Descriptors -----------------------------
.MIDI_OUT_JACK_21 = {
.bLength = MIDI_OUT_JACK_DESCRIPTOR_SIZE(1),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_OUT_JACK,
.bJackType = MIDI_JACK_EMBEDDED,
.bJackId = 0x21,
.bNrInputPins = 0x01,
.baSourceId = {0x11}, // IN External
.baSourcePin = {0x01},
.iJack = STRING_IJACK_OUT_ID, // UMK 4X OUT
},
.MIDI_OUT_JACK_22 = {
.bLength = MIDI_OUT_JACK_DESCRIPTOR_SIZE(1),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_OUT_JACK,
.bJackType = MIDI_JACK_EMBEDDED,
.bJackId = 0x22,
.bNrInputPins = 0x01,
.baSourceId = {0x12}, // IN External
.baSourcePin = {0x01},
.iJack = STRING_IJACK_OUT_ID, // UMK 4X OUT
},
#if USB_MIDI_IO_PORT_NUM >= 4
.MIDI_OUT_JACK_23 = {
.bLength = MIDI_OUT_JACK_DESCRIPTOR_SIZE(1),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_OUT_JACK,
.bJackType = MIDI_JACK_EMBEDDED,
.bJackId = 0x23,
.bNrInputPins = 0x01,
.baSourceId = {0x13}, // IN External
.baSourcePin = {0x01},
.iJack = STRING_IJACK_OUT_ID, // UMK 4X OUT
},
.MIDI_OUT_JACK_24 = {
.bLength = MIDI_OUT_JACK_DESCRIPTOR_SIZE(1),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_OUT_JACK,
.bJackType = MIDI_JACK_EMBEDDED,
.bJackId = 0x24,
.bNrInputPins = 0x01,
.baSourceId = {0x14}, // IN External
.baSourcePin = {0x01},
.iJack = STRING_IJACK_OUT_ID, // UMK 4X OUT
},
#if USB_MIDI_IO_PORT_NUM >= 8
.MIDI_OUT_JACK_25 = {
.bLength = MIDI_OUT_JACK_DESCRIPTOR_SIZE(1),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_OUT_JACK,
.bJackType = MIDI_JACK_EMBEDDED,
.bJackId = 0x25,
.bNrInputPins = 0x01,
.baSourceId = {0x15}, // IN External
.baSourcePin = {0x01},
.iJack = STRING_IJACK_OUT_ID, // UMK 4X OUT
},
.MIDI_OUT_JACK_26 = {
.bLength = MIDI_OUT_JACK_DESCRIPTOR_SIZE(1),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_OUT_JACK,
.bJackType = MIDI_JACK_EMBEDDED,
.bJackId = 0x26,
.bNrInputPins = 0x01,
.baSourceId = {0x16}, // IN External
.baSourcePin = {0x01},
.iJack = STRING_IJACK_OUT_ID, // UMK 4X OUT
},
.MIDI_OUT_JACK_27 = {
.bLength = MIDI_OUT_JACK_DESCRIPTOR_SIZE(1),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_OUT_JACK,
.bJackType = MIDI_JACK_EMBEDDED,
.bJackId = 0x27,
.bNrInputPins = 0x01,
.baSourceId = {0x17}, // IN External
.baSourcePin = {0x01},
.iJack = STRING_IJACK_OUT_ID, // UMK 4X OUT
},
.MIDI_OUT_JACK_28 = {
.bLength = MIDI_OUT_JACK_DESCRIPTOR_SIZE(1),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_OUT_JACK,
.bJackType = MIDI_JACK_EMBEDDED,
.bJackId = 0x28,
.bNrInputPins = 0x01,
.baSourceId = {0x18}, // IN External
.baSourcePin = {0x01},
.iJack = STRING_IJACK_OUT_ID, // UMK 4X OUT
},
#if USB_MIDI_IO_PORT_NUM >= 12
.MIDI_OUT_JACK_29 = {
.bLength = MIDI_OUT_JACK_DESCRIPTOR_SIZE(1),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_OUT_JACK,
.bJackType = MIDI_JACK_EMBEDDED,
.bJackId = 0x29,
.bNrInputPins = 0x01,
.baSourceId = {0x19}, // IN External
.baSourcePin = {0x01},
.iJack = STRING_IJACK_OUT_ID, // UMK 4X OUT
},
.MIDI_OUT_JACK_2A = {
.bLength = MIDI_OUT_JACK_DESCRIPTOR_SIZE(1),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_OUT_JACK,
.bJackType = MIDI_JACK_EMBEDDED,
.bJackId = 0x2A,
.bNrInputPins = 0x01,
.baSourceId = {0x1A}, // IN External
.baSourcePin = {0x01},
.iJack = STRING_IJACK_OUT_ID, // UMK 4X OUT
},
.MIDI_OUT_JACK_2B = {
.bLength = MIDI_OUT_JACK_DESCRIPTOR_SIZE(1),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_OUT_JACK,
.bJackType = MIDI_JACK_EMBEDDED,
.bJackId = 0x2B,
.bNrInputPins = 0x01,
.baSourceId = {0x1B}, // IN External
.baSourcePin = {0x01},
.iJack = STRING_IJACK_OUT_ID, // UMK 4X OUT
},
.MIDI_OUT_JACK_2C = {
.bLength = MIDI_OUT_JACK_DESCRIPTOR_SIZE(1),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_OUT_JACK,
.bJackType = MIDI_JACK_EMBEDDED,
.bJackId = 0x2C,
.bNrInputPins = 0x01,
.baSourceId = {0x1C}, // IN External
.baSourcePin = {0x01},
.iJack = STRING_IJACK_OUT_ID, // UMK 4X OUT
},
#if USB_MIDI_IO_PORT_NUM >= 16
.MIDI_OUT_JACK_2D = {
.bLength = MIDI_OUT_JACK_DESCRIPTOR_SIZE(1),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_OUT_JACK,
.bJackType = MIDI_JACK_EMBEDDED,
.bJackId = 0x2D,
.bNrInputPins = 0x01,
.baSourceId = {0x1D}, // IN External
.baSourcePin = {0x01},
.iJack = STRING_IJACK_OUT_ID, // UMK 4X OUT
},
.MIDI_OUT_JACK_2E = {
.bLength = MIDI_OUT_JACK_DESCRIPTOR_SIZE(1),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_OUT_JACK,
.bJackType = MIDI_JACK_EMBEDDED,
.bJackId = 0x2E,
.bNrInputPins = 0x01,
.baSourceId = {0x1E}, // IN External
.baSourcePin = {0x01},
.iJack = STRING_IJACK_OUT_ID, // UMK 4X OUT
},
.MIDI_OUT_JACK_2F = {
.bLength = MIDI_OUT_JACK_DESCRIPTOR_SIZE(1),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_OUT_JACK,
.bJackType = MIDI_JACK_EMBEDDED,
.bJackId = 0x2F,
.bNrInputPins = 0x01,
.baSourceId = {0x1F}, // IN External
.baSourcePin = {0x01},
.iJack = STRING_IJACK_OUT_ID, // UMK 4X OUT
},
.MIDI_OUT_JACK_30 = {
.bLength = MIDI_OUT_JACK_DESCRIPTOR_SIZE(1),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_OUT_JACK,
.bJackType = MIDI_JACK_EMBEDDED,
.bJackId = 0x30,
.bNrInputPins = 0x01,
.baSourceId = {0x20}, // IN External
.baSourcePin = {0x01},
.iJack = STRING_IJACK_OUT_ID, // UMK 4X OUT
},
#endif
#endif
#endif
#endif
// MIDI OUT JACK - EXTERNAL - 16 Descriptors -----------------------------
.MIDI_OUT_JACK_31 = {
.bLength = MIDI_OUT_JACK_DESCRIPTOR_SIZE(1),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_OUT_JACK,
.bJackType = MIDI_JACK_EXTERNAL,
.bJackId = 0x31,
.bNrInputPins = 0x01,
.baSourceId = {0x01}, // IN Embedded
.baSourcePin = {0x01},
.iJack = 0x00,
},
.MIDI_OUT_JACK_32 = {
.bLength = MIDI_OUT_JACK_DESCRIPTOR_SIZE(1),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_OUT_JACK,
.bJackType = MIDI_JACK_EXTERNAL,
.bJackId = 0x32,
.bNrInputPins = 0x01,
.baSourceId = {0x02}, // IN Embedded
.baSourcePin = {0x01},
.iJack = 0x00,
},
#if USB_MIDI_IO_PORT_NUM >= 4
.MIDI_OUT_JACK_33 = {
.bLength = MIDI_OUT_JACK_DESCRIPTOR_SIZE(1),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_OUT_JACK,
.bJackType = MIDI_JACK_EXTERNAL,
.bJackId = 0x33,
.bNrInputPins = 0x01,
.baSourceId = {0x03}, // IN Embedded
.baSourcePin = {0x01},
.iJack = 0x00,
},
.MIDI_OUT_JACK_34 = {
.bLength = MIDI_OUT_JACK_DESCRIPTOR_SIZE(1),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_OUT_JACK,
.bJackType = MIDI_JACK_EXTERNAL,
.bJackId = 0x34,
.bNrInputPins = 0x01,
.baSourceId = {0x04}, // IN Embedded
.baSourcePin = {0x01},
.iJack = 0x00,
},
#if USB_MIDI_IO_PORT_NUM >= 8
.MIDI_OUT_JACK_35 = {
.bLength = MIDI_OUT_JACK_DESCRIPTOR_SIZE(1),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_OUT_JACK,
.bJackType = MIDI_JACK_EXTERNAL,
.bJackId = 0x35,
.bNrInputPins = 0x01,
.baSourceId = {0x05}, // IN Embedded
.baSourcePin = {0x01},
.iJack = 0x00,
},
.MIDI_OUT_JACK_36 = {
.bLength = MIDI_OUT_JACK_DESCRIPTOR_SIZE(1),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_OUT_JACK,
.bJackType = MIDI_JACK_EXTERNAL,
.bJackId = 0x36,
.bNrInputPins = 0x01,
.baSourceId = {0x06}, // IN Embedded
.baSourcePin = {0x01},
.iJack = 0x00,
},
.MIDI_OUT_JACK_37 = {
.bLength = MIDI_OUT_JACK_DESCRIPTOR_SIZE(1),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_OUT_JACK,
.bJackType = MIDI_JACK_EXTERNAL,
.bJackId = 0x37,
.bNrInputPins = 0x01,
.baSourceId = {0x07}, // IN Embedded
.baSourcePin = {0x01},
.iJack = 0x00,
},
.MIDI_OUT_JACK_38 = {
.bLength = MIDI_OUT_JACK_DESCRIPTOR_SIZE(1),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_OUT_JACK,
.bJackType = MIDI_JACK_EXTERNAL,
.bJackId = 0x38,
.bNrInputPins = 0x01,
.baSourceId = {0x08}, // IN Embedded
.baSourcePin = {0x01},
.iJack = 0x00,
},
#if USB_MIDI_IO_PORT_NUM >= 12
.MIDI_OUT_JACK_39 = {
.bLength = MIDI_OUT_JACK_DESCRIPTOR_SIZE(1),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_OUT_JACK,
.bJackType = MIDI_JACK_EXTERNAL,
.bJackId = 0x39,
.bNrInputPins = 0x01,
.baSourceId = {0x09}, // IN Embedded
.baSourcePin = {0x01},
.iJack = 0x00,
},
.MIDI_OUT_JACK_3A = {
.bLength = MIDI_OUT_JACK_DESCRIPTOR_SIZE(1),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,
.SubType = MIDI_OUT_JACK,
.bJackType = MIDI_JACK_EXTERNAL,
.bJackId = 0x3A,
.bNrInputPins = 0x01,
.baSourceId = {0x0A}, // IN Embedded
.baSourcePin = {0x01},
.iJack = 0x00,
},
.MIDI_OUT_JACK_3B = {
.bLength = MIDI_OUT_JACK_DESCRIPTOR_SIZE(1),
.bDescriptorType = USB_DESCRIPTOR_TYPE_CS_INTERFACE,