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
cc7e0a2f
Commit
cc7e0a2f
authored
Sep 12, 2011
by
maniacbug
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a bug when pipe 0 was NOT being used for writing.
parent
5344c5fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
RF24.cpp
RF24.cpp
+6
-4
No files found.
RF24.cpp
View file @
cc7e0a2f
...
...
@@ -247,8 +247,9 @@ void RF24::print_address_register(prog_char* name, uint8_t reg, uint8_t qty)
/****************************************************************************/
RF24
::
RF24
(
uint8_t
_cepin
,
uint8_t
_cspin
)
:
ce_pin
(
_cepin
),
csn_pin
(
_cspin
),
wide_band
(
true
),
p_variant
(
false
),
payload_size
(
32
),
ack_payload_available
(
false
),
dynamic_payloads_enabled
(
false
)
ce_pin
(
_cepin
),
csn_pin
(
_cspin
),
wide_band
(
true
),
p_variant
(
false
),
payload_size
(
32
),
ack_payload_available
(
false
),
dynamic_payloads_enabled
(
false
),
pipe0_reading_address
(
0
)
{
}
...
...
@@ -381,8 +382,9 @@ void RF24::startListening(void)
write_register
(
CONFIG
,
read_register
(
CONFIG
)
|
_BV
(
PWR_UP
)
|
_BV
(
PRIM_RX
));
write_register
(
STATUS
,
_BV
(
RX_DR
)
|
_BV
(
TX_DS
)
|
_BV
(
MAX_RT
)
);
// Restore the pipe0 adddress
write_register
(
RX_ADDR_P0
,
reinterpret_cast
<
const
uint8_t
*>
(
&
pipe0_reading_address
),
5
);
// Restore the pipe0 adddress, if exists
if
(
pipe0_reading_address
)
write_register
(
RX_ADDR_P0
,
reinterpret_cast
<
const
uint8_t
*>
(
&
pipe0_reading_address
),
5
);
// Flush buffers
flush_rx
();
...
...
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