1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2007 by Rob Purchase
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.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
30 #include "debug-target.h"
33 /* IRQ status registers of debug interest only */
34 #define STS (*(volatile unsigned long *)0xF3001008)
35 #define SRC (*(volatile unsigned long *)0xF3001010)
37 bool __dbg_ports(void)
42 bool __dbg_hw_info(void)
44 int line
= 0, i
, oldline
;
47 lcd_setfont(FONT_SYSFIXED
);
50 /* Put all the static text before the while loop */
51 lcd_puts(0, line
++, "[Hardware info]");
60 if (button_get_w_tmo(HZ
/20) == (BUTTON_POWER
|BUTTON_REL
))
63 snprintf(buf
, sizeof(buf
), "current tick: %08x Seconds running: %08d",
64 (unsigned int)current_tick
, (unsigned int)current_tick
/100); lcd_puts(0, line
++, buf
);
66 snprintf(buf
, sizeof(buf
), "GPIOA: 0x%08x GPIOB: 0x%08x",
67 (unsigned int)GPIOA
, (unsigned int)GPIOB
); lcd_puts(0, line
++, buf
);
68 snprintf(buf
, sizeof(buf
), "GPIOC: 0x%08x GPIOD: 0x%08x",
69 (unsigned int)GPIOC
, (unsigned int)GPIOD
); lcd_puts(0, line
++, buf
);
70 snprintf(buf
, sizeof(buf
), "GPIOE: 0x%08x",
71 (unsigned int)GPIOE
); lcd_puts(0, line
++, buf
);
75 snprintf(buf
, sizeof(buf
), "ADC%d: 0x%04x", i
, adc_read(i
));
76 lcd_puts(0, line
++, buf
);
79 snprintf(buf
, sizeof(buf
), "STS: 0x%08x SRC: 0x%08x",
80 (unsigned int)STS
, (unsigned int)SRC
); lcd_puts(0, line
++, buf
);