diff options
author | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2008-05-15 18:01:14 +0000 |
---|---|---|
committer | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2008-05-15 18:01:14 +0000 |
commit | 1ea884b53126206ffbc1607454d5d7d255acec7e (patch) | |
tree | 50aad7d5622d88470813c2f8ca4ea79855cf52ca | |
parent | c249f5301024da7c8e8f23c32b01fecf72b1d5dc (diff) | |
download | rockbox-1ea884b53126206ffbc1607454d5d7d255acec7e.tar.gz rockbox-1ea884b53126206ffbc1607454d5d7d255acec7e.zip |
1) Add ZVM60GB and ZV simulator builds (ZVM60GB sim equals to ZVM30GB)
2) Correct typo which'll break build system for ZV currently
3) Split up keymaps for ZV & ZVM
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17525 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/SOURCES | 2 | ||||
-rw-r--r-- | apps/keymaps/keymap-creativezv.c | 254 | ||||
-rw-r--r-- | firmware/export/config-creativezv.h | 2 | ||||
-rw-r--r-- | firmware/export/config.h | 1 | ||||
-rw-r--r-- | firmware/target/arm/tms320dm320/creative-zvm/button-target.h | 15 | ||||
-rwxr-xr-x | tools/configure | 2 | ||||
-rw-r--r-- | uisimulator/sdl/UI-creativezv.bmp | bin | 0 -> 2034506 bytes | |||
-rw-r--r-- | uisimulator/sdl/UI-creativezvm60.bmp (renamed from uisimulator/sdl/UI-creativezvm.bmp) | bin | 740790 -> 740790 bytes | |||
-rw-r--r-- | uisimulator/sdl/button.c | 47 | ||||
-rw-r--r-- | uisimulator/sdl/uisdl.h | 21 |
10 files changed, 340 insertions, 4 deletions
diff --git a/apps/SOURCES b/apps/SOURCES index e617d5f174..c8cd03a29d 100644 --- a/apps/SOURCES +++ b/apps/SOURCES | |||
@@ -187,4 +187,6 @@ keymaps/keymap-mr100.c | |||
187 | keymaps/keymap-cowond2.c | 187 | keymaps/keymap-cowond2.c |
188 | #elif CONFIG_KEYPAD == CREATIVEZVM_PAD | 188 | #elif CONFIG_KEYPAD == CREATIVEZVM_PAD |
189 | keymaps/keymap-creativezvm.c | 189 | keymaps/keymap-creativezvm.c |
190 | #elif CONFIG_KEYPAD == CREATIVEZV_PAD | ||
191 | keymaps/keymap-creativezv.c | ||
190 | #endif | 192 | #endif |
diff --git a/apps/keymaps/keymap-creativezv.c b/apps/keymaps/keymap-creativezv.c new file mode 100644 index 0000000000..5de67f5669 --- /dev/null +++ b/apps/keymaps/keymap-creativezv.c | |||
@@ -0,0 +1,254 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2008 by Maurus Cuelenaere | ||
11 | * | ||
12 | * All files in this archive are subject to the GNU General Public License. | ||
13 | * See the file COPYING in the source tree root for full license agreement. | ||
14 | * | ||
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | * KIND, either express or implied. | ||
17 | * | ||
18 | ****************************************************************************/ | ||
19 | |||
20 | /* Button Code Definitions for the Creative Zen Vision target */ | ||
21 | /* Copied from ZVM target for now... */ | ||
22 | #include <stdio.h> | ||
23 | #include <string.h> | ||
24 | #include <stdlib.h> | ||
25 | |||
26 | #include "config.h" | ||
27 | #include "action.h" | ||
28 | #include "button.h" | ||
29 | #include "settings.h" | ||
30 | |||
31 | /* | ||
32 | * The format of the list is as follows | ||
33 | * { Action Code, Button code, Prereq button code } | ||
34 | * if there's no need to check the previous button's value, use BUTTON_NONE | ||
35 | * Insert LAST_ITEM_IN_LIST at the end of each mapping | ||
36 | */ | ||
37 | |||
38 | /* CONTEXT_CUSTOM's used in this file... | ||
39 | |||
40 | CONTEXT_CUSTOM|CONTEXT_TREE = the standard list/tree defines (without directions) | ||
41 | CONTEXT_CUSTOM|CONTEXT_SETTINGS = the direction keys for the eq/col picker screens | ||
42 | i.e where up/down is inc/dec | ||
43 | CONTEXT_SETTINGS = up/down is prev/next, l/r is inc/dec | ||
44 | |||
45 | */ | ||
46 | |||
47 | static const struct button_mapping button_context_standard[] = { | ||
48 | { ACTION_STD_PREV, BUTTON_UP|BUTTON_REL, BUTTON_NONE }, | ||
49 | { ACTION_STD_PREVREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
50 | { ACTION_STD_NEXT, BUTTON_DOWN|BUTTON_REL, BUTTON_NONE }, | ||
51 | { ACTION_STD_NEXTREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
52 | |||
53 | { ACTION_STD_CANCEL, BUTTON_LEFT, BUTTON_NONE }, | ||
54 | { ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE }, | ||
55 | |||
56 | { ACTION_STD_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT }, | ||
57 | |||
58 | { ACTION_STD_QUICKSCREEN, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU }, | ||
59 | { ACTION_STD_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU }, | ||
60 | |||
61 | { ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT }, | ||
62 | { ACTION_STD_OK, BUTTON_RIGHT, BUTTON_NONE }, | ||
63 | |||
64 | LAST_ITEM_IN_LIST | ||
65 | }; /* button_context_standard */ | ||
66 | |||
67 | |||
68 | static const struct button_mapping button_context_wps[] = { | ||
69 | { ACTION_WPS_PLAY, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY }, | ||
70 | { ACTION_WPS_STOP, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE }, | ||
71 | |||
72 | { ACTION_WPS_SKIPNEXT, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT }, | ||
73 | { ACTION_WPS_SKIPPREV, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT }, | ||
74 | |||
75 | { ACTION_WPS_SEEKBACK, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, | ||
76 | { ACTION_WPS_SEEKFWD, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, | ||
77 | { ACTION_WPS_STOPSEEK, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT|BUTTON_REPEAT }, | ||
78 | { ACTION_WPS_STOPSEEK, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT|BUTTON_REPEAT }, | ||
79 | |||
80 | //{ ACTION_WPS_ABSETB_NEXTDIR,BUTTON_RIGHT, BUTTON_CUSTOM }, | ||
81 | //{ ACTION_WPS_ABSETA_PREVDIR,BUTTON_LEFT, BUTTON_CUSTOM }, | ||
82 | //{ ACTION_WPS_ABRESET, BUTTON_CUSTOM|BUTTON_REPEAT, BUTTON_NONE }, | ||
83 | |||
84 | { ACTION_WPS_VOLDOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
85 | { ACTION_WPS_VOLDOWN, BUTTON_DOWN, BUTTON_NONE }, | ||
86 | { ACTION_WPS_VOLUP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
87 | { ACTION_WPS_VOLUP, BUTTON_UP, BUTTON_NONE }, | ||
88 | |||
89 | { ACTION_WPS_PITCHSCREEN, BUTTON_BACK|BUTTON_REPEAT, BUTTON_BACK }, | ||
90 | |||
91 | { ACTION_WPS_QUICKSCREEN, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU }, | ||
92 | { ACTION_WPS_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU }, | ||
93 | { ACTION_WPS_MENU, BUTTON_POWER, BUTTON_NONE }, | ||
94 | { ACTION_WPS_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT }, | ||
95 | |||
96 | { ACTION_WPS_ID3SCREEN, BUTTON_BACK|BUTTON_REL, BUTTON_NONE }, | ||
97 | { ACTION_WPS_BROWSE, BUTTON_SELECT|BUTTON_REL, BUTTON_BACK }, | ||
98 | LAST_ITEM_IN_LIST | ||
99 | }; /* button_context_wps */ | ||
100 | |||
101 | static const struct button_mapping button_context_list[] = { | ||
102 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | ||
103 | }; /* button_context_list */ | ||
104 | |||
105 | static const struct button_mapping button_context_tree[] = { | ||
106 | { ACTION_TREE_WPS, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY }, | ||
107 | { ACTION_TREE_STOP, BUTTON_POWER, BUTTON_NONE }, | ||
108 | { ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_POWER }, | ||
109 | { ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE }, | ||
110 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST) | ||
111 | }; /* button_context_tree */ | ||
112 | |||
113 | static const struct button_mapping button_context_listtree_scroll_without_combo[] = { | ||
114 | { ACTION_NONE, BUTTON_LEFT, BUTTON_NONE }, | ||
115 | { ACTION_STD_CANCEL, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT }, | ||
116 | { ACTION_TREE_ROOT_INIT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_LEFT }, | ||
117 | { ACTION_TREE_PGLEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, | ||
118 | { ACTION_TREE_PGLEFT, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT|BUTTON_REPEAT }, | ||
119 | { ACTION_NONE, BUTTON_RIGHT, BUTTON_NONE }, | ||
120 | { ACTION_STD_OK, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT }, | ||
121 | { ACTION_TREE_PGRIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, | ||
122 | { ACTION_TREE_PGRIGHT, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT|BUTTON_REPEAT }, | ||
123 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE), | ||
124 | }; | ||
125 | |||
126 | static const struct button_mapping button_context_settings[] = { | ||
127 | { ACTION_SETTINGS_INC, BUTTON_UP, BUTTON_NONE }, | ||
128 | { ACTION_SETTINGS_INCREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_UP }, | ||
129 | { ACTION_SETTINGS_DEC, BUTTON_DOWN, BUTTON_NONE }, | ||
130 | { ACTION_SETTINGS_DECREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_DOWN }, | ||
131 | { ACTION_STD_PREV, BUTTON_LEFT, BUTTON_NONE }, | ||
132 | { ACTION_STD_PREVREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_LEFT }, | ||
133 | { ACTION_STD_NEXT, BUTTON_RIGHT, BUTTON_NONE }, | ||
134 | { ACTION_STD_NEXTREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_RIGHT }, | ||
135 | { ACTION_SETTINGS_RESET, BUTTON_PLAY, BUTTON_NONE }, | ||
136 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | ||
137 | }; /* button_context_settings */ | ||
138 | |||
139 | static const struct button_mapping button_context_settings_right_is_inc[] = { | ||
140 | { ACTION_SETTINGS_INC, BUTTON_RIGHT, BUTTON_NONE }, | ||
141 | { ACTION_SETTINGS_INCREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, | ||
142 | { ACTION_SETTINGS_DEC, BUTTON_LEFT, BUTTON_NONE }, | ||
143 | { ACTION_SETTINGS_DECREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, | ||
144 | { ACTION_STD_PREV, BUTTON_UP, BUTTON_NONE }, | ||
145 | { ACTION_STD_PREVREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
146 | { ACTION_STD_NEXT, BUTTON_DOWN, BUTTON_NONE }, | ||
147 | { ACTION_STD_NEXTREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
148 | { ACTION_SETTINGS_RESET, BUTTON_BACK, BUTTON_NONE }, | ||
149 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | ||
150 | }; /* button_context_settingsgraphical */ | ||
151 | |||
152 | static const struct button_mapping button_context_yesno[] = { | ||
153 | { ACTION_YESNO_ACCEPT, BUTTON_SELECT, BUTTON_NONE }, | ||
154 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | ||
155 | }; /* button_context_settings_yesno */ | ||
156 | |||
157 | static const struct button_mapping button_context_colorchooser[] = { | ||
158 | { ACTION_STD_OK, BUTTON_BACK|BUTTON_REL, BUTTON_NONE }, | ||
159 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS), | ||
160 | }; /* button_context_colorchooser */ | ||
161 | |||
162 | static const struct button_mapping button_context_eq[] = { | ||
163 | { ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE }, | ||
164 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS), | ||
165 | }; /* button_context_eq */ | ||
166 | |||
167 | /** Bookmark Screen **/ | ||
168 | static const struct button_mapping button_context_bmark[] = { | ||
169 | { ACTION_BMS_DELETE, BUTTON_BACK, BUTTON_NONE }, | ||
170 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST), | ||
171 | }; /* button_context_bmark */ | ||
172 | |||
173 | static const struct button_mapping button_context_time[] = { | ||
174 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS), | ||
175 | }; /* button_context_time */ | ||
176 | |||
177 | static const struct button_mapping button_context_quickscreen[] = { | ||
178 | { ACTION_QS_DOWNINV, BUTTON_UP, BUTTON_NONE }, | ||
179 | { ACTION_QS_DOWNINV, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
180 | { ACTION_QS_DOWN, BUTTON_DOWN, BUTTON_NONE }, | ||
181 | { ACTION_QS_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
182 | { ACTION_QS_LEFT, BUTTON_LEFT, BUTTON_NONE }, | ||
183 | { ACTION_QS_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, | ||
184 | { ACTION_QS_RIGHT, BUTTON_RIGHT, BUTTON_NONE }, | ||
185 | { ACTION_QS_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, | ||
186 | { ACTION_STD_CANCEL, BUTTON_MENU, BUTTON_NONE }, | ||
187 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | ||
188 | }; /* button_context_quickscreen */ | ||
189 | |||
190 | static const struct button_mapping button_context_pitchscreen[] = { | ||
191 | |||
192 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | ||
193 | }; /* button_context_pitchcreen */ | ||
194 | |||
195 | static const struct button_mapping button_context_keyboard[] = { | ||
196 | { ACTION_KBD_LEFT, BUTTON_LEFT, BUTTON_NONE }, | ||
197 | { ACTION_KBD_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, | ||
198 | { ACTION_KBD_RIGHT, BUTTON_RIGHT, BUTTON_NONE }, | ||
199 | { ACTION_KBD_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, | ||
200 | { ACTION_KBD_CURSOR_LEFT, BUTTON_CUSTOM, BUTTON_NONE }, | ||
201 | { ACTION_KBD_CURSOR_LEFT, BUTTON_CUSTOM|BUTTON_REPEAT, BUTTON_NONE }, | ||
202 | { ACTION_KBD_CURSOR_RIGHT, BUTTON_PLAY, BUTTON_NONE }, | ||
203 | { ACTION_KBD_CURSOR_RIGHT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE }, | ||
204 | { ACTION_KBD_SELECT, BUTTON_SELECT, BUTTON_NONE }, | ||
205 | { ACTION_KBD_PAGE_FLIP, BUTTON_BACK|BUTTON_MENU, BUTTON_NONE }, | ||
206 | { ACTION_KBD_DONE, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY }, | ||
207 | { ACTION_KBD_ABORT, BUTTON_BACK|BUTTON_REL, BUTTON_BACK }, | ||
208 | { ACTION_KBD_BACKSPACE, BUTTON_MENU, BUTTON_NONE }, | ||
209 | { ACTION_KBD_BACKSPACE, BUTTON_MENU|BUTTON_REPEAT, BUTTON_NONE }, | ||
210 | { ACTION_KBD_UP, BUTTON_UP, BUTTON_NONE }, | ||
211 | { ACTION_KBD_UP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
212 | { ACTION_KBD_DOWN, BUTTON_DOWN, BUTTON_NONE }, | ||
213 | { ACTION_KBD_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
214 | LAST_ITEM_IN_LIST | ||
215 | }; /* button_context_keyboard */ | ||
216 | |||
217 | const struct button_mapping* get_context_mapping(int context) | ||
218 | { | ||
219 | switch (context&~CONTEXT_REMOTE) | ||
220 | { | ||
221 | case CONTEXT_STD: | ||
222 | return button_context_standard; | ||
223 | case CONTEXT_WPS: | ||
224 | return button_context_wps; | ||
225 | case CONTEXT_LIST: | ||
226 | return button_context_list; | ||
227 | case CONTEXT_MAINMENU: | ||
228 | case CONTEXT_TREE: | ||
229 | return button_context_listtree_scroll_without_combo; | ||
230 | case CONTEXT_CUSTOM|CONTEXT_TREE: | ||
231 | return button_context_tree; | ||
232 | case CONTEXT_SETTINGS: | ||
233 | return button_context_settings; | ||
234 | case CONTEXT_CUSTOM|CONTEXT_SETTINGS: | ||
235 | return button_context_settings_right_is_inc; | ||
236 | case CONTEXT_SETTINGS_COLOURCHOOSER: | ||
237 | return button_context_colorchooser; | ||
238 | case CONTEXT_SETTINGS_EQ: | ||
239 | return button_context_eq; | ||
240 | case CONTEXT_SETTINGS_TIME: | ||
241 | return button_context_time; | ||
242 | case CONTEXT_YESNOSCREEN: | ||
243 | return button_context_yesno; | ||
244 | case CONTEXT_BOOKMARKSCREEN: | ||
245 | return button_context_bmark; | ||
246 | case CONTEXT_QUICKSCREEN: | ||
247 | return button_context_quickscreen; | ||
248 | case CONTEXT_PITCHSCREEN: | ||
249 | return button_context_pitchscreen; | ||
250 | case CONTEXT_KEYBOARD: | ||
251 | return button_context_keyboard; | ||
252 | } | ||
253 | return button_context_standard; | ||
254 | } | ||
diff --git a/firmware/export/config-creativezv.h b/firmware/export/config-creativezv.h index af9bedf307..7304dda728 100644 --- a/firmware/export/config-creativezv.h +++ b/firmware/export/config-creativezv.h | |||
@@ -68,7 +68,7 @@ | |||
68 | /* Define this if your LCD can be enabled/disabled */ | 68 | /* Define this if your LCD can be enabled/disabled */ |
69 | #define HAVE_LCD_ENABLE | 69 | #define HAVE_LCD_ENABLE |
70 | 70 | ||
71 | #define CONFIG_KEYPAD CREATIVEZVM_PAD | 71 | #define CONFIG_KEYPAD CREATIVEZV_PAD |
72 | #define HAS_BUTTON_HOLD | 72 | #define HAS_BUTTON_HOLD |
73 | #define HAVE_HEADPHONE_DETECTION | 73 | #define HAVE_HEADPHONE_DETECTION |
74 | //#define HAVE_TOUCHPAD | 74 | //#define HAVE_TOUCHPAD |
diff --git a/firmware/export/config.h b/firmware/export/config.h index 595b731e0f..51c79abccf 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h | |||
@@ -81,6 +81,7 @@ | |||
81 | #define IAUDIO_M3_PAD 23 | 81 | #define IAUDIO_M3_PAD 23 |
82 | #define CREATIVEZVM_PAD 24 | 82 | #define CREATIVEZVM_PAD 24 |
83 | #define SANSA_M200_PAD 25 | 83 | #define SANSA_M200_PAD 25 |
84 | #define CREATIVEZV_PAD 26 | ||
84 | 85 | ||
85 | /* CONFIG_REMOTE_KEYPAD */ | 86 | /* CONFIG_REMOTE_KEYPAD */ |
86 | #define H100_REMOTE 1 | 87 | #define H100_REMOTE 1 |
diff --git a/firmware/target/arm/tms320dm320/creative-zvm/button-target.h b/firmware/target/arm/tms320dm320/creative-zvm/button-target.h index 1b63895374..6530a1c9e0 100644 --- a/firmware/target/arm/tms320dm320/creative-zvm/button-target.h +++ b/firmware/target/arm/tms320dm320/creative-zvm/button-target.h | |||
@@ -37,11 +37,26 @@ | |||
37 | 37 | ||
38 | #define BUTTON_HOLD (1 << 10) | 38 | #define BUTTON_HOLD (1 << 10) |
39 | 39 | ||
40 | #ifdef CREATIVE_ZV | ||
41 | #define BUTTON_PREV (1 << 11) | ||
42 | #define BUTTON_NEXT (1 << 12) | ||
43 | |||
44 | #define BUTTON_VOL_UP (1 << 13) | ||
45 | #define BUTTON_VOL_DOWN (1 << 14) | ||
46 | #endif | ||
47 | |||
40 | #define BUTTON_REMOTE 0 | 48 | #define BUTTON_REMOTE 0 |
41 | 49 | ||
50 | #ifndef CREATIVE_ZV | ||
42 | #define BUTTON_MAIN ( BUTTON_BACK | BUTTON_MENU | BUTTON_LEFT | BUTTON_RIGHT \ | 51 | #define BUTTON_MAIN ( BUTTON_BACK | BUTTON_MENU | BUTTON_LEFT | BUTTON_RIGHT \ |
43 | | BUTTON_UP | BUTTON_DOWN | BUTTON_SELECT | BUTTON_POWER \ | 52 | | BUTTON_UP | BUTTON_DOWN | BUTTON_SELECT | BUTTON_POWER \ |
44 | | BUTTON_PLAY | BUTTON_HOLD | BUTTON_CUSTOM ) | 53 | | BUTTON_PLAY | BUTTON_HOLD | BUTTON_CUSTOM ) |
54 | #else | ||
55 | #define BUTTON_MAIN ( BUTTON_BACK | BUTTON_MENU | BUTTON_LEFT | BUTTON_RIGHT \ | ||
56 | | BUTTON_UP | BUTTON_DOWN | BUTTON_SELECT | BUTTON_POWER \ | ||
57 | | BUTTON_PLAY | BUTTON_HOLD | BUTTON_NEXT | BUTTON_PREV \ | ||
58 | | BUTTON_VOL_UP | BUTTON_VOL_DOWN ) | ||
59 | #endif | ||
45 | 60 | ||
46 | #define POWEROFF_BUTTON BUTTON_POWER | 61 | #define POWEROFF_BUTTON BUTTON_POWER |
47 | #define POWEROFF_COUNT 10 | 62 | #define POWEROFF_COUNT 10 |
diff --git a/tools/configure b/tools/configure index da3d7db045..27d6d43c4c 100755 --- a/tools/configure +++ b/tools/configure | |||
@@ -1503,7 +1503,7 @@ fi | |||
1503 | 1503 | ||
1504 | 92|creativezenvision) | 1504 | 92|creativezenvision) |
1505 | target_id=39 | 1505 | target_id=39 |
1506 | modelname="creativezm" | 1506 | modelname="creativezv" |
1507 | target="-DCREATIVE_ZV" | 1507 | target="-DCREATIVE_ZV" |
1508 | memory=64 | 1508 | memory=64 |
1509 | arm926ejscc | 1509 | arm926ejscc |
diff --git a/uisimulator/sdl/UI-creativezv.bmp b/uisimulator/sdl/UI-creativezv.bmp new file mode 100644 index 0000000000..4d82b18da7 --- /dev/null +++ b/uisimulator/sdl/UI-creativezv.bmp | |||
Binary files differ | |||
diff --git a/uisimulator/sdl/UI-creativezvm.bmp b/uisimulator/sdl/UI-creativezvm60.bmp index d244b8d6e7..d244b8d6e7 100644 --- a/uisimulator/sdl/UI-creativezvm.bmp +++ b/uisimulator/sdl/UI-creativezvm60.bmp | |||
Binary files differ | |||
diff --git a/uisimulator/sdl/button.c b/uisimulator/sdl/button.c index 07e53ce951..76a1f2f10c 100644 --- a/uisimulator/sdl/button.c +++ b/uisimulator/sdl/button.c | |||
@@ -833,6 +833,53 @@ void button_event(int key, bool pressed) | |||
833 | case SDLK_ESCAPE: | 833 | case SDLK_ESCAPE: |
834 | new_btn = BUTTON_POWER; | 834 | new_btn = BUTTON_POWER; |
835 | break; | 835 | break; |
836 | #elif CONFIG_KEYPAD == CREATIVEZV_PAD | ||
837 | case SDLK_KP1: | ||
838 | new_btn = BUTTON_PREV; | ||
839 | break; | ||
840 | case SDLK_KP3: | ||
841 | new_btn = BUTTON_NEXT; | ||
842 | break; | ||
843 | case SDLK_KP7: | ||
844 | new_btn = BUTTON_BACK; | ||
845 | break; | ||
846 | case SDLK_p: | ||
847 | new_btn = BUTTON_PLAY; | ||
848 | break; | ||
849 | case SDLK_KP9: | ||
850 | new_btn = BUTTON_MENU; | ||
851 | break; | ||
852 | case SDLK_KP4: | ||
853 | case SDLK_LEFT: | ||
854 | new_btn = BUTTON_LEFT; | ||
855 | break; | ||
856 | case SDLK_KP6: | ||
857 | case SDLK_RIGHT: | ||
858 | new_btn = BUTTON_RIGHT; | ||
859 | break; | ||
860 | case SDLK_KP8: | ||
861 | case SDLK_UP: | ||
862 | new_btn = BUTTON_UP; | ||
863 | break; | ||
864 | case SDLK_KP2: | ||
865 | case SDLK_DOWN: | ||
866 | new_btn = BUTTON_DOWN; | ||
867 | break; | ||
868 | case SDLK_KP5: | ||
869 | case SDLK_SPACE: | ||
870 | new_btn = BUTTON_SELECT; | ||
871 | break; | ||
872 | case SDLK_KP_MULTIPLY: | ||
873 | case SDLK_F8: | ||
874 | case SDLK_ESCAPE: | ||
875 | new_btn = BUTTON_POWER; | ||
876 | break; | ||
877 | case SDLK_z: | ||
878 | new_btn = BUTTON_VOL_DOWN; | ||
879 | break; | ||
880 | case SDLK_s: | ||
881 | new_btn = BUTTON_VOL_UP; | ||
882 | break; | ||
836 | #else | 883 | #else |
837 | #error No keymap defined! | 884 | #error No keymap defined! |
838 | #endif /* CONFIG_KEYPAD */ | 885 | #endif /* CONFIG_KEYPAD */ |
diff --git a/uisimulator/sdl/uisdl.h b/uisimulator/sdl/uisdl.h index fa935c7263..abd320ad18 100644 --- a/uisimulator/sdl/uisdl.h +++ b/uisimulator/sdl/uisdl.h | |||
@@ -374,8 +374,12 @@ | |||
374 | #define UI_LCD_FGCOLOR 0, 0, 0 /* foreground color of LCD (no backlight) */ | 374 | #define UI_LCD_FGCOLOR 0, 0, 0 /* foreground color of LCD (no backlight) */ |
375 | #define UI_LCD_FGCOLORLIGHT 0, 0, 0 /* foreground color of LCD (backlight) */ | 375 | #define UI_LCD_FGCOLORLIGHT 0, 0, 0 /* foreground color of LCD (backlight) */ |
376 | 376 | ||
377 | #elif defined(CREATIVE_ZVM) | 377 | #elif defined(CREATIVE_ZVM) || defined(CREATIVE_ZVM60GB) |
378 | #define UI_TITLE "Creative Zen Vision:M 30GB" | 378 | #ifdef CREATIVE_ZVM |
379 | #define UI_TITLE "Creative Zen Vision:M 30GB" | ||
380 | #else | ||
381 | #define UI_TITLE "Creative Zen Vision:M 60GB" | ||
382 | #endif | ||
379 | #define UI_WIDTH 383 /* width of GUI window */ | 383 | #define UI_WIDTH 383 /* width of GUI window */ |
380 | #define UI_HEIGHT 643 /* height of GUI window */ | 384 | #define UI_HEIGHT 643 /* height of GUI window */ |
381 | #define UI_LCD_POSX 31 /* x position of lcd */ | 385 | #define UI_LCD_POSX 31 /* x position of lcd */ |
@@ -387,6 +391,19 @@ | |||
387 | #define UI_LCD_FGCOLOR 0, 0, 0 /* foreground color of LCD (no backlight) */ | 391 | #define UI_LCD_FGCOLOR 0, 0, 0 /* foreground color of LCD (no backlight) */ |
388 | #define UI_LCD_FGCOLORLIGHT 0, 0, 0 /* foreground color of LCD (backlight) */ | 392 | #define UI_LCD_FGCOLORLIGHT 0, 0, 0 /* foreground color of LCD (backlight) */ |
389 | 393 | ||
394 | #elif defined(CREATIVE_ZV) | ||
395 | #define UI_TITLE "Creative Zen Vision" | ||
396 | #define UI_WIDTH 1054 /* width of GUI window */ | ||
397 | #define UI_HEIGHT 643 /* height of GUI window */ | ||
398 | #define UI_LCD_POSX 129 /* x position of lcd */ | ||
399 | #define UI_LCD_POSY 85 /* y position of lcd */ | ||
400 | #define UI_LCD_WIDTH 640 | ||
401 | #define UI_LCD_HEIGHT 480 | ||
402 | #define UI_LCD_BGCOLOR 32, 32, 32 /* bkgnd color of LCD (no backlight) */ | ||
403 | #define UI_LCD_BGCOLORLIGHT 192, 192, 192 /* bkgnd color of LCD (backlight) */ | ||
404 | #define UI_LCD_FGCOLOR 0, 0, 0 /* foreground color of LCD (no backlight) */ | ||
405 | #define UI_LCD_FGCOLORLIGHT 0, 0, 0 /* foreground color of LCD (backlight) */ | ||
406 | |||
390 | #endif | 407 | #endif |
391 | extern SDL_Surface *gui_surface; | 408 | extern SDL_Surface *gui_surface; |
392 | extern bool background; /* True if the background image is enabled */ | 409 | extern bool background; /* True if the background image is enabled */ |