summaryrefslogtreecommitdiff
path: root/firmware/target/arm
diff options
context:
space:
mode:
authorKarl Kurbjun <kkurbjun@gmail.com>2007-11-10 22:16:15 +0000
committerKarl Kurbjun <kkurbjun@gmail.com>2007-11-10 22:16:15 +0000
commit0082da7515e85a24887f0c9222958d9aafd432d1 (patch)
tree9734e2270fc1085ebf026c2f4eeb5fc6909f1391 /firmware/target/arm
parentd3c0a7f1692fd0b367a915a8f3a7144aaebb44a7 (diff)
downloadrockbox-0082da7515e85a24887f0c9222958d9aafd432d1.tar.gz
rockbox-0082da7515e85a24887f0c9222958d9aafd432d1.zip
Add some forgotten files
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15561 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm')
-rwxr-xr-xfirmware/target/arm/tms320dm320/debug-dm320.c71
-rwxr-xr-xfirmware/target/arm/tms320dm320/debug-target.h20
2 files changed, 91 insertions, 0 deletions
diff --git a/firmware/target/arm/tms320dm320/debug-dm320.c b/firmware/target/arm/tms320dm320/debug-dm320.c
new file mode 100755
index 0000000000..d2dce118c5
--- /dev/null
+++ b/firmware/target/arm/tms320dm320/debug-dm320.c
@@ -0,0 +1,71 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2007 by Karl Kurbjun
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 "system.h"
23#include "string.h"
24#include <stdbool.h>
25#include "button.h"
26#include "lcd.h"
27#include "sprintf.h"
28#include "font.h"
29#include "debug-target.h"
30
31bool __dbg_hw_info(void)
32{
33 int line = 0, button;
34 int *address=0x0;
35 bool done=false;
36 char buf[100];
37
38 lcd_setmargins(0, 0);
39 lcd_setfont(FONT_SYSFIXED);
40 lcd_clear_display();
41 lcd_puts(0, line++, "[Hardware info]");
42
43 while(!done)
44 {
45 line = 0;
46 button = button_get(false);
47 button&=~BUTTON_REPEAT;
48 if (button == BUTTON_POWER)
49 done=true;
50 if(button==BUTTON_RC_PLAY)
51 address+=0x01;
52 else if (button==BUTTON_RC_DOWN)
53 address-=0x01;
54 else if (button==BUTTON_RC_FF)
55 address+=0x800;
56 else if (button==BUTTON_RC_REW)
57 address-=0x800;
58
59 snprintf(buf, sizeof(buf), "current tick: %04x", (unsigned int)current_tick);
60 lcd_puts(0, line++, buf);
61 snprintf(buf, sizeof(buf), "Address: 0x%08x Data: 0x%08x", (unsigned int)address, *address);
62 lcd_puts(0, line++, buf);
63 snprintf(buf, sizeof(buf), "Address: 0x%08x Data: 0x%08x", (unsigned int)(address+1), *(address+1));
64 lcd_puts(0, line++, buf);
65 snprintf(buf, sizeof(buf), "Address: 0x%08x Data: 0x%08x", (unsigned int)(address+2), *(address+2));
66 lcd_puts(0, line++, buf);
67
68 lcd_update();
69 }
70 return false;
71}
diff --git a/firmware/target/arm/tms320dm320/debug-target.h b/firmware/target/arm/tms320dm320/debug-target.h
new file mode 100755
index 0000000000..3c34c3125e
--- /dev/null
+++ b/firmware/target/arm/tms320dm320/debug-target.h
@@ -0,0 +1,20 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2007 by Karl Kurbjun
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
20bool __dbg_hw_info(void);