summaryrefslogtreecommitdiff
path: root/apps/debug_menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r--apps/debug_menu.c46
1 files changed, 7 insertions, 39 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 918a969a95..576d01d336 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -88,6 +88,10 @@
88#endif 88#endif
89#include "hwcompat.h" 89#include "hwcompat.h"
90 90
91#if CONFIG_CPU == DM320
92#include "debug-target.h"
93#endif
94
91/*---------------------------------------------------*/ 95/*---------------------------------------------------*/
92/* SPECIAL DEBUG STUFF */ 96/* SPECIAL DEBUG STUFF */
93/*---------------------------------------------------*/ 97/*---------------------------------------------------*/
@@ -656,45 +660,9 @@ static bool dbg_hw_info(void)
656 lcd_update(); 660 lcd_update();
657 661
658 while (!(action_userabort(TIMEOUT_BLOCK))); 662 while (!(action_userabort(TIMEOUT_BLOCK)));
659#elif CONFIG_CPU == DM320 663#else
660 int line = 0, button; 664 /* Define this function in your target tree */
661 int *address=0x0; 665 return __dbg_hw_info();
662 bool done=false;
663 char buf[100];
664
665 lcd_setmargins(0, 0);
666 lcd_setfont(FONT_SYSFIXED);
667 lcd_clear_display();
668 lcd_puts(0, line++, "[Hardware info]");
669
670 while(!done)
671 {
672 button = button_get(false);
673 button&=~BUTTON_REPEAT;
674 if (button == BUTTON_POWER)
675 done=true;
676 if(button==BUTTON_RC_PLAY)
677 address+=0x01;
678 else if (button==BUTTON_RC_DOWN)
679 address-=0x01;
680 else if (button==BUTTON_RC_FF)
681 address+=0x800;
682 else if (button==BUTTON_RC_REW)
683 address-=0x800;
684 {
685 snprintf(buf, sizeof(buf), "current tick: %04x", (unsigned int)current_tick);
686 lcd_puts(0, line++, buf);
687 snprintf(buf, sizeof(buf), "Address: 0x%08x Data: 0x%08x", (unsigned int)address, *address);
688 lcd_puts(0, line++, buf);
689 snprintf(buf, sizeof(buf), "Address: 0x%08x Data: 0x%08x", (unsigned int)(address+1), *(address+1));
690 lcd_puts(0, line++, buf);
691 snprintf(buf, sizeof(buf), "Address: 0x%08x Data: 0x%08x", (unsigned int)(address+2), *(address+2));
692 lcd_puts(0, line++, buf);
693 line -= 4;
694 }
695 lcd_update();
696 }
697
698#endif /* CONFIG_CPU */ 666#endif /* CONFIG_CPU */
699 return false; 667 return false;
700} 668}