X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/67f390fe746ccc4d1dceac23f590eb1723cb7ff2..b9dd51cd632c1a8cff18f77b4f09c33bdf804768:/Demos/Device/LowLevel/MIDI/MIDI.c diff --git a/Demos/Device/LowLevel/MIDI/MIDI.c b/Demos/Device/LowLevel/MIDI/MIDI.c index 954cbcbf6..8aed527db 100644 --- a/Demos/Device/LowLevel/MIDI/MIDI.c +++ b/Demos/Device/LowLevel/MIDI/MIDI.c @@ -117,7 +117,7 @@ void MIDI_Task(void) static uint8_t PrevJoystickStatus; /* Device must be connected and configured for the task to run */ - if (!(USB_IsConnected) || !(USB_ConfigurationNumber)) + if (USB_DeviceState != DEVICE_STATE_Configured) return; Endpoint_SelectEndpoint(MIDI_STREAM_IN_EPNUM);