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

Submitted by:  Dean Camera <abcminiuser>
Submitted on:  Tue 01 Jun 2010 12:17:24 PM UTC  
 
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  Joerg Wunsch <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>
Project AdministratorIn charge of this item.
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>

 

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)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    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.3