Skip to content

Commit

Permalink
Merge pull request #27 from an1kh/mpu6050_example
Browse files Browse the repository at this point in the history
mpu6050 driver example
  • Loading branch information
AleksandrBulyshchenko authored Nov 13, 2017
2 parents 647ea1f + 9a63b4c commit 79f1a87
Show file tree
Hide file tree
Showing 7 changed files with 829 additions and 0 deletions.
36 changes: 36 additions & 0 deletions mpu6050/Makefile
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
Loading

0 comments on commit 79f1a87

Please sign in to comment.