Saturday, August 9, 2014

Lab - proc interface

Start with module parameters lab

Add proc file:   /proc/driver/myfile with read operation

# insmod mymod.ko irq=8 debug=1 name=fpga channels=0x200,0x300

.....



# cat /proc/driver/myfile
irq:8
debug:1
name:fpga
channels:0x200,0x300


note that the user can change the parameters value after module load via sysfs interface so you need to generate the output dynamically

No comments:

Post a Comment