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 bool __dbg_ports(void)
38 bool __dbg_hw_info(void)
40 int line
= 0, i
, button
, oldline
;
44 lcd_setfont(FONT_SYSFIXED
);
47 /* Put all the static text before the while loop */
48 lcd_puts(0, line
++, "[Hardware info]");
55 button
= button_get(false);
57 button
&= ~BUTTON_REPEAT
;
59 if (button
== BUTTON_SELECT
)
61 if (button
== BUTTON_STOP
)
65 snprintf(buf
, sizeof(buf
), "current tick: %08x Seconds running: %08d",
66 (unsigned int)current_tick
, (unsigned int)current_tick
/100); lcd_puts(0, line
++, buf
);
68 snprintf(buf
, sizeof(buf
), "GPIOA: 0x%08x GPIOB: 0x%08x",
69 (unsigned int)GPIOA
, (unsigned int)GPIOB
); lcd_puts(0, line
++, buf
);
70 snprintf(buf
, sizeof(buf
), "GPIOC: 0x%08x GPIOD: 0x%08x",
71 (unsigned int)GPIOC
, (unsigned int)GPIOD
); lcd_puts(0, line
++, buf
);
72 snprintf(buf
, sizeof(buf
), "GPIOE: 0x%08x",
73 (unsigned int)GPIOE
); lcd_puts(0, line
++, buf
);
77 snprintf(buf
, sizeof(buf
), "ADC%d: 0x%04x", i
, adc_read(i
));
78 lcd_puts(0, line
++, buf
);