27 #if !defined(_USBH_MIDI_H_) 31 #define MIDI_MAX_ENDPOINTS 5 //endpoint 0, bulk_IN(MIDI), bulk_OUT(MIDI), bulk_IN(VSP), bulk_OUT(VSP) 32 #define USB_SUBCLASS_MIDISTREAMING 3 33 #define DESC_BUFF_SIZE 256 34 #define MIDI_EVENT_PACKET_SIZE 64 40 uint8_t lookupMsgSize(uint8_t midiMsg);
71 uint8_t
RecvData(uint16_t *bytes_rcvd, uint8_t *dataptr);
73 uint8_t
SendData(uint8_t *dataptr, byte nCable=0);
74 uint8_t
SendSysEx(uint8_t *dataptr,
unsigned int datasize, byte nCable=0);
76 inline uint8_t
RcvData(uint16_t *bytes_rcvd, uint8_t *dataptr){
return RecvData(bytes_rcvd, dataptr); };
80 virtual uint8_t
Init(uint8_t parent, uint8_t port,
bool lowspeed);
85 #endif //_USBH_MIDI_H_ static const uint8_t epDataInIndexVSP
uint8_t RcvData(uint16_t *bytes_rcvd, uint8_t *dataptr)
uint8_t RecvData(uint16_t *bytes_rcvd, uint8_t *dataptr)
virtual uint8_t GetAddress()
virtual uint8_t Init(uint8_t parent, uint8_t port, bool lowspeed)
void parseConfigDescr(byte addr, byte conf)
static const uint8_t epDataOutIndexVSP
virtual uint8_t Release()
unsigned int countSysExDataSize(uint8_t *dataptr)
static const uint8_t epDataInIndex
#define MIDI_EVENT_PACKET_SIZE
uint8_t SendData(uint8_t *dataptr, byte nCable=0)
uint8_t recvBuf[MIDI_EVENT_PACKET_SIZE]
EpInfo epInfo[MIDI_MAX_ENDPOINTS]
uint8_t RcvData(uint8_t *outBuf)
static const uint8_t epDataOutIndex
#define MIDI_MAX_ENDPOINTS
uint8_t SendSysEx(uint8_t *dataptr, unsigned int datasize, byte nCable=0)