blob: 4f19c5d3c62dc8f55a300a19fc7afd1face13d88 [file] [log] [blame]
Reena Leee557a732009-05-20 08:04:39 -07001page.title=Lights
2pdk.version=1.0
3@jd:body
David Warren5c40a482009-06-05 15:11:21 -07004
5<div id="qv-wrapper">
6<div id="qv">
7<h2>In this document</h2>
8<a name="toc"/>
9<ul>
10<li><a href="#androidLightsBuildingDriver">Building a Lights Library</a></li>
11<li><a href="#androidLightsInterface">Interface</a></li>
12</ul>
13</div>
14</div>
15
Reena Leee557a732009-05-20 08:04:39 -070016<p>Android defines a user space C abstraction interface for LED hardware. The interface header is defined in
17<code>hardware/libhardware/include/hardware/lights.h</code>.
18In order to integrate LEDs with Android you need to build a shared library that implements this interface.
19
20The types of logical lights currently supported by Android include:
21<ul>
22<li>Backlight</li>
23<li>Keyboard</li>
24<li>Buttons</li>
25<li>Battery</li>
26<li>Notifications</li>
27<li>Attention</li>
28</ul>
29</p>
30
David Warren5c40a482009-06-05 15:11:21 -070031<a name="androidLightsBuildingDriver"></a><h3>Building a Lights Library</h3>
Reena Leee557a732009-05-20 08:04:39 -070032<p> To implement a Lights driver, create a shared library that implements the interface defined in <code>lights.h</code>. You must name your shared library
33<code>liblights.so</code> so that it will get loaded from <code>/system/lib</code> at runtime.
34</p
35
36
David Warren5c40a482009-06-05 15:11:21 -070037<a name="androidLightsInterface"></a><h3>Interface</h3>
Reena Leee557a732009-05-20 08:04:39 -070038
39
40
David Warren5c40a482009-06-05 15:11:21 -070041<p><span class="lh3"><a name="androidDoxygenNote"></a></span>
Reena Leee557a732009-05-20 08:04:39 -070042
43<p class="note"><strong>Note</strong>: This document relies on some Doxygen-generated content that appears in an iFrame below. To return to the Doxygen default content for this page, <a href="lights.html">click here</a>.</p>
44
45
46<iframe onLoad="resizeDoxFrameHeight();" src="lights_8h.html" scrolling="no" scroll="no" id="doxygen" marginwidth="0" marginheight="0"
47frameborder="0" style="width:100%;"></iframe>