UI change for LED blink.
authorNIIBE Yutaka <gniibe@fsij.org>
Mon, 1 Oct 2018 05:36:56 +0000 (14:36 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Mon, 1 Oct 2018 05:36:56 +0000 (14:36 +0900)
ChangeLog
src/main.c
src/usb-ccid.c

index 61cab23..b191f2c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,8 @@
        change of state.
        (ccid_handle_data, ccid_handle_timeout): Likewise.
        (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>
 
index 17feab0..dcd486b 100644 (file)
@@ -376,16 +376,15 @@ main (int argc, const char *argv[])
          display_fatal_code ();
          break;
        case LED_SYNC:
-         wait_for_ack = 0;
          set_led (led_inverted);
          break;
        case LED_GNUK_EXEC:
          goto exec;
        case LED_WAIT_FOR_BUTTON:
-         wait_for_ack = 1;
+         wait_for_ack ^= 1;
          /* fall through */
        default:
-         emit_led (LED_TIMEOUT_ONE, LED_TIMEOUT_ZERO);
+         emit_led (LED_TIMEOUT_ZERO, LED_TIMEOUT_ZERO);
          break;
        }
     }
index 3d043a3..2efe054 100644 (file)
@@ -1775,7 +1775,7 @@ ccid_thread (void *arg)
        {
          ackbtn_disable ();
          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)
            goto exec_done;