diff options
author | Lorenzo Miori <memoryS60@gmail.com> | 2013-09-10 22:48:34 +0200 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2014-02-05 09:56:21 +0100 |
commit | e876f4df6d240bd2e319b1e63be95a625f049a97 (patch) | |
tree | ce2fe1b24650e3be7a6cd2d346d29090a5422a8c /firmware/target/hosted/samsungypr/ypr1/button-target.h | |
parent | b828b9d99bff2acc0e1f543f3176fd4b632cba68 (diff) | |
download | rockbox-e876f4df6d240bd2e319b1e63be95a625f049a97.tar.gz rockbox-e876f4df6d240bd2e319b1e63be95a625f049a97.zip |
Samsung YP-R1 target port
This is the basic port to the new target Samsung
YP-R1, which runs on a similar platform as YP-R0.
Port is usable, although there are still
some optimizations that have to be done.
Change-Id: If83a8e386369e413581753780c159026d9e41f04
Diffstat (limited to 'firmware/target/hosted/samsungypr/ypr1/button-target.h')
-rw-r--r-- | firmware/target/hosted/samsungypr/ypr1/button-target.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/firmware/target/hosted/samsungypr/ypr1/button-target.h b/firmware/target/hosted/samsungypr/ypr1/button-target.h new file mode 100644 index 0000000000..fc618258c0 --- /dev/null +++ b/firmware/target/hosted/samsungypr/ypr1/button-target.h | |||
@@ -0,0 +1,63 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * | ||
9 | * Copyright (C) 2013 by Lorenzo Miori | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or | ||
12 | * modify it under the terms of the GNU General Public License | ||
13 | * as published by the Free Software Foundation; either version 2 | ||
14 | * of the License, or (at your option) any later version. | ||
15 | * | ||
16 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
17 | * KIND, either express or implied. | ||
18 | * | ||
19 | ****************************************************************************/ | ||
20 | |||
21 | #ifndef _BUTTON_TARGET_H_ | ||
22 | #define _BUTTON_TARGET_H_ | ||
23 | |||
24 | void button_close_device(void); | ||
25 | |||
26 | /* Logical buttons key codes */ | ||
27 | #define BUTTON_VOL_UP 0x00000001 | ||
28 | #define BUTTON_VOL_DOWN 0x00000002 | ||
29 | #define BUTTON_POWER 0x00000004 | ||
30 | #define BUTTON_RIGHT 0x00000008 | ||
31 | #define BUTTON_LEFT 0x00000012 | ||
32 | |||
33 | /* Touch Screen Area Buttons */ | ||
34 | #define BUTTON_TOPLEFT 0x00000010 | ||
35 | #define BUTTON_TOPMIDDLE 0x00000020 | ||
36 | #define BUTTON_TOPRIGHT 0x00000040 | ||
37 | #define BUTTON_MIDLEFT 0x00000080 | ||
38 | #define BUTTON_CENTER 0x00000100 | ||
39 | #define BUTTON_MIDRIGHT 0x00000200 | ||
40 | #define BUTTON_BOTTOMLEFT 0x00000400 | ||
41 | #define BUTTON_BOTTOMMIDDLE 0x00000800 | ||
42 | #define BUTTON_BOTTOMRIGHT 0x00001000 | ||
43 | |||
44 | /* All the buttons */ | ||
45 | #define BUTTON_MAIN (BUTTON_VOL_UP | BUTTON_VOL_DOWN | BUTTON_POWER | \ | ||
46 | BUTTON_RIGHT|BUTTON_LEFT| BUTTON_TOPLEFT | BUTTON_TOPMIDDLE | \ | ||
47 | BUTTON_TOPRIGHT | BUTTON_MIDLEFT | BUTTON_CENTER | \ | ||
48 | BUTTON_MIDRIGHT | BUTTON_BOTTOMLEFT | BUTTON_BOTTOMMIDDLE | \ | ||
49 | BUTTON_BOTTOMRIGHT) /* all buttons */ | ||
50 | |||
51 | /* Default touchscreen calibration | ||
52 | * TODO this is not 100% accurate. X-AXIS must be slightly moved to the right | ||
53 | */ | ||
54 | #define DEFAULT_TOUCHSCREEN_CALIBRATION {.A=0x0000AD7C, .B=0xFFFFFC70, \ | ||
55 | .C=0xFF6632E0, .D=0xFFFFFF1A, .E=0xFFFF5D08, \ | ||
56 | .F=0xFFFC4230, .divider=0xFFFF54E0} | ||
57 | |||
58 | /* Software power-off */ | ||
59 | #define POWEROFF_BUTTON BUTTON_POWER | ||
60 | /* About 3 seconds */ | ||
61 | #define POWEROFF_COUNT 10 | ||
62 | |||
63 | #endif /* _BUTTON_TARGET_H_ */ | ||