summaryrefslogtreecommitdiff
path: root/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'debug.c')
-rw-r--r--debug.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/debug.c b/debug.c
index d7d333b..d852a8d 100644
--- a/debug.c
+++ b/debug.c
@@ -30,7 +30,17 @@ void debug_init(char *ident) {
}
void debug_set_level(uint8_t level) {
- debug_level = level;
+ switch (level) {
+ case 1:
+ debug_level = DBG_ERR;
+ return;
+ case 2:
+ debug_level = DBG_WARN;
+ return;
+ case 3:
+ debug_level = DBG_INFO;
+ return;
+ }
}
uint8_t debug_get_level() {