projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Changed over manual loops waiting for endpoints to be ready to use the library Endpoi...
[pub/USBasp.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
9da0ed1
..
0d6b378
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Device/CDC.c
+++ b/
LUFA/Drivers/USB/Class/Device/CDC.c
@@
-126,12
+126,7
@@
void CDC_Device_USBTask(USB_ClassInfo_CDC_Device_t* CDCInterfaceInfo)
if (!(Endpoint_IsReadWriteAllowed()))
\r
{
\r
Endpoint_ClearIN();
\r
if (!(Endpoint_IsReadWriteAllowed()))
\r
{
\r
Endpoint_ClearIN();
\r
-
\r
- while (!(Endpoint_IsReadWriteAllowed()))
\r
- {
\r
- if (USB_DeviceState == DEVICE_STATE_Unattached)
\r
- return;
\r
- }
\r
+ Endpoint_WaitUntilReady();
\r
}
\r
\r
Endpoint_ClearIN();
\r
}
\r
\r
Endpoint_ClearIN();
\r
@@
-156,12
+151,7
@@
void CDC_Device_SendByte(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo, con
if (!(Endpoint_IsReadWriteAllowed()))
\r
{
\r
Endpoint_ClearIN();
\r
if (!(Endpoint_IsReadWriteAllowed()))
\r
{
\r
Endpoint_ClearIN();
\r
-
\r
- while (!(Endpoint_IsReadWriteAllowed()))
\r
- {
\r
- if (USB_DeviceState == DEVICE_STATE_Unattached)
\r
- return;
\r
- }
\r
+ Endpoint_WaitUntilReady();
\r
}
\r
\r
Endpoint_Write_Byte(Data);
\r
}
\r
\r
Endpoint_Write_Byte(Data);
\r