bdbdb97f19
NOTE to WPS people.... %m has been removed, but (i think) because of the other %m tags it wont fail if you try loading a wps with %m|..|, it will just be ignored. Also note that if the statusbar is enabled the default viewport is 8 pixels shorter than when its not, i.e (0,0) is really (0,8) if the statusbar is shown... I dont think this will be a major issue because almost no WPS show the bar and use bitmaps... text only WPS shouldnt be affected. Please report problem screens in http://forums.rockbox.org/index.php?topic=17358.0 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17763 a1c6a512-1295-4272-9138-f99709370657
80 lines
2.4 KiB
C
80 lines
2.4 KiB
C
/***************************************************************************
|
|
* __________ __ ___.
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
* \/ \/ \/ \/ \/
|
|
* $Id$
|
|
*
|
|
* Copyright (C) 2007 by Rob Purchase
|
|
*
|
|
* All files in this archive are subject to the GNU General Public License.
|
|
* See the file COPYING in the source tree root for full license agreement.
|
|
*
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
* KIND, either express or implied.
|
|
*
|
|
****************************************************************************/
|
|
|
|
#include "config.h"
|
|
#include "cpu.h"
|
|
#include "system.h"
|
|
#include "string.h"
|
|
#include <stdbool.h>
|
|
#include "button.h"
|
|
#include "lcd.h"
|
|
#include "sprintf.h"
|
|
#include "font.h"
|
|
#include "debug-target.h"
|
|
#include "adc.h"
|
|
|
|
bool __dbg_ports(void)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
bool __dbg_hw_info(void)
|
|
{
|
|
int line = 0, i, button, oldline;
|
|
bool done=false;
|
|
char buf[100];
|
|
|
|
lcd_setfont(FONT_SYSFIXED);
|
|
lcd_clear_display();
|
|
|
|
/* Put all the static text before the while loop */
|
|
lcd_puts(0, line++, "[Hardware info]");
|
|
|
|
line++;
|
|
oldline=line;
|
|
while(!done)
|
|
{
|
|
line = oldline;
|
|
button = button_get(false);
|
|
|
|
button &= ~BUTTON_REPEAT;
|
|
|
|
if (button == BUTTON_SELECT)
|
|
done=true;
|
|
|
|
snprintf(buf, sizeof(buf), "current tick: %08x Seconds running: %08d",
|
|
(unsigned int)current_tick, (unsigned int)current_tick/100); lcd_puts(0, line++, buf);
|
|
|
|
snprintf(buf, sizeof(buf), "GPIOA: 0x%08x GPIOB: 0x%08x",
|
|
(unsigned int)GPIOA, (unsigned int)GPIOB); lcd_puts(0, line++, buf);
|
|
snprintf(buf, sizeof(buf), "GPIOC: 0x%08x GPIOD: 0x%08x",
|
|
(unsigned int)GPIOC, (unsigned int)GPIOD); lcd_puts(0, line++, buf);
|
|
snprintf(buf, sizeof(buf), "GPIOE: 0x%08x",
|
|
(unsigned int)GPIOE); lcd_puts(0, line++, buf);
|
|
|
|
for (i = 0; i<4; i++)
|
|
{
|
|
snprintf(buf, sizeof(buf), "ADC%d: 0x%04x", i, adc_read(i));
|
|
lcd_puts(0, line++, buf);
|
|
}
|
|
|
|
lcd_update();
|
|
}
|
|
return false;
|
|
}
|