tests/driver_ads101x: migrate to ztimer
This commit is contained in:
parent
3fa2154d48
commit
bcdbec40e3
@ -1,5 +1,7 @@
|
|||||||
include ../Makefile.tests_common
|
include ../Makefile.tests_common
|
||||||
|
|
||||||
USEMODULE += ads101x
|
USEMODULE += ads101x
|
||||||
|
USEMODULE += ztimer
|
||||||
|
USEMODULE += ztimer_msec
|
||||||
|
|
||||||
include $(RIOTBASE)/Makefile.include
|
include $(RIOTBASE)/Makefile.include
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
# this file enables modules defined in Kconfig. Do not use this file for
|
# this file enables modules defined in Kconfig. Do not use this file for
|
||||||
# application configuration. This is only needed during migration.
|
# application configuration. This is only needed during migration.
|
||||||
CONFIG_MODULE_ADS101X=y
|
CONFIG_MODULE_ADS101X=y
|
||||||
|
CONFIG_MODULE_ZTIMER=y
|
||||||
|
CONFIG_MODULE_ZTIMER_MSEC=y
|
||||||
|
|||||||
@ -21,13 +21,12 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "xtimer.h"
|
#include "ztimer.h"
|
||||||
#include "timex.h"
|
|
||||||
#include "ads101x.h"
|
#include "ads101x.h"
|
||||||
#include "ads101x_params.h"
|
#include "ads101x_params.h"
|
||||||
#include "ads101x_regs.h"
|
#include "ads101x_regs.h"
|
||||||
|
|
||||||
#define SLEEP_USEC (100 * US_PER_MS)
|
#define SLEEP_MSEC 100
|
||||||
|
|
||||||
static ads101x_t dev;
|
static ads101x_t dev;
|
||||||
static ads101x_alert_t alert_dev;
|
static ads101x_alert_t alert_dev;
|
||||||
@ -117,7 +116,7 @@ int main(void)
|
|||||||
|
|
||||||
puts("");
|
puts("");
|
||||||
|
|
||||||
xtimer_usleep(SLEEP_USEC);
|
ztimer_sleep(ZTIMER_MSEC, SLEEP_MSEC);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user