projects
/
pub
/
lufa.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/lufa.git]
/
Demos
/
Device
/
LowLevel
/
Joystick
/
Joystick.c
diff --git
a/Demos/Device/LowLevel/Joystick/Joystick.c
b/Demos/Device/LowLevel/Joystick/Joystick.c
index
e117475
..
db2415e
100644
(file)
--- a/
Demos/Device/LowLevel/Joystick/Joystick.c
+++ b/
Demos/Device/LowLevel/Joystick/Joystick.c
@@
-182,7
+182,7
@@
bool GetNextReport(USB_JoystickReport_Data_t* ReportData)
void HID_Task(void)
\r
{
\r
/* Device must be connected and configured for the task to run */
\r
void HID_Task(void)
\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
/* Select the Joystick Report Endpoint */
\r
return;
\r
\r
/* Select the Joystick Report Endpoint */
\r