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:
@@ -19,6 +19,7 @@
|
||||
* along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <libopencm3/cm3/assert.h>
|
||||
#include <libopencm3/stm32/f2/rcc.h>
|
||||
#include <libopencm3/stm32/f2/flash.h>
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user