We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 752101d + e9885fe commit a93542bCopy full SHA for a93542b
platform/mbed_wait_api_no_rtos.c
@@ -112,7 +112,10 @@ static const uint16_t delay_loop_code[] = {
112
/* Take the address of the code, set LSB to indicate Thumb, and cast to void() function pointer */
113
#define delay_loop ((void(*)()) ((uintptr_t) delay_loop_code | 1))
114
115
-void wait_ns(unsigned int ns)
+/* Some targets may not provide zero-wait-state flash performance. Export this function
116
+ * to be overridable for targets to provide more accurate implementation like locating
117
+ * 'delay_loop_code' in SRAM. */
118
+MBED_WEAK void wait_ns(unsigned int ns)
119
{
120
uint32_t cycles_per_us = SystemCoreClock / 1000000;
121
// Note that this very calculation, plus call overhead, will take multiple
0 commit comments