Speedup SPI, fix PIC32 corner case for include

This commit is contained in:
Andrew J. Kroll 2014-09-25 23:14:04 -04:00
parent 740fa097e6
commit f2f57d71a3
2 changed files with 2 additions and 2 deletions

View file

@ -133,6 +133,6 @@ e-mail : support@circuitsathome.com
#include <SPI.h> // Use the Arduino SPI library #include <SPI.h> // Use the Arduino SPI library
#endif #endif
#if defined(__PIC32MX__) || defined(__PIC32MZ__) #if defined(__PIC32MX__) || defined(__PIC32MZ__)
#include <../../libraries/SPI/SPI.h> // Hack to use the SPI library #include <../../../../hardware/pic32/libraries/SPI/SPI.h> // Hack to use the SPI library
#endif #endif
#endif /* SETTINGS_H */ #endif /* SETTINGS_H */

View file

@ -45,7 +45,7 @@ public:
SPI_SS::Set(); SPI_SS::Set();
SPI.begin(); SPI.begin();
#if defined(__MIPSEL__) #if defined(__MIPSEL__)
SPI.setClockDivider(2); SPI.setClockDivider(1);
#else #else
SPI.setClockDivider(4); // Set speed to 84MHz/4=21MHz - the MAX3421E can handle up to 26MHz SPI.setClockDivider(4); // Set speed to 84MHz/4=21MHz - the MAX3421E can handle up to 26MHz
#endif #endif