-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from an1kh/mpu6050_example
mpu6050 driver example
- Loading branch information
Showing
7 changed files
with
829 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# | ||
# mpu6050 accelerometer & gyroscope | ||
# | ||
ifneq ($(KERNELRELEASE),) | ||
|
||
obj-m := mpu6050.o | ||
|
||
else | ||
|
||
|
||
ifeq ($(KERNELDIR),) | ||
ifeq ($(BBB_KERNEL),) | ||
$(error Path to kernel tree - KERNELDIR or BBB_KERNEL variable is not defined!) | ||
endif | ||
endif | ||
|
||
KERNELDIR ?= $(BBB_KERNEL) | ||
|
||
export ARCH = arm | ||
export CROSS_COMPILE ?= arm-linux-gnueabihf- | ||
|
||
|
||
.PHONY: all clean dtb | ||
|
||
all: | ||
$(MAKE) -C $(KERNELDIR) M=$(CURDIR) modules | ||
|
||
clean: | ||
$(MAKE) -C $(KERNELDIR) M=$(CURDIR) clean | ||
|
||
dtb: | ||
cp am335x-bone-common.dtsi $(KERNELDIR)/arch/arm/boot/dts/ | ||
$(MAKE) -C $(KERNELDIR) M=$(CURDIR) dtbs | ||
|
||
|
||
endif |
Oops, something went wrong.