Skip to content

Commit 102ee0e

Browse files
committed
Add support for two SPI interfaces
Signed-off-by: Ajay Bhargav <[email protected]>
1 parent 54c5b1e commit 102ee0e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

libraries/SPI/SPI.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,3 +149,6 @@ void SPIClass::CSControl(bool level)
149149
#endif
150150

151151
SPIClass SPI = SPIClass(SPI_DEFAULT_PORT);
152+
#if SPI_INTERFACES_COUNT > 1
153+
SPIClass SPI1 = SPIClass(SPI_PORT_1);
154+
#endif

libraries/SPI/SPI.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,5 +137,8 @@ class SPIClass
137137
};
138138

139139
extern SPIClass SPI;
140+
#if SPI_INTERFACES_COUNT > 1
141+
extern SPIClass SPI1;
142+
#endif
140143

141144
#endif

0 commit comments

Comments
 (0)