diff options
author | Vishal Bhoj <vishal.bhoj@linaro.org> | 2014-10-08 17:54:09 +0100 |
---|---|---|
committer | Vishal Bhoj <vishal.bhoj@linaro.org> | 2014-10-08 17:54:09 +0100 |
commit | 131b44d7e7353840749c5388b78581980c9828b4 (patch) | |
tree | b3a9b2fa22e07722ba088ed50a1e6d8c27a2388c | |
parent | 76700ec441a1aad4b2609cb66a9eb10c0bd2ca4c (diff) | |
download | common-linaro_android_master.tar.gz |
remove fake-tslinaro_android_master
Change-Id: I3c06dedbf18414ce29d1e4599221468055ac01a6
Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>
-rw-r--r-- | fake-ts/Android.mk | 30 | ||||
-rw-r--r-- | fake-ts/fake-ts.c | 76 |
2 files changed, 0 insertions, 106 deletions
diff --git a/fake-ts/Android.mk b/fake-ts/Android.mk deleted file mode 100644 index 3c3ba4c..0000000 --- a/fake-ts/Android.mk +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (C) 2011 Linaro Limited -# -# 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. - -LOCAL_PATH:= $(call my-dir) - -ifneq ($(TARGET_SIMULATOR),true) - -include $(CLEAR_VARS) - -LOCAL_MODULE := faketsd - -LOCAL_MODULE_TAGS := optional - -LOCAL_SRC_FILES := fake-ts.c -LOCAL_PRELINK_MODULE := false - -include $(BUILD_EXECUTABLE) - -endif # !TARGET_SIMULATOR diff --git a/fake-ts/fake-ts.c b/fake-ts/fake-ts.c deleted file mode 100644 index 9fe0a20..0000000 --- a/fake-ts/fake-ts.c +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (C) 2011 Linaro Limited - * - * 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. - */ - -#include <stdio.h> -#include <fcntl.h> -#include <unistd.h> -#include <string.h> - -#include <linux/uinput.h> - -/* look up source file system/core/init/devices.c for exact node */ -#define UINPUT_DEV "/dev/uinput" - -#define DEV_NAME "Fake Touchscreen" - -static int uinput_fd = 0; - -static void uinput_touch_init(const char* uinput_dev, - const char* dev_name) -{ - struct uinput_user_dev dev; - - uinput_fd = open(uinput_dev, O_WRONLY); - if (uinput_fd <= 0) { - perror("Error opening uinput device.\n"); - return; - } - memset(&dev, 0, sizeof(dev)); - strcpy(dev.name, dev_name); - write(uinput_fd, &dev, sizeof(dev)); - - /* touch screen event */ - ioctl(uinput_fd, UI_SET_EVBIT, EV_ABS); - ioctl(uinput_fd, UI_SET_ABSBIT, ABS_X); - ioctl(uinput_fd, UI_SET_ABSBIT, ABS_Y); - ioctl(uinput_fd, UI_SET_EVBIT, EV_KEY); - ioctl(uinput_fd, UI_SET_KEYBIT, BTN_TOUCH); - - /* register userspace input device */ - ioctl(uinput_fd, UI_DEV_CREATE, 0); -} - -static void uinput_touch_deinit() -{ - if (uinput_fd > 0) { - close(uinput_fd); - } -} - -int main(int argc, char* argv[]) -{ - uinput_touch_init(UINPUT_DEV, DEV_NAME); - - while (1) { - sleep(60); - } - - uinput_touch_deinit(); - - return 0; -} - |