I have the Ethernet2 library installed via the library manager in IDE 1.6.1.2
I would like to override the SPI setting which can be found in w5500.cpp, but without altering the library if possible.
I can override settings in w5500.h easily by including the .h and specifying 'w5500.' before the item I want to override, for example:
#include <utility/w5500.h>
...stuff and things...
w5500.setRetransmissionCount(1);
but I can't work out if there's a way to override the SPISettings in w5500.cpp (line 25).
Can anyone help?
edit: The only settings you can override is the CS and speed. Both are in w5100.h around line 325.
edit2: My bad. In Ethernet2 library, it is in w5500.cpp, line 25. You must change the settings there. The only setting it appears you can change is the speed, and only reduce it. 8MHz is as fast as most Arduinos support.
I really only want to change the speed on a per project basis, not globally for just my local install. I could attempt to manually edit a local copy of the library but this feels a bit overkill... (i'm not even sure I could manage it, I smell include mess hell).
I want 42MHz for my Due and probably a little less for an Uno.
BTW, the W5500 datasheet shows that THEORETICALLY it can handle clock speeds to 80Mhz, the realistic limit is 33MHz. You might want to try 21MHz on the Due.
You can use a pre-compiler statement to change the settings for each device.