mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
tests: driver_mag3110: vtimer -> xtimer
This commit is contained in:
parent
0438fe9146
commit
2199aa3d1c
@ -4,7 +4,7 @@ include ../Makefile.tests_common
|
|||||||
FEATURES_REQUIRED = periph_i2c
|
FEATURES_REQUIRED = periph_i2c
|
||||||
|
|
||||||
USEMODULE += mag3110
|
USEMODULE += mag3110
|
||||||
USEMODULE += vtimer
|
USEMODULE += xtimer
|
||||||
|
|
||||||
ifneq (,$(TEST_MAG3110_I2C))
|
ifneq (,$(TEST_MAG3110_I2C))
|
||||||
CFLAGS += -DTEST_MAG3110_I2C=$(TEST_MAG3110_I2C)
|
CFLAGS += -DTEST_MAG3110_I2C=$(TEST_MAG3110_I2C)
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "vtimer.h"
|
#include "xtimer.h"
|
||||||
#include "mag3110.h"
|
#include "mag3110.h"
|
||||||
|
|
||||||
#define SLEEP (1000 * 1000U)
|
#define SLEEP (1000 * 1000U)
|
||||||
@ -64,7 +64,7 @@ int main(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
vtimer_usleep(SLEEP);
|
xtimer_usleep(SLEEP);
|
||||||
mag3110_read(&dev, &x, &y, &z, &status);
|
mag3110_read(&dev, &x, &y, &z, &status);
|
||||||
printf("Field strength: X: %d Y: %d Z: %d S: %2x\n", x, y, z, status);
|
printf("Field strength: X: %d Y: %d Z: %d S: %2x\n", x, y, z, status);
|
||||||
mag3110_read_dtemp(&dev, &temp);
|
mag3110_read_dtemp(&dev, &temp);
|
||||||
|
Loading…
Reference in New Issue
Block a user