summaryrefslogtreecommitdiff
path: root/include/sensor_motion.h
blob: c2812e8055539dcc6dcabc16473071fa1fcc7cda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
/*
 *  libslp-sensor
 *
 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
 *
 * Contact: JuHyun Kim <jh8212.kim@samsung.com>
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */ 



#ifndef __SAMSUNG_LINUX_SENSOR_MOTION_H__
#define __SAMSUNG_LINUX_SENSOR_MOTION_H__


//! Pre-defined events for the motion sensor
//! Sensor Plugin developer can add more event to their own headers

#ifdef __cplusplus
extern "C"
{
#endif


enum motion_evet_type {		
	MOTION_ENGINE_EVENT_SNAP				= (MOTION_SENSOR<<16) | 0x0001,
	MOTION_ENGINE_EVENT_SHAKE				= (MOTION_SENSOR<<16) | 0x0002,
	MOTION_ENGINE_EVENT_DOUBLETAP   		= (MOTION_SENSOR<<16) | 0x0004,
	MOTION_ENGINE_EVENT_PANNING     		= (MOTION_SENSOR<<16) | 0x0008,
	MOTION_ENGINE_EVENT_TOP_TO_BOTTOM       = (MOTION_SENSOR<<16) | 0x0010,
	MOTION_ENGINE_EVENT_DIRECT_CALL         = (MOTION_SENSOR<<16) | 0x0020,
	MOTION_ENGINE_EVENT_TILT_TO_UNLOCK      = (MOTION_SENSOR<<16) | 0x0040,
	MOTION_ENGINE_EVENT_LOCK_EXECUTE_CAMERA = (MOTION_SENSOR<<16) | 0x0080,
	MOTION_ENGINE_EVENT_REACTIVE_ALERT		= (MOTION_SENSOR<<16) | 0x0100,
};

enum motion_snap_event {
	MOTION_ENGIEN_SNAP_NONE = 0,
	MOTION_ENGIEN_NEGATIVE_SNAP_X = 1,
	MOTION_ENGIEN_POSITIVE_SNAP_X = 2,
	MOTION_ENGIEN_NEGATIVE_SNAP_Y = 3,
	MOTION_ENGIEN_POSITIVE_SNAP_Y = 4,
	MOTION_ENGIEN_NEGATIVE_SNAP_Z = 5,
	MOTION_ENGIEN_POSITIVE_SNAP_Z = 6,
	MOTION_ENGIEN_SNAP_LEFT  = MOTION_ENGIEN_NEGATIVE_SNAP_X,
	MOTION_ENGIEN_SNAP_RIGHT = MOTION_ENGIEN_POSITIVE_SNAP_X,
	MOTION_ENGINE_SNAP_NONE = 0,
	MOTION_ENGINE_NEGATIVE_SNAP_X = 1,
	MOTION_ENGINE_POSITIVE_SNAP_X = 2,
	MOTION_ENGINE_NEGATIVE_SNAP_Y = 3,
	MOTION_ENGINE_POSITIVE_SNAP_Y = 4,
	MOTION_ENGINE_NEGATIVE_SNAP_Z = 5,
	MOTION_ENGINE_POSITIVE_SNAP_Z = 6,
	MOTION_ENGINE_SNAP_LEFT  = MOTION_ENGINE_NEGATIVE_SNAP_X,
	MOTION_ENGINE_SNAP_RIGHT = MOTION_ENGINE_POSITIVE_SNAP_X,


};

enum motion_shake_event {
	MOTION_ENGIEN_SHAKE_NONE = 0,
	MOTION_ENGIEN_SHAKE_DETECTION = 1,
	MOTION_ENGIEN_SHAKE_CONTINUING = 2,
	MOTION_ENGIEN_SHAKE_FINISH = 3,
	MOTION_ENGINE_SHAKE_BREAK = 4,
	MOTION_ENGINE_SHAKE_NONE = 0,
	MOTION_ENGINE_SHAKE_DETECTION = 1,
	MOTION_ENGINE_SHAKE_CONTINUING = 2,
	MOTION_ENGINE_SHAKE_FINISH = 3,

};

enum motion_doubletap_event {
	MOTION_ENGIEN_DOUBLTAP_NONE = 0,
	MOTION_ENGIEN_DOUBLTAP_DETECTION = 1,
	MOTION_ENGINE_DOUBLTAP_NONE = 0,
	MOTION_ENGINE_DOUBLTAP_DETECTION = 1,

};

enum motion_top_to_bottom_event {
	MOTION_ENGIEN_TOP_TO_BOTTOM_NONE = 0,
	MOTION_ENGIEN_TOP_TO_BOTTOM_WAIT = 1,
	MOTION_ENGIEN_TOP_TO_BOTTOM_DETECTION = 2,
	MOTION_ENGINE_TOP_TO_BOTTOM_NONE = 0,
	MOTION_ENGINE_TOP_TO_BOTTOM_WAIT = 1,
	MOTION_ENGINE_TOP_TO_BOTTOM_DETECTION = 2,

};

enum motion_property_id {
	MOTION_PROPERTY_UNKNOWN = 0,
	MOTION_PROPERTY_CHECK_ACCEL_SENSOR,
	MOTION_PROPERTY_CHECK_GYRO_SENSOR,
};

enum motion_direct_call_event_t {
	MOTION_ENGINE_DIRECT_CALL_NONE,
	MOTION_ENGINE_DIRECT_CALL_DETECTION,
};

enum motion_tilt_to_unlock_event_t {
	MOTION_ENGINE_TILT_TO_UNLOCK_NONE,
	MOTION_ENGINE_TILT_TO_UNLOCK_DETECTION,
};

enum motion_lock_execute_camera_event_t {
	MOTION_ENGINE_LOCK_EXECUTE_CAMERA_NONE,
	MOTION_ENGINE_LOCK_EXECUTE_CAMERA_L_DETECTION,
	MOTION_ENGINE_LOCK_EXECUTE_CAMERA_R_DETECTION,
};

enum motion_reactive_alert_t {
	MOTION_ENGINE_REACTIVE_ALERT_NONE,
	MOTION_ENGINE_REACTIVE_ALERT_DETECTION,
};


/**
 * @}
 */

#ifdef __cplusplus
}
#endif

#endif
//! End of a file