Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to new avr/pgmspace Syntax #4

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

malexmave
Copy link

As reported in Issue #3, the syntax for PROGMEM has changed from PROGMEM prog_* to PROGMEM const *, with * being the variable types. Additionally, prog_uchar has been changed to const unsigned char.

I have implemented those changes in the libraries and updated all the examples to use the changed stuff. As far as I know, everything compiles and works flawlessly.

Sincerely,
malexmave

Max Maass added 10 commits December 30, 2012 12:58
…ables.

Old Syntax was PROGMEM prog_uchar..., new Syntax is PROGMEM const unsigned char...
Same goes for prog_uint16 (const uint16) and friends.
The example files have NOT been updated yet, and the changes have not been tested properly.
FirstTest now uses the new Syntax and should work properly.
Updated the Template to use the new Syntax, plus fixed a bug (setup() loaded gamby.palette = blocks;, but blocks did not exist. Made it load the corrent thing (palette, the PROGMEM constant) instead).
Updated TextModeTemplate to the new Syntax.
AnimatedSprites updated to the new Syntax.
Updated to the new Syntax.
This file did not need any updates to the new Syntax, but I used this chance to remove two spare newlines from the end of the file ;-)
Updated BlocDrop to the new Syntax.
Updated Jewels to the new Syntax.
Updated SimianSays to the new Syntax.
@logicalzero
Copy link
Owner

Did you upgrade the AVR toolchain manually? The version bundled with the current Mac and Windows Arduino IDE is the earlier one with the specialized PROGMEM types. The current Arduino documentation still advises against using normal data types with PROGMEM.

@malexmave
Copy link
Author

I just sudo apt-get install arduino on Linux Mint 14 x64 and got that Version... You can see my Software Versions in #3.

Edit: If there are version differences between Mac OS / Windows / other Linux and Mint 14, you can probably just merge this into a branch and add a notice about "If it doesn't work with the first version, try this branch" or something similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants