FS#8961 - Anti-Aliased Fonts.
[kugel-rb.git] / firmware / target / arm / s5l8700 / debug-s5l8700.c
blob7f2930add7f77795ad603aa3439c6d553d359180
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
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 ****************************************************************************/
22 #include <stdbool.h>
23 #include "config.h"
24 #include "kernel.h"
25 #include "debug-target.h"
26 #include "button.h"
27 #include "lcd.h"
28 #include "font.h"
29 #include "sprintf.h"
31 /* Skeleton for adding target specific debug info to the debug menu
34 #define _DEBUG_PRINTF(a,varargs...) do { \
35 snprintf(buf, sizeof(buf), (a), ##varargs); lcd_puts(0,line++,buf); \
36 } while(0)
39 bool __dbg_hw_info(void)
41 char buf[50];
42 int line;
44 lcd_clear_display();
45 lcd_setfont(FONT_SYSFIXED);
47 while(1)
49 while(1)
51 lcd_clear_display();
52 line = 0;
54 /* _DEBUG_PRINTF statements can be added here to show debug info */
55 _DEBUG_PRINTF("__dbg_hw_info");
57 lcd_update();
58 int btn = button_get_w_tmo(HZ/10);
59 if(btn == (DEBUG_CANCEL|BUTTON_REL))
60 goto end;
61 else if(btn == (BUTTON_PLAY|BUTTON_REL))
62 break;
66 end:
67 lcd_setfont(FONT_UI);
68 return false;
71 bool __dbg_ports(void)
73 char buf[50];
74 int line;
76 lcd_clear_display();
77 lcd_setfont(FONT_SYSFIXED);
79 while(1)
81 line = 0;
83 /* _DEBUG_PRINTF statements can be added here to show debug info */
84 _DEBUG_PRINTF("__dbg_ports");
86 lcd_update();
87 if (button_get_w_tmo(HZ/10) == (DEBUG_CANCEL|BUTTON_REL))
88 break;
90 lcd_setfont(FONT_UI);
91 return false;