From 78e0e85ffb1fcedff9d2eb24146be1917bbc143d Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Tue, 27 Jan 2009 19:45:00 +0000 Subject: 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 --- firmware/export/as3525.h | 5 +++++ firmware/target/arm/as3525/debug-as3525.c | 25 ++++++--------------- firmware/target/arm/as3525/debug-target.h | 26 ++++++++++++++++++++++ .../target/arm/as3525/sansa-c200v2/debug-target.h | 26 ---------------------- .../target/arm/as3525/sansa-clip/debug-target.h | 26 ---------------------- .../target/arm/as3525/sansa-e200v2/debug-target.h | 26 ---------------------- .../target/arm/as3525/sansa-m200v4/debug-target.h | 26 ---------------------- 7 files changed, 38 insertions(+), 122 deletions(-) create mode 100644 firmware/target/arm/as3525/debug-target.h delete mode 100644 firmware/target/arm/as3525/sansa-c200v2/debug-target.h delete mode 100644 firmware/target/arm/as3525/sansa-clip/debug-target.h delete mode 100644 firmware/target/arm/as3525/sansa-e200v2/debug-target.h delete mode 100644 firmware/target/arm/as3525/sansa-m200v4/debug-target.h 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 */ #define GPIOA_IC (*(volatile unsigned char*)(GPIOA_BASE+0x41C)) #define GPIOA_AFSEL (*(volatile unsigned char*)(GPIOA_BASE+0x420)) #define GPIOA_PIN(a) (*(volatile unsigned char*)(GPIOA_BASE+(1<<((a)+2)))) +#define GPIOA_DATA (*(volatile unsigned char*)(GPIOA_BASE+(0xff<<2))) + #define GPIOB_DIR (*(volatile unsigned char*)(GPIOB_BASE+0x400)) #define GPIOB_IS (*(volatile unsigned char*)(GPIOB_BASE+0x404)) @@ -333,6 +335,7 @@ interface */ #define GPIOB_IC (*(volatile unsigned char*)(GPIOB_BASE+0x41C)) #define GPIOB_AFSEL (*(volatile unsigned char*)(GPIOB_BASE+0x420)) #define GPIOB_PIN(a) (*(volatile unsigned char*)(GPIOB_BASE+(1<<((a)+2)))) +#define GPIOB_DATA (*(volatile unsigned char*)(GPIOB_BASE+(0xff<<2))) #define GPIOC_DIR (*(volatile unsigned char*)(GPIOC_BASE+0x400)) #define GPIOC_IS (*(volatile unsigned char*)(GPIOC_BASE+0x404)) @@ -344,6 +347,7 @@ interface */ #define GPIOC_IC (*(volatile unsigned char*)(GPIOC_BASE+0x41C)) #define GPIOC_AFSEL (*(volatile unsigned char*)(GPIOC_BASE+0x420)) #define GPIOC_PIN(a) (*(volatile unsigned char*)(GPIOC_BASE+(1<<((a)+2)))) +#define GPIOC_DATA (*(volatile unsigned char*)(GPIOC_BASE+(0xff<<2))) #define GPIOD_DIR (*(volatile unsigned char*)(GPIOD_BASE+0x400)) #define GPIOD_IS (*(volatile unsigned char*)(GPIOD_BASE+0x404)) @@ -355,6 +359,7 @@ interface */ #define GPIOD_IC (*(volatile unsigned char*)(GPIOD_BASE+0x41C)) #define GPIOD_AFSEL (*(volatile unsigned char*)(GPIOD_BASE+0x420)) #define GPIOD_PIN(a) (*(volatile unsigned char*)(GPIOD_BASE+(1<<((a)+2)))) +#define GPIOD_DATA (*(volatile unsigned char*)(GPIOD_BASE+(0xff<<2))) /* ARM PL172 Memory Controller registers */ 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 @@ #include "font.h" #include "system.h" #include "sprintf.h" -#include "string.h" +#include "cpu.h" #define _DEBUG_PRINTF(a,varargs...) \ snprintf(buf, sizeof(buf), (a), ##varargs); lcd_puts(0,line++,buf) @@ -41,35 +41,24 @@ bool __dbg_hw_info(void) bool __dbg_ports(void) { char buf[50]; - int line, i; + int line; lcd_clear_display(); lcd_setfont(FONT_SYSFIXED); - char gpio_data[4] = {0,0,0,0}; while(1) { line = 0; - for (i = 0; i < 8; i++) - { - gpio_data[0] |= GPIOA_PIN(i) & (1< ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (C) 2007 by Karl Kurbjun + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ + +#include + +#define DEBUG_CANCEL BUTTON_LEFT +bool __dbg_hw_info(void); +bool __dbg_ports(void); diff --git a/firmware/target/arm/as3525/sansa-c200v2/debug-target.h b/firmware/target/arm/as3525/sansa-c200v2/debug-target.h deleted file mode 100644 index 0769a2f11d..0000000000 --- a/firmware/target/arm/as3525/sansa-c200v2/debug-target.h +++ /dev/null @@ -1,26 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * $Id$ - * - * Copyright (C) 2007 by Karl Kurbjun - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ - -#include - -#define DEBUG_CANCEL BUTTON_LEFT -bool __dbg_hw_info(void); -bool __dbg_ports(void); 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 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * $Id$ - * - * Copyright (C) 2007 by Karl Kurbjun - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ - -#include - -#define DEBUG_CANCEL BUTTON_LEFT -bool __dbg_hw_info(void); -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 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * $Id$ - * - * Copyright (C) 2007 by Karl Kurbjun - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ - -#include - -#define DEBUG_CANCEL BUTTON_LEFT -bool __dbg_hw_info(void); -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 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * $Id$ - * - * Copyright (C) 2007 by Karl Kurbjun - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ - -#include - -#define DEBUG_CANCEL BUTTON_LEFT -bool __dbg_hw_info(void); -bool __dbg_ports(void); -- cgit v1.2.3