From 3c80faf6a876a00afee310b949db3ca66773e77f Mon Sep 17 00:00:00 2001 From: MrKevinWeiss Date: Tue, 16 Feb 2021 13:39:42 +0100 Subject: [PATCH 1/4] tests/pkg_umorse: Remove xtimer dependency --- tests/pkg_umorse/Makefile | 4 ++-- tests/pkg_umorse/main.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/pkg_umorse/Makefile b/tests/pkg_umorse/Makefile index 1ae285f35a..a3d3a5ce8b 100644 --- a/tests/pkg_umorse/Makefile +++ b/tests/pkg_umorse/Makefile @@ -1,9 +1,9 @@ include ../Makefile.tests_common -USEMODULE += xtimer - USEPKG += umorse +USEMODULE += ztimer + UMORSE_DELAY_DIT ?= 120 CFLAGS += -DUMORSE_DELAY_DIT=$(UMORSE_DELAY_DIT) diff --git a/tests/pkg_umorse/main.c b/tests/pkg_umorse/main.c index c2487afab4..7f7e997eef 100644 --- a/tests/pkg_umorse/main.c +++ b/tests/pkg_umorse/main.c @@ -21,14 +21,14 @@ #include "board.h" #include "led.h" +#include "ztimer.h" #include "periph_conf.h" -#include "xtimer.h" -#define UMORSE_MSLEEP(m) xtimer_msleep(m) #include "umorse.h" #include "print.h" -#define CODE_LEN (64U) +#define UMORSE_MSLEEP(m) ztimer_sleep(ZTIMER_MSEC, m); +#define CODE_LEN (64U) void blink_dit(void *args, uint8_t flags) { From b53fbf081d502a5fe9370066adf652987327ce0a Mon Sep 17 00:00:00 2001 From: MrKevinWeiss Date: Tue, 16 Feb 2021 13:40:46 +0100 Subject: [PATCH 2/4] pkg/umorse: Add Kconfig support --- pkg/Kconfig | 1 + pkg/umorse/Kconfig | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 pkg/umorse/Kconfig diff --git a/pkg/Kconfig b/pkg/Kconfig index 95c1df6904..4eb8695c0f 100644 --- a/pkg/Kconfig +++ b/pkg/Kconfig @@ -9,6 +9,7 @@ menu "Packages" rsource "driver_bme680/Kconfig" rsource "semtech-loramac/Kconfig" rsource "tinydtls/Kconfig" +rsource "umorse/Kconfig" rsource "wakaama/Kconfig" endmenu # Packages diff --git a/pkg/umorse/Kconfig b/pkg/umorse/Kconfig new file mode 100644 index 0000000000..5044d3e723 --- /dev/null +++ b/pkg/umorse/Kconfig @@ -0,0 +1,10 @@ +# Copyright (c) 2021 HAW Hamburg +# +# This file is subject to the terms and conditions of the GNU Lesser +# General Public License v2.1. See the file LICENSE in the top level +# directory for more details. +# + +config PACKAGE_UMORSE + bool "uMorse - Morse code encoder" + depends on MODULE_POSIX_SLEEP From ab92319f6968918cfc26b01bd9baa3ab543f7c4a Mon Sep 17 00:00:00 2001 From: MrKevinWeiss Date: Tue, 16 Feb 2021 13:41:24 +0100 Subject: [PATCH 3/4] tests/pkg_umorse: Add Kconfig defaults --- tests/pkg_umorse/app.config.test | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 tests/pkg_umorse/app.config.test diff --git a/tests/pkg_umorse/app.config.test b/tests/pkg_umorse/app.config.test new file mode 100644 index 0000000000..6d4301c763 --- /dev/null +++ b/tests/pkg_umorse/app.config.test @@ -0,0 +1,6 @@ +CONFIG_MODULE_POSIX_SLEEP=y +CONFIG_MODULE_ZTIMER=y +CONFIG_MODULE_ZTIMER_PERIPH_TIMER=y +CONFIG_MODULE_ZTIMER_USEC=y +CONFIG_MODULE_ZTIMER_MSEC=y +CONFIG_PACKAGE_UMORSE=y From 991970a6295d992c79df04781a920c4345786f80 Mon Sep 17 00:00:00 2001 From: MrKevinWeiss Date: Tue, 16 Feb 2021 13:41:54 +0100 Subject: [PATCH 4/4] murdock: Add pkg_umorse to kconfig test --- .murdock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.murdock b/.murdock index d935f9ec66..49dd297bcd 100755 --- a/.murdock +++ b/.murdock @@ -25,8 +25,8 @@ tests/mtd_mapper tests/driver_o* tests/driver_p* tests/driver_q* tests/driver_r* tests/driver_s* tests/driver_t* tests/driver_u* tests/driver_v*"} : ${TEST_KCONFIG_native:="examples/hello-world tests/periph_* tests/sys_crypto -tests/test_tools tests/prng_* tests/xtimer_* tests/ztimer_* tests/driver_ws281x -tests/posix_sleep"} +tests/prng_* tests/xtimer_* tests/ztimer_* tests/driver_ws281x +tests/posix_sleep tests/pkg_umorse"} : ${TEST_WITH_CONFIG_SUPPORTED:="examples/suit_update tests/driver_at86rf2xx_aes"}