tests: driver_pir: vtimer -> xtimer
This commit is contained in:
parent
ec01c9dee5
commit
df5b89a444
@ -12,7 +12,7 @@ ifneq (,$(filter arduino-due,$(BOARD)))
|
||||
endif
|
||||
|
||||
USEMODULE += pir
|
||||
USEMODULE += vtimer
|
||||
USEMODULE += xtimer
|
||||
|
||||
ifneq (,$(PIR_GPIO))
|
||||
CFLAGS += -DPIR_GPIO=$(PIR_GPIO)
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "thread.h"
|
||||
#include "vtimer.h"
|
||||
#include "xtimer.h"
|
||||
#include "pir.h"
|
||||
|
||||
char pir_handler_stack[THREAD_STACKSIZE_MAIN];
|
||||
@ -75,7 +75,7 @@ int main(void)
|
||||
puts("Printing sensor state every second.");
|
||||
while (1) {
|
||||
printf("Status: %s\n", pir_get_status(&dev) == PIR_STATUS_LO ? "lo" : "hi");
|
||||
vtimer_usleep(1000 * 1000);
|
||||
xtimer_usleep(1000 * 1000);
|
||||
}
|
||||
#else
|
||||
thread_create(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user