|
From: | Christopher G. Morlier |
Subject: | Re: [avr-gcc-list] Initilizing complex const arrays : syntax ? |
Date: | Sun, 18 Sep 2005 18:42:28 -0500 |
User-agent: | Mozilla Thunderbird 1.0.6 (Windows/20050716) |
Richard Urwin wrote:
On Sunday 18 Sep 2005 23:33, Vincent Trouilliez wrote:const struct param __ATTR_PROGMEM__ param_list[] = { { ... , {0xDF, "C "}, ... }, ... };Try { ... , {"\xDF" "C "}, ... },I used two concatonated strings because otherwise the C will be taken as part of the hex sequence.
I can think of two ways that might work for you: 1) A string is just an array characters so you could do: { ... , {0xDF, 'C', ' '}, ... }, or2) A slight modification of Richard's idea would be to use the octal code equivalent to 0xDF. Since you can escape octal values and get the equivalent ascii value.
{ ... , {"\337C "}, ... }, The nice thing here is that it becomes a single string. HTH, Chris
[Prev in Thread] | Current Thread | [Next in Thread] |