From c3c7479ab6df0650e6e63b67ec713c7267df9e82 Mon Sep 17 00:00:00 2001 From: Reena Lee Date: Mon, 18 May 2009 22:34:25 -0700 Subject: [PATCH] AI 148985: Adding an initial file for sensors content with doxygen content included from sensors.h. Automated import of CL 148985 --- pdk/Pdk.mk | 4 +++- pdk/docs/guide/sensors.jd | 45 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100755 pdk/docs/guide/sensors.jd diff --git a/pdk/Pdk.mk b/pdk/Pdk.mk index 42d103697..0a2b1fd8a 100644 --- a/pdk/Pdk.mk +++ b/pdk/Pdk.mk @@ -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. diff --git a/pdk/docs/guide/sensors.jd b/pdk/docs/guide/sensors.jd new file mode 100755 index 000000000..4463a951d --- /dev/null +++ b/pdk/docs/guide/sensors.jd @@ -0,0 +1,45 @@ +page.title=Sensors +pdk.version=1.0 +@jd:body + + +
+Introduction
+Interface
+ +

Introduction

+ +

Android defines a user space C abstraction interface for sensor hardware. The interface header is defined in +hardware/libhardware/include/hardware/sensors.h. +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: +

+

+ +

Building a Sensor Library

+

To implement a Sensors driver, create a shared library that implements the interface defined in sensors.h. You must name your shared library +libsensors.so so that it will get loaded from /system/lib at runtime. +

Interface

+ + + +

+ +

Note: This document relies on some Doxygen-generated content that appears in an iFrame below. To return to the Doxygen default content for this page, click here.

+ + +