SAMD21 faster SPI clk, SAMD51 IRQ_PIN
This commit is contained in:
parent
1e1236d4b4
commit
1fe8191663
|
|
@ -484,8 +484,10 @@ void RFM69::select() {
|
|||
// set RFM69 SPI settings explicitly
|
||||
SPI.setDataMode(SPI_MODE0);
|
||||
SPI.setBitOrder(MSBFIRST);
|
||||
#ifdef __arm__
|
||||
SPI.setClockDivider(SPI_CLOCK_DIV16);
|
||||
#ifdef defined(__SAMD21__)
|
||||
SPI.setClockDivider(SPI_CLOCK_DIV2);
|
||||
#elif defined(__SAMD51__)
|
||||
SPI.setClockDivider(SPI_CLOCK_DIV16);
|
||||
#else
|
||||
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
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue