diff --git a/tests/driver_kw2xrf/Makefile b/tests/driver_kw2xrf/Makefile index 6b4111e418..b0fa0e447e 100644 --- a/tests/driver_kw2xrf/Makefile +++ b/tests/driver_kw2xrf/Makefile @@ -2,6 +2,7 @@ include ../Makefile.tests_common USEMODULE += auto_init_gnrc_netif USEMODULE += gnrc_netdev_default +USEMODULE += fmt USEMODULE += shell USEMODULE += shell_commands USEMODULE += ps diff --git a/tests/driver_kw2xrf/main.c b/tests/driver_kw2xrf/main.c index 99ee100d1f..86a7fd8d3e 100644 --- a/tests/driver_kw2xrf/main.c +++ b/tests/driver_kw2xrf/main.c @@ -19,6 +19,7 @@ #include +#include "fmt.h" #include "shell.h" #include "kw2xrf.h" #include "shell_commands.h" @@ -32,21 +33,10 @@ #include "kw2xrf_tm.h" /* utility functions */ -static bool _is_number(char *str) -{ - for (; *str; str++) { - if (*str < '0' || *str > '9') { - return false; - } - } - - return true; -} - static void _set_test_mode(int argc, char **argv, uint8_t mode) { (void) argc; - if (_is_number(argv[1])) { + if (fmt_is_number(argv[1])) { kernel_pid_t dev = atoi(argv[1]); if (gnrc_netif_get_by_pid(dev)) {