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
f043cb78
Commit
f043cb78
authored
Feb 20, 2016
by
Avamander
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #206 from ab316/master
maskIRQ: Fixed function to clear interrupt bits first.
parents
47435fdd
02424869
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
RF24.cpp
RF24.cpp
+6
-1
No files found.
RF24.cpp
View file @
f043cb78
...
...
@@ -1016,7 +1016,12 @@ bool RF24::txStandBy(uint32_t timeout, bool startTx){
void
RF24
::
maskIRQ
(
bool
tx
,
bool
fail
,
bool
rx
){
write_register
(
CONFIG
,
(
read_register
(
CONFIG
)
)
|
fail
<<
MASK_MAX_RT
|
tx
<<
MASK_TX_DS
|
rx
<<
MASK_RX_DR
);
uint8_t
config
=
read_register
(
CONFIG
);
/* clear the interrupt flags */
config
&=
~
(
1
<<
MASK_MAX_RT
|
1
<<
MASK_TX_DS
|
1
<<
MASK_RX_DR
);
/* set the specified interrupt flags */
config
|=
fail
<<
MASK_MAX_RT
|
tx
<<
MASK_TX_DS
|
rx
<<
MASK_RX_DR
;
write_register
(
CONFIG
,
config
);
}
/****************************************************************************/
...
...
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