From 849c800e281cc960edc42b19009352a264fc900b Mon Sep 17 00:00:00 2001 From: Francisco Molina Date: Wed, 15 Dec 2021 13:51:14 +0100 Subject: [PATCH] pkg/uwb-core: fix dependencies add uwb-core_uwb_rng_trx_info --- pkg/uwb-core/Kconfig | 7 +++++-- pkg/uwb-core/Makefile.dep | 5 +++-- pkg/uwb-core/Makefile.include | 6 ++++++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/pkg/uwb-core/Kconfig b/pkg/uwb-core/Kconfig index 92acdb1a58..b8610693dd 100644 --- a/pkg/uwb-core/Kconfig +++ b/pkg/uwb-core/Kconfig @@ -59,10 +59,10 @@ config MODULE_UWB-CORE_RNG bool "uwb-core ranging module" select MODULE_UWB-CORE_RNG_MATH select MODULE_UWB-CORE_DSP - select MODULE_UWB-CORE_UWB_JSON config MODULE_UWB-CORE_UWB_JSON bool "uwb-core JSON utilities" + select MODULE_FMT config MODULE_UWB-CORE_DSP bool "uwb-core DSP module" @@ -76,9 +76,12 @@ config MODULE_UWB-CORE_UWBCFG config MODULE_UWB-CORE_EVENT_THREAD bool "Use event-thread loop as uwb-core's event loop" - select MODULE_UWB-CORE_CONFIG + select MODULE_EVENT_THREAD config MODULE_UWB-CORE_CONFIG bool +config MODULE_UWB-CORE_TRX_INFO + bool "Enable uwb-core diagnostic data: rssi, tof, los" + endif # PACKAGE_UWB-CORE diff --git a/pkg/uwb-core/Makefile.dep b/pkg/uwb-core/Makefile.dep index 589ce0fb53..bac356bea9 100644 --- a/pkg/uwb-core/Makefile.dep +++ b/pkg/uwb-core/Makefile.dep @@ -3,7 +3,6 @@ USEMODULE += uwb-core_contrib DEFAULT_MODULE += auto_init_uwb-core -USEMODULE += fmt FEATURES_REQUIRED += periph_gpio_irq FEATURES_REQUIRED += periph_spi @@ -15,7 +14,6 @@ endif ifneq (,$(filter uwb-core_rng,$(USEMODULE))) USEMODULE += uwb-core_rng_math USEMODULE += uwb-core_dsp - USEMODULE += uwb-core_uwb_json endif ifneq (,$(filter uwb-core_uwbcfg,$(USEMODULE))) @@ -34,6 +32,9 @@ ifneq (,$(filter uwb-core_event_thread,$(USEMODULE))) USEMODULE += event_thread endif +ifneq (,$(filter uwb-core_rng_json,$(USEMODULE))) + USEMODULE += fmt +endif # Some stdlib functions used by the pkg are not in avr-gcc FEATURES_BLACKLIST += arch_avr8 # uwb-core has specific compilation sources when compiling kernel diff --git a/pkg/uwb-core/Makefile.include b/pkg/uwb-core/Makefile.include index 95a7b949c0..61a3407add 100644 --- a/pkg/uwb-core/Makefile.include +++ b/pkg/uwb-core/Makefile.include @@ -15,6 +15,12 @@ INCLUDES += -I$(PKGDIRBASE)/uwb-core/hw/drivers/uwb/include/ \ # PSEUDOMODULES += uwb-core_dpl +PSEUDOMODULES += uwb-core_rng_trx_info DIRS += $(RIOTPKG)/uwb-core/contrib \ # + +ifneq (,$(filter uwb-core_uwb_rng_trx_info,$(USEMODULE))) + # Enable RX diagnostics + CFLAGS += -DDW1000_RX_DIAGNOSTIC=1 +endif