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 authentification 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: NonePriority: 5 - Normal
Status: DonePrivacy: 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 (2kB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 03 May 2013 03:37:20 PM UTCjoerg_wunschStatusNone=>Done
      Assigned toNone=>joerg_wunsch
      Open/ClosedOpen=>Closed
    Tue 01 Jun 2010 12:17:24 PM UTCabcminiuserAttached File-=>Added pgmspace.patch, #20670

    Back to the top


    Powered by Savane 3.1-cleanup