7dfd753b21
This patch adds an example application that shows how to use I2C driver APIs to communicate with LSM9DS0 sensor. At every 5 seconds, the application reads the "Who Am I" register from gyroscope sensor and prints if the register value matches the expected value.
18 lines
408 B
Makefile
18 lines
408 B
Makefile
TARGET=galileo
|
|
|
|
KNOWN_EXAMPLES = gpio-output i2c-LSM9DS0
|
|
|
|
ifneq ($(filter $(EXAMPLE),$(KNOWN_EXAMPLES)),)
|
|
CONTIKI_PROJECT = $(EXAMPLE)
|
|
else
|
|
CONTIKI_PROJECT = help
|
|
endif
|
|
|
|
all: $(CONTIKI_PROJECT)
|
|
|
|
CONTIKI = ../..
|
|
include $(CONTIKI)/Makefile.include
|
|
|
|
help:
|
|
@echo -e "\nSet the variable EXAMPLE to one of the following Galileo-specific examples:"
|
|
@for EXAMPLE in $(KNOWN_EXAMPLES); do echo $$EXAMPLE; done
|