mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Speedup SPI, fix PIC32 corner case for include
This commit is contained in:
parent
740fa097e6
commit
f2f57d71a3
2 changed files with 2 additions and 2 deletions
|
@ -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 */
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue