| Index: embios/trunk/console.c |
| — | — | @@ -52,7 +52,7 @@ |
| 53 | 53 | void cputc_internal(unsigned int consoles, char string)
|
| 54 | 54 | {
|
| 55 | 55 | #ifdef HAVE_LCD
|
| 56 | | - if (consoles & 1) lcdconsole_putc(string, 0, -1);
|
| | 56 | + if (consoles & 1) lcdconsole_putc(string, LCDCONSOLE_FGCOLOR, LCDCONSOLE_BGCOLOR);
|
| 57 | 57 | #endif
|
| 58 | 58 | #ifdef HAVE_USB
|
| 59 | 59 | if (consoles & 2) dbgconsole_putc(string);
|
| — | — | @@ -109,7 +109,7 @@ |
| 110 | 110 | {
|
| 111 | 111 | mutex_lock(&console_mutex, TIMEOUT_BLOCK);
|
| 112 | 112 | #ifdef HAVE_LCD
|
| 113 | | - if (consoles & 1) lcdconsole_puts(string, 0, -1);
|
| | 113 | + if (consoles & 1) lcdconsole_puts(string, LCDCONSOLE_FGCOLOR, LCDCONSOLE_BGCOLOR);
|
| 114 | 114 | #endif
|
| 115 | 115 | #ifdef HAVE_USB
|
| 116 | 116 | if (consoles & 2) dbgconsole_puts(string);
|
| — | — | @@ -121,7 +121,7 @@ |
| 122 | 122 | {
|
| 123 | 123 | mutex_lock(&console_mutex, TIMEOUT_BLOCK);
|
| 124 | 124 | #ifdef HAVE_LCD
|
| 125 | | - if (consoles & 1) lcdconsole_write(string, length, 0, -1);
|
| | 125 | + if (consoles & 1) lcdconsole_write(string, length, LCDCONSOLE_FGCOLOR, LCDCONSOLE_BGCOLOR);
|
| 126 | 126 | #endif
|
| 127 | 127 | #ifdef HAVE_USB
|
| 128 | 128 | if (consoles & 2) dbgconsole_write(string, length);
|
| Index: embios/trunk/panic.c |
| — | — | @@ -57,9 +57,9 @@ |
| 58 | 58 | {
|
| 59 | 59 | enter_critical_section();
|
| 60 | 60 | while (!displaylcd_safe());
|
| 61 | | - lcdconsole_puts_noblit("\n*PANIC*\n", 0, -1);
|
| 62 | | - lcdconsole_puts_noblit(string, 0, -1);
|
| 63 | | - lcdconsole_puts_noblit("\n", 0, -1);
|
| | 61 | + lcdconsole_puts_noblit("\n*PANIC*\n", LCDCONSOLE_FGCOLOR, LCDCONSOLE_BGCOLOR);
|
| | 62 | + lcdconsole_puts_noblit(string, LCDCONSOLE_FGCOLOR, LCDCONSOLE_BGCOLOR);
|
| | 63 | + lcdconsole_puts_noblit("\n", LCDCONSOLE_FGCOLOR, LCDCONSOLE_BGCOLOR);
|
| 64 | 64 | lcdconsole_update();
|
| 65 | 65 | hang();
|
| 66 | 66 | }
|
| — | — | @@ -74,7 +74,7 @@ |
| 75 | 75 |
|
| 76 | 76 | static int pprfunc(void* ptr, unsigned char letter)
|
| 77 | 77 | {
|
| 78 | | - lcdconsole_putc_noblit(letter, 0, -1);
|
| | 78 | + lcdconsole_putc_noblit(letter, LCDCONSOLE_FGCOLOR, LCDCONSOLE_BGCOLOR);
|
| 79 | 79 | return true;
|
| 80 | 80 | }
|
| 81 | 81 |
|
| — | — | @@ -85,11 +85,11 @@ |
| 86 | 86 | {
|
| 87 | 87 | enter_critical_section();
|
| 88 | 88 | while (!displaylcd_safe());
|
| 89 | | - lcdconsole_puts_noblit("\n*PANIC*\n", 0, -1);
|
| | 89 | + lcdconsole_puts_noblit("\n*PANIC*\n", LCDCONSOLE_FGCOLOR, LCDCONSOLE_BGCOLOR);
|
| 90 | 90 | va_start(ap, string);
|
| 91 | 91 | format(pprfunc, NULL, string, ap);
|
| 92 | 92 | va_end(ap);
|
| 93 | | - lcdconsole_puts_noblit("\n", 0, -1);
|
| | 93 | + lcdconsole_puts_noblit("\n", LCDCONSOLE_FGCOLOR, LCDCONSOLE_BGCOLOR);
|
| 94 | 94 | lcdconsole_update();
|
| 95 | 95 | hang();
|
| 96 | 96 | }
|
| Index: embios/trunk/target/ipodnano2g/target.h |
| — | — | @@ -47,6 +47,8 @@ |
| 48 | 48 | #define LCD_HEIGHT 132
|
| 49 | 49 | #define LCD_FORMAT rgb565
|
| 50 | 50 | #define LCD_BYTESPERPIXEL 2
|
| | 51 | +#define LCDCONSOLE_FGCOLOR 0
|
| | 52 | +#define LCDCONSOLE_BGCOLOR -1
|
| 51 | 53 |
|
| 52 | 54 | #define HAVE_BACKLIGHT
|
| 53 | 55 |
|
| Index: embios/trunk/target/ipodnano4g/target.h |
| — | — | @@ -45,6 +45,8 @@ |
| 46 | 46 | #define LCD_HEIGHT 320
|
| 47 | 47 | #define LCD_FORMAT rgb565
|
| 48 | 48 | #define LCD_BYTESPERPIXEL 2
|
| | 49 | +#define LCDCONSOLE_FGCOLOR 0
|
| | 50 | +#define LCDCONSOLE_BGCOLOR -1
|
| 49 | 51 |
|
| 50 | 52 | #define HAVE_BACKLIGHT
|
| 51 | 53 |
|
| Index: embios/trunk/lcdconsole.c |
| — | — | @@ -46,7 +46,7 @@ |
| 47 | 47 |
|
| 48 | 48 | void lcdconsole_init()
|
| 49 | 49 | {
|
| 50 | | - memset(framebuf, -1, sizeof(framebuf));
|
| | 50 | + memset(framebuf, LCDCONSOLE_BGCOLOR, sizeof(framebuf));
|
| 51 | 51 | current_row = 0;
|
| 52 | 52 | current_col = -1;
|
| 53 | 53 | lcdconsole_needs_update = false;
|