SDFat Library Compile Error: 'F_CPU' was not declared in this scope

With the latest SDFat library (1.0.16), I am getting the following compile error:

lib/SdFat/SdCard/SdInfo.h:112:34: 'F_CPU' was not declared in this scope

What could be causing this?

Thanks in advance for the community’s help.

The easiest workaround is to just use SPI_FULL_SPEED instead of SPI_HALF_SPEED and the error will go away.

1 Like

Thank you very much @rickkas7. That did it.

I'm integrating SdFat right now and running into this as well in SdFat version 1.0.16. Where would I declare SPI_FULL_SPEED? I'm just using the library.

It’s the second parameter to the begin method of the SdFat object, as in:

sd.begin(csPin, SPI_FULL_SPEED);
1 Like

There is a constructor that takes the speed, but SPI_FULL_SPEED is default anyhow

1 Like

Thanks @rickkas7 and @ScruffR, that solves it for me!