Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Arduino Core for SAMD21 CPU
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
josc941e
Arduino Core for SAMD21 CPU
Commits
2ceac441
Commit
2ceac441
authored
9 years ago
by
Sandeep Mistry
Browse files
Options
Downloads
Patches
Plain Diff
Add getDataOrderSPI API to Sercom
parent
9e80d71c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cores/arduino/SERCOM.cpp
+5
-0
5 additions, 0 deletions
cores/arduino/SERCOM.cpp
cores/arduino/SERCOM.h
+1
-0
1 addition, 0 deletions
cores/arduino/SERCOM.h
with
6 additions
and
0 deletions
cores/arduino/SERCOM.cpp
+
5
−
0
View file @
2ceac441
...
...
@@ -262,6 +262,11 @@ void SERCOM::setDataOrderSPI(SercomDataOrder dataOrder)
enableSPI
();
}
SercomDataOrder
SERCOM
::
getDataOrderSPI
()
{
return
(
sercom
->
SPI
.
CTRLA
.
bit
.
DORD
?
LSB_FIRST
:
MSB_FIRST
);
}
void
SERCOM
::
setBaudrateSPI
(
uint8_t
divider
)
{
//Can't divide by 0
...
...
This diff is collapsed.
Click to expand it.
cores/arduino/SERCOM.h
+
1
−
0
View file @
2ceac441
...
...
@@ -173,6 +173,7 @@ class SERCOM
void
enableSPI
(
void
)
;
void
disableSPI
(
void
)
;
void
setDataOrderSPI
(
SercomDataOrder
dataOrder
)
;
SercomDataOrder
getDataOrderSPI
(
void
)
;
void
setBaudrateSPI
(
uint8_t
divider
)
;
void
setClockModeSPI
(
SercomSpiClockMode
clockMode
)
;
void
writeDataSPI
(
uint8_t
data
)
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment