Got the following compile issue from source code that was compiling and working perfectly fine under DeviceOS 1.5.0.
lib/SdFat/src/SdSpiParticle.cpp:35:1: error: cannot convert 'particle::SpiProxy<(HAL_SPI_Interface)0u>*' to 'SPIClass* const' in initialization
};
^
I don’t have access to this source code as it is an included library. This is the library in question as listed in my project.properties file (am using ParticleDev):
dependencies.SdFat=0.0.7
One may ask why I am not using the latest version of SdFat? It is because I had lots of issues upgrading to the latest in the past. I will set up a test scaffold under WebIDE to see how I get on with higher versions.
Similar (WebIDE) compiler issue when using SdFat Library 1.0.16.
lib/SdFat/SdCard/../SpiDriver/SdSpiDriver.h:38:20: conditional expression between distinct pointer types 'SPIClass*' and 'particle::SpiProxy<(HAL_SPI_Interface)0u>*' lacks a cast
I would (and do) use SdFat 1.0.16 and compile with Workbench not Web IDE. I think from memory the original problems I had getting SdFat to compile stem from the type SPISettings which needs to be changed to __SPISettings. Having said that I haven’t tried with 1.5.1-rc.1. Sounds like a ticket to Particle?
This is a somewhat obscure decision that was made some time ago when the Arduino.h compatibility header was given support for SPI transactions.
When you use #include <Arduino.h> you can actually use SPISettings. Without it you should use __SPISettings - I tried to ask for the reason back then but didn't get any satisfying rational but something along the line: "Since some users may already have created thair onw version of SPISettings we don't want to break their solutions", however other changes were introduced without that kind of reluctance