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
ca4637d1
Unverified
Commit
ca4637d1
authored
Aug 10, 2023
by
LinusHeu
Committed by
GitHub
Aug 10, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SPI debugging: tiny fix & log actual baudrate (#1641)
parent
313caf40
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
libraries/SPI/src/SPI.cpp
libraries/SPI/src/SPI.cpp
+2
-1
No files found.
libraries/SPI/src/SPI.cpp
View file @
ca4637d1
...
...
@@ -177,7 +177,7 @@ void SPIClassRP2040::transfer(const void *txbuf, void *rxbuf, size_t count) {
}
void
SPIClassRP2040
::
beginTransaction
(
SPISettings
settings
)
{
DEBUGSPI
(
"SPI::beginTransaction(clk=%lu, bo=%s
\n
"
,
_spis
.
getClockFreq
(),
(
_spi
s
.
getBitOrder
()
==
MSBFIRST
)
?
"MSB"
:
"LSB"
);
DEBUGSPI
(
"SPI::beginTransaction(clk=%lu, bo=%s
)
\n
"
,
settings
.
getClockFreq
(),
(
setting
s
.
getBitOrder
()
==
MSBFIRST
)
?
"MSB"
:
"LSB"
);
if
(
_initted
&&
settings
==
_spis
)
{
DEBUGSPI
(
"SPI: Reusing existing initted SPI
\n
"
);
}
else
{
...
...
@@ -188,6 +188,7 @@ void SPIClassRP2040::beginTransaction(SPISettings settings) {
}
DEBUGSPI
(
"SPI: initting SPI
\n
"
);
spi_init
(
_spi
,
_spis
.
getClockFreq
());
DEBUGSPI
(
"SPI: actual baudrate=%u
\n
"
,
spi_get_baudrate
(
_spi
));
_initted
=
true
;
}
}
...
...
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