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-esp32
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-esp32
Commits
f5246cf4
Commit
f5246cf4
authored
May 14, 2018
by
BuzzRage
Committed by
Me No Dev
May 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding a getClockDivider function (#1355)
* Adding getClockDivider function * indentation correction
parent
6bf7619c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
libraries/SPI/src/SPI.cpp
libraries/SPI/src/SPI.cpp
+6
-1
libraries/SPI/src/SPI.h
libraries/SPI/src/SPI.h
+2
-0
No files found.
libraries/SPI/src/SPI.cpp
View file @
f5246cf4
...
...
@@ -31,7 +31,7 @@ SPIClass::SPIClass(uint8_t spi_bus)
,
_ss
(
-
1
)
,
_div
(
0
)
,
_freq
(
1000000
)
,
_inTransaction
(
false
)
,
_inTransaction
(
false
)
{}
void
SPIClass
::
begin
(
int8_t
sck
,
int8_t
miso
,
int8_t
mosi
,
int8_t
ss
)
...
...
@@ -109,6 +109,11 @@ void SPIClass::setClockDivider(uint32_t clockDiv)
spiSetClockDiv
(
_spi
,
_div
);
}
uint32_t
SPIClass
::
getClockDivider
()
{
return
spiGetClockDiv
(
_spi
);
}
void
SPIClass
::
setDataMode
(
uint8_t
dataMode
)
{
spiSetDataMode
(
_spi
,
dataMode
);
...
...
libraries/SPI/src/SPI.h
View file @
f5246cf4
...
...
@@ -60,6 +60,8 @@ public:
void
setDataMode
(
uint8_t
dataMode
);
void
setFrequency
(
uint32_t
freq
);
void
setClockDivider
(
uint32_t
clockDiv
);
uint32_t
getClockDivider
();
void
beginTransaction
(
SPISettings
settings
);
void
endTransaction
(
void
);
...
...
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