1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:12:57 +01:00

tests/driver_sht2x: migration to ztimer

This commit is contained in:
Gunar Schorcht 2022-12-13 00:52:33 +01:00
parent 8a605517f5
commit e152159a35
3 changed files with 5 additions and 5 deletions

View File

@ -3,6 +3,6 @@ include ../Makefile.tests_common
FEATURES_REQUIRED += periph_i2c
USEMODULE += sht2x
USEMODULE += xtimer
USEMODULE += ztimer_sec
include $(RIOTBASE)/Makefile.include

View File

@ -1,4 +1,4 @@
# this file enables modules defined in Kconfig. Do not use this file for
# application configuration. This is only needed during migration.
CONFIG_MODULE_SHT2X=y
CONFIG_MODULE_XTIMER=y
CONFIG_MODULE_ZTIMER_SEC=y

View File

@ -25,9 +25,9 @@
#include "sht2x_params.h"
#include "sht2x.h"
#include "xtimer.h"
#include "ztimer.h"
#define SLEEP_2S (2 * 1000 * 1000u) /* 2 seconds delay between printf */
#define SLEEP_2S (2) /* 2 seconds delay between printf */
static void dump_buffer(const char* txt, uint8_t* buffer, size_t len);
@ -94,7 +94,7 @@ int main(void)
);
}
xtimer_usleep(SLEEP_2S);
ztimer_sleep(ZTIMER_SEC, SLEEP_2S);
}
return 0;