![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
linux驱动
wuxy_shenzhen
这个作者很懒,什么都没留下…
展开
-
第一个hello驱动开发简介
1 在kernel/driver目录下面建立hello_wuxy的文件夹 在hello_wuxy里面添加 Makefile Kconfig 以及hello_wuxy.c Makefile 内容如下: # # Makefile for test hello_wuxy driver # obj-$(CONFIG_HELLO_WUXY) += hello_wuxy.o原创 2012-06-19 10:30:35 · 556 阅读 · 0 评论 -
register_chrdev_region
int register_chrdev_region(dev_t first, unsigned int count, char *name); 为一个字符驱动获取一个或多个设备编号来使用 dev_t first是你要分配的起始设备编号. first 的次编号部分常常是 0, 但是没有要求是那个效果.一般通过MKDEV(DEVICES_MAJOR, 0)来表示,其中DEV原创 2012-06-19 10:40:13 · 1563 阅读 · 1 评论