Home | History | Annotate | Download | only in libsensors
      1 /*
      2  * Copyright 2013 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 #ifndef ANDROID_SENSORS_H
     18 #define ANDROID_SENSORS_H
     19 
     20 #include <stdint.h>
     21 #include <errno.h>
     22 #include <sys/cdefs.h>
     23 #include <sys/types.h>
     24 
     25 #include <linux/input.h>
     26 
     27 #include <hardware/hardware.h>
     28 #include <hardware/sensors.h>
     29 
     30 __BEGIN_DECLS
     31 
     32 /*****************************************************************************/
     33 
     34 #define I2C                 "/sys/bus/i2c/devices/3-0039/"
     35 #define PROXIMITY_DATA      "Avago proximity sensor"
     36 #define LIGHT_DATA          "Avago light sensor"
     37 #define INPUT_EVENT_DEBUG   (0)
     38 #define DEBUG               (0)
     39 
     40 #ifndef ARRAY_SIZE
     41 #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
     42 #endif
     43 
     44 enum {
     45     ID_GY = 0,
     46     ID_RG,
     47     ID_A,
     48     ID_M,
     49     ID_RM,
     50     ID_PS,
     51     ID_O,
     52     ID_RV,
     53     ID_GRV,
     54     ID_LA,
     55     ID_GR,
     56     ID_SM,
     57     ID_P,
     58     ID_SC,
     59     ID_GMRV,
     60     ID_SO,
     61     ID_L = 0x100,
     62     ID_PX
     63 };
     64 
     65 __END_DECLS
     66 
     67 #endif  // ANDROID_SENSORS_H
     68