- Linux Device Driver Development Cookbook
- Rodolfo Giometti
- 172字
- 2021-06-24 13:54:16
Creating the simplest char driver
In the Linux kernel, three major device types exist—char device, block device, and net device. And of course, we have three major device driver types; that is, char, block, and net drivers. In this chapter, we're taking a look at a char (or character) device, which is a kind of peripheral that can be accessed as a stream of bytes, such as a serial port, audio device, and so on. However, in this recipe, we're going to present a really basic char driver, which simply registers itself and does nothing more than this. Even if it may seem useless, we will discover that this step really introduces plenty of new concepts!
Actually, it could be possible to exchange data between peripherals and user space without a char, block, or net driver but by simply using some mechanism offered by the sysfs , but this is a special case and it is generally used only for very simple devices that have to exchange simple data types.
推薦閱讀
- Ubuntu Linux操作系統
- 開源安全運維平臺OSSIM疑難解析:入門篇
- RESS Essentials
- Windows 7中文版從入門到精通(修訂版)
- 網絡操作系統教程:Windows Server 2016管理與配置
- 嵌入式實時操作系統:RT-Thread設計與實現
- Mobile First Design with HTML5 and CSS3
- Linux服務器配置與管理
- Linux從入門到精通(視頻教學版)
- Angular權威教程
- 操作系統之哲學原理第2版
- 再也不踩坑的kubernetes實戰指南
- Windows Azure實戰
- Getting Started with Raspberry Pi Zero
- 分布式實時處理系統:原理、架構與實現