diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-03-18 17:39:44 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-18 17:39:44 -0700 |
commit | 9877e2e3e3c2df64de306b48f80a4f5d0b028d95 (patch) | |
tree | 8a31dd7a07d55c182e7f572379a601ef545c1d29 /android/hw-sensors.h | |
parent | b3ee93a038ab992ffdda9f232befdea6ea713b24 (diff) | |
download | external_qemu-9877e2e3e3c2df64de306b48f80a4f5d0b028d95.zip external_qemu-9877e2e3e3c2df64de306b48f80a4f5d0b028d95.tar.gz external_qemu-9877e2e3e3c2df64de306b48f80a4f5d0b028d95.tar.bz2 |
auto import from //branches/cupcake_rel/...@140373
Diffstat (limited to 'android/hw-sensors.h')
-rw-r--r-- | android/hw-sensors.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/android/hw-sensors.h b/android/hw-sensors.h new file mode 100644 index 0000000..37bf20e --- /dev/null +++ b/android/hw-sensors.h @@ -0,0 +1,48 @@ +/* Copyright (C) 2009 The Android Open Source Project +** +** This software is licensed under the terms of the GNU General Public +** License version 2, as published by the Free Software Foundation, and +** may be copied, distributed, and modified under those terms. +** +** This program is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +** GNU General Public License for more details. +*/ +#ifndef _android_sensors_h +#define _android_sensors_h + +#include "qemu-common.h" + +/* initialize sensor emulation */ +extern void android_hw_sensors_init( void ); + +/* NOTE: this list must be the same that the one defined in + * the sensors_qemu.c source of the libsensors.goldfish.so + * library. + */ +#define SENSORS_LIST \ + SENSOR_(ACCELERATION,"acceleration") \ + SENSOR_(MAGNETIC_FIELD,"magnetic-field") \ + SENSOR_(ORIENTATION,"orientation") \ + SENSOR_(TEMPERATURE,"temperature") \ + +typedef enum { +#define SENSOR_(x,y) ANDROID_SENSOR_##x, + SENSORS_LIST +#undef SENSOR_ + MAX_SENSORS /* do not remove */ +} AndroidSensor; + +extern void android_hw_sensor_enable( AndroidSensor sensor ); + +/* COARSE ORIENTATION VALUES */ +typedef enum { + ANDROID_COARSE_PORTRAIT, + ANDROID_COARSE_LANDSCAPE +} AndroidCoarseOrientation; + +/* change the coarse orientation value */ +extern void android_sensors_set_coarse_orientation( AndroidCoarseOrientation orient ); + +#endif /* _android_gps_h */ |