linux驱动开发之字符设备驱动编程步骤简述

1,实现入口函数 xxx_init()和卸载函数 xxx_exit() 2,申请主设备号 register_chrdev_region (与内核相关) 3,注册字符设备驱动 cdev_alloc cdev_init cdev_add (与内核相关) 4,利用udev/mdev机制建立设备文件(节点) class_create, device_create (与内核相关) 5,硬件部分初始化
相关文章
相关标签/搜索