fix compiling

This commit is contained in:
hathach 2019-07-01 23:11:16 +07:00
parent d2f53c552a
commit e702328093
4 changed files with 8 additions and 2 deletions

View File

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

View File

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

View File

@ -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) 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. // 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 ); uint8_t const * p_desc = tu_desc_next ( (uint8_t const *) p_interface_desc );
(*p_length) = sizeof(tusb_desc_interface_t); (*p_length) = sizeof(tusb_desc_interface_t);

View File

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