Commit da4343c3 by Georg-Johann Lay Committed by Georg-Johann Lay

extend.texi (AVR Named Address Spaces): Fix typos.

	* doc/extend.texi (AVR Named Address Spaces): Fix typos.

From-SVN: r186697
parent 54b9f838
2012-04-23 Georg-Johann Lay <avr@gjlay.de>
* doc/extend.texi (AVR Named Address Spaces): Fix typos.
2012-04-23 Richard Guenther <rguenther@suse.de> 2012-04-23 Richard Guenther <rguenther@suse.de>
PR c/53060 PR c/53060
......
...@@ -1311,18 +1311,18 @@ support is available or not: ...@@ -1311,18 +1311,18 @@ support is available or not:
#ifdef __FLASH #ifdef __FLASH
const __flash int var = 1; const __flash int var = 1;
int read_i (void) int read_var (void)
@{ @{
return i; return var;
@} @}
#else #else
#include <avr/pgmspace.h> /* From avr-libc */ #include <avr/pgmspace.h> /* From AVR-LibC */
const int var PROGMEM = 1; const int var PROGMEM = 1;
int read_i (void) int read_var (void)
@{ @{
return (int) pgm_read_word (&i); return (int) pgm_read_word (&var);
@} @}
#endif /* __FLASH */ #endif /* __FLASH */
@end example @end example
...@@ -1332,7 +1332,8 @@ locates data in flash but ...@@ -1332,7 +1332,8 @@ locates data in flash but
accesses to these data will read from generic address space, i.e.@: accesses to these data will read from generic address space, i.e.@:
from RAM, from RAM,
so that you need special accessors like @code{pgm_read_byte} so that you need special accessors like @code{pgm_read_byte}
from @w{@uref{http://nongnu.org/avr-libc/user-manual,avr-libc}}. from @w{@uref{http://nongnu.org/avr-libc/user-manual,AVR-LibC}}
together with attribute @code{progmem}.
@b{Limitations and caveats} @b{Limitations and caveats}
...@@ -1345,7 +1346,7 @@ supports reading across the 64@tie{}KiB flash segment boundaries is ...@@ -1345,7 +1346,7 @@ supports reading across the 64@tie{}KiB flash segment boundaries is
@code{__memx}. @code{__memx}.
@item @item
If you use one if the @code{__flash@var{N}} address spaces If you use one of the @code{__flash@var{N}} address spaces
you will have to arrange your linker skript to locate the you will have to arrange your linker skript to locate the
@code{.progmem@var{N}.data} sections according to your needs. @code{.progmem@var{N}.data} sections according to your needs.
...@@ -4782,7 +4783,7 @@ of the data but not how this data is accessed. ...@@ -4782,7 +4783,7 @@ of the data but not how this data is accessed.
In order to read data located with the @code{progmem} attribute In order to read data located with the @code{progmem} attribute
(inline) assembler must be used. (inline) assembler must be used.
@example @example
/* Use custom macros from @w{@uref{http://nongnu.org/avr-libc/user-manual,avr-libc}} */ /* Use custom macros from @w{@uref{http://nongnu.org/avr-libc/user-manual,AVR-LibC}} */
#include <avr/pgmspace.h> #include <avr/pgmspace.h>
/* Locate var in flash memory */ /* Locate var in flash memory */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment