diff options
Diffstat (limited to 'apps/examples/buttons/buttons_main.c')
-rw-r--r-- | apps/examples/buttons/buttons_main.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/apps/examples/buttons/buttons_main.c b/apps/examples/buttons/buttons_main.c index 9aab98008..a76c173a2 100644 --- a/apps/examples/buttons/buttons_main.c +++ b/apps/examples/buttons/buttons_main.c @@ -305,7 +305,8 @@ static void show_buttons(uint8_t oldset, uint8_t newset) * interrupt handler. */ - lowsyslog(" %s %s\n", g_buttoninfo[BUTTON_INDEX(i)].name, state); + lowsyslog(LOG_INFO, " %s %s\n", + g_buttoninfo[BUTTON_INDEX(i)].name, state); } } } @@ -315,8 +316,9 @@ static void button_handler(int id, int irq) { uint8_t newset = board_buttons(); - lowsyslog("IRQ:%d Button %d:%s SET:%02x:\n", + lowsyslog(LOG_INFO, "IRQ:%d Button %d:%s SET:%02x:\n", irq, id, g_buttoninfo[BUTTON_INDEX(id)].name, newset); + show_buttons(g_oldset, newset); g_oldset = newset; } @@ -416,7 +418,7 @@ int buttons_main(int argc, char *argv[]) maxbuttons = strtol(argv[1], NULL, 10); } - lowsyslog("maxbuttons: %d\n", maxbuttons); + lowsyslog(LOG_INFO, "maxbuttons: %d\n", maxbuttons); #endif /* Initialize the button GPIOs */ @@ -430,9 +432,9 @@ int buttons_main(int argc, char *argv[]) { xcpt_t oldhandler = board_button_irq(i, g_buttoninfo[BUTTON_INDEX(i)].handler); - /* Use lowsyslog() for compatibility with interrrupt handler output. */ + /* Use lowsyslog() for compatibility with interrupt handler output. */ - lowsyslog("Attached handler at %p to button %d [%s], oldhandler:%p\n", + lowsyslog(LOG_INFO, "Attached handler at %p to button %d [%s], oldhandler:%p\n", g_buttoninfo[BUTTON_INDEX(i)].handler, i, g_buttoninfo[BUTTON_INDEX(i)].name, oldhandler); @@ -445,7 +447,7 @@ int buttons_main(int argc, char *argv[]) if (oldhandler != NULL) { - lowsyslog("WARNING: oldhandler:%p is not NULL! " + lowsyslog(LOG_INFO, "WARNING: oldhandler:%p is not NULL! " "Button events may be lost or aliased!\n", oldhandler); } @@ -475,11 +477,11 @@ int buttons_main(int argc, char *argv[]) flags = irqsave(); - /* Use lowsyslog() for compatibility with interrrupt handler + /* Use lowsyslog() for compatibility with interrupt handler * output. */ - lowsyslog("POLL SET:%02x:\n", newset); + lowsyslog(LOG_INFO, "POLL SET:%02x:\n", newset); show_buttons(g_oldset, newset); g_oldset = newset; irqrestore(flags); |