Commit 6091ba37 authored by Sandeep Mistry's avatar Sandeep Mistry Committed by GitHub

Merge pull request #177 from rogerclarkmelbourne/master

Add support for second SPI HW device
parents 98444beb d5b9b1c0
...@@ -247,3 +247,6 @@ void SPIClass::detachInterrupt() { ...@@ -247,3 +247,6 @@ void SPIClass::detachInterrupt() {
#if SPI_INTERFACES_COUNT > 0 #if SPI_INTERFACES_COUNT > 0
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
#if SPI_INTERFACES_COUNT > 1
SPIClass SPI1(NRF_SPI1, PIN_SPI1_MISO, PIN_SPI1_SCK, PIN_SPI1_MOSI);
#endif
...@@ -136,6 +136,9 @@ void SPIClass::transfer(void *buf, size_t count) ...@@ -136,6 +136,9 @@ void SPIClass::transfer(void *buf, size_t count)
#if SPI_INTERFACES_COUNT > 0 #if SPI_INTERFACES_COUNT > 0
extern SPIClass SPI; extern SPIClass SPI;
#endif #endif
#if SPI_INTERFACES_COUNT > 1
extern SPIClass SPI1;
#endif
// For compatibility with sketches designed for AVR @ 16 MHz // For compatibility with sketches designed for AVR @ 16 MHz
// New programs should use SPI.beginTransaction to set the SPI clock // New programs should use SPI.beginTransaction to set the SPI clock
......
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