UI change for LED blink.

This commit is contained in:
NIIBE Yutaka
2018-10-01 14:36:56 +09:00
parent f810fb83d3
commit ebec8ee156
3 changed files with 5 additions and 4 deletions

View File

@@ -12,6 +12,8 @@
change of state. change of state.
(ccid_handle_data, ccid_handle_timeout): Likewise. (ccid_handle_data, ccid_handle_timeout): Likewise.
(ccid_thread): Handle EV_EXEC_ACK_REQUIRED. (ccid_thread): Handle EV_EXEC_ACK_REQUIRED.
Change for LED blink.
* src/main.c (main): LED blink during waiting ACK.
2018-09-27 NIIBE Yutaka <gniibe@fsij.org> 2018-09-27 NIIBE Yutaka <gniibe@fsij.org>

View File

@@ -376,16 +376,15 @@ main (int argc, const char *argv[])
display_fatal_code (); display_fatal_code ();
break; break;
case LED_SYNC: case LED_SYNC:
wait_for_ack = 0;
set_led (led_inverted); set_led (led_inverted);
break; break;
case LED_GNUK_EXEC: case LED_GNUK_EXEC:
goto exec; goto exec;
case LED_WAIT_FOR_BUTTON: case LED_WAIT_FOR_BUTTON:
wait_for_ack = 1; wait_for_ack ^= 1;
/* fall through */ /* fall through */
default: default:
emit_led (LED_TIMEOUT_ONE, LED_TIMEOUT_ZERO); emit_led (LED_TIMEOUT_ZERO, LED_TIMEOUT_ZERO);
break; break;
} }
} }

View File

@@ -1775,7 +1775,7 @@ ccid_thread (void *arg)
{ {
ackbtn_disable (); ackbtn_disable ();
chopstx_intr_done (&ack_intr); chopstx_intr_done (&ack_intr);
led_blink (LED_FINISH_COMMAND); led_blink (LED_WAIT_FOR_BUTTON);
if (c->ccid_state == CCID_STATE_ACK_REQUIRED_1) if (c->ccid_state == CCID_STATE_ACK_REQUIRED_1)
goto exec_done; goto exec_done;