diff options
Diffstat (limited to 'include/sensor_motion.h')
-rwxr-xr-x | include/sensor_motion.h | 154 |
1 files changed, 154 insertions, 0 deletions
diff --git a/include/sensor_motion.h b/include/sensor_motion.h new file mode 100755 index 0000000..82448cc --- /dev/null +++ b/include/sensor_motion.h @@ -0,0 +1,154 @@ +/* + * 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_SMART_ALERT = (MOTION_SENSOR<<16) | 0x0100, + MOTION_ENGINE_EVENT_TILT = (MOTION_SENSOR<<16) | 0x0200, + MOTION_ENGINE_EVENT_PANNING_BROWSE = (MOTION_SENSOR<<16) | 0x0400, + MOTION_ENGINE_EVENT_NO_MOVE = (MOTION_SENSOR<<16) | 0x0800, +}; + +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_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_smart_alert_t { + MOTION_ENGINE_SMART_ALERT_NONE, + MOTION_ENGINE_SMART_ALERT_DETECTION, +}; + +enum motion_no_move_t { + MOTION_ENGINE_NO_MOVE_NONE, + MOTION_ENGINE_NO_MOVE_DETECTION, +}; + +enum motion_property_id { + MOTION_PROPERTY_UNKNOWN = 0, + MOTION_PROPERTY_CHECK_ACCEL_SENSOR, + MOTION_PROPERTY_CHECK_GYRO_SENSOR, + MOTION_PROPERTY_CHECK_GEO_SENSOR, + MOTION_PROPERTY_CHECK_PRIXI_SENSOR, + MOTION_PROPERTY_CHECK_LIGHT_SENSOR, + MOTION_PROPERTY_CHECK_BARO_SENSOR, + MOTION_PROPERTY_LCD_TOUCH_ON, + MOTION_PROPERTY_LCD_TOUCH_OFF, +}; + + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif +//! End of a file |