projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added new USB_DeviceState variable to keep track of the current Device mode USB state.
[pub/USBasp.git]
/
Demos
/
Device
/
LowLevel
/
MIDI
/
MIDI.c
diff --git
a/Demos/Device/LowLevel/MIDI/MIDI.c
b/Demos/Device/LowLevel/MIDI/MIDI.c
index
954cbcb
..
8aed527
100644
(file)
--- 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;
\r
\r
/* Device must be connected and configured for the task to run */
\r
static uint8_t PrevJoystickStatus;
\r
\r
/* Device must be connected and configured for the task to run */
\r
- if (
!(USB_IsConnected) || !(USB_ConfigurationNumber)
)
\r
+ if (
USB_DeviceState != DEVICE_STATE_Configured
)
\r
return;
\r
\r
Endpoint_SelectEndpoint(MIDI_STREAM_IN_EPNUM);
\r
return;
\r
\r
Endpoint_SelectEndpoint(MIDI_STREAM_IN_EPNUM);
\r