diff main.c @ 22:198ac9d95770

Add test for assert
author Daniel O'Connor <darius@dons.net.au>
date Sat, 17 Nov 2012 12:14:38 +1030
parents bd8e2cf04034
children 03592ca4d37e
line wrap: on
line diff
--- a/main.c	Thu Nov 15 23:40:51 2012 +1030
+++ b/main.c	Sat Nov 17 12:14:38 2012 +1030
@@ -6,6 +6,7 @@
 #include <string.h>
 #include <sys/time.h>
 #include <stdlib.h>
+#include <assert.h>
 
 #include "stm32f10x.h"
 
@@ -323,6 +324,8 @@
 		    printf("%hd.%02hd\r\n", GETWHOLE(res), GETFRAC(res));
 		    break;
 	    }
+	} else if (!strcmp("assert", argv[0])) {
+	    assert(0 == 1);
 	} else if (!strcmp("zz", argv[0])) {
 	    NVIC_SystemReset();
 	} else {