adafruit / Adafruit-GFX-Library

Adafruit GFX graphics core Arduino library, this is the 'core' class that all our other graphics libraries derive from
https://learn.adafruit.com/adafruit-gfx-graphics-library
Other
2.41k stars 1.55k forks source link

Update Adafruit_GFX.cpp #432

Open mroobol6 opened 1 year ago

mroobol6 commented 1 year ago

CHANGED

ifndef pgm_read_byte

define pgm_read_byte(addr) ((const unsigned char )(addr)) #endif

TO - for use in Particle Photon // #ifndef pgm_read_byte

undef pgm_read_byte

define pgm_read_byte(addr) ((const unsigned char )(addr)) // #endif

Thank you for creating a pull request to contribute to Adafruit's GitHub code! Before you open the request please review the following guidelines and tips to help it be more easily integrated:

Thank you again for contributing! We will try to test and integrate the change as soon as we can, but be aware we have many GitHub repositories to manage and can't immediately respond to every request. There is no need to bump or check in on a pull request (it will clutter the discussion of the request).

Also don't be worried if the request is closed or not integrated--sometimes the priorities of Adafruit's GitHub code (education, ease of use) might not match the priorities of the pull request. Don't fret, the open source community thrives on forks and GitHub makes it easy to keep your changes in a forked repo.

After reviewing the guidelines above you can delete this text from the pull request.

BillyDonahue commented 1 year ago

This would break Arduino AVR, historically the most important platform for GFX.

This change is undefining special macros that the system headers (implicitly included by Arduino AVR) would have defined. The existing code would only define these macros if the system had not yet done so, and so it defined them with a cast that didn't consider PROGMEM storage.

PS: Title and description should be updated as well, per the boilerplate guidance.