diff options
Diffstat (limited to 'libmaple/include')
-rw-r--r-- | libmaple/include/libmaple/delay.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libmaple/include/libmaple/delay.h b/libmaple/include/libmaple/delay.h index 472a208..fbe7d1b 100644 --- a/libmaple/include/libmaple/delay.h +++ b/libmaple/include/libmaple/delay.h @@ -50,12 +50,12 @@ static inline void delay_us(uint32 us) { /* fudge for function call overhead */ us--; - asm volatile(" mov r0, %[us] \n\t" - "1: subs r0, #1 \n\t" + asm volatile("1: subs %[us], #1 \n\t" " bhi 1b \n\t" + : [us] "=r" (us) + : "[us]" (us) : - : [us] "r" (us) - : "r0"); + ); } #ifdef __cplusplus |