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
02424869
Commit
02424869
authored
Feb 05, 2016
by
Abdullah Baig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
maskIRQ: Fixed function to clear interrupt bits first.
parent
95926b2c
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 @
02424869
...
@@ -1016,7 +1016,12 @@ bool RF24::txStandBy(uint32_t timeout, bool startTx){
...
@@ -1016,7 +1016,12 @@ bool RF24::txStandBy(uint32_t timeout, bool startTx){
void
RF24
::
maskIRQ
(
bool
tx
,
bool
fail
,
bool
rx
){
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