diff options
| -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 70462c7..062ac26 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 8d7c146..a388f12 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<<i); - gpio_data[1] |= GPIOB_PIN(i) & (1<<i); - gpio_data[2] |= GPIOC_PIN(i) & (1<<i); - gpio_data[3] |= GPIOD_PIN(i) & (1<<i); - } - - line++; _DEBUG_PRINTF("[GPIO Values and Directions]"); - _DEBUG_PRINTF("GPIOA: %2x DIR: %2x", gpio_data[0], GPIOA_DIR); - _DEBUG_PRINTF("GPIOB: %2x DIR: %2x", gpio_data[1], GPIOB_DIR); - _DEBUG_PRINTF("GPIOC: %2x DIR: %2x", gpio_data[2], GPIOC_DIR); - _DEBUG_PRINTF("GPIOD: %2x DIR: %2x", gpio_data[3], GPIOD_DIR); - line++; + _DEBUG_PRINTF("GPIOA: %2x DIR: %2x", GPIOA_DATA, GPIOA_DIR); + _DEBUG_PRINTF("GPIOB: %2x DIR: %2x", GPIOB_DATA, GPIOB_DIR); + _DEBUG_PRINTF("GPIOC: %2x DIR: %2x", GPIOC_DATA, GPIOC_DIR); + _DEBUG_PRINTF("GPIOD: %2x DIR: %2x", GPIOD_DATA, GPIOD_DIR); #ifdef TRACK_DBOP_DIN + line++; _DEBUG_PRINTF("[DBOP_DIN]"); _DEBUG_PRINTF("DBOP_DIN: %4x", _dbop_din); #endif - memset(gpio_data, 0, sizeof(gpio_data)); lcd_update(); if (button_get_w_tmo(HZ/10) == (DEBUG_CANCEL|BUTTON_REL)) break; diff --git a/firmware/target/arm/as3525/sansa-c200v2/debug-target.h b/firmware/target/arm/as3525/debug-target.h index 0769a2f..0769a2f 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 0769a2f..0000000 --- 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 <stdbool.h> - -#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 0769a2f..0000000 --- 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 <stdbool.h> - -#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 0769a2f..0000000 --- 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 <stdbool.h> - -#define DEBUG_CANCEL BUTTON_LEFT -bool __dbg_hw_info(void); -bool __dbg_ports(void); |