From c03b580722fc13f71a08a84612ce89718c0cda76 Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Sat, 17 Dec 2016 00:24:36 +0000 Subject: [PATCH] stm32: morse timer: remove WFI where not critical __WFI is not standardized, though often provided. As it's not a core part of this example, drop it. --- examples/stm32/f1/stm32-h103/timer/timer.c | 11 +---------- examples/stm32/f4/stm32f4-discovery/timer/timer.c | 11 +---------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/examples/stm32/f1/stm32-h103/timer/timer.c b/examples/stm32/f1/stm32-h103/timer/timer.c index 7eefcaa..843883c 100644 --- a/examples/stm32/f1/stm32-h103/timer/timer.c +++ b/examples/stm32/f1/stm32-h103/timer/timer.c @@ -21,7 +21,6 @@ #include #include #include -#include #ifndef ARRAY_LEN #define ARRAY_LEN(array) (sizeof((array))/sizeof((array)[0])) @@ -157,16 +156,8 @@ int main(void) gpio_setup(); tim_setup(); - /* Loop calling Wait For Interrupt. In older pre cortex ARM this is - * just equivalent to nop. On cortex it puts the cpu to sleep until - * one of the three occurs: - * - * a non-masked interrupt occurs and is taken - * an interrupt masked by PRIMASK becomes pending - * a Debug Entry request - */ while (1) { - __WFI(); /* Wait For Interrupt. */ + ; } return 0; diff --git a/examples/stm32/f4/stm32f4-discovery/timer/timer.c b/examples/stm32/f4/stm32f4-discovery/timer/timer.c index dba139c..2e22e80 100644 --- a/examples/stm32/f4/stm32f4-discovery/timer/timer.c +++ b/examples/stm32/f4/stm32f4-discovery/timer/timer.c @@ -22,7 +22,6 @@ #include #include #include -#include #ifndef ARRAY_LEN #define ARRAY_LEN(array) (sizeof((array))/sizeof((array)[0])) @@ -157,16 +156,8 @@ int main(void) gpio_setup(); tim_setup(); - /* Loop calling Wait For Interrupt. In older pre cortex ARM this is - * just equivalent to nop. On cortex it puts the cpu to sleep until - * one of the three occurs: - * - * a non-masked interrupt occurs and is taken - * an interrupt masked by PRIMASK becomes pending - * a Debug Entry request - */ while (1) { - __WFI(); /* Wait For Interrupt. */ + ; } return 0;