This thesis introduces how to develop kernel level device drivers on Linux platform in detail. On the basis of comparing proc file system with dev file system, we choose PCI devices and USB devices as instances to introduce the method of writing device drivers for character devices by using these two file systems.
Key words: Linux; device driver; kernel space; PCI; USB
Linux operation system can work in two modes. One is in user space, the other is in kernel space. When we want to write a device driver, we should decide what functions can be implemented by using module and what can be done in user space. As an general principle, all that can be programmed in user space should not be fulfilled in kernel space. Although sometimes writing a user space device driver is a wise alternative to kernel hacking, user space drivers can’t finish too much tasks. In case that we can’t accomplish our driver in user space ,or when we emphasize the importance of real time and stability, a kernel level device driver is needed.
声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉
全部0条评论
快来发表一下你的评论吧 !