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.
1 parent 618aace commit b75ce8cCopy full SHA for b75ce8c
cores/arduino/wiring.h
@@ -64,11 +64,12 @@ extern void delay( uint32_t dwMs ) ;
64
*/
65
static inline void delayMicroseconds(uint32_t) __attribute__((always_inline, unused));
66
static inline void delayMicroseconds(uint32_t usec){
67
+ if (usec == 0) return;
68
uint32_t n = usec * (VARIANT_MCK / 3000000);
69
asm volatile(
70
"L_%=_delayMicroseconds:" "\n\t"
71
"subs %0, #1" "\n\t"
- "bge L_%=_delayMicroseconds" "\n"
72
+ "bne L_%=_delayMicroseconds" "\n"
73
: "+r" (n) :
74
);
75
}
0 commit comments