| In today's computer science and technology applications area, embedded software development has become a very important application field. Embedded development is widely used in smart home appliances, mobile phones, automotive, industrial control and other fields. With the growing requirements and increasingly wide range of applications, the efficiency and the quality of the embedded development is also a higher required. However, embedded development has different special aspects of other applications development, embedded developers are often closely linked with the hardware, and the completion of the function development based on hardware, debugging and testing of embedded development is also more complicated. In the current embedded software development process. As the development platform of heavy use, driven development has become an important part, so then the development of a generic driver becomes meaningful work.Today's embedded development platform S3C2440 Samsung production, mainly dedicated for handheld devices designed, using arm9 processor that power consumption and small, simple, reliable design is suitable for products with higher requirements. Especially in the video with a good functional capacity, become a platform used by a lot of embedded development. We selected S3C2440 platform touch screen and analog-digital conversion interface ADC driver, in touch screen driver provided by Samsung factory, analog-digital conversion unit is 8 channel 10-bit output, but We found that the touch screen interface use just 4 analog input channels in the process of touch screen positioning, thus an additional 4- channels wasted, so we develop the ADC drivers in the touch screen and analog-digital conversion interface that has a strong practical significance.Embedded Linux inherits the characteristics of Linux open source operating system and also equips with an embedded feature, so embedded Linux has gained a huge advantage in the technology and promotion, become a mainstream operating system in embedded development, therefore we used embedded Linux as a development platform and kernel version identification for the 2.6 kernel.This thesis research focuses on portability of the driver, portability of software has a very strong demand and practical significance in the current software development. Portability has become a very important issue, the software has good portability not only saves manpower, but also greatly improves the efficiency of software development and also greatly improve the quality of the software, How to make drivers have better portability, has became a subject area in embedded development, arm9 has a lots of development board vendors, and Linux kernel of the 2,6 version is also different of version 2.4, how to study those difference and resolve those differences in the development process, allowing developers to develop a common driver is worth studying. Therefore, this paper attempts to study portability in both horizontal and vertical aspects. horizontal is to analysis portability between different development boards, because the differences between different series development board was too large, we only compared Samsung Series development board between the S3C2440 and S3C2410, vertical is to analysis portability between the kernel in the 2.6 version and 2.4 version then we completed the stated objective of this thesis as completing the entire paper.Now there are still a lot of embedded developments based on 2.4 kernel, but from 2.4 to 2.6, Linux kernel loadable have taken place so many changes on module mechanism,device model,some of the core API. The paper's goal is to make driver have portability of the maximum. How to make driver both support 2.4 and 2.6 kernel. Driver is composed by one or several external kernel modules, against on the impact of write device drivers because of module mechanism of change in 2.6 kernel, paper compare the difference between 2.4 and 2.6 kernel from the kernel module compiled, loaded version of the check, the initialization and exit modules count, the output kernel symbol, the command line input parameters, and licensing statement. To improve on the driver to both support 2.4 and 2.6 kernel. The paper is mainly focus on character device driver as the analog-digital conversion is character device.Main part of the paper is divided into five chapters. Chapter 1, the paper is mainly about the research motivation, objectives and contents. Chapter 2 introduces some background knowledge of the paper, and characteristics of embedded Linux operating system and the S3C2440 development board features, interface settings. Also introduces embedded Linux development process. In Chapter 3, mainly for driver design, design development environment first, including the hardware environment, software environment, cross-compiler environment, debugging environment quadruple development environment. Followed by detailed analysis of the touch screen and analog-digital conversion interfaces, describes the ADC conversion of the functional, electrical characteristics, to understand the relationship between the cells of each module, a detailed study of the interface register bit setting function. Finally, design and analysis the conversion process in the control process in detail based on a detailed study of the register. Chapter 4, in this chapter to complete the drive part of implementation, first realized the import function of the file structure, the driver is loaded into the kernel in the way of module, realize the loading and unloading functions, and complete the relevant registration. Then completed the compilation debug test drive, including the establishment of cross-compiler environment, compiler configure U-Boot, compile the kernel compile configuration file system image configuration file making, move all part of the firing to the development board, thus this board set up in the development of the Linux operating system platform. Finally completed the work of compiling test of driver, first driver will be compiled into the kernel source tree in the kernel environment, and then write driver test program, compile and run the test program to complete testing. Chapter 5, in this chapter driver portability study mainly from two aspects, the platform level and kernel-level graft transplanted. Kernel-level graft analyzes the difference of 2.4 and 2.6 kernel from 6 parts of version check, module initialization and exit, module usage count, the module command-line parameter input, and change different driver to support both 2.4 and 2.6 kernel. Chapter 5, summarizes the overall content and completion of the paper.Final thesis completed ADC driver development of touch-screen and analog-digital conversion interface on S3C2440 development board, and complete the portability study of the driver through the research of the difference of development boards, and 2.4 and 2.6 kernel. |