mirror of
https://gitlab.com/manzerbredes/ina260-sysfs-driver.git
synced 2025-06-05 22:27:40 +00:00
Update
This commit is contained in:
parent
f0869aa5ba
commit
9acb2d7635
4 changed files with 476 additions and 86 deletions
24
Makefile
Normal file
24
Makefile
Normal file
|
@ -0,0 +1,24 @@
|
|||
# Linux Makefile Location:
|
||||
#LML="/usr/src/linux-headers-$(shell uname -r)/"
|
||||
LML="/lib/modules/$(shell uname -r)/build/" # Change if required on your system
|
||||
|
||||
obj-m += ina260.o
|
||||
|
||||
all: ina260.c
|
||||
make -C $(LML) M=$(PWD) modules
|
||||
|
||||
run: ina260.c
|
||||
-echo 0x40 > /sys/bus/i2c/devices/i2c-2/delete_device
|
||||
-rmmod ina260
|
||||
make clean
|
||||
make
|
||||
insmod ina260.ko
|
||||
echo ina260 0x40 > /sys/bus/i2c/devices/i2c-2/new_device
|
||||
|
||||
read: read.c
|
||||
gcc $^ -o read
|
||||
|
||||
clean:
|
||||
rm -f ina260*.o ina260.ko ina260.mod* Module.symvers modules.order .ina260* .Module* .modules*
|
||||
|
||||
.PHONY: clean run
|
Loading…
Add table
Add a link
Reference in a new issue