Skip to content

Commit 726a250

Browse files
animeshsrivastava24per1234
authored andcommitted
Fix typos in PROGMEM reference page
1 parent 3225052 commit 726a250

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Language/Variables/Utilities/PROGMEM.adoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Store data in flash (program) memory instead of SRAM. There's a description of t
2121

2222
The `PROGMEM` keyword is a variable modifier, it should be used only with the datatypes defined in pgmspace.h. It tells the compiler "put this information into flash memory", instead of into SRAM, where it would normally go.
2323

24-
PROGMEM is part of the link:http://www.nongnu.org/avr-libc/user-manual/group\__avr__pgmspace.html[pgmspace.h] library. It is included automatically in modern versions of the IDE, however if you are using an IDE version below 1.0 (2011), you'll first need to include the library at the top your sketch, like this:
24+
PROGMEM is part of the link:http://www.nongnu.org/avr-libc/user-manual/group\__avr__pgmspace.html[pgmspace.h] library. It is included automatically in modern versions of the IDE. However, if you are using an IDE version below 1.0 (2011), you'll first need to include the library at the top your sketch, like this:
2525

2626
`#include <avr/pgmspace.h>`
2727
While `PROGMEM` could be used on a single variable, it is really only worth the fuss if you have a larger block of data that needs to be stored, which is usually easiest in an array, (or another C++ data structure beyond our present discussion).
@@ -34,7 +34,7 @@ Using `PROGMEM` is also a two-step procedure. After getting the data into Flash
3434
=== Syntax
3535
`const dataType variableName[] PROGMEM = {data0, data1, data3...};`
3636

37-
Note that because PROGMEM is a variable modifier, there is no hard and fast rule about where it should go, so the Arduino compiler accepts all of the definitions below, which are also synonymous. However experiments have indicated that, in various versions of Arduino (having to do with GCC version), PROGMEM may work in one location and not in another. The "string table" example below has been tested to work with Arduino 13. Earlier versions of the IDE may work better if PROGMEM is included after the variable name.
37+
Note that because PROGMEM is a variable modifier, there is no hard and fast rule about where it should go, so the Arduino compiler accepts all of the definitions below, which are also synonymous. However, experiments have indicated that, in various versions of Arduino (having to do with GCC version), PROGMEM may work in one location and not in another. The "string table" example below has been tested to work with Arduino 13. Earlier versions of the IDE may work better if PROGMEM is included after the variable name.
3838

3939
`const dataType variableName[] PROGMEM = {}; // use this form` +
4040
`const PROGMEM dataType variableName[] = {}; // or this one` +
@@ -118,7 +118,7 @@ These tend to be large structures so putting them into program memory is often d
118118
Setting up a table (array) of strings in program memory is slightly complicated, but
119119
here is a good template to follow.
120120
121-
Setting up the strings is a two-step process. First define the strings.
121+
Setting up the strings is a two-step process. First, define the strings.
122122
*/
123123
124124
#include <avr/pgmspace.h>

0 commit comments

Comments
 (0)