Android Deep Explore.

Source: Internet
Author: User

a complete Linux driver consists mainly of internal processing and interaction with hardware. The internal processing mainly refers to the Linux driver loading, unloading, and device file-related action processing (read and write device files, send I/O commands to the device file), as well as business logic. The interaction with hardware is mainly through the functions of iowrite32, IOREAD32, etc., and the registers in the hardware.

In the experiment of controlling led flicker of LEDs, the realization principle of LED driver is clearly understood: The Linux driver uses the IOWRITE32 function to write data to I/O memory first, and I/O memory interacts with the hardware device through the memory management module. The Linux driver then uses the IOREAD32 function to read the data to I/O memory again, enabling the flashing of the Linux drive control LEDs.

Also, in this section I learned that when Linux drivers are applied to different platforms, The transplant method is generally divided into two parts: 1. If the migration between different Linux kernel versions is primarily for Linux-driven internal processing, 2. If you migrate on different hardware platforms, you typically interact with the registers in the hardware by using functions such as IOWRITE32, IOREAD32, and so on.

on the LED flicker experiment, let me have a very deep understanding of the Linux driver, just lack of practical exercise, there is time I must be in the book of the experiment to implement, uncover the true veil of Linux driver!

Android Deep Explore.

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.