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

Glue for SPIFFS #9

Open
timothyjohncarney opened this issue Jun 5, 2018 · 5 comments
Open

Glue for SPIFFS #9

timothyjohncarney opened this issue Jun 5, 2018 · 5 comments
Assignees

Comments

@timothyjohncarney
Copy link
Collaborator

I have adapted this project for use with SPIFFS.

https://github.com/pellepl/spiffs

In order to do so, I needed to make a few changes.

  1. Statically allocate the LocalBuffers to reduce call stack usage.
  2. Remove case-insensitive search as it is not C99 compatible.
  3. Add a wrapper function to SPIFFS file read API to behave like fgets.

I am willing to share my changes, but I am unsure if these changes are of interest. I believe the first change will break the reentrancy. Some locking mechanism is necessary to guarantee reentrancy after moving the buffers off of the call stack. Furthermore, removing support for case-insensitive search seems like a step in the wrong direction.

Please advise and thank you for your work.

-Tim

@compuphase
Copy link
Owner

compuphase commented Jun 6, 2018 via email

@timothyjohncarney
Copy link
Collaborator Author

Thiadmer,

The string-insensitive comparison was not C99 compatible, but I did find PORTABLE_STRNICMP since my last message, so I do not think that is a concern.

I am using FreeRTOS, but I still have limited RAM so I am unable to support the large buffers on the call stack. I have declared the buffers as static and that allows me to run without allocating as much RAM to the call stack of each task I wish to use with minIni.

-Tim

@timothyjohncarney
Copy link
Collaborator Author

Thiadmer,

I am happy to push the changes I made to a feature branch and create a pull request. Would you please grant me push access to the repository so that I may contribute those files?

Thanks,
Tim

@compuphase
Copy link
Owner

compuphase commented Jun 12, 2018 via email

@timothyjohncarney
Copy link
Collaborator Author

Thiadmer,

I have pushed my changes for review.

Thank you,
Tim

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

2 participants