2014-10-21 17:30:36 +02:00
|
|
|
APPLICATION = driver_lsm303dlhc
|
|
|
|
include ../Makefile.tests_common
|
|
|
|
|
|
|
|
FEATURES_REQUIRED = periph_i2c
|
|
|
|
|
|
|
|
# Define default pin mappings for some boards:
|
2015-08-19 20:59:06 +02:00
|
|
|
ifneq (,$(filter iotlab-m3,$(BOARD)))
|
2014-10-21 17:30:36 +02:00
|
|
|
export TEST_LSM303DLHC_MAG_ADDR=30
|
|
|
|
export TEST_LSM303DLHC_ACC_ADDR=25
|
|
|
|
export TEST_LSM303DLHC_I2C ?=I2C_0
|
|
|
|
endif
|
|
|
|
|
|
|
|
USEMODULE += lsm303dlhc
|
2015-09-03 21:36:13 +02:00
|
|
|
USEMODULE += xtimer
|
2014-10-21 17:30:36 +02:00
|
|
|
|
|
|
|
ifneq (,$(TEST_LSM303DLHC_I2C))
|
|
|
|
CFLAGS += -DTEST_LSM303DLHC_I2C=$(TEST_LSM303DLHC_I2C)
|
|
|
|
else
|
|
|
|
# set random default
|
|
|
|
CFLAGS += -DTEST_LSM303DLHC_I2C=I2C_0
|
|
|
|
endif
|
|
|
|
ifneq (,$(TEST_LSM303DLHC_MAG_ADDR))
|
|
|
|
CFLAGS += -DTEST_LSM303DLHC_MAG_ADDR=$(TEST_LSM303DLHC_MAG_ADDR)
|
|
|
|
else
|
|
|
|
# set random default
|
|
|
|
CFLAGS += -DTEST_LSM303DLHC_MAG_ADDR=30
|
|
|
|
endif
|
|
|
|
ifneq (,$(TEST_LSM303DLHC_ACC_ADDR))
|
|
|
|
CFLAGS += -DTEST_LSM303DLHC_ACC_ADDR=$(TEST_LSM303DLHC_ACC_ADDR)
|
|
|
|
else
|
|
|
|
# set random default
|
|
|
|
CFLAGS += -DTEST_LSM303DLHC_ACC_ADDR=25
|
|
|
|
endif
|
2014-11-21 12:23:33 +01:00
|
|
|
ifneq (,$(TEST_LSM303DLHC_ACC_PIN))
|
|
|
|
CFLAGS += -DTEST_LSM303DLHC_ACC_PIN=$(TEST_LSM303DLHC_ACC_PIN)
|
|
|
|
else
|
|
|
|
# set random default
|
2015-09-29 18:30:24 +02:00
|
|
|
CFLAGS += -DTEST_LSM303DLHC_ACC_PIN=GPIO_PIN\(0,0\)
|
2014-11-21 12:23:33 +01:00
|
|
|
endif
|
|
|
|
ifneq (,$(TEST_LSM303DLHC_MAG_PIN))
|
|
|
|
CFLAGS += -DTEST_LSM303DLHC_MAG_PIN=$(TEST_LSM303DLHC_MAG_PIN)
|
|
|
|
else
|
|
|
|
# set random default
|
2015-09-29 18:30:24 +02:00
|
|
|
CFLAGS += -DTEST_LSM303DLHC_MAG_PIN=GPIO_PIN\(0,1\)
|
2014-11-21 12:23:33 +01:00
|
|
|
endif
|
2014-10-21 17:30:36 +02:00
|
|
|
|
|
|
|
include $(RIOTBASE)/Makefile.include
|