1、注册字符设备:
int register_chrdev(usigned int major , const char* name ,file operations* ops) ;
2、注销字符设备:
int unregister_chrdev(unsigned int major , const char * name );
3、完成了驱动的安装之后应该写一个应用程序来测试所有的驱动功能是否正常。
4、打开设备:
int (open_)(struct inode , strucr file * );如果这个函数为NULL,则设备文件的打开操作永远成功。
5、void (release)(struct inode , struct file *)与open相反。
6、int (read)(struce inode , struct file* ,char* ,int );
7、int (write)(struct inode , struct file* ,char* ,int );
8、int (ioctl)(struct inode ,struct file* ,unsigned int , unsigned int );
9、int (mmap)(struct inode ,struct file* ,struct vm_area_struct * );
05-06
05-06
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交