1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright © 2008 Rafaël Carré
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 ****************************************************************************/
23 #include "debug-target.h"
31 #define _DEBUG_PRINTF(a,varargs...) \
32 snprintf(buf, sizeof(buf), (a), ##varargs); lcd_puts(0,line++,buf)
34 /* FIXME: target tree is including ./debug-target.h rather than the one in
35 * sansa-fuze/, even though deps contains the correct one
36 * if I put the below into a sansa-fuze/debug-target.h, it doesn't work*/
37 #if defined(SANSA_FUZE) || defined(SANSA_E200V2)
39 short button_dbop_data(void);
45 bool __dbg_hw_info(void)
50 bool __dbg_ports(void)
56 lcd_setfont(FONT_SYSFIXED
);
61 _DEBUG_PRINTF("[GPIO Values and Directions]");
62 _DEBUG_PRINTF("GPIOA: %2x DIR: %2x", GPIOA_DATA
, GPIOA_DIR
);
63 _DEBUG_PRINTF("GPIOB: %2x DIR: %2x", GPIOB_DATA
, GPIOB_DIR
);
64 _DEBUG_PRINTF("GPIOC: %2x DIR: %2x", GPIOC_DATA
, GPIOC_DIR
);
65 _DEBUG_PRINTF("GPIOD: %2x DIR: %2x", GPIOD_DATA
, GPIOD_DIR
);
68 _DEBUG_PRINTF("[DBOP_DIN]");
69 _DEBUG_PRINTF("DBOP_DIN: %4x", button_dbop_data());
72 if (button_get_w_tmo(HZ
/10) == (DEBUG_CANCEL
|BUTTON_REL
))