mirror of
https://github.com/esp8266/Arduino.git
synced 2025-08-05 13:16:13 +03:00
@@ -64,11 +64,12 @@ extern void delay( uint32_t dwMs ) ;
|
||||
*/
|
||||
static inline void delayMicroseconds(uint32_t) __attribute__((always_inline, unused));
|
||||
static inline void delayMicroseconds(uint32_t usec){
|
||||
if (usec == 0) return;
|
||||
uint32_t n = usec * (VARIANT_MCK / 3000000);
|
||||
asm volatile(
|
||||
"L_%=_delayMicroseconds:" "\n\t"
|
||||
"subs %0, #1" "\n\t"
|
||||
"bge L_%=_delayMicroseconds" "\n"
|
||||
"bne L_%=_delayMicroseconds" "\n"
|
||||
: "+r" (n) :
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user