2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
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.
20 #include <stdio.h> // xxx
23 #include <devman_haptic.h>
26 #define IMMERSION_DRV_NODE "/dev/tspdrv"
27 #define INPUT_PARM_MAX 0xFFFFFF
28 #define COMP_CMD(idx, value) (value<<4)|(idx&0x0F)
33 HAPTIC_PROP_LEVEL_MAX,
41 CMD_GET_CURRENT_DEVICE_HANDLE,
42 CMD_GET_CURRENT_EFFECT_HANDLE,
45 CMD_GET_EFFECT_DURATION,
47 CMD_SET_EFFECT_PLAY_REPEAT,
49 CMD_SET_EFFECT_ALL_STOP,
50 CMD_PROPERTY_SET_LICENSE_KEY,
51 CMD_PROPERTY_GET_PRIORITY,
52 CMD_PROPERTY_SET_PRIORITY,
53 CMD_PROPERTY_GET_STRENGTH,
54 CMD_PROPERTY_SET_STRENGTH,
55 CMD_PROPERTY_GET_MASTER_STRENGTH,
56 CMD_PROPERTY_SET_MASTER_STRENGTH,
66 immersion = access(IMMERSION_DRV_NODE, F_OK) == 0;