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
cd3b0b3c
Commit
cd3b0b3c
authored
Jul 31, 2011
by
maniacbug
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge cleanups
parent
956b63a4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
8 deletions
+22
-8
RF24.cpp
RF24.cpp
+9
-7
RF24.h
RF24.h
+13
-1
No files found.
RF24.cpp
View file @
cd3b0b3c
...
...
@@ -616,9 +616,9 @@ void RF24::openReadingPipe(uint8_t child, uint64_t address)
{
// For pipes 2-5, only write the LSB
if
(
child
<
2
)
write_register
(
child_pipe
[
child
],
reinterpret_cast
<
const
uint8_t
*>
(
&
value
),
5
);
write_register
(
child_pipe
[
child
],
reinterpret_cast
<
const
uint8_t
*>
(
&
address
),
5
);
else
write_register
(
child_pipe
[
child
],
reinterpret_cast
<
const
uint8_t
*>
(
&
value
),
1
);
write_register
(
child_pipe
[
child
],
reinterpret_cast
<
const
uint8_t
*>
(
&
address
),
1
);
write_register
(
child_payload_size
[
child
],
payload_size
);
...
...
@@ -861,14 +861,16 @@ bool RF24::setDataRate(rf24_datarate_e speed)
write_register
(
RF_SETUP
,
setup
);
// Verify our result
setup
=
read_register
(
RF_SETUP
)
;
if
(
setup
==
setup
)
if
(
read_register
(
RF_SETUP
)
==
setup
)
{
return
true
;
result
=
true
;
}
else
{
wide_band
=
false
;
}
wide_band
=
false
;
return
false
;
return
result
;
}
/******************************************************************/
...
...
RF24.h
View file @
cd3b0b3c
...
...
@@ -569,9 +569,21 @@ public:
/**
* Set the transmission data rate
*
* @warning setting RF24_250KBPS will fail for non-P units
*
* @param speed RF24_250KBPS for 250kbs, RF24_1MBPS for 1Mbps, or RF24_2MBPS for 2Mbps
* @return true if the change was successful
*/
bool
setDataRate
(
rf24_datarate_e
speed
);
/**
* Fetches the transmission data rate
*
* @return Returns the hardware's currently configured datarate. The value
* is one of 250kbs, RF24_1MBPS for 1Mbps, or RF24_2MBPS, as defined in the
* rf24_datarate_e enum.
*/
void
setDataRate
(
rf24_datarate_e
speed
)
;
rf24_datarate_e
getDataRate
(
void
)
;
/**
* Set the CRC length
...
...
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