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 /apps | |
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 'apps')
-rw-r--r-- | apps/SOURCES | 3 | ||||
-rw-r--r-- | apps/audio_path.c | 2 | ||||
-rw-r--r-- | apps/debug_menu.c | 2 | ||||
-rw-r--r-- | apps/keymaps/keymap-ypr1.c | 171 | ||||
-rw-r--r-- | apps/lang/english.lang | 42 | ||||
-rw-r--r-- | apps/plugins/clix.c | 3 | ||||
-rw-r--r-- | apps/plugins/reversi/reversi-gui.h | 3 |
7 files changed, 202 insertions, 24 deletions
diff --git a/apps/SOURCES b/apps/SOURCES index 918ee1e4fc..f0c9462faf 100644 --- a/apps/SOURCES +++ b/apps/SOURCES | |||
@@ -302,5 +302,6 @@ keymaps/keymap-nwz.c | |||
302 | keymaps/keymap-ypz5.c | 302 | keymaps/keymap-ypz5.c |
303 | #elif CONFIG_KEYPAD == IHIFI_PAD | 303 | #elif CONFIG_KEYPAD == IHIFI_PAD |
304 | keymaps/keymap-ihifi.c | 304 | keymaps/keymap-ihifi.c |
305 | #elif CONFIG_KEYPAD == SAMSUNG_YPR1_PAD | ||
306 | keymaps/keymap-ypr1.c | ||
305 | #endif | 307 | #endif |
306 | |||
diff --git a/apps/audio_path.c b/apps/audio_path.c index 9ef748382f..c4a4d1b277 100644 --- a/apps/audio_path.c +++ b/apps/audio_path.c | |||
@@ -42,7 +42,7 @@ | |||
42 | #endif | 42 | #endif |
43 | #endif | 43 | #endif |
44 | 44 | ||
45 | #if ((CONFIG_PLATFORM & PLATFORM_NATIVE) || defined(SAMSUNG_YPR0)) | 45 | #if ((CONFIG_PLATFORM & PLATFORM_NATIVE) || defined(SAMSUNG_YPR0) || defined(SAMSUNG_YPR1)) |
46 | 46 | ||
47 | #ifdef AUDIO_CPU_BOOST | 47 | #ifdef AUDIO_CPU_BOOST |
48 | static void audio_cpu_boost(bool state) | 48 | static void audio_cpu_boost(bool state) |
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 7c399350b2..1007c97414 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c | |||
@@ -78,7 +78,7 @@ | |||
78 | #endif | 78 | #endif |
79 | #include "power.h" | 79 | #include "power.h" |
80 | 80 | ||
81 | #if defined(SAMSUNG_YPR0) && defined(CONFIG_TUNER) | 81 | #if (defined(SAMSUNG_YPR0) || defined(SAMSUNG_YPR1)) && defined(CONFIG_TUNER) |
82 | #include "tuner.h" | 82 | #include "tuner.h" |
83 | #include "radio.h" | 83 | #include "radio.h" |
84 | #endif | 84 | #endif |
diff --git a/apps/keymaps/keymap-ypr1.c b/apps/keymaps/keymap-ypr1.c new file mode 100644 index 0000000000..d47047912b --- /dev/null +++ b/apps/keymaps/keymap-ypr1.c | |||
@@ -0,0 +1,171 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id: keymap-sdl.c 28704 2010-11-29 11:28:53Z teru $ | ||
9 | * | ||
10 | * Copyright (C) 2013 Lorenzo Miori | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | |||
22 | /* Button Code Definitions for Samsung YP-R1 target */ | ||
23 | |||
24 | #include <stdio.h> | ||
25 | #include <string.h> | ||
26 | #include <stdlib.h> | ||
27 | |||
28 | #include "config.h" | ||
29 | #include "action.h" | ||
30 | #include "button.h" | ||
31 | #include "settings.h" | ||
32 | |||
33 | /* | ||
34 | * The format of the list is as follows | ||
35 | * { Action Code, Button code, Prereq button code } | ||
36 | * if there's no need to check the previous button's value, use BUTTON_NONE | ||
37 | * Insert LAST_ITEM_IN_LIST at the end of each mapping | ||
38 | */ | ||
39 | |||
40 | static const struct button_mapping button_context_standard[] = { | ||
41 | { ACTION_STD_CANCEL, BUTTON_POWER|BUTTON_REL, BUTTON_POWER }, | ||
42 | |||
43 | LAST_ITEM_IN_LIST | ||
44 | }; /* button_context_standard */ | ||
45 | |||
46 | static const struct button_mapping button_context_wps[] = { | ||
47 | |||
48 | { ACTION_WPS_VOLUP, BUTTON_VOL_UP, BUTTON_NONE }, | ||
49 | { ACTION_WPS_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
50 | { ACTION_WPS_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE }, | ||
51 | { ACTION_WPS_VOLDOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
52 | { ACTION_STD_KEYLOCK, BUTTON_POWER|BUTTON_REL, BUTTON_POWER }, | ||
53 | LAST_ITEM_IN_LIST | ||
54 | }; /* button_context_wps */ | ||
55 | |||
56 | static const struct button_mapping button_context_list[] = { | ||
57 | |||
58 | #ifdef HAVE_VOLUME_IN_LIST | ||
59 | { ACTION_LIST_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
60 | { ACTION_LIST_VOLUP, BUTTON_VOL_UP, BUTTON_NONE }, | ||
61 | { ACTION_LIST_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE }, | ||
62 | { ACTION_LIST_VOLDOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
63 | #endif | ||
64 | |||
65 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | ||
66 | }; /* button_context_list */ | ||
67 | |||
68 | static const struct button_mapping button_context_tree[] = { | ||
69 | { ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE }, | ||
70 | |||
71 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST) | ||
72 | }; /* button_context_tree */ | ||
73 | |||
74 | static const struct button_mapping button_context_settings[] = { | ||
75 | |||
76 | { ACTION_SETTINGS_INC, BUTTON_VOL_UP, BUTTON_NONE }, | ||
77 | { ACTION_SETTINGS_INCREPEAT, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
78 | { ACTION_SETTINGS_DEC, BUTTON_VOL_DOWN, BUTTON_NONE }, | ||
79 | { ACTION_SETTINGS_DECREPEAT, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
80 | { ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE }, | ||
81 | |||
82 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_TREE) | ||
83 | }; /* button_context_settings */ | ||
84 | |||
85 | static const struct button_mapping button_context_settings_right_is_inc[] = { | ||
86 | { ACTION_SETTINGS_INC, BUTTON_VOL_UP, BUTTON_NONE }, | ||
87 | { ACTION_SETTINGS_INCREPEAT,BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
88 | { ACTION_NONE, BUTTON_VOL_UP|BUTTON_REL, BUTTON_VOL_UP }, | ||
89 | |||
90 | { ACTION_SETTINGS_DEC, BUTTON_VOL_DOWN, BUTTON_NONE }, | ||
91 | { ACTION_SETTINGS_DECREPEAT,BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
92 | { ACTION_NONE, BUTTON_VOL_DOWN|BUTTON_REL, BUTTON_VOL_DOWN }, | ||
93 | |||
94 | { ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE }, | ||
95 | |||
96 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD), | ||
97 | }; /* button_context_settings_right_is_inc */ | ||
98 | |||
99 | static const struct button_mapping button_context_yesno[] = { | ||
100 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | ||
101 | }; /* button_context_settings_yesno */ | ||
102 | |||
103 | static const struct button_mapping button_context_colorchooser[] = { | ||
104 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS), | ||
105 | }; /* button_context_colorchooser */ | ||
106 | |||
107 | static const struct button_mapping button_context_eq[] = { | ||
108 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS), | ||
109 | }; /* button_context_eq */ | ||
110 | |||
111 | /** Bookmark Screen **/ | ||
112 | static const struct button_mapping button_context_bmark[] = { | ||
113 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST), | ||
114 | }; /* button_context_bmark */ | ||
115 | |||
116 | static const struct button_mapping button_context_quickscreen[] = { | ||
117 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | ||
118 | }; /* button_context_quickscreen */ | ||
119 | |||
120 | static const struct button_mapping button_context_pitchscreen[] = { | ||
121 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | ||
122 | }; /* button_context_pitchcreen */ | ||
123 | |||
124 | static const struct button_mapping button_context_keyboard[] = { | ||
125 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | ||
126 | }; /* button_context_keyboard */ | ||
127 | |||
128 | /** FM Radio Screen **/ | ||
129 | static const struct button_mapping button_context_radio[] = { | ||
130 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS) | ||
131 | }; /* button_context_radio */ | ||
132 | |||
133 | const struct button_mapping* target_get_context_mapping(int context) | ||
134 | { | ||
135 | switch (context) | ||
136 | { | ||
137 | case CONTEXT_STD: | ||
138 | return button_context_standard; | ||
139 | case CONTEXT_WPS: | ||
140 | return button_context_wps; | ||
141 | |||
142 | case CONTEXT_LIST: | ||
143 | return button_context_list; | ||
144 | case CONTEXT_MAINMENU: | ||
145 | case CONTEXT_CUSTOM|CONTEXT_TREE: | ||
146 | return button_context_tree; | ||
147 | |||
148 | case CONTEXT_SETTINGS: | ||
149 | case CONTEXT_SETTINGS_TIME: | ||
150 | return button_context_settings; | ||
151 | case CONTEXT_CUSTOM|CONTEXT_SETTINGS: | ||
152 | case CONTEXT_SETTINGS_COLOURCHOOSER: | ||
153 | case CONTEXT_SETTINGS_EQ: | ||
154 | case CONTEXT_SETTINGS_RECTRIGGER: | ||
155 | return button_context_settings_right_is_inc; | ||
156 | |||
157 | case CONTEXT_YESNOSCREEN: | ||
158 | return button_context_yesno; | ||
159 | case CONTEXT_FM: | ||
160 | return button_context_radio; | ||
161 | case CONTEXT_BOOKMARKSCREEN: | ||
162 | return button_context_bmark; | ||
163 | case CONTEXT_QUICKSCREEN: | ||
164 | return button_context_quickscreen; | ||
165 | case CONTEXT_PITCHSCREEN: | ||
166 | return button_context_pitchscreen; | ||
167 | case CONTEXT_KEYBOARD: | ||
168 | return button_context_keyboard; | ||
169 | } | ||
170 | return button_context_standard; | ||
171 | } | ||
diff --git a/apps/lang/english.lang b/apps/lang/english.lang index 42bc2f36c3..0778ab74d3 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang | |||
@@ -12368,15 +12368,15 @@ | |||
12368 | user: core | 12368 | user: core |
12369 | <source> | 12369 | <source> |
12370 | *: none | 12370 | *: none |
12371 | gigabeats: "Tone Controls" | 12371 | gigabeats,samsungypr1: "Tone Controls" |
12372 | </source> | 12372 | </source> |
12373 | <dest> | 12373 | <dest> |
12374 | *: none | 12374 | *: none |
12375 | gigabeats: "Tone Controls" | 12375 | gigabeats,samsungypr1: "Tone Controls" |
12376 | </dest> | 12376 | </dest> |
12377 | <voice> | 12377 | <voice> |
12378 | *: none | 12378 | *: none |
12379 | gigabeats: "Tone Controls" | 12379 | gigabeats,samsungypr1: "Tone Controls" |
12380 | </voice> | 12380 | </voice> |
12381 | </phrase> | 12381 | </phrase> |
12382 | <phrase> | 12382 | <phrase> |
@@ -12385,15 +12385,15 @@ | |||
12385 | user: core | 12385 | user: core |
12386 | <source> | 12386 | <source> |
12387 | *: none | 12387 | *: none |
12388 | gigabeats: "Advanced Tone Control Settings" | 12388 | gigabeats,samsungypr1: "Advanced Tone Control Settings" |
12389 | </source> | 12389 | </source> |
12390 | <dest> | 12390 | <dest> |
12391 | *: none | 12391 | *: none |
12392 | gigabeats: "Advanced Tone Control Settings" | 12392 | gigabeats,samsungypr1: "Advanced Tone Control Settings" |
12393 | </dest> | 12393 | </dest> |
12394 | <voice> | 12394 | <voice> |
12395 | *: none | 12395 | *: none |
12396 | gigabeats: "Advanced Tone Control Settings" | 12396 | gigabeats,samsungypr1: "Advanced Tone Control Settings" |
12397 | </voice> | 12397 | </voice> |
12398 | </phrase> | 12398 | </phrase> |
12399 | <phrase> | 12399 | <phrase> |
@@ -12402,15 +12402,15 @@ | |||
12402 | user: core | 12402 | user: core |
12403 | <source> | 12403 | <source> |
12404 | *: none | 12404 | *: none |
12405 | gigabeats: "Band %d Gain" | 12405 | gigabeats,samsungypr1: "Band %d Gain" |
12406 | </source> | 12406 | </source> |
12407 | <dest> | 12407 | <dest> |
12408 | *: none | 12408 | *: none |
12409 | gigabeats: "Band %d Gain" | 12409 | gigabeats,samsungypr1: "Band %d Gain" |
12410 | </dest> | 12410 | </dest> |
12411 | <voice> | 12411 | <voice> |
12412 | *: none | 12412 | *: none |
12413 | gigabeats: "Band Gain" | 12413 | gigabeats,samsungypr1: "Band Gain" |
12414 | </voice> | 12414 | </voice> |
12415 | </phrase> | 12415 | </phrase> |
12416 | <phrase> | 12416 | <phrase> |
@@ -12419,15 +12419,15 @@ | |||
12419 | user: core | 12419 | user: core |
12420 | <source> | 12420 | <source> |
12421 | *: none | 12421 | *: none |
12422 | gigabeats: "Band %d Frequency" | 12422 | gigabeats,samsungypr1: "Band %d Frequency" |
12423 | </source> | 12423 | </source> |
12424 | <dest> | 12424 | <dest> |
12425 | *: none | 12425 | *: none |
12426 | gigabeats: "Band %d Frequency" | 12426 | gigabeats,samsungypr1: "Band %d Frequency" |
12427 | </dest> | 12427 | </dest> |
12428 | <voice> | 12428 | <voice> |
12429 | *: none | 12429 | *: none |
12430 | gigabeats: "Band Frequency" | 12430 | gigabeats,samsungypr1: "Band Frequency" |
12431 | </voice> | 12431 | </voice> |
12432 | </phrase> | 12432 | </phrase> |
12433 | <phrase> | 12433 | <phrase> |
@@ -12436,15 +12436,15 @@ | |||
12436 | user: core | 12436 | user: core |
12437 | <source> | 12437 | <source> |
12438 | *: none | 12438 | *: none |
12439 | gigabeats: "Band %d Width" | 12439 | gigabeats,samsungypr1: "Band %d Width" |
12440 | </source> | 12440 | </source> |
12441 | <dest> | 12441 | <dest> |
12442 | *: none | 12442 | *: none |
12443 | gigabeats: "Band %d Width" | 12443 | gigabeats,samsungypr1: "Band %d Width" |
12444 | </dest> | 12444 | </dest> |
12445 | <voice> | 12445 | <voice> |
12446 | *: none | 12446 | *: none |
12447 | gigabeats: "Band Width" | 12447 | gigabeats,samsungypr1: "Band Width" |
12448 | </voice> | 12448 | </voice> |
12449 | </phrase> | 12449 | </phrase> |
12450 | <phrase> | 12450 | <phrase> |
@@ -12453,15 +12453,15 @@ | |||
12453 | user: core | 12453 | user: core |
12454 | <source> | 12454 | <source> |
12455 | *: none | 12455 | *: none |
12456 | gigabeats: "Narrow" | 12456 | gigabeats,samsungypr1: "Narrow" |
12457 | </source> | 12457 | </source> |
12458 | <dest> | 12458 | <dest> |
12459 | *: none | 12459 | *: none |
12460 | gigabeats: "Narrow" | 12460 | gigabeats,samsungypr1: "Narrow" |
12461 | </dest> | 12461 | </dest> |
12462 | <voice> | 12462 | <voice> |
12463 | *: none | 12463 | *: none |
12464 | gigabeats: "Narrow" | 12464 | gigabeats,samsungypr1: "Narrow" |
12465 | </voice> | 12465 | </voice> |
12466 | </phrase> | 12466 | </phrase> |
12467 | <phrase> | 12467 | <phrase> |
@@ -12470,15 +12470,15 @@ | |||
12470 | user: core | 12470 | user: core |
12471 | <source> | 12471 | <source> |
12472 | *: none | 12472 | *: none |
12473 | gigabeats: "Wide" | 12473 | gigabeats,samsungypr1: "Wide" |
12474 | </source> | 12474 | </source> |
12475 | <dest> | 12475 | <dest> |
12476 | *: none | 12476 | *: none |
12477 | gigabeats: "Wide" | 12477 | gigabeats,samsungypr1: "Wide" |
12478 | </dest> | 12478 | </dest> |
12479 | <voice> | 12479 | <voice> |
12480 | *: none | 12480 | *: none |
12481 | gigabeats: "Wide" | 12481 | gigabeats,samsungypr1: "Wide" |
12482 | </voice> | 12482 | </voice> |
12483 | </phrase> | 12483 | </phrase> |
12484 | <phrase> | 12484 | <phrase> |
diff --git a/apps/plugins/clix.c b/apps/plugins/clix.c index 14b0b09cda..59cf162b0a 100644 --- a/apps/plugins/clix.c +++ b/apps/plugins/clix.c | |||
@@ -221,6 +221,9 @@ | |||
221 | #define CLIX_BUTTON_RIGHT BUTTON_RIGHT | 221 | #define CLIX_BUTTON_RIGHT BUTTON_RIGHT |
222 | #define CLIX_BUTTON_CLICK BUTTON_SELECT | 222 | #define CLIX_BUTTON_CLICK BUTTON_SELECT |
223 | 223 | ||
224 | #elif (CONFIG_KEYPAD == SAMSUNG_YPR1_PAD) | ||
225 | #define CLIX_BUTTON_QUIT BUTTON_POWER | ||
226 | |||
224 | #else | 227 | #else |
225 | #error "no keymap" | 228 | #error "no keymap" |
226 | #endif | 229 | #endif |
diff --git a/apps/plugins/reversi/reversi-gui.h b/apps/plugins/reversi/reversi-gui.h index 47b7ff204d..124cf471bb 100644 --- a/apps/plugins/reversi/reversi-gui.h +++ b/apps/plugins/reversi/reversi-gui.h | |||
@@ -283,6 +283,9 @@ | |||
283 | #define REVERSI_BUTTON_MAKE_MOVE BUTTON_SELECT | 283 | #define REVERSI_BUTTON_MAKE_MOVE BUTTON_SELECT |
284 | #define REVERSI_BUTTON_MENU BUTTON_POWER | 284 | #define REVERSI_BUTTON_MENU BUTTON_POWER |
285 | 285 | ||
286 | #elif CONFIG_KEYPAD == SAMSUNG_YPR1_PAD | ||
287 | #define REVERSI_BUTTON_QUIT BUTTON_POWER | ||
288 | |||
286 | #else | 289 | #else |
287 | #error No keymap defined! | 290 | #error No keymap defined! |
288 | #endif | 291 | #endif |