diff --git a/tests/periph_gpio/Makefile b/tests/periph_gpio/Makefile index 90e4fb42f4..d5eb5592c4 100644 --- a/tests/periph_gpio/Makefile +++ b/tests/periph_gpio/Makefile @@ -8,6 +8,7 @@ FEATURES_OPTIONAL += periph_gpio_tamper_wake USEMODULE += shell USEMODULE += shell_commands USEMODULE += benchmark +USEMODULE += ztimer_usec # disable native GPIOs for automatic test ifeq (native,$(BOARD)) diff --git a/tests/periph_gpio/Makefile.ci b/tests/periph_gpio/Makefile.ci index ef475200bf..c9ac296b6c 100644 --- a/tests/periph_gpio/Makefile.ci +++ b/tests/periph_gpio/Makefile.ci @@ -5,5 +5,7 @@ BOARD_INSUFFICIENT_MEMORY := \ arduino-uno \ atmega328p \ atmega328p-xplained-mini \ + nucleo-l011k4 \ + samd10-xmini \ stm32f030f4-demo \ # diff --git a/tests/periph_gpio/app.config.test b/tests/periph_gpio/app.config.test index d910df5178..5ce70b77f9 100644 --- a/tests/periph_gpio/app.config.test +++ b/tests/periph_gpio/app.config.test @@ -2,7 +2,8 @@ # application configuration. This is only needed during migration. CONFIG_MODULE_PERIPH_GPIO=y +CONFIG_MODULE_BENCHMARK=y CONFIG_MODULE_SHELL=y CONFIG_MODULE_SHELL_COMMANDS=y -CONFIG_MODULE_BENCHMARK=y -CONFIG_MODULE_XTIMER=y +CONFIG_MODULE_ZTIMER=y +CONFIG_ZTIMER_USEC=y diff --git a/tests/periph_gpio/main.c b/tests/periph_gpio/main.c index 8011f45dc1..22a78e00cf 100644 --- a/tests/periph_gpio/main.c +++ b/tests/periph_gpio/main.c @@ -25,6 +25,7 @@ #include "shell.h" #include "benchmark.h" #include "periph/gpio.h" +#include "ztimer.h" #define BENCH_RUNS_DEFAULT (1000UL * 100) #define IRQ_TIMEOUT_US (1000UL) @@ -302,13 +303,13 @@ static int cmd_auto_test(int argc, char **argv) } gpio_set(pin_out); - if (xtimer_mutex_lock_timeout(&lock, IRQ_TIMEOUT_US)) { + if (ztimer_mutex_lock_timeout(ZTIMER_USEC, &lock, IRQ_TIMEOUT_US)) { puts("rising interrupt timeout"); return -1; } gpio_clear(pin_out); - if (xtimer_mutex_lock_timeout(&lock, IRQ_TIMEOUT_US) == 0) { + if (ztimer_mutex_lock_timeout(ZTIMER_USEC, &lock, IRQ_TIMEOUT_US) == 0) { puts("interrupt falsely generated on falling edge"); return -1; } @@ -320,13 +321,13 @@ static int cmd_auto_test(int argc, char **argv) } gpio_set(pin_out); - if (xtimer_mutex_lock_timeout(&lock, IRQ_TIMEOUT_US) == 0) { + if (ztimer_mutex_lock_timeout(ZTIMER_USEC, &lock, IRQ_TIMEOUT_US) == 0) { puts("interrupt falsely generated on rising edge"); return -1; } gpio_clear(pin_out); - if (xtimer_mutex_lock_timeout(&lock, IRQ_TIMEOUT_US)) { + if (ztimer_mutex_lock_timeout(ZTIMER_USEC, &lock, IRQ_TIMEOUT_US)) { puts("rising interrupt timeout"); return -1; } @@ -335,13 +336,13 @@ static int cmd_auto_test(int argc, char **argv) gpio_irq_disable(pin_in); gpio_set(pin_out); - if (xtimer_mutex_lock_timeout(&lock, IRQ_TIMEOUT_US) == 0) { + if (ztimer_mutex_lock_timeout(ZTIMER_USEC, &lock, IRQ_TIMEOUT_US) == 0) { puts("interrupt falsely generated on rising edge while disabled"); return -1; } gpio_clear(pin_out); - if (xtimer_mutex_lock_timeout(&lock, IRQ_TIMEOUT_US) == 0) { + if (ztimer_mutex_lock_timeout(ZTIMER_USEC, &lock, IRQ_TIMEOUT_US) == 0) { puts("interrupt falsely generated while disabled"); return -1; } @@ -349,19 +350,19 @@ static int cmd_auto_test(int argc, char **argv) /* test IRQ enable */ gpio_irq_enable(pin_in); - if (xtimer_mutex_lock_timeout(&lock, IRQ_TIMEOUT_US) == 0) { + if (ztimer_mutex_lock_timeout(ZTIMER_USEC, &lock, IRQ_TIMEOUT_US) == 0) { puts("interrupt falsely generated after being re-enabled"); return -1; } gpio_set(pin_out); - if (xtimer_mutex_lock_timeout(&lock, IRQ_TIMEOUT_US) == 0) { + if (ztimer_mutex_lock_timeout(ZTIMER_USEC, &lock, IRQ_TIMEOUT_US) == 0) { puts("interrupt falsely generated on rising edge after re-enabled"); return -1; } gpio_clear(pin_out); - if (xtimer_mutex_lock_timeout(&lock, IRQ_TIMEOUT_US)) { + if (ztimer_mutex_lock_timeout(ZTIMER_USEC, &lock, IRQ_TIMEOUT_US)) { puts("interrupt not re-enabled"); return -1; }