[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Re: Strings: escape sequence to insert arbitrary hex
From: |
Vincent Trouilliez |
Subject: |
Re: [avr-gcc-list] Re: Strings: escape sequence to insert arbitrary hex value ? |
Date: |
Thu, 5 Feb 2009 15:53:49 +0100 |
On Thu, 05 Feb 2009 07:58:26 +0100
David Brown <address@hidden> wrote:
Thanks to all the people who replied while I was away !
> An alternative idea is to find an ASCII character that you don't need
> otherwise (say, "~"), and use it in your strings. Then do on-the-fly
> conversion when outputing the strings:
>
> char example[] = "foo~bar";
>
> void lcdWriteString(const char* p) {
> while (char c = *p++) {
> if (c == '~') {
> lcdWriteChar(LCD_CUSTOM_CHAR_FOO);
> } else {
> lcdWriteChar(c);
Ah yes, as it happens I already do exactly just that, for two caracters:
the lower case 'g' and 'y' letters. The default ones defined in the LCD
module don't look good, so I redefined them (same bitmap but lowered
down one line/pixel, so it lines up better with the surrounding text).
--
Vince
- Re: [avr-gcc-list] Re: Strings: escape sequence to insert arbitrary hex value ?, (continued)
- Re: [avr-gcc-list] Re: Strings: escape sequence to insert arbitrary hex value ?, Juergen Harms, 2009/02/05
- Re: [avr-gcc-list] Re: Strings: escape sequence to insert arbitrary hex value ?, David Kelly, 2009/02/05
- RE: [avr-gcc-list] Re: Strings: escape sequence to insert arbitrary hex value ?, Dave Hansen, 2009/02/05
- Re: [avr-gcc-list] Re: Strings: escape sequence to insert arbitrary hex value ?, Vincent Trouilliez, 2009/02/05
- Re: [avr-gcc-list] Re: Strings: escape sequence to insert arbitrary, lucio, 2009/02/05
- Re: [avr-gcc-list] Re: Strings: escape sequence to insert arbitrary, Jim Brain, 2009/02/05
- Re: [avr-gcc-list] Re: Strings: escape sequence to insert arbitrary, Vincent Trouilliez, 2009/02/05
- Re: [avr-gcc-list] Re: Strings: escape sequence to insert arbitrary hex value ?, David Kelly, 2009/02/05
- RE: [avr-gcc-list] Re: Strings: escape sequence to insert arbitrary hex value ?, Dave Hansen, 2009/02/05
- Re: [avr-gcc-list] Re: Strings: escape sequence to insert arbitrary hex value ?, Joerg Wunsch, 2009/02/09
- Re: [avr-gcc-list] Re: Strings: escape sequence to insert arbitrary hex value ?,
Vincent Trouilliez <=
- Re: [avr-gcc-list] Strings: escape sequence to insert arbitrary hex value ?, Daniel O'Connor, 2009/02/05
- Re: [avr-gcc-list] Strings: escape sequence to insert arbitrary hex value ?, Vincent Trouilliez, 2009/02/05
- Re: [avr-gcc-list] Strings: escape sequence to insert arbitrary hex value ?, Daniel O'Connor, 2009/02/05
RE: [avr-gcc-list] Strings: escape sequence to insert arbitrary hexvalue ?, Michael, 2009/02/06