avr-libc-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-libc-commit] [2523] Submitted by Stuart Cording:


From: elderling
Subject: [avr-libc-commit] [2523] Submitted by Stuart Cording:
Date: Sun, 14 Aug 2016 20:35:55 +0000 (UTC)

Revision: 2523
          http://svn.sv.gnu.org/viewvc/?view=rev&root=avr-libc&revision=2523
Author:   elderling
Date:     2016-08-14 20:35:54 +0000 (Sun, 14 Aug 2016)
Log Message:
-----------
Submitted by Stuart Cording:
bug #36933: Documentation no longer correctly describes how to declare strings
for storage in program memory
Patch by Aurelien Jarno:
Add const keyword to variables in PROGMEM section. 

Ticket Links:
------------
    http://savannah.gnu.org/bugs/?36933

Modified Paths:
--------------
    trunk/avr-libc/ChangeLog
    trunk/avr-libc/NEWS
    trunk/avr-libc/doc/api/pgmspace.dox

Modified: trunk/avr-libc/ChangeLog
===================================================================
--- trunk/avr-libc/ChangeLog    2016-04-20 05:43:23 UTC (rev 2522)
+++ trunk/avr-libc/ChangeLog    2016-08-14 20:35:54 UTC (rev 2523)
@@ -1,3 +1,10 @@
+2016-08-14  Aurelien Jarno  <address@hidden>
+
+       Fix for bug #36933: Documentation no longer correctly describes how to
+       declare strings for storage in program memory
+       * doc/api/pgmspace.dox: Add const keyword to variables in PROGMEM
+       section. 
+
 2016-04-04  Pitchumani Sivanupandi <address@hidden>
 
        patch #8964: Update tests

Modified: trunk/avr-libc/NEWS
===================================================================
--- trunk/avr-libc/NEWS 2016-04-20 05:43:23 UTC (rev 2522)
+++ trunk/avr-libc/NEWS 2016-08-14 20:35:54 UTC (rev 2523)
@@ -2,6 +2,9 @@
 
 * Bugs fixed:
 
+  [#36933] Documentation no longer correctly describes how to declare
+  strings for storage in program memory
+
 * New devices supported:
 
 * Contributed Patches:

Modified: trunk/avr-libc/doc/api/pgmspace.dox
===================================================================
--- trunk/avr-libc/doc/api/pgmspace.dox 2016-04-20 05:43:23 UTC (rev 2522)
+++ trunk/avr-libc/doc/api/pgmspace.dox 2016-08-14 20:35:54 UTC (rev 2523)
@@ -129,7 +129,7 @@
 .
 .
 .
-unsigned char mydata[11][10] PROGMEM =
+const unsigned char mydata[11][10] PROGMEM =
 {
        {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09},
        {0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13},
@@ -229,17 +229,17 @@
 declarations for each string, and put each string in Program Space:
 
 \code
-char string_1[] PROGMEM = "String 1";
-char string_2[] PROGMEM = "String 2";
-char string_3[] PROGMEM = "String 3";
-char string_4[] PROGMEM = "String 4";
-char string_5[] PROGMEM = "String 5";
+const char string_1[] PROGMEM = "String 1";
+const char string_2[] PROGMEM = "String 2";
+const char string_3[] PROGMEM = "String 3";
+const char string_4[] PROGMEM = "String 4";
+const char string_5[] PROGMEM = "String 5";
 \endcode
 
 Then use the new symbols in your table, like so:
 
 \code
-PGM_P string_table[] PROGMEM = 
+PGM_P const string_table[] PROGMEM = 
 {
     string_1,
     string_2,




reply via email to

[Prev in Thread] Current Thread [Next in Thread]