Skip to content

Commit

Permalink
Merge pull request #177 from rogerclarkmelbourne/master
Browse files Browse the repository at this point in the history
Add support for second SPI HW device
  • Loading branch information
sandeepmistry authored Aug 11, 2017
2 parents 98444be + d5b9b1c commit 6091ba3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libraries/SPI/SPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,3 +247,6 @@ void SPIClass::detachInterrupt() {
#if SPI_INTERFACES_COUNT > 0
SPIClass SPI (NRF_SPI0, PIN_SPI_MISO, PIN_SPI_SCK, PIN_SPI_MOSI);
#endif
#if SPI_INTERFACES_COUNT > 1
SPIClass SPI1(NRF_SPI1, PIN_SPI1_MISO, PIN_SPI1_SCK, PIN_SPI1_MOSI);
#endif
3 changes: 3 additions & 0 deletions libraries/SPI/SPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ void SPIClass::transfer(void *buf, size_t count)
#if SPI_INTERFACES_COUNT > 0
extern SPIClass SPI;
#endif
#if SPI_INTERFACES_COUNT > 1
extern SPIClass SPI1;
#endif

// For compatibility with sketches designed for AVR @ 16 MHz
// New programs should use SPI.beginTransaction to set the SPI clock
Expand Down

0 comments on commit 6091ba3

Please sign in to comment.