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.
This commit is contained in:
Tomaz Solc
2012-09-24 12:54:53 +02:00
parent 7851515c5c
commit fc4047e4b4
12 changed files with 191 additions and 19 deletions

View File

@@ -48,6 +48,7 @@ LGPL License Terms @ref lgpl_license
/**@{*/
#include <libopencm3/cm3/assert.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/flash.h>
@@ -166,8 +167,7 @@ int rcc_osc_ready_int_flag(osc_t osc)
break;
}
/* Shouldn't be reached. */
return -1;
cm3_assert_not_reached();
}
/*-----------------------------------------------------------------------------*/