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 SdFat v2 API #320

Closed
Steve132 opened this issue Dec 24, 2020 · 1 comment · Fixed by #321
Closed

Support SdFat v2 API #320

Steve132 opened this issue Dec 24, 2020 · 1 comment · Fixed by #321

Comments

@Steve132
Copy link
Contributor

Describe the bug

The default version of SdFat installed by the Arduino Libraries manager is now V2. However, there are a few small changes between V1 and V2 that makes GUIslice no longer compile. In particular, the SdFatSoftSpi template is no longer used (see
https://github.com/greiman/SdFat/blob/master/examples/SoftwareSpi/SoftwareSpi.ino#L22) and instead a different (but almost identical) class template, and the preprocessor symbol for ENABLE_SOFTWARE_SPI_CLASS no longer exists.

Device hardware

  • MCU: Irrelevant, effects all SdFat Soft platforms. But I was using Due.
  • Display with link: It's the same display as mentioned in this issue
  • GUIslice config selected: ??? ard-shld-generic1_35_touch1.h

Please confirm whether:

  • Display works correctly with standalone display driver library examples (eg. TFT_eSPI graphicstest, Adafruit graphicstest, etc.) without GUIslice: it does.
  • Touch works correctly with standalone touch library examples without GUIslice: It does.

I was able to get everything working after I downgraded to v1

Expected behavior

A description of what you expected to happen

It would be nice to compile (or at least throw an error message explaining what to do) if v2 is detected in the preprocessor, because I spent almost 2 hours trying to debug the downgrade. I can even make a patch for this.

@ImpulseAdventure
Copy link
Owner

Thank you for catching this and posting a PR, Steve! (merged)

Although the SdFat versioning has a bit of inconsistency, I have now tried adding a check for v2.0.3 (thanks to your integer version request to Bill) and utilize the new API.

If you get a chance to try out the revised GUIslice implementation, let me know. It compiles on my end, but I haven't tested it on the hardware yet. Note that users of SdFat v2 would need to set SPI_DRIVER_SELECT 2 in their SdFatConfig.h.

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 a pull request may close this issue.

2 participants