2 * Copyright (c) 2016 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 #ifndef _SENSOR_COMMON_H_
19 #define _SENSOR_COMMON_H_
21 #define SENSOR_EVENT_SHIFT 16
22 #define RAW_DATA_EVENT 0x0001
24 #define UNKNOWN_NAME "UNKNOWN"
27 enum sensorhub_enable_bit {
28 SENSORHUB_ACCELEROMETER_ENABLE_BIT = 0,
29 SENSORHUB_GYROSCOPE_ENABLE_BIT,
30 SENSORHUB_GEOMAGNETIC_UNCALIB_ENABLE_BIT,
31 SENSORHUB_GEOMAGNETIC_RAW_ENABLE_BIT,
32 SENSORHUB_GEOMAGNETIC_ENABLE_BIT,
33 SENSORHUB_PRESSURE_ENABLE_BIT,
34 SENSORHUB_GESTURE_ENABLE_BIT,
35 SENSORHUB_PROXIMITY_ENABLE_BIT,
36 SENSORHUB_TEMPERATURE_HUMIDITY_ENABLE_BIT,
37 SENSORHUB_LIGHT_ENABLE_BIT,
38 SENSORHUB_PROXIMITY_RAW_ENABLE_BIT,
39 SENSORHUB_ORIENTATION_ENABLE_BIT,
40 SENSORHUB_STEP_DETECTOR_ENABLE_BIT = 12,
41 SENSORHUB_SIG_MOTION_ENABLE_BIT,
42 SENSORHUB_GYRO_UNCALIB_ENABLE_BIT,
43 SENSORHUB_GAME_ROTATION_VECTOR_ENABLE_BIT = 15,
44 SENSORHUB_ROTATION_VECTOR_ENABLE_BIT,
45 SENSORHUB_STEP_COUNTER_ENABLE_BIT,
46 SENSORHUB_HRM_RAW_ENABLE_BIT,
47 SENSORHUB_HRM_RAW_FAC_ENABLE_BIT,
48 SENSORHUB_HRM_LIB_ENABLE_BIT,
49 SENSORHUB_TILT_MOTION,
51 SENSORHUB_PIR_ENABLE_BIT,
52 SENSORHUB_PIR_RAW_ENABLE_BIT,
53 SENSORHUB_GSR_ENABLE_BIT = 25,
54 SENSORHUB_ENABLE_BIT_MAX,
57 #endif /* __SENSOR_COMMON_H__ */