Research and Implementation of USB HID Driver in Embeded Linux System
- Author
- ZhangHao
- Advisor
- ZhangYi
- School
- Chongqing University
- Major
- Computer Software and Theory
- Classification
- TP316.81
- Degree
- Master's thesis
- Year
- 2008
- Downloads
- 614
- Citations
- 5
Abstract
An embedded system which aims at app1icaiton fieid basing on computer technology is a special system and it adapts to application System Whose function, credibility,cost,volume and consume have strict standards.Both of its software and hardware are cuttable.The applications of embedded systems are becoming increasingly wide which can be said everywhere. Due to open source, powerful kernel, smaller size and other reasons, Linux operation system is widely used in the embedded system. The first work is to port kernel and code driver when applying linux kernel to a special embedded platform.The paper which aims at S3C2410 embeded plantform gives the method of transplanting linux kernel and implements USB human interface device driver.The paper is divided into three parts:①The method which aims at the target platform includes configuring and compiling Linux kernel and Bootloader is put forward On the basis of introducing embedded plantform’s software and hardware development environment.②Research on the Linux kernel device driver model and architecture deeply and studies USB protocol and USB host-side driver on the realization Linux and the knowledge of some of the basic USB protocol, USB interface features, USB bus transfer agreement and the USB device driver development .③The paper has put forward the specific methods of the process of USB mouse driver program design and methods of the technical details and debugging under the S3C2410 embeded platform.In order to finish the embedded Linux development platform project, the author have read and rewritten a lot of the kernel source codes and done a deep exploration and research on the underlying realization mechanism of the kernel and USB driver writing. Contents of the paper can also play a role of kernel transplantation or driver development in other platform.
Table of contents
Chinese Abstract 4-5
Abstract 5-10
1 Introduction 10-13
1.1 Study background and significance 10
1.2 research status 10-12
1.2.1 Development of embedded operating systems 11-12
1.3 this issue is the main work 12-13
1.3.1 The purpose of this study 12
1.3.2 The main contents 12-13
2 describes the target platform and development environment to build 13-26
2.1 target platform hardware environment 13-14
2.2 target platform development tools 14
2.2.1 cross compiler tool 14
2.2.2 Creating a cross -compiler environment 14
2.3 Linux kernel porting 14-17
2.3.1 Makefile 15
2.3.2 configuration file 15
2.3.3 Linux kernel 15-17
2.4 Linux kernel configuration, compilation , installation 17-20
2.4.1 kernel environment and development tools to prepare 17-18
2.4.2 Linux kernel configuration 18-19
2.4.3 Linux kernel compilation 19-20
2.5 Bootloader Overview 20-23
2.5.1 Bootloader role 20-22
2.5.2 Bootloader main work 22-23
2.5.3 compiler Bootloader 23
2.6 root filesystem 23-24
2.7 Configuring the target platform 24-25
2.8 Chapter Summary 25-26
3 Linux Device Driver Model and Framework Analysis 26-35
3.1 Linux Device Drivers Overview 26-28
3.1.1 Linux device model 26-27
3.1.2 kobject data structure 27-28
3.2 Linux device driver framework analysis 28-31
3.2.1 Linux device drivers classification 29-30
3.2.2 device file and device number 30
3.2.3 loadable module mechanism 30-31
3.2.4 kernel space and user space 31
3.3 device driver critical data structures 31-33
3.3.1 file and inode structure 31-32
3.3.2 file_operations structure 32-33
3.4 kernel concurrency control 33
3.5 Memory and I / O port access 33
3.6 interrupt 33-34
3.7 device driver initialization and compile 34
3.8 Chapter Summary 34-35
4 USB protocol and the Linux USB subsystem 35-51
4.1 USB protocol 35-38
4.1.1 USB Host 36
4.1.2 USB hub 36
4.1.3 USB devices 36
4.1.4 USB communication protocol 36-37
4.1.5 USB packet type 37
4.1.6 Domain 37
4.1.7 Transaction Processing 37
4.1.8 USB bus transfer 37-38
4.2 USB device 38-42
4.2.1 Endpoint 38-40
4.2.2 Interface 40-41
4.2.3 configurations 41
4.2.4 Equipment 41-42
4.3 Linux USB driver hierarchy 42-43
4.4 USB Request Block (URB) 43-45
4.4.1 URB lifecycle 44-45
4.5 USB host driver 45-48
4.5.1 Host Controller Driver important data structure 45-47
4.5.2 OHCI host controller driver 47-48
4.6 S3c2410 USB host driver implementation 48-50
4.6.1 configuration file 48
4.6.2 S3c2410 host controller driver 48-50
4.7 Chapter Summary 50-51
5 USB mouse -driven design and implementation 51-63
5.1 USB HID Overview 51
5.2 USB mouse works 51-53
5.2.1 USB bus enumeration 52-53
5.2.2 device descriptor 53
5.3 USB mouse driver to achieve 53-60
5.3.1 USB mouse device schema 53-54
5.3.2 driver registration and cancellation of 54-55
5.3.3 Device probe function 55-58
5.3.4 device disconnect function 58
5.3.5 device to open and release function 58-59
5.3.6 URB transfer is complete function 59-60
5.4 USB mouse debugging 60-62
5.5 Chapter Summary 62-63
6 Conclusion and Outlook 63-64
6.1 Conclusion 63
6.2 Prospects for future research work 63-64
Thanks 64-65
References 65-67
Appendix 67-69
Related dissertations
- Design and Implementation of Driver Module Based on Android System
- Real-time Operating System Customization of Linux and Development of Device Driver
- Research and Implementation of Usbtmc Specification about Universal Test Instrument
- The Designand Realization of Embedded USB Mass Storage System
- Design and development of laser gyro and USB interface frequency test system
- Research and Design of Online Monitoring System of Metal Sawing Machine Saw Blade Displacement
- Design of Embedded 8 Channels High Speed Data Acquisition System
- Design and implementation of remote control system based on Embedded Intelligent Home Furnishing
- The Designand Implement of Fingerprint Access Controlsystem Based on ARM and Linux
- The Design and Research of Two-dimensional Barcode Recognition Embedded System
- Analysis and reliability of Linux device driver
- Research and Implementation of User Mode Driver for Network Device Based on Embedded Linux
- The System Migration and Development of Embeded Linux Based on MagicARM2410
- Design and Implementation of Software System of Industrial Controlling Display Device
- Design and Realization of the Isochronous Transport Driver for Bluetooth USB Device on Linux
- The Design of USB Host/Slave Interface in Embedded Systems Based on ARM
- Research and Design of Data Acquisition System Based on USB Interface
- Realization of intelligent instrument system based on embedded Linux and USB communication
- Development of Embeded Data Acquisitions and Control System Based on VxWorks
- Research and Realization of Video Surveillance and Play Based on ARM9Hardware Platform