projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed HID hpst class driver incorrectly binding to HID devices that do not have an...
[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
2e17575
..
83081be
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Device/MIDI.c
+++ b/
LUFA/Drivers/USB/Class/Device/MIDI.c
@@
-67,7
+67,7
@@
bool MIDI_Device_ConfigureEndpoints(USB_ClassInfo_MIDI_Device_t* const MIDIInter
}
if (!(Endpoint_ConfigureEndpoint(EndpointNum, Type, Direction, Size,
}
if (!(Endpoint_ConfigureEndpoint(EndpointNum, Type, Direction, Size,
-
DoubleBanked ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE)))
+ DoubleBanked ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE)))
{
return false;
}
{
return false;
}
@@
-92,18
+92,15
@@
uint8_t MIDI_Device_SendEventPacket(USB_ClassInfo_MIDI_Device_t* const MIDIInter
if (USB_DeviceState != DEVICE_STATE_Configured)
return ENDPOINT_RWSTREAM_DeviceDisconnected;
if (USB_DeviceState != DEVICE_STATE_Configured)
return ENDPOINT_RWSTREAM_DeviceDisconnected;
+ uint8_t ErrorCode;
+
Endpoint_SelectEndpoint(MIDIInterfaceInfo->Config.DataINEndpointNumber);
Endpoint_SelectEndpoint(MIDIInterfaceInfo->Config.DataINEndpointNumber);
- if (Endpoint_IsReadWriteAllowed())
- {
- uint8_t ErrorCode;
+ if ((ErrorCode = Endpoint_Write_Stream_LE(Event, sizeof(MIDI_EventPacket_t), NO_STREAM_CALLBACK)) != ENDPOINT_RWSTREAM_NoError)
+ return ErrorCode;
- if ((ErrorCode = Endpoint_Write_Stream_LE(Event, sizeof(MIDI_EventPacket_t), NO_STREAM_CALLBACK)) != ENDPOINT_RWSTREAM_NoError)
- return ErrorCode;
-
- if (!(Endpoint_IsReadWriteAllowed()))
- Endpoint_ClearIN();
- }
+ if (!(Endpoint_IsReadWriteAllowed()))
+ Endpoint_ClearIN();
return ENDPOINT_RWSTREAM_NoError;
}
return ENDPOINT_RWSTREAM_NoError;
}