patchAVR C Runtime Library - Patches: patch #7212, Add pgm_read_ptr() macros to...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #7212: Add pgm_read_ptr() macros to pgmspace.h

Submitter:  Dean Camera <abcminiuser>
Submitted:  Tue 01 Jun 2010 12:17:24 PM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  joerg_wunsch Open/Closed:  Closed

Fri 03 May 2013 03:37:20 PM UTC, comment #1: 

Applied to SVN r2388, thanks!

Joerg Wunsch <joerg_wunsch>
Group administrator
Tue 01 Jun 2010 12:17:24 PM UTC, original submission:  

Attached is a patch which adds new pgm_read_ptr[_near, _far] macros to <avr/pgmspace.h>. These macros hide the internal compiler representation of pointers from the programmer, who can instead use these macros for reading out pointers stored in PROGMEM.

The internal mechanism for these macros is currently identical to pgm_read_word() with the result cast to a void* type, however this leaves some wiggle-room if the size of pointers change in the future, adds a little extra type-safety to the user's application and improves the readability of existing code.

- Dean

Dean Camera <abcminiuser>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #20670:  pgmspace.patch added by abcminiuser (2KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by joerg_wunsch (Posted a comment)
  • -email is unavailable- added by abcminiuser (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-05-03 joerg_wunsch StatusNone Done
        Assigned toNone joerg_wunsch
        Open/ClosedOpen Closed
    2010-06-01 abcminiuser Attached File- Added pgmspace.patch, #20670

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code