]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
midi
authorJack Humbert <jack.humb@gmail.com>
Sat, 22 Aug 2015 03:13:33 +0000 (23:13 -0400)
committerJack Humbert <jack.humb@gmail.com>
Sat, 22 Aug 2015 03:13:33 +0000 (23:13 -0400)
protocol/lufa/descriptor.c
protocol/lufa/descriptor.h
protocol/lufa/lufa.c

index 0536b79110a6df7f7df30795c7c0827558d369bb..8a14c5e09ff279e7e0e58b603111d88b293a0e88 100644 (file)
@@ -492,7 +492,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
         {
             .Header                   = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
 
-            .InterfaceNumber          = (NKRO_INTERFACE + 1),
+            .InterfaceNumber          = MIDI_INTERFACE,
             .AlternateSetting         = 0,
 
             .TotalEndpoints           = 0,
@@ -513,14 +513,14 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
             .TotalLength              = sizeof(USB_Audio_Descriptor_Interface_AC_t),
 
             .InCollection             = 1,
-            .InterfaceNumber          = (NKRO_INTERFACE + 2),
+            .InterfaceNumber          = MIDI2_INTERFACE,
         },
 
     .Audio_StreamInterface =
         {
             .Header                   = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
 
-            .InterfaceNumber          = (NKRO_INTERFACE + 2),
+            .InterfaceNumber          = MIDI2_INTERFACE,
             .AlternateSetting         = 0,
 
             .TotalEndpoints           = 2,
index 44f4c8f4a6811e7b323150ff2d655cd30cc84851..0471ef31de88243dcc391e1cc101f3292aa3af13 100644 (file)
@@ -136,12 +136,13 @@ typedef struct
 
 #ifdef MIDI_ENABLE
 #   define MIDI_INTERFACE           (NKRO_INTERFACE + 1)
+#   define MIDI2_INTERFACE           (NKRO_INTERFACE + 2)
 #else
-#   define MIDI_INTERFACE           NKRO_INTERFACE
+#   define MIDI2_INTERFACE           NKRO_INTERFACE
 #endif
 
 /* nubmer of interfaces */
-#define TOTAL_INTERFACES            (MIDI_INTERFACE + 1)
+#define TOTAL_INTERFACES            MIDI2_INTERFACE + 1
 
 
 // Endopoint number and size
index 0bb667a4e6f636615a333fcdb991f230c4b3bac8..03b13f4047d29678e31f122946e0389a6ad4e7f1 100644 (file)
@@ -94,7 +94,7 @@ USB_ClassInfo_MIDI_Device_t USB_MIDI_Interface =
 {
   .Config =
   {
-    .StreamingInterfaceNumber = (NKRO_INTERFACE + 2),
+    .StreamingInterfaceNumber = MIDI2_INTERFACE,
     .DataINEndpoint           =
     {
       .Address          = (ENDPOINT_DIR_IN | MIDI_STREAM_IN_EPNUM),
@@ -289,12 +289,12 @@ void EVENT_USB_Device_ConfigurationChanged(void)
 #endif
 
 #ifdef MIDI_ENABLE
-    // ConfigSuccess &= MIDI_Device_ConfigureEndpoints(&USB_MIDI_Interface);
+    ConfigSuccess &= MIDI_Device_ConfigureEndpoints(&USB_MIDI_Interface);
 
-    ConfigSuccess &= ENDPOINT_CONFIG(MIDI_STREAM_IN_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_IN,
-                                                MIDI_STREAM_EPSIZE, ENDPOINT_BANK_SINGLE);
-    ConfigSuccess &= ENDPOINT_CONFIG(MIDI_STREAM_OUT_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_OUT,
-                                                MIDI_STREAM_EPSIZE, ENDPOINT_BANK_SINGLE);
+    // ConfigSuccess &= ENDPOINT_CONFIG(MIDI_STREAM_IN_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_IN,
+    //                                             MIDI_STREAM_EPSIZE, ENDPOINT_BANK_SINGLE);
+    // ConfigSuccess &= ENDPOINT_CONFIG(MIDI_STREAM_OUT_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_OUT,
+    //                                             MIDI_STREAM_EPSIZE, ENDPOINT_BANK_SINGLE);
 #endif
 
 }
@@ -614,7 +614,7 @@ void usb_send_func(MidiDevice * device, uint16_t cnt, uint8_t byte0, uint8_t byt
 
   uint8_t cable = 0;
 
-Endpoint_SelectEndpoint(MIDI_STREAM_IN_EPNUM);
+// Endpoint_SelectEndpoint(MIDI_STREAM_IN_EPNUM);
 
   //if the length is undefined we assume it is a SYSEX message
   if (midi_packet_length(byte0) == UNDEFINED) {
@@ -657,8 +657,8 @@ Endpoint_SelectEndpoint(MIDI_STREAM_IN_EPNUM);
     }
   }
 
-Endpoint_Write_Stream_LE(&event, sizeof(event), NULL);
-Endpoint_ClearIN();
+// Endpoint_Write_Stream_LE(&event, sizeof(event), NULL);
+// Endpoint_ClearIN();
 
   MIDI_Device_SendEventPacket(&USB_MIDI_Interface, &event);
   MIDI_Device_Flush(&USB_MIDI_Interface);