LED display output

This commit is contained in:
NIIBE Yutaka
2012-06-18 14:04:34 +09:00
parent 6a4d7fa108
commit 3df59ca6f9

View File

@@ -328,9 +328,7 @@ led_blink (int spec)
int int
main (int argc, char *argv[]) main (int argc, char *argv[])
{ {
#ifdef DEBUG_MORE unsigned int count = 0;
int count = 0;
#endif
(void)argc; (void)argc;
(void)argv; (void)argv;
@@ -375,12 +373,9 @@ main (int argc, char *argv[])
if (icc_state_p != NULL && *icc_state_p == ICC_STATE_EXEC_REQUESTED) if (icc_state_p != NULL && *icc_state_p == ICC_STATE_EXEC_REQUESTED)
break; break;
#ifdef DEBUG_MORE
count++;
#endif
m = chEvtWaitOneTimeout (ALL_EVENTS, MAIN_TIMEOUT_INTERVAL); m = chEvtWaitOneTimeout (ALL_EVENTS, MAIN_TIMEOUT_INTERVAL);
got_it: got_it:
count++;
switch (m) switch (m)
{ {
case LED_ONESHOT: case LED_ONESHOT:
@@ -391,6 +386,7 @@ main (int argc, char *argv[])
if ((m = emit_led (MS2ST (50), MAIN_TIMEOUT_INTERVAL))) goto got_it; if ((m = emit_led (MS2ST (50), MAIN_TIMEOUT_INTERVAL))) goto got_it;
break; break;
case LED_SHOW_STATUS: case LED_SHOW_STATUS:
if ((count & 0x07) != 0) continue;
if ((m = display_status_code ())) goto got_it; if ((m = display_status_code ())) goto got_it;
break; break;
case LED_START_COMMAND: case LED_START_COMMAND: