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-pico
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-pico
Commits
6a878cde
Unverified
Commit
6a878cde
authored
Nov 24, 2023
by
Earle F. Philhower, III
Committed by
GitHub
Nov 24, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only create SPI/Wire instances if variant defined (#1842)
Fixes #1841
parent
cebdb6c9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
libraries/SPI/src/SPI.cpp
libraries/SPI/src/SPI.cpp
+5
-0
libraries/Wire/src/Wire.cpp
libraries/Wire/src/Wire.cpp
+5
-0
No files found.
libraries/SPI/src/SPI.cpp
View file @
6a878cde
...
...
@@ -363,5 +363,10 @@ void SPIClassRP2040::setClockDivider(uint8_t uc_div) {
#define __SPI1_DEVICE spi1
#endif
#ifdef PIN_SPI0_MISO
SPIClassRP2040
SPI
(
__SPI0_DEVICE
,
PIN_SPI0_MISO
,
PIN_SPI0_SS
,
PIN_SPI0_SCK
,
PIN_SPI0_MOSI
);
#endif
#ifdef PIN_SPI1_MISO
SPIClassRP2040
SPI1
(
__SPI1_DEVICE
,
PIN_SPI1_MISO
,
PIN_SPI1_SS
,
PIN_SPI1_SCK
,
PIN_SPI1_MOSI
);
#endif
libraries/Wire/src/Wire.cpp
View file @
6a878cde
...
...
@@ -470,5 +470,10 @@ void TwoWire::clearTimeoutFlag() {
#define __WIRE1_DEVICE i2c1
#endif
#ifdef PIN_WIRE0_SDA
TwoWire
Wire
(
__WIRE0_DEVICE
,
PIN_WIRE0_SDA
,
PIN_WIRE0_SCL
);
#endif
#ifdef PIN_WIRE1_SDA
TwoWire
Wire1
(
__WIRE1_DEVICE
,
PIN_WIRE1_SDA
,
PIN_WIRE1_SCL
);
#endif
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