diff options
-rw-r--r-- | apps/SOURCES | 2 | ||||
-rw-r--r-- | apps/debug_menu.c | 3 | ||||
-rwxr-xr-x | apps/keymaps/keymap-hdd1630.c | 315 | ||||
-rw-r--r-- | bootloader/SOURCES | 3 | ||||
-rw-r--r-- | bootloader/main-pp.c | 4 | ||||
-rw-r--r-- | firmware/SOURCES | 16 | ||||
-rwxr-xr-x | firmware/export/config-hdd1630.h | 189 | ||||
-rw-r--r-- | firmware/export/config.h | 4 | ||||
-rw-r--r-- | firmware/export/usb.h | 3 | ||||
-rw-r--r-- | firmware/target/arm/philips/hdd1630/adc-target.h | 39 | ||||
-rwxr-xr-x | firmware/target/arm/philips/hdd1630/backlight-hdd1630.c | 49 | ||||
-rwxr-xr-x | firmware/target/arm/philips/hdd1630/backlight-target.h | 36 | ||||
-rwxr-xr-x | firmware/target/arm/philips/hdd1630/button-hdd1630.c | 65 | ||||
-rwxr-xr-x | firmware/target/arm/philips/hdd1630/button-target.h | 53 | ||||
-rwxr-xr-x | firmware/target/arm/philips/hdd1630/lcd-hdd1630.c | 266 | ||||
-rwxr-xr-x | firmware/target/arm/philips/hdd1630/power-hdd1630.c | 58 | ||||
-rw-r--r-- | firmware/target/arm/philips/hdd1630/powermgmt-hdd1630.c | 62 | ||||
-rw-r--r-- | firmware/target/arm/usb-fw-pp502x.c | 5 | ||||
-rwxr-xr-x | tools/configure | 26 | ||||
-rw-r--r-- | tools/scramble.c | 4 |
20 files changed, 1198 insertions, 4 deletions
diff --git a/apps/SOURCES b/apps/SOURCES index 1da74e1b2a..01d31210e6 100644 --- a/apps/SOURCES +++ b/apps/SOURCES | |||
@@ -193,4 +193,6 @@ keymaps/keymap-creativezvm.c | |||
193 | keymaps/keymap-creativezv.c | 193 | keymaps/keymap-creativezv.c |
194 | #elif CONFIG_KEYPAD == PHILIPS_SA9200_PAD | 194 | #elif CONFIG_KEYPAD == PHILIPS_SA9200_PAD |
195 | keymaps/keymap-sa9200.c | 195 | keymaps/keymap-sa9200.c |
196 | #elif CONFIG_KEYPAD == PHILIPS_HDD1630_PAD | ||
197 | keymaps/keymap-hdd1630.c | ||
196 | #endif | 198 | #endif |
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index ab3075afc1..f87d41d53c 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c | |||
@@ -1013,7 +1013,8 @@ static bool dbg_spdif(void) | |||
1013 | # define DEBUG_CANCEL BUTTON_LEFT | 1013 | # define DEBUG_CANCEL BUTTON_LEFT |
1014 | 1014 | ||
1015 | /* This is temporary until the SA9200 touchpad works */ | 1015 | /* This is temporary until the SA9200 touchpad works */ |
1016 | #elif (CONFIG_KEYPAD == PHILIPS_SA9200_PAD) | 1016 | #elif (CONFIG_KEYPAD == PHILIPS_SA9200_PAD) || \ |
1017 | (CONFIG_KEYPAD == PHILIPS_HDD1630_PAD) | ||
1017 | # define DEBUG_CANCEL BUTTON_POWER | 1018 | # define DEBUG_CANCEL BUTTON_POWER |
1018 | 1019 | ||
1019 | #endif /* key definitions */ | 1020 | #endif /* key definitions */ |
diff --git a/apps/keymaps/keymap-hdd1630.c b/apps/keymaps/keymap-hdd1630.c new file mode 100755 index 0000000000..9363eba735 --- /dev/null +++ b/apps/keymaps/keymap-hdd1630.c | |||
@@ -0,0 +1,315 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2008 Mark Arigo | ||
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 toshiba gigabeat target */ | ||
21 | #include <stdio.h> | ||
22 | #include <string.h> | ||
23 | #include <stdlib.h> | ||
24 | |||
25 | #include "config.h" | ||
26 | #include "action.h" | ||
27 | #include "button.h" | ||
28 | #include "settings.h" | ||
29 | |||
30 | /* | ||
31 | * The format of the list is as follows | ||
32 | * { Action Code, Button code, Prereq button code } | ||
33 | * if there's no need to check the previous button's value, use BUTTON_NONE | ||
34 | * Insert LAST_ITEM_IN_LIST at the end of each mapping | ||
35 | */ | ||
36 | |||
37 | /* CONTEXT_CUSTOM's used in this file... | ||
38 | |||
39 | CONTEXT_CUSTOM|CONTEXT_TREE = the standard list/tree defines (without directions) | ||
40 | CONTEXT_CUSTOM|CONTEXT_SETTINGS = the direction keys for the eq/col picker screens | ||
41 | i.e where up/down is inc/dec | ||
42 | CONTEXT_SETTINGS = up/down is prev/next, l/r is inc/dec | ||
43 | |||
44 | */ | ||
45 | |||
46 | |||
47 | static const struct button_mapping button_context_standard[] = { | ||
48 | { ACTION_STD_PREV, BUTTON_UP, BUTTON_NONE }, | ||
49 | { ACTION_STD_PREVREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
50 | { ACTION_STD_NEXT, BUTTON_DOWN, 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_VIEW|BUTTON_REL, BUTTON_VIEW }, | ||
70 | { ACTION_WPS_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_POWER }, | ||
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_VIEW|BUTTON_RIGHT, BUTTON_NONE }, | ||
81 | { ACTION_WPS_ABSETA_PREVDIR, BUTTON_VIEW|BUTTON_LEFT, BUTTON_NONE }, | ||
82 | { ACTION_WPS_ABRESET, BUTTON_VIEW|BUTTON_SELECT, BUTTON_NONE }, | ||
83 | |||
84 | { ACTION_WPS_VOLDOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
85 | { ACTION_WPS_VOLDOWN, BUTTON_DOWN, BUTTON_NONE }, | ||
86 | { ACTION_WPS_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE }, | ||
87 | { ACTION_WPS_VOLDOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
88 | { ACTION_WPS_VOLUP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
89 | { ACTION_WPS_VOLUP, BUTTON_UP, BUTTON_NONE }, | ||
90 | { ACTION_WPS_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
91 | { ACTION_WPS_VOLUP, BUTTON_VOL_UP, BUTTON_NONE }, | ||
92 | |||
93 | { ACTION_WPS_PITCHSCREEN, BUTTON_VIEW|BUTTON_UP, BUTTON_VIEW }, | ||
94 | { ACTION_WPS_PITCHSCREEN, BUTTON_VIEW|BUTTON_DOWN, BUTTON_VIEW }, | ||
95 | |||
96 | { ACTION_WPS_QUICKSCREEN, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU }, | ||
97 | { ACTION_WPS_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU }, | ||
98 | { ACTION_WPS_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT }, | ||
99 | |||
100 | { ACTION_WPS_ID3SCREEN, BUTTON_VIEW|BUTTON_MENU, BUTTON_NONE }, | ||
101 | { ACTION_WPS_BROWSE, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT }, | ||
102 | |||
103 | LAST_ITEM_IN_LIST | ||
104 | }; /* button_context_wps */ | ||
105 | |||
106 | static const struct button_mapping button_context_list[] = { | ||
107 | { ACTION_LISTTREE_PGUP, BUTTON_VIEW|BUTTON_UP, BUTTON_VIEW }, | ||
108 | { ACTION_LISTTREE_PGUP, BUTTON_UP|BUTTON_REL, BUTTON_VIEW|BUTTON_UP }, | ||
109 | { ACTION_LISTTREE_PGUP, BUTTON_VIEW|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
110 | { ACTION_LISTTREE_PGDOWN, BUTTON_VIEW|BUTTON_DOWN, BUTTON_VIEW }, | ||
111 | { ACTION_LISTTREE_PGDOWN, BUTTON_DOWN|BUTTON_REL, BUTTON_VIEW|BUTTON_DOWN }, | ||
112 | { ACTION_LISTTREE_PGDOWN, BUTTON_VIEW|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
113 | #ifdef HAVE_VOLUME_IN_LIST | ||
114 | { ACTION_LIST_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
115 | { ACTION_LIST_VOLUP, BUTTON_VOL_UP, BUTTON_NONE }, | ||
116 | { ACTION_LIST_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE }, | ||
117 | { ACTION_LIST_VOLDOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
118 | #endif | ||
119 | |||
120 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | ||
121 | }; /* button_context_list */ | ||
122 | |||
123 | static const struct button_mapping button_context_tree[] = { | ||
124 | { ACTION_TREE_WPS, BUTTON_VIEW|BUTTON_REL, BUTTON_VIEW }, | ||
125 | { ACTION_TREE_STOP, BUTTON_POWER, BUTTON_NONE }, | ||
126 | { ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_POWER }, | ||
127 | { ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE }, | ||
128 | |||
129 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST) | ||
130 | }; /* button_context_tree */ | ||
131 | |||
132 | static const struct button_mapping button_context_listtree_scroll_with_combo[] = { | ||
133 | { ACTION_NONE, BUTTON_VIEW, BUTTON_NONE }, | ||
134 | { ACTION_TREE_PGLEFT, BUTTON_VIEW|BUTTON_LEFT, BUTTON_VIEW }, | ||
135 | { ACTION_TREE_PGLEFT, BUTTON_LEFT|BUTTON_REL, BUTTON_VIEW|BUTTON_LEFT }, | ||
136 | { ACTION_TREE_PGLEFT, BUTTON_VIEW|BUTTON_LEFT, BUTTON_LEFT|BUTTON_REL }, | ||
137 | { ACTION_TREE_ROOT_INIT, BUTTON_VIEW|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_VIEW|BUTTON_LEFT }, | ||
138 | { ACTION_TREE_PGLEFT, BUTTON_VIEW|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, | ||
139 | { ACTION_TREE_PGRIGHT, BUTTON_VIEW|BUTTON_RIGHT, BUTTON_VIEW }, | ||
140 | { ACTION_TREE_PGRIGHT, BUTTON_RIGHT|BUTTON_REL, BUTTON_VIEW|BUTTON_RIGHT }, | ||
141 | { ACTION_TREE_PGRIGHT, BUTTON_VIEW|BUTTON_RIGHT, BUTTON_RIGHT|BUTTON_REL }, | ||
142 | { ACTION_TREE_PGRIGHT, BUTTON_VIEW|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, | ||
143 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE), | ||
144 | }; | ||
145 | |||
146 | static const struct button_mapping button_context_listtree_scroll_without_combo[] = { | ||
147 | { ACTION_NONE, BUTTON_LEFT, BUTTON_NONE }, | ||
148 | { ACTION_STD_CANCEL, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT }, | ||
149 | { ACTION_TREE_ROOT_INIT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_LEFT }, | ||
150 | { ACTION_TREE_PGLEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, | ||
151 | { ACTION_TREE_PGLEFT, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT|BUTTON_REPEAT }, | ||
152 | { ACTION_NONE, BUTTON_RIGHT, BUTTON_NONE }, | ||
153 | { ACTION_STD_OK, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT }, | ||
154 | { ACTION_TREE_PGRIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, | ||
155 | { ACTION_TREE_PGRIGHT, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT|BUTTON_REPEAT }, | ||
156 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE), | ||
157 | }; | ||
158 | |||
159 | static const struct button_mapping button_context_settings[] = { | ||
160 | { ACTION_SETTINGS_INC, BUTTON_UP, BUTTON_NONE }, | ||
161 | { ACTION_SETTINGS_INCREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
162 | { ACTION_SETTINGS_DEC, BUTTON_DOWN, BUTTON_NONE }, | ||
163 | { ACTION_SETTINGS_DECREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
164 | { ACTION_STD_PREV, BUTTON_LEFT, BUTTON_NONE }, | ||
165 | { ACTION_STD_PREVREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, | ||
166 | { ACTION_STD_NEXT, BUTTON_RIGHT, BUTTON_NONE }, | ||
167 | { ACTION_STD_NEXTREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, | ||
168 | { ACTION_SETTINGS_RESET, BUTTON_VIEW, BUTTON_NONE }, | ||
169 | |||
170 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | ||
171 | }; /* button_context_settings */ | ||
172 | |||
173 | static const struct button_mapping button_context_settings_right_is_inc[] = { | ||
174 | { ACTION_SETTINGS_INC, BUTTON_RIGHT, BUTTON_NONE }, | ||
175 | { ACTION_SETTINGS_INCREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, | ||
176 | { ACTION_SETTINGS_DEC, BUTTON_LEFT, BUTTON_NONE }, | ||
177 | { ACTION_SETTINGS_DECREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, | ||
178 | { ACTION_STD_PREV, BUTTON_UP, BUTTON_NONE }, | ||
179 | { ACTION_STD_PREVREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
180 | { ACTION_STD_NEXT, BUTTON_DOWN, BUTTON_NONE }, | ||
181 | { ACTION_STD_NEXTREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
182 | { ACTION_SETTINGS_RESET, BUTTON_VIEW, BUTTON_NONE }, | ||
183 | |||
184 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | ||
185 | }; /* button_context_settingsgraphical */ | ||
186 | |||
187 | static const struct button_mapping button_context_yesno[] = { | ||
188 | { ACTION_YESNO_ACCEPT, BUTTON_SELECT, BUTTON_NONE }, | ||
189 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | ||
190 | }; /* button_context_settings_yesno */ | ||
191 | |||
192 | static const struct button_mapping button_context_colorchooser[] = { | ||
193 | { ACTION_STD_OK, BUTTON_VIEW|BUTTON_REL, BUTTON_NONE }, | ||
194 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS), | ||
195 | }; /* button_context_colorchooser */ | ||
196 | |||
197 | static const struct button_mapping button_context_eq[] = { | ||
198 | { ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE }, | ||
199 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS), | ||
200 | }; /* button_context_eq */ | ||
201 | |||
202 | /** Bookmark Screen **/ | ||
203 | static const struct button_mapping button_context_bmark[] = { | ||
204 | { ACTION_BMS_DELETE, BUTTON_VIEW, BUTTON_NONE }, | ||
205 | |||
206 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST), | ||
207 | }; /* button_context_bmark */ | ||
208 | |||
209 | static const struct button_mapping button_context_time[] = { | ||
210 | { ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE }, | ||
211 | { ACTION_STD_OK, BUTTON_VIEW, BUTTON_NONE }, | ||
212 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS), | ||
213 | }; /* button_context_time */ | ||
214 | |||
215 | static const struct button_mapping button_context_quickscreen[] = { | ||
216 | { ACTION_QS_DOWNINV, BUTTON_UP, BUTTON_NONE }, | ||
217 | { ACTION_QS_DOWNINV, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
218 | { ACTION_QS_DOWN, BUTTON_DOWN, BUTTON_NONE }, | ||
219 | { ACTION_QS_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
220 | { ACTION_QS_LEFT, BUTTON_LEFT, BUTTON_NONE }, | ||
221 | { ACTION_QS_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, | ||
222 | { ACTION_QS_RIGHT, BUTTON_RIGHT, BUTTON_NONE }, | ||
223 | { ACTION_QS_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, | ||
224 | { ACTION_STD_CANCEL, BUTTON_MENU, BUTTON_NONE }, | ||
225 | |||
226 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | ||
227 | }; /* button_context_quickscreen */ | ||
228 | |||
229 | static const struct button_mapping button_context_pitchscreen[] = { | ||
230 | { ACTION_PS_INC_SMALL, BUTTON_UP, BUTTON_NONE }, | ||
231 | { ACTION_PS_INC_BIG, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
232 | { ACTION_PS_DEC_SMALL, BUTTON_DOWN, BUTTON_NONE }, | ||
233 | { ACTION_PS_DEC_BIG, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
234 | { ACTION_PS_NUDGE_LEFT, BUTTON_LEFT, BUTTON_NONE }, | ||
235 | { ACTION_PS_NUDGE_LEFTOFF, BUTTON_LEFT|BUTTON_REL, BUTTON_NONE }, | ||
236 | { ACTION_PS_NUDGE_RIGHT, BUTTON_RIGHT, BUTTON_NONE }, | ||
237 | { ACTION_PS_NUDGE_RIGHTOFF, BUTTON_RIGHT|BUTTON_REL, BUTTON_NONE }, | ||
238 | { ACTION_PS_TOGGLE_MODE, BUTTON_MENU, BUTTON_NONE }, | ||
239 | { ACTION_PS_RESET, BUTTON_VIEW, BUTTON_NONE }, | ||
240 | { ACTION_PS_EXIT, BUTTON_POWER, BUTTON_NONE }, | ||
241 | |||
242 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | ||
243 | }; /* button_context_pitchcreen */ | ||
244 | |||
245 | static const struct button_mapping button_context_keyboard[] = { | ||
246 | { ACTION_KBD_LEFT, BUTTON_LEFT, BUTTON_NONE }, | ||
247 | { ACTION_KBD_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, | ||
248 | { ACTION_KBD_RIGHT, BUTTON_RIGHT, BUTTON_NONE }, | ||
249 | { ACTION_KBD_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, | ||
250 | { ACTION_KBD_CURSOR_LEFT, BUTTON_VIEW|BUTTON_LEFT, BUTTON_NONE }, | ||
251 | { ACTION_KBD_CURSOR_LEFT, BUTTON_VIEW|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, | ||
252 | { ACTION_KBD_CURSOR_RIGHT, BUTTON_VIEW|BUTTON_RIGHT, BUTTON_NONE }, | ||
253 | { ACTION_KBD_CURSOR_RIGHT, BUTTON_VIEW|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, | ||
254 | { ACTION_KBD_SELECT, BUTTON_SELECT, BUTTON_NONE }, | ||
255 | { ACTION_KBD_PAGE_FLIP, BUTTON_VIEW|BUTTON_MENU, BUTTON_NONE }, | ||
256 | { ACTION_KBD_DONE, BUTTON_VIEW|BUTTON_REL, BUTTON_VIEW }, | ||
257 | { ACTION_KBD_ABORT, BUTTON_POWER|BUTTON_REL, BUTTON_POWER }, | ||
258 | { ACTION_KBD_BACKSPACE, BUTTON_MENU, BUTTON_NONE }, | ||
259 | { ACTION_KBD_BACKSPACE, BUTTON_MENU|BUTTON_REPEAT, BUTTON_NONE }, | ||
260 | { ACTION_KBD_UP, BUTTON_UP, BUTTON_NONE }, | ||
261 | { ACTION_KBD_UP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
262 | { ACTION_KBD_DOWN, BUTTON_DOWN, BUTTON_NONE }, | ||
263 | { ACTION_KBD_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
264 | { ACTION_KBD_MORSE_INPUT, BUTTON_VIEW|BUTTON_POWER, BUTTON_NONE }, | ||
265 | { ACTION_KBD_MORSE_SELECT, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE }, | ||
266 | |||
267 | LAST_ITEM_IN_LIST | ||
268 | }; /* button_context_keyboard */ | ||
269 | |||
270 | const struct button_mapping* get_context_mapping(int context) | ||
271 | { | ||
272 | switch (context) | ||
273 | { | ||
274 | case CONTEXT_STD: | ||
275 | return button_context_standard; | ||
276 | case CONTEXT_WPS: | ||
277 | return button_context_wps; | ||
278 | |||
279 | case CONTEXT_LIST: | ||
280 | return button_context_list; | ||
281 | case CONTEXT_MAINMENU: | ||
282 | case CONTEXT_TREE: | ||
283 | if (global_settings.hold_lr_for_scroll_in_list) | ||
284 | return button_context_listtree_scroll_without_combo; | ||
285 | else | ||
286 | return button_context_listtree_scroll_with_combo; | ||
287 | case CONTEXT_CUSTOM|CONTEXT_TREE: | ||
288 | return button_context_tree; | ||
289 | |||
290 | case CONTEXT_SETTINGS: | ||
291 | return button_context_settings; | ||
292 | case CONTEXT_CUSTOM|CONTEXT_SETTINGS: | ||
293 | return button_context_settings_right_is_inc; | ||
294 | |||
295 | case CONTEXT_SETTINGS_COLOURCHOOSER: | ||
296 | return button_context_colorchooser; | ||
297 | case CONTEXT_SETTINGS_EQ: | ||
298 | return button_context_eq; | ||
299 | |||
300 | case CONTEXT_SETTINGS_TIME: | ||
301 | return button_context_time; | ||
302 | |||
303 | case CONTEXT_YESNOSCREEN: | ||
304 | return button_context_yesno; | ||
305 | case CONTEXT_BOOKMARKSCREEN: | ||
306 | return button_context_bmark; | ||
307 | case CONTEXT_QUICKSCREEN: | ||
308 | return button_context_quickscreen; | ||
309 | case CONTEXT_PITCHSCREEN: | ||
310 | return button_context_pitchscreen; | ||
311 | case CONTEXT_KEYBOARD: | ||
312 | return button_context_keyboard; | ||
313 | } | ||
314 | return button_context_standard; | ||
315 | } | ||
diff --git a/bootloader/SOURCES b/bootloader/SOURCES index c38b8ade1f..37011dd700 100644 --- a/bootloader/SOURCES +++ b/bootloader/SOURCES | |||
@@ -9,7 +9,8 @@ gigabeat-s.c | |||
9 | ../firmware/target/arm/imx31/gigabeat-s/mmu-imx31.c | 9 | ../firmware/target/arm/imx31/gigabeat-s/mmu-imx31.c |
10 | #elif defined(IRIVER_H10) || defined(IRIVER_H10_5GB) || \ | 10 | #elif defined(IRIVER_H10) || defined(IRIVER_H10_5GB) || \ |
11 | defined(SANSA_E200) || defined(SANSA_C200) || \ | 11 | defined(SANSA_E200) || defined(SANSA_C200) || \ |
12 | defined(MROBE_100) || defined(PHILIPS_SA9200) | 12 | defined(MROBE_100) || defined(PHILIPS_SA9200) || \ |
13 | defined(PHILIPS_HDD1630) | ||
13 | #ifdef E200R_INSTALLER | 14 | #ifdef E200R_INSTALLER |
14 | main-e200r-installer.c | 15 | main-e200r-installer.c |
15 | #else | 16 | #else |
diff --git a/bootloader/main-pp.c b/bootloader/main-pp.c index 076900555e..9d69ed4932 100644 --- a/bootloader/main-pp.c +++ b/bootloader/main-pp.c | |||
@@ -61,6 +61,10 @@ extern int show_logo(void); | |||
61 | 61 | ||
62 | #elif CONFIG_KEYPAD == PHILIPS_SA9200_PAD | 62 | #elif CONFIG_KEYPAD == PHILIPS_SA9200_PAD |
63 | #define BOOTLOADER_BOOT_OF BUTTON_VOL_UP | 63 | #define BOOTLOADER_BOOT_OF BUTTON_VOL_UP |
64 | |||
65 | #elif CONFIG_KEYPAD == PHILIPS_HDD1630_PAD | ||
66 | #define BOOTLOADER_BOOT_OF BUTTON_MENU | ||
67 | |||
64 | #endif | 68 | #endif |
65 | 69 | ||
66 | /* Maximum allowed firmware image size. 10MB is more than enough */ | 70 | /* Maximum allowed firmware image size. 10MB is more than enough */ |
diff --git a/firmware/SOURCES b/firmware/SOURCES index 2e2559477f..4dca1c1563 100644 --- a/firmware/SOURCES +++ b/firmware/SOURCES | |||
@@ -481,6 +481,22 @@ target/arm/i2s-pp.c | |||
481 | #endif /* SIMULATOR */ | 481 | #endif /* SIMULATOR */ |
482 | #endif /* PHILIPS_SA9200 */ | 482 | #endif /* PHILIPS_SA9200 */ |
483 | 483 | ||
484 | #ifdef PHILIPS_HDD1630 | ||
485 | #ifndef SIMULATOR | ||
486 | target/arm/ata-as-arm.S | ||
487 | target/arm/ata-pp5020.c | ||
488 | target/arm/wmcodec-pp.c | ||
489 | target/arm/i2s-pp.c | ||
490 | target/arm/adc-pp5020.c | ||
491 | target/arm/philips/hdd1630/backlight-hdd1630.c | ||
492 | target/arm/philips/hdd1630/button-hdd1630.c | ||
493 | target/arm/philips/hdd1630/lcd-hdd1630.c | ||
494 | target/arm/philips/hdd1630/power-hdd1630.c | ||
495 | target/arm/philips/hdd1630/powermgmt-hdd1630.c | ||
496 | target/arm/usb-fw-pp502x.c | ||
497 | #endif /* SIMULATOR */ | ||
498 | #endif /* PHILIPS_HDD1630 */ | ||
499 | |||
484 | #ifdef IAUDIO_X5 | 500 | #ifdef IAUDIO_X5 |
485 | #ifndef SIMULATOR | 501 | #ifndef SIMULATOR |
486 | target/coldfire/ata-as-coldfire.S | 502 | target/coldfire/ata-as-coldfire.S |
diff --git a/firmware/export/config-hdd1630.h b/firmware/export/config-hdd1630.h new file mode 100755 index 0000000000..19ca190a57 --- /dev/null +++ b/firmware/export/config-hdd1630.h | |||
@@ -0,0 +1,189 @@ | |||
1 | /* | ||
2 | * This config file is for the iriver H10 20Gb | ||
3 | */ | ||
4 | |||
5 | #define TARGET_TREE /* this target is using the target tree system */ | ||
6 | |||
7 | /* For Rolo and boot loader */ | ||
8 | #define MODEL_NUMBER 31 | ||
9 | #define MODEL_NAME "Philips GoGear HDD1630" | ||
10 | |||
11 | /* define this if you use an ATA controller */ | ||
12 | #define HAVE_ATA | ||
13 | |||
14 | /* define this if you have recording possibility */ | ||
15 | /* #define HAVE_RECORDING */ | ||
16 | |||
17 | /* Define bitmask of input sources - recordable bitmask can be defined | ||
18 | explicitly if different */ | ||
19 | #define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_LINEIN | SRC_CAP_FMRADIO) | ||
20 | |||
21 | /* define the bitmask of hardware sample rates */ | ||
22 | #define HW_SAMPR_CAPS (SAMPR_CAP_44) | ||
23 | |||
24 | /* define the bitmask of recording sample rates */ | ||
25 | #define REC_SAMPR_CAPS (SAMPR_CAP_44) | ||
26 | |||
27 | /* define this if you have a bitmap LCD display */ | ||
28 | #define HAVE_LCD_BITMAP | ||
29 | |||
30 | /* define this if you have a colour LCD */ | ||
31 | #define HAVE_LCD_COLOR | ||
32 | |||
33 | /* define this if you want album art for this target */ | ||
34 | #define HAVE_ALBUMART | ||
35 | |||
36 | /* define this if you have access to the quickscreen */ | ||
37 | #define HAVE_QUICKSCREEN | ||
38 | |||
39 | /* define this if you have access to the pitchscreen */ | ||
40 | #define HAVE_PITCHSCREEN | ||
41 | |||
42 | /* define this if you would like tagcache to build on this target */ | ||
43 | #define HAVE_TAGCACHE | ||
44 | |||
45 | /* LCD dimensions */ | ||
46 | #define LCD_WIDTH 128 | ||
47 | #define LCD_HEIGHT 128 | ||
48 | #define LCD_DEPTH 16 /* 65536 colours */ | ||
49 | #define LCD_PIXELFORMAT RGB565SWAPPED /* rgb565 byte-swapped */ | ||
50 | |||
51 | #ifndef BOOTLOADER | ||
52 | /* Define this if your LCD can be enabled/disabled */ | ||
53 | /* #define HAVE_LCD_ENABLE */ | ||
54 | |||
55 | /* Define this if your LCD can be put to sleep. HAVE_LCD_ENABLE | ||
56 | * should be defined as well. | ||
57 | * We can currently put the lcd to sleep but it won't wake up properly */ | ||
58 | /* #define HAVE_LCD_SLEEP */ | ||
59 | /* #define HAVE_LCD_SLEEP_SETTING */ | ||
60 | #endif | ||
61 | |||
62 | /* define this if you can flip your LCD */ | ||
63 | /* #define HAVE_LCD_FLIP */ | ||
64 | |||
65 | /* define this if you can invert the colours on your LCD */ | ||
66 | /* #define HAVE_LCD_INVERT */ | ||
67 | |||
68 | /* #define IRAM_LCDFRAMEBUFFER IDATA_ATTR *//* put the lcd frame buffer in IRAM */ | ||
69 | |||
70 | #define CONFIG_KEYPAD PHILIPS_HDD1630_PAD | ||
71 | |||
72 | /* Define this if you do software codec */ | ||
73 | #define CONFIG_CODEC SWCODEC | ||
74 | |||
75 | /* define this if you have a real-time clock */ | ||
76 | #ifndef BOOTLOADER | ||
77 | /* #define CONFIG_RTC RTC_E8564 */ | ||
78 | /* #define HAVE_RTC_ALARM */ | ||
79 | #endif | ||
80 | |||
81 | /* Define this if you have a software controlled poweroff */ | ||
82 | /* #define HAVE_SW_POWEROFF */ | ||
83 | |||
84 | /* The number of bytes reserved for loadable codecs */ | ||
85 | #define CODEC_SIZE 0x80000 | ||
86 | |||
87 | /* The number of bytes reserved for loadable plugins */ | ||
88 | #define PLUGIN_BUFFER_SIZE 0x80000 | ||
89 | |||
90 | /* Define this if you have the WM8731 audio codec */ | ||
91 | #define HAVE_WM8731 | ||
92 | |||
93 | /* WM8731 has no tone controls, so we use the software ones */ | ||
94 | #define HAVE_SW_TONE_CONTROLS | ||
95 | |||
96 | #define AB_REPEAT_ENABLE 1 | ||
97 | |||
98 | /* FM Tuner */ | ||
99 | /* #define CONFIG_TUNER TEA5767 */ | ||
100 | /* #define CONFIG_TUNER_XTAL 32768 */ | ||
101 | |||
102 | /* Define this for LCD backlight available */ | ||
103 | #define HAVE_BACKLIGHT | ||
104 | /* #define HAVE_BACKLIGHT_BRIGHTNESS */ | ||
105 | |||
106 | /* Main LCD backlight brightness range and defaults */ | ||
107 | #define MIN_BRIGHTNESS_SETTING 1 | ||
108 | #define MAX_BRIGHTNESS_SETTING 12 | ||
109 | #define DEFAULT_BRIGHTNESS_SETTING 6 | ||
110 | |||
111 | /* define this if you have a light associated with the buttons */ | ||
112 | /* #define HAVE_BUTTON_LIGHT */ | ||
113 | |||
114 | #define AB_REPEAT_ENABLE 1 | ||
115 | |||
116 | #define BATTERY_CAPACITY_DEFAULT 1550 /* default battery capacity */ | ||
117 | #define BATTERY_CAPACITY_MIN 1500 /* min. capacity selectable */ | ||
118 | #define BATTERY_CAPACITY_MAX 3200 /* max. capacity selectable */ | ||
119 | #define BATTERY_CAPACITY_INC 50 /* capacity increment */ | ||
120 | #define BATTERY_TYPES_COUNT 1 /* only one type */ | ||
121 | |||
122 | /* Hardware controlled charging */ | ||
123 | /* #define CONFIG_CHARGING CHARGING_SIMPLE */ | ||
124 | |||
125 | /* define this if the unit can be powered or charged via USB */ | ||
126 | #define HAVE_USB_POWER | ||
127 | |||
128 | #ifndef SIMULATOR | ||
129 | |||
130 | /* Define this if you have a PortalPlayer PP5020 */ | ||
131 | #define CONFIG_CPU PP5022 | ||
132 | |||
133 | /* Define this if you want to use the PP5020 i2c interface */ | ||
134 | #define CONFIG_I2C I2C_PP5020 | ||
135 | |||
136 | /* define this if the hardware can be powered off while charging */ | ||
137 | #define HAVE_POWEROFF_WHILE_CHARGING | ||
138 | |||
139 | /* The start address index for ROM builds */ | ||
140 | #define ROM_START 0x00000000 | ||
141 | |||
142 | /* The size of the flash ROM */ | ||
143 | #define FLASH_SIZE 0x100000 | ||
144 | |||
145 | /* Define this to the CPU frequency */ | ||
146 | #define CPU_FREQ 75000000 | ||
147 | |||
148 | /* Type of LCD */ | ||
149 | #define CONFIG_LCD LCD_HDD1630 | ||
150 | |||
151 | /* Define this if your LCD can set contrast */ | ||
152 | #define HAVE_LCD_CONTRAST | ||
153 | |||
154 | #define MIN_CONTRAST_SETTING 0 | ||
155 | #define MAX_CONTRAST_SETTING 30 | ||
156 | #define DEFAULT_CONTRAST_SETTING 14 /* Match boot contrast */ | ||
157 | |||
158 | /* We're able to shut off power to the HDD */ | ||
159 | /* #define HAVE_ATA_POWER_OFF */ | ||
160 | |||
161 | /* Offset ( in the firmware file's header ) to the file CRC and data. These are | ||
162 | only used when loading the old format rockbox.e200 file */ | ||
163 | #define FIRMWARE_OFFSET_FILE_CRC 0x0 | ||
164 | #define FIRMWARE_OFFSET_FILE_DATA 0x8 | ||
165 | |||
166 | /* #define USB_IPODSTYLE */ | ||
167 | |||
168 | /* USB On-the-go */ | ||
169 | #define CONFIG_USBOTG USBOTG_ARC | ||
170 | |||
171 | /* enable these for the experimental usb stack */ | ||
172 | #define HAVE_USBSTACK | ||
173 | #define USB_VENDOR_ID 0x0471 | ||
174 | #define USB_PRODUCT_ID 0x014C | ||
175 | |||
176 | /* Virtual LED (icon) */ | ||
177 | #define CONFIG_LED LED_VIRTUAL | ||
178 | |||
179 | /* Define this if you have adjustable CPU frequency */ | ||
180 | #define HAVE_ADJUSTABLE_CPU_FREQ | ||
181 | |||
182 | #define MI4_FORMAT | ||
183 | #define BOOTFILE_EXT "mi4" | ||
184 | #define BOOTFILE "rockbox." BOOTFILE_EXT | ||
185 | #define BOOTDIR "/.rockbox" | ||
186 | |||
187 | #define ICODE_ATTR_TREMOR_NOT_MDCT | ||
188 | |||
189 | #endif | ||
diff --git a/firmware/export/config.h b/firmware/export/config.h index 34d0bf27c6..1a6e5d6894 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h | |||
@@ -85,6 +85,7 @@ | |||
85 | #define CREATIVEZV_PAD 26 | 85 | #define CREATIVEZV_PAD 26 |
86 | #define PHILIPS_SA9200_PAD 27 | 86 | #define PHILIPS_SA9200_PAD 27 |
87 | #define SANSA_C100_PAD 28 | 87 | #define SANSA_C100_PAD 28 |
88 | #define PHILIPS_HDD1630_PAD 29 | ||
88 | 89 | ||
89 | /* CONFIG_REMOTE_KEYPAD */ | 90 | /* CONFIG_REMOTE_KEYPAD */ |
90 | #define H100_REMOTE 1 | 91 | #define H100_REMOTE 1 |
@@ -125,6 +126,7 @@ | |||
125 | #define LCD_COWOND2 24 /* as used by Cowon D2 - LTV250QV, TCC7801 driver */ | 126 | #define LCD_COWOND2 24 /* as used by Cowon D2 - LTV250QV, TCC7801 driver */ |
126 | #define LCD_SA9200 25 /* as used by the Philips SA9200 */ | 127 | #define LCD_SA9200 25 /* as used by the Philips SA9200 */ |
127 | #define LCD_S6B33B2 26 /* as used by the Sansa c100 */ | 128 | #define LCD_S6B33B2 26 /* as used by the Sansa c100 */ |
129 | #define LCD_HDD1630 27 /* as used by the Philips HDD1630 */ | ||
128 | 130 | ||
129 | /* LCD_PIXELFORMAT */ | 131 | /* LCD_PIXELFORMAT */ |
130 | #define HORIZONTAL_PACKING 1 | 132 | #define HORIZONTAL_PACKING 1 |
@@ -265,6 +267,8 @@ | |||
265 | #include "config-creativezv.h" | 267 | #include "config-creativezv.h" |
266 | #elif defined(PHILIPS_SA9200) | 268 | #elif defined(PHILIPS_SA9200) |
267 | #include "config-sa9200.h" | 269 | #include "config-sa9200.h" |
270 | #elif defined(PHILIPS_HDD1630) | ||
271 | #include "config-hdd1630.h" | ||
268 | #elif defined(SANSA_C100) | 272 | #elif defined(SANSA_C100) |
269 | #include "config-c100.h" | 273 | #include "config-c100.h" |
270 | #else | 274 | #else |
diff --git a/firmware/export/usb.h b/firmware/export/usb.h index 0590f702c5..05ea84148a 100644 --- a/firmware/export/usb.h +++ b/firmware/export/usb.h | |||
@@ -64,6 +64,9 @@ enum { | |||
64 | (CONFIG_KEYPAD == PHILIPS_SA9200_PAD) | 64 | (CONFIG_KEYPAD == PHILIPS_SA9200_PAD) |
65 | #define USBPOWER_BUTTON BUTTON_SELECT | 65 | #define USBPOWER_BUTTON BUTTON_SELECT |
66 | #define USBPOWER_BTN_IGNORE BUTTON_POWER | 66 | #define USBPOWER_BTN_IGNORE BUTTON_POWER |
67 | #elif CONFIG_KEYPAD == PHILIPS_HDD1630_PAD | ||
68 | #define USBPOWER_BUTTON BUTTON_PLAYLIST | ||
69 | #define USBPOWER_BTN_IGNORE BUTTON_POWER | ||
67 | #endif | 70 | #endif |
68 | #endif /* HAVE_USB_POWER */ | 71 | #endif /* HAVE_USB_POWER */ |
69 | 72 | ||
diff --git a/firmware/target/arm/philips/hdd1630/adc-target.h b/firmware/target/arm/philips/hdd1630/adc-target.h new file mode 100644 index 0000000000..95b911783b --- /dev/null +++ b/firmware/target/arm/philips/hdd1630/adc-target.h | |||
@@ -0,0 +1,39 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2006 by Barry Wardell | ||
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 | #ifndef _ADC_TARGET_H_ | ||
20 | #define _ADC_TARGET_H_ | ||
21 | |||
22 | #define ADC_ADDR (*(volatile unsigned long*)(0x7000ad00)) | ||
23 | #define ADC_STATUS (*(volatile unsigned long*)(0x7000ad04)) | ||
24 | #define ADC_DATA_1 (*(volatile unsigned long*)(0x7000ad20)) | ||
25 | #define ADC_DATA_2 (*(volatile unsigned long*)(0x7000ad24)) | ||
26 | #define ADC_INIT (*(volatile unsigned long*)(0x7000ad2c)) | ||
27 | |||
28 | #define NUM_ADC_CHANNELS 4 | ||
29 | |||
30 | #define ADC_BATTERY 0 | ||
31 | #define ADC_UNKNOWN_1 1 | ||
32 | #define ADC_UNKNOWN_2 2 | ||
33 | #define ADC_UNKNOWN_3 3 | ||
34 | #define ADC_UNREG_POWER ADC_BATTERY /* For compatibility */ | ||
35 | |||
36 | /* Force a scan now */ | ||
37 | unsigned short adc_scan(int channel); | ||
38 | |||
39 | #endif | ||
diff --git a/firmware/target/arm/philips/hdd1630/backlight-hdd1630.c b/firmware/target/arm/philips/hdd1630/backlight-hdd1630.c new file mode 100755 index 0000000000..22d31976aa --- /dev/null +++ b/firmware/target/arm/philips/hdd1630/backlight-hdd1630.c | |||
@@ -0,0 +1,49 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2008 by Mark Arigo | ||
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 | #include "config.h" | ||
20 | #include "backlight-target.h" | ||
21 | #include "system.h" | ||
22 | #include "lcd.h" | ||
23 | #include "backlight.h" | ||
24 | |||
25 | #ifdef HAVE_BACKLIGHT_BRIGHTNESS | ||
26 | static unsigned short backlight_brightness = DEFAULT_BRIGHTNESS_SETTING; | ||
27 | |||
28 | void _backlight_set_brightness(int brightness) | ||
29 | { | ||
30 | } | ||
31 | #endif | ||
32 | |||
33 | void _backlight_on(void) | ||
34 | { | ||
35 | } | ||
36 | |||
37 | void _backlight_off(void) | ||
38 | { | ||
39 | } | ||
40 | |||
41 | #ifdef HAVE_BUTTON_LIGHT | ||
42 | void _buttonlight_on(void) | ||
43 | { | ||
44 | } | ||
45 | |||
46 | void _buttonlight_off(void) | ||
47 | { | ||
48 | } | ||
49 | #endif | ||
diff --git a/firmware/target/arm/philips/hdd1630/backlight-target.h b/firmware/target/arm/philips/hdd1630/backlight-target.h new file mode 100755 index 0000000000..3cfd085761 --- /dev/null +++ b/firmware/target/arm/philips/hdd1630/backlight-target.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2008 by Mark Arigo | ||
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 | #ifndef BACKLIGHT_TARGET_H | ||
20 | #define BACKLIGHT_TARGET_H | ||
21 | |||
22 | #define _backlight_init() true | ||
23 | void _backlight_on(void); | ||
24 | void _backlight_off(void); | ||
25 | int __backlight_is_on(void); | ||
26 | |||
27 | #ifdef HAVE_BACKLIGHT_BRIGHTNESS | ||
28 | void _backlight_set_brightness(int brightness); | ||
29 | #endif | ||
30 | |||
31 | #ifdef HAVE_BUTTON_LIGHT | ||
32 | void _buttonlight_on(void); | ||
33 | void _buttonlight_off(void); | ||
34 | #endif | ||
35 | |||
36 | #endif | ||
diff --git a/firmware/target/arm/philips/hdd1630/button-hdd1630.c b/firmware/target/arm/philips/hdd1630/button-hdd1630.c new file mode 100755 index 0000000000..ac478065bc --- /dev/null +++ b/firmware/target/arm/philips/hdd1630/button-hdd1630.c | |||
@@ -0,0 +1,65 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2008 by Mark Arigo | ||
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 | #include "system.h" | ||
21 | #include "button.h" | ||
22 | #include "backlight.h" | ||
23 | |||
24 | void button_init_device(void) | ||
25 | { | ||
26 | /* TODO...for now, hardware initialisation is done by the bootloader */ | ||
27 | } | ||
28 | |||
29 | bool button_hold(void) | ||
30 | { | ||
31 | return !(GPIOJ_INPUT_VAL & 0x8); | ||
32 | } | ||
33 | |||
34 | /* | ||
35 | * Get button pressed from hardware | ||
36 | */ | ||
37 | int button_read_device(void) | ||
38 | { | ||
39 | int btn = BUTTON_NONE; | ||
40 | static bool hold_button = false; | ||
41 | bool hold_button_old; | ||
42 | |||
43 | /* Hold */ | ||
44 | hold_button_old = hold_button; | ||
45 | hold_button = button_hold(); | ||
46 | |||
47 | /* device buttons */ | ||
48 | if (!hold_button) | ||
49 | { | ||
50 | if (!(GPIOA_INPUT_VAL & 0x01)) btn |= BUTTON_MENU; | ||
51 | if (!(GPIOA_INPUT_VAL & 0x02)) btn |= BUTTON_VOL_UP; | ||
52 | if (!(GPIOA_INPUT_VAL & 0x04)) btn |= BUTTON_VOL_DOWN; | ||
53 | if (!(GPIOA_INPUT_VAL & 0x08)) btn |= BUTTON_VIEW; | ||
54 | |||
55 | if (!(GPIOD_INPUT_VAL & 0x20)) btn |= BUTTON_PLAYLIST; | ||
56 | if (!(GPIOD_INPUT_VAL & 0x40)) btn |= BUTTON_POWER; | ||
57 | } | ||
58 | |||
59 | return btn; | ||
60 | } | ||
61 | |||
62 | bool headphones_inserted(void) | ||
63 | { | ||
64 | return true; | ||
65 | } | ||
diff --git a/firmware/target/arm/philips/hdd1630/button-target.h b/firmware/target/arm/philips/hdd1630/button-target.h new file mode 100755 index 0000000000..92c584463f --- /dev/null +++ b/firmware/target/arm/philips/hdd1630/button-target.h | |||
@@ -0,0 +1,53 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2008 by Mark Arigo | ||
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 | #ifndef _BUTTON_TARGET_H_ | ||
21 | #define _BUTTON_TARGET_H_ | ||
22 | |||
23 | #include <stdbool.h> | ||
24 | #include "config.h" | ||
25 | |||
26 | #define HAS_BUTTON_HOLD | ||
27 | |||
28 | bool button_hold(void); | ||
29 | void button_init_device(void); | ||
30 | int button_read_device(void); | ||
31 | |||
32 | /* Main unit's buttons */ | ||
33 | #define BUTTON_POWER 0x00000001 | ||
34 | #define BUTTON_PLAYLIST 0x00000002 | ||
35 | #define BUTTON_MENU 0x00000004 | ||
36 | #define BUTTON_VIEW 0x00000008 | ||
37 | #define BUTTON_VOL_UP 0x00000010 | ||
38 | #define BUTTON_VOL_DOWN 0x00000020 | ||
39 | #define BUTTON_SELECT 0x00000040 | ||
40 | #define BUTTON_LEFT 0x00000080 | ||
41 | #define BUTTON_RIGHT 0x00000100 | ||
42 | #define BUTTON_UP 0x00000200 | ||
43 | #define BUTTON_DOWN 0x00000400 | ||
44 | |||
45 | #define BUTTON_MAIN 0x00000fff | ||
46 | |||
47 | /* No Remote control */ | ||
48 | #define BUTTON_REMOTE 0 | ||
49 | |||
50 | #define POWEROFF_BUTTON BUTTON_POWER | ||
51 | #define POWEROFF_COUNT 10 | ||
52 | |||
53 | #endif /* _BUTTON_TARGET_H_ */ | ||
diff --git a/firmware/target/arm/philips/hdd1630/lcd-hdd1630.c b/firmware/target/arm/philips/hdd1630/lcd-hdd1630.c new file mode 100755 index 0000000000..5e6d3ace42 --- /dev/null +++ b/firmware/target/arm/philips/hdd1630/lcd-hdd1630.c | |||
@@ -0,0 +1,266 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2008 by Mark Arigo | ||
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 | #include "config.h" | ||
20 | #include "cpu.h" | ||
21 | #include "lcd.h" | ||
22 | #include "kernel.h" | ||
23 | #include "system.h" | ||
24 | |||
25 | /* Display status */ | ||
26 | static unsigned lcd_yuv_options SHAREDBSS_ATTR = 0; | ||
27 | |||
28 | /* wait for LCD */ | ||
29 | static inline void lcd_wait_write(void) | ||
30 | { | ||
31 | int i = 0; | ||
32 | while (LCD2_PORT & LCD2_BUSY_MASK) | ||
33 | { | ||
34 | if (i < 2000) | ||
35 | i++; | ||
36 | else | ||
37 | LCD2_PORT &= ~LCD2_BUSY_MASK; | ||
38 | } | ||
39 | } | ||
40 | |||
41 | /* send LCD data */ | ||
42 | static void lcd_send_data(unsigned data) | ||
43 | { | ||
44 | lcd_wait_write(); | ||
45 | LCD2_PORT = LCD2_DATA_MASK | (data & 0xff); | ||
46 | } | ||
47 | |||
48 | /* send LCD command */ | ||
49 | static void lcd_send_cmd(unsigned cmd) | ||
50 | { | ||
51 | lcd_wait_write(); | ||
52 | LCD2_PORT = LCD2_CMD_MASK | (cmd & 0xff); | ||
53 | lcd_wait_write(); | ||
54 | } | ||
55 | |||
56 | static inline void lcd_send_pixel(unsigned pixel) | ||
57 | { | ||
58 | lcd_send_data(pixel >> 8); | ||
59 | lcd_send_data(pixel); | ||
60 | } | ||
61 | |||
62 | void lcd_init_device(void) | ||
63 | { | ||
64 | #if 0 | ||
65 | /* this sequence from the OF bootloader */ | ||
66 | |||
67 | DEV_EN2 |= 0x2000; | ||
68 | outl(inl(0x70000014) & ~0xf000000, 0x70000014); | ||
69 | outl(inl(0x70000014) | 0xa000000, 0x70000014); | ||
70 | DEV_INIT1 &= 0xc000; | ||
71 | DEV_INIT1 |= 0x8000; | ||
72 | MLCD_SCLK_DIV &= ~0x800; | ||
73 | CLCD_CLOCK_SRC |= 0xc0000000; | ||
74 | DEV_INIT2 &= ~0x400; | ||
75 | outl(inl(0x7000002c) | ((1<<4)<<24), 0x7000002c); | ||
76 | DEV_INIT2 &= ~((1<<4)<<24); | ||
77 | udelay(10000); | ||
78 | |||
79 | DEV_INIT2 |= ((1<<4)<<24); | ||
80 | outl(0x220, 0x70008a00); | ||
81 | outl(0x1f00, 0x70008a04); | ||
82 | LCD2_BLOCK_CTRL = 0x10008080; | ||
83 | LCD2_BLOCK_CONFIG = 0xF00000; | ||
84 | |||
85 | GPIOJ_ENABLE |= 0x4; | ||
86 | GPIOJ_OUTPUT_VAL |= 0x4; | ||
87 | GPIOJ_OUTPUT_EN |= 0x4; | ||
88 | |||
89 | lcd_send_cmd(0x1); | ||
90 | udelay(10000); | ||
91 | |||
92 | lcd_send_cmd(0x25); | ||
93 | lcd_send_data(0x3f); | ||
94 | |||
95 | lcd_send_cmd(0x11); | ||
96 | udelay(120000); | ||
97 | |||
98 | lcd_send_cmd(0x20); | ||
99 | lcd_send_cmd(0x38); | ||
100 | lcd_send_cmd(0x13); | ||
101 | |||
102 | lcd_send_cmd(0xb4); | ||
103 | lcd_send_data(0x2); | ||
104 | lcd_send_data(0x6); | ||
105 | lcd_send_data(0x8); | ||
106 | lcd_send_data(0xd); | ||
107 | |||
108 | lcd_send_cmd(0xb5); | ||
109 | lcd_send_data(0x2); | ||
110 | lcd_send_data(0x6); | ||
111 | lcd_send_data(0x8); | ||
112 | lcd_send_data(0xd); | ||
113 | |||
114 | lcd_send_cmd(0xb6); | ||
115 | lcd_send_data(0x19); | ||
116 | lcd_send_data(0x23); | ||
117 | lcd_send_data(0x2d); | ||
118 | |||
119 | lcd_send_cmd(0xb7); | ||
120 | lcd_send_data(0x5); | ||
121 | |||
122 | lcd_send_cmd(0xba); | ||
123 | lcd_send_data(0x7); | ||
124 | lcd_send_data(0x18); | ||
125 | |||
126 | lcd_send_cmd(0x36); | ||
127 | lcd_send_data(0); | ||
128 | |||
129 | lcd_send_cmd(0x3a); | ||
130 | lcd_send_data(0x5); | ||
131 | |||
132 | lcd_send_cmd(0x2d); | ||
133 | lcd_send_data(0x1); | ||
134 | lcd_send_data(0x2); | ||
135 | lcd_send_data(0x3); | ||
136 | lcd_send_data(0x4); | ||
137 | lcd_send_data(0x5); | ||
138 | lcd_send_data(0x6); | ||
139 | lcd_send_data(0x7); | ||
140 | lcd_send_data(0x8); | ||
141 | lcd_send_data(0x9); | ||
142 | lcd_send_data(0xa); | ||
143 | lcd_send_data(0xb); | ||
144 | lcd_send_data(0xc); | ||
145 | lcd_send_data(0xd); | ||
146 | lcd_send_data(0xe); | ||
147 | lcd_send_data(0xf); | ||
148 | lcd_send_data(0x10); | ||
149 | lcd_send_data(0x11); | ||
150 | lcd_send_data(0x12); | ||
151 | lcd_send_data(0x13); | ||
152 | lcd_send_data(0x14); | ||
153 | lcd_send_data(0x15); | ||
154 | lcd_send_data(0x16); | ||
155 | lcd_send_data(0x17); | ||
156 | lcd_send_data(0x18); | ||
157 | lcd_send_data(0x19); | ||
158 | lcd_send_data(0x1a); | ||
159 | lcd_send_data(0x1b); | ||
160 | lcd_send_data(0x1c); | ||
161 | lcd_send_data(0x1d); | ||
162 | lcd_send_data(0x1e); | ||
163 | lcd_send_data(0x1f); | ||
164 | lcd_send_data(0x20); | ||
165 | lcd_send_data(0x21); | ||
166 | lcd_send_data(0x22); | ||
167 | lcd_send_data(0x23); | ||
168 | lcd_send_data(0x24); | ||
169 | lcd_send_data(0x25); | ||
170 | lcd_send_data(0x26); | ||
171 | lcd_send_data(0x27); | ||
172 | lcd_send_data(0x28); | ||
173 | lcd_send_data(0x29); | ||
174 | lcd_send_data(0x2a); | ||
175 | lcd_send_data(0x2b); | ||
176 | lcd_send_data(0x2c); | ||
177 | lcd_send_data(0x2d); | ||
178 | lcd_send_data(0x2e); | ||
179 | lcd_send_data(0x2f); | ||
180 | lcd_send_data(0x30); | ||
181 | |||
182 | lcd_send_cmd(0x29); | ||
183 | #endif | ||
184 | } | ||
185 | |||
186 | /*** hardware configuration ***/ | ||
187 | int lcd_default_contrast(void) | ||
188 | { | ||
189 | return DEFAULT_CONTRAST_SETTING; | ||
190 | } | ||
191 | |||
192 | void lcd_set_contrast(int val) | ||
193 | { | ||
194 | (void)val; | ||
195 | } | ||
196 | |||
197 | void lcd_set_invert_display(bool yesno) | ||
198 | { | ||
199 | (void)yesno; | ||
200 | } | ||
201 | |||
202 | /* turn the display upside down (call lcd_update() afterwards) */ | ||
203 | void lcd_set_flip(bool yesno) | ||
204 | { | ||
205 | (void)yesno; | ||
206 | } | ||
207 | |||
208 | void lcd_yuv_set_options(unsigned options) | ||
209 | { | ||
210 | lcd_yuv_options = options; | ||
211 | } | ||
212 | |||
213 | /* Performance function to blit a YUV bitmap directly to the LCD */ | ||
214 | void lcd_blit_yuv(unsigned char * const src[3], | ||
215 | int src_x, int src_y, int stride, | ||
216 | int x, int y, int width, int height) | ||
217 | { | ||
218 | (void)src; | ||
219 | (void)src_x; | ||
220 | (void)src_y; | ||
221 | (void)stride; | ||
222 | (void)x; | ||
223 | (void)y; | ||
224 | (void)width; | ||
225 | (void)height; | ||
226 | } | ||
227 | |||
228 | /* Update the display. | ||
229 | This must be called after all other LCD functions that change the display. */ | ||
230 | void lcd_update(void) | ||
231 | { | ||
232 | lcd_update_rect(0, 0, LCD_WIDTH, LCD_HEIGHT); | ||
233 | } | ||
234 | |||
235 | /* Update a fraction of the display. */ | ||
236 | void lcd_update_rect(int x, int y, int width, int height) | ||
237 | { | ||
238 | const fb_data *addr; | ||
239 | |||
240 | if (x + width >= LCD_WIDTH) | ||
241 | width = LCD_WIDTH - x; | ||
242 | if (y + height >= LCD_HEIGHT) | ||
243 | height = LCD_HEIGHT - y; | ||
244 | |||
245 | if ((width <= 0) || (height <= 0)) | ||
246 | return; /* Nothing left to do. */ | ||
247 | |||
248 | addr = &lcd_framebuffer[y][x]; | ||
249 | |||
250 | lcd_send_cmd(0x2a); | ||
251 | lcd_send_data(x); | ||
252 | lcd_send_data(x + width - 1); | ||
253 | |||
254 | lcd_send_cmd(0x2b); | ||
255 | lcd_send_data(y); | ||
256 | lcd_send_data(y + height - 1); | ||
257 | |||
258 | lcd_send_cmd(0x2c); | ||
259 | do { | ||
260 | int w = width; | ||
261 | do { | ||
262 | lcd_send_pixel(*addr++); | ||
263 | } while (--w > 0); | ||
264 | addr += LCD_WIDTH - width; | ||
265 | } while (--height > 0); | ||
266 | } | ||
diff --git a/firmware/target/arm/philips/hdd1630/power-hdd1630.c b/firmware/target/arm/philips/hdd1630/power-hdd1630.c new file mode 100755 index 0000000000..6d3686ff4a --- /dev/null +++ b/firmware/target/arm/philips/hdd1630/power-hdd1630.c | |||
@@ -0,0 +1,58 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2008 by Mark Arigo | ||
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 | #include "config.h" | ||
21 | #include "cpu.h" | ||
22 | #include <stdbool.h> | ||
23 | #include "adc.h" | ||
24 | #include "kernel.h" | ||
25 | #include "system.h" | ||
26 | #include "power.h" | ||
27 | #include "logf.h" | ||
28 | #include "usb.h" | ||
29 | |||
30 | #if CONFIG_CHARGING == CHARGING_CONTROL | ||
31 | bool charger_enabled; | ||
32 | #endif | ||
33 | |||
34 | void power_init(void) | ||
35 | { | ||
36 | } | ||
37 | |||
38 | bool charger_inserted(void) | ||
39 | { | ||
40 | return false ; | ||
41 | } | ||
42 | |||
43 | void ide_power_enable(bool on) | ||
44 | { | ||
45 | (void)on; | ||
46 | /* We do nothing */ | ||
47 | } | ||
48 | |||
49 | |||
50 | bool ide_powered(void) | ||
51 | { | ||
52 | /* pretend we are always powered - we don't turn it off */ | ||
53 | return true; | ||
54 | } | ||
55 | |||
56 | void power_off(void) | ||
57 | { | ||
58 | } | ||
diff --git a/firmware/target/arm/philips/hdd1630/powermgmt-hdd1630.c b/firmware/target/arm/philips/hdd1630/powermgmt-hdd1630.c new file mode 100644 index 0000000000..71781182fa --- /dev/null +++ b/firmware/target/arm/philips/hdd1630/powermgmt-hdd1630.c | |||
@@ -0,0 +1,62 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2002 by Heikki Hannikainen, Uwe Freese | ||
11 | * Revisions copyright (C) 2005 by Gerald Van Baren | ||
12 | * | ||
13 | * All files in this archive are subject to the GNU General Public License. | ||
14 | * See the file COPYING in the source tree root for full license agreement. | ||
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 | #include "config.h" | ||
22 | #include "adc.h" | ||
23 | #include "powermgmt.h" | ||
24 | |||
25 | const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] = | ||
26 | { | ||
27 | 3450 | ||
28 | }; | ||
29 | |||
30 | const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = | ||
31 | { | ||
32 | 3400 | ||
33 | }; | ||
34 | |||
35 | /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ | ||
36 | const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = | ||
37 | { | ||
38 | { 3480, 3550, 3590, 3610, 3630, 3650, 3700, 3760, 3800, 3910, 3990 }, | ||
39 | }; | ||
40 | |||
41 | #if CONFIG_CHARGING | ||
42 | /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */ | ||
43 | const unsigned short percent_to_volt_charge[11] = | ||
44 | { | ||
45 | 3480, 3550, 3590, 3610, 3630, 3650, 3700, 3760, 3800, 3910, 3990 | ||
46 | }; | ||
47 | #endif /* CONFIG_CHARGING */ | ||
48 | |||
49 | #define BATTERY_SCALE_FACTOR 6003 | ||
50 | /* full-scale ADC readout (2^10) in millivolt */ | ||
51 | |||
52 | /* adc readout | ||
53 | * max with charger connected: 690 | ||
54 | * max fully charged: 682 | ||
55 | * min just before shutdown: 570 | ||
56 | */ | ||
57 | |||
58 | /* Returns battery voltage from ADC [millivolts] */ | ||
59 | unsigned int battery_adc_voltage(void) | ||
60 | { | ||
61 | return (adc_read(ADC_UNREG_POWER) * BATTERY_SCALE_FACTOR) >> 10; | ||
62 | } | ||
diff --git a/firmware/target/arm/usb-fw-pp502x.c b/firmware/target/arm/usb-fw-pp502x.c index eae78886f4..7ea5641007 100644 --- a/firmware/target/arm/usb-fw-pp502x.c +++ b/firmware/target/arm/usb-fw-pp502x.c | |||
@@ -126,6 +126,11 @@ static bool usb_pin_detect(void) | |||
126 | /* GPIO F bit 7 is usb detect */ | 126 | /* GPIO F bit 7 is usb detect */ |
127 | if (!(GPIOF_INPUT_VAL & 0x80)) | 127 | if (!(GPIOF_INPUT_VAL & 0x80)) |
128 | retval = true; | 128 | retval = true; |
129 | |||
130 | #elif defined(PHILIPS_HDD1630) | ||
131 | /* GPIO E bit 2 is usb detect */ | ||
132 | if (GPIOE_INPUT_VAL & 0x4) | ||
133 | retval = true; | ||
129 | #endif | 134 | #endif |
130 | 135 | ||
131 | return retval; | 136 | return retval; |
diff --git a/tools/configure b/tools/configure index b2c1b7ed18..3d9afdbfda 100755 --- a/tools/configure +++ b/tools/configure | |||
@@ -679,7 +679,7 @@ cat <<EOF | |||
679 | 679 | ||
680 | ==Creative== ==Philips== | 680 | ==Creative== ==Philips== |
681 | 90) Zen Vision:M 30GB 100) GoGear SA9200 | 681 | 90) Zen Vision:M 30GB 100) GoGear SA9200 |
682 | 91) Zen Vision:M 60GB | 682 | 91) Zen Vision:M 60GB 101) GoGear HDD1630 |
683 | 92) Zen Vision | 683 | 92) Zen Vision |
684 | 684 | ||
685 | EOF | 685 | EOF |
@@ -1696,6 +1696,30 @@ fi | |||
1696 | t_model="sa9200" | 1696 | t_model="sa9200" |
1697 | ;; | 1697 | ;; |
1698 | 1698 | ||
1699 | 101|hdd1630) | ||
1700 | target_id=43 | ||
1701 | modelname="hdd1630" | ||
1702 | target="-DPHILIPS_HDD1630" | ||
1703 | memory=32 # supposedly | ||
1704 | arm7tdmicc | ||
1705 | tool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS" | ||
1706 | bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" | ||
1707 | bmp2rb_native="$rootdir/tools/bmp2rb -f 4" | ||
1708 | output="rockbox.mi4" | ||
1709 | appextra="recorder:gui" | ||
1710 | plugins="" | ||
1711 | swcodec="yes" | ||
1712 | boottool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL" | ||
1713 | bootoutput="FWImage.ebn" | ||
1714 | # toolset is the tools within the tools directory that we build for | ||
1715 | # this particular target. | ||
1716 | toolset="$genericbitmaptools scramble" | ||
1717 | # architecture, manufacturer and model for the target-tree build | ||
1718 | t_cpu="arm" | ||
1719 | t_manufacturer="philips" | ||
1720 | t_model="hdd1630" | ||
1721 | ;; | ||
1722 | |||
1699 | *) | 1723 | *) |
1700 | echo "Please select a supported target platform!" | 1724 | echo "Please select a supported target platform!" |
1701 | exit | 1725 | exit |
diff --git a/tools/scramble.c b/tools/scramble.c index 5263809e41..8fd4ca98f4 100644 --- a/tools/scramble.c +++ b/tools/scramble.c | |||
@@ -120,7 +120,7 @@ void usage(void) | |||
120 | "\t (X values: h100, h120, h140, h300, ipco, nano, ipvd, mn2g\n" | 120 | "\t (X values: h100, h120, h140, h300, ipco, nano, ipvd, mn2g\n" |
121 | "\t ip3g, ip4g, mini, iax5, iam5, iam3, h10, h10_5gb,\n" | 121 | "\t ip3g, ip4g, mini, iax5, iam5, iam3, h10, h10_5gb,\n" |
122 | "\t tpj2, c200, e200, giga, gigs, m100, m500, d2,\n"); | 122 | "\t tpj2, c200, e200, giga, gigs, m100, m500, d2,\n"); |
123 | printf("\t 9200)\n"); | 123 | printf("\t 9200, 1630)\n"); |
124 | printf("\nNo option results in Archos standard player/recorder format.\n"); | 124 | printf("\nNo option results in Archos standard player/recorder format.\n"); |
125 | 125 | ||
126 | exit(1); | 126 | exit(1); |
@@ -274,6 +274,8 @@ int main (int argc, char** argv) | |||
274 | modelnum = 25; | 274 | modelnum = 25; |
275 | else if(!strcmp(&argv[1][5], "9200")) /* Philips SA9200 */ | 275 | else if(!strcmp(&argv[1][5], "9200")) /* Philips SA9200 */ |
276 | modelnum = 26; | 276 | modelnum = 26; |
277 | else if(!strcmp(&argv[1][5], "1630")) /* Philips HDD1630 */ | ||
278 | modelnum = 31; | ||
277 | else { | 279 | else { |
278 | fprintf(stderr, "unsupported model: %s\n", &argv[1][5]); | 280 | fprintf(stderr, "unsupported model: %s\n", &argv[1][5]); |
279 | return 2; | 281 | return 2; |