2008-11-10 11:04:43 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
* \/ \/ \/ \/ \/
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
* Copyright © 2008 Rafaël Carré
|
|
|
|
*
|
|
|
|
* 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>
|
|
|
|
#include "debug-target.h"
|
2009-01-27 11:05:38 +00:00
|
|
|
#include "button.h"
|
|
|
|
#include "lcd.h"
|
|
|
|
#include "font.h"
|
|
|
|
#include "system.h"
|
|
|
|
#include "sprintf.h"
|
2009-01-27 19:45:00 +00:00
|
|
|
#include "cpu.h"
|
2009-01-27 11:05:38 +00:00
|
|
|
|
|
|
|
#define _DEBUG_PRINTF(a,varargs...) \
|
|
|
|
snprintf(buf, sizeof(buf), (a), ##varargs); lcd_puts(0,line++,buf)
|
2008-11-10 11:04:43 +00:00
|
|
|
|
|
|
|
/* TODO */
|
|
|
|
|
2009-01-27 11:05:38 +00:00
|
|
|
bool __dbg_hw_info(void)
|
2008-11-10 11:04:43 +00:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2009-01-27 11:05:38 +00:00
|
|
|
bool __dbg_ports(void)
|
2008-11-10 11:04:43 +00:00
|
|
|
{
|
2009-01-27 11:05:38 +00:00
|
|
|
char buf[50];
|
2009-01-27 19:45:00 +00:00
|
|
|
int line;
|
2009-01-27 11:05:38 +00:00
|
|
|
|
|
|
|
lcd_clear_display();
|
|
|
|
lcd_setfont(FONT_SYSFIXED);
|
|
|
|
|
|
|
|
while(1)
|
|
|
|
{
|
|
|
|
line = 0;
|
|
|
|
_DEBUG_PRINTF("[GPIO Values and Directions]");
|
2009-01-27 19:45:00 +00:00
|
|
|
_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);
|
2009-01-27 11:05:38 +00:00
|
|
|
#ifdef TRACK_DBOP_DIN
|
2009-01-27 19:45:00 +00:00
|
|
|
line++;
|
2009-01-27 11:05:38 +00:00
|
|
|
_DEBUG_PRINTF("[DBOP_DIN]");
|
|
|
|
_DEBUG_PRINTF("DBOP_DIN: %4x", _dbop_din);
|
|
|
|
#endif
|
|
|
|
lcd_update();
|
|
|
|
if (button_get_w_tmo(HZ/10) == (DEBUG_CANCEL|BUTTON_REL))
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
lcd_setfont(FONT_UI);
|
2008-11-10 11:04:43 +00:00
|
|
|
return false;
|
|
|
|
}
|