Tizen 2.1 base
[sdk/emulator/qemu.git] / tizen / src / arch_x86.c
1 /*
2  * Emulator
3  *
4  * Copyright (C) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: 
7  * DoHyung Hong <don.hong@samsung.com>
8  * SeokYeon Hwang <syeon.hwang@samsung.com>
9  * Hyunjun Son <hj79.son@samsung.com>
10  * SangJin Kim <sangjin3.kim@samsung.com>
11  * MunKyu Im <munkyu.im@samsung.com>
12  * KiTae Kim <kt920.kim@samsung.com>
13  * JinHyung Jo <jinhyung.jo@samsung.com>
14  * SungMin Ha <sungmin82.ha@samsung.com>
15  * JiHye Kim <jihye1128.kim@samsung.com>
16  * GiWoong Kim <giwoong.kim@samsung.com>
17  * YeongKyoon Lee <yeongkyoon.lee@samsung.com>
18  * DongKyun Yun <dk77.yun@samsung.com>
19  *
20  * This program is free software; you can redistribute it and/or
21  * modify it under the terms of the GNU General Public License
22  * as published by the Free Software Foundation; either version 2
23  * of the License, or (at your option) any later version.
24  *
25  * This program is distributed in the hope that it will be useful,
26  * but WITHOUT ANY WARRANTY; without even the implied warranty of
27  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
28  * GNU General Public License for more details.
29  *
30  * You should have received a copy of the GNU General Public License
31  * along with this program; if not, write to the Free Software
32  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
33  *
34  * Contributors:
35  * - S-Core Co., Ltd
36  *
37  */
38
39 #include "emulator.h"
40 #include "debug_ch.h"
41
42 //DEFAULT_DEBUG_CHANNEL(tizen);
43 MULTI_DEBUG_CHANNEL(tizen, arch_x86);
44
45 extern int sensor_update(uint16_t x, uint16_t y, uint16_t z);
46
47 // fake sensor_update
48 int sensor_update(uint16_t x, uint16_t y, uint16_t z)
49 {
50     TRACE( "x(%d), y(%d), z(%d) \n", x, y, z);
51     return 0;
52 }
53
54 int qemu_arch_is_arm(void)
55 {
56     return 0;
57 }
58
59 int device_set_rotation(int rotation)
60 {
61     if (!kbd_mouse_is_absolute())
62         return 0;
63     switch (rotation) {
64         case 0:
65             sensor_update(1, -256, 1);
66             break;
67         case 90:
68             sensor_update(256, 1, 1);
69             break;
70         case 180:
71             sensor_update(1, 256, 1);
72             break;
73         case 270:
74             sensor_update(-256, 1, 1);
75             break;
76         default:
77             assert(0);
78     }
79     return 0;
80 }