1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

tests/driver_bmp180: migrate to ztimer

This commit is contained in:
Alexandre Abadie 2021-11-02 11:12:33 +01:00
parent 9029e1caf9
commit 546283fd05
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405
3 changed files with 7 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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;