[riot-notifications] [RIOT-OS/RIOT] FIDO2 support in RIOT (#16489)

Nils Ollrogge notifications at github.com
Wed Jul 21 18:52:38 CEST 2021


@Ollrogge commented on this pull request.



> +#ifdef BTN0_PIN
+    int ret;
+#ifdef MODULE_FIDO2_CTAP_HID
+    fido2_ctap_transport_hid_send_keepalive(CTAP_HID_STATUS_UPNEEDED);
+#endif
+
+    if (gpio_init_int(BTN0_PIN, BTN0_MODE, GPIO_FALLING, gpio_cb, NULL) < 0) {
+        return CTAP1_ERR_OTHER;
+    }
+
+#if !IS_ACTIVE(CONFIG_FIDO2_CTAP_DISABLE_LED)
+    fido2_ctap_utils_led_animation();
+#endif
+
+    ret = g_user_present ? CTAP2_OK : CTAP2_ERR_ACTION_TIMEOUT;
+    gpio_irq_disable(BTN0_PIN);

The concept of this function is to test user presence. The button should only be active during the time of the presence test. Once user presence has been proved or a timeout has occured, the button should be disabled again.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/16489#discussion_r674165233
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210721/000e9cbf/attachment.htm>


More information about the notifications mailing list