摘要:
first let's look at the struct file_operation{.ioctl = fun_name,(if in linux-digilent ti is .unlocked_ioctl = fun_name)} function declare:static int my_ioctl(unsigned int reg_num,unsigned int cmd,struct data *arg);now we know, there is a struct named datastruct data{int reg_num;int reg_val;};the 阅读全文