[riot-notifications] [RIOT-OS/RIOT] pkg: add QR Code generator package (#16462)

Leandro Lanzieri notifications at github.com
Mon May 10 13:44:46 CEST 2021


@leandrolanzieri commented on this pull request.



> @@ -0,0 +1,5 @@
+# Boards with a screen can use disp_dev

These extra dependencies could be expressed in a `Kconfig` file in the application, by something like:
```
config APPLICATION
    bool
    default y
    imply MODULE_AUTO_INIT_SCREEN if BOARD_HAS_DISPLAY
    imply MODULE_DISP_DEV if BOARD_HAS_DISPLAY
    depends on TEST_KCONFIG

config BOARD_HAS_DISPLAY
    bool
    default y
    depends on BOARD_PINETIME || BOARD_ADAFRUIT_CLUE || BOARD_STM32F429I_DISC1 || BOARD_STM32F429I_DISCO
```
To avoid running Kconfig by default this can be added in the Makefile
```make
# As there is an 'Kconfig' we want to explicitly disable Kconfig by setting
# the variable to empty
SHOULD_RUN_KCONFIG ?=
```

> +                    disp_dev_map(disp_dev->dev,
+                                 w + w_offset, w + w_offset, h + h_offset, h + h_offset,
+                                 (qrcodegen_getModule(qr0, x, y)) ? &white : &black);

What about ?
```suggestion
                    if   (qrcodegen_getModule(qr0, x, y)) {
                        disp_dev_map(disp_dev->dev,
                                     w + w_offset, w + w_offset, h + h_offset, h + h_offset, &white);
                    }
```

-- 
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/16462#pullrequestreview-655529633
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210510/a5eda15f/attachment-0001.htm>


More information about the notifications mailing list