aboutsummaryrefslogtreecommitdiff
path: root/lib/stm32/f1
diff options
context:
space:
mode:
authorPiotr Esden-Tempski2012-05-25 17:56:15 -0700
committerPiotr Esden-Tempski2012-05-25 17:56:15 -0700
commit7011d47c70076f995e8470c59eeaa8f3efcc9f05 (patch)
treeeb74c89b139064a1401d88bf84478b7e64c78ca8 /lib/stm32/f1
parent3596075ee0f189f8a95090c4fb5522844255a029 (diff)
Mark reg32 variables as used. So that the compiler does not complain.
Diffstat (limited to 'lib/stm32/f1')
-rw-r--r--lib/stm32/f1/gpio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/stm32/f1/gpio.c b/lib/stm32/f1/gpio.c
index 4f7e663..9ef6037 100644
--- a/lib/stm32/f1/gpio.c
+++ b/lib/stm32/f1/gpio.c
@@ -147,5 +147,8 @@ void gpio_port_config_lock(u32 gpioport, u16 gpios)
reg32 = GPIO_LCKR(gpioport); /* Read LCKK. */
reg32 = GPIO_LCKR(gpioport); /* Read LCKK again. */
+ /* Tell the compiler the variable is actually used. It will get optimized out anyways. */
+ reg32 = reg32;
+
/* If (reg32 & GPIO_LCKK) is true, the lock is now active. */
}