aboutsummaryrefslogtreecommitdiff
path: root/common.h
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2014-09-30 16:08:30 +0200
committerLars-Dominik Braun <lars@6xq.net>2014-09-30 16:08:30 +0200
commit74a2f8409f3bfb462de36bca04ad44ac65473f7b (patch)
treea410c5d07b7d6456fbc4741ce7b0adb67e172ed4 /common.h
parent6708da2661d693f855b6f56d69af1e2fb8502463 (diff)
downloadhourglass-74a2f8409f3bfb462de36bca04ad44ac65473f7b.tar.gz
hourglass-74a2f8409f3bfb462de36bca04ad44ac65473f7b.tar.bz2
hourglass-74a2f8409f3bfb462de36bca04ad44ac65473f7b.zip
LED error code for assert()
Diffstat (limited to 'common.h')
-rw-r--r--common.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/common.h b/common.h
index fb53d4d..eced70e 100644
--- a/common.h
+++ b/common.h
@@ -17,10 +17,7 @@
#include <avr/interrupt.h>
#define assert(x) if (!(x)) { \
puts("assert in " __FILE__ ":" #x); \
- sleep_enable (); \
- while (1) { \
- sleep_cpu (); \
- } \
+ shutdownError (); \
}
#include <stdbool.h>
@@ -45,5 +42,7 @@ enum {
wakeup &= ~(1 << x); \
}
+void shutdownError ();
+
#endif /* COMMON_H */