summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2021-09-08 13:35:11 +0700
committerhathach <[email protected]>2021-09-08 13:35:11 +0700
commit67e80f60e3841497779a319bbd93133c05b013f8 (patch)
tree535fb08b2a5f4c2e77427fcb53582e2543557807
parent4ac136d81d452ea1dcfc1e9e2e8afbf02749044d (diff)
fix build with gd32vf103
-rw-r--r--src/portable/st/synopsys/dcd_synopsys.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/portable/st/synopsys/dcd_synopsys.c b/src/portable/st/synopsys/dcd_synopsys.c
index b1435a6c8..85abf940e 100644
--- a/src/portable/st/synopsys/dcd_synopsys.c
+++ b/src/portable/st/synopsys/dcd_synopsys.c
@@ -96,6 +96,9 @@
#elif CFG_TUSB_MCU == OPT_MCU_GD32VF103
#include "synopsys_common.h"
+// for remote wakeup delay
+#define __NOP() __asm volatile ("nop")
+
// These numbers are the same for the whole GD32VF103 family.
#define OTG_FS_IRQn 86
#define EP_MAX_FS 4
@@ -559,7 +562,10 @@ static void remote_wakeup_delay(void)
{
// try to delay for 1 ms
uint32_t count = SystemCoreClock / 1000;
- while(count--) __NOP();
+ while ( count-- )
+ {
+ __NOP();
+ }
}
void dcd_remote_wakeup(uint8_t rhport)