|
From: | Bjarne Laursen |
Subject: | Re: [avr-gcc-list] Using PSTR() |
Date: | Tue, 29 Mar 2005 10:05:09 +0200 |
User-agent: | Mozilla Thunderbird 0.7.3 (Windows/20040803) |
return( PSTR("01234567890ABCDEF")[u] );
PSTR puts the string in flash, but the compiler knows nothing about that when using the pointer. You must the use pgm_read_byte().
something like (not tested): return( pgm_read_byte(PSTR("01234567890ABCDEF")+u)); -Bjarne Laursen, RoseTechnology A/S, Denmark
[Prev in Thread] | Current Thread | [Next in Thread] |