From fc4047e4b4b38c6c778f2d5f71c7412ecbab3152 Mon Sep 17 00:00:00 2001 From: Tomaz Solc Date: Mon, 24 Sep 2012 12:54:53 +0200 Subject: Add assert macros to aid in debugging. Adds libopencm3/cm3/assert.h header that provides assertion check macros similar to those provided by the standard C library. Thanks to Nicolas Schodet for help. --- lib/stm32/f2/rcc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/stm32/f2/rcc.c') diff --git a/lib/stm32/f2/rcc.c b/lib/stm32/f2/rcc.c index 9461a24..cc2c9bb 100644 --- a/lib/stm32/f2/rcc.c +++ b/lib/stm32/f2/rcc.c @@ -19,6 +19,7 @@ * along with this library. If not, see . */ +#include #include #include @@ -125,8 +126,7 @@ int rcc_osc_ready_int_flag(osc_t osc) break; } - /* Shouldn't be reached. */ - return -1; + cm3_assert_not_reached(); } void rcc_css_int_clear(void) -- cgit v1.2.3