From: Joel Holdsworth Date: Sat, 18 Feb 2012 09:29:34 +0000 (+0000) Subject: Implemented _assert X-Git-Tag: sigrok-firmware-fx2lafw-0.1.0~72 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=bf40d70e45ba8bdd45d68a35e8e7d12a0ff1e8bf;p=sigrok-firmware-fx2lafw.git Implemented _assert --- diff --git a/debug.c b/debug.c index 8dab8c70..11807589 100644 --- a/debug.c +++ b/debug.c @@ -51,4 +51,10 @@ void debugf(const char *format, ...) { EP6BCL = LSB(count); } +void _assert(char *expr, const char *filename, unsigned int linenumber) { + debugf("Assert(%s) failed at line %u in file %s.\n", + expr, linenumber, filename); + while(1); +} + #endif