- 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.
推薦閱讀
- Learning OpenDaylight
- Implementing Cisco UCS Solutions
- Extending Puppet
- WindowsServer2012Hyper-V虛擬化部署與管理指南
- SharePoint 2013 應(yīng)用開(kāi)發(fā)實(shí)戰(zhàn)
- RESS Essentials
- Docker+Kubernetes應(yīng)用開(kāi)發(fā)與快速上云
- 嵌入式實(shí)時(shí)操作系統(tǒng):RT-Thread設(shè)計(jì)與實(shí)現(xiàn)
- Linux使用和管理指南:從云原生到可觀測(cè)性
- 無(wú)蘋果不生活 The New iPad隨身寶典
- 一學(xué)就會(huì):Windows Vista應(yīng)用完全自學(xué)手冊(cè)
- Windows 8實(shí)戰(zhàn)從入門到精通(超值版)
- Linux網(wǎng)絡(luò)操作系統(tǒng)項(xiàng)目教程(RHEL 7.4/CentOS 7.4)(第3版)(微課版)
- 嵌入式微系統(tǒng)
- Linux從入門到精通(視頻教學(xué)版)