projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Partial Commit: Remove now empty Projects\Incomplete directory and add the new AVRISP...
[pub/USBasp.git]
/
LUFA
/
Drivers
/
USB
/
Class
/
Device
/
MIDI.c
diff --git
a/LUFA/Drivers/USB/Class/Device/MIDI.c
b/LUFA/Drivers/USB/Class/Device/MIDI.c
index
ed3aaa7
..
79d9e74
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Device/MIDI.c
+++ b/
LUFA/Drivers/USB/Class/Device/MIDI.c
@@
-33,7
+33,7
@@
\r
#include "MIDI.h"
\r
\r
\r
#include "MIDI.h"
\r
\r
-void MIDI_Device_ProcessControl
Packe
t(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo)
\r
+void MIDI_Device_ProcessControl
Reques
t(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo)
\r
{
\r
\r
}
\r
{
\r
\r
}
\r
@@
-70,18
+70,24
@@
void MIDI_Device_USBTask(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo)
\r
}
\r
\r
\r
}
\r
\r
-
void
MIDI_Device_SendEventPacket(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo, MIDI_EventPacket_t* const Event)
\r
+
uint8_t
MIDI_Device_SendEventPacket(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo, MIDI_EventPacket_t* const Event)
\r
{
\r
if (USB_DeviceState != DEVICE_STATE_Configured)
\r
{
\r
if (USB_DeviceState != DEVICE_STATE_Configured)
\r
- return;
\r
+ return
ENDPOINT_RWSTREAM_NoError
;
\r
\r
Endpoint_SelectEndpoint(MIDIInterfaceInfo->Config.DataINEndpointNumber);
\r
\r
if (Endpoint_IsReadWriteAllowed());
\r
{
\r
\r
Endpoint_SelectEndpoint(MIDIInterfaceInfo->Config.DataINEndpointNumber);
\r
\r
if (Endpoint_IsReadWriteAllowed());
\r
{
\r
- Endpoint_Write_Stream_LE(Event, sizeof(MIDI_EventPacket_t), NO_STREAM_CALLBACK);
\r
+ uint8_t ErrorCode;
\r
+
\r
+ if ((ErrorCode = Endpoint_Write_Stream_LE(Event, sizeof(Event), NO_STREAM_CALLBACK)) != ENDPOINT_RWSTREAM_NoError)
\r
+ return ErrorCode;
\r
+
\r
Endpoint_ClearIN();
\r
}
\r
Endpoint_ClearIN();
\r
}
\r
+
\r
+ return ENDPOINT_RWSTREAM_NoError;
\r
}
\r
\r
bool MIDI_Device_ReceiveEventPacket(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo, MIDI_EventPacket_t* const Event)
\r
}
\r
\r
bool MIDI_Device_ReceiveEventPacket(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo, MIDI_EventPacket_t* const Event)
\r
@@
-94,7
+100,7
@@
bool MIDI_Device_ReceiveEventPacket(USB_ClassInfo_MIDI_Device_t* const MIDIInter
if (!(Endpoint_IsReadWriteAllowed()))
\r
return false;
\r
\r
if (!(Endpoint_IsReadWriteAllowed()))
\r
return false;
\r
\r
- Endpoint_Read_Stream_LE(Event, sizeof(
MIDI_EventPacket_
t), NO_STREAM_CALLBACK);
\r
+ Endpoint_Read_Stream_LE(Event, sizeof(
Even
t), NO_STREAM_CALLBACK);
\r
Endpoint_ClearOUT();
\r
\r
return true;
\r
Endpoint_ClearOUT();
\r
\r
return true;
\r