Under Linux, the drive device has character device driver, block device driver and network device drive three kinds, before learning the character device driver, now began to learn block device driver. First of all to compare the
Excerpt from: http://blog.chinaunix.net/uid-20799298-id-99675.htmlThe original text is writing device driver in linux:a Brief tutorial.This article focuses on three examples to explain the Linux driver, so that novice quickly, from the code layer to understand what is the Linux device driver.This article is a note, in general translation of the first two parts of the article, namely the first two examples,
equipment does not need, such as programmable interrupt Controller, programmable interval timer.Device Driver Model:1, Power Management (control of different voltage levels on the power line of the device)2. Plug and Play (transparent resource allocation when configuring the device)3, Hot plug (System runtime support device insertion and removal)4, the kernel is
, USB audio class device, USB video class device, and mass storage devices can be used to develop general device drivers. You only need to modify the vid and PID.(2) In addition to implementing the stream Driver Interface for a USB device, you also need to implement the thre
Document directory
A quick tour of the hardware
The various modules and their interrelations
How URBS keep it all together
Input Handling
Even though UNIX traditionally considers a device as either a "char device" or a "Block device" (as outlined by the 'C' or 'B' in their/DevEntry points), new classes of device
1. Overview
I have read Linux Device Drivers 3 (photocopy) (ldd3 for short) and I have forgotten about it. So I want to take a note of what I have read before, and focus on the comments and understanding of the Code. I am also a beginner in Linux kernel, so I will introduce every detail in the learning-driven process step by step. It is hoped that these blogs will help others, like me, find new entry in the
1.1 In object-oriented programming, the device driver core layer and examples can define a base class for a class of similar things, and specific things can inherit the functions in this base class. If the implementation of a function of the inherited object is the same as that of the base class, it can directly inherit the functions of the base class. On the contrary, it can be overloaded. This object-oriented design method greatly improves the code
transaction.The following is a method of using the struct with the C99 syntax, and the struct member that does not show the declaration is initialized to null by GCCstatic const struct File_operations Globalmem_fops = {. Owner = This_module,. Llseek = Globalmem_llseek,. Read = Globalmem_read,. write = Globalmem_write,. Unlocked_ioctl = globalmem_ioctl,/* in the kernel version of 2.6.x, in the file operation structure,Will have the IOCTL field, use Unlocked_ioctl in the higher version */. open =
Recently read a lot of kernel programming and drive development tutorials, also refer to some of the Development Board examples. The conclusion is not as high as you can imagine. Developing a driver requires a certain understanding of the kernel, not a thorough interpretation.
The drivers referred to below are for specific devices and are made to work in dynamic loading of modules. The driver framework is layered, some
!Released on: February 1, February 09, 2006Level: elementaryAccess status: 3751 viewsSuggestion: 0 (add comments)
1. Get the kernel versionWhen the device driver needs to support different kernel versions at the same time, in the compilation phase, the kernel module needs to know the version of the currently used kernel source code to use the corresponding kernel API. In the 2.4 and 2.6 kernels, the source code header file linux/version. h is defined
Http://21cnbao.blog.51cto.com/109393/336263 1.1 Device Driver core layer and examples in the object-oriented programming, you can define a base class for a similar thing, specific things can inherit the functions in this base class. If the implementation of a function of the inherited object is the same as that of the base class, it can directly inherit the functions of the base class. On the contrary, it can be overloaded. This object-oriented design
are larger than one page. They must occupy the physical page of the connection, because the device uses ISA or PCI system Bus data transfer, both of which use physical addresses
DIY Assignment
The Get_free_pages function can allocate up to a few m bytes of memory, but for a larger number of requests. Even requests that are far less than 128KB generally fail because the system memory is full of memory fragmentation
the PCI system bus, both of which use physical addresses
DIY Assignment
The Get_free_pages function can allocate up to a few m bytes of memory, but for a larger number of requests, even requests that are much less than 128KB will typically fail because the system memory is full of memory fragmentation
When the kernel cannot return the requested amount of memory or needs more than 128KB of memory, in addition to returning-enomem, another method is to allocate
Linux device driversOne, the role of device-drivenThe most popular explanation for device drivers is " Drive hardware Device Actions ". Drive and the underlying hardware directly to deal with, according to the specific work of the hardware
[Blog.csdn.net/lanmanck]
Once upon a while, we found a job as a driver engineer, with a low monthly salary. The Code of people we have never touched cannot be understood at all.
Today is good. If we do not want to pursue differentiation, we can allow the system to communicate with USB devices without drivers. Linux will not talk about it. libusb is very useful. Now we will talk about windows.
Winusb is a kind of middleware similar to libusb and USB
Recently, I have been reading books and learning about Linux device drivers. I am getting started with the simplest character device drivers and can have a macro understanding of the driver framework and functions of various elements. The following is a detailed analysis of the dev
I have been learning device-driven programming for some time and have written several drivers. So I have a new understanding and understanding of the device driver. I have been learning device-driven programming for some time and have written several drivers. So I have a new
Brief introduction
The name of the TTY device is abbreviated from the previous telex, originally referred to as a physical or virtual terminal connected to a UNIX system
The core of the Linux TTY driver is immediately below the standard character device driver layer and provides a range of functions that are used as interfaces by terminal type devices
There are three types of TTY
Learning device driver Programming also has a period of time, also wrote a few drivers, so there are some new understanding and understanding of the device driver, summed up. Learning device-driven programming has also been a while, and several drivers have been written. So
Learning device driver Programming also has a period of time, also wrote a few drivers, so there are some new understanding and understanding of the device driver, summed up. Learning device driver Programming also has a period of time, also wrote a few drivers, so there are
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.