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

benpicco notifications at github.com
Mon Aug 23 23:02:54 CEST 2021


But those failures are real:

 ```
In file included from ../../cpu/sam0_common/include/vendor/samd21/include_a/samd21.h:55,
                 from ../../cpu/sam0_common/include/cpu_conf.h:39,
                 from ../../core/include/thread.h:125,
                 from ../../core/include/debug.h:29,
                 from main.c:24:
../../cpu/sam0_common/include/vendor/samd21/include_a/samd21g18a.h:518:27: error: expected identifier before '(' token
  518 | #define USB               ((Usb      *)0x41005000UL) /**< \brief (USB) APB Base Address */
      |                           ^
../../sys/include/fido2/ctap/transport/ctap_transport.h:44:5: note: in expansion of macro 'USB'
   44 |     USB,
      |     ^~~
```

 -> don't put a `USB` enum in a global namespace, use a prefix, e.g. `CTAP_TRANSPORT_USB`

```
ctap_utils.c:45:23: note: each undeclared identifier is reported only once for each function it appears in
ctap_utils.c:45:33: error: ‘BTN0_MODE’ undeclared (first use in this function); did you mean ‘BTN0_PIN’?
     if (gpio_init_int(BTN0_PIN, BTN0_MODE, GPIO_FALLING, _gpio_cb, NULL) < 0) {
                                 ^~~~~~~~~
                                 BTN0_PIN
```

-> `#ifdef BTN0_PIN`, not every board has buttons. And this is not an example, BTN0 should not be hardcoded.

```
ctap.c: In function '_get_flashpage_number_of_rk':
ctap.c:1350:22: error: 'FLASHPAGE_SIZE' undeclared (first use in this function); did you mean 'FLASHPAGE_OK'?
 1350 |     return rk_idx / (FLASHPAGE_SIZE / CTAP_FLASH_RK_SZ);
      |                      ^~~~~~~~~~~~~~
      |                      FLASHPAGE_OK
```

There is a `flashpage_size()` function because not all platforms have a uniform page layout. 

-- 
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#issuecomment-904128953
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210823/d952d0b5/attachment.htm>


More information about the notifications mailing list