AI 148985: Adding an initial file for sensors content with doxygen content included from sensors.h.

Automated import of CL 148985
This commit is contained in:
Reena Lee
2009-05-18 22:34:25 -07:00
committed by The Android Open Source Project
parent 6ff7572fd5
commit c3c7479ab6
2 changed files with 48 additions and 1 deletions

View File

@@ -50,6 +50,7 @@ pdk_templates_dir := development/pdk/docs
pdk_config_dir := development/pdk/doxygen_config
pdk_docsfile_dir := $(pdk_config_dir)/docsfiles
pdk_legacy_hardware_dir := hardware/libhardware_legacy/include/hardware_legacy
pdk_hardware_dir := hardware/libhardware/include/hardware
pdk_camera_dir := frameworks/base/include/ui
# Destination directory for docs (templates + doxygenated headers)
@@ -78,7 +79,8 @@ pdk_headers := \
$(pdk_legacy_hardware_dir)/AudioHardwareInterface.h \
$(pdk_legacy_hardware_dir)/gps.h \
$(pdk_legacy_hardware_dir)/wifi.h \
$(pdk_camera_dir)/CameraHardwareInterface.h
$(pdk_camera_dir)/CameraHardwareInterface.h \
$(pdk_hardware_dir)/sensors.h
# Create a rule to copy the list of PDK headers to be doxyginated.
# copy-one-header defines the actual rule.

45
pdk/docs/guide/sensors.jd Executable file
View File

@@ -0,0 +1,45 @@
page.title=Sensors
pdk.version=1.0
@jd:body
<a name="toc"/>
<div style="padding:10px">
<a href="#androidSensorsIntroduction">Introduction</a><br/>
<a href="#androidSensorsInterface">Interface</a><br/></div></font></div>
<a name="androidSensorsIntroduction"></a><h2>Introduction</h2>
<p>Android defines a user space C abstraction interface for sensor hardware. The interface header is defined in
<code>hardware/libhardware/include/hardware/sensors.h</code>.
In order to integrate sensors with Android you need to build a shared library that implements this interface.
The types of sensors currently supported by Android include:
<ul>
<li>Accelerometer</li>
<li>Magnetic Field</li>
<li>Orientation</li>
<li>Gyroscope</li>
<li>Light</li>
<li>Pressure</li>
<li>Temperature</li>
<li>Proximity</li>
</ul>
</p>
<a name="androidSensorBuildingDriver"></a><h2>Building a Sensor Library</h2>
<p> To implement a Sensors driver, create a shared library that implements the interface defined in <code>sensors.h</code>. You must name your shared library
<code>libsensors.so</code> so that it will get loaded from <code>/system/lib</code> at runtime.
</p
<a name="androidSensorsInterface"></a><h2>Interface</h2>
<p><span class="lh2"><a name="androidDoxygenNote"></a></span>
<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="sensors.html">click here</a>.</p>
<iframe onLoad="resizeDoxFrameHeight();" src="sensors_8h.html" scrolling="no" scroll="no" id="doxygen" marginwidth="0" marginheight="0"
frameborder="0" style="width:100%;"></iframe>