From 546283fd05fb896f98bc35e8b8f871d644259e7c Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Tue, 2 Nov 2021 11:12:33 +0100 Subject: [PATCH] tests/driver_bmp180: migrate to ztimer --- tests/driver_bmp180/Makefile | 3 ++- tests/driver_bmp180/app.config.test | 3 ++- tests/driver_bmp180/main.c | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/driver_bmp180/Makefile b/tests/driver_bmp180/Makefile index 9e707a856f..c26d71004f 100644 --- a/tests/driver_bmp180/Makefile +++ b/tests/driver_bmp180/Makefile @@ -1,7 +1,8 @@ include ../Makefile.tests_common USEMODULE += bmp180 -USEMODULE += xtimer +USEMODULE += ztimer +USEMODULE += ztimer_msec # set default altitude TEST_ALTITUDE ?= 158 # altitude in Polytechnique School campus diff --git a/tests/driver_bmp180/app.config.test b/tests/driver_bmp180/app.config.test index 16ee22e6da..f20a36fb0a 100644 --- a/tests/driver_bmp180/app.config.test +++ b/tests/driver_bmp180/app.config.test @@ -1,4 +1,5 @@ # this file enables modules defined in Kconfig. Do not use this file for # application configuration. This is only needed during migration. CONFIG_MODULE_BMP180=y -CONFIG_MODULE_XTIMER=y +CONFIG_MODULE_ZTIMER=y +CONFIG_MODULE_ZTIMER_MSEC=y diff --git a/tests/driver_bmp180/main.c b/tests/driver_bmp180/main.c index 27fc00ee21..3e86ab34d0 100644 --- a/tests/driver_bmp180/main.c +++ b/tests/driver_bmp180/main.c @@ -24,7 +24,8 @@ #include "bmp180.h" #include "bmp180_params.h" -#include "xtimer.h" +#include "timex.h" +#include "ztimer.h" #include "board.h" int main(void) @@ -84,7 +85,7 @@ int main(void) (unsigned long)pressure_0 / 100, (int)(pressure_0 % 100), (int)altitude); - xtimer_sleep(2); + ztimer_sleep(ZTIMER_MSEC, 2 * MS_PER_SEC); } return 0;