• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Copyright (C) 2009 The Android Open Source Project
2 **
3 ** This software is licensed under the terms of the GNU General Public
4 ** License version 2, as published by the Free Software Foundation, and
5 ** may be copied, distributed, and modified under those terms.
6 **
7 ** This program is distributed in the hope that it will be useful,
8 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
9 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10 ** GNU General Public License for more details.
11 */
12 #ifndef _android_sensors_h
13 #define _android_sensors_h
14 
15 #include "qemu-common.h"
16 
17 /* initialize sensor emulation */
18 extern void  android_hw_sensors_init( void );
19 
20 /* NOTE: this list must be the same that the one defined in
21  *       the sensors_qemu.c source of the libsensors.goldfish.so
22  *       library.
23  */
24 #define  SENSORS_LIST  \
25     SENSOR_(ACCELERATION,"acceleration") \
26     SENSOR_(MAGNETIC_FIELD,"magnetic-field") \
27     SENSOR_(ORIENTATION,"orientation") \
28     SENSOR_(TEMPERATURE,"temperature") \
29 
30 typedef enum {
31 #define  SENSOR_(x,y)  ANDROID_SENSOR_##x,
32     SENSORS_LIST
33 #undef   SENSOR_
34     MAX_SENSORS  /* do not remove */
35 } AndroidSensor;
36 
37 extern void  android_hw_sensor_enable( AndroidSensor  sensor );
38 
39 /* COARSE ORIENTATION VALUES */
40 typedef enum {
41     ANDROID_COARSE_PORTRAIT,
42     ANDROID_COARSE_LANDSCAPE
43 } AndroidCoarseOrientation;
44 
45 /* change the coarse orientation value */
46 extern void  android_sensors_set_coarse_orientation( AndroidCoarseOrientation  orient );
47 
48 #endif /* _android_gps_h */
49