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