Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RF24
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
RF24
Commits
ded2157c
Commit
ded2157c
authored
Sep 23, 2015
by
TMRh20
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RPI: Fix for SPIDEV on 4.1.7+
Per #138 n8henrie - SPIDEV not working with newest firmware.
parent
14ed8638
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
arch/BBB/spi.cpp
arch/BBB/spi.cpp
+7
-6
No files found.
arch/BBB/spi.cpp
View file @
ded2157c
...
...
@@ -18,18 +18,18 @@ void SPI::begin(int busNo){
//BBB:
if
(
!
busNo
){
/*
if(!busNo){
this->device = "/dev/spidev1.0";;
}else{
this->device = "/dev/spidev1.1";;
}
}
*/
//RPi:
/*
if(!busNo){
if
(
!
busNo
){
this
->
device
=
"/dev/spidev0.0"
;;
}
else
{
this
->
device
=
"/dev/spidev0.1"
;;
}
*/
}
this
->
bits
=
8
;
...
...
@@ -110,7 +110,8 @@ uint8_t SPI::transfer(uint8_t tx_)
int
ret
;
uint8_t
tx
[
1
]
=
{
tx_
};
uint8_t
rx
[
1
];
this
->
init
();
struct
spi_ioc_transfer
tr
=
{
tr
.
tx_buf
=
(
unsigned
long
)
&
tx
[
0
],
tr
.
rx_buf
=
(
unsigned
long
)
&
rx
[
0
],
...
...
@@ -151,7 +152,7 @@ void SPI::transfernb(char* tbuf, char* rbuf, uint32_t len)
{
int
ret
;
this
->
init
();
struct
spi_ioc_transfer
tr
=
{
tr
.
tx_buf
=
(
unsigned
long
)
tbuf
,
tr
.
rx_buf
=
(
unsigned
long
)
rbuf
,
...
...
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