The following is a simple example to describe the development process of the driver.
For example, we have a USB mouse device. The device information is described as follows:
Device descriptor:
Bcdusb: 0x0100
Bdeviceclass: 0x00
Bdevicesubclass: 0x00
Bdeviceprotocol: 0x00
Bmax
:
// Enable USB port read/write, determined by the driver pipe nameHandle hpipe = openmydevpipe ("mypipe1"); // The Pipe name in the driver, corresponding to the I/O that accesses an endpoint. Here I am writing it in disorder and it must be consistent with the driverIf (hpipe! = Invalid_handle_value) // The pipe is successfully
If the USB device in Linux works properly, you must insert a USB Bridge module into the system. At the beginning of the check, it is generally necessary to check whether the/proc/bus/usb directory exists. If not, try to insert the USB Bridge module. There are two types of
USB device detection is also performed through the USB file system under the/proc directory. To make a USB device work properly, you must insert a USB Bridge module into the system. At the beginning of the check, it is generally n
USB device detection is also performed through the USB file system under the/proc directory. To make a USB device work properly, you must insert a USB Bridge module into the system. At the beginning of the check, it is generally n
From: http://blog.csdn.net/hgd_dingjun/archive/2007/08/17/1747864.aspx
In this system, the so-called USB device and host are determined by detecting changes in the pull resistance of the VCC to determine whether there is a device connection. D12 is integrated with a k Ω pull-up resistor, which is not connected to VCC by default. when running the program, you can
, it now starts to match the device to the driver.285 int Bus_for_each_dev (struct bus_type *bus, struct device *start, 286 void *data, int (*FN) (struct device *, void * )) 287 {...... 295 Klist_iter_init_node (bus->p->klist_devices, i, 296 (start? start->p->knode _bus:null)); 297
the driver is the specific process of how to implement the access. The main driver consists of two parts, the first is the control register of the SOC programming, according to the bus output timing and command, the successful interaction with peripheral devices; the second is to process the data obtained in the first step and provide the application layer with data in a specific format.
A. The
Article Title: introduces the USB hardware device driver in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
USB stands for "Universal Serial Bus", meaning "Universal Serial B
.
Usbd_status_interface_not_found
0xc0004000
The interface is not found.
Usbd_status_inavlid_pipe_flags
0xc0005000
Invalid pipe flags.
Usbd_status_timeout
0xc0006000
The request timed out.
Usbd_status_device_gone
0xc0007000
The device is no longer present in the system.
usbd_status_status_not_mapped
0xc0008000
The d
This concept emerged when the new sysfs management device driver was adopted in linux2.6 and can be intuitively understood under the/sys directory.
Bus indicates the bus type, such as I2C, IDE, USB... many bus types such as platform, including MTD devices;
Device records device
1. Role of the wince Device
USB is a master-slave structure, which is divided into the master end and the slave end. Generally, the master end is called the host and the slave end is called the client, but there are some differences in the wince system. The master end is called the host and the slave end is called the function.For USB, embedded devices equipped w
device *start, 286 void *data, int (*FN) (struct device *, void * )) 287 {...... 295 Klist_iter_init_node (bus->p->klist_devices, i, 296 (start? start->p->knode _bus:null)); 297 while (dev = next_device (i)) !error) 298 The FN here is the __driver_attach function, so let's take a look at what it did:265 static int __driver_attach (struct
I recently want to create a project on LTE. The drivers provided by the module manufacturers include USB-to-serial-to-USB Nic drivers. The project has not been approved yet, so it is relatively empty, the idle egg pains have been studied by the USB-to-serial drive. This article tries its best to use a picture to illustrate things in a whitelist and dedicate it to
installed without a driver in windows, in addition, you can access these hardware interfaces in the user mode through the built-in Windows interfaces.
After testing, the HID device uses the bushound5 bus observer to capture data from USB devices on the bus. The HID device is very simple, it took me two hours to figure
This blog updates the latest developments in the specific interpretation of Linux device-Driven Development (3rd edition). 2015.2.26 nearly finished the first draft.This book has been rebase to the Linux 4.0 kernel in development, with most cases based on multicore cortex-a9 platforms .[F] is a revision or upgrade; [N] is a new point of knowledge; [D] is a deleted content1th Chapter "Linux Device
When you manually install the NIC driver, the system prompts "Windows cannot find the driver file of the device", as shown in the figure below:This problem is caused by the useIncorrect driverThe system cannot be identified.Solution1Download the correct driverCheck the model and hardware version of the network card. We downloaded it from the official we
Recently, I made a functional driver for a USB device, analyzed its speed bottleneck, and found out the main reasons that affect the speed of the device. Because of the versatility of the USB device, the Code subject directly uses
Relationship between bus, device, and driver in Linux
1. Bus:
As the connection channel between the host and peripherals, some buses are relatively standard and form many protocols. Such as PCI, USB, 1394, and IIC. Any device can select a suitable bus to connect to the host. Of course, the host may be the CPU itself. T
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.