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

Wrap UG_FONT struct byte array access with macro in case an accessor function is needed #11

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

Conversation

mattdf
Copy link

@mattdf mattdf commented Feb 9, 2016

Just a simple macro to allow for an alternative font data storage location that doesn't kill SRAM/RAM space. In AVR if you don't use the PROGMEM attribute in __UG_FONT_DATA, the font data takes up more than the available SRAM on the chip, but using the PROGMEM attribute requires accessing the font bytes with pgm_read_byte(&(font->p[index++])). The macro allows configuring this accessor from ugui_config.h

function is needed, as is the case on AVR if you use the PROGMEM
attribute in the __UG_FONT_DATA declaration
@stevenjeffries
Copy link

Thank you!

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.

2 participants