Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-nRF5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-nRF5
Commits
d5b9b1c0
Commit
d5b9b1c0
authored
Jul 15, 2017
by
Roger Clark
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for second SPI HW device
parent
98444beb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
libraries/SPI/SPI.cpp
libraries/SPI/SPI.cpp
+3
-0
libraries/SPI/SPI.h
libraries/SPI/SPI.h
+3
-0
No files found.
libraries/SPI/SPI.cpp
View file @
d5b9b1c0
...
...
@@ -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
libraries/SPI/SPI.h
View file @
d5b9b1c0
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment