소스 검색

fix compiling

hathach 6 년 전
부모
커밋
e702328093
4개의 변경된 파일8개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 0
      examples/device/midi/src/tusb_config.h
  2. 1 1
      src/class/audio/audio.h
  3. 1 1
      src/class/midi/midi_device.c
  4. 2 0
      src/class/midi/midi_device.h

+ 4 - 0
examples/device/midi/src/tusb_config.h

@@ -78,6 +78,10 @@
 #define CFG_TUD_MIDI                1
 #define CFG_TUD_CUSTOM_CLASS        0
 
+//------------- MIDI -------------//
+#define CFG_TUD_MIDI_RX_BUFSIZE     64
+#define CFG_TUD_MIDI_TX_BUFSIZE     64
+
 #ifdef __cplusplus
  }
 #endif

+ 1 - 1
src/class/audio/audio.h

@@ -43,7 +43,7 @@ typedef enum
 {
   AUDIO_SUBCLASS_CONTROL = 0x01  , ///< Audio Control
   AUDIO_SUBCLASS_STREAMING       , ///< Audio Streaming
-  AUDIO_SUBCLASS_MIDI_STREAMING  ,  ///< MIDI Streaming
+  AUDIO_SUBCLASS_MIDI_STREAMING  , ///< MIDI Streaming
 } audio_subclass_type_t;
 
 /// Audio Protocol Codes

+ 1 - 1
src/class/midi/midi_device.c

@@ -252,7 +252,7 @@ void midid_reset(uint8_t rhport)
 bool midid_open(uint8_t rhport, tusb_desc_interface_t const * p_interface_desc, uint16_t *p_length)
 {
   // For now handle the audio control interface as well.
-  if ( AUDIO_SUBCLASS_AUDIO_CONTROL == p_interface_desc->bInterfaceSubClass) {
+  if ( AUDIO_SUBCLASS_CONTROL == p_interface_desc->bInterfaceSubClass) {
     uint8_t const * p_desc = tu_desc_next ( (uint8_t const *) p_interface_desc );
     (*p_length) = sizeof(tusb_desc_interface_t);
 

+ 2 - 0
src/class/midi/midi_device.h

@@ -29,7 +29,9 @@
 
 #include "common/tusb_common.h"
 #include "device/usbd.h"
+
 #include "class/audio/audio.h"
+#include "midi.h"
 
 //--------------------------------------------------------------------+
 // Class Driver Configuration