Minor changes

This commit is contained in:
Loic Guegan 2023-08-13 16:11:03 +02:00
parent fa26bf63fe
commit df5428faf5
5 changed files with 6 additions and 5 deletions

10
Makefile Normal file → Executable file
View file

@ -2,14 +2,14 @@
#LML="/usr/src/linux-headers-$(shell uname -r)/"
LML="/lib/modules/$(shell uname -r)/build/" # Change if required on your system
obj-m += inahwmon.o
obj-m += ina2602.o
all: hwmon
ina260: ina260.c
make -C $(LML) M=$(PWD) modules
hwmon: inahwmon.c
hwmon: ina2602.c
make -C $(LML) M=$(PWD) modules
run: ina260.c
@ -20,12 +20,12 @@ run: ina260.c
insmod ina260.ko
echo ina260 0x41 > /sys/bus/i2c/devices/i2c-2/new_device
run2: inahwmon.c
run2: ina2602.c
-echo 0x41 > /sys/bus/i2c/devices/i2c-2/delete_device
-rmmod inahwmon
-rmmod ina2602
make clean
make
insmod inahwmon.ko
insmod ina2602.ko
echo ina260 0x41 > /sys/bus/i2c/devices/i2c-2/new_device