summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/debug_menu.c54
-rw-r--r--apps/keymaps/keymap-creativezvm.c114
2 files changed, 145 insertions, 23 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 59344f6f71..55c371dc25 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -2396,6 +2396,54 @@ static bool usb_reconnect(void)
2396} 2396}
2397#endif 2397#endif
2398 2398
2399#if CONFIG_USBOTG == USBOTG_ISP1583
2400extern int dbg_usb_num_items(void);
2401extern char* dbg_usb_item(int selected_item, void *data, char *buffer, size_t buffer_len);
2402
2403static int isp1583_action_callback(int action, struct gui_synclist *lists)
2404{
2405 (void)lists;
2406 if (action == ACTION_NONE)
2407 action = ACTION_REDRAW;
2408 return action;
2409}
2410
2411static bool dbg_isp1583(void)
2412{
2413 struct simplelist_info isp1583;
2414 simplelist_info_init(&isp1583, "ISP1583", dbg_usb_num_items(), NULL);
2415 isp1583.timeout = HZ/100;
2416 isp1583.hide_selection = true;
2417 isp1583.get_name = dbg_usb_item;
2418 isp1583.action_callback = isp1583_action_callback;
2419 return simplelist_show_list(&isp1583);
2420}
2421#endif
2422
2423#ifdef CREATIVE_ZVM
2424extern int pic_dbg_num_items(void);
2425extern char* pic_dbg_item(int selected_item, void *data, char *buffer, size_t buffer_len);
2426
2427static int pic_action_callback(int action, struct gui_synclist *lists)
2428{
2429 (void)lists;
2430 if (action == ACTION_NONE)
2431 action = ACTION_REDRAW;
2432 return action;
2433}
2434
2435static bool dbg_pic(void)
2436{
2437 struct simplelist_info pic;
2438 simplelist_info_init(&pic, "PIC", pic_dbg_num_items(), NULL);
2439 pic.timeout = HZ/100;
2440 pic.hide_selection = true;
2441 pic.get_name = pic_dbg_item;
2442 pic.action_callback = pic_action_callback;
2443 return simplelist_show_list(&pic);
2444}
2445#endif
2446
2399 2447
2400/****** The menu *********/ 2448/****** The menu *********/
2401struct the_menu_item { 2449struct the_menu_item {
@@ -2472,6 +2520,12 @@ static const struct the_menu_item menuitems[] = {
2472#if defined(HAVE_EEPROM) && !defined(HAVE_EEPROM_SETTINGS) 2520#if defined(HAVE_EEPROM) && !defined(HAVE_EEPROM_SETTINGS)
2473 { "Write back EEPROM", dbg_write_eeprom }, 2521 { "Write back EEPROM", dbg_write_eeprom },
2474#endif 2522#endif
2523#if CONFIG_USBOTG == USBOTG_ISP1583
2524 { "View ISP1583 info", dbg_isp1583 },
2525#endif
2526#ifdef CREATIVE_ZVM
2527 { "View PIC info", dbg_pic },
2528#endif
2475#ifdef ROCKBOX_HAS_LOGF 2529#ifdef ROCKBOX_HAS_LOGF
2476 {"logf", logfdisplay }, 2530 {"logf", logfdisplay },
2477 {"logfdump", logfdump }, 2531 {"logfdump", logfdump },
diff --git a/apps/keymaps/keymap-creativezvm.c b/apps/keymaps/keymap-creativezvm.c
index 221830e15e..4944e0baef 100644
--- a/apps/keymaps/keymap-creativezvm.c
+++ b/apps/keymaps/keymap-creativezvm.c
@@ -43,31 +43,57 @@ CONTEXT_CUSTOM|CONTEXT_SETTINGS = the direction keys for the eq/col picker scree
43 43
44*/ 44*/
45 45
46#define BUTTON_VOL_UP BUTTON_NONE
47#define BUTTON_VOL_DOWN BUTTON_NONE
48
49static const struct button_mapping button_context_standard[] = { 46static const struct button_mapping button_context_standard[] = {
50 { ACTION_STD_PREV, BUTTON_UP|BUTTON_REL, BUTTON_NONE }, 47 { ACTION_STD_PREV, BUTTON_UP|BUTTON_REL, BUTTON_NONE },
51 { ACTION_STD_PREVREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, 48 { ACTION_STD_PREVREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
52 { ACTION_STD_NEXT, BUTTON_DOWN|BUTTON_REL, BUTTON_NONE }, 49 { ACTION_STD_NEXT, BUTTON_DOWN|BUTTON_REL, BUTTON_NONE },
53 { ACTION_STD_NEXTREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, 50 { ACTION_STD_NEXTREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
54 51
55 { ACTION_STD_CANCEL, BUTTON_LEFT, BUTTON_NONE }, 52 { ACTION_STD_CANCEL, BUTTON_LEFT, BUTTON_NONE },
56 { ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE }, 53 { ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE },
57 54
58 { ACTION_STD_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT,BUTTON_SELECT }, 55 { ACTION_STD_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT },
59 56
60 { ACTION_STD_QUICKSCREEN, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU }, 57 { ACTION_STD_QUICKSCREEN, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
61 { ACTION_STD_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU }, 58 { ACTION_STD_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
62 59
63 { ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT }, 60 { ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT },
64 { ACTION_STD_OK, BUTTON_RIGHT, BUTTON_NONE }, 61 { ACTION_STD_OK, BUTTON_RIGHT, BUTTON_NONE },
65 62
66 LAST_ITEM_IN_LIST 63 LAST_ITEM_IN_LIST
67}; /* button_context_standard */ 64}; /* button_context_standard */
68 65
69 66
70static const struct button_mapping button_context_wps[] = { 67static const struct button_mapping button_context_wps[] = {
68 { ACTION_WPS_PLAY, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
69 { ACTION_WPS_STOP, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE },
70
71 { ACTION_WPS_SKIPNEXT, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT },
72 { ACTION_WPS_SKIPPREV, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT },
73
74 { ACTION_WPS_SEEKBACK, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
75 { ACTION_WPS_SEEKFWD, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
76 { ACTION_WPS_STOPSEEK, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT|BUTTON_REPEAT },
77 { ACTION_WPS_STOPSEEK, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT|BUTTON_REPEAT },
78
79 //{ ACTION_WPS_ABSETB_NEXTDIR,BUTTON_RIGHT, BUTTON_CUSTOM },
80 //{ ACTION_WPS_ABSETA_PREVDIR,BUTTON_LEFT, BUTTON_CUSTOM },
81 //{ ACTION_WPS_ABRESET, BUTTON_CUSTOM|BUTTON_REPEAT, BUTTON_NONE },
82
83 { ACTION_WPS_VOLDOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
84 { ACTION_WPS_VOLDOWN, BUTTON_DOWN, BUTTON_NONE },
85 { ACTION_WPS_VOLUP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
86 { ACTION_WPS_VOLUP, BUTTON_UP, BUTTON_NONE },
87
88 { ACTION_WPS_PITCHSCREEN, BUTTON_BACK|BUTTON_REPEAT, BUTTON_BACK },
89
90 { ACTION_WPS_QUICKSCREEN, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
91 { ACTION_WPS_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
92 { ACTION_WPS_MENU, BUTTON_POWER, BUTTON_NONE },
93 { ACTION_WPS_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT },
94
95 { ACTION_WPS_ID3SCREEN, BUTTON_BACK|BUTTON_REL, BUTTON_NONE },
96 { ACTION_WPS_BROWSE, BUTTON_SELECT|BUTTON_REL, BUTTON_BACK },
71 LAST_ITEM_IN_LIST 97 LAST_ITEM_IN_LIST
72}; /* button_context_wps */ 98}; /* button_context_wps */
73 99
@@ -76,14 +102,23 @@ static const struct button_mapping button_context_list[] = {
76}; /* button_context_list */ 102}; /* button_context_list */
77 103
78static const struct button_mapping button_context_tree[] = { 104static const struct button_mapping button_context_tree[] = {
105 { ACTION_TREE_WPS, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
106 { ACTION_TREE_STOP, BUTTON_POWER, BUTTON_NONE },
107 { ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
108 { ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE },
79 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST) 109 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST)
80}; /* button_context_tree */ 110}; /* button_context_tree */
81 111
82static const struct button_mapping button_context_listtree_scroll_with_combo[] = {
83 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE),
84};
85
86static const struct button_mapping button_context_listtree_scroll_without_combo[] = { 112static const struct button_mapping button_context_listtree_scroll_without_combo[] = {
113 { ACTION_NONE, BUTTON_LEFT, BUTTON_NONE },
114 { ACTION_STD_CANCEL, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT },
115 { ACTION_TREE_ROOT_INIT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_LEFT },
116 { ACTION_TREE_PGLEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
117 { ACTION_TREE_PGLEFT, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT|BUTTON_REPEAT },
118 { ACTION_NONE, BUTTON_RIGHT, BUTTON_NONE },
119 { ACTION_STD_OK, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT },
120 { ACTION_TREE_PGRIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
121 { ACTION_TREE_PGRIGHT, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT|BUTTON_REPEAT },
87 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE), 122 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE),
88}; 123};
89 124
@@ -96,30 +131,41 @@ static const struct button_mapping button_context_settings[] = {
96 { ACTION_STD_PREVREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_LEFT }, 131 { ACTION_STD_PREVREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_LEFT },
97 { ACTION_STD_NEXT, BUTTON_RIGHT, BUTTON_NONE }, 132 { ACTION_STD_NEXT, BUTTON_RIGHT, BUTTON_NONE },
98 { ACTION_STD_NEXTREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_RIGHT }, 133 { ACTION_STD_NEXTREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_RIGHT },
99 { ACTION_SETTINGS_RESET, BUTTON_PLAY, BUTTON_NONE }, 134 { ACTION_SETTINGS_RESET, BUTTON_PLAY, BUTTON_NONE },
100
101 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) 135 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
102}; /* button_context_settings */ 136}; /* button_context_settings */
103 137
104static const struct button_mapping button_context_settings_right_is_inc[] = { 138static const struct button_mapping button_context_settings_right_is_inc[] = {
105 139 { ACTION_SETTINGS_INC, BUTTON_RIGHT, BUTTON_NONE },
140 { ACTION_SETTINGS_INCREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
141 { ACTION_SETTINGS_DEC, BUTTON_LEFT, BUTTON_NONE },
142 { ACTION_SETTINGS_DECREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
143 { ACTION_STD_PREV, BUTTON_UP, BUTTON_NONE },
144 { ACTION_STD_PREVREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
145 { ACTION_STD_NEXT, BUTTON_DOWN, BUTTON_NONE },
146 { ACTION_STD_NEXTREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
147 { ACTION_SETTINGS_RESET, BUTTON_BACK, BUTTON_NONE },
106 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) 148 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
107}; /* button_context_settingsgraphical */ 149}; /* button_context_settingsgraphical */
108 150
109static const struct button_mapping button_context_yesno[] = { 151static const struct button_mapping button_context_yesno[] = {
152 { ACTION_YESNO_ACCEPT, BUTTON_SELECT, BUTTON_NONE },
110 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) 153 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
111}; /* button_context_settings_yesno */ 154}; /* button_context_settings_yesno */
112 155
113static const struct button_mapping button_context_colorchooser[] = { 156static const struct button_mapping button_context_colorchooser[] = {
157 { ACTION_STD_OK, BUTTON_BACK|BUTTON_REL, BUTTON_NONE },
114 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS), 158 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS),
115}; /* button_context_colorchooser */ 159}; /* button_context_colorchooser */
116 160
117static const struct button_mapping button_context_eq[] = { 161static const struct button_mapping button_context_eq[] = {
162 { ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE },
118 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS), 163 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS),
119}; /* button_context_eq */ 164}; /* button_context_eq */
120 165
121/** Bookmark Screen **/ 166/** Bookmark Screen **/
122static const struct button_mapping button_context_bmark[] = { 167static const struct button_mapping button_context_bmark[] = {
168 { ACTION_BMS_DELETE, BUTTON_BACK, BUTTON_NONE },
123 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST), 169 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
124}; /* button_context_bmark */ 170}; /* button_context_bmark */
125 171
@@ -128,7 +174,15 @@ static const struct button_mapping button_context_time[] = {
128}; /* button_context_time */ 174}; /* button_context_time */
129 175
130static const struct button_mapping button_context_quickscreen[] = { 176static const struct button_mapping button_context_quickscreen[] = {
131 177 { ACTION_QS_DOWNINV, BUTTON_UP, BUTTON_NONE },
178 { ACTION_QS_DOWNINV, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
179 { ACTION_QS_DOWN, BUTTON_DOWN, BUTTON_NONE },
180 { ACTION_QS_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
181 { ACTION_QS_LEFT, BUTTON_LEFT, BUTTON_NONE },
182 { ACTION_QS_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
183 { ACTION_QS_RIGHT, BUTTON_RIGHT, BUTTON_NONE },
184 { ACTION_QS_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
185 { ACTION_STD_CANCEL, BUTTON_MENU, BUTTON_NONE },
132 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) 186 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
133}; /* button_context_quickscreen */ 187}; /* button_context_quickscreen */
134 188
@@ -138,7 +192,24 @@ static const struct button_mapping button_context_pitchscreen[] = {
138}; /* button_context_pitchcreen */ 192}; /* button_context_pitchcreen */
139 193
140static const struct button_mapping button_context_keyboard[] = { 194static const struct button_mapping button_context_keyboard[] = {
141 195 { ACTION_KBD_LEFT, BUTTON_LEFT, BUTTON_NONE },
196 { ACTION_KBD_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
197 { ACTION_KBD_RIGHT, BUTTON_RIGHT, BUTTON_NONE },
198 { ACTION_KBD_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
199 { ACTION_KBD_CURSOR_LEFT, BUTTON_CUSTOM, BUTTON_NONE },
200 { ACTION_KBD_CURSOR_LEFT, BUTTON_CUSTOM|BUTTON_REPEAT, BUTTON_NONE },
201 { ACTION_KBD_CURSOR_RIGHT, BUTTON_PLAY, BUTTON_NONE },
202 { ACTION_KBD_CURSOR_RIGHT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE },
203 { ACTION_KBD_SELECT, BUTTON_SELECT, BUTTON_NONE },
204 { ACTION_KBD_PAGE_FLIP, BUTTON_BACK|BUTTON_MENU, BUTTON_NONE },
205 { ACTION_KBD_DONE, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
206 { ACTION_KBD_ABORT, BUTTON_BACK|BUTTON_REL, BUTTON_BACK },
207 { ACTION_KBD_BACKSPACE, BUTTON_MENU, BUTTON_NONE },
208 { ACTION_KBD_BACKSPACE, BUTTON_MENU|BUTTON_REPEAT, BUTTON_NONE },
209 { ACTION_KBD_UP, BUTTON_UP, BUTTON_NONE },
210 { ACTION_KBD_UP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
211 { ACTION_KBD_DOWN, BUTTON_DOWN, BUTTON_NONE },
212 { ACTION_KBD_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
142 LAST_ITEM_IN_LIST 213 LAST_ITEM_IN_LIST
143}; /* button_context_keyboard */ 214}; /* button_context_keyboard */
144 215
@@ -154,10 +225,7 @@ const struct button_mapping* get_context_mapping(int context)
154 return button_context_list; 225 return button_context_list;
155 case CONTEXT_MAINMENU: 226 case CONTEXT_MAINMENU:
156 case CONTEXT_TREE: 227 case CONTEXT_TREE:
157 if (global_settings.hold_lr_for_scroll_in_list) 228 return button_context_listtree_scroll_without_combo;
158 return button_context_listtree_scroll_without_combo;
159 else
160 return button_context_listtree_scroll_with_combo;
161 case CONTEXT_CUSTOM|CONTEXT_TREE: 229 case CONTEXT_CUSTOM|CONTEXT_TREE:
162 return button_context_tree; 230 return button_context_tree;
163 case CONTEXT_SETTINGS: 231 case CONTEXT_SETTINGS: