From: Tilman Sauerbeck Date: Mon, 17 Jun 2019 04:30:42 +0000 (+0200) Subject: common: Remove useless calls to __NOP() in busy wait loops. X-Git-Url: http://git.code-monkey.de/?a=commitdiff_plain;h=c1ab19bdab4148e444b77e67e5bcb2d60ca3b829;p=gps-watch.git common: Remove useless calls to __NOP() in busy wait loops. --- diff --git a/src/common/virtual_com.c b/src/common/virtual_com.c index 013e84f..22e0437 100644 --- 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)) { - __NOP(); }; USB_DeviceSendRequest((usb_device_handle)baseAddr, USB_CDC_VCOM_BULK_IN_ENDPOINT, (uint8_t *)buf, count); while (!s_sendComplete) { - __NOP(); }; 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)) { - __NOP(); }; 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) { - __NOP(); }; /* 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)) { - __NOP(); }; s_recvSize = 0; }