diff options
-rw-r--r-- | apps/debug_menu.c | 54 | ||||
-rw-r--r-- | apps/keymaps/keymap-creativezvm.c | 114 | ||||
-rw-r--r-- | firmware/drivers/isp1583.c | 54 | ||||
-rw-r--r-- | firmware/target/arm/tms320dm320/creative-zvm/pic-creativezvm.c | 81 | ||||
-rw-r--r-- | firmware/target/arm/tms320dm320/creative-zvm/usb-target.h | 1 | ||||
-rwxr-xr-x | firmware/target/arm/tms320dm320/debug-dm320.c | 18 |
6 files changed, 261 insertions, 61 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 | ||
2400 | extern int dbg_usb_num_items(void); | ||
2401 | extern char* dbg_usb_item(int selected_item, void *data, char *buffer, size_t buffer_len); | ||
2402 | |||
2403 | static 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 | |||
2411 | static 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 | ||
2424 | extern int pic_dbg_num_items(void); | ||
2425 | extern char* pic_dbg_item(int selected_item, void *data, char *buffer, size_t buffer_len); | ||
2426 | |||
2427 | static 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 | |||
2435 | static 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 *********/ |
2401 | struct the_menu_item { | 2449 | struct 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 | |||
49 | static const struct button_mapping button_context_standard[] = { | 46 | static 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 | ||
70 | static const struct button_mapping button_context_wps[] = { | 67 | static 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 | ||
78 | static const struct button_mapping button_context_tree[] = { | 104 | static 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 | ||
82 | static const struct button_mapping button_context_listtree_scroll_with_combo[] = { | ||
83 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE), | ||
84 | }; | ||
85 | |||
86 | static const struct button_mapping button_context_listtree_scroll_without_combo[] = { | 112 | static 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 | ||
104 | static const struct button_mapping button_context_settings_right_is_inc[] = { | 138 | static 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 | ||
109 | static const struct button_mapping button_context_yesno[] = { | 151 | static 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 | ||
113 | static const struct button_mapping button_context_colorchooser[] = { | 156 | static 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 | ||
117 | static const struct button_mapping button_context_eq[] = { | 161 | static 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 **/ |
122 | static const struct button_mapping button_context_bmark[] = { | 167 | static 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 | ||
130 | static const struct button_mapping button_context_quickscreen[] = { | 176 | static 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 | ||
140 | static const struct button_mapping button_context_keyboard[] = { | 194 | static 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: |
diff --git a/firmware/drivers/isp1583.c b/firmware/drivers/isp1583.c index 351618d566..7e78f87468 100644 --- a/firmware/drivers/isp1583.c +++ b/firmware/drivers/isp1583.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include "isp1583.h" | 26 | #include "isp1583.h" |
27 | #include "thread.h" | 27 | #include "thread.h" |
28 | #include "logf.h" | 28 | #include "logf.h" |
29 | #include <stdio.h> | ||
29 | 30 | ||
30 | #define DIR_RX 0 | 31 | #define DIR_RX 0 |
31 | #define DIR_TX 1 | 32 | #define DIR_TX 1 |
@@ -149,7 +150,7 @@ static void usb_enable_endpoint(int idx) | |||
149 | 150 | ||
150 | endpoints[epidx_n(idx)].enabled[epidx_dir(idx)] = 1; | 151 | endpoints[epidx_n(idx)].enabled[epidx_dir(idx)] = 1; |
151 | } | 152 | } |
152 | 153 | /* | |
153 | static void usb_disable_endpoint(int idx, bool set_struct) | 154 | static void usb_disable_endpoint(int idx, bool set_struct) |
154 | { | 155 | { |
155 | usb_select_endpoint(idx); | 156 | usb_select_endpoint(idx); |
@@ -159,7 +160,7 @@ static void usb_disable_endpoint(int idx, bool set_struct) | |||
159 | if(set_struct) | 160 | if(set_struct) |
160 | endpoints[epidx_n(idx)].enabled[epidx_dir(idx)] = 0; | 161 | endpoints[epidx_n(idx)].enabled[epidx_dir(idx)] = 0; |
161 | } | 162 | } |
162 | 163 | */ | |
163 | static int usb_get_packet(unsigned char *buf, int max_len) | 164 | static int usb_get_packet(unsigned char *buf, int max_len) |
164 | { | 165 | { |
165 | int len, i; | 166 | int len, i; |
@@ -389,7 +390,7 @@ void usb_helper(void) | |||
389 | if(ISP1583_GEN_INT_READ & ISP1583_INIT_INTEN_READ) | 390 | if(ISP1583_GEN_INT_READ & ISP1583_INIT_INTEN_READ) |
390 | { | 391 | { |
391 | #ifdef DEBUG | 392 | #ifdef DEBUG |
392 | //logf("Helper detected interrupt... [%d]", current_tick); | 393 | logf("Helper detected interrupt... [%d]", current_tick); |
393 | #endif | 394 | #endif |
394 | usb_drv_int(); | 395 | usb_drv_int(); |
395 | } | 396 | } |
@@ -712,6 +713,53 @@ void usb_drv_set_address(int address) | |||
712 | usb_status_ack(0, DIR_TX); | 713 | usb_status_ack(0, DIR_TX); |
713 | } | 714 | } |
714 | 715 | ||
716 | int dbg_usb_num_items(void) | ||
717 | { | ||
718 | return 2+NUM_ENDPOINTS*2; | ||
719 | } | ||
720 | |||
721 | char* dbg_usb_item(int selected_item, void *data, char *buffer, size_t buffer_len) | ||
722 | { | ||
723 | if(selected_item < 2) | ||
724 | { | ||
725 | switch(selected_item) | ||
726 | { | ||
727 | case 0: | ||
728 | snprintf(buffer, buffer_len, "USB connected: %s", (usb_drv_connected() ? "Yes" : "No")); | ||
729 | return buffer; | ||
730 | case 1: | ||
731 | snprintf(buffer, buffer_len, "HS mode: %s", (high_speed_mode ? "Yes" : "No")); | ||
732 | return buffer; | ||
733 | } | ||
734 | } | ||
735 | else | ||
736 | { | ||
737 | int n = ep_index((selected_item - 2) / 2, (selected_item - 2) % 2); | ||
738 | if(endpoints[n].enabled == false) | ||
739 | snprintf(buffer, buffer_len, "EP%d[%s]: DISABLED", epidx_n(n), (epidx_dir(n) ? "TX" : "RX")); | ||
740 | else | ||
741 | { | ||
742 | if(epidx_dir(n)) | ||
743 | { | ||
744 | if(endpoints[n].out_in_progress) | ||
745 | snprintf(buffer, buffer_len, "EP%d[TX]: TRANSFERRING DATA -> %d bytes/%d bytes", epidx_n(n), (endpoints[n].out_len - endpoints[n].out_ptr), endpoints[n].out_len); | ||
746 | else | ||
747 | snprintf(buffer, buffer_len, "EP%d[TX]: STANDBY", epidx_n(n)); | ||
748 | } | ||
749 | else | ||
750 | { | ||
751 | if(endpoints[n].in_buf && !endpoints[n].in_ack) | ||
752 | snprintf(buffer, buffer_len, "EP%d[RX]: RECEIVING DATA -> %d bytes/%d bytes", epidx_n(n), endpoints[n].in_ptr, endpoints[n].in_max_len); | ||
753 | else | ||
754 | snprintf(buffer, buffer_len, "EP%d[RX]: STANDBY", epidx_n(n)); | ||
755 | } | ||
756 | } | ||
757 | return buffer; | ||
758 | } | ||
759 | return NULL; | ||
760 | (void)data; | ||
761 | } | ||
762 | |||
715 | void usb_drv_set_test_mode(int mode) | 763 | void usb_drv_set_test_mode(int mode) |
716 | { | 764 | { |
717 | logf("usb_drv_set_test_mode(%d)", mode); | 765 | logf("usb_drv_set_test_mode(%d)", mode); |
diff --git a/firmware/target/arm/tms320dm320/creative-zvm/pic-creativezvm.c b/firmware/target/arm/tms320dm320/creative-zvm/pic-creativezvm.c index 09d3cf7c67..334ef25683 100644 --- a/firmware/target/arm/tms320dm320/creative-zvm/pic-creativezvm.c +++ b/firmware/target/arm/tms320dm320/creative-zvm/pic-creativezvm.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include "button-target.h" | 25 | #include "button-target.h" |
26 | #include "i2c-dm320.h" | 26 | #include "i2c-dm320.h" |
27 | 27 | ||
28 | |||
29 | #include "lcd-target.h" | 28 | #include "lcd-target.h" |
30 | #include "lcd.h" | 29 | #include "lcd.h" |
31 | #include "sprintf.h" | 30 | #include "sprintf.h" |
@@ -46,8 +45,10 @@ | |||
46 | #define BTN_REL 1 | 45 | #define BTN_REL 1 |
47 | 46 | ||
48 | #define BTN_TOUCHPAD_PRESS 0x1F00 | 47 | #define BTN_TOUCHPAD_PRESS 0x1F00 |
48 | #define BTN_TOUCHPAD_SCROLL_DOWN 0x0F03 | ||
49 | #define BTN_TOUCHPAD_CORNER_DOWN 0xAF00 | 49 | #define BTN_TOUCHPAD_CORNER_DOWN 0xAF00 |
50 | #define BTN_TOUCHPAD_CORNER_UP 0x3F00 | 50 | #define BTN_TOUCHPAD_CORNER_UP 0x3F00 |
51 | #define BTN_TOUCHPAD_SCROLL_UP 0x0F04 | ||
51 | 52 | ||
52 | #define HEADPHONE_PLUGIN_A 0x5707 | 53 | #define HEADPHONE_PLUGIN_A 0x5707 |
53 | #define HEADPHONE_PLUGIN_B 0x5F07 | 54 | #define HEADPHONE_PLUGIN_B 0x5F07 |
@@ -176,6 +177,9 @@ static bool sw = false; | |||
176 | 177 | ||
177 | void GIO0(void) | 178 | void GIO0(void) |
178 | { | 179 | { |
180 | /* Mask GIO0 interrupt */ | ||
181 | IO_INTC_IRQ1 = INTR_IRQ1_EXT0; | ||
182 | |||
179 | unsigned char msg[4]; | 183 | unsigned char msg[4]; |
180 | i2c_read(PIC_ADR, msg, sizeof(msg)); | 184 | i2c_read(PIC_ADR, msg, sizeof(msg)); |
181 | tick_diff = current_tick - last_tick; | 185 | tick_diff = current_tick - last_tick; |
@@ -200,6 +204,12 @@ void GIO0(void) | |||
200 | map_button(BTN_TOUCHPAD_PRESS, BUTTON_SELECT); | 204 | map_button(BTN_TOUCHPAD_PRESS, BUTTON_SELECT); |
201 | map_button(BTN_TOUCHPAD_CORNER_DOWN, BUTTON_DOWN); | 205 | map_button(BTN_TOUCHPAD_CORNER_DOWN, BUTTON_DOWN); |
202 | map_button(BTN_TOUCHPAD_CORNER_UP, BUTTON_UP); | 206 | map_button(BTN_TOUCHPAD_CORNER_UP, BUTTON_UP); |
207 | case BTN_TOUCHPAD_SCROLL_DOWN: | ||
208 | btn = BUTTON_DOWN; | ||
209 | break; | ||
210 | case BTN_TOUCHPAD_SCROLL_UP: | ||
211 | btn = BUTTON_UP; | ||
212 | break; | ||
203 | case BTN_HOLD: | 213 | case BTN_HOLD: |
204 | hold_switch = true; | 214 | hold_switch = true; |
205 | break; | 215 | break; |
@@ -252,8 +262,6 @@ void GIO0(void) | |||
252 | lcd_update(); | 262 | lcd_update(); |
253 | sw = !sw; | 263 | sw = !sw; |
254 | #endif | 264 | #endif |
255 | /* Mask GIO0 interrupt */ | ||
256 | IO_INTC_IRQ1 = INTR_IRQ1_EXT0; | ||
257 | } | 265 | } |
258 | 266 | ||
259 | void send_command_to_pic(unsigned char in, unsigned char* out, | 267 | void send_command_to_pic(unsigned char in, unsigned char* out, |
@@ -292,8 +300,7 @@ void button_init_device(void) | |||
292 | it? */ | 300 | it? */ |
293 | /* Enable GIO0 interrupt */ | 301 | /* Enable GIO0 interrupt */ |
294 | IO_INTC_EINT1 |= INTR_EINT1_EXT0; | 302 | IO_INTC_EINT1 |= INTR_EINT1_EXT0; |
295 | btn = nonbtn = pic_init_value = pic_init2_value = last_btn = hold_switch = | 303 | btn=nonbtn=pic_init_value=pic_init2_value=last_btn=hold_switch=0; |
296 | 0; | ||
297 | /* Initialize PIC */ | 304 | /* Initialize PIC */ |
298 | send_command_to_pic(1, (unsigned char *)&pic_init_value, | 305 | send_command_to_pic(1, (unsigned char *)&pic_init_value, |
299 | sizeof(pic_init_value)); | 306 | sizeof(pic_init_value)); |
@@ -301,27 +308,12 @@ void button_init_device(void) | |||
301 | sizeof(pic_init2_value)); | 308 | sizeof(pic_init2_value)); |
302 | } | 309 | } |
303 | 310 | ||
304 | int get_debug_info(int choice) | ||
305 | { | ||
306 | switch(choice) | ||
307 | { | ||
308 | case 1: | ||
309 | return pic_init_value; | ||
310 | case 2: | ||
311 | return pic_init2_value; | ||
312 | case 3: | ||
313 | return last_btn; | ||
314 | case 4: | ||
315 | return nonbtn; | ||
316 | case 5: | ||
317 | return tick_diff; | ||
318 | } | ||
319 | return -1; | ||
320 | } | ||
321 | |||
322 | int button_read_device(void) | 311 | int button_read_device(void) |
323 | { | 312 | { |
324 | return btn; | 313 | if(hold_switch) |
314 | return 0; | ||
315 | else | ||
316 | return btn; | ||
325 | } | 317 | } |
326 | 318 | ||
327 | bool button_hold(void) | 319 | bool button_hold(void) |
@@ -333,3 +325,44 @@ bool button_usb_connected(void) | |||
333 | { | 325 | { |
334 | return (bool)(nonbtn & NONBUTTON_USB); | 326 | return (bool)(nonbtn & NONBUTTON_USB); |
335 | } | 327 | } |
328 | |||
329 | int pic_dbg_num_items(void) | ||
330 | { | ||
331 | return 13; | ||
332 | } | ||
333 | |||
334 | char* pic_dbg_item(int selected_item, void *data, char *buffer, size_t buffer_len) | ||
335 | { | ||
336 | (void)data; | ||
337 | switch(selected_item) | ||
338 | { | ||
339 | case 0: | ||
340 | snprintf(buffer, buffer_len, "Init value 1: 0x%04x", pic_init_value); | ||
341 | return buffer; | ||
342 | case 1: | ||
343 | snprintf(buffer, buffer_len, "Init value 2: 0x%04x", pic_init2_value); | ||
344 | return buffer; | ||
345 | case 2: | ||
346 | snprintf(buffer, buffer_len, "Last button value: 0x%04x Raw value: 0x%04x", last_btn, btn); | ||
347 | return buffer; | ||
348 | case 3: | ||
349 | snprintf(buffer, buffer_len, "Last button differs in ticks: 0x%04x", tick_diff); | ||
350 | return buffer; | ||
351 | case 4: | ||
352 | snprintf(buffer, buffer_len, "Dock values: 0x%04x", nonbtn); | ||
353 | return buffer; | ||
354 | #define B(n,w,b) case n: \ | ||
355 | snprintf(buffer, buffer_len, "%s: 0x%04x", w, b); \ | ||
356 | return buffer; | ||
357 | B(5, "MASK_TV_OUT", MASK_TV_OUT(pic_init_value)); | ||
358 | B(6, "MASK_xx1", MASK_xx1(pic_init_value)); | ||
359 | B(7, "MASK_xx2", MASK_xx2(pic_init_value)); | ||
360 | B(8, "MASK_xx3", MASK_xx3(pic_init_value)); | ||
361 | B(9, "MASK_xx4", MASK_xx4(pic_init_value)); | ||
362 | B(10, "MASK_xx5", MASK_xx5(pic_init_value)); | ||
363 | B(11, "MASK_xx6", MASK_xx6(pic_init_value)); | ||
364 | B(12, "MASK_xx7", MASK_xx7(pic_init_value)); | ||
365 | #undef B | ||
366 | } | ||
367 | return NULL; | ||
368 | } | ||
diff --git a/firmware/target/arm/tms320dm320/creative-zvm/usb-target.h b/firmware/target/arm/tms320dm320/creative-zvm/usb-target.h index 4e3303911c..14ddc6eb0a 100644 --- a/firmware/target/arm/tms320dm320/creative-zvm/usb-target.h +++ b/firmware/target/arm/tms320dm320/creative-zvm/usb-target.h | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include "dm320.h" | 23 | #include "dm320.h" |
24 | 24 | ||
25 | /* General purpose memory region #2 */ | ||
25 | #define ISP1583_IOBASE 0x60FFC000 | 26 | #define ISP1583_IOBASE 0x60FFC000 |
26 | #define ISP1583_H_OVERRIDE | 27 | #define ISP1583_H_OVERRIDE |
27 | 28 | ||
diff --git a/firmware/target/arm/tms320dm320/debug-dm320.c b/firmware/target/arm/tms320dm320/debug-dm320.c index abfb5b09bc..23257ddcc6 100755 --- a/firmware/target/arm/tms320dm320/debug-dm320.c +++ b/firmware/target/arm/tms320dm320/debug-dm320.c | |||
@@ -82,6 +82,13 @@ bool __dbg_hw_info(void) | |||
82 | lcd_puts(0, line++, buf); | 82 | lcd_puts(0, line++, buf); |
83 | snprintf(buf, sizeof(buf), " IO_CLK_MOD2: 0x%04x IO_CLK_LPCTL0: 0x%04x ", IO_CLK_MOD2, IO_CLK_LPCTL0); | 83 | snprintf(buf, sizeof(buf), " IO_CLK_MOD2: 0x%04x IO_CLK_LPCTL0: 0x%04x ", IO_CLK_MOD2, IO_CLK_LPCTL0); |
84 | lcd_puts(0, line++, buf); | 84 | lcd_puts(0, line++, buf); |
85 | lcd_puts(0, line++, "Interrupt info:"); | ||
86 | snprintf(buf, sizeof(buf), " IO_INTC_EINT0: 0x%04x IO_INTC_EINT1: 0x%04x ", IO_INTC_EINT0, IO_INTC_EINT1); | ||
87 | lcd_puts(0, line++, buf); | ||
88 | snprintf(buf, sizeof(buf), " IO_INTC_EINT2: 0x%04x IO_INTC_IRQ0: 0x%04x ", IO_INTC_EINT2, IO_INTC_IRQ0); | ||
89 | lcd_puts(0, line++, buf); | ||
90 | snprintf(buf, sizeof(buf), " IO_INTC_IRQ1: 0x%04x IO_INTC_IRQ2: 0x%04x ", IO_INTC_IRQ1, IO_INTC_IRQ2); | ||
91 | lcd_puts(0, line++, buf); | ||
85 | #endif | 92 | #endif |
86 | 93 | ||
87 | lcd_puts(0, line++, "Board revision:"); | 94 | lcd_puts(0, line++, "Board revision:"); |
@@ -130,17 +137,6 @@ bool __dbg_hw_info(void) | |||
130 | else if(button & BUTTON_RIGHT) | 137 | else if(button & BUTTON_RIGHT) |
131 | lcd_set_direct_fb(true); | 138 | lcd_set_direct_fb(true); |
132 | 139 | ||
133 | lcd_puts(0, line++, "PIC info:"); | ||
134 | snprintf(buf, sizeof(buf), " Init value 1: 0x%04x", get_debug_info(1)); | ||
135 | lcd_puts(0, line++, buf); | ||
136 | snprintf(buf, sizeof(buf), " Init value 2: 0x%04x", get_debug_info(2)); | ||
137 | lcd_puts(0, line++, buf); | ||
138 | snprintf(buf, sizeof(buf), " Last button value: 0x%04x Raw value: 0x%04x", get_debug_info(3), button_read_device()); | ||
139 | lcd_puts(0, line++, buf); | ||
140 | snprintf(buf, sizeof(buf), " Last button at: 0x%04x", get_debug_info(5)); | ||
141 | lcd_puts(0, line++, buf); | ||
142 | snprintf(buf, sizeof(buf), " Dock values: 0x%04x", get_debug_info(4)); | ||
143 | lcd_puts(0, line++, buf); | ||
144 | lcd_puts(0, line++, "LCD info:"); | 140 | lcd_puts(0, line++, "LCD info:"); |
145 | snprintf(buf, sizeof(buf), " LCD direct FB access? %s", (lcd_get_direct_fb() ? "yes" : "no")); | 141 | snprintf(buf, sizeof(buf), " LCD direct FB access? %s", (lcd_get_direct_fb() ? "yes" : "no")); |
146 | lcd_puts(0, line++, buf); | 142 | lcd_puts(0, line++, buf); |