Android Deep Explore (Volume 1) HAL and Driver Development seventh chapter LED will blink for me: Control LEDs

Source: Internet
Author: User

Seventh Chapter LED will blink for me: Control light Emitting diodes

Reading experience

The realization principle of LED drive

Although the Linux driver deals directly with hardware, it is not the Linux driver that writes data directly to the memory in the hardware, but interacts with the native I/O memory.

Writing LED drivers

Test LED Driver

LED-driven porting

When modifying the Linux-powered source code, try not to modify the Linux driver's excuses.

LED driver is the first real Linux driver to deal with hardware, although the LED driver is not complicated, just control four LEDs, but led driver has included all the necessary parts of Linux drive. A complete Linux drive consists primarily of internal processing and interaction with hardware components. The internal processing mainly refers to the Linux driver loading, unloading, device file-related action processing (read and write device files, send I/O commands to the device file), and business logic. Interaction with hardware mainly refers to the data interaction with the registers in hardware through IOWRITE32, IOREAD32 and other functions. The porting of Linux drivers on different platforms is also handled in these two parts. If you are porting between different Linux versions, primarily porting the first part (Linux-driven internal processing, the Linux kernel API will vary greatly when the Linux kernel version is large), if porting on different hardware platforms, the main porting is the second part. Indifferent, in some cases, Linux-driven porting is basically equivalent to rewriting the Linux driver, in this case, it is necessary to better understand the advanced technology of Linux drivers.

Android Deep Explore (Volume 1) HAL and Driver Development seventh chapter LED will blink for me: Control LEDs

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.