mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
drivers/shtc1: migrate to ztimer
This commit is contained in:
parent
097b1970d2
commit
e71988d22a
@ -11,4 +11,3 @@ config MODULE_SHTC1
|
||||
depends on TEST_KCONFIG
|
||||
select MODULE_PERIPH_I2C
|
||||
select MODULE_CHECKSUM
|
||||
select MODULE_XTIMER
|
||||
|
@ -1,3 +1,2 @@
|
||||
FEATURES_REQUIRED += periph_i2c
|
||||
USEMODULE += xtimer
|
||||
USEMODULE += checksum
|
||||
|
@ -3,6 +3,8 @@ include ../Makefile.tests_common
|
||||
DRIVER ?= shtc1
|
||||
|
||||
USEMODULE += fmt
|
||||
USEMODULE += ztimer
|
||||
USEMODULE += ztimer_msec
|
||||
USEMODULE += $(DRIVER)
|
||||
|
||||
include $(RIOTBASE)/Makefile.include
|
||||
|
@ -2,3 +2,5 @@
|
||||
# application configuration. This is only needed during migration.
|
||||
CONFIG_MODULE_FMT=y
|
||||
CONFIG_MODULE_SHTC1=y
|
||||
CONFIG_MODULE_ZTIMER=y
|
||||
CONFIG_MODULE_ZTIMER_MSEC=y
|
||||
|
@ -21,10 +21,11 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "timex.h"
|
||||
#include "ztimer.h"
|
||||
#include "fmt.h"
|
||||
#include "shtc1.h"
|
||||
#include "shtc1_params.h"
|
||||
#include "xtimer.h"
|
||||
#include "fmt.h"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
@ -55,7 +56,7 @@ int main(void)
|
||||
printf("Temperature [°C]: %s\n", str_temp);
|
||||
printf(" Humidity [%%rH]: %s\n", str_hum);
|
||||
|
||||
xtimer_sleep(2);
|
||||
ztimer_sleep(ZTIMER_MSEC, 2 * MS_PER_SEC);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user