diff options
author | Thomas Martitz <kugel@rockbox.org> | 2009-01-27 19:45:00 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2009-01-27 19:45:00 +0000 |
commit | 78e0e85ffb1fcedff9d2eb24146be1917bbc143d (patch) | |
tree | 482928f54fdd1099aaacf300a51251b1cf7c5a0f | |
parent | 067ef10c56fda804c803f5a06aa16d5611261d2a (diff) | |
download | rockbox-78e0e85ffb1fcedff9d2eb24146be1917bbc143d.tar.gz rockbox-78e0e85ffb1fcedff9d2eb24146be1917bbc143d.zip |
Redo some parts of my previous commit, thanks Jens and Dave
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19869 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/export/as3525.h | 5 | ||||
-rw-r--r-- | firmware/target/arm/as3525/debug-as3525.c | 25 | ||||
-rw-r--r-- | firmware/target/arm/as3525/debug-target.h (renamed from firmware/target/arm/as3525/sansa-c200v2/debug-target.h) | 0 | ||||
-rw-r--r-- | firmware/target/arm/as3525/sansa-clip/debug-target.h | 26 | ||||
-rw-r--r-- | firmware/target/arm/as3525/sansa-e200v2/debug-target.h | 26 | ||||
-rw-r--r-- | firmware/target/arm/as3525/sansa-m200v4/debug-target.h | 26 |
6 files changed, 12 insertions, 96 deletions
diff --git a/firmware/export/as3525.h b/firmware/export/as3525.h index 70462c7e8e..062ac26eac 100644 --- a/firmware/export/as3525.h +++ b/firmware/export/as3525.h | |||
@@ -322,6 +322,8 @@ interface */ | |||
322 | #define GPIOA_IC (*(volatile unsigned char*)(GPIOA_BASE+0x41C)) | 322 | #define GPIOA_IC (*(volatile unsigned char*)(GPIOA_BASE+0x41C)) |
323 | #define GPIOA_AFSEL (*(volatile unsigned char*)(GPIOA_BASE+0x420)) | 323 | #define GPIOA_AFSEL (*(volatile unsigned char*)(GPIOA_BASE+0x420)) |
324 | #define GPIOA_PIN(a) (*(volatile unsigned char*)(GPIOA_BASE+(1<<((a)+2)))) | 324 | #define GPIOA_PIN(a) (*(volatile unsigned char*)(GPIOA_BASE+(1<<((a)+2)))) |
325 | #define GPIOA_DATA (*(volatile unsigned char*)(GPIOA_BASE+(0xff<<2))) | ||
326 | |||
325 | 327 | ||
326 | #define GPIOB_DIR (*(volatile unsigned char*)(GPIOB_BASE+0x400)) | 328 | #define GPIOB_DIR (*(volatile unsigned char*)(GPIOB_BASE+0x400)) |
327 | #define GPIOB_IS (*(volatile unsigned char*)(GPIOB_BASE+0x404)) | 329 | #define GPIOB_IS (*(volatile unsigned char*)(GPIOB_BASE+0x404)) |
@@ -333,6 +335,7 @@ interface */ | |||
333 | #define GPIOB_IC (*(volatile unsigned char*)(GPIOB_BASE+0x41C)) | 335 | #define GPIOB_IC (*(volatile unsigned char*)(GPIOB_BASE+0x41C)) |
334 | #define GPIOB_AFSEL (*(volatile unsigned char*)(GPIOB_BASE+0x420)) | 336 | #define GPIOB_AFSEL (*(volatile unsigned char*)(GPIOB_BASE+0x420)) |
335 | #define GPIOB_PIN(a) (*(volatile unsigned char*)(GPIOB_BASE+(1<<((a)+2)))) | 337 | #define GPIOB_PIN(a) (*(volatile unsigned char*)(GPIOB_BASE+(1<<((a)+2)))) |
338 | #define GPIOB_DATA (*(volatile unsigned char*)(GPIOB_BASE+(0xff<<2))) | ||
336 | 339 | ||
337 | #define GPIOC_DIR (*(volatile unsigned char*)(GPIOC_BASE+0x400)) | 340 | #define GPIOC_DIR (*(volatile unsigned char*)(GPIOC_BASE+0x400)) |
338 | #define GPIOC_IS (*(volatile unsigned char*)(GPIOC_BASE+0x404)) | 341 | #define GPIOC_IS (*(volatile unsigned char*)(GPIOC_BASE+0x404)) |
@@ -344,6 +347,7 @@ interface */ | |||
344 | #define GPIOC_IC (*(volatile unsigned char*)(GPIOC_BASE+0x41C)) | 347 | #define GPIOC_IC (*(volatile unsigned char*)(GPIOC_BASE+0x41C)) |
345 | #define GPIOC_AFSEL (*(volatile unsigned char*)(GPIOC_BASE+0x420)) | 348 | #define GPIOC_AFSEL (*(volatile unsigned char*)(GPIOC_BASE+0x420)) |
346 | #define GPIOC_PIN(a) (*(volatile unsigned char*)(GPIOC_BASE+(1<<((a)+2)))) | 349 | #define GPIOC_PIN(a) (*(volatile unsigned char*)(GPIOC_BASE+(1<<((a)+2)))) |
350 | #define GPIOC_DATA (*(volatile unsigned char*)(GPIOC_BASE+(0xff<<2))) | ||
347 | 351 | ||
348 | #define GPIOD_DIR (*(volatile unsigned char*)(GPIOD_BASE+0x400)) | 352 | #define GPIOD_DIR (*(volatile unsigned char*)(GPIOD_BASE+0x400)) |
349 | #define GPIOD_IS (*(volatile unsigned char*)(GPIOD_BASE+0x404)) | 353 | #define GPIOD_IS (*(volatile unsigned char*)(GPIOD_BASE+0x404)) |
@@ -355,6 +359,7 @@ interface */ | |||
355 | #define GPIOD_IC (*(volatile unsigned char*)(GPIOD_BASE+0x41C)) | 359 | #define GPIOD_IC (*(volatile unsigned char*)(GPIOD_BASE+0x41C)) |
356 | #define GPIOD_AFSEL (*(volatile unsigned char*)(GPIOD_BASE+0x420)) | 360 | #define GPIOD_AFSEL (*(volatile unsigned char*)(GPIOD_BASE+0x420)) |
357 | #define GPIOD_PIN(a) (*(volatile unsigned char*)(GPIOD_BASE+(1<<((a)+2)))) | 361 | #define GPIOD_PIN(a) (*(volatile unsigned char*)(GPIOD_BASE+(1<<((a)+2)))) |
362 | #define GPIOD_DATA (*(volatile unsigned char*)(GPIOD_BASE+(0xff<<2))) | ||
358 | 363 | ||
359 | /* ARM PL172 Memory Controller registers */ | 364 | /* ARM PL172 Memory Controller registers */ |
360 | 365 | ||
diff --git a/firmware/target/arm/as3525/debug-as3525.c b/firmware/target/arm/as3525/debug-as3525.c index 8d7c1468d8..a388f12601 100644 --- a/firmware/target/arm/as3525/debug-as3525.c +++ b/firmware/target/arm/as3525/debug-as3525.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include "font.h" | 26 | #include "font.h" |
27 | #include "system.h" | 27 | #include "system.h" |
28 | #include "sprintf.h" | 28 | #include "sprintf.h" |
29 | #include "string.h" | 29 | #include "cpu.h" |
30 | 30 | ||
31 | #define _DEBUG_PRINTF(a,varargs...) \ | 31 | #define _DEBUG_PRINTF(a,varargs...) \ |
32 | snprintf(buf, sizeof(buf), (a), ##varargs); lcd_puts(0,line++,buf) | 32 | snprintf(buf, sizeof(buf), (a), ##varargs); lcd_puts(0,line++,buf) |
@@ -41,35 +41,24 @@ bool __dbg_hw_info(void) | |||
41 | bool __dbg_ports(void) | 41 | bool __dbg_ports(void) |
42 | { | 42 | { |
43 | char buf[50]; | 43 | char buf[50]; |
44 | int line, i; | 44 | int line; |
45 | 45 | ||
46 | lcd_clear_display(); | 46 | lcd_clear_display(); |
47 | lcd_setfont(FONT_SYSFIXED); | 47 | lcd_setfont(FONT_SYSFIXED); |
48 | char gpio_data[4] = {0,0,0,0}; | ||
49 | 48 | ||
50 | while(1) | 49 | while(1) |
51 | { | 50 | { |
52 | line = 0; | 51 | line = 0; |
53 | for (i = 0; i < 8; i++) | ||
54 | { | ||
55 | gpio_data[0] |= GPIOA_PIN(i) & (1<<i); | ||
56 | gpio_data[1] |= GPIOB_PIN(i) & (1<<i); | ||
57 | gpio_data[2] |= GPIOC_PIN(i) & (1<<i); | ||
58 | gpio_data[3] |= GPIOD_PIN(i) & (1<<i); | ||
59 | } | ||
60 | |||
61 | line++; | ||
62 | _DEBUG_PRINTF("[GPIO Values and Directions]"); | 52 | _DEBUG_PRINTF("[GPIO Values and Directions]"); |
63 | _DEBUG_PRINTF("GPIOA: %2x DIR: %2x", gpio_data[0], GPIOA_DIR); | 53 | _DEBUG_PRINTF("GPIOA: %2x DIR: %2x", GPIOA_DATA, GPIOA_DIR); |
64 | _DEBUG_PRINTF("GPIOB: %2x DIR: %2x", gpio_data[1], GPIOB_DIR); | 54 | _DEBUG_PRINTF("GPIOB: %2x DIR: %2x", GPIOB_DATA, GPIOB_DIR); |
65 | _DEBUG_PRINTF("GPIOC: %2x DIR: %2x", gpio_data[2], GPIOC_DIR); | 55 | _DEBUG_PRINTF("GPIOC: %2x DIR: %2x", GPIOC_DATA, GPIOC_DIR); |
66 | _DEBUG_PRINTF("GPIOD: %2x DIR: %2x", gpio_data[3], GPIOD_DIR); | 56 | _DEBUG_PRINTF("GPIOD: %2x DIR: %2x", GPIOD_DATA, GPIOD_DIR); |
67 | line++; | ||
68 | #ifdef TRACK_DBOP_DIN | 57 | #ifdef TRACK_DBOP_DIN |
58 | line++; | ||
69 | _DEBUG_PRINTF("[DBOP_DIN]"); | 59 | _DEBUG_PRINTF("[DBOP_DIN]"); |
70 | _DEBUG_PRINTF("DBOP_DIN: %4x", _dbop_din); | 60 | _DEBUG_PRINTF("DBOP_DIN: %4x", _dbop_din); |
71 | #endif | 61 | #endif |
72 | memset(gpio_data, 0, sizeof(gpio_data)); | ||
73 | lcd_update(); | 62 | lcd_update(); |
74 | if (button_get_w_tmo(HZ/10) == (DEBUG_CANCEL|BUTTON_REL)) | 63 | if (button_get_w_tmo(HZ/10) == (DEBUG_CANCEL|BUTTON_REL)) |
75 | break; | 64 | break; |
diff --git a/firmware/target/arm/as3525/sansa-c200v2/debug-target.h b/firmware/target/arm/as3525/debug-target.h index 0769a2f11d..0769a2f11d 100644 --- a/firmware/target/arm/as3525/sansa-c200v2/debug-target.h +++ b/firmware/target/arm/as3525/debug-target.h | |||
diff --git a/firmware/target/arm/as3525/sansa-clip/debug-target.h b/firmware/target/arm/as3525/sansa-clip/debug-target.h deleted file mode 100644 index 0769a2f11d..0000000000 --- a/firmware/target/arm/as3525/sansa-clip/debug-target.h +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2007 by Karl Kurbjun | ||
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 | #include <stdbool.h> | ||
23 | |||
24 | #define DEBUG_CANCEL BUTTON_LEFT | ||
25 | bool __dbg_hw_info(void); | ||
26 | bool __dbg_ports(void); | ||
diff --git a/firmware/target/arm/as3525/sansa-e200v2/debug-target.h b/firmware/target/arm/as3525/sansa-e200v2/debug-target.h deleted file mode 100644 index 0769a2f11d..0000000000 --- a/firmware/target/arm/as3525/sansa-e200v2/debug-target.h +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2007 by Karl Kurbjun | ||
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 | #include <stdbool.h> | ||
23 | |||
24 | #define DEBUG_CANCEL BUTTON_LEFT | ||
25 | bool __dbg_hw_info(void); | ||
26 | bool __dbg_ports(void); | ||
diff --git a/firmware/target/arm/as3525/sansa-m200v4/debug-target.h b/firmware/target/arm/as3525/sansa-m200v4/debug-target.h deleted file mode 100644 index 0769a2f11d..0000000000 --- a/firmware/target/arm/as3525/sansa-m200v4/debug-target.h +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2007 by Karl Kurbjun | ||
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 | #include <stdbool.h> | ||
23 | |||
24 | #define DEBUG_CANCEL BUTTON_LEFT | ||
25 | bool __dbg_hw_info(void); | ||
26 | bool __dbg_ports(void); | ||