hal--hardware Abstraction Layer Reading notes

Source: Internet
Author: User

This chapter describes the-HAL(Hardware abstraction layer), a set of libraries built on Linux drivers. It is not part of the Linux kernel, but rather belongs to the application layer on top of the Linux kernel layer.

In order to meet the requirements of these Linux drivers who do not want to open source , the runtime layer in the Android hierarchy adds a HAL, thereby unifying the calling interface of the hardware, solves the GPL Copyright Issue and addresses some special requirements.

In the new hal The core code in the architecture is still the same, just adding a new entry code, Enable these programs to be automatically android system identification. android HAL <android source code directory >/hardware directory.

led driver did not add hal code, but a variety of test methods used are directly accessed through drive device file in the same way as led drive interaction. This section will first make a change to the previous line, write the linux drive, Then write hal Library Finally, the Span style= "FONT-FAMILY:CALIBRI;" >service Library

The steps and principles of writing the Hal module, the first step: defining structs and macros, step two: Writing the Hal module's open function, step three: defining hw_module_methods_t struct variables, step fourth: Define hal_module_info_sym variables, step fifth: Write HAL The close function of the module , step sixth: Write A function that controls the LEDs.

http://www.cnblogs.com/SJ-0325/

hal--hardware Abstraction Layer Reading notes

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.