https://blog.csdn.net/hwx1546/article/details/123030865
cat /proc/devices
,查看主设备号.
内核提供register_chrdev_region和alloc_chrdev_region主次设备号,个人建议最好使用alloc_chrdev_region来让内核自动分配并注册设备号。如果要使用register_chrdev_region函数,请先查看内核有哪些设备号是空闲,不能使用已经注册过设备号。
https://blog.csdn.net/hwx1546/article/details/123030865
cat /proc/devices
,查看主设备号.
内核提供register_chrdev_region和alloc_chrdev_region主次设备号,个人建议最好使用alloc_chrdev_region来让内核自动分配并注册设备号。如果要使用register_chrdev_region函数,请先查看内核有哪些设备号是空闲,不能使用已经注册过设备号。
0 条评论