tests/driver_ads101x: migrate to ztimer

This commit is contained in:
Alexandre Abadie 2021-11-02 11:21:30 +01:00
parent 3fa2154d48
commit bcdbec40e3
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,5 +1,7 @@
include ../Makefile.tests_common
USEMODULE += ads101x
USEMODULE += ztimer
USEMODULE += ztimer_msec
include $(RIOTBASE)/Makefile.include

View File

@ -1,3 +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_ADS101X=y
CONFIG_MODULE_ZTIMER=y
CONFIG_MODULE_ZTIMER_MSEC=y

View File

@ -21,13 +21,12 @@
#include <stdio.h>
#include "xtimer.h"
#include "timex.h"
#include "ztimer.h"
#include "ads101x.h"
#include "ads101x_params.h"
#include "ads101x_regs.h"
#define SLEEP_USEC (100 * US_PER_MS)
#define SLEEP_MSEC 100
static ads101x_t dev;
static ads101x_alert_t alert_dev;
@ -117,7 +116,7 @@ int main(void)
puts("");
xtimer_usleep(SLEEP_USEC);
ztimer_sleep(ZTIMER_MSEC, SLEEP_MSEC);
}
return 0;