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
/
CDC.c
diff --git
a/LUFA/Drivers/USB/Class/Device/CDC.c
b/LUFA/Drivers/USB/Class/Device/CDC.c
index
07c0514
..
12b5593
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Device/CDC.c
+++ b/
LUFA/Drivers/USB/Class/Device/CDC.c
@@
-114,7
+114,7
@@
bool CDC_Device_ConfigureEndpoints(USB_ClassInfo_CDC_Device_t* CDCInterfaceInfo)
\r
void CDC_Device_USBTask(USB_ClassInfo_CDC_Device_t* CDCInterfaceInfo)
\r
{
\r
\r
void CDC_Device_USBTask(USB_ClassInfo_CDC_Device_t* CDCInterfaceInfo)
\r
{
\r
- if (!(USB_IsConnected))
\r
+ if (!(USB_IsConnected)
|| !(USB_ConfigurationNumber)
)
\r
return;
\r
\r
Endpoint_SelectEndpoint(CDCInterfaceInfo->Config.DataINEndpointNumber);
\r
return;
\r
\r
Endpoint_SelectEndpoint(CDCInterfaceInfo->Config.DataINEndpointNumber);
\r