[riot-notifications] [RIOT-OS/RIOT] net/skald: Update Kconfig implementation (#15790)

Akshai M (Augustus Diode) notifications at github.com
Fri Jan 22 19:24:00 CET 2021


> Hey, what about we do the parsing of the string version of the configuration on a `Makefile.include` in skald module? Could look something like:
> 
> ```diff
> diff --git a/sys/Makefile.include b/sys/Makefile.include
> index f9c46b14ad..875f9c6bcd 100644
> --- a/sys/Makefile.include
> +++ b/sys/Makefile.include
> @@ -101,6 +101,10 @@ ifneq (,$(filter riotboot,$(FEATURES_USED)))
>    include $(RIOTBASE)/sys/riotboot/Makefile.include
>  endif
>  
> +ifneq (,$(filter skald, $(USEMODULE)))
> +  include $(RIOTBASE)/sys/net/ble/skald/Makefile.include
> +endif
> +
>  ifneq (,$(filter sock_async_event,$(USEMODULE)))
>    include $(RIOTBASE)/sys/net/sock/async/event/Makefile.include
>  endif
> diff --git a/sys/net/ble/skald/Kconfig b/sys/net/ble/skald/Kconfig
> index 92950a51e1..c7606bbb7e 100644
> --- a/sys/net/ble/skald/Kconfig
> +++ b/sys/net/ble/skald/Kconfig
> @@ -19,13 +19,8 @@ config SKALD_INTERVAL
>          Configure advertising interval in microseconds. Default value is 1
>          second which is 1000000 microseconds.
>  
> -config ADV_CH_37_DISABLE
> -    bool "Disable advertising on channel 37"
> -
> -config ADV_CH_38_DISABLE
> -    bool "Disable advertising on channel 38"
> -
> -config ADV_CH_39_DISABLE
> -    bool "Disable advertising on channel 39"
> +config SKALD_ADV_CHANNELS
> +    string "Advertising channels"
> +    default "37, 38, 39"
>  
>  endif # KCONFIG_USEMODULE_SKALD
> diff --git a/sys/net/ble/skald/Makefile.include b/sys/net/ble/skald/Makefile.include
> new file mode 100644
> index 0000000000..b1b2dbbc2c
> --- /dev/null
> +++ b/sys/net/ble/skald/Makefile.include
> @@ -0,0 +1,4 @@
> +ifdef CONFIG_SKALD_ADV_CHANNELS
> +  SKALD_ADV_CHAN := { $(shell echo $(CONFIG_SKALD_ADV_CHANNELS)) }
> +  CFLAGS += -DSKALD_ADV_CHAN="$(SKALD_ADV_CHAN)"
> +endif
> ```

Thanks, @leandrolanzieri . Saved 800 lines in the header!

-- 
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/15790#issuecomment-765601820
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210122/9a939418/attachment-0001.htm>


More information about the notifications mailing list