Commit 28c38551 authored by Sandeep Mistry's avatar Sandeep Mistry

SPI: use NRF_SPI2 on nRF52 series

parent 81429bf2
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#include <nrf.h>
#include "SPI.h" #include "SPI.h"
#include <Arduino.h> #include <Arduino.h>
#include <wiring_private.h> #include <wiring_private.h>
...@@ -254,8 +256,13 @@ void SPIClass::detachInterrupt() { ...@@ -254,8 +256,13 @@ void SPIClass::detachInterrupt() {
} }
#if SPI_INTERFACES_COUNT > 0 #if SPI_INTERFACES_COUNT > 0
#if defined(NRF52_SERIES)
SPIClass SPI (NRF_SPI2, PIN_SPI_MISO, PIN_SPI_SCK, PIN_SPI_MOSI);
#else
SPIClass SPI (NRF_SPI0, PIN_SPI_MISO, PIN_SPI_SCK, PIN_SPI_MOSI); SPIClass SPI (NRF_SPI0, PIN_SPI_MISO, PIN_SPI_SCK, PIN_SPI_MOSI);
#endif #endif
#endif
#if SPI_INTERFACES_COUNT > 1 #if SPI_INTERFACES_COUNT > 1
SPIClass SPI1(NRF_SPI1, PIN_SPI1_MISO, PIN_SPI1_SCK, PIN_SPI1_MOSI); SPIClass SPI1(NRF_SPI1, PIN_SPI1_MISO, PIN_SPI1_SCK, PIN_SPI1_MOSI);
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment