projects
/
pub
/
lufa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add explicit guards to all device mode tasks to ensure the device is connected and...
[pub/lufa.git]
/
LUFA
/
Drivers
/
USB
/
Class
/
Device
/
MassStorage.c
diff --git
a/LUFA/Drivers/USB/Class/Device/MassStorage.c
b/LUFA/Drivers/USB/Class/Device/MassStorage.c
index
9d73989
..
ceb4b96
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Device/MassStorage.c
+++ b/
LUFA/Drivers/USB/Class/Device/MassStorage.c
@@
-96,7
+96,7
@@
bool MS_Device_ConfigureEndpoints(USB_ClassInfo_MS_Device_t* const MSInterfaceIn
\r
void MS_Device_USBTask(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
\r
{
\r
\r
void MS_Device_USBTask(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
\r
{
\r
- if (!(USB_IsConnected))
\r
+ if (!(USB_IsConnected)
|| !(USB_ConfigurationNumber)
)
\r
return;
\r
\r
Endpoint_SelectEndpoint(MSInterfaceInfo->Config.DataOUTEndpointNumber);
\r
return;
\r
\r
Endpoint_SelectEndpoint(MSInterfaceInfo->Config.DataOUTEndpointNumber);
\r