projects
/
gps-watch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
84b71c0
)
common: Remove useless calls to __NOP() in busy wait loops.
author
Tilman Sauerbeck
<tilman@code-monkey.de>
Mon, 17 Jun 2019 04:30:42 +0000
(06:30 +0200)
committer
Tilman Sauerbeck
<tilman@code-monkey.de>
Sun, 7 Jul 2019 07:58:43 +0000
(09:58 +0200)
src/common/virtual_com.c
patch
|
blob
|
history
diff --git
a/src/common/virtual_com.c
b/src/common/virtual_com.c
index 013e84fa51e80db473009d6d47de295cb54643d7..22e0437bbe4a886d3cc0d75075ce6ccf0101175b 100644
(file)
--- a/
src/common/virtual_com.c
+++ b/
src/common/virtual_com.c
@@
-576,12
+576,10
@@
void USB_VcomWriteBlocking(usb_device_handle baseAddr, const uint8_t *buf, size_
{
while ((s_cdcVcom.attach != 1) || (s_cdcVcom.startTransactions != 1))
{
{
while ((s_cdcVcom.attach != 1) || (s_cdcVcom.startTransactions != 1))
{
- __NOP();
};
USB_DeviceSendRequest((usb_device_handle)baseAddr, USB_CDC_VCOM_BULK_IN_ENDPOINT, (uint8_t *)buf, count);
while (!s_sendComplete)
{
};
USB_DeviceSendRequest((usb_device_handle)baseAddr, USB_CDC_VCOM_BULK_IN_ENDPOINT, (uint8_t *)buf, count);
while (!s_sendComplete)
{
- __NOP();
};
s_sendComplete = 0;
}
};
s_sendComplete = 0;
}
@@
-596,7
+594,6
@@
status_t USB_VcomReadBlocking(usb_device_handle baseAddr, uint8_t *buf, size_t c
/* Waiting for the USB ready. */
while ((s_cdcVcom.attach != 1) || (s_cdcVcom.startTransactions != 1))
{
/* Waiting for the USB ready. */
while ((s_cdcVcom.attach != 1) || (s_cdcVcom.startTransactions != 1))
{
- __NOP();
};
do
};
do
@@
-614,7
+611,6
@@
status_t USB_VcomReadBlocking(usb_device_handle baseAddr, uint8_t *buf, size_t c
/* Waiting for data received by virtual com. */
while (s_recvSize <= 0)
{
/* Waiting for data received by virtual com. */
while (s_recvSize <= 0)
{
- __NOP();
};
/* When receive request is error. */
};
/* When receive request is error. */
@@
-623,7
+619,6
@@
status_t USB_VcomReadBlocking(usb_device_handle baseAddr, uint8_t *buf, size_t c
/* Waiting for the USB ready and transfer started. */
while ((s_cdcVcom.attach != 1) || (s_cdcVcom.startTransactions != 1))
{
/* Waiting for the USB ready and transfer started. */
while ((s_cdcVcom.attach != 1) || (s_cdcVcom.startTransactions != 1))
{
- __NOP();
};
s_recvSize = 0;
}
};
s_recvSize = 0;
}