From 39a8531ba664b0e39c781c94b0529d1f9431d4b6 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 13 May 2013 20:47:59 +0300 Subject: [PATCH] Fix an inline asm constraint The sbiw instruction is limited to certain word-capable registers, and the compiler needs to be informed that such a register is needed. --- common/delay.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/delay.h b/common/delay.h index 725d22b..9b81376 100644 --- a/common/delay.h +++ b/common/delay.h @@ -16,7 +16,7 @@ static inline void __attribute__((always_inline)) delay_loop16(uint16_t count) __asm__ volatile ( "1: sbiw %0, 1" "\n\t" "brne 1b" - : "=r" (count) + : "=w" (count) : "0" (count) ); } -- 2.43.0