<span id="Label3"></p><p><p><span style="font-size:24px; color:#ff0000">1</span></p></p><p><p><span style="font-size:24px">The HAL program must have a hal-module-info--sym (hw_module_t) variable that can be called by the Android System. Similar to (the C Function's main () and the Linux driver's init () function)</span></p></p><p><p><span style="font-size:24px"><br></span></p></p><span style="font-size:24px"><span style="font-size:24px"> <span style="color:#ff0000">2 HAL programming is a three key structure:</span><br>struct hw_module_t; (in the HAL Module)<br>struct hw_module_methods_t; (small entry Function)<br></span></span><p><p><span style="font-size:24px">struct hw_device_t; (hal Device Large)</span></p></p><p><p><span style="color:rgb(64,64,64); font-family:‘Microsoft YaHei‘,Verdana,sans-serif,SimSun; line-height:25px; background-color:rgb(250,250,250)"><span style="font-size:18px">These data structures are defined in the Android working directory/hardware/libhardware/include/hardware/hardware.h File.</span></span><br></p></p><p><p><span style="color:rgb(64,64,64); font-family:‘Microsoft YaHei‘,Verdana,sans-serif,SimSun; line-height:25px; background-color:rgb(250,250,250)"><span style="font-size:18px"><br></span></span></p></p><p><p><span style="font-size:24px; color:#ff0000">3 source Program</span></p></p><p><p><span style="font-size:24px; color:#ff0000"><br></span></p></p><p><p><span style="font-size:24px; color:#ff0000">3.1 leds_hal.h</span></p></p><span style="font-size:24px"><span style="font-size:24px">#include
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