You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SPI.setClockDivider(SPI_CLOCK_DIV4); //decided to slow down from DIV2 after SPI stalling in some instances, especially visible on mega1284p when RFM69 and FLASH chip both present
43
-
SPI.begin();
52
+
SPI.setClockDivider(SPI_CLOCK_DIV4); //decided to slow down from DIV2 after SPI stalling in some instances, especially visible on mega1284p when RFM69 and FLASH chip both present
53
+
#endif
44
54
digitalWrite(_slaveSelectPin, LOW);
45
55
}
46
56
47
57
/// UNselect the flash chip
48
58
voidSPIFlash::unselect() {
49
59
digitalWrite(_slaveSelectPin, HIGH);
50
60
//restore SPI settings to what they were before talking to the FLASH chip
61
+
#ifdef SPI_HAS_TRANSACTION
62
+
SPI.endTransaction();
63
+
#else
64
+
SREG = _SREG; // restore interrupts IFF they were enabled
0 commit comments