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

Support __FlashStringHelper for other string based methods #7

Open
Jnesselr opened this issue Feb 19, 2023 · 0 comments
Open

Support __FlashStringHelper for other string based methods #7

Jnesselr opened this issue Feb 19, 2023 · 0 comments

Comments

@Jnesselr
Copy link

I think it would be useful if other string methods supported __FlashStringHelper to be able to read directly from PROGMEM.

The methods that maybe should have a PROGMEM option:

  • WriteChars
  • file_Count
  • file_Dir
  • file_Erase
  • file_Exec
  • file_Exists
  • file_FindFirst
  • file_LoadFunction
  • file_LoadImageControl
  • file_Open
  • file_PlayWAV
  • file_PutS
  • file_Run
  • gfx_Button
  • putstr
  • writeString
  • file_FindFirstRet (only for Filename)

Unfortunately, I can't see a good way of doing this that doesn't involve lots of code duplication. It's more or less what happened for the println/print function. I don't mind writing the code and submitting a PR, I just wanted to get some clarification on whether it's the right approach to duplicate these functions. For all of them but WriteChars, I think they just pass into WriteChars. So the only function that would actually be different is WriteChars itself, every other function would be identical aside from type info.

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

No branches or pull requests

1 participant