I have made good experience using the fact that the compiler
concatenates sub-strings. Just dumping examples from existing code:
static char e_origin[] PROGMEM =
"\x1b""AT\x00\x00\x14\x12\x01\x00""C\x7F\x00" ;
This example also illustrates one problem and its solution: the compiler
has difficulties to distinguish between letters (at least a..f) that are
part of a constant and letters that are part of a character string. In
case of such an ambiguity, I simply start a new substring.
Here is a more complicated example that illustrates the transparency of
comments with respect to concatenation, and that you need not resort to
substrings as in the case of D\x82marrer (dont ask me why I used
sub-strings for "CArr\x88""ter - I presently have a small problem and
cannot try things out).
static char e_idle1[] PROGMEM =
"\x1b""AE\x0B" // button borders #9
"\x1b""AT\x28\x20\xCC\x32\x11\x00" // KEY_SHARE + 1
"CArr\x88""ter / D\x82marrer\x00" ;
Good luck!
_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list