aboutsummaryrefslogtreecommitdiffstats
path: root/src/wiring/time.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wiring/time.h')
-rw-r--r--src/wiring/time.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/wiring/time.h b/src/wiring/time.h
index a97310a..68b3901 100644
--- a/src/wiring/time.h
+++ b/src/wiring/time.h
@@ -41,6 +41,20 @@ void delay(unsigned long ms);
/* Delay for us microseconds */
void delayMicroseconds(uint32_t us);
+#if 0
+static inline void delay_us(uint32 us) {
+ us *= 12;
+ asm volatile("mov r0, %[us] \n\t"
+ "subs r0, #2 \n\t"
+"1: \n\t"
+ "subs r0, r0, #1 \n\t"
+ "bne 1b"
+ :
+ : [us] "r" (us)
+ : "r0", "cc");
+
+}
+#endif
#ifdef __cplusplus
} // extern "C"
#endif